summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/dpkg/dpkg
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/dpkg/dpkg')
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/arch_pm.patch22
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/check_snprintf.patch34
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/check_version.patch28
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/dpkg-configure.service17
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch40
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/fix-timestamps.patch21
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/glibc2.5-sync_file_range.patch86
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/ignore_extra_fields.patch21
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch32
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/noman.patch14
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/preinst.patch51
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/remove-tar-no-timestamp.patch17
12 files changed, 383 insertions, 0 deletions
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 @@
1configure cannot determine the proper cpu, os, or
2architecture for mips64, and possibly other arch's
3because of faulty code added to Arch.pm in the latest
4release from upstream. We remove that code.
5
6Upstream-Status: Pending
7
8Signed-off-by: Joe Slater <jslater@windriver.com>
9
10
11--- a/scripts/Dpkg/Arch.pm
12+++ b/scripts/Dpkg/Arch.pm
13@@ -233,9 +233,6 @@ sub read_triplettable()
14 (my $dt = $debtriplet) =~ s/<cpu>/$_cpu/;
15 (my $da = $debarch) =~ s/<cpu>/$_cpu/;
16
17- next if exists $debarch_to_debtriplet{$da}
18- or exists $debtriplet_to_debarch{$dt};
19-
20 $debarch_to_debtriplet{$da} = $dt;
21 $debtriplet_to_debarch{$dt} = $da;
22 }
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 @@
1Upstream-Status: Inappropriate [configuration]
2
3diff -ruN dpkg-1.15.8.5-orig/m4/dpkg-funcs.m4 dpkg-1.15.8.5/m4/dpkg-funcs.m4
4--- dpkg-1.15.8.5-orig/m4/dpkg-funcs.m4 2010-10-08 12:27:15.082131611 +0800
5+++ dpkg-1.15.8.5/m4/dpkg-funcs.m4 2010-10-08 13:56:50.074284346 +0800
6@@ -27,7 +27,7 @@
7 # -----------------------
8 # Define HAVE_C99_SNPRINTF if we have C99 snprintf family semantics
9 AC_DEFUN([DPKG_FUNC_C99_SNPRINTF],
10-[AC_CACHE_CHECK([for C99 snprintf functions], [dpkg_cv_c99_snprintf],
11+[AC_CACHE_CHECK([for C99 snprintf functions], [ac_cv_func_snprintf_c99],
12 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
13 #include <stdarg.h>
14 #include <stdio.h>
15@@ -58,14 +58,14 @@
16 return 0;
17 }
18 ]])],
19- [dpkg_cv_c99_snprintf=yes],
20- [dpkg_cv_c99_snprintf=no],
21- [dpkg_cv_c99_snprintf=no])])
22-AS_IF([test "x$dpkg_cv_c99_snprintf" = "xyes"],
23+ [ac_cv_func_snprintf_c99=yes],
24+ [ac_cv_func_snprintf_c99=no],
25+ [ac_cv_func_snprintf_c99=no])])
26+AS_IF([test "x$ac_cv_func_snprintf_c99" = "xyes"],
27 [AC_DEFINE([HAVE_C99_SNPRINTF], 1,
28 [Define to 1 if the 'snprintf' family is C99 conformant])],
29 )
30-AM_CONDITIONAL(HAVE_C99_SNPRINTF, [test "x$dpkg_cv_c99_snprintf" = "xyes"])
31+AM_CONDITIONAL(HAVE_C99_SNPRINTF, [test "x$ac_cv_func_snprintf_c99" = "xyes"])
32 ])# DPKG_FUNC_C99_SNPRINTF
33
34 # 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 @@
1Adapt to linux-wrs kernel version, which has character '_' inside.
2Remove the first-char-digit-check (as the 1.15.8.5 version does).
3
4Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
5Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
6
7Upstream-Status: Inappropriate [embedded specific]
8
9Index: dpkg-1.16.8/lib/dpkg/parsehelp.c
10===================================================================
11--- dpkg-1.16.8.orig/lib/dpkg/parsehelp.c
12+++ dpkg-1.16.8/lib/dpkg/parsehelp.c
13@@ -258,14 +258,12 @@ parseversion(struct dpkg_version *rversi
14
15 /* XXX: Would be faster to use something like cisversion and cisrevision. */
16 ptr = rversion->version;
17- if (*ptr && !cisdigit(*ptr++))
18- return dpkg_put_warn(err, _("version number does not start with digit"));
19 for (; *ptr; ptr++) {
20- if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~:", *ptr) == NULL)
21+ if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~:_", *ptr) == NULL)
22 return dpkg_put_warn(err, _("invalid character in version number"));
23 }
24 for (ptr = rversion->revision; *ptr; ptr++) {
25- if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".+~", *ptr) == NULL)
26+ if (!cisdigit(*ptr) && !cisalpha(*ptr) && strchr(".-+~_", *ptr) == NULL)
27 return dpkg_put_warn(err, _("invalid character in revision number"));
28 }
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 @@
1[Unit]
2Description=dpkg first boot configure
3DefaultDependencies=no
4After=systemd-remount-fs.service systemd-tmpfiles-setup.service tmp.mount
5Before=sysinit.target
6
7[Service]
8Type=oneshot
9EnvironmentFile=-@SYSCONFDIR@/default/postinst
10ExecStart=-@BASE_BINDIR@/sh -c " if [ $POSTINST_LOGGING = '1' ]; then @BINDIR@/dpkg --configure -a > $LOGFILE 2>&1; else @BINDIR@/dpkg --configure -a; fi"
11ExecStartPost=@BASE_BINDIR@/systemctl disable dpkg-configure.service
12StandardOutput=syslog
13RemainAfterExit=No
14
15[Install]
16WantedBy=basic.target
17WantedBy=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 @@
1Upstream-Status: Pending
2
3dpkg defines:
4#define DPKG_BEGIN_DECLS extern "C" {
5
6That makes header cstdlib included in a extern "C" block which is not supported
7by gcc 4.8. It fails on Fedora 19:
8
9/usr/include/c++/4.8.1/cstdlib: In function ‘long long int std::abs(long long int)’:
10/usr/include/c++/4.8.1/cstdlib:174:20: error: declaration of C function ‘long long int std::abs(long long int)’ conflicts with
11 abs(long long __x) { return __builtin_llabs (__x); }
12 ^
13/usr/include/c++/4.8.1/cstdlib:166:3: error: previous declaration ‘long int std::abs(long int)’ here
14 abs(long __i) { return __builtin_labs(__i); }
15 ^
16
17Move include gettext.h out of the extern "C" block to fix this issue.
18
19Signed-off-by: Kai Kang <kai.kang@windriver.com>
20
21--- dpkg-1.17.1/lib/dpkg/i18n.h.orig 2013-08-13 17:31:28.870935573 +0800
22+++ dpkg-1.17.1/lib/dpkg/i18n.h 2013-08-13 17:31:37.893065249 +0800
23@@ -23,8 +23,6 @@
24
25 #include <dpkg/macros.h>
26
27-DPKG_BEGIN_DECLS
28-
29 /**
30 * @defgroup i18n Internationalization support
31 * @ingroup dpkg-internal
32@@ -33,6 +31,8 @@
33
34 #include <gettext.h>
35
36+DPKG_BEGIN_DECLS
37+
38 /* We need to include this because pgettext() uses LC_MESSAGES, but libintl.h
39 * which gets pulled by gettext.h only includes it if building optimized. */
40 #include <locale.h>
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 @@
1The lutimes function doesn't work properly for all systems.
2
3Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
4
5Upstream-Status: Inappropriate [embedded specific]
6
7Index: dpkg-1.16.8/src/archives.c
8===================================================================
9--- dpkg-1.16.8.orig/src/archives.c
10+++ dpkg-1.16.8/src/archives.c
11@@ -440,8 +440,10 @@ tarobject_set_mtime(struct tar_entry *te
12
13 if (te->type == tar_filetype_symlink) {
14 #ifdef HAVE_LUTIMES
15+/*
16 if (lutimes(path, tv) && errno != ENOSYS)
17 ohshite(_("error setting timestamps of `%.255s'"), path);
18+*/
19 #endif
20 } else {
21 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 @@
1CentOS 5.8 kernels and headers support the sync_file_range() system call,
2but glibc 2.5 doesn't provide the syscall stub. It appears that this
3problem is known but will never be fixed:
4
5 https://bugzilla.redhat.com/show_bug.cgi?id=518581
6
7 Bug 518581 - [RHEL5] glibc misses sync_file_range syscall interface
8
9 Status: CLOSED CANTFIX
10 Last Closed: 2009-11-22 22:19:55
11
12 Kirby Zhou 2009-08-20 23:37:55 EDT
13
14 Description of problem:
15
16 glibc misses sync_file_range syscall interface. The header file and
17 man page both say 'sync_file_range' should exist. From man page,
18 sync_file_range should exist sinc kernel-2.6.17
19
20 Andreas Schwab 2009-08-21 03:24:24 EDT
21
22 It has only been added to glibc 2.6, and cannot be backported due to
23 ABI breakage. You can always fall back to syscall(3).
24
25 Ulrich Drepper 2009-11-22 22:19:55 EST
26
27 As comment #1 says, no chance to backport this.
28
29 See the syscall man page for instructions.
30
31 Jon E 2010-03-19 10:32:37 EDT
32
33 then why document it if it's broken and you're not going to fix it?
34 .. might want to FTFM over at sync_file_range(2) - in the meantime -
35 borrowing from glibc 2.6 .. any thoughts on this implementation for a
36 hacky workaround for those still on your "ancient releases" .. (eg:
37 RHEL5.3)?:
38
39 #ifdef ULI_WONT_FIX_THIS_IN_GLIBC2.5
40 #define NR_sync_file_range 277
41 int sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
42 {
43 return syscall (NR_sync_file_range, fd,
44 __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
45 __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
46 flags);
47 }
48 #endif
49
50 assuming of course that you're on an x86_64 and include/asm-
51 x86_64/unistd.h has the correct entry
52
53 (fwiw - fio is starting to use this now)
54
55Rather than attempting to provide an implementation using syscall(),
56we take the more conservative route and ignore header support for
57sync_file_range() flags when the glibc version is <= 2.5.
58
59Upstream-Status: Inappropriate [everyone else builds on newer hosts :-)]
60
61Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
62Signed-off-by: Lei Liu <lei.liu2@windriver.com>
63---
64 src/archives.c | 4 ++--
65 1 file changed, 2 insertions(+), 2 deletions(-)
66
67--- a/src/archives.c
68+++ b/src/archives.c
69@@ -75,7 +75,7 @@
70 /* Ignore the return code as it should be considered equivalent to an
71 * asynchronous hint for the kernel, we are doing an fsync() later on
72 * anyway. */
73-#if defined(SYNC_FILE_RANGE_WRITE)
74+#if defined(SYNC_FILE_RANGE_WRITE) && __GLIBC_PREREQ(2, 6)
75 sync_file_range(fd, 0, 0, SYNC_FILE_RANGE_WRITE);
76 #elif defined(HAVE_POSIX_FADVISE)
77 posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED);
78@@ -1179,7 +1179,7 @@
79 return 0;
80 }
81
82-#if defined(SYNC_FILE_RANGE_WAIT_BEFORE)
83+#if defined(SYNC_FILE_RANGE_WAIT_BEFORE) && __GLIBC_PREREQ(2, 6)
84 static void
85 tar_writeback_barrier(struct fileinlist *files, struct pkginfo *pkg)
86 {
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 @@
1Upstream-Status: Inappropriate [workaround]
2
3Index: dpkg-1.16.8/dpkg-deb/build.c
4===================================================================
5--- dpkg-1.16.8.orig/dpkg-deb/build.c
6+++ dpkg-1.16.8/dpkg-deb/build.c
7@@ -340,13 +340,13 @@ check_new_pkg(const char *dir)
8 if (pkg->priority == pri_other)
9 warning(_("'%s' contains user-defined Priority value '%s'"),
10 controlfile, pkg->otherpriority);
11- for (field = pkg->available.arbs; field; field = field->next) {
12+ /*for (field = pkg->available.arbs; field; field = field->next) {
13 if (known_arbitrary_field(field))
14 continue;
15
16 warning(_("'%s' contains user-defined field '%s'"), controlfile,
17 field->name);
18- }
19+ }*/
20
21 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 @@
1From e94474d805377d67c8b09664a602f20969e12b8a Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Thu, 23 Jan 2014 04:17:23 -0500
4Subject: [PATCH] dpkg-compiler.m4: remove -Wvla
5
6Remove the -Wvla flag from the set of compiler warning flags, since gcc
7on old host systems such as CentOS 5.8 doesn't support it, and it
8causes a build error for dpkg-native.
9
10Upstream-Status: Pending
11
12Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
13Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
14---
15 m4/dpkg-compiler.m4 | 1 -
16 1 file changed, 1 deletion(-)
17
18diff --git a/m4/dpkg-compiler.m4 b/m4/dpkg-compiler.m4
19index f1c760b..500b5ad 100644
20--- a/m4/dpkg-compiler.m4
21+++ b/m4/dpkg-compiler.m4
22@@ -72,7 +72,6 @@ if test "x$enable_compiler_warnings" = "xyes"; then
23 DPKG_WARNING_ALL([-Wformat-security])
24 DPKG_WARNING_ALL([-Wpointer-arith])
25 DPKG_WARNING_ALL([-Wlogical-op])
26- DPKG_WARNING_ALL([-Wvla])
27 DPKG_WARNING_ALL([-Winit-self])
28 DPKG_WARNING_ALL([-Wwrite-strings])
29 DPKG_WARNING_ALL([-Wcast-align])
30--
311.7.10.4
32
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 @@
1Upstream-Status: Inappropriate [disable feature]
2
3diff -ruN dpkg-1.15.8.5-orig/Makefile.am dpkg-1.15.8.5/Makefile.am
4--- dpkg-1.15.8.5-orig/Makefile.am 2010-10-08 12:27:15.042083703 +0800
5+++ dpkg-1.15.8.5/Makefile.am 2010-10-08 12:27:27.755148228 +0800
6@@ -12,8 +12,7 @@
7 utils \
8 $(MAYBE_DSELECT) \
9 scripts \
10- po \
11- man
12+ po
13
14 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 @@
1Our pre/postinsts expect $D to be set when running in a sysroot and
2don't expect a chroot. This matches up our system expectations with
3what dpkg does.
4
5Upstream-Status: Inappropriate [OE Specific]
6
7RP 2011/12/07
8
9Index: dpkg-1.17.1/src/script.c
10===================================================================
11--- dpkg-1.17.1.orig/src/script.c
12+++ dpkg-1.17.1/src/script.c
13@@ -111,36 +111,9 @@ preexecscript(struct command *cmd)
14 size_t instdirl = strlen(instdir);
15
16 if (*instdir) {
17- if (strncmp(admindir, instdir, instdirl) != 0)
18- ohshit(_("admindir must be inside instdir for dpkg to work properly"));
19- if (setenv("DPKG_ADMINDIR", admindir + instdirl, 1) < 0)
20- ohshite(_("unable to setenv for subprocesses"));
21-
22- if (chroot(instdir))
23- ohshite(_("failed to chroot to `%.250s'"), instdir);
24- }
25- /* Switch to a known good directory to give the maintainer script
26- * a saner environment, also needed after the chroot(). */
27- if (chdir("/"))
28- ohshite(_("failed to chdir to `%.255s'"), "/");
29- if (debug_has_flag(dbg_scripts)) {
30- struct varbuf args = VARBUF_INIT;
31- const char **argv = cmd->argv;
32-
33- while (*++argv) {
34- varbuf_add_char(&args, ' ');
35- varbuf_add_str(&args, *argv);
36- }
37- varbuf_end_str(&args);
38- debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename,
39- args.buf);
40- varbuf_destroy(&args);
41+ setenv("D", instdir, 1);
42 }
43- if (!instdirl)
44- return cmd->filename;
45-
46- assert(strlen(cmd->filename) >= instdirl);
47- return cmd->filename + instdirl;
48+ return cmd->filename;
49 }
50
51 /**
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 @@
1busybox-1.19.4 tar utility doesn't support --warning=no-timestamp
2
3Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
4
5Upstream-Status: Inappropriate [configuration]
6Index: dpkg-1.17.1/dpkg-deb/extract.c
7===================================================================
8--- dpkg-1.17.1.orig/dpkg-deb/extract.c
9+++ dpkg-1.17.1/dpkg-deb/extract.c
10@@ -318,7 +318,6 @@ extracthalf(const char *debar, const cha
11
12 command_add_arg(&cmd, "-f");
13 command_add_arg(&cmd, "-");
14- command_add_arg(&cmd, "--warning=no-timestamp");
15
16 m_dup2(p2[0],0);
17 close(p2[0]);