From 972dcfcdbfe75dcfeb777150c136576cf1a71e99 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 9 Oct 2015 22:59:03 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- meta/recipes-devtools/dpkg/dpkg/arch_pm.patch | 22 +++++ .../dpkg/dpkg/check_snprintf.patch | 34 ++++++++ .../recipes-devtools/dpkg/dpkg/check_version.patch | 28 +++++++ .../dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch | 68 +++++++++++++++ .../dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch | 97 ++++++++++++++++++++++ .../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 ++++ .../dpkg/dpkg/tar-error-code.patch | 55 ++++++++++++ 15 files changed, 603 insertions(+) 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-1.17.4-CVE-2014-0471-CVE-2014-3127.patch create mode 100644 meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.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/tar-error-code.patch (limited to 'meta/recipes-devtools/dpkg/dpkg') 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-1.17.4-CVE-2014-0471-CVE-2014-3127.patch b/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch new file mode 100644 index 0000000000..e59c6661ea --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471-CVE-2014-3127.patch @@ -0,0 +1,68 @@ +dpkg: Security Advisory - CVE-2014-3127 + +commit a12eb58959d0a10584a428f4a3103a49204c410f upstream + +dpkg 1.15.9 on Debian squeeze introduces support for the "C-style +encoded filenames" feature without recognizing that the squeeze patch +program lacks this feature, which triggers an interaction error that +allows remote attackers to conduct directory traversal attacks and +modify files outside of the intended directories via a crafted source +package. + +NOTE: this can be considered a release engineering problem in the +effort to fix CVE-2014-0471. + +Upstream-Status: Backport + +Signed-off-by: Wenlin Kang +Signed-off-by: Wenzong Fan +===================================================== +diff -uarN dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm +--- dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm 2014-06-05 16:32:41.765446564 +0800 ++++ dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm 2014-06-05 16:37:21.461446359 +0800 +@@ -324,31 +324,6 @@ + return $line; + } + +-my %ESCAPE = (( +- 'a' => "\a", +- 'b' => "\b", +- 'f' => "\f", +- 'n' => "\n", +- 'r' => "\r", +- 't' => "\t", +- 'v' => "\cK", +- '\\' => '\\', +- '"' => '"', +-), ( +- map { sprintf('%03o', $_) => chr($_) } (0..255) +-)); +- +-sub _unescape { +- my ($diff, $str) = @_; +- +- if (exists $ESCAPE{$str}) { +- return $ESCAPE{$str}; +- } else { +- error(_g('diff %s patches file with unknown escape sequence \\%s'), +- $diff, $str); +- } +-} +- + # Fetch the header filename ignoring the optional timestamp + sub _fetch_filename { + my ($diff, $header) = @_; +@@ -358,12 +333,7 @@ + + # Is it a C-style string? + if ($header =~ m/^"/) { +- $header =~ m/^"((?:[^\\"]|\\.)*)"/; +- error(_g('diff %s patches file with unbalanced quote'), $diff) +- unless defined $1; +- +- $header = $1; +- $header =~ s/\\([0-3][0-7]{2}|.)/_unescape($diff, $1)/eg; ++ error(_g('diff %s patches file with C-style encoded filename'), $diff); + } else { + # Tab is the official separator, it's always used when + # filename contain spaces. Try it first, otherwise strip on space diff --git a/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch b/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch new file mode 100644 index 0000000000..195d309506 --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/dpkg-1.17.4-CVE-2014-0471.patch @@ -0,0 +1,97 @@ +dpkg: Security Advisory - CVE-2014-0471 + +commit a82651188476841d190c58693f95827d61959b51 upstream + +Directory traversal vulnerability in the unpacking functionality in +dpkg before 1.15.9, 1.16.x before 1.16.13, and 1.17.x before 1.17.8 +allows remote attackers to write arbitrary files via a crafted source +package, related to "C-style filename quoting." + +Upstream-Status: Backport + +Signed-off-by: Wenlin Kang +Signed-off-by: Wenzong Fan +=================================================== +diff -uarN dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm +--- dpkg-1.17.1-org/scripts/Dpkg/Source/Patch.pm 2014-06-05 15:24:07.422446284 +0800 ++++ dpkg-1.17.1/scripts/Dpkg/Source/Patch.pm 2014-06-05 15:41:37.746446314 +0800 +@@ -324,14 +324,53 @@ + return $line; + } + +-# Strip timestamp +-sub _strip_ts { +- my $header = shift; +- +- # Tab is the official separator, it's always used when +- # filename contain spaces. Try it first, otherwise strip on space +- # if there's no tab +- $header =~ s/\s.*// unless ($header =~ s/\t.*//); ++my %ESCAPE = (( ++ 'a' => "\a", ++ 'b' => "\b", ++ 'f' => "\f", ++ 'n' => "\n", ++ 'r' => "\r", ++ 't' => "\t", ++ 'v' => "\cK", ++ '\\' => '\\', ++ '"' => '"', ++), ( ++ map { sprintf('%03o', $_) => chr($_) } (0..255) ++)); ++ ++sub _unescape { ++ my ($diff, $str) = @_; ++ ++ if (exists $ESCAPE{$str}) { ++ return $ESCAPE{$str}; ++ } else { ++ error(_g('diff %s patches file with unknown escape sequence \\%s'), ++ $diff, $str); ++ } ++} ++ ++# Fetch the header filename ignoring the optional timestamp ++sub _fetch_filename { ++ my ($diff, $header) = @_; ++ ++ # Strip any leading spaces. ++ $header =~ s/^\s+//; ++ ++ # Is it a C-style string? ++ if ($header =~ m/^"/) { ++ $header =~ m/^"((?:[^\\"]|\\.)*)"/; ++ error(_g('diff %s patches file with unbalanced quote'), $diff) ++ unless defined $1; ++ ++ $header = $1; ++ $header =~ s/\\([0-3][0-7]{2}|.)/_unescape($diff, $1)/eg; ++ } else { ++ # Tab is the official separator, it's always used when ++ # filename contain spaces. Try it first, otherwise strip on space ++ # if there's no tab ++ $header =~ s/\s.*// unless $header =~ s/\t.*//; ++ } ++ + return $header; + } + +@@ -400,7 +439,7 @@ + unless(s/^--- //) { + error(_g("expected ^--- in line %d of diff `%s'"), $., $diff); + } +- $path{old} = $_ = _strip_ts($_); ++ $path{old} = $_ = _fetch_filename($diff, $_); + $fn{old} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/}; + if (/\.dpkg-orig$/) { + error(_g("diff `%s' patches file with name ending .dpkg-orig"), $diff); +@@ -412,7 +451,7 @@ + unless (s/^\+\+\+ //) { + error(_g("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.); + } +- $path{new} = $_ = _strip_ts($_); ++ $path{new} = $_ = _fetch_filename($diff, $_); + $fn{new} = $_ if $_ ne '/dev/null' and s{^[^/]*/+}{$destdir/}; + + unless (defined $fn{old} or defined $fn{new}) { 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/tar-error-code.patch b/meta/recipes-devtools/dpkg/dpkg/tar-error-code.patch new file mode 100644 index 0000000000..235f878aad --- /dev/null +++ b/meta/recipes-devtools/dpkg/dpkg/tar-error-code.patch @@ -0,0 +1,55 @@ +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). + +Upsteam-Status: Inappropriate +RP 2015/3/27 + +Signed-off-by: Saul Wold + +Index: dpkg-1.17.4/dpkg-deb/build.c +=================================================================== +--- dpkg-1.17.4.orig/dpkg-deb/build.c ++++ dpkg-1.17.4/dpkg-deb/build.c +@@ -443,7 +443,7 @@ do_build(const char *const *argv) + bool subdir; + char *tfbuf; + int arfd; +- int p1[2], p2[2], gzfd; ++ int p1[2], p2[2], gzfd, rc; + pid_t c1, c2; + + /* Decode our arguments. */ +@@ -536,7 +536,9 @@ do_build(const char *const *argv) + } + close(p1[0]); + subproc_wait_check(c2, "gzip -9c", 0); +- subproc_wait_check(c1, "tar -cf", 0); ++ rc = subproc_wait_check(c1, "tar -cf", PROCNOERR); ++ if (rc && rc != 1) ++ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc); + + if (lseek(gzfd, 0, SEEK_SET)) + ohshite(_("failed to rewind temporary file (%s)"), _("control member")); +@@ -619,7 +621,9 @@ do_build(const char *const *argv) + /* All done, clean up wait for tar and gzip to finish their job. */ + close(p1[1]); + subproc_wait_check(c2, _(" from tar -cf"), 0); +- subproc_wait_check(c1, "tar -cf", 0); ++ rc = subproc_wait_check(c1, "tar -cf", PROCNOERR); ++ if (rc && rc != 1) ++ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc); + /* Okay, we have data.tar as well now, add it to the ar wrapper. */ + if (deb_format.major == 2) { + char datamember[16 + 1]; -- cgit v1.2.3-54-g00ecf