summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/dpkg
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2016-05-26 16:18:45 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-04 14:13:35 +0100
commit81b59a19ad6df490f1edbea70b2612d7a8e43164 (patch)
tree2d0b29d49c0a17233d94d342a4dd764d6d8935f6 /meta/recipes-devtools/dpkg
parentb7644fc0490c019a404f5870fbe544c76f2ce99b (diff)
downloadpoky-81b59a19ad6df490f1edbea70b2612d7a8e43164.tar.gz
dpkg: Upgrade to 1.18.7
Rebased patches: 0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch add_armeb_triplet_entry.patchadd_armeb_triplet_entry.patch Patches removed already in upstream: [1] 0001-When-running-do_package_write_deb-we-have-trees-of-h.patch [2] fix-abs-redefine.patch (From OE-Core rev: 3812f58b3a438ae533c282170416cdd1681868e0) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> [1] https://anonscm.debian.org/cgit/dpkg/dpkg.git/commit/dpkg-deb/build.c?id=7a91341446851cd3594a8b752823b8c1f26d652a [2] https://anonscm.debian.org/cgit/dpkg/dpkg.git/commit/lib/dpkg/i18n.h?id=ecd4baa091619cbbdd70043129dd992573580371 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/dpkg')
-rw-r--r--meta/recipes-devtools/dpkg/dpkg.inc2
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch71
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch36
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch22
-rw-r--r--meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch40
-rw-r--r--meta/recipes-devtools/dpkg/dpkg_1.18.7.bb (renamed from meta/recipes-devtools/dpkg/dpkg_1.18.4.bb)6
6 files changed, 40 insertions, 137 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 3d9e7e3058..c2215cec6a 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -4,8 +4,6 @@ SECTION = "base"
4 4
5SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz" 5SRC_URI = "${DEBIAN_MIRROR}/main/d/dpkg/dpkg_${PV}.tar.xz"
6 6
7SRC_URI_append_class-native = " file://0001-When-running-do_package_write_deb-we-have-trees-of-h.patch"
8
9DEPENDS = "zlib bzip2 perl ncurses" 7DEPENDS = "zlib bzip2 perl ncurses"
10DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native" 8DEPENDS_class-native = "bzip2-replacement-native zlib-native virtual/update-alternatives-native gettext-native perl-native"
11RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz run-postinsts perl" 9RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} xz run-postinsts perl"
diff --git a/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch b/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch
deleted file mode 100644
index 49ef853ff2..0000000000
--- a/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch
+++ /dev/null
@@ -1,71 +0,0 @@
1From e391bdba238d1371fc5b67cdae08b06eb5ada5c2 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 26 Aug 2015 15:48:13 +0300
4Subject: [PATCH] When running do_package_write_deb, we have trees of
5 hardlinked files such as the dbg source files in ${PN}-dbg. If something
6 makes another copy of one of those files (or deletes one), the number of
7 links a file has changes and tar can notice this, e.g.:
8
9| DEBUG: Executing python function do_package_deb
10| 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'.
11| tar: ./usr/lib/sed/ptest/testsuite/tst-regex2: file changed as we read it
12| dpkg-deb: error: subprocess tar -cf returned error exit status 1
13
14Tar returns an error of 1 when files 'change' and other errors codes
15in other error cases. We tweak dpkg-deb here so that it ignores an exit
16code of 1 from tar. The files don't really change (and we have locking in
17place to avoid that kind of issue).
18
19Upstream-Status: Inappropriate
20RP 2015/3/27
21---
22 dpkg-deb/build.c | 12 ++++++++----
23 1 file changed, 8 insertions(+), 4 deletions(-)
24
25diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
26index 2ddeec6..af363f0 100644
27--- a/dpkg-deb/build.c
28+++ b/dpkg-deb/build.c
29@@ -452,7 +452,7 @@ static void
30 tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
31 struct compress_params *tar_compress_params, int fd_out)
32 {
33- int pipe_filenames[2], pipe_tarball[2];
34+ int pipe_filenames[2], pipe_tarball[2], rc;
35 pid_t pid_tar, pid_comp;
36
37 /* Fork off a tar. We will feed it a list of filenames on stdin later. */
38@@ -493,7 +493,9 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
39 /* All done, clean up wait for tar and <compress> to finish their job. */
40 close(pipe_filenames[1]);
41 subproc_reap(pid_comp, _("<compress> from tar -cf"), 0);
42- subproc_reap(pid_tar, "tar -cf", 0);
43+ rc = subproc_reap(pid_tar, "tar -cf", SUBPROC_RETERROR);
44+ if (rc && rc != 1)
45+ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc);
46 }
47
48 /**
49@@ -509,7 +511,7 @@ do_build(const char *const *argv)
50 char *debar;
51 char *tfbuf;
52 int arfd;
53- int p1[2], gzfd;
54+ int p1[2], gzfd, rc;
55 pid_t c1, c2;
56
57 /* Decode our arguments. */
58@@ -590,7 +592,9 @@ do_build(const char *const *argv)
59 }
60 close(p1[0]);
61 subproc_reap(c2, _("<compress> from tar -cf"), 0);
62- subproc_reap(c1, "tar -cf", 0);
63+ rc = subproc_reap(c1, "tar -cf", SUBPROC_RETERROR);
64+ if (rc && rc != 1)
65+ ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc);
66
67 if (lseek(gzfd, 0, SEEK_SET))
68 ohshite(_("failed to rewind temporary file (%s)"), _("control member"));
69--
702.7.0
71
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 9f77c6c991..80504ce8b9 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
@@ -8,30 +8,41 @@ Subject: [PATCH 3/5] Our pre/postinsts expect $D to be set when running in a
8Upstream-Status: Inappropriate [OE Specific] 8Upstream-Status: Inappropriate [OE Specific]
9 9
10RP 2011/12/07 10RP 2011/12/07
11ALIMON 2016/05/26
12
11--- 13---
12 src/script.c | 31 ++----------------------------- 14 src/script.c | 39 +++------------------------------------
13 1 file changed, 2 insertions(+), 29 deletions(-) 15 1 file changed, 3 insertions(+), 36 deletions(-)
14 16
15diff --git a/src/script.c b/src/script.c 17diff --git a/src/script.c b/src/script.c
16index a958145..24c49f9 100644 18index 3c88be8..ce66a86 100644
17--- a/src/script.c 19--- a/src/script.c
18+++ b/src/script.c 20+++ b/src/script.c
19@@ -100,36 +100,9 @@ maintscript_pre_exec(struct command *cmd) 21@@ -97,43 +97,10 @@ setexecute(const char *path, struct stat *stab)
20 size_t instdirl = strlen(instdir); 22 static const char *
21 23 maintscript_pre_exec(struct command *cmd)
22 if (*instdir) { 24 {
25- const char *admindir = dpkg_db_get_dir();
26- const char *changedir = fc_script_chrootless ? instdir : "/";
27- size_t instdirl = strlen(instdir);
28-
29- if (*instdir && !fc_script_chrootless) {
23- if (strncmp(admindir, instdir, instdirl) != 0) 30- if (strncmp(admindir, instdir, instdirl) != 0)
24- ohshit(_("admindir must be inside instdir for dpkg to work properly")); 31- ohshit(_("admindir must be inside instdir for dpkg to work properly"));
25- if (setenv("DPKG_ADMINDIR", admindir + instdirl, 1) < 0) 32- if (setenv("DPKG_ADMINDIR", admindir + instdirl, 1) < 0)
26- ohshite(_("unable to setenv for subprocesses")); 33- ohshite(_("unable to setenv for subprocesses"));
34- if (setenv("DPKG_ROOT", "", 1) < 0)
35- ohshite(_("unable to setenv for subprocesses"));
27- 36-
28- if (chroot(instdir)) 37- if (chroot(instdir))
29- ohshite(_("failed to chroot to '%.250s'"), instdir); 38- ohshite(_("failed to chroot to '%.250s'"), instdir);
30- } 39+ if (*instdir) {
40+ setenv("D", instdir, 1);
41 }
31- /* Switch to a known good directory to give the maintainer script 42- /* Switch to a known good directory to give the maintainer script
32- * a saner environment, also needed after the chroot(). */ 43- * a saner environment, also needed after the chroot(). */
33- if (chdir("/")) 44- if (chdir(changedir))
34- ohshite(_("failed to chdir to '%.255s'"), "/"); 45- ohshite(_("failed to chdir to '%.255s'"), changedir);
35- if (debug_has_flag(dbg_scripts)) { 46- if (debug_has_flag(dbg_scripts)) {
36- struct varbuf args = VARBUF_INIT; 47- struct varbuf args = VARBUF_INIT;
37- const char **argv = cmd->argv; 48- const char **argv = cmd->argv;
@@ -44,9 +55,8 @@ index a958145..24c49f9 100644
44- debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename, 55- debug(dbg_scripts, "fork/exec %s (%s )", cmd->filename,
45- args.buf); 56- args.buf);
46- varbuf_destroy(&args); 57- varbuf_destroy(&args);
47+ setenv("D", instdir, 1); 58- }
48 } 59- if (!instdirl || fc_script_chrootless)
49- if (!instdirl)
50- return cmd->filename; 60- return cmd->filename;
51- 61-
52- assert(strlen(cmd->filename) >= instdirl); 62- assert(strlen(cmd->filename) >= instdirl);
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 af275dec17..dc69eb2d1c 100644
--- a/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch
+++ b/meta/recipes-devtools/dpkg/dpkg/add_armeb_triplet_entry.patch
@@ -25,14 +25,22 @@ Upstream-Status: Pending
25 25
26Signed-off-by: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com> 26Signed-off-by: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com>
27 27
28diff -Naurp dpkg-1.17.21_org/triplettable dpkg-1.17.21/triplettable 28---
29--- dpkg-1.17.21_org/triplettable 2015-04-08 17:08:52.370759171 +0530 29 triplettable | 1 +
30+++ dpkg-1.17.21/triplettable 2015-04-08 17:09:12.406752081 +0530 30 1 file changed, 1 insertion(+)
31@@ -9,6 +9,7 @@ musleabihf-linux-arm musl-linux-armhf 31
32 musl-linux-<cpu> musl-linux-<cpu> 32diff --git a/triplettable b/triplettable
33 gnueabihf-linux-arm armhf 33index abe4726..1e9c247 100644
34--- a/triplettable
35+++ b/triplettable
36@@ -11,6 +11,7 @@ gnueabihf-linux-arm armhf
34 gnueabi-linux-arm armel 37 gnueabi-linux-arm armel
38 gnuabin32-linux-mips64r6el mipsn32r6el
39 gnuabin32-linux-mips64r6 mipsn32r6
35+gnueabi-linux-armeb armeb 40+gnueabi-linux-armeb armeb
36 gnuabin32-linux-mips64el mipsn32el 41 gnuabin32-linux-mips64el mipsn32el
37 gnuabin32-linux-mips64 mipsn32 42 gnuabin32-linux-mips64 mipsn32
38 gnuabi64-linux-mips64el mips64el 43 gnuabi64-linux-mips64r6el mips64r6el
44--
452.1.4
46
diff --git a/meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch b/meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch
deleted file mode 100644
index e73311c294..0000000000
--- a/meta/recipes-devtools/dpkg/dpkg/fix-abs-redefine.patch
+++ /dev/null
@@ -1,40 +0,0 @@
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_1.18.4.bb b/meta/recipes-devtools/dpkg/dpkg_1.18.7.bb
index 7876944d6b..53759236d4 100644
--- a/meta/recipes-devtools/dpkg/dpkg_1.18.4.bb
+++ b/meta/recipes-devtools/dpkg/dpkg_1.18.7.bb
@@ -4,7 +4,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
4SRC_URI_append_class-native =" file://glibc2.5-sync_file_range.patch " 4SRC_URI_append_class-native =" file://glibc2.5-sync_file_range.patch "
5SRC_URI += "file://noman.patch \ 5SRC_URI += "file://noman.patch \
6 file://remove-tar-no-timestamp.patch \ 6 file://remove-tar-no-timestamp.patch \
7 file://fix-abs-redefine.patch \
8 file://arch_pm.patch \ 7 file://arch_pm.patch \
9 file://dpkg-configure.service \ 8 file://dpkg-configure.service \
10 file://add_armeb_triplet_entry.patch \ 9 file://add_armeb_triplet_entry.patch \
@@ -15,6 +14,5 @@ SRC_URI += "file://noman.patch \
15 file://0006-add-musleabi-to-known-target-tripets.patch \ 14 file://0006-add-musleabi-to-known-target-tripets.patch \
16 " 15 "
17 16
18SRC_URI[md5sum] = "e95b513c89693f6ec3ab53b6b1c3defd" 17SRC_URI[md5sum] = "073dbf2129a54b0fc627464bf8af4a1b"
19SRC_URI[sha256sum] = "fe89243868888ce715bf45861f26264f767d4e4dbd0d6f1a26ce60bbbbf106da" 18SRC_URI[sha256sum] = "ace36d3a6dc750a42baf797f9e75ec580a21f92bb9ff96b482100755d6d9b87b"
20