Table of Contents
Debian vs Ubuntu discussion
dch
(debchange) reference
.deb
files reference
- an ar archive, contains:
debian-binary
- version of the deb file format,
"2.0\n"
control.tar.gz
- metadata about the package
data.tar.gz
- data files of the package
dpkg
reference
-i
, --install
<package-file...>
- Extract the control files of the new package.
- If another version of the same package was installed before the new installation, execute
prerm
script of the old package.
- Run
preinst
script, if provided by the package.
- Unpack the new files, and at the same time back up the old files, so that if something goes wrong, they can be restored.
- If another version of the same package was installed before the new installation, execute the
postrm
script of the old package. Note that this script is executed after the preinst
script of the new package, because new files are written at the same time old files are removed.
- Configure the package. See
--configure
for detailed information about how this is done.
<package>.postinst
reference
Create a debian pacakge howto
Source package
- One source package can generate several binary packages
- Two kinds of packages
- Native Packages
- normally for Debian specific software (
dpkg
, apt
)
- Non-native packages
- software developed outside Debian (Mostly this is relevant)
- Main file:
.dsc
(meta-data)
- Other files depending on the version of the source format(Here shows only
3.0 (quilt)
pkg_ver.orig.tar.gz
- Upstream source
pkg_debver.debian.tar.gz
- tarball with the Debian changes
Files in debian/
- Main files
control
- meta-data about the package (dependencies, etc.)
rules
- specifies how to build the package
copyright
- copyright information for the package
changelog
- history of the Debian package
debian/changelog
- Lists the Debian pacakging changes
- Gives the current version of the package
- Edited manually or with
dch
, for new release: dch -i
mpich2 (1.2.1.1-5) unstable; urgency = low
* Descriptions
-- Lucas Nussbaum <lucas@debian.org> Wed, 15 Sep 2010 18:13:44 +0200
debian/control
- Package metadata like
- Package name, section, priority, maintainer, uploaders, build-dependencies, dependencies, description, homepage
Source : wget
Section : web
Priority : important
Maintainer : Noel Kothe < noel@debian.org >
Build - Depends : debhelper (>> 5.0.0) , gettext , texinfo ,
libssl - dev ( >= 0.9.8) , dpatch , info2man
Standards - Version : 3.8.4
Homepage : http://www.gnu.org/software/wget/
Package : wget
Architecture : any
Depends : ${ shlibs : Depends }, ${ misc : Depends }
Description : retrieves files from the web
Wget is a network utility to retrieve files from the Web
debin/rules
debian/compat
debhelper
- Factor the common tasks in standard tools used by all packages
- Fix some packaging bugs once for all packages
- Called from
debian/rules
dh
- Simple
debian/rules
, listing only overrides
#!/ usr / bin / make -f
%:
dh $@
override_dh_auto_configure :
dh_auto_configure -- -- with - kitchen - sink
override_dh_auto_build :
make world
Patch systems
- Recommended built-in patch system:
3.0 (quilt)
Doing things during installation and removal
- Create/remove system users, start/stop services, manage alternatives
- Done in maintainer scripts,
preinst
, postinst
, prerm
, postrm
Packaging with a VCS
Links