dpkg-dev: bad absolute symlinks with dpkg-buildpackage
Benoît Rouits
brouits at free.fr
Tue Dec 13 17:15:56 UTC 2005
Package: dpkg-dev
Version: 1.13.10ubuntu4
Severity: normal
This is NOT REALLY a bug, it is easy to workaround,
but i think dpkg-buildpackage should WARN:
Using absolute symlinks during installation yields
to a corrupted debian package, but the inner scripts of
dpkg-buildpackage don't detect the corruption.
I think it should detect it and blame the packager.
The following trivial example shows the procedure
to get such a corrupted debian package
$ editor Makefile
[...]
install:
install foo $DESTDIR/$(PREFIX)/bin
ln -s $DESTDIR/$(PREFIX)/bin/foo $DESTDIR/$(PREFIX)/bin/bar
# ^^^^^ this cause the corruption
#<EOF>
$ dh_make -s --copyright gpl
[...]
$ editor debian/control
[...]
$ editor debian/copyright
[...]
$ dpkg-buildpackage
[...]
dpkg-deb : building package « foo » in « ../foo_0.2-1_i386.deb ».
signfile foo_0.2-1.dsc
[...]
$ dpkg -i ../foo_0.2-1.i386.deb
Selecting previously deselected package foo.
(Reading database ... 159413 files and directories currently installed.)
Unpacking foo (from ../foo_0.2-1_i386.deb) ...
Setting up foo (0.2-1) ...
$ ls -l /usr/bin/bar
lrwxrwxrwx 1 root root 73 2005-12-13 17:37 /usr/bin/bar ->
/home/ben/src/foo-0.2/debian/foo/usr/bin/foo
# bad symlink ! funny ?
WORKAROUND:
$editor Makefile
[...]
install:
install foo $DESTDIR/$(PREFIX)/bin
cd $DESTDIR/$(PREFIX)/bin/ && ln -s foo bar
#<EOF>
-- System Information:
Debian Release: testing/unstable
APT prefers breezy-updates
APT policy: (500, 'breezy-updates'), (500, 'breezy-security'), (500, 'breezy')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-10-k7
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Versions of packages dpkg-dev depends on:
ii binutils 2.16.1-2ubuntu6 The GNU assembler, linker and bina
ii cpio 2.5-1.2ubuntu1 GNU cpio -- a program to manage ar
ii dpkg 1.13.10ubuntu4 Package maintenance system for Deb
ii make 3.80-9 The GNU version of the "make" util
ii patch 2.5.9-2 Apply a diff file to an original
ii perl [perl5] 5.8.7-5ubuntu1.2 Larry Wall's Practical Extraction
ii perl-modules 5.8.7-5ubuntu1.2 Core Perl modules
Versions of packages dpkg-dev recommends:
ii bzip2 1.0.2-7ubuntu2 high-quality block-sorting file co
ii gcc [c-compiler] 4:4.0.1-3 The GNU C compiler
ii gcc-3.3 [c-compiler] 1:3.3.6-8ubuntu1 The GNU C compiler
ii gcc-3.4 [c-compiler] 3.4.4-6ubuntu8 The GNU C compiler
ii gcc-4.0 [c-compiler] 4.0.1-4ubuntu9 The GNU C compiler
-- no debconf information
More information about the ubuntu-users
mailing list