dpkg and debhelper patches for lib64 support
Hi,
I have made some changes to dpkg and debhelper in order to support
/lib64 and /usr/lib64 locations on 64 bit platforms. You find the patches at
people.debian.org/~gt/lib64 along with patches for a bunch of other packages
using the dpkg and debhelper extensions. Some of the patches have been used
already by Arnd Bergmann for the x86-64 port. Any feedback is welcome.
Assumptions:
------------
Runtime packages for a 64 bit platform that install to lib64 are
installable concurrently with their counterparts on the respective 32
bit platform, e.g. amd64 and i386 or s390x and s390. This is achieved by
naming the 64 bit package differently from the 32 bit package, e.g.
lib64ncurses5 and libncurses5.
Development packages for 32 and 64 bit platforms are not installable
concurrently.
dpkg changes:
-------------
I have introduced a script dpkg-libinfo that provides lib64 relevant
information. Its interface is similar to dpkg-architecture.
A new keyword Package64 is supported in debian/control. It describes the
package name of a given package on a 64 bit platform.
A new keyword Substvarname is supported in debian/control. It describes the
name of a substitution variable used elsewhere in the control file, e.g. to
specify dependencies. Its value is the package name. If the keyword is
missing the variable name is derived from the package name.
A package that doesn't use debhelper supports lib64 by adding the Package64
keyword to debian/control and adding the configure option
--libdir=\$${exec_prefix}/$(libname) to debian/rules. The $(libname) and
$(libdir) values are provided by the dpkg-libinfo tool. Any occurence of lib
and /usr/lib in debian/rules has to be changed to $(libname) and $(libdir),
respectively.
ToDo:
dpkg changes to support installation of packages of more than one
architecture concurrently.
In order to find the 32 bit package name of a given 64 bit package
name and vice versa, I have introduced the notion dualpackage. This
means that for example the dualpackage of libncurses5 is lib64ncurses5
and the dualpackage of lib64ncurses5 is libncurses5.
debhelper changes:
------------------
debhelper scripts have been extended to understand the dualpackage
notion. This is necessary to find the corresponding *.files, *.links,
*.dirs and *.install files for the 64 bit package names.
The debhelper scripts understand now the variables ${libname} and ${libdir}
in *.files, *.links, *.dirs and *.install files.
A package that uses debhelper supports lib64 by adding the Package64
keyword to debian/control and adding the configure option
--libdir=\$${exec_prefix}/$(libname) to debian/rules. The $(libname) and
$(libdir) values are provided by the dpkg-libinfo tool. Any occurence of lib
and /usr/lib in debian/rules has to be changed to $(libname) and $(libdir),
respectively. Any occurence of lib and usr/lib in *.files, *.links, *.dirs
and *.install files has to be changed to $(libname) and ./$(libdir),
respectively.
ToDo:
pre/post inst/rm
Regards,
Gerhard
Reply to: