Chapter C. Source packages (from old Packaging Manual)
118
1 Untar the tarfile, which will create a
.orig
directory.
2 Rename the
.orig
directory to
package
version
.
3 Create the subdirectory
debian
at the top of the source tree.
4 Apply the diff using
patch p0
.
5 Untar the tarfile again if you want a copy of the original source code alongside the De
bianised version.
It is not possible to generate a valid Debian source archive without using
dpkg source
. In
particular, attempting to use
diff
directly to generate the
.diff.gz
file will not work.
C.4.1 Restrictions on objects in source packages
The source package may not contain any hard links
5 6
, device special files, sockets or setuid
or setgid files.
7
The source packaging tools manage the changes between the original and Debianised source
using
diff
and
patch
. Turning the original source tree as included in the
.orig.tar.gz
into the debianised source must not involve any changes which cannot be handled by these
tools. Problematic changes which cause
dpkg source
to halt with an error when building
the source package are:
Adding or removing symbolic links, sockets or pipes.
Changing the targets of symbolic links.
Creating directories, other than
debian
.
Changes to the contents of binary files.
Changes which cause
dpkg source
to print a warning but continue anyway are:
Removing files, directories or symlinks.
8
Changed text files which are missing the usual final newline (either in the original or the
modified source tree).
Changes which are not represented, but which are not detected by
dpkg source
, are:
Changing the permissions of files (other than
debian/rules
) and directories.
The
debian
directory and
debian/rules
are handled specially by
dpkg source
before
applying the changes it will create the
debian
directory, and afterwards it will make
debian
/rules
world executable.
5
This is not currently detected when building source packages, but only when extracting them.
6
Hard links may be permitted at some point in the future, but would require a fair amount of work.
7
Setgid directories are allowed.
8
Renaming a file is not treated specially it is seen as the removal of the old file (which generates a warning,
but is otherwise ignored), and the creation of the new one.
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved