diff options
author | Roy Li <rongqing.li@windriver.com> | 2015-05-27 15:58:49 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-29 10:17:15 +0100 |
commit | 2efd475a98602758c98290263d17a8ac55d32a39 (patch) | |
tree | a3f825d1e1024afa8631c0ce2a7142a7fcc687bd | |
parent | 320d766fe405c686b5339897f6f5a1baaed4c61d (diff) | |
download | poky-2efd475a98602758c98290263d17a8ac55d32a39.tar.gz |
apt: upgrade to 1.0.9.9
1. Upgrade to fix the several CVEs: CVE-2014-0488, CVE-2014-0490
2. Remove apt-0.9.9.4-CVE-2014-0478.patch, which was backport.
3. Romve no-ko-translation.patch, apt-1.0.9.9 has ko translation
4. Update use-host.patch no-curl.patch db_linking_hack.patch and
noconfigure.patch
5. Not build the test cases since it requires gtest
6. install libapt-private.so.* to libdir, otherwise this file is
not installed into sysroot for native, and apt-get will use host's,
and lead to fail
7. Revert apt commit[a2a75ff45]"always run 'dpkg --configure -a'
at the end of our dpkg callings" for native package, otherwise
the postscript for these installed packages will be run, and fail
since the rootfs dir is not considered
8. Add lzma dependency by PACKAGECONFIG for target, and add xz
dependency for native
9. Support to compile apt-native on centos6
(From OE-Core rev: 7dd4a53a99277b46696dea5558fa321a2267af0a)
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Acked-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
20 files changed, 676 insertions, 231 deletions
diff --git a/meta/recipes-devtools/apt/apt-0.9.9.4/apt-0.9.9.4-CVE-2014-0478.patch b/meta/recipes-devtools/apt/apt-0.9.9.4/apt-0.9.9.4-CVE-2014-0478.patch deleted file mode 100644 index 79a6897572..0000000000 --- a/meta/recipes-devtools/apt/apt-0.9.9.4/apt-0.9.9.4-CVE-2014-0478.patch +++ /dev/null | |||
@@ -1,193 +0,0 @@ | |||
1 | This patch comes from: | ||
2 | https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=73;filename=apt_0.9.7.9%2Bdeb7u2.debdiff;att=1;bug=749795 | ||
3 | |||
4 | Upstream-Status: Backport | ||
5 | |||
6 | Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> | ||
7 | Signed-off-by: Chong Lu <Chong.Lu@windriver.com> | ||
8 | |||
9 | diff -uarN apt-0.9.9.4-org/cmdline/apt-get.cc apt-0.9.9.4/cmdline/apt-get.cc | ||
10 | --- apt-0.9.9.4-org/cmdline/apt-get.cc 2014-08-29 15:37:42.587156134 +0800 | ||
11 | +++ apt-0.9.9.4/cmdline/apt-get.cc 2014-08-29 15:51:16.672334086 +0800 | ||
12 | @@ -1046,25 +1046,8 @@ | ||
13 | return true; | ||
14 | } | ||
15 | /*}}}*/ | ||
16 | -// CheckAuth - check if each download comes form a trusted source /*{{{*/ | ||
17 | -// --------------------------------------------------------------------- | ||
18 | -/* */ | ||
19 | -static bool CheckAuth(pkgAcquire& Fetcher) | ||
20 | +static bool AuthPrompt(std::string UntrustedList, bool const PromptUser) | ||
21 | { | ||
22 | - string UntrustedList; | ||
23 | - for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I < Fetcher.ItemsEnd(); ++I) | ||
24 | - { | ||
25 | - if (!(*I)->IsTrusted()) | ||
26 | - { | ||
27 | - UntrustedList += string((*I)->ShortDesc()) + " "; | ||
28 | - } | ||
29 | - } | ||
30 | - | ||
31 | - if (UntrustedList == "") | ||
32 | - { | ||
33 | - return true; | ||
34 | - } | ||
35 | - | ||
36 | ShowList(c2out,_("WARNING: The following packages cannot be authenticated!"),UntrustedList,""); | ||
37 | |||
38 | if (_config->FindB("APT::Get::AllowUnauthenticated",false) == true) | ||
39 | @@ -1073,6 +1056,9 @@ | ||
40 | return true; | ||
41 | } | ||
42 | |||
43 | + if (PromptUser == false) | ||
44 | + return _error->Error(_("Some packages could not be authenticated")); | ||
45 | + | ||
46 | if (_config->FindI("quiet",0) < 2 | ||
47 | && _config->FindB("APT::Get::Assume-Yes",false) == false) | ||
48 | { | ||
49 | @@ -1090,6 +1076,28 @@ | ||
50 | return _error->Error(_("There are problems and -y was used without --force-yes")); | ||
51 | } | ||
52 | /*}}}*/ | ||
53 | +// CheckAuth - check if each download comes form a trusted source /*{{{*/ | ||
54 | +// --------------------------------------------------------------------- | ||
55 | +/* */ | ||
56 | +static bool CheckAuth(pkgAcquire& Fetcher, bool PromptUser=true) | ||
57 | +{ | ||
58 | + string UntrustedList; | ||
59 | + for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I < Fetcher.ItemsEnd(); ++I) | ||
60 | + { | ||
61 | + if (!(*I)->IsTrusted()) | ||
62 | + { | ||
63 | + UntrustedList += string((*I)->ShortDesc()) + " "; | ||
64 | + } | ||
65 | + } | ||
66 | + | ||
67 | + if (UntrustedList == "") | ||
68 | + { | ||
69 | + return true; | ||
70 | + } | ||
71 | + | ||
72 | + return AuthPrompt(UntrustedList, PromptUser); | ||
73 | +} | ||
74 | + | ||
75 | // InstallPackages - Actually download and install the packages /*{{{*/ | ||
76 | // --------------------------------------------------------------------- | ||
77 | /* This displays the informative messages describing what is going to | ||
78 | @@ -2482,6 +2490,7 @@ | ||
79 | |||
80 | // Load the requestd sources into the fetcher | ||
81 | unsigned J = 0; | ||
82 | + std::string UntrustedList; | ||
83 | for (const char **I = CmdL.FileList + 1; *I != 0; I++, J++) | ||
84 | { | ||
85 | string Src; | ||
86 | @@ -2491,7 +2500,10 @@ | ||
87 | delete[] Dsc; | ||
88 | return _error->Error(_("Unable to find a source package for %s"),Src.c_str()); | ||
89 | } | ||
90 | - | ||
91 | + | ||
92 | + if (Last->Index().IsTrusted() == false) | ||
93 | + UntrustedList += Src + " "; | ||
94 | + | ||
95 | string srec = Last->AsStr(); | ||
96 | string::size_type pos = srec.find("\nVcs-"); | ||
97 | while (pos != string::npos) | ||
98 | @@ -2575,7 +2587,11 @@ | ||
99 | Last->Index().SourceInfo(*Last,*I),Src); | ||
100 | } | ||
101 | } | ||
102 | - | ||
103 | + | ||
104 | + // check authentication status of the source as well | ||
105 | + if (UntrustedList != "" && !AuthPrompt(UntrustedList, false)) | ||
106 | + return false; | ||
107 | + | ||
108 | // Display statistics | ||
109 | unsigned long long FetchBytes = Fetcher.FetchNeeded(); | ||
110 | unsigned long long FetchPBytes = Fetcher.PartialPresent(); | ||
111 | diff -uarN apt-0.9.9.4-org/test/integration/framework apt-0.9.9.4/test/integration/framework | ||
112 | --- apt-0.9.9.4-org/test/integration/framework 2014-08-29 15:37:42.623156154 +0800 | ||
113 | +++ apt-0.9.9.4/test/integration/framework 2014-08-29 15:55:23.592197940 +0800 | ||
114 | @@ -151,7 +151,7 @@ | ||
115 | mkdir rootdir aptarchive keys | ||
116 | cd rootdir | ||
117 | mkdir -p etc/apt/apt.conf.d etc/apt/sources.list.d etc/apt/trusted.gpg.d etc/apt/preferences.d | ||
118 | - mkdir -p var/cache var/lib var/log | ||
119 | + mkdir -p var/cache var/lib var/log tmp | ||
120 | mkdir -p var/lib/dpkg/info var/lib/dpkg/updates var/lib/dpkg/triggers | ||
121 | touch var/lib/dpkg/available | ||
122 | mkdir -p usr/lib/apt | ||
123 | @@ -910,3 +910,35 @@ | ||
124 | local IGNORE | ||
125 | read IGNORE | ||
126 | } | ||
127 | + | ||
128 | +testsuccess() { | ||
129 | + if [ "$1" = '--nomsg' ]; then | ||
130 | + shift | ||
131 | + else | ||
132 | + msgtest 'Test for successful execution of' "$*" | ||
133 | + fi | ||
134 | + local OUTPUT="${TMPWORKINGDIRECTORY}/rootdir/tmp/testsuccess.output" | ||
135 | + if $@ >${OUTPUT} 2>&1; then | ||
136 | + msgpass | ||
137 | + else | ||
138 | + echo >&2 | ||
139 | + cat >&2 $OUTPUT | ||
140 | + msgfail | ||
141 | + fi | ||
142 | +} | ||
143 | + | ||
144 | +testfailure() { | ||
145 | + if [ "$1" = '--nomsg' ]; then | ||
146 | + shift | ||
147 | + else | ||
148 | + msgtest 'Test for failure in execution of' "$*" | ||
149 | + fi | ||
150 | + local OUTPUT="${TMPWORKINGDIRECTORY}/rootdir/tmp/testfailure.output" | ||
151 | + if $@ >${OUTPUT} 2>&1; then | ||
152 | + echo >&2 | ||
153 | + cat >&2 $OUTPUT | ||
154 | + msgfail | ||
155 | + else | ||
156 | + msgpass | ||
157 | + fi | ||
158 | +} | ||
159 | diff -uarN apt-0.9.9.4-org/test/integration/test-apt-get-source-authenticated apt-0.9.9.4/test/integration/test-apt-get-source-authenticated | ||
160 | --- apt-0.9.9.4-org/test/integration/test-apt-get-source-authenticated 1970-01-01 08:00:00.000000000 +0800 | ||
161 | +++ apt-0.9.9.4/test/integration/test-apt-get-source-authenticated 2014-08-29 15:58:06.137156796 +0800 | ||
162 | @@ -0,0 +1,31 @@ | ||
163 | +#!/bin/sh | ||
164 | +# | ||
165 | +# Regression test for debian bug #749795. Ensure that we fail with | ||
166 | +# a error if apt-get source foo will download a source that comes | ||
167 | +# from a unauthenticated repository | ||
168 | +# | ||
169 | +set -e | ||
170 | + | ||
171 | +TESTDIR=$(readlink -f $(dirname $0)) | ||
172 | +. $TESTDIR/framework | ||
173 | + | ||
174 | +setupenvironment | ||
175 | +configarchitecture "i386" | ||
176 | + | ||
177 | +# a "normal" package with source and binary | ||
178 | +buildsimplenativepackage 'foo' 'all' '2.0' | ||
179 | + | ||
180 | +setupaptarchive --no-update | ||
181 | + | ||
182 | +APTARCHIVE=$(readlink -f ./aptarchive) | ||
183 | +rm -f $APTARCHIVE/dists/unstable/*Release* | ||
184 | + | ||
185 | +# update without authenticated InRelease file | ||
186 | +testsuccess aptget update | ||
187 | + | ||
188 | +# this all should fail | ||
189 | +testfailure aptget install -y foo | ||
190 | +testfailure aptget source foo | ||
191 | + | ||
192 | +# allow overriding the warning | ||
193 | +testsuccess aptget source --allow-unauthenticated foo | ||
diff --git a/meta/recipes-devtools/apt/apt-0.9.9.4/no-ko-translation.patch b/meta/recipes-devtools/apt/apt-0.9.9.4/no-ko-translation.patch deleted file mode 100644 index 7aa408f19e..0000000000 --- a/meta/recipes-devtools/apt/apt-0.9.9.4/no-ko-translation.patch +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | --- | ||
4 | po/LINGUAS | 2 +- | ||
5 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
6 | |||
7 | --- a/po/LINGUAS | ||
8 | +++ b/po/LINGUAS | ||
9 | @@ -1 +1 @@ | ||
10 | -ar ast bg bs ca cs cy da de dz el es eu fi fr gl hu it ja km ko ku lt mr nb ne nl nn pl pt pt_BR ro ru sk sl sv th tl uk vi zh_CN zh_TW | ||
11 | +ar ast bg bs ca cs cy da de dz el es eu fi fr gl hu it ja km ku lt mr nb ne nl nn pl pt pt_BR ro ru sk sl sv th tl uk vi zh_CN zh_TW | ||
diff --git a/meta/recipes-devtools/apt/apt-1.0.9.9/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch b/meta/recipes-devtools/apt/apt-1.0.9.9/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch new file mode 100644 index 0000000000..d33069b73a --- /dev/null +++ b/meta/recipes-devtools/apt/apt-1.0.9.9/0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch | |||
@@ -0,0 +1,378 @@ | |||
1 | From 106797f1c66fa578dad21fd9380bf9d576573dfd Mon Sep 17 00:00:00 2001 | ||
2 | From: Roy Li <rongqing.li@windriver.com> | ||
3 | Date: Fri, 22 May 2015 08:05:15 +0800 | ||
4 | Subject: [PATCH] Revert "always run 'dpkg --configure -a' at the end of our | ||
5 | dpkg callings" | ||
6 | |||
7 | Upstream-Status: Inappropriate [embedded specific] | ||
8 | |||
9 | This reverts commit a2a75ff4516f7609f4c55b42270abb8d08943c60, which | ||
10 | always run 'dpkg --configure -a' at the end of our dpkg callings, | ||
11 | but it does not work for cross-compile, since the rootfs dir can not | ||
12 | be passed into dpkg, and lead to the below similar error: | ||
13 | ------- | ||
14 | |mkdir: cannot create directory '/usr/lib/opkg': Permission denied | ||
15 | ------- | ||
16 | |||
17 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
18 | --- | ||
19 | apt-pkg/deb/dpkgpm.cc | 9 +-- | ||
20 | test/integration/framework | 25 ++++---- | ||
21 | test/integration/test-apt-progress-fd | 67 +++++++++---------- | ||
22 | test/integration/test-apt-progress-fd-deb822 | 18 ++---- | ||
23 | test/integration/test-apt-progress-fd-error | 2 +- | ||
24 | ...est-bug-769609-triggers-still-pending-after-run | 75 ---------------------- | ||
25 | .../test-no-fds-leaked-to-maintainer-scripts | 6 +- | ||
26 | 7 files changed, 56 insertions(+), 146 deletions(-) | ||
27 | delete mode 100755 test/integration/test-bug-769609-triggers-still-pending-after-run | ||
28 | |||
29 | diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc | ||
30 | index b187efb..f269764 100644 | ||
31 | --- a/apt-pkg/deb/dpkgpm.cc | ||
32 | +++ b/apt-pkg/deb/dpkgpm.cc | ||
33 | @@ -1049,12 +1049,6 @@ void pkgDPkgPM::BuildPackagesProgressMap() | ||
34 | PackagesTotal++; | ||
35 | } | ||
36 | } | ||
37 | - /* one extra: We don't want the progress bar to reach 100%, especially not | ||
38 | - if we call dpkg --configure --pending and process a bunch of triggers | ||
39 | - while showing 100%. Also, spindown takes a while, so never reaching 100% | ||
40 | - is way more correct than reaching 100% while still doing stuff even if | ||
41 | - doing it this way is slightly bending the rules */ | ||
42 | - ++PackagesTotal; | ||
43 | } | ||
44 | /*}}}*/ | ||
45 | #if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR < 13) | ||
46 | @@ -1294,8 +1288,9 @@ bool pkgDPkgPM::GoNoABIBreak(APT::Progress::PackageManager *progress) | ||
47 | |||
48 | // support subpressing of triggers processing for special | ||
49 | // cases like d-i that runs the triggers handling manually | ||
50 | + bool const SmartConf = (_config->Find("PackageManager::Configure", "all") != "all"); | ||
51 | bool const TriggersPending = _config->FindB("DPkg::TriggersPending", false); | ||
52 | - if (_config->FindB("DPkg::ConfigurePending", true) == true) | ||
53 | + if (_config->FindB("DPkg::ConfigurePending", SmartConf) == true) | ||
54 | List.push_back(Item(Item::ConfigurePending, PkgIterator())); | ||
55 | |||
56 | // for the progress | ||
57 | diff --git a/test/integration/framework b/test/integration/framework | ||
58 | index 70ad381..00672ad 100644 | ||
59 | --- a/test/integration/framework | ||
60 | +++ b/test/integration/framework | ||
61 | @@ -1178,13 +1178,10 @@ testnopackage() { | ||
62 | fi | ||
63 | } | ||
64 | |||
65 | -testdpkgstatus() { | ||
66 | - local STATE="$1" | ||
67 | - local NR="$2" | ||
68 | - shift 2 | ||
69 | - msgtest "Test that $NR package(s) are in state $STATE with" "dpkg -l $*" | ||
70 | - local PKGS="$(dpkg -l "$@" 2>/dev/null | grep "^${STATE}" | wc -l)" | ||
71 | - if [ "$PKGS" != $NR ]; then | ||
72 | +testdpkginstalled() { | ||
73 | + msgtest "Test for correctly installed package(s) with" "dpkg -l $*" | ||
74 | + local PKGS="$(dpkg -l "$@" 2>/dev/null | grep '^i' | wc -l)" | ||
75 | + if [ "$PKGS" != $# ]; then | ||
76 | echo >&2 $PKGS | ||
77 | dpkg -l "$@" | grep '^[a-z]' >&2 | ||
78 | msgfail | ||
79 | @@ -1193,12 +1190,16 @@ testdpkgstatus() { | ||
80 | fi | ||
81 | } | ||
82 | |||
83 | -testdpkginstalled() { | ||
84 | - testdpkgstatus 'ii' "$#" "$@" | ||
85 | -} | ||
86 | - | ||
87 | testdpkgnotinstalled() { | ||
88 | - testdpkgstatus 'ii' '0' "$@" | ||
89 | + msgtest "Test for correctly not-installed package(s) with" "dpkg -l $*" | ||
90 | + local PKGS="$(dpkg -l "$@" 2> /dev/null | grep '^i' | wc -l)" | ||
91 | + if [ "$PKGS" != 0 ]; then | ||
92 | + echo | ||
93 | + dpkg -l "$@" | grep '^[a-z]' >&2 | ||
94 | + msgfail | ||
95 | + else | ||
96 | + msgpass | ||
97 | + fi | ||
98 | } | ||
99 | |||
100 | testmarkedauto() { | ||
101 | diff --git a/test/integration/test-apt-progress-fd b/test/integration/test-apt-progress-fd | ||
102 | index 68cc043..d72e7e7 100755 | ||
103 | --- a/test/integration/test-apt-progress-fd | ||
104 | +++ b/test/integration/test-apt-progress-fd | ||
105 | @@ -19,14 +19,13 @@ testequal "dlstatus:1:0:Retrieving file 1 of 1 | ||
106 | dlstatus:1:0:Retrieving file 1 of 1 | ||
107 | pmstatus:dpkg-exec:0:Running dpkg | ||
108 | pmstatus:testing:0:Installing testing (amd64) | ||
109 | -pmstatus:testing:16.6667:Preparing testing (amd64) | ||
110 | -pmstatus:testing:33.3333:Unpacking testing (amd64) | ||
111 | -pmstatus:testing:50:Preparing to configure testing (amd64) | ||
112 | -pmstatus:dpkg-exec:50:Running dpkg | ||
113 | -pmstatus:testing:50:Configuring testing (amd64) | ||
114 | -pmstatus:testing:66.6667:Configuring testing (amd64) | ||
115 | -pmstatus:testing:83.3333:Installed testing (amd64) | ||
116 | -pmstatus:dpkg-exec:83.3333:Running dpkg" cat apt-progress.log | ||
117 | +pmstatus:testing:20:Preparing testing (amd64) | ||
118 | +pmstatus:testing:40:Unpacking testing (amd64) | ||
119 | +pmstatus:testing:60:Preparing to configure testing (amd64) | ||
120 | +pmstatus:dpkg-exec:60:Running dpkg | ||
121 | +pmstatus:testing:60:Configuring testing (amd64) | ||
122 | +pmstatus:testing:80:Configuring testing (amd64) | ||
123 | +pmstatus:testing:100:Installed testing (amd64)" cat apt-progress.log | ||
124 | |||
125 | # upgrade | ||
126 | exec 3> apt-progress.log | ||
127 | @@ -35,14 +34,13 @@ testequal "dlstatus:1:0:Retrieving file 1 of 1 | ||
128 | dlstatus:1:0:Retrieving file 1 of 1 | ||
129 | pmstatus:dpkg-exec:0:Running dpkg | ||
130 | pmstatus:testing:0:Installing testing (amd64) | ||
131 | -pmstatus:testing:16.6667:Preparing testing (amd64) | ||
132 | -pmstatus:testing:33.3333:Unpacking testing (amd64) | ||
133 | -pmstatus:testing:50:Preparing to configure testing (amd64) | ||
134 | -pmstatus:dpkg-exec:50:Running dpkg | ||
135 | -pmstatus:testing:50:Configuring testing (amd64) | ||
136 | -pmstatus:testing:66.6667:Configuring testing (amd64) | ||
137 | -pmstatus:testing:83.3333:Installed testing (amd64) | ||
138 | -pmstatus:dpkg-exec:83.3333:Running dpkg" cat apt-progress.log | ||
139 | +pmstatus:testing:20:Preparing testing (amd64) | ||
140 | +pmstatus:testing:40:Unpacking testing (amd64) | ||
141 | +pmstatus:testing:60:Preparing to configure testing (amd64) | ||
142 | +pmstatus:dpkg-exec:60:Running dpkg | ||
143 | +pmstatus:testing:60:Configuring testing (amd64) | ||
144 | +pmstatus:testing:80:Configuring testing (amd64) | ||
145 | +pmstatus:testing:100:Installed testing (amd64)" cat apt-progress.log | ||
146 | |||
147 | # reinstall | ||
148 | exec 3> apt-progress.log | ||
149 | @@ -51,24 +49,22 @@ testequal "dlstatus:1:0:Retrieving file 1 of 1 | ||
150 | dlstatus:1:0:Retrieving file 1 of 1 | ||
151 | pmstatus:dpkg-exec:0:Running dpkg | ||
152 | pmstatus:testing:0:Installing testing (amd64) | ||
153 | -pmstatus:testing:16.6667:Preparing testing (amd64) | ||
154 | -pmstatus:testing:33.3333:Unpacking testing (amd64) | ||
155 | -pmstatus:testing:50:Preparing to configure testing (amd64) | ||
156 | -pmstatus:dpkg-exec:50:Running dpkg | ||
157 | -pmstatus:testing:50:Configuring testing (amd64) | ||
158 | -pmstatus:testing:66.6667:Configuring testing (amd64) | ||
159 | -pmstatus:testing:83.3333:Installed testing (amd64) | ||
160 | -pmstatus:dpkg-exec:83.3333:Running dpkg" cat apt-progress.log | ||
161 | +pmstatus:testing:20:Preparing testing (amd64) | ||
162 | +pmstatus:testing:40:Unpacking testing (amd64) | ||
163 | +pmstatus:testing:60:Preparing to configure testing (amd64) | ||
164 | +pmstatus:dpkg-exec:60:Running dpkg | ||
165 | +pmstatus:testing:60:Configuring testing (amd64) | ||
166 | +pmstatus:testing:80:Configuring testing (amd64) | ||
167 | +pmstatus:testing:100:Installed testing (amd64)" cat apt-progress.log | ||
168 | |||
169 | # and remove | ||
170 | exec 3> apt-progress.log | ||
171 | testsuccess aptget remove testing -y -o APT::Status-Fd=3 | ||
172 | testequal "pmstatus:dpkg-exec:0:Running dpkg | ||
173 | pmstatus:testing:0:Removing testing (amd64) | ||
174 | -pmstatus:testing:25:Preparing for removal of testing (amd64) | ||
175 | -pmstatus:testing:50:Removing testing (amd64) | ||
176 | -pmstatus:testing:75:Removed testing (amd64) | ||
177 | -pmstatus:dpkg-exec:75:Running dpkg" cat apt-progress.log | ||
178 | +pmstatus:testing:33.3333:Preparing for removal of testing (amd64) | ||
179 | +pmstatus:testing:66.6667:Removing testing (amd64) | ||
180 | +pmstatus:testing:100:Removed testing (amd64)" cat apt-progress.log | ||
181 | |||
182 | # install non-native and ensure we get proper progress info | ||
183 | exec 3> apt-progress.log | ||
184 | @@ -79,13 +75,12 @@ testequal "dlstatus:1:0:Retrieving file 1 of 1 | ||
185 | dlstatus:1:0:Retrieving file 1 of 1 | ||
186 | pmstatus:dpkg-exec:0:Running dpkg | ||
187 | pmstatus:testing2:0:Installing testing2 (i386) | ||
188 | -pmstatus:testing2:16.6667:Preparing testing2 (i386) | ||
189 | -pmstatus:testing2:33.3333:Unpacking testing2 (i386) | ||
190 | -pmstatus:testing2:50:Preparing to configure testing2 (i386) | ||
191 | -pmstatus:dpkg-exec:50:Running dpkg | ||
192 | -pmstatus:testing2:50:Configuring testing2 (i386) | ||
193 | -pmstatus:testing2:66.6667:Configuring testing2 (i386) | ||
194 | -pmstatus:testing2:83.3333:Installed testing2 (i386) | ||
195 | -pmstatus:dpkg-exec:83.3333:Running dpkg" cat apt-progress.log | ||
196 | +pmstatus:testing2:20:Preparing testing2 (i386) | ||
197 | +pmstatus:testing2:40:Unpacking testing2 (i386) | ||
198 | +pmstatus:testing2:60:Preparing to configure testing2 (i386) | ||
199 | +pmstatus:dpkg-exec:60:Running dpkg | ||
200 | +pmstatus:testing2:60:Configuring testing2 (i386) | ||
201 | +pmstatus:testing2:80:Configuring testing2 (i386) | ||
202 | +pmstatus:testing2:100:Installed testing2 (i386)" cat apt-progress.log | ||
203 | |||
204 | rm -f apt-progress*.log | ||
205 | diff --git a/test/integration/test-apt-progress-fd-deb822 b/test/integration/test-apt-progress-fd-deb822 | ||
206 | index badc985..9d22794 100755 | ||
207 | --- a/test/integration/test-apt-progress-fd-deb822 | ||
208 | +++ b/test/integration/test-apt-progress-fd-deb822 | ||
209 | @@ -27,41 +27,37 @@ Message: Installing testing (amd64) | ||
210 | |||
211 | Status: progress | ||
212 | Package: testing:amd64 | ||
213 | -Percent: 16.6667 | ||
214 | +Percent: 20 | ||
215 | Message: Preparing testing (amd64) | ||
216 | |||
217 | Status: progress | ||
218 | Package: testing:amd64 | ||
219 | -Percent: 33.3333 | ||
220 | +Percent: 40 | ||
221 | Message: Unpacking testing (amd64) | ||
222 | |||
223 | Status: progress | ||
224 | Package: testing:amd64 | ||
225 | -Percent: 50 | ||
226 | +Percent: 60 | ||
227 | Message: Preparing to configure testing (amd64) | ||
228 | |||
229 | Status: progress | ||
230 | -Percent: 50 | ||
231 | +Percent: 60 | ||
232 | Message: Running dpkg | ||
233 | |||
234 | Status: progress | ||
235 | Package: testing:amd64 | ||
236 | -Percent: 50 | ||
237 | +Percent: 60 | ||
238 | Message: Configuring testing (amd64) | ||
239 | |||
240 | Status: progress | ||
241 | Package: testing:amd64 | ||
242 | -Percent: 66.6667 | ||
243 | +Percent: 80 | ||
244 | Message: Configuring testing (amd64) | ||
245 | |||
246 | Status: progress | ||
247 | Package: testing:amd64 | ||
248 | -Percent: 83.3333 | ||
249 | +Percent: 100 | ||
250 | Message: Installed testing (amd64) | ||
251 | - | ||
252 | -Status: progress | ||
253 | -Percent: 83.3333 | ||
254 | -Message: Running dpkg | ||
255 | " cat apt-progress.log | ||
256 | |||
257 | |||
258 | diff --git a/test/integration/test-apt-progress-fd-error b/test/integration/test-apt-progress-fd-error | ||
259 | index 6323007..a47095b 100755 | ||
260 | --- a/test/integration/test-apt-progress-fd-error | ||
261 | +++ b/test/integration/test-apt-progress-fd-error | ||
262 | @@ -18,7 +18,7 @@ setupaptarchive | ||
263 | exec 3> apt-progress.log | ||
264 | testfailure aptget install foo1 foo2 -y -o APT::Status-Fd=3 | ||
265 | msgtest "Ensure correct error message" | ||
266 | -if grep -q "aptarchive/pool/foo2_0.8.15_amd64.deb:36.3636:trying to overwrite '/usr/bin/file-conflict', which is also in package foo1 0.8.15" apt-progress.log; then | ||
267 | +if grep -q "aptarchive/pool/foo2_0.8.15_amd64.deb:40:trying to overwrite '/usr/bin/file-conflict', which is also in package foo1 0.8.15" apt-progress.log; then | ||
268 | msgpass | ||
269 | else | ||
270 | cat apt-progress.log | ||
271 | diff --git a/test/integration/test-bug-769609-triggers-still-pending-after-run b/test/integration/test-bug-769609-triggers-still-pending-after-run | ||
272 | deleted file mode 100755 | ||
273 | index 146fa76..0000000 | ||
274 | --- a/test/integration/test-bug-769609-triggers-still-pending-after-run | ||
275 | +++ /dev/null | ||
276 | @@ -1,75 +0,0 @@ | ||
277 | -#!/bin/sh | ||
278 | -set -e | ||
279 | - | ||
280 | -TESTDIR=$(readlink -f $(dirname $0)) | ||
281 | -. $TESTDIR/framework | ||
282 | - | ||
283 | -setupenvironment | ||
284 | -configarchitecture 'amd64' | ||
285 | - | ||
286 | -msgtest 'Check if installed dpkg supports' 'noawait trigger' | ||
287 | -if dpkg-checkbuilddeps -d 'dpkg (>= 1.16.1)' /dev/null; then | ||
288 | - msgpass | ||
289 | -else | ||
290 | - msgskip 'dpkg version too old' | ||
291 | - exit 0 | ||
292 | -fi | ||
293 | -configdpkgnoopchroot | ||
294 | - | ||
295 | -buildtriggerpackages() { | ||
296 | - local TYPE="$1" | ||
297 | - setupsimplenativepackage "triggerable-$TYPE" 'all' '1.0' 'unstable' "Depends: trigdepends-$TYPE" | ||
298 | - BUILDDIR="incoming/triggerable-${TYPE}-1.0" | ||
299 | - cat >${BUILDDIR}/debian/postinst <<EOF | ||
300 | -#!/bin/sh | ||
301 | -if [ "\$1" = 'triggered' ]; then | ||
302 | - ls -l /proc/self/fd/ | ||
303 | -fi | ||
304 | -EOF | ||
305 | - echo "$TYPE /usr/share/doc" > ${BUILDDIR}/debian/triggers | ||
306 | - buildpackage "$BUILDDIR" 'unstable' 'main' 'native' | ||
307 | - rm -rf "$BUILDDIR" | ||
308 | - buildsimplenativepackage "trigdepends-$TYPE" 'all' '1.0' 'unstable' | ||
309 | -} | ||
310 | - | ||
311 | -#buildtriggerpackages 'interest' | ||
312 | -buildtriggerpackages 'interest-noawait' | ||
313 | -buildsimplenativepackage "trigstuff" 'all' '1.0' 'unstable' | ||
314 | - | ||
315 | -setupaptarchive | ||
316 | - | ||
317 | -runtests() { | ||
318 | - local TYPE="$1" | ||
319 | - msgmsg 'Working with trigger type' "$TYPE" | ||
320 | - testsuccess aptget install triggerable-$TYPE -y | ||
321 | - cp rootdir/tmp/testsuccess.output terminal.output | ||
322 | - testsuccess grep '^REWRITE ' terminal.output | ||
323 | - testdpkginstalled triggerable-$TYPE trigdepends-$TYPE | ||
324 | - | ||
325 | - testsuccess aptget install trigdepends-$TYPE -y --reinstall | ||
326 | - cp rootdir/tmp/testsuccess.output terminal.output | ||
327 | - testsuccess grep '^REWRITE ' terminal.output | ||
328 | - testsuccess grep ' root root ' terminal.output | ||
329 | - testdpkginstalled triggerable-$TYPE trigdepends-$TYPE | ||
330 | - | ||
331 | - testsuccess aptget install trigstuff -y | ||
332 | - cp rootdir/tmp/testsuccess.output terminal.output | ||
333 | - testsuccess grep '^REWRITE ' terminal.output | ||
334 | - testsuccess grep ' root root ' terminal.output | ||
335 | - testdpkginstalled triggerable-$TYPE trigdepends-$TYPE trigstuff | ||
336 | - | ||
337 | - testsuccess aptget purge trigstuff -y | ||
338 | - cp rootdir/tmp/testsuccess.output terminal.output | ||
339 | - testsuccess grep '^REWRITE ' terminal.output | ||
340 | - testsuccess grep ' root root ' terminal.output | ||
341 | - testdpkginstalled triggerable-$TYPE trigdepends-$TYPE | ||
342 | - testdpkgnotinstalled trigstuff | ||
343 | - | ||
344 | - testsuccess aptget purge trigdepends-$TYPE -y | ||
345 | - cp rootdir/tmp/testsuccess.output terminal.output | ||
346 | - testfailure grep '^REWRITE ' terminal.output | ||
347 | - testfailure grep ' root root ' terminal.output | ||
348 | - testdpkgnotinstalled triggerable-$TYPE trigdepends-$TYPE | ||
349 | -} | ||
350 | -#runtests 'interest' | ||
351 | -runtests 'interest-noawait' | ||
352 | diff --git a/test/integration/test-no-fds-leaked-to-maintainer-scripts b/test/integration/test-no-fds-leaked-to-maintainer-scripts | ||
353 | index 41c0570..d3960d7 100755 | ||
354 | --- a/test/integration/test-no-fds-leaked-to-maintainer-scripts | ||
355 | +++ b/test/integration/test-no-fds-leaked-to-maintainer-scripts | ||
356 | @@ -59,8 +59,7 @@ startup packages configure | ||
357 | configure $PKGNAME 1.0 <none> | ||
358 | status unpacked $PKGNAME 1.0 | ||
359 | status half-configured $PKGNAME 1.0 | ||
360 | -status installed $PKGNAME 1.0 | ||
361 | -startup packages configure" cut -f 3- -d' ' rootdir/var/log/dpkg.log | ||
362 | +status installed $PKGNAME 1.0" cut -f 3- -d' ' rootdir/var/log/dpkg.log | ||
363 | } | ||
364 | checkinstall | ||
365 | |||
366 | @@ -85,8 +84,7 @@ status config-files $PKGNAME 1.0 | ||
367 | status config-files $PKGNAME 1.0 | ||
368 | status config-files $PKGNAME 1.0 | ||
369 | status config-files $PKGNAME 1.0 | ||
370 | -status not-installed $PKGNAME <none> | ||
371 | -startup packages configure" cut -f 3- -d' ' rootdir/var/log/dpkg.log | ||
372 | +status not-installed $PKGNAME <none>" cut -f 3- -d' ' rootdir/var/log/dpkg.log | ||
373 | } | ||
374 | checkpurge | ||
375 | |||
376 | -- | ||
377 | 2.1.4 | ||
378 | |||
diff --git a/meta/recipes-devtools/apt/apt-1.0.9.9/0001-fix-the-gcc-version-check.patch b/meta/recipes-devtools/apt/apt-1.0.9.9/0001-fix-the-gcc-version-check.patch new file mode 100644 index 0000000000..beea56d2ae --- /dev/null +++ b/meta/recipes-devtools/apt/apt-1.0.9.9/0001-fix-the-gcc-version-check.patch | |||
@@ -0,0 +1,160 @@ | |||
1 | From 15c6ef6a827d3681ad06e862d27ab3dfb84cb687 Mon Sep 17 00:00:00 2001 | ||
2 | From: Roy Li <rongqing.li@windriver.com> | ||
3 | Date: Wed, 27 May 2015 14:30:28 +0800 | ||
4 | Subject: [PATCH] fix the gcc version check | ||
5 | |||
6 | Upstream-Status: pending | ||
7 | |||
8 | "GCC diagnostic push" is gcc 4.6 feature, gcc 4.4.7 on centos did not know it | ||
9 | |||
10 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
11 | --- | ||
12 | apt-pkg/cacheset.h | 4 ++-- | ||
13 | apt-pkg/deb/debsrcrecords.cc | 12 ++++++------ | ||
14 | apt-pkg/srcrecords.cc | 4 ++-- | ||
15 | apt-pkg/srcrecords.h | 4 ++-- | ||
16 | apt-pkg/vendorlist.cc | 4 ++-- | ||
17 | 5 files changed, 14 insertions(+), 14 deletions(-) | ||
18 | |||
19 | diff --git a/apt-pkg/cacheset.h b/apt-pkg/cacheset.h | ||
20 | index b7229bc..8cc2917 100644 | ||
21 | --- a/apt-pkg/cacheset.h | ||
22 | +++ b/apt-pkg/cacheset.h | ||
23 | @@ -119,12 +119,12 @@ public: | ||
24 | inline std::string FullName(bool const Pretty) const { return getPkg().FullName(Pretty); } | ||
25 | inline std::string FullName() const { return getPkg().FullName(); } | ||
26 | APT_DEPRECATED inline const char *Section() const { | ||
27 | -#if __GNUC__ >= 4 | ||
28 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) | ||
29 | #pragma GCC diagnostic push | ||
30 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
31 | #endif | ||
32 | return getPkg().Section(); | ||
33 | -#if __GNUC__ >= 4 | ||
34 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) | ||
35 | #pragma GCC diagnostic pop | ||
36 | #endif | ||
37 | } | ||
38 | diff --git a/apt-pkg/deb/debsrcrecords.cc b/apt-pkg/deb/debsrcrecords.cc | ||
39 | index 49a348d..4bc9dcf 100644 | ||
40 | --- a/apt-pkg/deb/debsrcrecords.cc | ||
41 | +++ b/apt-pkg/deb/debsrcrecords.cc | ||
42 | @@ -126,13 +126,13 @@ bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &F) | ||
43 | for (std::vector<pkgSrcRecords::File2>::const_iterator f2 = F2.begin(); f2 != F2.end(); ++f2) | ||
44 | { | ||
45 | pkgSrcRecords::File2 f; | ||
46 | -#if __GNUC__ >= 4 | ||
47 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) | ||
48 | #pragma GCC diagnostic push | ||
49 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
50 | #endif | ||
51 | f.MD5Hash = f2->MD5Hash; | ||
52 | f.Size = f2->Size; | ||
53 | -#if __GNUC__ >= 4 | ||
54 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) | ||
55 | #pragma GCC diagnostic pop | ||
56 | #endif | ||
57 | f.Path = f2->Path; | ||
58 | @@ -190,14 +190,14 @@ bool debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2> &List) | ||
59 | // we have it already, store the new hash and be done | ||
60 | if (file != List.end()) | ||
61 | { | ||
62 | -#if __GNUC__ >= 4 | ||
63 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) | ||
64 | // set for compatibility only, so warn users not us | ||
65 | #pragma GCC diagnostic push | ||
66 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
67 | #endif | ||
68 | if (checksumField == "Files") | ||
69 | file->MD5Hash = hash; | ||
70 | -#if __GNUC__ >= 4 | ||
71 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) | ||
72 | #pragma GCC diagnostic pop | ||
73 | #endif | ||
74 | // an error here indicates that we have two different hashes for the same file | ||
75 | @@ -212,7 +212,7 @@ bool debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2> &List) | ||
76 | F.FileSize = strtoull(size.c_str(), NULL, 10); | ||
77 | F.Hashes.push_back(hashString); | ||
78 | |||
79 | -#if __GNUC__ >= 4 | ||
80 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) | ||
81 | // set for compatibility only, so warn users not us | ||
82 | #pragma GCC diagnostic push | ||
83 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
84 | @@ -220,7 +220,7 @@ bool debSrcRecordParser::Files2(std::vector<pkgSrcRecords::File2> &List) | ||
85 | F.Size = F.FileSize; | ||
86 | if (checksumField == "Files") | ||
87 | F.MD5Hash = hash; | ||
88 | -#if __GNUC__ >= 4 | ||
89 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) | ||
90 | #pragma GCC diagnostic pop | ||
91 | #endif | ||
92 | |||
93 | diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc | ||
94 | index 3175ee7..340e796 100644 | ||
95 | --- a/apt-pkg/srcrecords.cc | ||
96 | +++ b/apt-pkg/srcrecords.cc | ||
97 | @@ -160,7 +160,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/ | ||
98 | for (std::vector<pkgSrcRecords::File>::const_iterator f = F.begin(); f != F.end(); ++f) | ||
99 | { | ||
100 | pkgSrcRecords::File2 f2; | ||
101 | -#if __GNUC__ >= 4 | ||
102 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) | ||
103 | #pragma GCC diagnostic push | ||
104 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
105 | #endif | ||
106 | @@ -168,7 +168,7 @@ bool pkgSrcRecords::Parser::Files2(std::vector<pkgSrcRecords::File2> &F2)/*{{{*/ | ||
107 | f2.Size = f->Size; | ||
108 | f2.Hashes.push_back(HashString("MD5Sum", f->MD5Hash)); | ||
109 | f2.FileSize = f->Size; | ||
110 | -#if __GNUC__ >= 4 | ||
111 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) | ||
112 | #pragma GCC diagnostic pop | ||
113 | #endif | ||
114 | f2.Path = f->Path; | ||
115 | diff --git a/apt-pkg/srcrecords.h b/apt-pkg/srcrecords.h | ||
116 | index dde22bd..91f8061 100644 | ||
117 | --- a/apt-pkg/srcrecords.h | ||
118 | +++ b/apt-pkg/srcrecords.h | ||
119 | @@ -30,7 +30,7 @@ class pkgSrcRecords | ||
120 | { | ||
121 | public: | ||
122 | |||
123 | -#if __GNUC__ >= 4 | ||
124 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) | ||
125 | // ensure that con- & de-structor don't trigger this warning | ||
126 | #pragma GCC diagnostic push | ||
127 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
128 | @@ -48,7 +48,7 @@ class pkgSrcRecords | ||
129 | unsigned long long FileSize; | ||
130 | HashStringList Hashes; | ||
131 | }; | ||
132 | -#if __GNUC__ >= 4 | ||
133 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) | ||
134 | #pragma GCC diagnostic pop | ||
135 | #endif | ||
136 | |||
137 | diff --git a/apt-pkg/vendorlist.cc b/apt-pkg/vendorlist.cc | ||
138 | index fb33ff1..ba1d3c3 100644 | ||
139 | --- a/apt-pkg/vendorlist.cc | ||
140 | +++ b/apt-pkg/vendorlist.cc | ||
141 | @@ -11,7 +11,7 @@ | ||
142 | |||
143 | #include <apti18n.h> | ||
144 | |||
145 | -#if __GNUC__ >= 4 | ||
146 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) | ||
147 | #pragma GCC diagnostic push | ||
148 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations" | ||
149 | #endif | ||
150 | @@ -163,6 +163,6 @@ const Vendor* pkgVendorList::FindVendor(const std::vector<string> GPGVOutput) /* | ||
151 | } | ||
152 | /*}}}*/ | ||
153 | |||
154 | -#if __GNUC__ >= 4 | ||
155 | +#if __GNUC__ >= 4 + (6 >= __GNUC_MINOR__) | ||
156 | #pragma GCC diagnostic pop | ||
157 | #endif | ||
158 | -- | ||
159 | 1.9.1 | ||
160 | |||
diff --git a/meta/recipes-devtools/apt/apt-1.0.9.9/0001-remove-Wsuggest-attribute-from-CFLAGS.patch b/meta/recipes-devtools/apt/apt-1.0.9.9/0001-remove-Wsuggest-attribute-from-CFLAGS.patch new file mode 100644 index 0000000000..7c42ff07b8 --- /dev/null +++ b/meta/recipes-devtools/apt/apt-1.0.9.9/0001-remove-Wsuggest-attribute-from-CFLAGS.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 2bff7ee06a4f96e7d326991d61fb86f8aa651d48 Mon Sep 17 00:00:00 2001 | ||
2 | From: Roy Li <rongqing.li@windriver.com> | ||
3 | Date: Wed, 27 May 2015 09:48:45 +0800 | ||
4 | Subject: [PATCH] remove Wsuggest-attribute from CXXFLAGS | ||
5 | |||
6 | Upstream-Status: Inappropriate | ||
7 | |||
8 | Wsuggest-attribute is GCC 4.6 feature, centos6 is using GCC | ||
9 | 4.4.7 which unknown this flag, so remove it from CXXFLAGS | ||
10 | |||
11 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
12 | --- | ||
13 | buildlib/environment.mak.in | 1 - | ||
14 | test/libapt/makefile | 1 - | ||
15 | 2 files changed, 2 deletions(-) | ||
16 | |||
17 | diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in | ||
18 | index b0a8d9d..91ed011 100644 | ||
19 | --- a/buildlib/environment.mak.in | ||
20 | +++ b/buildlib/environment.mak.in | ||
21 | @@ -11,7 +11,6 @@ CPPFLAGS+= @CPPFLAGS@ @DEFS@ -D_REENTRANT -D_FORTIFY_SOURCE=2 | ||
22 | CXX = @CXX@ | ||
23 | CXXFLAGS+= @CXXFLAGS@ -Wall -Wextra | ||
24 | CXXFLAGS+= -Wcast-align -Wlogical-op -Wredundant-decls -Wmissing-declarations -Wunsafe-loop-optimizations | ||
25 | -CXXFLAGS+= -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=noreturn | ||
26 | # a bit too pedantic to be run by default | ||
27 | #CXXFLAGS+= -Wpedantic -Wno-long-long -Wno-vla -Wno-variadic-macros | ||
28 | NUM_PROCS = @NUM_PROCS@ | ||
29 | diff --git a/test/libapt/makefile b/test/libapt/makefile | ||
30 | index 7f23ace..e805f13 100644 | ||
31 | --- a/test/libapt/makefile | ||
32 | +++ b/test/libapt/makefile | ||
33 | @@ -39,7 +39,6 @@ CXXFLAGS += -pthread | ||
34 | # disable some flags for gtest again | ||
35 | CXXFLAGS+= -Wno-missing-declarations | ||
36 | CXXFLAGS+= -Wno-missing-field-initializers | ||
37 | -CXXFLAGS+= -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -Wno-suggest-attribute=noreturn | ||
38 | |||
39 | # All Google Test headers. Usually you shouldn't change this definition. | ||
40 | GTEST_HEADERS = /usr/include/gtest/*.h \ | ||
41 | -- | ||
42 | 1.9.1 | ||
43 | |||
diff --git a/meta/recipes-devtools/apt/apt-0.9.9.4/disable-configure-in-makefile.patch b/meta/recipes-devtools/apt/apt-1.0.9.9/disable-configure-in-makefile.patch index 7c2f64e3e6..7c2f64e3e6 100644 --- a/meta/recipes-devtools/apt/apt-0.9.9.4/disable-configure-in-makefile.patch +++ b/meta/recipes-devtools/apt/apt-1.0.9.9/disable-configure-in-makefile.patch | |||
diff --git a/meta/recipes-devtools/apt/apt-1.0.9.9/disable-test.patch b/meta/recipes-devtools/apt/apt-1.0.9.9/disable-test.patch new file mode 100644 index 0000000000..676795dc8a --- /dev/null +++ b/meta/recipes-devtools/apt/apt-1.0.9.9/disable-test.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | [PATCH] disable test | ||
2 | |||
3 | Upstream-Status: Inappropriate [configuration] | ||
4 | |||
5 | test needs gtest package, so not build the test dir | ||
6 | |||
7 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
8 | --- | ||
9 | Makefile | 7 +++---- | ||
10 | configure.ac | 6 ------ | ||
11 | 2 files changed, 3 insertions(+), 10 deletions(-) | ||
12 | |||
13 | diff --git a/Makefile b/Makefile | ||
14 | index 5f5fb27..5070e96 100644 | ||
15 | --- a/Makefile | ||
16 | +++ b/Makefile | ||
17 | @@ -9,8 +9,8 @@ endif | ||
18 | .PHONY: default | ||
19 | default: startup all | ||
20 | |||
21 | -.PHONY: headers library clean veryclean all binary program doc test update-po | ||
22 | -all headers library clean veryclean binary program doc manpages docbook test update-po startup dirs: | ||
23 | +.PHONY: headers library clean veryclean all binary program doc update-po | ||
24 | +all headers library clean veryclean binary program doc manpages docbook update-po startup dirs: | ||
25 | $(MAKE) -C vendor $@ | ||
26 | $(MAKE) -C apt-pkg $@ | ||
27 | $(MAKE) -C apt-inst $@ | ||
28 | @@ -21,9 +21,8 @@ all headers library clean veryclean binary program doc manpages docbook test upd | ||
29 | $(MAKE) -C dselect $@ | ||
30 | # $(MAKE) -C doc $@ | ||
31 | $(MAKE) -C po $@ | ||
32 | - $(MAKE) -C test $@ | ||
33 | |||
34 | -all headers library clean veryclean binary program doc manpages docbook test update-po: startup dirs | ||
35 | +all headers library clean veryclean binary program doc manpages docbook update-po: startup dirs | ||
36 | |||
37 | dirs: startup | ||
38 | |||
39 | diff --git a/configure.ac b/configure.ac | ||
40 | index 5663aaf..b0f9564 100644 | ||
41 | --- a/configure.ac | ||
42 | +++ b/configure.ac | ||
43 | @@ -89,12 +89,6 @@ AC_CHECK_LIB(curl, curl_easy_init, | ||
44 | AC_MSG_ERROR([failed: I need CURL due https support]), | ||
45 | ) | ||
46 | |||
47 | -AC_LANG_PUSH([C++]) | ||
48 | -AC_CHECK_HEADER(gtest/gtest.h,, | ||
49 | - AC_MSG_ERROR([failed: I need gtest to build tests]), | ||
50 | -) | ||
51 | -AC_LANG_POP([C++]) | ||
52 | - | ||
53 | |||
54 | AC_SUBST(BDBLIB) | ||
55 | |||
56 | -- | ||
57 | 1.9.1 | ||
58 | |||
diff --git a/meta/recipes-devtools/apt/apt-0.9.9.4/fix-gcc-4.6-null-not-defined.patch b/meta/recipes-devtools/apt/apt-1.0.9.9/fix-gcc-4.6-null-not-defined.patch index 801ae6dddb..801ae6dddb 100644 --- a/meta/recipes-devtools/apt/apt-0.9.9.4/fix-gcc-4.6-null-not-defined.patch +++ b/meta/recipes-devtools/apt/apt-1.0.9.9/fix-gcc-4.6-null-not-defined.patch | |||
diff --git a/meta/recipes-devtools/apt/apt-0.9.9.4/makerace.patch b/meta/recipes-devtools/apt/apt-1.0.9.9/makerace.patch index 46e3161b67..46e3161b67 100644 --- a/meta/recipes-devtools/apt/apt-0.9.9.4/makerace.patch +++ b/meta/recipes-devtools/apt/apt-1.0.9.9/makerace.patch | |||
diff --git a/meta/recipes-devtools/apt/apt-0.9.9.4/no-nls-dpkg.patch b/meta/recipes-devtools/apt/apt-1.0.9.9/no-nls-dpkg.patch index a0996d4d44..a0996d4d44 100644 --- a/meta/recipes-devtools/apt/apt-0.9.9.4/no-nls-dpkg.patch +++ b/meta/recipes-devtools/apt/apt-1.0.9.9/no-nls-dpkg.patch | |||
diff --git a/meta/recipes-devtools/apt/apt-0.9.9.4/noconfigure.patch b/meta/recipes-devtools/apt/apt-1.0.9.9/noconfigure.patch index 712d5e7296..ebc67203b4 100644 --- a/meta/recipes-devtools/apt/apt-0.9.9.4/noconfigure.patch +++ b/meta/recipes-devtools/apt/apt-1.0.9.9/noconfigure.patch | |||
@@ -1,24 +1,25 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | 1 | Upstream-Status: Inappropriate [configuration] |
2 | Signed-off-by: Constantin Musca <constantinx.musca@intel.com> | 2 | Signed-off-by: Constantin Musca <constantinx.musca@intel.com> |
3 | 3 | ||
4 | Index: apt-0.9.7.7/apt-pkg/packagemanager.cc | 4 | |
5 | =================================================================== | 5 | diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc |
6 | --- apt-0.9.7.7.orig/apt-pkg/packagemanager.cc | 6 | index 249542c..0a1911f 100644 |
7 | +++ apt-0.9.7.7/apt-pkg/packagemanager.cc | 7 | --- a/apt-pkg/packagemanager.cc |
8 | @@ -893,10 +893,12 @@ bool pkgPackageManager::SmartUnPack(PkgI | 8 | +++ b/apt-pkg/packagemanager.cc |
9 | @@ -952,10 +952,12 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c | ||
9 | return false; | 10 | return false; |
10 | 11 | ||
11 | if (Immediate == true) { | 12 | if (Immediate == true) { |
12 | +#if 0 | 13 | +#if 0 |
13 | // Perform immedate configuration of the package. | 14 | // Perform immedate configuration of the package. |
14 | if (SmartConfigure(Pkg, Depth + 1) == false) | 15 | if (SmartConfigure(Pkg, Depth + 1) == false) |
15 | _error->Warning(_("Could not perform immediate configuration on '%s'. " | 16 | _error->Error(_("Could not perform immediate configuration on '%s'. " |
16 | "Please see man 5 apt.conf under APT::Immediate-Configure for details. (%d)"),Pkg.FullName().c_str(),2); | 17 | "Please see man 5 apt.conf under APT::Immediate-Configure for details. (%d)"),Pkg.FullName().c_str(),2); |
17 | +#endif | 18 | +#endif |
18 | } | 19 | } |
19 | 20 | ||
20 | return true; | 21 | return true; |
21 | @@ -986,6 +988,7 @@ pkgPackageManager::OrderResult pkgPackag | 22 | @@ -1038,6 +1040,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall() |
22 | } | 23 | } |
23 | } | 24 | } |
24 | 25 | ||
@@ -26,7 +27,7 @@ Index: apt-0.9.7.7/apt-pkg/packagemanager.cc | |||
26 | // Final run through the configure phase | 27 | // Final run through the configure phase |
27 | if (ConfigureAll() == false) | 28 | if (ConfigureAll() == false) |
28 | return Failed; | 29 | return Failed; |
29 | @@ -1000,6 +1003,7 @@ pkgPackageManager::OrderResult pkgPackag | 30 | @@ -1052,6 +1055,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall() |
30 | return Failed; | 31 | return Failed; |
31 | } | 32 | } |
32 | } | 33 | } |
diff --git a/meta/recipes-devtools/apt/apt-0.9.9.4/nodoc.patch b/meta/recipes-devtools/apt/apt-1.0.9.9/nodoc.patch index 449e42df4a..449e42df4a 100644 --- a/meta/recipes-devtools/apt/apt-0.9.9.4/nodoc.patch +++ b/meta/recipes-devtools/apt/apt-1.0.9.9/nodoc.patch | |||
diff --git a/meta/recipes-devtools/apt/apt-0.9.9.4/truncate-filename.patch b/meta/recipes-devtools/apt/apt-1.0.9.9/truncate-filename.patch index db1c42b66c..db1c42b66c 100644 --- a/meta/recipes-devtools/apt/apt-0.9.9.4/truncate-filename.patch +++ b/meta/recipes-devtools/apt/apt-1.0.9.9/truncate-filename.patch | |||
diff --git a/meta/recipes-devtools/apt/apt-0.9.9.4/use-host.patch b/meta/recipes-devtools/apt/apt-1.0.9.9/use-host.patch index 25caa3b0a5..b30fcff0d6 100644 --- a/meta/recipes-devtools/apt/apt-0.9.9.4/use-host.patch +++ b/meta/recipes-devtools/apt/apt-1.0.9.9/use-host.patch | |||
@@ -1,9 +1,9 @@ | |||
1 | Upstream-Status: Pending | 1 | Upstream-Status: Pending |
2 | 2 | ||
3 | Index: apt-0.9.7.7/configure.in | 3 | Index: apt-0.9.7.7/configure.ac |
4 | =================================================================== | 4 | =================================================================== |
5 | --- apt-0.9.7.7.orig/configure.in | 5 | --- apt-0.9.7.7.orig/configure.ac |
6 | +++ apt-0.9.7.7/configure.in | 6 | +++ apt-0.9.7.7/configure.ac |
7 | @@ -112,7 +112,7 @@ dnl This is often the dpkg architecture | 7 | @@ -112,7 +112,7 @@ dnl This is often the dpkg architecture |
8 | dnl First check against the full canonical canoncial-system-type in $target | 8 | dnl First check against the full canonical canoncial-system-type in $target |
9 | dnl and if that fails, just look for the cpu | 9 | dnl and if that fails, just look for the cpu |
diff --git a/meta/recipes-devtools/apt/apt-native.inc b/meta/recipes-devtools/apt/apt-native.inc index fede8694c4..567eb0ca73 100644 --- a/meta/recipes-devtools/apt/apt-native.inc +++ b/meta/recipes-devtools/apt/apt-native.inc | |||
@@ -1,11 +1,15 @@ | |||
1 | require apt.inc | 1 | require apt.inc |
2 | inherit native | 2 | inherit native |
3 | 3 | ||
4 | DEPENDS += "dpkg-native gettext-native db-native curl-native" | 4 | DEPENDS += "dpkg-native gettext-native db-native curl-native xz-native" |
5 | PACKAGES = "" | 5 | PACKAGES = "" |
6 | USE_NLS = "yes" | 6 | USE_NLS = "yes" |
7 | 7 | ||
8 | SRC_URI += "file://db_linking_hack.patch" | 8 | SRC_URI += "file://db_linking_hack.patch \ |
9 | file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \ | ||
10 | file://0001-remove-Wsuggest-attribute-from-CFLAGS.patch \ | ||
11 | file://0001-fix-the-gcc-version-check.patch \ | ||
12 | " | ||
9 | 13 | ||
10 | python do_install () { | 14 | python do_install () { |
11 | bb.build.exec_func('do_install_base', d) | 15 | bb.build.exec_func('do_install_base', d) |
@@ -41,6 +45,8 @@ do_install_base () { | |||
41 | install -m 0755 bin/apt-extracttemplates ${D}${bindir}/ | 45 | install -m 0755 bin/apt-extracttemplates ${D}${bindir}/ |
42 | install -m 0755 bin/apt-ftparchive ${D}${bindir}/ | 46 | install -m 0755 bin/apt-ftparchive ${D}${bindir}/ |
43 | 47 | ||
48 | oe_libinstall -so -C bin libapt-private ${D}${libdir}/ | ||
49 | |||
44 | eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'` | 50 | eval `cat environment.mak | grep ^GLIBC_VER | sed -e's, = ,=,'` |
45 | eval `cat environment.mak | grep ^LIBSTDCPP_VER | sed -e's, = ,=,'` | 51 | eval `cat environment.mak | grep ^LIBSTDCPP_VER | sed -e's, = ,=,'` |
46 | oe_libinstall -so -C bin libapt-pkg$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/ | 52 | oe_libinstall -so -C bin libapt-pkg$GLIBC_VER$LIBSTDCPP_VER ${D}${libdir}/ |
diff --git a/meta/recipes-devtools/apt/apt-native_0.9.9.4.bb b/meta/recipes-devtools/apt/apt-native_1.0.9.9.bb index d5934f9942..cbaf25be68 100644 --- a/meta/recipes-devtools/apt/apt-native_0.9.9.4.bb +++ b/meta/recipes-devtools/apt/apt-native_1.0.9.9.bb | |||
@@ -3,7 +3,7 @@ require apt-native.inc | |||
3 | SRC_URI += "file://noconfigure.patch \ | 3 | SRC_URI += "file://noconfigure.patch \ |
4 | file://no-curl.patch" | 4 | file://no-curl.patch" |
5 | 5 | ||
6 | SRC_URI[md5sum] = "72b3283acd9b99868da5545f0499b0da" | 6 | SRC_URI[md5sum] = "e70c6d6227883cfc0dda6bc5db509bca" |
7 | SRC_URI[sha256sum] = "770cb94d7f4c922c2a1516f2b5ec852d3ad668a8c9c3713ac2528c861b7fa79a" | 7 | SRC_URI[sha256sum] = "96bebcd7bfee0b2386741a8315182ba39487bdd743ecf5c1fc5b8b889cca2478" |
8 | 8 | ||
9 | LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" | 9 | LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" |
diff --git a/meta/recipes-devtools/apt/apt.inc b/meta/recipes-devtools/apt/apt.inc index 321934b97d..04fcd65622 100644 --- a/meta/recipes-devtools/apt/apt.inc +++ b/meta/recipes-devtools/apt/apt.inc | |||
@@ -2,8 +2,7 @@ SUMMARY = "Advanced front-end for dpkg" | |||
2 | LICENSE = "GPLv2.0+" | 2 | LICENSE = "GPLv2.0+" |
3 | SECTION = "base" | 3 | SECTION = "base" |
4 | 4 | ||
5 | SRC_URI = "http://snapshot.debian.org/archive/debian/20130726T154545Z/pool/main/a/${BPN}/${BPN}_${PV}.tar.gz \ | 5 | SRC_URI = "http://snapshot.debian.org/archive/debian/20150428T221633Z/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \ |
6 | file://no-ko-translation.patch \ | ||
7 | file://use-host.patch \ | 6 | file://use-host.patch \ |
8 | file://makerace.patch \ | 7 | file://makerace.patch \ |
9 | file://no-nls-dpkg.patch \ | 8 | file://no-nls-dpkg.patch \ |
@@ -11,7 +10,7 @@ SRC_URI = "http://snapshot.debian.org/archive/debian/20130726T154545Z/pool/main/ | |||
11 | file://truncate-filename.patch \ | 10 | file://truncate-filename.patch \ |
12 | file://nodoc.patch \ | 11 | file://nodoc.patch \ |
13 | file://disable-configure-in-makefile.patch \ | 12 | file://disable-configure-in-makefile.patch \ |
14 | file://apt-0.9.9.4-CVE-2014-0478.patch \ | 13 | file://disable-test.patch \ |
15 | " | 14 | " |
16 | 15 | ||
17 | inherit autotools gettext | 16 | inherit autotools gettext |
diff --git a/meta/recipes-devtools/apt/apt_0.9.9.4.bb b/meta/recipes-devtools/apt/apt_1.0.9.9.bb index 77cbff1c0c..4c40d0dd49 100644 --- a/meta/recipes-devtools/apt/apt_0.9.9.4.bb +++ b/meta/recipes-devtools/apt/apt_1.0.9.9.bb | |||
@@ -3,11 +3,14 @@ RDEPENDS_${PN} = "dpkg bash debianutils" | |||
3 | LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" | 3 | LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3" |
4 | require apt.inc | 4 | require apt.inc |
5 | 5 | ||
6 | SRC_URI[md5sum] = "72b3283acd9b99868da5545f0499b0da" | 6 | SRC_URI[md5sum] = "e70c6d6227883cfc0dda6bc5db509bca" |
7 | SRC_URI[sha256sum] = "770cb94d7f4c922c2a1516f2b5ec852d3ad668a8c9c3713ac2528c861b7fa79a" | 7 | SRC_URI[sha256sum] = "96bebcd7bfee0b2386741a8315182ba39487bdd743ecf5c1fc5b8b889cca2478" |
8 | 8 | ||
9 | require apt-package.inc | 9 | require apt-package.inc |
10 | 10 | ||
11 | PACKAGECONFIG ??= "lzma" | ||
12 | PACKAGECONFIG[lzma] = "ac_cv_lib_lzma_lzma_easy_encoder=yes,ac_cv_lib_lzma_lzma_easy_encoder=no,xz" | ||
13 | |||
11 | FILES_${PN} += "${bindir}/apt-key" | 14 | FILES_${PN} += "${bindir}/apt-key" |
12 | apt-manpages += "doc/apt-key.8" | 15 | apt-manpages += "doc/apt-key.8" |
13 | 16 | ||
@@ -15,4 +18,5 @@ do_install_append() { | |||
15 | #Write the correct apt-architecture to apt.conf | 18 | #Write the correct apt-architecture to apt.conf |
16 | APT_CONF=${D}/etc/apt/apt.conf | 19 | APT_CONF=${D}/etc/apt/apt.conf |
17 | echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} | 20 | echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} |
21 | oe_libinstall -so -C bin libapt-private ${D}${libdir}/ | ||
18 | } | 22 | } |
diff --git a/meta/recipes-devtools/apt/files/db_linking_hack.patch b/meta/recipes-devtools/apt/files/db_linking_hack.patch index d2246b3d2b..a61d4b07c2 100644 --- a/meta/recipes-devtools/apt/files/db_linking_hack.patch +++ b/meta/recipes-devtools/apt/files/db_linking_hack.patch | |||
@@ -1,9 +1,9 @@ | |||
1 | Upstream-Status: Backport | 1 | Upstream-Status: Backport |
2 | 2 | ||
3 | Index: apt-0.7.3/configure.in | 3 | Index: apt-0.7.3/configure.ac |
4 | =================================================================== | 4 | =================================================================== |
5 | --- apt-0.7.3.orig/configure.in 2007-07-01 10:38:45.000000000 +0000 | 5 | --- apt-0.7.3.orig/configure.ac 2007-07-01 10:38:45.000000000 +0000 |
6 | +++ apt-0.7.3/configure.in 2007-08-21 13:39:26.000000000 +0000 | 6 | +++ apt-0.7.3/configure.ac 2007-08-21 13:39:26.000000000 +0000 |
7 | @@ -67,8 +67,20 @@ | 7 | @@ -67,8 +67,20 @@ |
8 | [AC_DEFINE(HAVE_BDB) | 8 | [AC_DEFINE(HAVE_BDB) |
9 | BDBLIB="-ldb" | 9 | BDBLIB="-ldb" |
diff --git a/meta/recipes-devtools/apt/files/no-curl.patch b/meta/recipes-devtools/apt/files/no-curl.patch index 9fd3b3ab79..30238faad3 100644 --- a/meta/recipes-devtools/apt/files/no-curl.patch +++ b/meta/recipes-devtools/apt/files/no-curl.patch | |||
@@ -5,8 +5,8 @@ Upstream-Status: Inappropriate [configuration] | |||
5 | methods/makefile | 7 ------- | 5 | methods/makefile | 7 ------- |
6 | 2 files changed, 13 deletions(-) | 6 | 2 files changed, 13 deletions(-) |
7 | 7 | ||
8 | --- a/configure.in | 8 | --- a/configure.ac |
9 | +++ b/configure.in | 9 | +++ b/configure.ac |
10 | @@ -86,12 +86,6 @@ AC_CHECK_HEADER(db.h, | 10 | @@ -86,12 +86,6 @@ AC_CHECK_HEADER(db.h, |
11 | 11 | ||
12 | LIBS="$saveLIBS" | 12 | LIBS="$saveLIBS" |
@@ -23,14 +23,14 @@ Upstream-Status: Inappropriate [configuration] | |||
23 | --- a/methods/makefile | 23 | --- a/methods/makefile |
24 | +++ b/methods/makefile | 24 | +++ b/methods/makefile |
25 | @@ -51,13 +51,6 @@ LIB_MAKES = apt-pkg/makefile | 25 | @@ -51,13 +51,6 @@ LIB_MAKES = apt-pkg/makefile |
26 | SOURCE = http.cc http_main.cc rfc2553emu.cc connect.cc | 26 | SOURCE = http.cc http_main.cc rfc2553emu.cc connect.cc server.cc |
27 | include $(PROGRAM_H) | 27 | include $(PROGRAM_H) |
28 | 28 | ||
29 | -# The https method | 29 | -# The https method |
30 | -PROGRAM=https | 30 | -PROGRAM=https |
31 | -SLIBS = -lapt-pkg -lcurl $(INTLLIBS) | 31 | -SLIBS = -lapt-pkg -lcurl $(INTLLIBS) |
32 | -LIB_MAKES = apt-pkg/makefile | 32 | -LIB_MAKES = apt-pkg/makefile |
33 | -SOURCE = https.cc | 33 | -SOURCE = https.cc server.cc |
34 | -include $(PROGRAM_H) | 34 | -include $(PROGRAM_H) |
35 | - | 35 | - |
36 | # The ftp method | 36 | # The ftp method |