From c527fd1f14c27855a37f2e8ac5346ce8d940ced2 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 16 Oct 2014 03:05:19 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- meta/recipes-devtools/dpkg/dpkg.inc | 81 ++++++++++++++++++++ meta/recipes-devtools/dpkg/dpkg/arch_pm.patch | 22 ++++++ .../dpkg/dpkg/check_snprintf.patch | 34 +++++++++ .../recipes-devtools/dpkg/dpkg/check_version.patch | 28 +++++++ .../dpkg/dpkg/dpkg-configure.service | 17 +++++ .../dpkg/dpkg/fix-abs-redefine.patch | 40 ++++++++++ .../dpkg/dpkg/fix-timestamps.patch | 21 ++++++ .../dpkg/dpkg/glibc2.5-sync_file_range.patch | 86 ++++++++++++++++++++++ .../dpkg/dpkg/ignore_extra_fields.patch | 21 ++++++ .../dpkg/dpkg/no-vla-warning.patch | 32 ++++++++ meta/recipes-devtools/dpkg/dpkg/noman.patch | 14 ++++ meta/recipes-devtools/dpkg/dpkg/preinst.patch | 51 +++++++++++++ .../dpkg/dpkg/remove-tar-no-timestamp.patch | 17 +++++ meta/recipes-devtools/dpkg/dpkg_1.17.4.bb | 19 +++++ 14 files changed, 483 insertions(+) create mode 100644 meta/recipes-devtools/dpkg/dpkg.inc create mode 100644 meta/recipes-devtools/dpkg/dpkg/arch_pm.patch create mode 100644 meta/recipes-devtools/dpkg/dpkg/check_snprintf.patch create mode 100644 meta/recipes-devtools/dpkg/dpkg/check_version.patch create mode 100644 meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service create mode 100644 meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch create mode 100644 meta/recipes-devtools/dpkg/dpkg/fix-timestamps.patch create mode 100644 meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch create mode 100644 meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch create mode 100644 meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch create mode 100644 meta/recipes-devtools/dpkg/dpkg/noman.patch create mode 100644 meta/recipes-devtools/dpkg/dpkg/preinst.patch create mode 100644 meta/recipes-devtools/dpkg/dpkg/remove-tar-no-timestamp.patch create mode 100644 meta/recipes-devtools/dpkg/dpkg_1.17.4.bb (limited to 'meta/recipes-devtools/dpkg') diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc new file mode 100644 index 0000000000..eef7ce9d40 --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg.inc @@ -0,0 +1,81 @@ +SUMMARY = "Package maintenance system from Debian" +LICENSE = "GPLv2.0+" +SECTION = "base" + +SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz \ + file://ignore_extra_fields.patch" + +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" +RDEPENDS_${PN}_class-native = "xz-native" + +S = "${WORKDIR}/${BPN}-${PV}" + +PARALLEL_MAKE = "" + +inherit autotools gettext perlnative pkgconfig systemd + +python () { + if not oe.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" + +EXTRA_OECONF = "\ + --disable-dselect \ + --enable-start-stop-daemon \ + --with-zlib \ + --with-bz2 \ + --without-liblzma \ + --without-selinux \ + " + +do_configure () { + echo >> ${S}/m4/compiler.m4 + sed -i -e 's#PERL_LIBDIR=.*$#PERL_LIBDIR="${libdir}/perl"#' ${S}/configure + autotools_do_configure +} + +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-* + else + mv ${D}${bindir}/update-alternatives ${D}${sbindir} + sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-* + fi + + if ${@base_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" +PROV_class-native = "" + +PROVIDES += "${PROV}" + +PACKAGES =+ "update-alternatives-dpkg" +FILES_update-alternatives-dpkg = "${sbindir}/update-alternatives ${localstatedir}/lib/dpkg/alternatives ${sysconfdir}/alternatives" +RPROVIDES_update-alternatives-dpkg += "update-alternatives" + +PACKAGES += "${PN}-perl" +FILES_${PN}-perl = "${libdir}/perl" + +BBCLASSEXTEND = "native" + + diff --git a/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch b/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch new file mode 100644 index 0000000000..cad4c0f0a1 --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/arch_pm.patch @@ -0,0 +1,22 @@ +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 + + +--- a/scripts/Dpkg/Arch.pm ++++ b/scripts/Dpkg/Arch.pm +@@ -233,9 +233,6 @@ sub read_triplettable() + (my $dt = $debtriplet) =~ s//$_cpu/; + (my $da = $debarch) =~ s//$_cpu/; + +- next if exists $debarch_to_debtriplet{$da} +- or exists $debtriplet_to_debarch{$dt}; +- + $debarch_to_debtriplet{$da} = $dt; + $debtriplet_to_debarch{$dt} = $da; + } diff --git a/meta/recipes-devtools/dpkg/dpkg/check_snprintf.patch b/meta/recipes-devtools/dpkg/dpkg/check_snprintf.patch new file mode 100644 index 0000000000..56eb0ca5be --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/check_snprintf.patch @@ -0,0 +1,34 @@ +Upstream-Status: Inappropriate [configuration] + +diff -ruN dpkg-1.15.8.5-orig/m4/dpkg-funcs.m4 dpkg-1.15.8.5/m4/dpkg-funcs.m4 +--- dpkg-1.15.8.5-orig/m4/dpkg-funcs.m4 2010-10-08 12:27:15.082131611 +0800 ++++ dpkg-1.15.8.5/m4/dpkg-funcs.m4 2010-10-08 13:56:50.074284346 +0800 +@@ -27,7 +27,7 @@ + # ----------------------- + # Define HAVE_C99_SNPRINTF if we have C99 snprintf family semantics + AC_DEFUN([DPKG_FUNC_C99_SNPRINTF], +-[AC_CACHE_CHECK([for C99 snprintf functions], [dpkg_cv_c99_snprintf], ++[AC_CACHE_CHECK([for C99 snprintf functions], [ac_cv_func_snprintf_c99], + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include + #include +@@ -58,14 +58,14 @@ + return 0; + } + ]])], +- [dpkg_cv_c99_snprintf=yes], +- [dpkg_cv_c99_snprintf=no], +- [dpkg_cv_c99_snprintf=no])]) +-AS_IF([test "x$dpkg_cv_c99_snprintf" = "xyes"], ++ [ac_cv_func_snprintf_c99=yes], ++ [ac_cv_func_snprintf_c99=no], ++ [ac_cv_func_snprintf_c99=no])]) ++AS_IF([test "x$ac_cv_func_snprintf_c99" = "xyes"], + [AC_DEFINE([HAVE_C99_SNPRINTF], 1, + [Define to 1 if the 'snprintf' family is C99 conformant])], + ) +-AM_CONDITIONAL(HAVE_C99_SNPRINTF, [test "x$dpkg_cv_c99_snprintf" = "xyes"]) ++AM_CONDITIONAL(HAVE_C99_SNPRINTF, [test "x$ac_cv_func_snprintf_c99" = "xyes"]) + ])# DPKG_FUNC_C99_SNPRINTF + + # DPKG_MMAP diff --git a/meta/recipes-devtools/dpkg/dpkg/check_version.patch b/meta/recipes-devtools/dpkg/dpkg/check_version.patch new file mode 100644 index 0000000000..3175731522 --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/check_version.patch @@ -0,0 +1,28 @@ +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 +Signed-off-by: Constantin Musca + +Upstream-Status: Inappropriate [embedded specific] + +Index: dpkg-1.16.8/lib/dpkg/parsehelp.c +=================================================================== +--- dpkg-1.16.8.orig/lib/dpkg/parsehelp.c ++++ dpkg-1.16.8/lib/dpkg/parsehelp.c +@@ -258,14 +258,12 @@ parseversion(struct dpkg_version *rversi + + /* XXX: Would be faster to use something like cisversion and cisrevision. */ + ptr = rversion->version; +- if (*ptr && !cisdigit(*ptr++)) +- return dpkg_put_warn(err, _("version number does not start with digit")); + for (; *ptr; ptr++) { +- if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~:", *ptr) == NULL) ++ if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~:_", *ptr) == NULL) + return dpkg_put_warn(err, _("invalid character in version number")); + } + for (ptr = rversion->revision; *ptr; ptr++) { +- if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".+~", *ptr) == NULL) ++ if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~_", *ptr) == NULL) + return dpkg_put_warn(err, _("invalid character in revision number")); + } diff --git a/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service b/meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service new file mode 100644 index 0000000000..f0b0789e4e --- /dev/null +++ b/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 disable dpkg-configure.service +StandardOutput=syslog +RemainAfterExit=No + +[Install] +WantedBy=basic.target +WantedBy=sysinit.target diff --git a/meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch b/meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch new file mode 100644 index 0000000000..e73311c294 --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch @@ -0,0 +1,40 @@ +Upstream-Status: Pending + +dpkg defines: +#define DPKG_BEGIN_DECLS extern "C" { + +That makes header cstdlib included in a extern "C" block which is not supported +by gcc 4.8. It fails on Fedora 19: + +/usr/include/c++/4.8.1/cstdlib: In function ‘long long int std::abs(long long int)’: +/usr/include/c++/4.8.1/cstdlib:174:20: error: declaration of C function ‘long long int std::abs(long long int)’ conflicts with + abs(long long __x) { return __builtin_llabs (__x); } + ^ +/usr/include/c++/4.8.1/cstdlib:166:3: error: previous declaration ‘long int std::abs(long int)’ here + abs(long __i) { return __builtin_labs(__i); } + ^ + +Move include gettext.h out of the extern "C" block to fix this issue. + +Signed-off-by: Kai Kang + +--- dpkg-1.17.1/lib/dpkg/i18n.h.orig 2013-08-13 17:31:28.870935573 +0800 ++++ dpkg-1.17.1/lib/dpkg/i18n.h 2013-08-13 17:31:37.893065249 +0800 +@@ -23,8 +23,6 @@ + + #include + +-DPKG_BEGIN_DECLS +- + /** + * @defgroup i18n Internationalization support + * @ingroup dpkg-internal +@@ -33,6 +31,8 @@ + + #include + ++DPKG_BEGIN_DECLS ++ + /* We need to include this because pgettext() uses LC_MESSAGES, but libintl.h + * which gets pulled by gettext.h only includes it if building optimized. */ + #include diff --git a/meta/recipes-devtools/dpkg/dpkg/fix-timestamps.patch b/meta/recipes-devtools/dpkg/dpkg/fix-timestamps.patch new file mode 100644 index 0000000000..d2cabbe065 --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/fix-timestamps.patch @@ -0,0 +1,21 @@ +The lutimes function doesn't work properly for all systems. + +Signed-off-by: Constantin Musca + +Upstream-Status: Inappropriate [embedded specific] + +Index: dpkg-1.16.8/src/archives.c +=================================================================== +--- dpkg-1.16.8.orig/src/archives.c ++++ dpkg-1.16.8/src/archives.c +@@ -440,8 +440,10 @@ tarobject_set_mtime(struct tar_entry *te + + if (te->type == tar_filetype_symlink) { + #ifdef HAVE_LUTIMES ++/* + if (lutimes(path, tv) && errno != ENOSYS) + ohshite(_("error setting timestamps of `%.255s'"), path); ++*/ + #endif + } else { + if (utimes(path, tv)) 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 new file mode 100644 index 0000000000..d56b8a69a3 --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch @@ -0,0 +1,86 @@ +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 +Signed-off-by: Lei Liu +--- + 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/ignore_extra_fields.patch b/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch new file mode 100644 index 0000000000..4e3eb97ed8 --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch @@ -0,0 +1,21 @@ +Upstream-Status: Inappropriate [workaround] + +Index: dpkg-1.16.8/dpkg-deb/build.c +=================================================================== +--- dpkg-1.16.8.orig/dpkg-deb/build.c ++++ dpkg-1.16.8/dpkg-deb/build.c +@@ -340,13 +340,13 @@ check_new_pkg(const char *dir) + if (pkg->priority == pri_other) + warning(_("'%s' contains user-defined Priority value '%s'"), + controlfile, pkg->otherpriority); +- for (field = pkg->available.arbs; field; field = field->next) { ++ /*for (field = pkg->available.arbs; field; field = field->next) { + if (known_arbitrary_field(field)) + continue; + + warning(_("'%s' contains user-defined field '%s'"), controlfile, + field->name); +- } ++ }*/ + + free(controlfile); diff --git a/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch b/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch new file mode 100644 index 0000000000..0e57dbc7fc --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch @@ -0,0 +1,32 @@ +From e94474d805377d67c8b09664a602f20969e12b8a Mon Sep 17 00:00:00 2001 +From: Robert Yang +Date: Thu, 23 Jan 2014 04:17:23 -0500 +Subject: [PATCH] dpkg-compiler.m4: remove -Wvla + +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 +Signed-off-by: Robert Yang +--- + m4/dpkg-compiler.m4 | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/m4/dpkg-compiler.m4 b/m4/dpkg-compiler.m4 +index f1c760b..500b5ad 100644 +--- a/m4/dpkg-compiler.m4 ++++ b/m4/dpkg-compiler.m4 +@@ -72,7 +72,6 @@ if test "x$enable_compiler_warnings" = "xyes"; then + DPKG_WARNING_ALL([-Wformat-security]) + DPKG_WARNING_ALL([-Wpointer-arith]) + DPKG_WARNING_ALL([-Wlogical-op]) +- DPKG_WARNING_ALL([-Wvla]) + DPKG_WARNING_ALL([-Winit-self]) + DPKG_WARNING_ALL([-Wwrite-strings]) + DPKG_WARNING_ALL([-Wcast-align]) +-- +1.7.10.4 + diff --git a/meta/recipes-devtools/dpkg/dpkg/noman.patch b/meta/recipes-devtools/dpkg/dpkg/noman.patch new file mode 100644 index 0000000000..d30c15018a --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/noman.patch @@ -0,0 +1,14 @@ +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 \ + $(MAYBE_DSELECT) \ + scripts \ +- po \ +- man ++ po + + ACLOCAL_AMFLAGS = -I m4 diff --git a/meta/recipes-devtools/dpkg/dpkg/preinst.patch b/meta/recipes-devtools/dpkg/dpkg/preinst.patch new file mode 100644 index 0000000000..0549121ef1 --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/preinst.patch @@ -0,0 +1,51 @@ +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 + +Index: dpkg-1.17.1/src/script.c +=================================================================== +--- dpkg-1.17.1.orig/src/script.c ++++ dpkg-1.17.1/src/script.c +@@ -111,36 +111,9 @@ preexecscript(struct command *cmd) + size_t instdirl = strlen(instdir); + + if (*instdir) { +- if (strncmp(admindir, instdir, instdirl) != 0) +- ohshit(_("admindir must be inside instdir for dpkg to work properly")); +- if (setenv("DPKG_ADMINDIR", admindir + instdirl, 1) < 0) +- ohshite(_("unable to setenv for subprocesses")); +- +- if (chroot(instdir)) +- ohshite(_("failed to chroot to `%.250s'"), instdir); +- } +- /* Switch to a known good directory to give the maintainer script +- * a saner environment, also needed after the chroot(). */ +- if (chdir("/")) +- ohshite(_("failed to chdir to `%.255s'"), "/"); +- 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); ++ setenv("D", instdir, 1); + } +- if (!instdirl) +- return cmd->filename; +- +- assert(strlen(cmd->filename) >= instdirl); +- return cmd->filename + instdirl; ++ return cmd->filename; + } + + /** diff --git a/meta/recipes-devtools/dpkg/dpkg/remove-tar-no-timestamp.patch b/meta/recipes-devtools/dpkg/dpkg/remove-tar-no-timestamp.patch new file mode 100644 index 0000000000..4f408ff777 --- /dev/null +++ b/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 + +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]); diff --git a/meta/recipes-devtools/dpkg/dpkg_1.17.4.bb b/meta/recipes-devtools/dpkg/dpkg_1.17.4.bb new file mode 100644 index 0000000000..5507352a27 --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg_1.17.4.bb @@ -0,0 +1,19 @@ +require dpkg.inc +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +SRC_URI += "file://noman.patch \ + file://check_snprintf.patch \ + file://check_version.patch \ + file://preinst.patch \ + file://fix-timestamps.patch \ + file://remove-tar-no-timestamp.patch \ + file://fix-abs-redefine.patch \ + file://arch_pm.patch \ + file://dpkg-configure.service \ + file://glibc2.5-sync_file_range.patch \ + file://no-vla-warning.patch \ + " + +SRC_URI[md5sum] = "cc25086e1e3bd9512a95f14cfe9002e1" +SRC_URI[sha256sum] = "01cdc81c33e77c3d7c40df17e19171794542be7cf12e411381ffcaa8f87b1854" + -- cgit v1.2.3-54-g00ecf