SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
The Common Debian Build System
                    (CDBS)


            Peter Eisentraut


             FOSDEM 2009




        Peter Eisentraut   CDBS
What is CDBS?




    A set of makefile fragments to include into debian/rules
    Makes packaging complex packages easier.
    Makes packaging simple packages harder.
    Initiates you to a secret subculture of Debian packagers.
    Causes you to lose all your not-CDBS-using friends.




                    Peter Eisentraut   CDBS
Simple Example


  #!/usr/bin/make -f

  include /usr/share/cdbs/1/rules/debhelper.mk
  include /usr/share/cdbs/1/class/autotools.mk

  DEB_CONFIGURE_EXTRA_FLAGS = --enable-funnybiz
  DEB_INSTALL_DOCS_ALL = readme.txt
  LDFLAGS += -Wl,--as-needed

  binary-install/mypackage-tools::
          chmod a+x debian/mypackage-tools/
              usr/lib/mypackage/*



                 Peter Eisentraut   CDBS
Simple Example


  #!/usr/bin/make -f

  include /usr/share/cdbs/1/rules/debhelper.mk
  include /usr/share/cdbs/1/class/autotools.mk

  DEB_CONFIGURE_EXTRA_FLAGS = --enable-funnybiz
  DEB_INSTALL_DOCS_ALL = readme.txt
  LDFLAGS += -Wl,--as-needed

  binary-install/mypackage-tools::
          chmod a+x debian/mypackage-tools/
              usr/lib/mypackage/*



                 Peter Eisentraut   CDBS
Simple Example


  #!/usr/bin/make -f

  include /usr/share/cdbs/1/rules/debhelper.mk
  include /usr/share/cdbs/1/class/autotools.mk

  DEB_CONFIGURE_EXTRA_FLAGS = --enable-funnybiz
  DEB_INSTALL_DOCS_ALL = readme.txt
  LDFLAGS += -Wl,--as-needed

  binary-install/mypackage-tools::
          chmod a+x debian/mypackage-tools/
              usr/lib/mypackage/*



                 Peter Eisentraut   CDBS
Background




    First published in 2003 by Colin Walters
    Co-maintained 2003-2005 by Colin Walters and Jeff Bailey
    Hijacked in 2006 by me after a period of no maintenance
    Currently 2 or 3 maintainers plus Ubuntu feedback




                    Peter Eisentraut   CDBS
Package Parameters


  Source: cdbs
  Section: devel
  Priority: optional
  Maintainer:
   CDBS Hackers <build-common-hackers@lists.alioth.debian.org>
  Build-Depends-Indep: debhelper (>= 5), graphviz, realpath, fakeroot,
   python-dev, python2.4-dev, python2.5-dev, libxml2-utils, xsltproc,
   docbook-xml, docbook-xsl, dblatex, ant, kaffe, sharutils, gs-common,
   texlive-extra-utils
  Uploaders: Jonas Smedegaard <dr@jones.dk>,
   Marc Dequènes (Duck) <Duck@DuckCorp.org>,
   Peter Eisentraut <petere@debian.org>
  Standards-Version: 3.7.3
  Vcs-Browser: http://svn.debian.org/wsvn/build-common/
  Vcs-Svn: svn://svn.debian.org/build-common/

  Bugs: 1 I, 31 N, 7 M, 33 W
  Last upload: 01 Apr 2008



                               Peter Eisentraut   CDBS
Statistics




      Currently 13077 source packages in unstable
      3185 use CDBS (24.4%)
      Appears to be increasing by 0.2% or so per month
      Archive takeover completed by 2020 :-)




                      Peter Eisentraut   CDBS
Architecture


     Yes, there is one:
         Classes contain the logic for the package’s upstream build
         system: make, autotools, MakeMaker, distutils, cmake, etc.
         Rules contain additional rules of various utility: debhelper,
         tarball-in-tarball, patch tools
         Classes use inheritance (a.k.a. makefile inclusion):
         autotools inherits make, gnome inherits autotools, etc.
     In practice, this is arcane, so just remember:
         Exactly one class per debian/rules
         Zero or more rules per debian/rules
         Usually, you want at least the debhelper rules set
         Deviations are possible, but rarely useful




                      Peter Eisentraut   CDBS
Advantages

  Technical advantages:
      Writing debian/rules becomes quick and easy (usually)
      You get the details right for free:
          dh_* sequencing
          configure --build/--host (see autotools-dev
          README)
          DEB_BUILD_OPTIONS: noopt, nostrip
          CFLAGS, CXXFLAGS, etc. (try passing them to cmake or
          qmake correctly)
          parallel make
          Java packaging policy
      You follow policy evolvement for free:
          Python policy
          patch, unpatch targets
          KDE 4 packaging practices


                       Peter Eisentraut   CDBS
Advantages



  Conceptual advantages:
      debian/rules highlights the nonstandard packaging
      steps, rather than hiding them in boilerplate.
      Avoids propagation of mistakes through copy-and-paste or
      dh_make.
      Avoids home-brewed and half-baked alternative
      debian/rules makefile fragments packages.




                     Peter Eisentraut   CDBS
Disadvantages




     If your package has an unusual build system, CDBS might
     be in your way.
     If you are a control-freak, CDBS will be in your way.
     If GNU make syntax confuses you, CDBS will confuse you.
     CDBS is not good for learning Debian packaging.




                      Peter Eisentraut   CDBS
Makefile Class




  include /usr/share/cdbs/1/class/makefile.mk

  DEB_MAKE_BUILD_TARGET = all
  DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(CURDIR)/
  DEB_MAKE_CLEAN_TARGET = clean

     Sets CFLAGS etc. according to policy
     Observes DEB_BUILD_OPTIONS




                     Peter Eisentraut   CDBS
Autotools Class


  include /usr/share/cdbs/1/class/autotools.mk

  DEB_CONFIGURE_EXTRA_FLAGS = --enable-funnybiz

     “Inherits” makefile class
     Calls configure with proper options (host tuple, installation
     paths)
     Calls make distclean instead of make clean
     Handles config.guess, config.sub updates
     Supports autoreconf, libtoolize before build
     (dubious)



                      Peter Eisentraut   CDBS
Perl Class




  include /usr/share/cdbs/1/class/perlmodule.mk

  DEB_MAKEMAKER_USER_FLAGS = --with-foo

     “Inherits” makefile class
     Calls MakeMaker with proper options and paths




                     Peter Eisentraut   CDBS
Python Class




  include /usr/share/cdbs/1/class/python-distutils.mk

  # mandatory
  DEB_PYTHON_SYSTEM = pycentral | pysupport

     “Inherits” makefile class
     Figures out all the Python policy details :-)
     Documentation needs updates :-(




                      Peter Eisentraut   CDBS
KDE Class




  include /usr/share/cdbs/1/class/kde.mk

  (for KDE <= 3.5)
      “Inherits” autotools class
      Sets proper configure flags, additional installation paths
      Documentation installation
      Used for all major KDE packages
  KDE 4 class will be based on CMake.




                       Peter Eisentraut   CDBS
Ant Class



  include /usr/share/cdbs/1/class/ant.mk

  JAVA_HOME = /usr/lib/kaffe
  DEB_JARS = junit
  DEB_ANT_BUILD_TARGET = jars
  DEB_ANT_COMPILER = jikes

  install/libjline-java:: DEB_FINALDIR=$(CURDIR)/debian/libjline-java
  install/libjline-java::
          install -m 644 -D release/jline-0_9_5.jar 
              $(DEB_FINALDIR)/usr/share/java/jline-$(DEB_UPSTREAM_VERSION).jar
          dh_link /usr/share/java/jline-$(DEB_UPSTREAM_VERSION).jar 
              /usr/share/java/jline.jar




        Most Java library packags are built this way.
        Tuned to Java packaging policy (at some point in time).




                                Peter Eisentraut   CDBS
Other classes




     CMake
     GNOME
     Haskell
     QMake
     OCaml (external)
     PEAR (external)




                       Peter Eisentraut   CDBS
Debhelper Rules



  include /usr/share/cdbs/1/rules/debhelper.mk

     Usually put this first in every debian/rules
     Takes care of proper sequencing and sequence points
     Arguments for every command can be overridden on a
     per-package basis, e.g.,
     DEB_INSTALL_EXAMPLES_libjline-java-doc = 
        release/jline-demo.jar
     Easy and automatic debug package support




                    Peter Eisentraut   CDBS
Patch Systems Support




  include /usr/share/cdbs/1/rules/. . .
   dpatch.mk DPatch rules
  patchsys-quilt.mk Quilt rules (contained in quilt package)
  simple-patchsys.mk Home-grown “simple” patch system
              (TANSTAA“S”PS)




                      Peter Eisentraut   CDBS
What CDBS Is Not




     No support for un-Common build systems
     Not a dumping ground for rejected debhelper features.
     Not a workaround for missing dpkg functionality.
     Not a way to enforce packaging behavior (but to enable or
     encourage it).
     Individual teams sometimes create a local subclass to
     enforce local policy.




                     Peter Eisentraut   CDBS
Comparisons and Contrasts



  vs. Debhelper only Debhelper is only the steps, CDBS puts
              them together.
  vs. dh (Debhelper 7) Does not allow for customization, only
              suitable for dead-simple packages.
  vs. BSD ports Very similar setup. Difference: Variables at the
              top, include bsd.port.mk at the bottom.
  vs. Automake Same declarative approach; details about actual
             make rules are hidden.




                       Peter Eisentraut   CDBS
Problems




    Patching the clean rule of a makefile (or equivalent) is
    broken
    Feature creep/unbounded user requests
    Certain old features/behaviors are not documented or
    understood
    CDBS maintainer must know all subpolicies in Debian ;-)




                     Peter Eisentraut   CDBS
Plans: CDBS 2



     Original idea: replace
     /usr/share/cdbs/1/rules/foo.mk by
     /usr/share/cdbs/2/rules/foo.mk
     Upcoming idea: similar to Debhelper compat levels, e.g.,
     CDBS_COMPAT = 2
     Throw out some obsolete features
     Synchronize default values with Debhelper 7
     Maybe move the include to the bottom
     Need a better/useful version numbering system




                     Peter Eisentraut   CDBS
How to Help




     Bugs, patches, ideas welcome.
     Join bug discussions.
     Enhance the test suite.
     Drive the right features into debhelper and dpkg.




                     Peter Eisentraut   CDBS
Summary




    Include CDBS rules rather than writing debian/rules by
    hand.
    Takes care of details and policy requirements
    automatically.
    Particularly useful for packages with uniform build
    processes.
    Not suitable for all packages and packagers.




                     Peter Eisentraut   CDBS

Mais conteúdo relacionado

Mais procurados

Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special EditionIntroduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special EditionJérôme Petazzoni
 
Docker: automation for the rest of us
Docker: automation for the rest of usDocker: automation for the rest of us
Docker: automation for the rest of usJérôme Petazzoni
 
The Docker ecosystem and the future of application deployment
The Docker ecosystem and the future of application deploymentThe Docker ecosystem and the future of application deployment
The Docker ecosystem and the future of application deploymentJérôme Petazzoni
 
In Search of the Perfect Global Interpreter Lock
In Search of the Perfect Global Interpreter LockIn Search of the Perfect Global Interpreter Lock
In Search of the Perfect Global Interpreter LockDavid Beazley (Dabeaz LLC)
 
FreeBSD: The Next 10 Years (MeetBSD 2014)
FreeBSD: The Next 10 Years (MeetBSD 2014)FreeBSD: The Next 10 Years (MeetBSD 2014)
FreeBSD: The Next 10 Years (MeetBSD 2014)iXsystems
 
Why you should use the Yocto Project
Why you should use the Yocto ProjectWhy you should use the Yocto Project
Why you should use the Yocto Projectrossburton
 
Deploy microservices in containers with Docker and friends - KCDC2015
Deploy microservices in containers with Docker and friends - KCDC2015Deploy microservices in containers with Docker and friends - KCDC2015
Deploy microservices in containers with Docker and friends - KCDC2015Jérôme Petazzoni
 
Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...
Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...
Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...Jérôme Petazzoni
 
Introduction to Docker, December 2014 "Tour de France" Edition
Introduction to Docker, December 2014 "Tour de France" EditionIntroduction to Docker, December 2014 "Tour de France" Edition
Introduction to Docker, December 2014 "Tour de France" EditionJérôme Petazzoni
 
How to build Debian packages
How to build Debian packages How to build Debian packages
How to build Debian packages Priyank Kapadia
 
Containers, docker, and security: state of the union (Bay Area Infracoders Me...
Containers, docker, and security: state of the union (Bay Area Infracoders Me...Containers, docker, and security: state of the union (Bay Area Infracoders Me...
Containers, docker, and security: state of the union (Bay Area Infracoders Me...Jérôme Petazzoni
 
Introduction to FreeBSD 7.0
Introduction to FreeBSD 7.0Introduction to FreeBSD 7.0
Introduction to FreeBSD 7.0sim303
 
Lavigne aug11 bsdmag
Lavigne aug11 bsdmagLavigne aug11 bsdmag
Lavigne aug11 bsdmagDru Lavigne
 
Generator Tricks for Systems Programmers, v2.0
Generator Tricks for Systems Programmers, v2.0Generator Tricks for Systems Programmers, v2.0
Generator Tricks for Systems Programmers, v2.0David Beazley (Dabeaz LLC)
 

Mais procurados (20)

Mastering Python 3 I/O
Mastering Python 3 I/OMastering Python 3 I/O
Mastering Python 3 I/O
 
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special EditionIntroduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
Introduction to Docker, December 2014 "Tour de France" Bordeaux Special Edition
 
Docker: automation for the rest of us
Docker: automation for the rest of usDocker: automation for the rest of us
Docker: automation for the rest of us
 
The Docker ecosystem and the future of application deployment
The Docker ecosystem and the future of application deploymentThe Docker ecosystem and the future of application deployment
The Docker ecosystem and the future of application deployment
 
In Search of the Perfect Global Interpreter Lock
In Search of the Perfect Global Interpreter LockIn Search of the Perfect Global Interpreter Lock
In Search of the Perfect Global Interpreter Lock
 
An Introduction to Python Concurrency
An Introduction to Python ConcurrencyAn Introduction to Python Concurrency
An Introduction to Python Concurrency
 
FreeBSD: The Next 10 Years (MeetBSD 2014)
FreeBSD: The Next 10 Years (MeetBSD 2014)FreeBSD: The Next 10 Years (MeetBSD 2014)
FreeBSD: The Next 10 Years (MeetBSD 2014)
 
Mastering Python 3 I/O (Version 2)
Mastering Python 3 I/O (Version 2)Mastering Python 3 I/O (Version 2)
Mastering Python 3 I/O (Version 2)
 
Why you should use the Yocto Project
Why you should use the Yocto ProjectWhy you should use the Yocto Project
Why you should use the Yocto Project
 
Python Generator Hacking
Python Generator HackingPython Generator Hacking
Python Generator Hacking
 
Deploy microservices in containers with Docker and friends - KCDC2015
Deploy microservices in containers with Docker and friends - KCDC2015Deploy microservices in containers with Docker and friends - KCDC2015
Deploy microservices in containers with Docker and friends - KCDC2015
 
Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...
Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...
Containers, Docker, and Security: State Of The Union (LinuxCon and ContainerC...
 
Introduction to Docker, December 2014 "Tour de France" Edition
Introduction to Docker, December 2014 "Tour de France" EditionIntroduction to Docker, December 2014 "Tour de France" Edition
Introduction to Docker, December 2014 "Tour de France" Edition
 
How to build Debian packages
How to build Debian packages How to build Debian packages
How to build Debian packages
 
Containers, docker, and security: state of the union (Bay Area Infracoders Me...
Containers, docker, and security: state of the union (Bay Area Infracoders Me...Containers, docker, and security: state of the union (Bay Area Infracoders Me...
Containers, docker, and security: state of the union (Bay Area Infracoders Me...
 
Python in Action (Part 1)
Python in Action (Part 1)Python in Action (Part 1)
Python in Action (Part 1)
 
Introduction to FreeBSD 7.0
Introduction to FreeBSD 7.0Introduction to FreeBSD 7.0
Introduction to FreeBSD 7.0
 
Lavigne aug11 bsdmag
Lavigne aug11 bsdmagLavigne aug11 bsdmag
Lavigne aug11 bsdmag
 
Docker_AGH_v0.1.3
Docker_AGH_v0.1.3Docker_AGH_v0.1.3
Docker_AGH_v0.1.3
 
Generator Tricks for Systems Programmers, v2.0
Generator Tricks for Systems Programmers, v2.0Generator Tricks for Systems Programmers, v2.0
Generator Tricks for Systems Programmers, v2.0
 

Destaque

Around "Hello World" in 30 Days
Around "Hello World" in 30 DaysAround "Hello World" in 30 Days
Around "Hello World" in 30 DaysDavid Eisinger
 
Scala 3camp 2011
Scala   3camp 2011Scala   3camp 2011
Scala 3camp 2011Scalac
 
Scala and Lift presentation
Scala and Lift presentationScala and Lift presentation
Scala and Lift presentationScalac
 
A Tour Of Scala
A Tour Of ScalaA Tour Of Scala
A Tour Of Scalafanf42
 
Liftweb
LiftwebLiftweb
LiftwebScalac
 
Scala == Effective Java
Scala == Effective JavaScala == Effective Java
Scala == Effective JavaScalac
 
Testing practicies not only in scala
Testing practicies not only in scalaTesting practicies not only in scala
Testing practicies not only in scalaPaweł Panasewicz
 
MySQL Monitoring Shoot Out
MySQL Monitoring Shoot OutMySQL Monitoring Shoot Out
MySQL Monitoring Shoot OutKris Buytaert
 
Why Scala for Web 2.0?
Why Scala for Web 2.0?Why Scala for Web 2.0?
Why Scala for Web 2.0?Alex Payne
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Martin Odersky
 
A Brief Intro to Scala
A Brief Intro to ScalaA Brief Intro to Scala
A Brief Intro to ScalaTim Underwood
 
Real time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache SparkReal time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache SparkRahul Jain
 
Scala, Akka, and Play: An Introduction on Heroku
Scala, Akka, and Play: An Introduction on HerokuScala, Akka, and Play: An Introduction on Heroku
Scala, Akka, and Play: An Introduction on HerokuHavoc Pennington
 

Destaque (19)

Around "Hello World" in 30 Days
Around "Hello World" in 30 DaysAround "Hello World" in 30 Days
Around "Hello World" in 30 Days
 
Scala 3camp 2011
Scala   3camp 2011Scala   3camp 2011
Scala 3camp 2011
 
Java to scala
Java to scalaJava to scala
Java to scala
 
Scala and Lift presentation
Scala and Lift presentationScala and Lift presentation
Scala and Lift presentation
 
A Tour Of Scala
A Tour Of ScalaA Tour Of Scala
A Tour Of Scala
 
Liftweb
LiftwebLiftweb
Liftweb
 
Scala Sjug 09
Scala Sjug 09Scala Sjug 09
Scala Sjug 09
 
Scala == Effective Java
Scala == Effective JavaScala == Effective Java
Scala == Effective Java
 
Testing practicies not only in scala
Testing practicies not only in scalaTesting practicies not only in scala
Testing practicies not only in scala
 
Scala-Ls1
Scala-Ls1Scala-Ls1
Scala-Ls1
 
MySQL Monitoring Shoot Out
MySQL Monitoring Shoot OutMySQL Monitoring Shoot Out
MySQL Monitoring Shoot Out
 
Why Scala for Web 2.0?
Why Scala for Web 2.0?Why Scala for Web 2.0?
Why Scala for Web 2.0?
 
MySQL DBA
MySQL DBAMySQL DBA
MySQL DBA
 
Scala
ScalaScala
Scala
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009
 
A Brief Intro to Scala
A Brief Intro to ScalaA Brief Intro to Scala
A Brief Intro to Scala
 
Scala Days NYC 2016
Scala Days NYC 2016Scala Days NYC 2016
Scala Days NYC 2016
 
Real time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache SparkReal time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache Spark
 
Scala, Akka, and Play: An Introduction on Heroku
Scala, Akka, and Play: An Introduction on HerokuScala, Akka, and Play: An Introduction on Heroku
Scala, Akka, and Play: An Introduction on Heroku
 

Semelhante a The Common Debian Build System (CDBS)

Debian Packaging tutorial
Debian Packaging tutorialDebian Packaging tutorial
Debian Packaging tutorialnussbauml
 
How to make debian package from scratch (linux)
How to make debian package from scratch (linux)How to make debian package from scratch (linux)
How to make debian package from scratch (linux)Thierry Gayet
 
How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.İbrahim UÇAR
 
Debian packaging howto
Debian packaging howtoDebian packaging howto
Debian packaging howtoDing Zhou
 
Building Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 ArchBuilding Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 ArchSherif Mousa
 
DPKG caching framework-latest .pptx
DPKG caching framework-latest .pptxDPKG caching framework-latest .pptx
DPKG caching framework-latest .pptxKalimuthuVelappan
 
Kernel maintainance in Linux distributions: Debian
Kernel maintainance in Linux distributions: DebianKernel maintainance in Linux distributions: Debian
Kernel maintainance in Linux distributions: DebianAnne Nicolas
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionJian-Hong Pan
 
Kernel Recipes 2015 - Hardened kernels for everyone
Kernel Recipes 2015 - Hardened kernels for everyoneKernel Recipes 2015 - Hardened kernels for everyone
Kernel Recipes 2015 - Hardened kernels for everyoneAnne Nicolas
 
Managing Perl Installations: A SysAdmin's View
Managing Perl Installations: A SysAdmin's ViewManaging Perl Installations: A SysAdmin's View
Managing Perl Installations: A SysAdmin's ViewBaden Hughes
 
Systemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveSystemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveAlison Chaiken
 
Sls01 Lecture02 Linux In Practice
Sls01 Lecture02 Linux In PracticeSls01 Lecture02 Linux In Practice
Sls01 Lecture02 Linux In PracticeQasim Khawaja
 
Linux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of TechnologyLinux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of TechnologyNugroho Gito
 

Semelhante a The Common Debian Build System (CDBS) (20)

Debian Packaging tutorial
Debian Packaging tutorialDebian Packaging tutorial
Debian Packaging tutorial
 
How to make debian package from scratch (linux)
How to make debian package from scratch (linux)How to make debian package from scratch (linux)
How to make debian package from scratch (linux)
 
How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.How to Build Package in Linux Based Systems.
How to Build Package in Linux Based Systems.
 
Debian packaging howto
Debian packaging howtoDebian packaging howto
Debian packaging howto
 
Debian packaging
Debian packagingDebian packaging
Debian packaging
 
Debian Packaging
Debian PackagingDebian Packaging
Debian Packaging
 
OpenEmbedded
OpenEmbeddedOpenEmbedded
OpenEmbedded
 
Building Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 ArchBuilding Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 Arch
 
DPKG caching framework-latest .pptx
DPKG caching framework-latest .pptxDPKG caching framework-latest .pptx
DPKG caching framework-latest .pptx
 
Kernel maintainance in Linux distributions: Debian
Kernel maintainance in Linux distributions: DebianKernel maintainance in Linux distributions: Debian
Kernel maintainance in Linux distributions: Debian
 
packaging
packagingpackaging
packaging
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS Distribution
 
Kernel Recipes 2015 - Hardened kernels for everyone
Kernel Recipes 2015 - Hardened kernels for everyoneKernel Recipes 2015 - Hardened kernels for everyone
Kernel Recipes 2015 - Hardened kernels for everyone
 
Managing Perl Installations: A SysAdmin's View
Managing Perl Installations: A SysAdmin's ViewManaging Perl Installations: A SysAdmin's View
Managing Perl Installations: A SysAdmin's View
 
Linuxconcepts
LinuxconceptsLinuxconcepts
Linuxconcepts
 
Systemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveSystemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to love
 
Sahul
SahulSahul
Sahul
 
Sahul
SahulSahul
Sahul
 
Sls01 Lecture02 Linux In Practice
Sls01 Lecture02 Linux In PracticeSls01 Lecture02 Linux In Practice
Sls01 Lecture02 Linux In Practice
 
Linux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of TechnologyLinux Survival Kit for Proof of Concept & Proof of Technology
Linux Survival Kit for Proof of Concept & Proof of Technology
 

Mais de Peter Eisentraut

Programming with Python and PostgreSQL
Programming with Python and PostgreSQLProgramming with Python and PostgreSQL
Programming with Python and PostgreSQLPeter Eisentraut
 
Getting Started with PL/Proxy
Getting Started with PL/ProxyGetting Started with PL/Proxy
Getting Started with PL/ProxyPeter Eisentraut
 
Most Wanted: Future PostgreSQL Features
Most Wanted: Future PostgreSQL FeaturesMost Wanted: Future PostgreSQL Features
Most Wanted: Future PostgreSQL FeaturesPeter Eisentraut
 
Porting Applications From Oracle To PostgreSQL
Porting Applications From Oracle To PostgreSQLPorting Applications From Oracle To PostgreSQL
Porting Applications From Oracle To PostgreSQLPeter Eisentraut
 
Porting Oracle Applications to PostgreSQL
Porting Oracle Applications to PostgreSQLPorting Oracle Applications to PostgreSQL
Porting Oracle Applications to PostgreSQLPeter Eisentraut
 
XML Support: Specifications and Development
XML Support: Specifications and DevelopmentXML Support: Specifications and Development
XML Support: Specifications and DevelopmentPeter Eisentraut
 
PostgreSQL: Die Freie Datenbankalternative
PostgreSQL: Die Freie DatenbankalternativePostgreSQL: Die Freie Datenbankalternative
PostgreSQL: Die Freie DatenbankalternativePeter Eisentraut
 
The Road to the XML Type: Current and Future Developments
The Road to the XML Type: Current and Future DevelopmentsThe Road to the XML Type: Current and Future Developments
The Road to the XML Type: Current and Future DevelopmentsPeter Eisentraut
 
Access ohne Access: Freie Datenbank-Frontends
Access ohne Access: Freie Datenbank-FrontendsAccess ohne Access: Freie Datenbank-Frontends
Access ohne Access: Freie Datenbank-FrontendsPeter Eisentraut
 
Replication Solutions for PostgreSQL
Replication Solutions for PostgreSQLReplication Solutions for PostgreSQL
Replication Solutions for PostgreSQLPeter Eisentraut
 
Access ohne Access: Freie Datenbank-Frontends
Access ohne Access: Freie Datenbank-FrontendsAccess ohne Access: Freie Datenbank-Frontends
Access ohne Access: Freie Datenbank-FrontendsPeter Eisentraut
 
Docbook: Textverarbeitung mit XML
Docbook: Textverarbeitung mit XMLDocbook: Textverarbeitung mit XML
Docbook: Textverarbeitung mit XMLPeter Eisentraut
 
Collateral Damage: Consequences of Spam and Virus Filtering for the E-Mail Sy...
Collateral Damage: Consequences of Spam and Virus Filtering for the E-Mail Sy...Collateral Damage: Consequences of Spam and Virus Filtering for the E-Mail Sy...
Collateral Damage: Consequences of Spam and Virus Filtering for the E-Mail Sy...Peter Eisentraut
 
Collateral Damage: Consequences of Spam and Virus Filtering for the E-Mail S...
Collateral Damage:
Consequences of Spam and Virus Filtering for the E-Mail S...Collateral Damage:
Consequences of Spam and Virus Filtering for the E-Mail S...
Collateral Damage: Consequences of Spam and Virus Filtering for the E-Mail S...Peter Eisentraut
 

Mais de Peter Eisentraut (20)

Programming with Python and PostgreSQL
Programming with Python and PostgreSQLProgramming with Python and PostgreSQL
Programming with Python and PostgreSQL
 
Getting Started with PL/Proxy
Getting Started with PL/ProxyGetting Started with PL/Proxy
Getting Started with PL/Proxy
 
Most Wanted: Future PostgreSQL Features
Most Wanted: Future PostgreSQL FeaturesMost Wanted: Future PostgreSQL Features
Most Wanted: Future PostgreSQL Features
 
Porting Applications From Oracle To PostgreSQL
Porting Applications From Oracle To PostgreSQLPorting Applications From Oracle To PostgreSQL
Porting Applications From Oracle To PostgreSQL
 
Porting Oracle Applications to PostgreSQL
Porting Oracle Applications to PostgreSQLPorting Oracle Applications to PostgreSQL
Porting Oracle Applications to PostgreSQL
 
PostgreSQL and XML
PostgreSQL and XMLPostgreSQL and XML
PostgreSQL and XML
 
XML Support: Specifications and Development
XML Support: Specifications and DevelopmentXML Support: Specifications and Development
XML Support: Specifications and Development
 
PostgreSQL: Die Freie Datenbankalternative
PostgreSQL: Die Freie DatenbankalternativePostgreSQL: Die Freie Datenbankalternative
PostgreSQL: Die Freie Datenbankalternative
 
The Road to the XML Type: Current and Future Developments
The Road to the XML Type: Current and Future DevelopmentsThe Road to the XML Type: Current and Future Developments
The Road to the XML Type: Current and Future Developments
 
Access ohne Access: Freie Datenbank-Frontends
Access ohne Access: Freie Datenbank-FrontendsAccess ohne Access: Freie Datenbank-Frontends
Access ohne Access: Freie Datenbank-Frontends
 
PostgreSQL and PL/Java
PostgreSQL and PL/JavaPostgreSQL and PL/Java
PostgreSQL and PL/Java
 
Replication Solutions for PostgreSQL
Replication Solutions for PostgreSQLReplication Solutions for PostgreSQL
Replication Solutions for PostgreSQL
 
PostgreSQL News
PostgreSQL NewsPostgreSQL News
PostgreSQL News
 
PostgreSQL News
PostgreSQL NewsPostgreSQL News
PostgreSQL News
 
Access ohne Access: Freie Datenbank-Frontends
Access ohne Access: Freie Datenbank-FrontendsAccess ohne Access: Freie Datenbank-Frontends
Access ohne Access: Freie Datenbank-Frontends
 
Docbook: Textverarbeitung mit XML
Docbook: Textverarbeitung mit XMLDocbook: Textverarbeitung mit XML
Docbook: Textverarbeitung mit XML
 
Collateral Damage: Consequences of Spam and Virus Filtering for the E-Mail Sy...
Collateral Damage: Consequences of Spam and Virus Filtering for the E-Mail Sy...Collateral Damage: Consequences of Spam and Virus Filtering for the E-Mail Sy...
Collateral Damage: Consequences of Spam and Virus Filtering for the E-Mail Sy...
 
Collateral Damage: Consequences of Spam and Virus Filtering for the E-Mail S...
Collateral Damage:
Consequences of Spam and Virus Filtering for the E-Mail S...Collateral Damage:
Consequences of Spam and Virus Filtering for the E-Mail S...
Collateral Damage: Consequences of Spam and Virus Filtering for the E-Mail S...
 
Spaß mit PostgreSQL
Spaß mit PostgreSQLSpaß mit PostgreSQL
Spaß mit PostgreSQL
 
SQL/MED and PostgreSQL
SQL/MED and PostgreSQLSQL/MED and PostgreSQL
SQL/MED and PostgreSQL
 

Último

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Último (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

The Common Debian Build System (CDBS)

  • 1. The Common Debian Build System (CDBS) Peter Eisentraut FOSDEM 2009 Peter Eisentraut CDBS
  • 2. What is CDBS? A set of makefile fragments to include into debian/rules Makes packaging complex packages easier. Makes packaging simple packages harder. Initiates you to a secret subculture of Debian packagers. Causes you to lose all your not-CDBS-using friends. Peter Eisentraut CDBS
  • 3. Simple Example #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk DEB_CONFIGURE_EXTRA_FLAGS = --enable-funnybiz DEB_INSTALL_DOCS_ALL = readme.txt LDFLAGS += -Wl,--as-needed binary-install/mypackage-tools:: chmod a+x debian/mypackage-tools/ usr/lib/mypackage/* Peter Eisentraut CDBS
  • 4. Simple Example #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk DEB_CONFIGURE_EXTRA_FLAGS = --enable-funnybiz DEB_INSTALL_DOCS_ALL = readme.txt LDFLAGS += -Wl,--as-needed binary-install/mypackage-tools:: chmod a+x debian/mypackage-tools/ usr/lib/mypackage/* Peter Eisentraut CDBS
  • 5. Simple Example #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk DEB_CONFIGURE_EXTRA_FLAGS = --enable-funnybiz DEB_INSTALL_DOCS_ALL = readme.txt LDFLAGS += -Wl,--as-needed binary-install/mypackage-tools:: chmod a+x debian/mypackage-tools/ usr/lib/mypackage/* Peter Eisentraut CDBS
  • 6. Background First published in 2003 by Colin Walters Co-maintained 2003-2005 by Colin Walters and Jeff Bailey Hijacked in 2006 by me after a period of no maintenance Currently 2 or 3 maintainers plus Ubuntu feedback Peter Eisentraut CDBS
  • 7. Package Parameters Source: cdbs Section: devel Priority: optional Maintainer: CDBS Hackers <build-common-hackers@lists.alioth.debian.org> Build-Depends-Indep: debhelper (>= 5), graphviz, realpath, fakeroot, python-dev, python2.4-dev, python2.5-dev, libxml2-utils, xsltproc, docbook-xml, docbook-xsl, dblatex, ant, kaffe, sharutils, gs-common, texlive-extra-utils Uploaders: Jonas Smedegaard <dr@jones.dk>, Marc Dequènes (Duck) <Duck@DuckCorp.org>, Peter Eisentraut <petere@debian.org> Standards-Version: 3.7.3 Vcs-Browser: http://svn.debian.org/wsvn/build-common/ Vcs-Svn: svn://svn.debian.org/build-common/ Bugs: 1 I, 31 N, 7 M, 33 W Last upload: 01 Apr 2008 Peter Eisentraut CDBS
  • 8. Statistics Currently 13077 source packages in unstable 3185 use CDBS (24.4%) Appears to be increasing by 0.2% or so per month Archive takeover completed by 2020 :-) Peter Eisentraut CDBS
  • 9. Architecture Yes, there is one: Classes contain the logic for the package’s upstream build system: make, autotools, MakeMaker, distutils, cmake, etc. Rules contain additional rules of various utility: debhelper, tarball-in-tarball, patch tools Classes use inheritance (a.k.a. makefile inclusion): autotools inherits make, gnome inherits autotools, etc. In practice, this is arcane, so just remember: Exactly one class per debian/rules Zero or more rules per debian/rules Usually, you want at least the debhelper rules set Deviations are possible, but rarely useful Peter Eisentraut CDBS
  • 10. Advantages Technical advantages: Writing debian/rules becomes quick and easy (usually) You get the details right for free: dh_* sequencing configure --build/--host (see autotools-dev README) DEB_BUILD_OPTIONS: noopt, nostrip CFLAGS, CXXFLAGS, etc. (try passing them to cmake or qmake correctly) parallel make Java packaging policy You follow policy evolvement for free: Python policy patch, unpatch targets KDE 4 packaging practices Peter Eisentraut CDBS
  • 11. Advantages Conceptual advantages: debian/rules highlights the nonstandard packaging steps, rather than hiding them in boilerplate. Avoids propagation of mistakes through copy-and-paste or dh_make. Avoids home-brewed and half-baked alternative debian/rules makefile fragments packages. Peter Eisentraut CDBS
  • 12. Disadvantages If your package has an unusual build system, CDBS might be in your way. If you are a control-freak, CDBS will be in your way. If GNU make syntax confuses you, CDBS will confuse you. CDBS is not good for learning Debian packaging. Peter Eisentraut CDBS
  • 13. Makefile Class include /usr/share/cdbs/1/class/makefile.mk DEB_MAKE_BUILD_TARGET = all DEB_MAKE_INSTALL_TARGET = install DESTDIR=$(CURDIR)/ DEB_MAKE_CLEAN_TARGET = clean Sets CFLAGS etc. according to policy Observes DEB_BUILD_OPTIONS Peter Eisentraut CDBS
  • 14. Autotools Class include /usr/share/cdbs/1/class/autotools.mk DEB_CONFIGURE_EXTRA_FLAGS = --enable-funnybiz “Inherits” makefile class Calls configure with proper options (host tuple, installation paths) Calls make distclean instead of make clean Handles config.guess, config.sub updates Supports autoreconf, libtoolize before build (dubious) Peter Eisentraut CDBS
  • 15. Perl Class include /usr/share/cdbs/1/class/perlmodule.mk DEB_MAKEMAKER_USER_FLAGS = --with-foo “Inherits” makefile class Calls MakeMaker with proper options and paths Peter Eisentraut CDBS
  • 16. Python Class include /usr/share/cdbs/1/class/python-distutils.mk # mandatory DEB_PYTHON_SYSTEM = pycentral | pysupport “Inherits” makefile class Figures out all the Python policy details :-) Documentation needs updates :-( Peter Eisentraut CDBS
  • 17. KDE Class include /usr/share/cdbs/1/class/kde.mk (for KDE <= 3.5) “Inherits” autotools class Sets proper configure flags, additional installation paths Documentation installation Used for all major KDE packages KDE 4 class will be based on CMake. Peter Eisentraut CDBS
  • 18. Ant Class include /usr/share/cdbs/1/class/ant.mk JAVA_HOME = /usr/lib/kaffe DEB_JARS = junit DEB_ANT_BUILD_TARGET = jars DEB_ANT_COMPILER = jikes install/libjline-java:: DEB_FINALDIR=$(CURDIR)/debian/libjline-java install/libjline-java:: install -m 644 -D release/jline-0_9_5.jar $(DEB_FINALDIR)/usr/share/java/jline-$(DEB_UPSTREAM_VERSION).jar dh_link /usr/share/java/jline-$(DEB_UPSTREAM_VERSION).jar /usr/share/java/jline.jar Most Java library packags are built this way. Tuned to Java packaging policy (at some point in time). Peter Eisentraut CDBS
  • 19. Other classes CMake GNOME Haskell QMake OCaml (external) PEAR (external) Peter Eisentraut CDBS
  • 20. Debhelper Rules include /usr/share/cdbs/1/rules/debhelper.mk Usually put this first in every debian/rules Takes care of proper sequencing and sequence points Arguments for every command can be overridden on a per-package basis, e.g., DEB_INSTALL_EXAMPLES_libjline-java-doc = release/jline-demo.jar Easy and automatic debug package support Peter Eisentraut CDBS
  • 21. Patch Systems Support include /usr/share/cdbs/1/rules/. . . dpatch.mk DPatch rules patchsys-quilt.mk Quilt rules (contained in quilt package) simple-patchsys.mk Home-grown “simple” patch system (TANSTAA“S”PS) Peter Eisentraut CDBS
  • 22. What CDBS Is Not No support for un-Common build systems Not a dumping ground for rejected debhelper features. Not a workaround for missing dpkg functionality. Not a way to enforce packaging behavior (but to enable or encourage it). Individual teams sometimes create a local subclass to enforce local policy. Peter Eisentraut CDBS
  • 23. Comparisons and Contrasts vs. Debhelper only Debhelper is only the steps, CDBS puts them together. vs. dh (Debhelper 7) Does not allow for customization, only suitable for dead-simple packages. vs. BSD ports Very similar setup. Difference: Variables at the top, include bsd.port.mk at the bottom. vs. Automake Same declarative approach; details about actual make rules are hidden. Peter Eisentraut CDBS
  • 24. Problems Patching the clean rule of a makefile (or equivalent) is broken Feature creep/unbounded user requests Certain old features/behaviors are not documented or understood CDBS maintainer must know all subpolicies in Debian ;-) Peter Eisentraut CDBS
  • 25. Plans: CDBS 2 Original idea: replace /usr/share/cdbs/1/rules/foo.mk by /usr/share/cdbs/2/rules/foo.mk Upcoming idea: similar to Debhelper compat levels, e.g., CDBS_COMPAT = 2 Throw out some obsolete features Synchronize default values with Debhelper 7 Maybe move the include to the bottom Need a better/useful version numbering system Peter Eisentraut CDBS
  • 26. How to Help Bugs, patches, ideas welcome. Join bug discussions. Enhance the test suite. Drive the right features into debhelper and dpkg. Peter Eisentraut CDBS
  • 27. Summary Include CDBS rules rather than writing debian/rules by hand. Takes care of details and policy requirements automatically. Particularly useful for packages with uniform build processes. Not suitable for all packages and packagers. Peter Eisentraut CDBS