summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/apt
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2017-08-22 12:20:39 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-23 08:47:03 +0100
commit7004cb7288a373773d531a14e6643a335eba3db6 (patch)
tree657fbfcb5dfea12055fa309bf6ef985baf2985e7 /meta/recipes-devtools/apt
parentc9a29aa55d47b1c7cbbd8611a92a7383c3d01a3a (diff)
downloadpoky-7004cb7288a373773d531a14e6643a335eba3db6.tar.gz
apt: Upgrade to 1.2.24
Add new patches for enable builds on hosts that has GCC version minor than 5 because doesn't support std::array and std::put_time, those patches could be removed after get rid of Debian8 and Centos7 support. - gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch - gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch - gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch The LIC_FILES_CHKSUM changed because the license file now has style changes in the text remains GPLv2+. The patch Revert-always-run-dpkg-configure-a-at-the-end-of-our was updated because now the precision fields use floating point numbers. (From OE-Core rev: da99ae14c3a5719b317ff71b8f778a7c987f6158) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/apt')
-rw-r--r--meta/recipes-devtools/apt/apt-native_1.2.12.bb4
-rw-r--r--meta/recipes-devtools/apt/apt-native_1.2.24.bb7
-rw-r--r--meta/recipes-devtools/apt/apt.inc8
-rw-r--r--meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch24
-rw-r--r--meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch80
-rw-r--r--meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch46
-rw-r--r--meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch33
-rw-r--r--meta/recipes-devtools/apt/apt_1.2.24.bb (renamed from meta/recipes-devtools/apt/apt_1.2.12.bb)0
8 files changed, 182 insertions, 20 deletions
diff --git a/meta/recipes-devtools/apt/apt-native_1.2.12.bb b/meta/recipes-devtools/apt/apt-native_1.2.12.bb
deleted file mode 100644
index 1e660da74b..0000000000
--- a/meta/recipes-devtools/apt/apt-native_1.2.12.bb
+++ /dev/null
@@ -1,4 +0,0 @@
1require apt-native.inc
2
3SRC_URI += "file://noconfigure.patch \
4 file://no-curl.patch"
diff --git a/meta/recipes-devtools/apt/apt-native_1.2.24.bb b/meta/recipes-devtools/apt/apt-native_1.2.24.bb
new file mode 100644
index 0000000000..5b16b503d5
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt-native_1.2.24.bb
@@ -0,0 +1,7 @@
1require apt-native.inc
2
3SRC_URI += "file://noconfigure.patch \
4 file://no-curl.patch \
5 file://gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch \
6 file://gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch \
7 file://gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch"
diff --git a/meta/recipes-devtools/apt/apt.inc b/meta/recipes-devtools/apt/apt.inc
index 3026370844..f1cde3068d 100644
--- a/meta/recipes-devtools/apt/apt.inc
+++ b/meta/recipes-devtools/apt/apt.inc
@@ -2,7 +2,7 @@ SUMMARY = "Advanced front-end for dpkg"
2LICENSE = "GPLv2.0+" 2LICENSE = "GPLv2.0+"
3SECTION = "base" 3SECTION = "base"
4 4
5SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \ 5SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \
6 file://use-host.patch \ 6 file://use-host.patch \
7 file://makerace.patch \ 7 file://makerace.patch \
8 file://no-nls-dpkg.patch \ 8 file://no-nls-dpkg.patch \
@@ -14,9 +14,9 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20160526T162943Z/pool/main/
14 file://0001-environment.mak-musl-based-systems-can-generate-shar.patch \ 14 file://0001-environment.mak-musl-based-systems-can-generate-shar.patch \
15 file://0001-apt-1.2.12-Fix-musl-build.patch \ 15 file://0001-apt-1.2.12-Fix-musl-build.patch \
16 " 16 "
17SRC_URI[md5sum] = "80f6f0ef110a45a7e5af8a9d233fb0e7" 17SRC_URI[md5sum] = "ce8f9ab11f4fd0a08ec73eaffd75c8f0"
18SRC_URI[sha256sum] = "e820d27cba73476df4abcff27dadd1b5847474bfe85f7e9202a9a07526973ea6" 18SRC_URI[sha256sum] = "fa1311a9ce00e72379a0a3bc6d240ba30c0968cfbbb3472859e50b99e24e9598"
19LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" 19LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263"
20 20
21# the package is taken from snapshots.debian.org; that source is static and goes stale 21# the package is taken from snapshots.debian.org; that source is static and goes stale
22# so we check the latest upstream from a directory that does get updated 22# so we check the latest upstream from a directory that does get updated
diff --git a/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch b/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
index b3a883bae8..734ba00d4f 100644
--- a/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
+++ b/meta/recipes-devtools/apt/apt/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch
@@ -22,10 +22,10 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
22 3 files changed, 11 insertions(+), 18 deletions(-) 22 3 files changed, 11 insertions(+), 18 deletions(-)
23 23
24diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc 24diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
25index 834cb0e..84ded3a 100644 25index 533d9b367..6ce81bbd9 100644
26--- a/apt-pkg/deb/dpkgpm.cc 26--- a/apt-pkg/deb/dpkgpm.cc
27+++ b/apt-pkg/deb/dpkgpm.cc 27+++ b/apt-pkg/deb/dpkgpm.cc
28@@ -1037,12 +1037,6 @@ void pkgDPkgPM::BuildPackagesProgressMap() 28@@ -1041,12 +1041,6 @@ void pkgDPkgPM::BuildPackagesProgressMap()
29 PackagesTotal++; 29 PackagesTotal++;
30 } 30 }
31 } 31 }
@@ -38,7 +38,7 @@ index 834cb0e..84ded3a 100644
38 } 38 }
39 /*}}}*/ 39 /*}}}*/
40 bool pkgDPkgPM::Go(int StatusFd) 40 bool pkgDPkgPM::Go(int StatusFd)
41@@ -1250,8 +1244,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) 41@@ -1268,8 +1262,9 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
42 42
43 // support subpressing of triggers processing for special 43 // support subpressing of triggers processing for special
44 // cases like d-i that runs the triggers handling manually 44 // cases like d-i that runs the triggers handling manually
@@ -50,7 +50,7 @@ index 834cb0e..84ded3a 100644
50 50
51 // for the progress 51 // for the progress
52diff --git a/test/integration/test-apt-progress-fd-deb822 b/test/integration/test-apt-progress-fd-deb822 52diff --git a/test/integration/test-apt-progress-fd-deb822 b/test/integration/test-apt-progress-fd-deb822
53index 58fd732..3359762 100755 53index a8d59608d..0c6a9bbbf 100755
54--- a/test/integration/test-apt-progress-fd-deb822 54--- a/test/integration/test-apt-progress-fd-deb822
55+++ b/test/integration/test-apt-progress-fd-deb822 55+++ b/test/integration/test-apt-progress-fd-deb822
56@@ -27,36 +27,36 @@ Message: Installing testing (amd64) 56@@ -27,36 +27,36 @@ Message: Installing testing (amd64)
@@ -69,19 +69,19 @@ index 58fd732..3359762 100755
69 69
70 Status: progress 70 Status: progress
71 Package: testing:amd64 71 Package: testing:amd64
72-Percent: 50 72-Percent: 50.0000
73+Percent: 60 73+Percent: 60.0000
74 Message: Preparing to configure testing (amd64) 74 Message: Preparing to configure testing (amd64)
75 75
76 Status: progress 76 Status: progress
77-Percent: 50 77-Percent: 50.0000
78+Percent: 60 78+Percent: 60.0000
79 Message: Running dpkg 79 Message: Running dpkg
80 80
81 Status: progress 81 Status: progress
82 Package: testing:amd64 82 Package: testing:amd64
83-Percent: 50 83-Percent: 50.0000
84+Percent: 60 84+Percent: 60.0000
85 Message: Configuring testing (amd64) 85 Message: Configuring testing (amd64)
86 86
87 Status: progress 87 Status: progress
@@ -98,7 +98,7 @@ index 58fd732..3359762 100755
98 98
99 Status: progress 99 Status: progress
100diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts 100diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts
101index d86e638..ef6d23b 100755 101index d86e638cd..ef6d23be2 100755
102--- a/test/integration/test-no-fds-leaked-to-maintainer-scripts 102--- a/test/integration/test-no-fds-leaked-to-maintainer-scripts
103+++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts 103+++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts
104@@ -59,8 +59,7 @@ startup packages configure 104@@ -59,8 +59,7 @@ startup packages configure
@@ -122,5 +122,5 @@ index d86e638..ef6d23b 100755
122 checkpurge 122 checkpurge
123 123
124-- 124--
1252.1.4 1252.11.0
126 126
diff --git a/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch b/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch
new file mode 100644
index 0000000000..438de209a2
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-avoid-changing-the-global-LC_TIME-for-Release.patch
@@ -0,0 +1,80 @@
1From 7ef2b2dba0e0bee450da3c8450ea782a3e7d6429 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
3Date: Tue, 22 Aug 2017 11:49:01 -0500
4Subject: [PATCH 3/3] Revert "avoid changing the global LC_TIME for Release
5 writing"
6
7This reverts commit 78e7b683c645e907db12658405a4b201a6243ea8.
8
9After we drop debian8 and centos7 that has gcc < 5 (std::put_time not available)
10versions this patch can be remove.
11
12Signed-off-by: Anibal Limon <limon.anibal@gmail.com>
13
14Upstream-Status: Inappropriate [embedded specific]
15---
16 ftparchive/writer.cc | 29 +++++++++++++++++------------
17 1 file changed, 17 insertions(+), 12 deletions(-)
18
19diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
20index 2596382..e43a643 100644
21--- a/ftparchive/writer.cc
22+++ b/ftparchive/writer.cc
23@@ -37,7 +37,6 @@
24 #include <unistd.h>
25 #include <ctime>
26 #include <iostream>
27-#include <iomanip>
28 #include <sstream>
29 #include <memory>
30 #include <utility>
31@@ -984,29 +983,35 @@ ReleaseWriter::ReleaseWriter(FileFd * const GivenOutput, string const &/*DB*/) :
32 AddPatterns(_config->FindVector("APT::FTPArchive::Release::Patterns"));
33
34 time_t const now = time(NULL);
35- auto const posix = std::locale("C.UTF-8");
36
37- // FIXME: use TimeRFC1123 here? But that uses GMT to satisfy HTTP/1.1
38- std::ostringstream datestr;
39- datestr.imbue(posix);
40- datestr << std::put_time(gmtime(&now), "%a, %d %b %Y %H:%M:%S UTC");
41+ setlocale(LC_TIME, "C");
42+
43+ char datestr[128];
44+ if (strftime(datestr, sizeof(datestr), "%a, %d %b %Y %H:%M:%S UTC",
45+ gmtime(&now)) == 0)
46+ {
47+ datestr[0] = '\0';
48+ }
49
50 time_t const validuntil = now + _config->FindI("APT::FTPArchive::Release::ValidTime", 0);
51- std::ostringstream validstr;
52- if (validuntil != now)
53+ char validstr[128];
54+ if (now == validuntil ||
55+ strftime(validstr, sizeof(validstr), "%a, %d %b %Y %H:%M:%S UTC",
56+ gmtime(&validuntil)) == 0)
57 {
58- datestr.imbue(posix);
59- validstr << std::put_time(gmtime(&validuntil), "%a, %d %b %Y %H:%M:%S UTC");
60+ validstr[0] = '\0';
61 }
62
63+ setlocale(LC_TIME, "");
64+
65 map<string,string> Fields;
66 Fields["Origin"] = "";
67 Fields["Label"] = "";
68 Fields["Suite"] = "";
69 Fields["Version"] = "";
70 Fields["Codename"] = "";
71- Fields["Date"] = datestr.str();
72- Fields["Valid-Until"] = validstr.str();
73+ Fields["Date"] = datestr;
74+ Fields["Valid-Until"] = validstr;
75 Fields["Architectures"] = "";
76 Fields["Components"] = "";
77 Fields["Description"] = "";
78--
792.1.4
80
diff --git a/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch b/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch
new file mode 100644
index 0000000000..088a66a3c8
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt/gcc_4.x_Revert-use-de-localed-std-put_time-instead-rolling-o.patch
@@ -0,0 +1,46 @@
1From c72ef9b6ae83a0a2fbbefd5c050335f65f0d2bc9 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
3Date: Tue, 22 Aug 2017 11:48:46 -0500
4Subject: [PATCH 2/3] Revert "use de-localed std::put_time instead rolling our
5 own"
6
7This reverts commit 4ed2a17ab4334f019c00512aa54a162f0bf083c4.
8
9After we drop debian8 and centos7 that has gcc < 5 (std::put_time not available)
10versions this patch can be remove.
11
12Signed-off-by: Anibal Limon <limon.anibal@gmail.com>
13
14Upstream-Status: Inappropriate [embedded specific]
15---
16 apt-pkg/contrib/strutl.cc | 14 +++++++++-----
17 1 file changed, 9 insertions(+), 5 deletions(-)
18
19diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
20index c2ff01d..e9ef2be 100644
21--- a/apt-pkg/contrib/strutl.cc
22+++ b/apt-pkg/contrib/strutl.cc
23@@ -760,11 +760,15 @@ string TimeRFC1123(time_t Date)
24 if (gmtime_r(&Date, &Conv) == NULL)
25 return "";
26
27- auto const posix = std::locale::classic();
28- std::ostringstream datestr;
29- datestr.imbue(posix);
30- datestr << std::put_time(&Conv, "%a, %d %b %Y %H:%M:%S GMT");
31- return datestr.str();
32+ char Buf[300];
33+ const char *Day[] = {"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
34+ const char *Month[] = {"Jan","Feb","Mar","Apr","May","Jun","Jul",
35+ "Aug","Sep","Oct","Nov","Dec"};
36+
37+ snprintf(Buf, sizeof(Buf), "%s, %02i %s %i %02i:%02i:%02i GMT",Day[Conv.tm_wday],
38+ Conv.tm_mday,Month[Conv.tm_mon],Conv.tm_year+1900,Conv.tm_hour,
39+ Conv.tm_min,Conv.tm_sec);
40+ return Buf;
41 }
42 /*}}}*/
43 // ReadMessages - Read messages from the FD /*{{{*/
44--
452.1.4
46
diff --git a/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch b/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch
new file mode 100644
index 0000000000..cb32591876
--- /dev/null
+++ b/meta/recipes-devtools/apt/apt/gcc_4.x_apt-pkg-contrib-strutl.cc-Include-array-header.patch
@@ -0,0 +1,33 @@
1From ff8562f7724c4db4b83635af9e627f3495222327 Mon Sep 17 00:00:00 2001
2From: Anibal Limon <limon.anibal@gmail.com>
3Date: Tue, 22 Aug 2017 04:41:31 -0500
4Subject: [PATCH 1/3] apt-pkg/contrib/strutl.cc: Include array header
5
6If GCC version is less than 5 the array header needs to be included
7to support std::array.
8
9After we drop debian8 and centos7 that has gcc < 5 versions this patch
10can be remove.
11
12Signed-off-by: Anibal Limon <limon.anibal@gmail.com>
13
14Upstream-Status: Inappropriate [embedded specific]
15---
16 apt-pkg/contrib/strutl.cc | 1 +
17 1 file changed, 1 insertion(+)
18
19diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc
20index 60d0ca8..c2ff01d 100644
21--- a/apt-pkg/contrib/strutl.cc
22+++ b/apt-pkg/contrib/strutl.cc
23@@ -27,6 +27,7 @@
24 #include <sstream>
25 #include <string>
26 #include <vector>
27+#include <array>
28
29 #include <stddef.h>
30 #include <stdlib.h>
31--
322.1.4
33
diff --git a/meta/recipes-devtools/apt/apt_1.2.12.bb b/meta/recipes-devtools/apt/apt_1.2.24.bb
index ae0bce933d..ae0bce933d 100644
--- a/meta/recipes-devtools/apt/apt_1.2.12.bb
+++ b/meta/recipes-devtools/apt/apt_1.2.24.bb