diff options
Diffstat (limited to 'meta/recipes-devtools/dpkg')
17 files changed, 260 insertions, 293 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc index fe4732d1db..4c1d42e0af 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 = "zlib bzip2 perl ncurses libmd" +DEPENDS:class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native libmd-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 bash-completion -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..b8a8697585 --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/0001-Add-support-for-riscv32-CPU.patch @@ -0,0 +1,36 @@ +From 21459bb8d9a997e6a92885a4ef337ede9cc5aba7 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 575c008e3..7a801a03a 100644 +--- a/data/cputable ++++ b/data/cputable +@@ -43,6 +43,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 fcf5b1e2a..175c9f436 100644 +--- a/scripts/Dpkg/Vendor/Debian.pm ++++ b/scripts/Dpkg/Vendor/Debian.pm +@@ -202,6 +202,7 @@ sub set_build_features { + powerpc + ppc64 + ppc64el ++ riscv32 + riscv64 + s390x + sparc 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..95a49053e8 --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/0001-build.c-ignore-return-of-1-from-tar-cf.patch @@ -0,0 +1,52 @@ +From 4c5e6c280a2ab4d2009d3264e94286f5fe244d0b 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 92aba9553..6436b33da 100644 +--- a/src/deb/build.c ++++ b/src/deb/build.c +@@ -481,6 +481,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); +@@ -533,7 +534,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 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..e8d8576f85 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 @@ -1,9 +1,9 @@ -From a328c8bec0bf8071ae8f20fee4c7475205064ba1 Mon Sep 17 00:00:00 2001 +From 1d192b60fc43e24e1c2d6ff452dabeee7a227cc0 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. +Upstream-Status: Pending Changes made on ostable and tupletable to enable muslx32 build. Signed-off-by: sweeaun <swee.aun.khor@intel.com> @@ -13,10 +13,10 @@ Signed-off-by: sweeaun <swee.aun.khor@intel.com> 2 files changed, 2 insertions(+) diff --git a/data/ostable b/data/ostable -index be64342..87db273 100644 +index 860355774..28779beca 100644 --- a/data/ostable +++ b/data/ostable -@@ -19,6 +19,7 @@ base-uclibc-linux linux-uclibc linux[^-]*-uclibc +@@ -21,6 +21,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 @@ -25,17 +25,14 @@ index be64342..87db273 100644 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 +index 82ae3604e..707d85bdb 100644 --- a/data/tupletable +++ b/data/tupletable -@@ -10,6 +10,7 @@ base-uclibc-linux-<cpu> uclibc-linux-<cpu> +@@ -26,6 +26,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 - + eabi-gnu-linux-armeb armeb 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 9fe0ca7600..fc097e5a66 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 @@ -1,8 +1,8 @@ -From b4ea54158c399874e12394ebc91afe98954695e2 Mon Sep 17 00:00:00 2001 +From 0cac67ce5920d6d0c9df4278bfa77da878a8a37a Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Wed, 26 Aug 2015 16:16:16 +0300 -Subject: [PATCH 2/5] Adapt to linux-wrs kernel version, which has character - '_' inside. Remove the first-char-digit-check (as the 1.15.8.5 version does). +Subject: [PATCH] Adapt to linux-wrs kernel version, which has character '_' + inside. Remove the first-char-digit-check (as the 1.15.8.5 version does). Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Constantin Musca <constantinx.musca@intel.com> @@ -13,14 +13,14 @@ 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 453077fd9..f42ea2882 100644 +index 63a36f55c..81901bd5a 100644 --- a/lib/dpkg/parsehelp.c +++ b/lib/dpkg/parsehelp.c -@@ -243,14 +243,12 @@ parseversion(struct dpkg_version *rversion, const char *string, +@@ -275,14 +275,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++)) +- if (!c_isdigit(*ptr++)) - return dpkg_put_warn(err, _("version number does not start with digit")); for (; *ptr; ptr++) { - if (!c_isdigit(*ptr) && !c_isalpha(*ptr) && strchr(".-+~:", *ptr) == NULL) @@ -33,6 +33,3 @@ index 453077fd9..f42ea2882 100644 return dpkg_put_warn(err, _("invalid character in revision number")); } - --- -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 93d870443c..916c7dfb00 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 b6c28222276704a1e1a544983e38dfa2f3fb481a 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,28 +10,31 @@ 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 | 53 +++-------------------------------------------- + 1 file changed, 3 insertions(+), 50 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) - static const char * +diff --git a/src/main/script.c b/src/main/script.c +index 017d92efe..181e7c710 100644 +--- a/src/main/script.c ++++ b/src/main/script.c +@@ -97,58 +97,11 @@ static const char * maintscript_pre_exec(struct command *cmd) { + const char *instdir = dpkg_fsys_get_dir(); - const char *admindir = dpkg_db_get_dir(); - 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,18 @@ 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 - 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..35c0c246f6 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 @@ -1,21 +1,20 @@ -From adb6bfd0feeceaf030df0debe3343d7f73e708a0 Mon Sep 17 00:00:00 2001 +From 80ad29d22f8ca4033a6a79a726580fee17bdade9 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Wed, 26 Aug 2015 16:27:45 +0300 -Subject: [PATCH 4/5] The lutimes function doesn't work properly for all - systems. +Subject: [PATCH] The lutimes function doesn't work properly for all systems. 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 7e399f922..ec3b6878f 100644 +--- a/src/main/archives.c ++++ b/src/main/archives.c +@@ -491,8 +491,9 @@ tarobject_set_mtime(struct tar_entry *te, const char *path) if (te->type == TAR_FILETYPE_SYMLINK) { #ifdef HAVE_LUTIMES @@ -26,6 +25,3 @@ index bff5f14..b711013 100644 #endif } else { if (utimes(path, tv)) --- -2.1.4 - 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 d929466b70..8ac646b1a1 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 @@ -1,10 +1,14 @@ -From f8910022dc3ec622272f168cd0022dbdf6dff93a Mon Sep 17 00:00:00 2001 +From 1c9e78dda91ba66fbd8fe02b66b6c603d08d3343 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 30 Dec 2015 23:05:41 +0000 Subject: [PATCH] add musleabi to known target tripets +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit 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> --- @@ -13,10 +17,10 @@ Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> 2 files changed, 2 insertions(+) diff --git a/data/ostable b/data/ostable -index 99c1f889d..be6434271 100644 +index 64f424490..860355774 100644 --- a/data/ostable +++ b/data/ostable -@@ -17,6 +17,7 @@ +@@ -19,6 +19,7 @@ eabi-uclibc-linux linux-uclibceabi linux[^-]*-uclibceabi base-uclibc-linux linux-uclibc linux[^-]*-uclibc eabihf-musl-linux linux-musleabihf linux[^-]*-musleabihf @@ -25,17 +29,14 @@ index 99c1f889d..be6434271 100644 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 +index 7436f8056..82ae3604e 100644 --- a/data/tupletable +++ b/data/tupletable -@@ -8,6 +8,7 @@ +@@ -24,6 +24,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.11.0 - + eabi-gnu-linux-arm armel 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..3d3a4f0bb9 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 @@ -1,4 +1,4 @@ -From 8659eeeeda74d71e12080121f0b13a88cbdda433 Mon Sep 17 00:00:00 2001 +From 6dd80236a91a505b5753bb74e5f1b47330d8b16b 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 @@ -18,22 +18,24 @@ 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 1f0c050ee..92aba9553 100644 +--- a/src/deb/build.c ++++ b/src/deb/build.c +@@ -504,7 +504,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); --- -2.11.0 + if (options->mode) + command_add_args(&cmd, "--mode", options->mode, NULL); 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 d165616a19..cbdf01dbd9 100644 --- a/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch +++ b/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch @@ -1,5 +1,11 @@ -Author: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com> -Date: Wed Apr 8 18:08:14 2015 +0530 +From 1c3a109df54b6092fa85a1fe2b7771e3b959655f Mon Sep 17 00:00:00 2001 +From: "Krishnanjanappa, Jagadeesh" + <jagadeesh.krishnanjanappa@caviumnetworks.com> +Date: Wed, 8 Apr 2015 18:08:14 +0530 +Subject: [PATCH] dpkg: add triplet entry to fix build error for armeb +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit [PATCH] add armeb triplet entry into triplettable. @@ -25,24 +31,19 @@ Upstream-Status: Pending Signed-off-by: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> - --- data/tupletable | 1 + 1 file changed, 1 insertion(+) diff --git a/data/tupletable b/data/tupletable -index b7802bec3..5f500f6ca 100644 +index ae9f2ddb4..7436f8056 100644 --- a/data/tupletable +++ b/data/tupletable -@@ -12,6 +12,7 @@ base-musl-linux-<cpu> musl-linux-<cpu> - ilp32-gnu-linux-arm64 arm64ilp32 +@@ -27,6 +27,7 @@ eabihf-musl-linux-arm musl-linux-armhf + base-musl-linux-<cpu> musl-linux-<cpu> 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.11.0 - - diff --git a/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch b/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch index 4e0d22acbb..df2cd88ca4 100644 --- a/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch +++ b/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch @@ -1,3 +1,8 @@ +From bdf60ebbeb433a80e6cfcbde9d83d89564e79e20 Mon Sep 17 00:00:00 2001 +From: Joe Slater <jslater@windriver.com> +Date: Mon, 26 Aug 2013 23:38:45 +0000 +Subject: [PATCH] dpkg: fix configuration issue for mips64 + configure cannot determine the proper cpu, os, or architecture for mips64, and possibly other arch's because of faulty code added to Arch.pm in the latest @@ -6,16 +11,15 @@ release from upstream. We remove that code. 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 +index 0d352eeb9..4ef5fa307 100644 --- a/scripts/Dpkg/Arch.pm +++ b/scripts/Dpkg/Arch.pm -@@ -323,9 +323,6 @@ sub _load_tupletable() +@@ -326,9 +326,6 @@ sub _load_tupletable() (my $dt = $debtuple) =~ s/<cpu>/$_cpu/; (my $da = $debarch) =~ s/<cpu>/$_cpu/; @@ -25,5 +29,3 @@ index 1720847b8..6345ce3b9 100644 $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 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 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 a7f3cb8f45..e80549d740 100644 --- a/meta/recipes-devtools/dpkg/dpkg/noman.patch +++ b/meta/recipes-devtools/dpkg/dpkg/noman.patch @@ -1,22 +1,22 @@ -Upstream-Status: Inappropriate [disable feature] +From 008ec5150dd086ffa3940cb520f1ca91939f138d Mon Sep 17 00:00:00 2001 +From: Chris Larson <kergoth@openedhand.com> +Date: Tue, 5 Sep 2006 07:24:58 +0000 +Subject: [PATCH] Add dpkg, modified from upstream oe. +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 7186045d4..daca9faf2 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 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..9307725e8b 100644 --- a/meta/recipes-devtools/dpkg/dpkg/remove-tar-no-timestamp.patch +++ b/meta/recipes-devtools/dpkg/dpkg/remove-tar-no-timestamp.patch @@ -1,13 +1,21 @@ -busybox-1.19.4 tar utility doesn't support --warning=no-timestamp +From add92699ca1397205e1d7b46c3ab43de06b9a6c7 Mon Sep 17 00:00:00 2001 +From: Constantin Musca <constantinx.musca@intel.com> +Date: Tue, 28 Aug 2012 17:02:40 +0300 +Subject: [PATCH] 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 8b78a7eab..fd7595808 100644 +--- a/src/deb/extract.c ++++ b/src/deb/extract.c +@@ -338,7 +338,6 @@ extracthalf(const char *debar, const char *dir, command_add_arg(&cmd, "-f"); command_add_arg(&cmd, "-"); diff --git a/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb b/meta/recipes-devtools/dpkg/dpkg_1.22.6.bb index c0c59f1410..3f5f7395e0 100644 --- a/meta/recipes-devtools/dpkg/dpkg_1.18.24.bb +++ b/meta/recipes-devtools/dpkg/dpkg_1.22.6.bb @@ -1,21 +1,22 @@ 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-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 = "b2f9600ead232a2dd3c27f8b52807a9ca5854d17" + +S = "${WORKDIR}/git" |