diff options
Diffstat (limited to 'meta/recipes-devtools/dpkg')
15 files changed, 242 insertions, 305 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc index fe4732d1db..0d17a98b80 100644 --- a/meta/recipes-devtools/dpkg/dpkg.inc +++ b/meta/recipes-devtools/dpkg/dpkg.inc @@ -1,27 +1,22 @@ SUMMARY = "Package maintenance system from Debian" -LICENSE = "GPLv2.0+" +LICENSE = "GPL-2.0-or-later" +HOMEPAGE = "https://salsa.debian.org/dpkg-team/dpkg" +DESCRIPTION = "The primary interface for the dpkg suite is the dselect program. A more low-level and less user-friendly interface is available in the form of the dpkg command." 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} perl" -RDEPENDS_${PN}_class-native = "" +DEPENDS:class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native" +RDEPENDS:${PN} = "${VIRTUAL-RUNTIME_update-alternatives} perl" +RDEPENDS:${PN}:class-native = "" -UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/d/dpkg/" +UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))" -inherit autotools gettext perlnative pkgconfig systemd perl-version +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') - d.setVar('SYSTEMD_SERVICE_%s' % (pn), 'dpkg-configure.service') -} - -export PERL = "${bindir}/perl" -PERL_class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl" +PERL:class-native = "${STAGING_BINDIR_NATIVE}/perl-native/perl" -export PERL_LIBDIR = "${libdir}/perl/${@get_perl_version(d)}" -PERL_LIBDIR_class-native = "${libdir}/perl-native/perl/${@get_perl_version(d)}" +export PERL_LIBDIR = "${libdir}/perl5/${@get_perl_version(d)}" +PERL_LIBDIR:class-native = "${libdir}/perl-native/perl/${@get_perl_version(d)}" EXTRA_OECONF = "\ --disable-dselect \ @@ -29,47 +24,53 @@ EXTRA_OECONF = "\ --with-libz \ --with-libbz2 \ --without-libselinux \ + TAR=tar \ " +EXTRA_OECONF:append:class-target = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}" +EXTRA_OECONF:append:class-nativesdk = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}" + PACKAGECONFIG = "liblzma" PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz" -EXTRA_OECONF += "TAR=tar" -EXTRA_OECONF_append_class-target = " DEB_HOST_ARCH=${DPKG_ARCH}" -do_install_append () { +#autotools.bbclass default AUTOTOOLS_AUXDIR is ${S}, we need to under ${S}/build-aux +AUTOTOOLS_AUXDIR = "${S}/build-aux" + +do_configure:prepend () { + mkdir -p ${AUTOTOOLS_AUXDIR} + # autotools_do_configure updates po/Makefile.in.in, we also need + # update dselect/po and scripts/po + cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/dselect/po/ + cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/scripts/po/ +} + +do_install:append () { if [ "${PN}" = "dpkg-native" ]; then # update-alternatives doesn't have an offline mode rm ${D}${bindir}/update-alternatives - sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-* + sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-* ${D}${sbindir}/dpkg-* 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 + sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-* ${D}${sbindir}/dpkg-* fi } PROV = "virtual/update-alternatives" -PROV_class-native = "" +PROV:class-native = "" +PROV:class-nativesdk = "" PROVIDES += "${PROV}" +FILES:${PN} += "${datadir}/zsh" + PACKAGES =+ "update-alternatives-dpkg" -FILES_update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives" -RPROVIDES_update-alternatives-dpkg += "update-alternatives" +FILES:update-alternatives-dpkg = "${bindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives" +RPROVIDES:update-alternatives-dpkg += "update-alternatives" PACKAGES += "${PN}-perl" -FILES_${PN}-perl = "${libdir}/perl/${@get_perl_version(d)}" +FILES:${PN}-perl = "${libdir}/perl5/${@get_perl_version(d)}" -RDEPENDS_${PN}-perl += "perl-module-carp perl-module-constant \ +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 \ @@ -93,9 +94,13 @@ RDEPENDS_${PN}-perl += "perl-module-carp perl-module-constant \ # the bitbake version. # PACKAGES =+ "${PN}-start-stop" -FILES_${PN}-start-stop = "${sbindir}/start-stop-daemon" - -RDEPENDS_${PN} += "${PN}-start-stop" +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" +EXTRA_RDPENDS = "ldconfig" +EXTRA_RDPENDS:libc-musl = "" +RDEPENDS:${PN} += "${PN}-start-stop ${EXTRA_RDPENDS}" -BBCLASSEXTEND = "native" +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/dpkg/dpkg/0001-Add-support-for-riscv32-CPU.patch b/meta/recipes-devtools/dpkg/dpkg/0001-Add-support-for-riscv32-CPU.patch new file mode 100644 index 0000000000..52e85705fa --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/0001-Add-support-for-riscv32-CPU.patch @@ -0,0 +1,39 @@ +From 279e4c274f5f295823cf9fa95d3ba131f6d711db Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 29 Apr 2020 22:02:23 -0700 +Subject: [PATCH] Add support for riscv32 CPU + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + data/cputable | 1 + + scripts/Dpkg/Vendor/Debian.pm | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/data/cputable b/data/cputable +index 9f2a8e0..1d935b1 100644 +--- a/data/cputable ++++ b/data/cputable +@@ -41,6 +41,7 @@ powerpc powerpc (powerpc|ppc) 32 big + powerpcel powerpcle powerpcle 32 little + ppc64 powerpc64 (powerpc|ppc)64 64 big + ppc64el powerpc64le powerpc64le 64 little ++riscv32 riscv32 riscv32 32 little + riscv64 riscv64 riscv64 64 little + s390 s390 s390 32 big + s390x s390x s390x 64 big +diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm +index a352bbd..fa1d90b 100644 +--- a/scripts/Dpkg/Vendor/Debian.pm ++++ b/scripts/Dpkg/Vendor/Debian.pm +@@ -306,6 +306,7 @@ sub _add_build_flags { + powerpc + ppc64 + ppc64el ++ riscv32 + riscv64 + s390x + sparc +-- +2.26.2 + diff --git a/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch b/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch deleted file mode 100644 index 45c606e690..0000000000 --- a/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 319f32d743f5b5e725012654d124e49226d5de91 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 16 Mar 2018 20:28:24 -0700 -Subject: [PATCH] arch: Add support for riscv64 CPU - - * Architecture support: - - Add support for riscv64 CPU. Closes: #822914 - Thanks to Manuel A. Fernandez Montecelo <mafm@debian.org> - -Upstream-Status: Backport [https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=dpkg%2Fdpkg.git;a=commitdiff_plain;h=ee0855cc66076691de4796be48f8a0d889fde001;hp=2f5816d8be40b449d2473b22f9e0c33b32f3bd78] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - data/cputable | 1 + - scripts/t/Dpkg_Arch.t | 4 ++-- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/data/cputable b/data/cputable -index a2bd7d6..9f2a8e0 100644 ---- a/data/cputable -+++ b/data/cputable -@@ -41,6 +41,7 @@ powerpc powerpc (powerpc|ppc) 32 big - powerpcel powerpcle powerpcle 32 little - ppc64 powerpc64 (powerpc|ppc)64 64 big - ppc64el powerpc64le powerpc64le 64 little -+riscv64 riscv64 riscv64 64 little - s390 s390 s390 32 big - s390x s390x s390x 64 big - sh3 sh3 sh3 32 little -diff --git a/scripts/t/Dpkg_Arch.t b/scripts/t/Dpkg_Arch.t -index d478b49..ecd5d66 100644 ---- a/scripts/t/Dpkg_Arch.t -+++ b/scripts/t/Dpkg_Arch.t -@@ -16,7 +16,7 @@ - use strict; - use warnings; - --use Test::More tests => 16367; -+use Test::More tests => 16832; - - use_ok('Dpkg::Arch', qw(debarch_to_debtuple debarch_to_multiarch - debarch_eq debarch_is debarch_is_wildcard -@@ -162,7 +162,7 @@ is(gnutriplet_to_debarch(undef), undef, 'undef gnutriplet'); - is(gnutriplet_to_debarch('unknown-unknown-unknown'), undef, 'unknown gnutriplet'); - is(gnutriplet_to_debarch('x86_64-linux-gnu'), 'amd64', 'known gnutriplet'); - --is(scalar get_valid_arches(), 524, 'expected amount of known architectures'); -+is(scalar get_valid_arches(), 539, 'expected amount of known architectures'); - - { - local $ENV{CC} = 'false'; --- -2.16.2 - diff --git a/meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch b/meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch new file mode 100644 index 0000000000..dc0d9bfc2e --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch @@ -0,0 +1,56 @@ +From 839f228556c00739f72534e8635195935eb3752f Mon Sep 17 00:00:00 2001 +From: Paul Eggleton <paul.eggleton@linux.microsoft.com> +Date: Tue, 16 Jun 2020 03:57:25 +0000 +Subject: [PATCH] build.c: ignore return of 1 from tar -cf + +When running do_package_write_deb, we have trees of hardlinked files +such as the dbg source files in ${PN}-dbg. If something makes another +copy of one of those files (or deletes one), the number of links a file +has changes and tar can notice this, e.g.: + +| DEBUG: Executing python function do_package_deb +| dpkg-deb: building package `sed-ptest' in `/media/build1/poky/build/tmp/work/i586-poky-linux/sed/4.2.2-r0/deploy-debs/i586/sed-ptest_4.2.2-r0.3_i386.deb'. +| tar: ./usr/lib/sed/ptest/testsuite/tst-regex2: file changed as we read it +| dpkg-deb: error: subprocess tar -cf returned error exit status 1 + +Tar returns an error of 1 when files 'change' and other errors codes +in other error cases. We tweak dpkg-deb here so that it ignores an exit +code of 1 from tar. The files don't really change (and we have locking in +place to avoid that kind of issue). + +Upstream-Status: Inappropriate [OE specific] + +Original patch by RP 2015/3/27, rebased by Paul Eggleton + +Signed-off-by: Paul Eggleton <paul.eggleton@microsoft.com> + +--- + src/deb/build.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/deb/build.c b/src/deb/build.c +index 76613ad..7c216d1 100644 +--- a/src/deb/build.c ++++ b/src/deb/build.c +@@ -482,6 +482,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, + { + int pipe_filenames[2], pipe_tarball[2]; + pid_t pid_tar, pid_comp; ++ int rc; + + /* Fork off a tar. We will feed it a list of filenames on stdin later. */ + m_pipe(pipe_filenames); +@@ -534,7 +535,9 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, + /* All done, clean up wait for tar and <compress> to finish their job. */ + close(pipe_filenames[1]); + subproc_reap(pid_comp, _("<compress> from tar -cf"), 0); +- subproc_reap(pid_tar, "tar -cf", 0); ++ rc = subproc_reap(pid_tar, "tar -cf", SUBPROC_RETERROR); ++ if (rc && rc != 1) ++ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc); + } + + static intmax_t +-- +2.25.1 + 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 index 50e6894406..d66ab4476a 100644 --- a/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch +++ b/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch @@ -3,7 +3,7 @@ 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. +Upstream-Status: Pending Changes made on ostable and tupletable to enable muslx32 build. Signed-off-by: sweeaun <swee.aun.khor@intel.com> 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 93d870443c..75ae848264 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. @@ -10,15 +10,16 @@ Upstream-Status: Inappropriate [OE Specific] RP 2011/12/07 ALIMON 2016/05/26 ALIMON 2017/02/21 +KKang 2019/02/20 --- - src/script.c | 44 +++----------------------------------------- - 1 file changed, 3 insertions(+), 41 deletions(-) + src/main/script.c | 54 +++-------------------------------------------- + 1 file changed, 3 insertions(+), 51 deletions(-) -diff --git a/src/script.c b/src/script.c -index 2f252ae..768a9d1 100644 ---- a/src/script.c -+++ b/src/script.c -@@ -97,48 +97,10 @@ setexecute(const char *path, struct stat *stab) +diff --git a/src/main/script.c b/src/main/script.c +index abe65b6..0edb8f1 100644 +--- a/src/main/script.c ++++ b/src/main/script.c +@@ -96,58 +96,10 @@ setexecute(const char *path, struct stat *stab) static const char * maintscript_pre_exec(struct command *cmd) { @@ -26,12 +27,14 @@ index 2f252ae..768a9d1 100644 - const char *changedir; - size_t instdirlen = strlen(instdir); - -- if (instdirlen > 0 && fc_script_chrootless) +- if (instdirlen > 0 && in_force(FORCE_SCRIPT_CHROOTLESS)) - changedir = instdir; - else - changedir = "/"; - -- if (instdirlen > 0 && !fc_script_chrootless) { +- 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 + instdirlen, 1) < 0) @@ -39,11 +42,14 @@ index 2f252ae..768a9d1 100644 - 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); - } +- } - /* Switch to a known good directory to give the maintainer script - * a saner environment, also needed after the chroot(). */ - if (chdir(changedir)) @@ -60,16 +66,21 @@ index 2f252ae..768a9d1 100644 - debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename, - args.buf); - varbuf_destroy(&args); -- } -- if (instdirlen == 0 || fc_script_chrootless) ++ if (*instdir) { ++ setenv("D", instdir, 1); + } +- if (instdirlen == 0 || in_force(FORCE_SCRIPT_CHROOTLESS)) - return cmd->filename; - -- assert(strlen(cmd->filename) >= instdirlen); +- 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.25.1 diff --git a/meta/recipes-devtools/dpkg/dpkg/0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch b/meta/recipes-devtools/dpkg/dpkg/0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch index 56c85c7733..bbd5aba418 100644 --- a/meta/recipes-devtools/dpkg/dpkg/0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch +++ b/meta/recipes-devtools/dpkg/dpkg/0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch @@ -8,14 +8,14 @@ Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Upstream-Status: Inappropriate [embedded specific] --- - src/archives.c | 3 ++- + src/main/archives.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/src/archives.c b/src/archives.c -index bff5f14..b711013 100644 ---- a/src/archives.c -+++ b/src/archives.c -@@ -449,8 +449,9 @@ tarobject_set_mtime(struct tar_entry *te, const char *path) +diff --git a/src/main/archives.c b/src/main/archives.c +index 92340b9..7a55c27 100644 +--- a/src/main/archives.c ++++ b/src/main/archives.c +@@ -490,8 +490,9 @@ tarobject_set_mtime(struct tar_entry *te, const char *path) if (te->type == TAR_FILETYPE_SYMLINK) { #ifdef HAVE_LUTIMES @@ -27,5 +27,5 @@ index bff5f14..b711013 100644 } else { if (utimes(path, tv)) -- -2.1.4 +2.25.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/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 index 1b985df0f5..117f9234ad 100644 --- 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 @@ -2,9 +2,6 @@ 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]. @@ -18,22 +15,27 @@ 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 +- + src/deb/build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c -index a92b58e..a3d1912 100644 ---- a/dpkg-deb/build.c -+++ b/dpkg-deb/build.c -@@ -450,7 +450,7 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder, +diff --git a/src/deb/build.c b/src/deb/build.c +index 5c74ff3..76613ad 100644 +--- a/src/deb/build.c ++++ b/src/deb/build.c +@@ -505,7 +505,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 (mode) - command_add_args(&cmd, "--mode", mode, NULL); + if (options->mode) + command_add_args(&cmd, "--mode", options->mode, NULL); -- -2.11.0 +2.25.1 + 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 9a248ccb4a..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 --no-reload 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 d48386647e..0000000000 --- a/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 9d260d408f9e17abd1d1dccd685bd7e80a3655a9 Mon Sep 17 00:00:00 2001 -From: Donn Seeley <donn.seeley@windriver.com> -Date: Tue, 25 Feb 2014 17:44:04 +0800 -Subject: [PATCH] dpkg: fix a link problem for dpkg-native on CentOS 5.8 - -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(-) - -diff --git a/src/archives.c b/src/archives.c -index 4b2fc92..a92b795 100644 ---- a/src/archives.c -+++ b/src/archives.c -@@ -69,7 +69,7 @@ fd_writeback_init(int fd) - /* 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); -@@ -1078,7 +1078,7 @@ tarobject(void *ctx, struct tar_entry *ti) - 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) - { --- -2.16.2 - diff --git a/meta/recipes-devtools/dpkg/dpkg/noman.patch b/meta/recipes-devtools/dpkg/dpkg/noman.patch index a7f3cb8f45..6900716b11 100644 --- a/meta/recipes-devtools/dpkg/dpkg/noman.patch +++ b/meta/recipes-devtools/dpkg/dpkg/noman.patch @@ -1,22 +1,21 @@ Upstream-Status: Inappropriate [disable feature] --- - Makefile.am | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) + Makefile.am | 1 - + 1 file changed, 1 deletion(-) diff --git a/Makefile.am b/Makefile.am -index 0da52cb16..a1f79e0a2 100644 +index d963a10..7cef7f5 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -13,8 +13,7 @@ SUBDIRS = \ +@@ -11,7 +11,6 @@ SUBDIRS = \ $(MAYBE_DSELECT) \ scripts \ - t-func \ -- po \ -- man -+ po + po \ +- man \ + # EOL ACLOCAL_AMFLAGS = -I m4 - -- -2.11.0 +2.25.1 + 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/remove-tar-no-timestamp.patch b/meta/recipes-devtools/dpkg/dpkg/remove-tar-no-timestamp.patch index 4f408ff777..ebf838ffe9 100644 --- a/meta/recipes-devtools/dpkg/dpkg/remove-tar-no-timestamp.patch +++ b/meta/recipes-devtools/dpkg/dpkg/remove-tar-no-timestamp.patch @@ -3,11 +3,15 @@ busybox-1.19.4 tar utility doesn't support --warning=no-timestamp Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Upstream-Status: Inappropriate [configuration] -Index: dpkg-1.17.1/dpkg-deb/extract.c -=================================================================== ---- dpkg-1.17.1.orig/dpkg-deb/extract.c -+++ dpkg-1.17.1/dpkg-deb/extract.c -@@ -318,7 +318,6 @@ extracthalf(const char *debar, const cha +--- + src/deb/extract.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/deb/extract.c b/src/deb/extract.c +index a1b2dc0..95e2372 100644 +--- a/src/deb/extract.c ++++ b/src/deb/extract.c +@@ -333,7 +333,6 @@ extracthalf(const char *debar, const char *dir, command_add_arg(&cmd, "-f"); command_add_arg(&cmd, "-"); @@ -15,3 +19,6 @@ Index: dpkg-1.17.1/dpkg-deb/extract.c m_dup2(p2[0],0); close(p2[0]); +-- +2.25.1 + diff --git a/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb b/meta/recipes-devtools/dpkg/dpkg_1.21.2.bb index 6d8ec34768..ef2e06ee4a 100644 --- a/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb +++ b/meta/recipes-devtools/dpkg/dpkg_1.21.2.bb @@ -1,22 +1,23 @@ require dpkg.inc LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -SRC_URI = "http://snapshot.debian.org/archive/debian/20170518T093838Z/pool/main/d/dpkg/dpkg_1.18.24.tar.xz \ +SRC_URI = "git://salsa.debian.org/dpkg-team/dpkg.git;protocol=https;branch=main \ 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://0001-arch-Add-support-for-riscv64-CPU.patch \ + file://pager.patch \ + file://0001-Add-support-for-riscv32-CPU.patch \ " -SRC_URI_append_class-native = " file://glibc2.5-sync_file_range.patch " -SRC_URI[md5sum] = "02e8af8faf1e689228da806c3e8c6882" -SRC_URI[sha256sum] = "d853081d3e06bfd46a227056e591f094e42e78fa8a5793b0093bad30b710d7b4" +SRC_URI:append:class-native = " file://0001-build.c-ignore-return-of-1-from-tar-cf.patch" + +SRCREV = "a9580d3aec5f487a81664a462ec70ec1993f19f8" + +S = "${WORKDIR}/git" |