diff options
Diffstat (limited to 'meta/recipes-devtools/dpkg')
15 files changed, 287 insertions, 257 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc index e8d8a9b4f7..1c3c585d79 100644 --- a/meta/recipes-devtools/dpkg/dpkg.inc +++ b/meta/recipes-devtools/dpkg/dpkg.inc @@ -4,42 +4,31 @@ SECTION = "base" DEPENDS = "zlib bzip2 perl ncurses" DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native" -RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz run-postinsts perl" -RDEPENDS_${PN}_class-native = "xz-native" +RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl" +RDEPENDS_${PN}_class-native = "" UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/" -inherit autotools gettext perlnative pkgconfig systemd +inherit autotools gettext perlnative pkgconfig perl-version update-alternatives -python () { - if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): - pn = d.getVar('PN', True) - d.setVar('SYSTEMD_SERVICE_%s' % (pn), 'dpkg-configure.service') -} - -export PERL = "${bindir}/perl" PERL_class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl" -export PERL_LIBDIR = "${libdir}/perl" -PERL_LIBDIR_class-native = "${libdir}/perl-native/perl" +export PERL_LIBDIR = "${libdir}/perl/${@get_perl_version(d)}" +PERL_LIBDIR_class-native = "${libdir}/perl-native/perl/${@get_perl_version(d)}" EXTRA_OECONF = "\ --disable-dselect \ --enable-start-stop-daemon \ - --with-zlib \ - --with-bz2 \ - --without-liblzma \ - --without-selinux \ + --with-libz \ + --with-libbz2 \ + --without-libselinux \ + TAR=tar \ " -EXTRA_OECONF += "TAR=tar" -EXTRA_OECONF_append_class-target = " DEB_HOST_ARCH=${DPKG_ARCH}" +EXTRA_OECONF_append_class-target = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}" -do_configure () { - echo >> ${S}/m4/compiler.m4 - sed -i -e 's#PERL_LIBDIR=.*$#PERL_LIBDIR="${libdir}/perl"#' ${S}/configure - autotools_do_configure -} +PACKAGECONFIG = "liblzma" +PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz" do_install_append () { if [ "${PN}" = "dpkg-native" ]; then @@ -49,16 +38,6 @@ do_install_append () { else sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-* fi - - if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)};then - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/dpkg-configure.service ${D}${systemd_unitdir}/system/ - sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ - -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - -e 's,@BINDIR@,${bindir},g' \ - -e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \ - ${D}${systemd_unitdir}/system/dpkg-configure.service - fi } PROV = "virtual/update-alternatives" @@ -71,14 +50,36 @@ FILES_update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir} RPROVIDES_update-alternatives-dpkg += "update-alternatives" PACKAGES += "${PN}-perl" -FILES_${PN}-perl = "${libdir}/perl" +FILES_${PN}-perl = "${libdir}/perl/${@get_perl_version(d)}" + +RDEPENDS_${PN}-perl += "perl-module-carp perl-module-constant \ + perl-module-cwd perl-module-digest \ + perl-module-digest-md5 perl-module-errno \ + perl-module-exporter perl-module-fcntl \ + perl-module-feature perl-module-file-basename \ + perl-module-file-compare perl-module-file-copy \ + perl-module-file-find perl-module-file-path \ + perl-module-file-spec perl-module-file-temp \ + perl-module-list-util perl-module-overload \ + perl-module-parent perl-module-storable \ + perl-module-filehandle perl-module-io \ + perl-module-io-handle perl-module-io-seekable \ + perl-module-posix perl-module-scalar-util \ + perl-module-selectsaver perl-module-symbol \ + perl-module-term-ansicolor perl-module-tie-handle \ + perl-module-tie-hash perl-module-storable \ + perl-module-time-hires perl-module-time-piece \ + perl-module-xsloader" # Split out start-stop-daemon to its own package. Note that it # is installed in a different directory than the one used for # the bitbake version. # PACKAGES =+ "${PN}-start-stop" -FILES_${PN}-start-stop = "${sbindir}/start-stop-daemon" +FILES_${PN}-start-stop = "${sbindir}/start-stop-daemon.${BPN}" +ALTERNATIVE_${PN}-start-stop = "start-stop-daemon" +ALTERNATIVE_LINK_NAME[start-stop-daemon] = "${sbindir}/start-stop-daemon" +ALTERNATIVE_PRIORITY = "100" RDEPENDS_${PN} += "${PN}-start-stop" diff --git a/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch b/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch new file mode 100644 index 0000000000..50e6894406 --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch @@ -0,0 +1,41 @@ +From a328c8bec0bf8071ae8f20fee4c7475205064ba1 Mon Sep 17 00:00:00 2001 +From: sweeaun <swee.aun.khor@intel.com> +Date: Sun, 10 Sep 2017 00:14:15 -0700 +Subject: [PATCH] dpkg: Support muslx32 build + +Upstream-Status: Pending. +Changes made on ostable and tupletable to enable muslx32 build. + +Signed-off-by: sweeaun <swee.aun.khor@intel.com> +--- + data/ostable | 1 + + data/tupletable | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/data/ostable b/data/ostable +index be64342..87db273 100644 +--- a/data/ostable ++++ b/data/ostable +@@ -19,6 +19,7 @@ base-uclibc-linux linux-uclibc linux[^-]*-uclibc + eabihf-musl-linux linux-musleabihf linux[^-]*-musleabihf + eabi-musl-linux linux-musleabi linux[^-]*-musleabi + base-musl-linux linux-musl linux[^-]*-musl ++x32-musl-linux linux-muslx32 linux[^-]*-muslx32 + eabihf-gnu-linux linux-gnueabihf linux[^-]*-gnueabihf + eabi-gnu-linux linux-gnueabi linux[^-]*-gnueabi + abin32-gnu-linux linux-gnuabin32 linux[^-]*-gnuabin32 +diff --git a/data/tupletable b/data/tupletable +index 28f00bf..748ffab 100644 +--- a/data/tupletable ++++ b/data/tupletable +@@ -10,6 +10,7 @@ base-uclibc-linux-<cpu> uclibc-linux-<cpu> + eabihf-musl-linux-arm musl-linux-armhf + eabi-musl-linux-arm musl-linux-armel + base-musl-linux-<cpu> musl-linux-<cpu> ++x32-musl-linux-amd64 x32 + ilp32-gnu-linux-arm64 arm64ilp32 + eabihf-gnu-linux-arm armhf + eabi-gnu-linux-arm armel +-- +2.7.4 + diff --git a/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch b/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch index 231a6a2909..9fe0ca7600 100644 --- a/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch +++ b/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch @@ -13,13 +13,13 @@ Upstream-Status: Inappropriate [embedded specific] 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c -index 79b2908..7758aa5 100644 +index 453077fd9..f42ea2882 100644 --- a/lib/dpkg/parsehelp.c +++ b/lib/dpkg/parsehelp.c -@@ -235,14 +235,12 @@ parseversion(struct dpkg_version *rversion, const char *string, - - /* XXX: Would be faster to use something like cisversion and cisrevision. */ +@@ -243,14 +243,12 @@ parseversion(struct dpkg_version *rversion, const char *string, ptr = rversion->version; + if (!*ptr) + return dpkg_put_error(err, _("version number is empty")); - if (*ptr && !c_isdigit(*ptr++)) - return dpkg_put_warn(err, _("version number does not start with digit")); for (; *ptr; ptr++) { @@ -33,6 +33,6 @@ index 79b2908..7758aa5 100644 return dpkg_put_warn(err, _("invalid character in revision number")); } --- -2.1.4 +-- +2.11.0 diff --git a/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch b/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch index 80504ce8b9..9ca7262eb9 100644 --- a/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch +++ b/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch @@ -1,7 +1,7 @@ -From 24229971492515b64c81e8c6392e5dfbdc22b44c Mon Sep 17 00:00:00 2001 +From dd11ed66640f79143e42d778b58fdd5a61fb5836 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Wed, 26 Aug 2015 16:25:45 +0300 -Subject: [PATCH 3/5] Our pre/postinsts expect $D to be set when running in a +Subject: [PATCH] Our pre/postinsts expect $D to be set when running in a sysroot and don't expect a chroot. This matches up our system expectations with what dpkg does. @@ -9,32 +9,45 @@ Upstream-Status: Inappropriate [OE Specific] RP 2011/12/07 ALIMON 2016/05/26 - +ALIMON 2017/02/21 +KKang 2019/02/20 --- - src/script.c | 39 +++------------------------------------ - 1 file changed, 3 insertions(+), 36 deletions(-) + src/script.c | 53 +++------------------------------------------------- + 1 file changed, 3 insertions(+), 50 deletions(-) diff --git a/src/script.c b/src/script.c -index 3c88be8..ce66a86 100644 +index abe65b6f7..621ff9b27 100644 --- a/src/script.c +++ b/src/script.c -@@ -97,43 +97,10 @@ setexecute(const char *path, struct stat *stab) +@@ -96,58 +96,11 @@ setexecute(const char *path, struct stat *stab) static const char * maintscript_pre_exec(struct command *cmd) { - const char *admindir = dpkg_db_get_dir(); -- const char *changedir = fc_script_chrootless ? instdir : "/"; -- size_t instdirl = strlen(instdir); +- const char *changedir; +- size_t instdirlen = strlen(instdir); +- +- if (instdirlen > 0 && in_force(FORCE_SCRIPT_CHROOTLESS)) +- changedir = instdir; +- else +- changedir = "/"; - -- if (*instdir && !fc_script_chrootless) { -- if (strncmp(admindir, instdir, instdirl) != 0) +- if (instdirlen > 0 && !in_force(FORCE_SCRIPT_CHROOTLESS)) { +- int rc; +- +- if (strncmp(admindir, instdir, instdirlen) != 0) - ohshit(_("admindir must be inside instdir for dpkg to work properly")); -- if (setenv("DPKG_ADMINDIR", admindir + instdirl, 1) < 0) +- if (setenv("DPKG_ADMINDIR", admindir + instdirlen, 1) < 0) - ohshite(_("unable to setenv for subprocesses")); - if (setenv("DPKG_ROOT", "", 1) < 0) - ohshite(_("unable to setenv for subprocesses")); - -- if (chroot(instdir)) +- rc = chroot(instdir); +- if (rc && in_force(FORCE_NON_ROOT) && errno == EPERM) +- ohshit(_("not enough privileges to change root " +- "directory with --force-not-root, consider " +- "using --force-script-chrootless?")); +- else if (rc) - ohshite(_("failed to chroot to '%.250s'"), instdir); + if (*instdir) { + setenv("D", instdir, 1); @@ -56,15 +69,18 @@ index 3c88be8..ce66a86 100644 - args.buf); - varbuf_destroy(&args); - } -- if (!instdirl || fc_script_chrootless) +- if (instdirlen == 0 || in_force(FORCE_SCRIPT_CHROOTLESS)) - return cmd->filename; - -- assert(strlen(cmd->filename) >= instdirl); -- return cmd->filename + instdirl; +- if (strlen(cmd->filename) < instdirlen) +- internerr("maintscript name '%s' length < instdir length %zd", +- cmd->filename, instdirlen); + +- return cmd->filename + instdirlen; + return cmd->filename; } /** -- -2.1.4 +2.17.1 diff --git a/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch b/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch deleted file mode 100644 index 96e96f277b..0000000000 --- a/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0ad7bba80d5b9035089ff2b2f77a774b5b201915 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Wed, 26 Aug 2015 16:28:59 +0300 -Subject: [PATCH 5/5] dpkg-compiler.m4: remove -Wvla -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Remove the -Wvla flag from the set of compiler warning flags, since gcc -on old host systems such as CentOS 5.8 doesn't support it, and it -causes a build error for dpkg-native. - -Upstream-Status: Pending - -Signed-off-by: Donn Seeley <donn.seeley@windriver.com> -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> -Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> ---- - m4/dpkg-compiler.m4 | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/m4/dpkg-compiler.m4 b/m4/dpkg-compiler.m4 -index 682857c..23ed7d0 100644 ---- a/m4/dpkg-compiler.m4 -+++ b/m4/dpkg-compiler.m4 -@@ -52,7 +52,6 @@ AC_DEFUN([DPKG_CHECK_COMPILER_WARNINGS], [ - DPKG_CHECK_COMPILER_FLAG([-Wlogical-op]) - DPKG_CHECK_COMPILER_FLAG([-Wlogical-not-parentheses]) - DPKG_CHECK_COMPILER_FLAG([-Wswitch-bool]) -- DPKG_CHECK_COMPILER_FLAG([-Wvla]) - DPKG_CHECK_COMPILER_FLAG([-Winit-self]) - DPKG_CHECK_COMPILER_FLAG([-Wwrite-strings]) - DPKG_CHECK_COMPILER_FLAG([-Wcast-align]) --- -2.1.4 - diff --git a/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch b/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch index a6b00880ce..8797ea55c6 100644 --- a/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch +++ b/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch @@ -5,38 +5,38 @@ Subject: [PATCH] add musleabi to known target tripets helps compiling dpkg for musl/arm-softfloat +Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> --- -Upstream-Status: Pending - - ostable | 1 + - triplettable | 1 + + data/ostable | 1 + + data/tupletable | 1 + 2 files changed, 2 insertions(+) -diff --git a/ostable b/ostable -index 3bb6819..d0ffdc7 100644 ---- a/ostable -+++ b/ostable -@@ -15,6 +15,7 @@ - uclibceabi-linux linux-uclibceabi linux[^-]*-uclibceabi - uclibc-linux linux-uclibc linux[^-]*-uclibc - musleabihf-linux linux-musleabihf linux[^-]*-musleabihf -+musleabi-linux linux-musleabi linux[^-]*-musleabi - musl-linux linux-musl linux[^-]*-musl - gnueabihf-linux linux-gnueabihf linux[^-]*-gnueabihf - gnueabi-linux linux-gnueabi linux[^-]*-gnueabi -diff --git a/triplettable b/triplettable -index 1213584..70d24c1 100644 ---- a/triplettable -+++ b/triplettable -@@ -6,6 +6,7 @@ - uclibceabi-linux-arm uclibc-linux-armel - uclibc-linux-<cpu> uclibc-linux-<cpu> - musleabihf-linux-arm musl-linux-armhf -+musleabi-linux-arm musl-linux-armel - musl-linux-<cpu> musl-linux-<cpu> - gnueabihf-linux-arm armhf - gnueabi-linux-arm armel +diff --git a/data/ostable b/data/ostable +index 99c1f889d..be6434271 100644 +--- a/data/ostable ++++ b/data/ostable +@@ -17,6 +17,7 @@ + eabi-uclibc-linux linux-uclibceabi linux[^-]*-uclibceabi + base-uclibc-linux linux-uclibc linux[^-]*-uclibc + eabihf-musl-linux linux-musleabihf linux[^-]*-musleabihf ++eabi-musl-linux linux-musleabi linux[^-]*-musleabi + base-musl-linux linux-musl linux[^-]*-musl + eabihf-gnu-linux linux-gnueabihf linux[^-]*-gnueabihf + eabi-gnu-linux linux-gnueabi linux[^-]*-gnueabi +diff --git a/data/tupletable b/data/tupletable +index 5f500f6ca..28f00bfe6 100644 +--- a/data/tupletable ++++ b/data/tupletable +@@ -8,6 +8,7 @@ + eabi-uclibc-linux-arm uclibc-linux-armel + base-uclibc-linux-<cpu> uclibc-linux-<cpu> + eabihf-musl-linux-arm musl-linux-armhf ++eabi-musl-linux-arm musl-linux-armel + base-musl-linux-<cpu> musl-linux-<cpu> + ilp32-gnu-linux-arm64 arm64ilp32 + eabihf-gnu-linux-arm armhf -- -2.6.4 +2.11.0 diff --git a/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch b/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch new file mode 100644 index 0000000000..4f79a40d8b --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch @@ -0,0 +1,43 @@ +From 8659eeeeda74d71e12080121f0b13a88cbdda433 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com> +Date: Tue, 21 Feb 2017 11:23:27 -0600 +Subject: [PATCH] dpkg-deb/build.c: Remove usage of --clamp-mtime in tar +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Recently dpkg added --clamp-mtime to tar to create reproducible +build tarballs [1]. + +But host tools doesn't support this option because is new on tar +so disable in our builds. + +Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> + +Upstream-Status: Inappropriate [Configuration] + +[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759999#20 +[2] https://lists.gnu.org/archive/html/help-tar/2016-01/msg00000.html + +Update patch context for dpkg 1.19.4. + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- + dpkg-deb/build.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c +index 68d1875..053fcb7 100644 +--- a/dpkg-deb/build.c ++++ b/dpkg-deb/build.c +@@ -457,7 +457,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, + + command_init(&cmd, TAR, "tar -cf"); + command_add_args(&cmd, "tar", "-cf", "-", "--format=gnu", +- "--mtime", mtime, "--clamp-mtime", NULL); ++ "--mtime", mtime, NULL); + /* Mode might become a positional argument, pass it before -T. */ + if (options->mode) + command_add_args(&cmd, "--mode", options->mode, NULL); +-- +2.11.0 diff --git a/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch b/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch index dc69eb2d1c..d165616a19 100644 --- a/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch +++ b/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch @@ -24,23 +24,25 @@ empty in configure script. Upstream-Status: Pending Signed-off-by: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com> +Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> --- - triplettable | 1 + + data/tupletable | 1 + 1 file changed, 1 insertion(+) -diff --git a/triplettable b/triplettable -index abe4726..1e9c247 100644 ---- a/triplettable -+++ b/triplettable -@@ -11,6 +11,7 @@ gnueabihf-linux-arm armhf - gnueabi-linux-arm armel - gnuabin32-linux-mips64r6el mipsn32r6el - gnuabin32-linux-mips64r6 mipsn32r6 -+gnueabi-linux-armeb armeb - gnuabin32-linux-mips64el mipsn32el - gnuabin32-linux-mips64 mipsn32 - gnuabi64-linux-mips64r6el mips64r6el +diff --git a/data/tupletable b/data/tupletable +index b7802bec3..5f500f6ca 100644 +--- a/data/tupletable ++++ b/data/tupletable +@@ -12,6 +12,7 @@ base-musl-linux-<cpu> musl-linux-<cpu> + ilp32-gnu-linux-arm64 arm64ilp32 + eabihf-gnu-linux-arm armhf + eabi-gnu-linux-arm armel ++eabi-gnu-linux-armeb armeb + abin32-gnu-linux-mips64r6el mipsn32r6el + abin32-gnu-linux-mips64r6 mipsn32r6 + abin32-gnu-linux-mips64el mipsn32el -- -2.1.4 +2.11.0 + diff --git a/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch b/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch index cad4c0f0a1..4e0d22acbb 100644 --- a/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch +++ b/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch @@ -7,16 +7,23 @@ Upstream-Status: Pending Signed-off-by: Joe Slater <jslater@windriver.com> +--- + scripts/Dpkg/Arch.pm | 3 --- + 1 file changed, 3 deletions(-) +diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm +index 1720847b8..6345ce3b9 100644 --- a/scripts/Dpkg/Arch.pm +++ b/scripts/Dpkg/Arch.pm -@@ -233,9 +233,6 @@ sub read_triplettable() - (my $dt = $debtriplet) =~ s/<cpu>/$_cpu/; +@@ -323,9 +323,6 @@ sub _load_tupletable() + (my $dt = $debtuple) =~ s/<cpu>/$_cpu/; (my $da = $debarch) =~ s/<cpu>/$_cpu/; -- next if exists $debarch_to_debtriplet{$da} -- or exists $debtriplet_to_debarch{$dt}; +- next if exists $debarch_to_debtuple{$da} +- or exists $debtuple_to_debarch{$dt}; - - $debarch_to_debtriplet{$da} = $dt; - $debtriplet_to_debarch{$dt} = $da; + $debarch_to_debtuple{$da} = $dt; + $debtuple_to_debarch{$dt} = $da; } +-- +2.11.0 diff --git a/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service b/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service deleted file mode 100644 index f0b0789e4e..0000000000 --- a/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=dpkg first boot configure -DefaultDependencies=no -After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount -Before=sysinit.target - -[Service] -Type=oneshot -EnvironmentFile=-@SYSCONFDIR@/default/postinst -ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then @BINDIR@/dpkg --configure -a > $LOGFILE 2>&1; else @BINDIR@/dpkg --configure -a; fi" -ExecStartPost=@BASE_BINDIR@/systemctl disable dpkg-configure.service -StandardOutput=syslog -RemainAfterExit=No - -[Install] -WantedBy=basic.target -WantedBy=sysinit.target diff --git a/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch b/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch deleted file mode 100644 index d56b8a69a3..0000000000 --- a/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch +++ /dev/null @@ -1,86 +0,0 @@ -CentOS 5.8 kernels and headers support the sync_file_range() system call, -but glibc 2.5 doesn't provide the syscall stub. It appears that this -problem is known but will never be fixed: - - https://bugzilla.redhat.com/show_bug.cgi?id=518581 - - Bug 518581 - [RHEL5] glibc misses sync_file_range syscall interface - - Status: CLOSED CANTFIX - Last Closed: 2009-11-22 22:19:55 - - Kirby Zhou 2009-08-20 23:37:55 EDT - - Description of problem: - - glibc misses sync_file_range syscall interface. The header file and - man page both say 'sync_file_range' should exist. From man page, - sync_file_range should exist sinc kernel-2.6.17 - - Andreas Schwab 2009-08-21 03:24:24 EDT - - It has only been added to glibc 2.6, and cannot be backported due to - ABI breakage. You can always fall back to syscall(3). - - Ulrich Drepper 2009-11-22 22:19:55 EST - - As comment #1 says, no chance to backport this. - - See the syscall man page for instructions. - - Jon E 2010-03-19 10:32:37 EDT - - then why document it if it's broken and you're not going to fix it? - .. might want to FTFM over at sync_file_range(2) - in the meantime - - borrowing from glibc 2.6 .. any thoughts on this implementation for a - hacky workaround for those still on your "ancient releases" .. (eg: - RHEL5.3)?: - - #ifdef ULI_WONT_FIX_THIS_IN_GLIBC2.5 - #define NR_sync_file_range 277 - int sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags) - { - return syscall (NR_sync_file_range, fd, - __LONG_LONG_PAIR ((long) (from >> 32), (long) from), - __LONG_LONG_PAIR ((long) (to >> 32), (long) to), - flags); - } - #endif - - assuming of course that you're on an x86_64 and include/asm- - x86_64/unistd.h has the correct entry - - (fwiw - fio is starting to use this now) - -Rather than attempting to provide an implementation using syscall(), -we take the more conservative route and ignore header support for -sync_file_range() flags when the glibc version is <= 2.5. - -Upstream-Status: Inappropriate [everyone else builds on newer hosts :-)] - -Signed-off-by: Donn Seeley <donn.seeley@windriver.com> -Signed-off-by: Lei Liu <lei.liu2@windriver.com> ---- - src/archives.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/src/archives.c -+++ b/src/archives.c -@@ -75,7 +75,7 @@ - /* Ignore the return code as it should be considered equivalent to an - * asynchronous hint for the kernel, we are doing an fsync() later on - * anyway. */ --#if defined(SYNC_FILE_RANGE_WRITE) -+#if defined(SYNC_FILE_RANGE_WRITE) && __GLIBC_PREREQ(2, 6) - sync_file_range(fd, 0, 0, SYNC_FILE_RANGE_WRITE); - #elif defined(HAVE_POSIX_FADVISE) - posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED); -@@ -1179,7 +1179,7 @@ - return 0; - } - --#if defined(SYNC_FILE_RANGE_WAIT_BEFORE) -+#if defined(SYNC_FILE_RANGE_WAIT_BEFORE) && __GLIBC_PREREQ(2, 6) - static void - tar_writeback_barrier(struct fileinlist *files, struct pkginfo *pkg) - { diff --git a/meta/recipes-devtools/dpkg/dpkg/noman.patch b/meta/recipes-devtools/dpkg/dpkg/noman.patch index d30c15018a..a7f3cb8f45 100644 --- a/meta/recipes-devtools/dpkg/dpkg/noman.patch +++ b/meta/recipes-devtools/dpkg/dpkg/noman.patch @@ -1,14 +1,22 @@ Upstream-Status: Inappropriate [disable feature] -diff -ruN dpkg-1.15.8.5-orig/Makefile.am dpkg-1.15.8.5/Makefile.am ---- dpkg-1.15.8.5-orig/Makefile.am 2010-10-08 12:27:15.042083703 +0800 -+++ dpkg-1.15.8.5/Makefile.am 2010-10-08 12:27:27.755148228 +0800 -@@ -12,8 +12,7 @@ - utils \ +--- + Makefile.am | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 0da52cb16..a1f79e0a2 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -13,8 +13,7 @@ SUBDIRS = \ $(MAYBE_DSELECT) \ scripts \ + t-func \ - po \ - man + po ACLOCAL_AMFLAGS = -I m4 + +-- +2.11.0 diff --git a/meta/recipes-devtools/dpkg/dpkg/pager.patch b/meta/recipes-devtools/dpkg/dpkg/pager.patch new file mode 100644 index 0000000000..e56b9d28af --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/pager.patch @@ -0,0 +1,21 @@ +pager: Use less instead of pager + +pager is a Debianism. Istead use directly pager. + +Upstream-Status: Inappropriate [OE-Core integration specific] + +Suggested-by: Burton, Ross <ross.burton@intel.com> +Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com> +diff --git a/lib/dpkg/dpkg.h b/lib/dpkg/dpkg.h +index 2bb067a..6cbce80 100644 +--- a/lib/dpkg/dpkg.h ++++ b/lib/dpkg/dpkg.h +@@ -95,7 +95,7 @@ DPKG_BEGIN_DECLS + #define MAXUPDATES 250 + + #define DEFAULTSHELL "sh" +-#define DEFAULTPAGER "pager" ++#define DEFAULTPAGER "less" + + #define MD5HASHLEN 32 + #define MAXTRIGDIRECTIVE 256 diff --git a/meta/recipes-devtools/dpkg/dpkg/tweak-options-require-tar-1.27.patch b/meta/recipes-devtools/dpkg/dpkg/tweak-options-require-tar-1.27.patch new file mode 100644 index 0000000000..e9119918b1 --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/tweak-options-require-tar-1.27.patch @@ -0,0 +1,27 @@ +GNU tar >= 1.27 is required for --owner=NAME:ID and --group=NAME:ID. And fails +to build .deb packages with error: + +| dpkg-deb: building package 'linux-libc-headers-dbg' in '.../tmp/work/i586-poky-linux/linux-libc-headers/4.19-r0/deploy-debs/i586/linux-libc-headers-dbg_ 4.19-r0.0_i386.deb'. +| tar: root\:0: Invalid owner +| tar: Error is not recoverable: exiting now +| dpkg-deb: error: tar -cf subprocess returned error exit status 2 + +Tweak tar options in dpkg-deb source code to make it work on old machines. + +Upstream-Status: Inappropriate [cross build specific] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- +diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c +index 68d187511..86fe22e25 100644 +--- a/dpkg-deb/build.c ++++ b/dpkg-deb/build.c +@@ -462,7 +462,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, + if (options->mode) + command_add_args(&cmd, "--mode", options->mode, NULL); + if (options->root_owner_group) +- command_add_args(&cmd, "--owner", "root:0", "--group", "root:0", NULL); ++ command_add_args(&cmd, "--owner", "root", "--group", "root", NULL); + command_add_args(&cmd, "--null", "--no-unquote", "--no-recursion", + "-T", "-", NULL); + command_exec(&cmd); diff --git a/meta/recipes-devtools/dpkg/dpkg_1.18.7.bb b/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb index 28fdc136a0..e9dec337b3 100644 --- a/meta/recipes-devtools/dpkg/dpkg_1.18.7.bb +++ b/meta/recipes-devtools/dpkg/dpkg_1.19.7.bb @@ -1,19 +1,22 @@ require dpkg.inc LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -SRC_URI = "http://snapshot.debian.org/archive/debian/20160509T100042Z/pool/main/d/${BPN}/${BPN}_${PV}.tar.xz \ +SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz \ file://noman.patch \ file://remove-tar-no-timestamp.patch \ file://arch_pm.patch \ - file://dpkg-configure.service \ file://add_armeb_triplet_entry.patch \ file://0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch \ file://0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch \ file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \ - file://0005-dpkg-compiler.m4-remove-Wvla.patch \ file://0006-add-musleabi-to-known-target-tripets.patch \ + file://0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch \ + file://0001-dpkg-Support-muslx32-build.patch \ + file://pager.patch \ " -SRC_URI_append_class-native = " file://glibc2.5-sync_file_range.patch " +SRC_URI_append_class-native = " \ + file://tweak-options-require-tar-1.27.patch \ +" -SRC_URI[md5sum] = "073dbf2129a54b0fc627464bf8af4a1b" -SRC_URI[sha256sum] = "ace36d3a6dc750a42baf797f9e75ec580a21f92bb9ff96b482100755d6d9b87b" +SRC_URI[md5sum] = "60f57c5494e6dfa177504d47bfa0e383" +SRC_URI[sha256sum] = "4c27fededf620c0aa522fff1a48577ba08144445341257502e7730f2b1a296e8" |