- Update to new dpkg version

- Remove underscore from version strings, since dpkg does not support it
- Update packInstall.sh.template to show how to remove underscore
This commit is contained in:
Pierre Labastie 2014-12-13 11:10:32 +00:00
parent 57ef0c1425
commit b9c3497abb
3 changed files with 55 additions and 40 deletions

View file

@ -13,7 +13,9 @@ case $PCKGVRS in
vim*|unzip*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*\([0-9]\)\([0-9]\)/\1.\2/') ;; vim*|unzip*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*\([0-9]\)\([0-9]\)/\1.\2/') ;;
tidy*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*\([0-9]*\)/\1cvs/') ;; tidy*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*\([0-9]*\)/\1cvs/') ;;
docbook-xml) local VERSION=4.5 ;; docbook-xml) local VERSION=4.5 ;;
*) local VERSION=$(echo ${PCKGVRS} | sed 's/^.*-\([0-9]\)/\1/');; *) local VERSION=$(echo ${PCKGVRS} | sed 's/^.*-\([0-9]\)/\1/' |
sed 's/_/./g');;
# the last sed above is because dpkg does not want a '_' in version.
esac esac
local ARCHIVE_NAME=$(dirname ${PKGDIR})/${PACKAGE}_${VERSION}.deb local ARCHIVE_NAME=$(dirname ${PKGDIR})/${PACKAGE}_${VERSION}.deb
case $(uname -m) in case $(uname -m) in
@ -31,7 +33,7 @@ Maintainer: Pierre Labastie <lnimbus@club-internet.fr>
Description: $PACKAGE Description: $PACKAGE
Architecture: $ARCH Architecture: $ARCH
EOF EOF
dpkg-deb -b . $ARCHIVE_NAME dpkg-deb -z9 -b . $ARCHIVE_NAME
dpkg -i $ARCHIVE_NAME dpkg -i $ARCHIVE_NAME
mv -v $ARCHIVE_NAME /var/lib/packages mv -v $ARCHIVE_NAME /var/lib/packages
popd popd

View file

@ -17,7 +17,10 @@ case $PCKGVRS in
vim*|unzip*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*\([0-9]\)\([0-9]\)/\1.\2/') ;; vim*|unzip*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*\([0-9]\)\([0-9]\)/\1.\2/') ;;
tidy*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*\([0-9]*\)/\1cvs/') ;; tidy*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*\([0-9]*\)/\1cvs/') ;;
docbook-xml) local VERSION=4.5 ;; docbook-xml) local VERSION=4.5 ;;
*) local VERSION=$(echo ${PCKGVRS} | sed 's/^.*[-_]\([0-9]\)/\1/');; *) local VERSION=$(echo ${PCKGVRS} | sed 's/^.*[-_]\([0-9]\)/\1/' |
sed 's/_/./g');;
# the last sed above is because some package managers do not want a '_'
# in version.
esac esac
local ARCHIVE_NAME=$(dirname ${PKGDIR})/${PACKAGE}_${VERSION}.deb local ARCHIVE_NAME=$(dirname ${PKGDIR})/${PACKAGE}_${VERSION}.deb
case $(uname -m) in case $(uname -m) in

View file

