diff options
Diffstat (limited to 'poky/meta/recipes-devtools/dpkg/dpkg')
14 files changed, 586 insertions, 0 deletions
diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch new file mode 100644 index 000000000..45c606e69 --- /dev/null +++ b/poky/meta/recipes-devtools/dpkg/dpkg/0001-arch-Add-support-for-riscv64-CPU.patch @@ -0,0 +1,54 @@ +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/poky/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0001-dpkg-Support-muslx32-build.patch new file mode 100644 index 000000000..50e689440 --- /dev/null +++ b/poky/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/poky/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch new file mode 100644 index 000000000..9fe0ca760 --- /dev/null +++ b/poky/meta/recipes-devtools/dpkg/dpkg/0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch @@ -0,0 +1,38 @@ +From b4ea54158c399874e12394ebc91afe98954695e2 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). + +Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> +Signed-off-by: Constantin Musca <constantinx.musca@intel.com> + +Upstream-Status: Inappropriate [embedded specific] +--- + lib/dpkg/parsehelp.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c +index 453077fd9..f42ea2882 100644 +--- a/lib/dpkg/parsehelp.c ++++ b/lib/dpkg/parsehelp.c +@@ -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++) { +- if (!c_isdigit(*ptr) && !c_isalpha(*ptr) && strchr(".-+~:", *ptr) == NULL) ++ if (!c_isdigit(*ptr) && !c_isalpha(*ptr) && strchr(".-+~:_", *ptr) == NULL) + return dpkg_put_warn(err, _("invalid character in version number")); + } + for (ptr = rversion->revision; *ptr; ptr++) { +- if (!c_isdigit(*ptr) && !c_isalpha(*ptr) && strchr(".+~", *ptr) == NULL) ++ if (!c_isdigit(*ptr) && !c_isalpha(*ptr) && strchr(".-+~_", *ptr) == NULL) + return dpkg_put_warn(err, _("invalid character in revision number")); + } + + +-- +2.11.0 diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch new file mode 100644 index 000000000..93d870443 --- /dev/null +++ b/poky/meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch @@ -0,0 +1,75 @@ +From 24229971492515b64c81e8c6392e5dfbdc22b44c 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 + sysroot and don't expect a chroot. This matches up our system expectations + with what dpkg does. + +Upstream-Status: Inappropriate [OE Specific] + +RP 2011/12/07 +ALIMON 2016/05/26 +ALIMON 2017/02/21 +--- + src/script.c | 44 +++----------------------------------------- + 1 file changed, 3 insertions(+), 41 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 * + maintscript_pre_exec(struct command *cmd) + { +- const char *admindir = dpkg_db_get_dir(); +- const char *changedir; +- size_t instdirlen = strlen(instdir); +- +- if (instdirlen > 0 && fc_script_chrootless) +- changedir = instdir; +- else +- changedir = "/"; +- +- if (instdirlen > 0 && !fc_script_chrootless) { +- 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) +- ohshite(_("unable to setenv for subprocesses")); +- if (setenv("DPKG_ROOT", "", 1) < 0) +- ohshite(_("unable to setenv for subprocesses")); +- +- if (chroot(instdir)) +- 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)) +- ohshite(_("failed to chdir to '%.255s'"), changedir); +- if (debug_has_flag(dbg_scripts)) { +- struct varbuf args = VARBUF_INIT; +- const char **argv = cmd->argv; +- +- while (*++argv) { +- varbuf_add_char(&args, ' '); +- varbuf_add_str(&args, *argv); +- } +- varbuf_end_str(&args); +- debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename, +- args.buf); +- varbuf_destroy(&args); +- } +- if (instdirlen == 0 || fc_script_chrootless) +- return cmd->filename; +- +- assert(strlen(cmd->filename) >= instdirlen); +- return cmd->filename + instdirlen; ++ return cmd->filename; + } + + /** +-- +2.1.4 + diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch new file mode 100644 index 000000000..56c85c773 --- /dev/null +++ b/poky/meta/recipes-devtools/dpkg/dpkg/0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch @@ -0,0 +1,31 @@ +From adb6bfd0feeceaf030df0debe3343d7f73e708a0 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. + +Signed-off-by: Constantin Musca <constantinx.musca@intel.com> + +Upstream-Status: Inappropriate [embedded specific] +--- + src/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) + + if (te->type == TAR_FILETYPE_SYMLINK) { + #ifdef HAVE_LUTIMES +- if (lutimes(path, tv) && errno != ENOSYS) ++/* if (lutimes(path, tv) && errno != ENOSYS) + ohshite(_("error setting timestamps of '%.255s'"), path); ++*/ + #endif + } else { + if (utimes(path, tv)) +-- +2.1.4 + diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch new file mode 100644 index 000000000..96e96f277 --- /dev/null +++ b/poky/meta/recipes-devtools/dpkg/dpkg/0005-dpkg-compiler.m4-remove-Wvla.patch @@ -0,0 +1,36 @@ +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/poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch new file mode 100644 index 000000000..8797ea55c --- /dev/null +++ b/poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch @@ -0,0 +1,42 @@ +From f8910022dc3ec622272f168cd0022dbdf6dff93a 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 + +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> +--- + data/ostable | 1 + + data/tupletable | 1 + + 2 files changed, 2 insertions(+) + +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.11.0 + diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch b/poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch new file mode 100644 index 000000000..1b985df0f --- /dev/null +++ b/poky/meta/recipes-devtools/dpkg/dpkg/0007-dpkg-deb-build.c-Remove-usage-of-clamp-mtime-in-tar.patch @@ -0,0 +1,39 @@ +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 +--- + 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 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, + + 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 diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch b/poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch new file mode 100644 index 000000000..d165616a1 --- /dev/null +++ b/poky/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch @@ -0,0 +1,48 @@ +Author: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com> +Date: Wed Apr 8 18:08:14 2015 +0530 + +[PATCH] add armeb triplet entry into triplettable. + +Cross-compling dpkg application for armeb fails with below error +during configure task, + +(snip) + configure:23141: checking dpkg cpu type + configure:23148: result: armeb + configure:23150: WARNING: armeb not found in cputable + configure:23162: checking dpkg operating system type + configure:23169: result: linux-gnueabi + configure:23171: WARNING: linux-gnueabi not found in ostable + configure:23183: checking dpkg architecture name + configure:23189: error: cannot determine host dpkg architecture +-- CUT -- + +the required combination of "gnueabi-linux-armeb" was not found in +the triplettable file thereby returning dpkg_arch as +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> + +--- + data/tupletable | 1 + + 1 file changed, 1 insertion(+) + +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.11.0 + + diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch b/poky/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch new file mode 100644 index 000000000..4e0d22acb --- /dev/null +++ b/poky/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch @@ -0,0 +1,29 @@ +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 +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 +--- a/scripts/Dpkg/Arch.pm ++++ b/scripts/Dpkg/Arch.pm +@@ -323,9 +323,6 @@ sub _load_tupletable() + (my $dt = $debtuple) =~ s/<cpu>/$_cpu/; + (my $da = $debarch) =~ s/<cpu>/$_cpu/; + +- next if exists $debarch_to_debtuple{$da} +- or exists $debtuple_to_debarch{$dt}; +- + $debarch_to_debtuple{$da} = $dt; + $debtuple_to_debarch{$dt} = $da; + } +-- +2.11.0 diff --git a/poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service b/poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service new file mode 100644 index 000000000..9a248ccb4 --- /dev/null +++ b/poky/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service @@ -0,0 +1,17 @@ +[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/poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch b/poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch new file mode 100644 index 000000000..d48386647 --- /dev/null +++ b/poky/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch @@ -0,0 +1,97 @@ +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/poky/meta/recipes-devtools/dpkg/dpkg/noman.patch b/poky/meta/recipes-devtools/dpkg/dpkg/noman.patch new file mode 100644 index 000000000..a7f3cb8f4 --- /dev/null +++ b/poky/meta/recipes-devtools/dpkg/dpkg/noman.patch @@ -0,0 +1,22 @@ +Upstream-Status: Inappropriate [disable feature] + +--- + 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/poky/meta/recipes-devtools/dpkg/dpkg/remove-tar-no-timestamp.patch b/poky/meta/recipes-devtools/dpkg/dpkg/remove-tar-no-timestamp.patch new file mode 100644 index 000000000..4f408ff77 --- /dev/null +++ b/poky/meta/recipes-devtools/dpkg/dpkg/remove-tar-no-timestamp.patch @@ -0,0 +1,17 @@ +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 + + command_add_arg(&cmd, "-f"); + command_add_arg(&cmd, "-"); +- command_add_arg(&cmd, "--warning=no-timestamp"); + + m_dup2(p2[0],0); + close(p2[0]); |