@ -9,15 +9,15 @@
<!ENTITY before "Must be installed before"> <!ENTITY before "Must be installed before">
<!ENTITY external "Optional dependencies"> <!ENTITY external "Optional dependencies">
<!ENTITY debian-pool "http://ftp2.fr.debian.org/debian/pool/main/"> <!ENTITY debian-pool "http://ftp2.fr.debian.org/debian/pool/main/">
<!ENTITY dpkg-version "1.16.1.2"> <!ENTITY dpkg-version "1.17.22">
<!ENTITY dpkg-size "5,236 KB"> <!ENTITY dpkg-size "4,259 KB">
<!ENTITY dpkg-url "&debian-pool;d/dpkg/dpkg_&dpkg-version;.tar.bz2"> <!ENTITY dpkg-url "&debian-pool;d/dpkg/dpkg_&dpkg-version;.tar.xz">
<!ENTITY dpkg-md5 "068ae5e650e54968230de19d6c4e2241"> <!ENTITY dpkg-md5 "c9c46c5318c98c9162fbd03d24f2f95b">
<!ENTITY dpkg-home "http://wiki.debian.org/Teams/Dpkg"> <!ENTITY dpkg-home "http://wiki.debian.org/Teams/Dpkg">
<!ENTITY dpkg-ch5-du "5 MB"> <!ENTITY dpkg-ch5-du "54 MB">
<!ENTITY dpkg-ch5-sbu "0.4 SBU"> <!ENTITY dpkg-ch5-sbu "0.3 SBU">
<!ENTITY dpkg-ch6-du "5 MB"> <!ENTITY dpkg-ch6-du "63 MB">
<!ENTITY dpkg-ch6-sbu "0.4 SBU"> <!ENTITY dpkg-ch6-sbu "0.5 SBU">
]> ]>
<article> <article>
@ -103,27 +103,24 @@
<title>Installation of Dpkg</title> <title>Installation of Dpkg</title>
<para>Since Debian is shipping its own package, all patches have already <para>Since Debian is shipping its own package, all patches have already
been applied. However, the <command>configure</command> script calls been applied. Nevertheless there is either a bug or something
<command>dpkg</command> itself, which is found only on Debian hosts. The I do not understand... Apply this:</para>
following <command>sed</command> command prevents that call:</para>
<screen><userinput remap="pre">sed '/\$v[{]DEB_BUILD/d' \ <screen><userinput remap="pre">sed -i '/compress_filter(s/,/va_start/s/^$/compressor_fixup_params(params);\n/' lib/dpkg/compress.c</userinput></screen>
-i scripts/dpkg-architecture.pl</userinput></screen>
<para> Configure the package:</para> <para> Configure the package:</para>
<screen><userinput remap="configure">./configure --prefix=/tools \ <screen><userinput remap="configure">./configure --prefix=/tools \
--disable-nls --without-dselect \ --disable-nls --disable-dselect \
--without-start-stop-daemon \ --disable-start-stop-daemon \
--without-update-alternatives \ --disable-update-alternatives \
--without-install-info \ --without-zlib --with-liblzma=static --without-selinux</userinput></screen>
--without-zlib --with-bz2=static --without-selinux</userinput></screen>
<variablelist> <variablelist>
<title>The meaning of the configure options:</title> <title>The meaning of the configure options:</title>
<varlistentry> <varlistentry>
<term><parameter>--without-dselect</parameter></term> <term><parameter>--disable-dselect</parameter></term>
<listitem> <listitem>
<para>Avoids building <command>dselect</command>, an <para>Avoids building <command>dselect</command>, an
awful thing!</para> awful thing!</para>
@ -131,7 +128,7 @@
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><parameter>--without-start-stop-daemon</parameter></term> <term><parameter>--disable-start-stop-daemon</parameter></term>
<listitem> <listitem>
<para>The utility <command>start-stop-daemon</command> <para>The utility <command>start-stop-daemon</command>
is not needed here.</para> is not needed here.</para>
@ -139,18 +136,34 @@
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><parameter>--without-update-alternatives</parameter></term> <term><parameter>--disable-update-alternatives</parameter></term>
<listitem> <listitem>
<para>Same for <command>update-alternatives</command>.</para> <para>Same for <command>update-alternatives</command>.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><parameter>--without-install-info</parameter></term> <term><parameter>--without-zlib</parameter></term>
<listitem> <listitem>
<para>Debian <command>install-info</command> is a wrapper to <para>Use <command>gzip</command> for compression of binary
<command>install-info</command> installed by Texinfo. Not packages instead of the zlib library, which is not installed
needed either.</para> in chapter 5.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--with-liblzma=static</parameter></term>
<listitem>
<para>Use statically linked <command>liblzma</command> for compression
of binary packages.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--without-selinux</parameter></term>
<listitem>
<para>Disable building for <application>selinux</application>, which
is not used woth LFS/BLFS.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@ -257,22 +270,21 @@ touch /var/log/dpkg.log</userinput></screen>
<title>Installation of Dpkg</title> <title>Installation of Dpkg</title>
<para>Since Debian is shipping its own package, all patches have already <para>Since Debian is shipping its own package, all patches have already
been applied. We can go directly to configuring it:</para> been applied. We do not need more in chapter 6. Configure it:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \ <screen><userinput remap="configure">./configure --prefix=/usr \
--sysconfdir=/etc \ --sysconfdir=/etc \
--localstatedir=/var \ --localstatedir=/var \
--without-dselect \ --disable-dselect \
--without-start-stop-daemon \ --disable-start-stop-daemon \
--without-update-alternatives \ --disable-update-alternatives \
--without-install-info \
--without-selinux</userinput></screen> --without-selinux</userinput></screen>
<variablelist> <variablelist>
<title>The meaning of the configure options:</title> <title>The meaning of the configure options:</title>
<varlistentry> <varlistentry>
<term><parameter>--without-dselect</parameter></term> <term><parameter>--disable-dselect</parameter></term>
<listitem> <listitem>
<para>Avoids building <command>dselect</command>, an <para>Avoids building <command>dselect</command>, an
awful thing!</para> awful thing!</para>
@ -280,7 +292,7 @@ touch /var/log/dpkg.log</userinput></screen>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><parameter>--without-start-stop-daemon</parameter></term> <term><parameter>--disable-start-stop-daemon</parameter></term>
<listitem> <listitem>
<para>The utility <command>start-stop-daemon</command> <para>The utility <command>start-stop-daemon</command>
is not needed here.</para> is not needed here.</para>
@ -288,18 +300,16 @@ touch /var/log/dpkg.log</userinput></screen>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><parameter>--without-update-alternatives</parameter></term> <term><parameter>--disable-update-alternatives</parameter></term>
<listitem> <listitem>
<para>Same for <command>update-alternatives</command>.</para> <para>Same for <command>update-alternatives</command>.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><parameter>--without-install-info</parameter></term> <term><parameter>--without-selinux</parameter></term>
<listitem> <listitem>
<para>Debian <command>install-info</command> is a wrapper to <para>Selinux is not used in LFS.</para>
<command>install-info</command> installed by Texinfo. Not
needed either.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>