diff options
Diffstat (limited to 'meta/recipes-devtools/apt')
11 files changed, 264 insertions, 158 deletions
diff --git a/meta/recipes-devtools/apt/apt/0001-Disable-documentation-directory-altogether.patch b/meta/recipes-devtools/apt/apt/0001-Disable-documentation-directory-altogether.patch index cc422b74dc..5443ff6caa 100644 --- a/meta/recipes-devtools/apt/apt/0001-Disable-documentation-directory-altogether.patch +++ b/meta/recipes-devtools/apt/apt/0001-Disable-documentation-directory-altogether.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From cd164b353ba7958d51b2f33f4079fb9787c983e2 Mon Sep 17 00:00:00 2001 | 1 | From f629d1c3fcfb560ed24efc3e73d4e4999b1eab33 Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Fri, 10 May 2019 14:16:47 +0200 | 3 | Date: Fri, 10 May 2019 14:16:47 +0200 |
4 | Subject: [PATCH] Disable documentation directory altogether | 4 | Subject: [PATCH] Disable documentation directory altogether |
@@ -13,11 +13,11 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | |||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | 13 | 1 file changed, 1 insertion(+), 1 deletion(-) |
14 | 14 | ||
15 | diff --git a/CMakeLists.txt b/CMakeLists.txt | 15 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
16 | index 83334ba..2cd4f8e 100644 | 16 | index 668e2d762..62f441bfa 100644 |
17 | --- a/CMakeLists.txt | 17 | --- a/CMakeLists.txt |
18 | +++ b/CMakeLists.txt | 18 | +++ b/CMakeLists.txt |
19 | @@ -232,7 +232,7 @@ add_subdirectory(apt-private) | 19 | @@ -246,7 +246,7 @@ add_subdirectory(apt-private) |
20 | add_subdirectory(apt-inst) | 20 | endif() |
21 | add_subdirectory(cmdline) | 21 | add_subdirectory(cmdline) |
22 | add_subdirectory(completions) | 22 | add_subdirectory(completions) |
23 | -add_subdirectory(doc) | 23 | -add_subdirectory(doc) |
diff --git a/meta/recipes-devtools/apt/apt/0001-Do-not-configure-packages-on-installation.patch b/meta/recipes-devtools/apt/apt/0001-Do-not-configure-packages-on-installation.patch deleted file mode 100644 index 81b328a2ee..0000000000 --- a/meta/recipes-devtools/apt/apt/0001-Do-not-configure-packages-on-installation.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From 96d23fc57d1ff9c851d563d6d6a6c4752dc4f1b6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Thu, 21 May 2020 20:28:12 +0000 | ||
4 | Subject: [PATCH] Do not configure packages on installation | ||
5 | |||
6 | This is done separately in do_rootfs(). | ||
7 | |||
8 | Upstream-Status: Inappropriate [oe-core specific] | ||
9 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
10 | |||
11 | --- | ||
12 | apt-pkg/packagemanager.cc | 5 ++++- | ||
13 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc | ||
16 | index 156f7ad..0f6a87c 100644 | ||
17 | --- a/apt-pkg/packagemanager.cc | ||
18 | +++ b/apt-pkg/packagemanager.cc | ||
19 | @@ -1013,10 +1013,12 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c | ||
20 | return false; | ||
21 | |||
22 | if (Immediate == true) { | ||
23 | +#if 0 | ||
24 | // Perform immediate configuration of the package. | ||
25 | if (SmartConfigure(Pkg, Depth + 1) == false) | ||
26 | _error->Error(_("Could not perform immediate configuration on '%s'. " | ||
27 | "Please see man 5 apt.conf under APT::Immediate-Configure for details. (%d)"),Pkg.FullName().c_str(),2); | ||
28 | +#endif | ||
29 | } | ||
30 | |||
31 | return true; | ||
32 | @@ -1111,6 +1113,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall() | ||
33 | } | ||
34 | } | ||
35 | |||
36 | +#if 0 | ||
37 | // Final run through the configure phase | ||
38 | if (ConfigureAll() == false) | ||
39 | return Failed; | ||
40 | @@ -1125,7 +1128,7 @@ pkgPackageManager::OrderResult pkgPackageManager::OrderInstall() | ||
41 | return Failed; | ||
42 | } | ||
43 | } | ||
44 | - | ||
45 | +#endif | ||
46 | return Completed; | ||
47 | } | ||
48 | // PM::DoInstallPostFork - compat /*{{{*/ | ||
diff --git a/meta/recipes-devtools/apt/apt/0001-Do-not-init-tables-from-dpkg-configuration.patch b/meta/recipes-devtools/apt/apt/0001-Do-not-init-tables-from-dpkg-configuration.patch index 1417153e81..37a3133010 100644 --- a/meta/recipes-devtools/apt/apt/0001-Do-not-init-tables-from-dpkg-configuration.patch +++ b/meta/recipes-devtools/apt/apt/0001-Do-not-init-tables-from-dpkg-configuration.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From bf45c314867e5fb12141803fba06f3e45679d628 Mon Sep 17 00:00:00 2001 | 1 | From b84280fec4e1d0d33eca78e76556023f8f8fe5b7 Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Fri, 10 May 2019 16:47:38 +0200 | 3 | Date: Fri, 10 May 2019 16:47:38 +0200 |
4 | Subject: [PATCH] Do not init tables from dpkg configuration | 4 | Subject: [PATCH] Do not init tables from dpkg configuration |
@@ -13,7 +13,7 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | |||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | 13 | 1 file changed, 2 insertions(+), 2 deletions(-) |
14 | 14 | ||
15 | diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc | 15 | diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc |
16 | index a619368..6e5a6cf 100644 | 16 | index b9d9b15d2..1725c5966 100644 |
17 | --- a/apt-pkg/init.cc | 17 | --- a/apt-pkg/init.cc |
18 | +++ b/apt-pkg/init.cc | 18 | +++ b/apt-pkg/init.cc |
19 | @@ -281,8 +281,8 @@ bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys) | 19 | @@ -281,8 +281,8 @@ bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys) |
diff --git a/meta/recipes-devtools/apt/apt/0001-Fix-musl-build.patch b/meta/recipes-devtools/apt/apt/0001-Fix-musl-build.patch index a6e8ef1e51..0cefbedd6d 100644 --- a/meta/recipes-devtools/apt/apt/0001-Fix-musl-build.patch +++ b/meta/recipes-devtools/apt/apt/0001-Fix-musl-build.patch | |||
@@ -1,22 +1,18 @@ | |||
1 | From 081c6be2f2f1cd77f399ea414f8d89c107826624 Mon Sep 17 00:00:00 2001 | 1 | From 6b8547161b902b01b639d05a4cdf849d7694556f Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Fri, 22 May 2020 15:29:23 +0000 | 3 | Date: Fri, 22 May 2020 15:29:23 +0000 |
4 | Subject: [PATCH] Fix musl build | 4 | Subject: [PATCH] apt-pkg/contrib/srvrec.h: Explicitly include sys/types.h |
5 | 5 | ||
6 | methods/connect.cc: Musl doesn't support AI_IDN flag in netdb.h | 6 | This avoids type errors with musl C library. |
7 | header so define it manually. | ||
8 | apt-pkg/contrib/srvrec.h: Add explicity include of sys/types.h | ||
9 | to avoid errors in types u_int_SIZE. | ||
10 | 7 | ||
11 | Upstream-Status: Pending | 8 | Upstream-Status: Submitted [https://salsa.debian.org/apt-team/apt/-/merge_requests/200] |
12 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | 9 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
13 | --- | 10 | --- |
14 | apt-pkg/contrib/srvrec.h | 1 + | 11 | apt-pkg/contrib/srvrec.h | 1 + |
15 | methods/connect.cc | 5 +++++ | 12 | 1 file changed, 1 insertion(+) |
16 | 2 files changed, 6 insertions(+) | ||
17 | 13 | ||
18 | diff --git a/apt-pkg/contrib/srvrec.h b/apt-pkg/contrib/srvrec.h | 14 | diff --git a/apt-pkg/contrib/srvrec.h b/apt-pkg/contrib/srvrec.h |
19 | index e22b7a1..b1115f5 100644 | 15 | index e5d0f43..2010184 100644 |
20 | --- a/apt-pkg/contrib/srvrec.h | 16 | --- a/apt-pkg/contrib/srvrec.h |
21 | +++ b/apt-pkg/contrib/srvrec.h | 17 | +++ b/apt-pkg/contrib/srvrec.h |
22 | @@ -9,6 +9,7 @@ | 18 | @@ -9,6 +9,7 @@ |
@@ -27,19 +23,6 @@ index e22b7a1..b1115f5 100644 | |||
27 | #include <string> | 23 | #include <string> |
28 | #include <vector> | 24 | #include <vector> |
29 | #include <arpa/nameser.h> | 25 | #include <arpa/nameser.h> |
30 | diff --git a/methods/connect.cc b/methods/connect.cc | 26 | -- |
31 | index 1d6f891..122df35 100644 | 27 | 2.20.1 |
32 | --- a/methods/connect.cc | 28 | |
33 | +++ b/methods/connect.cc | ||
34 | @@ -42,6 +42,11 @@ | ||
35 | #include "connect.h" | ||
36 | #include "rfc2553emu.h" | ||
37 | #include <apti18n.h> | ||
38 | + | ||
39 | +#ifndef AI_IDN | ||
40 | +#define AI_IDN 0x0040 | ||
41 | +#endif | ||
42 | + | ||
43 | /*}}}*/ | ||
44 | |||
45 | static std::string LastHost; | ||
diff --git a/meta/recipes-devtools/apt/apt/0001-Hide-fstatat64-and-prlimit64-defines-on-musl.patch b/meta/recipes-devtools/apt/apt/0001-Hide-fstatat64-and-prlimit64-defines-on-musl.patch new file mode 100644 index 0000000000..f1816836b5 --- /dev/null +++ b/meta/recipes-devtools/apt/apt/0001-Hide-fstatat64-and-prlimit64-defines-on-musl.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From e849b161ce1d87ab369b921438abcf5b3a03e186 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 25 Apr 2021 08:57:03 -0700 | ||
4 | Subject: [PATCH] Hide fstatat64 and prlimit64 defines on musl | ||
5 | |||
6 | musl defines fstatat64 and prlimit64 as macros which confuses the | ||
7 | seccomp sysall rewiring since there are syscalls with same names | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | methods/aptmethod.h | 12 ++++++++++-- | ||
13 | 1 file changed, 10 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/methods/aptmethod.h b/methods/aptmethod.h | ||
16 | index bd50e80..3085aed 100644 | ||
17 | --- a/methods/aptmethod.h | ||
18 | +++ b/methods/aptmethod.h | ||
19 | @@ -121,6 +121,12 @@ protected: | ||
20 | if (ctx == NULL) | ||
21 | return _error->FatalE("HttpMethod::Configuration", "Cannot init seccomp"); | ||
22 | |||
23 | +#ifndef __GLIBC__ | ||
24 | +#pragma push_macro("fstatat64") | ||
25 | +#pragma push_macro("prlimit64") | ||
26 | +#undef fstatat64 | ||
27 | +#undef prlimit64 | ||
28 | +#endif | ||
29 | #define ALLOW(what) \ | ||
30 | if ((rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(what), 0))) \ | ||
31 | return _error->FatalE("HttpMethod::Configuration", "Cannot allow %s: %s", #what, strerror(-rc)); | ||
32 | @@ -320,9 +326,11 @@ protected: | ||
33 | if ((rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, seccomp_syscall_resolve_name(custom.c_str()), 0))) | ||
34 | return _error->FatalE("aptMethod::Configuration", "Cannot allow %s: %s", custom.c_str(), strerror(-rc)); | ||
35 | } | ||
36 | - | ||
37 | #undef ALLOW | ||
38 | - | ||
39 | +#ifndef __GLIBC__ | ||
40 | +#pragma pop_macro("fstatat64") | ||
41 | +#pragma pop_macro("prlimit64") | ||
42 | +#endif | ||
43 | rc = seccomp_load(ctx); | ||
44 | if (rc == -EINVAL) | ||
45 | { | ||
46 | -- | ||
47 | 2.31.1 | ||
48 | |||
diff --git a/meta/recipes-devtools/apt/apt/0001-Remove-using-std-binary_function.patch b/meta/recipes-devtools/apt/apt/0001-Remove-using-std-binary_function.patch new file mode 100644 index 0000000000..15b036b90d --- /dev/null +++ b/meta/recipes-devtools/apt/apt/0001-Remove-using-std-binary_function.patch | |||
@@ -0,0 +1,87 @@ | |||
1 | From e91fb0618ce0a5d42f239d0fca602544858f0819 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 16 Aug 2022 08:44:18 -0700 | ||
4 | Subject: [PATCH] Remove using std::binary_function | ||
5 | |||
6 | std::binary_function and std::unary_function are deprecated since c++11 | ||
7 | and removed in c++17, therefore remove it and use lambda functions to get same | ||
8 | functionality implemented. | ||
9 | |||
10 | Upstream-Status: Submitted [https://salsa.debian.org/apt-team/apt/-/merge_requests/253] | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | ftparchive/apt-ftparchive.cc | 33 ++++++++++----------------------- | ||
14 | 1 file changed, 10 insertions(+), 23 deletions(-) | ||
15 | |||
16 | diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc | ||
17 | index 0f6587281..0a253b12b 100644 | ||
18 | --- a/ftparchive/apt-ftparchive.cc | ||
19 | +++ b/ftparchive/apt-ftparchive.cc | ||
20 | @@ -48,6 +48,11 @@ | ||
21 | using namespace std; | ||
22 | unsigned Quiet = 0; | ||
23 | |||
24 | +auto ContentsCompare = [](const auto &a, const auto &b) { return a.ContentsMTime < b.ContentsMTime; }; | ||
25 | +auto DBCompare = [](const auto &a, const auto &b) { return a.BinCacheDB < b.BinCacheDB; }; | ||
26 | +auto SrcDBCompare = [](const auto &a, const auto &b) { return a.SrcCacheDB < b.SrcCacheDB; }; | ||
27 | + | ||
28 | + | ||
29 | static struct timeval GetTimevalFromSteadyClock() /*{{{*/ | ||
30 | { | ||
31 | auto const Time = std::chrono::steady_clock::now().time_since_epoch(); | ||
32 | @@ -116,24 +121,6 @@ struct PackageMap | ||
33 | bool SrcDone; | ||
34 | time_t ContentsMTime; | ||
35 | |||
36 | - struct ContentsCompare | ||
37 | - { | ||
38 | - inline bool operator() (const PackageMap &x,const PackageMap &y) | ||
39 | - {return x.ContentsMTime < y.ContentsMTime;}; | ||
40 | - }; | ||
41 | - | ||
42 | - struct DBCompare | ||
43 | - { | ||
44 | - inline bool operator() (const PackageMap &x,const PackageMap &y) | ||
45 | - {return x.BinCacheDB < y.BinCacheDB;}; | ||
46 | - }; | ||
47 | - | ||
48 | - struct SrcDBCompare | ||
49 | - { | ||
50 | - inline bool operator() (const PackageMap &x,const PackageMap &y) | ||
51 | - {return x.SrcCacheDB < y.SrcCacheDB;}; | ||
52 | - }; | ||
53 | - | ||
54 | void GetGeneral(Configuration &Setup,Configuration &Block); | ||
55 | bool GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats); | ||
56 | bool GenSources(Configuration &Setup,struct CacheDB::Stats &Stats); | ||
57 | @@ -869,7 +856,7 @@ static bool DoGenerateContents(Configuration &Setup, | ||
58 | else | ||
59 | I->ContentsMTime = A.st_mtime; | ||
60 | } | ||
61 | - stable_sort(PkgList.begin(),PkgList.end(),PackageMap::ContentsCompare()); | ||
62 | + stable_sort(PkgList.begin(),PkgList.end(),ContentsCompare); | ||
63 | |||
64 | /* Now for Contents.. The process here is to do a make-like dependency | ||
65 | check. Each contents file is verified to be newer than the package files | ||
66 | @@ -941,8 +928,8 @@ static bool Generate(CommandLine &CmdL) | ||
67 | LoadBinDir(PkgList,Setup); | ||
68 | |||
69 | // Sort by cache DB to improve IO locality. | ||
70 | - stable_sort(PkgList.begin(),PkgList.end(),PackageMap::DBCompare()); | ||
71 | - stable_sort(PkgList.begin(),PkgList.end(),PackageMap::SrcDBCompare()); | ||
72 | + stable_sort(PkgList.begin(),PkgList.end(),DBCompare); | ||
73 | + stable_sort(PkgList.begin(),PkgList.end(),SrcDBCompare); | ||
74 | |||
75 | // Generate packages | ||
76 | if (_config->FindB("APT::FTPArchive::ContentsOnly", false) == false) | ||
77 | @@ -993,8 +980,8 @@ static bool Clean(CommandLine &CmdL) | ||
78 | LoadBinDir(PkgList,Setup); | ||
79 | |||
80 | // Sort by cache DB to improve IO locality. | ||
81 | - stable_sort(PkgList.begin(),PkgList.end(),PackageMap::DBCompare()); | ||
82 | - stable_sort(PkgList.begin(),PkgList.end(),PackageMap::SrcDBCompare()); | ||
83 | + stable_sort(PkgList.begin(),PkgList.end(),DBCompare); | ||
84 | + stable_sort(PkgList.begin(),PkgList.end(),SrcDBCompare); | ||
85 | |||
86 | string CacheDir = Setup.FindDir("Dir::CacheDir"); | ||
87 | |||
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 37f969690c..6f4d5b6e72 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 | |||
@@ -1,4 +1,4 @@ | |||
1 | From 34700bebc52659e7e3eecd252f65bd36e669eee8 Mon Sep 17 00:00:00 2001 | 1 | From a2dd661484536492b47d4c88998f2bf516749bc8 Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Thu, 21 May 2020 20:13:25 +0000 | 3 | Date: Thu, 21 May 2020 20:13:25 +0000 |
4 | Subject: [PATCH] Revert "always run 'dpkg --configure -a' at the end of our | 4 | Subject: [PATCH] Revert "always run 'dpkg --configure -a' at the end of our |
@@ -20,10 +20,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | |||
20 | 1 file changed, 2 insertions(+), 7 deletions(-) | 20 | 1 file changed, 2 insertions(+), 7 deletions(-) |
21 | 21 | ||
22 | diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc | 22 | diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc |
23 | index ffa880d..5875e86 100644 | 23 | index 93effa959..4375781d1 100644 |
24 | --- a/apt-pkg/deb/dpkgpm.cc | 24 | --- a/apt-pkg/deb/dpkgpm.cc |
25 | +++ b/apt-pkg/deb/dpkgpm.cc | 25 | +++ b/apt-pkg/deb/dpkgpm.cc |
26 | @@ -1215,12 +1215,6 @@ void pkgDPkgPM::BuildPackagesProgressMap() | 26 | @@ -1199,12 +1199,6 @@ void pkgDPkgPM::BuildPackagesProgressMap() |
27 | } | 27 | } |
28 | } | 28 | } |
29 | } | 29 | } |
@@ -35,8 +35,8 @@ index ffa880d..5875e86 100644 | |||
35 | - ++PackagesTotal; | 35 | - ++PackagesTotal; |
36 | } | 36 | } |
37 | /*}}}*/ | 37 | /*}}}*/ |
38 | bool pkgDPkgPM::Go(int StatusFd) /*{{{*/ | 38 | void pkgDPkgPM::StartPtyMagic() /*{{{*/ |
39 | @@ -1716,7 +1710,8 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) | 39 | @@ -1741,7 +1735,8 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress) |
40 | 40 | ||
41 | // support subpressing of triggers processing for special | 41 | // support subpressing of triggers processing for special |
42 | // cases like d-i that runs the triggers handling manually | 42 | // cases like d-i that runs the triggers handling manually |
diff --git a/meta/recipes-devtools/apt/apt/0001-aptwebserver.cc-Include-array.patch b/meta/recipes-devtools/apt/apt/0001-aptwebserver.cc-Include-array.patch new file mode 100644 index 0000000000..2c1e617e55 --- /dev/null +++ b/meta/recipes-devtools/apt/apt/0001-aptwebserver.cc-Include-array.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 5985f366750a73c81c7d86893a2b959b4af062a5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 26 May 2021 22:12:46 -0700 | ||
4 | Subject: [PATCH] aptwebserver.cc: Include <array> | ||
5 | |||
6 | This helps getting std::array definition | ||
7 | |||
8 | Fixes | ||
9 | test/interactive-helper/aptwebserver.cc:36:55: error: constexpr variable cannot have non-literal type 'const std::array<std::array<const char *, 2>, 6>' | ||
10 | constexpr std::array<std::array<char const *,2>,6> htmlencode = {{ | ||
11 | |||
12 | Upstream-Status: Submitted [https://github.com/Debian/apt/pull/133] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | |||
15 | --- | ||
16 | test/interactive-helper/aptwebserver.cc | 1 + | ||
17 | 1 file changed, 1 insertion(+) | ||
18 | |||
19 | diff --git a/test/interactive-helper/aptwebserver.cc b/test/interactive-helper/aptwebserver.cc | ||
20 | index f4f8d95..361c7a9 100644 | ||
21 | --- a/test/interactive-helper/aptwebserver.cc | ||
22 | +++ b/test/interactive-helper/aptwebserver.cc | ||
23 | @@ -23,6 +23,7 @@ | ||
24 | |||
25 | #include <array> | ||
26 | #include <algorithm> | ||
27 | +#include <array> | ||
28 | #include <fstream> | ||
29 | #include <iostream> | ||
30 | #include <list> | ||
diff --git a/meta/recipes-devtools/apt/apt/0001-cmake-Do-not-build-po-files.patch b/meta/recipes-devtools/apt/apt/0001-cmake-Do-not-build-po-files.patch new file mode 100644 index 0000000000..036ce35963 --- /dev/null +++ b/meta/recipes-devtools/apt/apt/0001-cmake-Do-not-build-po-files.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 33347f9f8301633b01af4e208b7be5fdfcb0df0c Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 20 Mar 2021 14:45:18 -0700 | ||
4 | Subject: [PATCH] cmake: Do not build po files | ||
5 | |||
6 | Fixes | ||
7 | | CMake Error at CMakeLists.txt:252 (add_dependencies): | ||
8 | | The dependency target "update-po4a" of target "update-po" does not exist. | ||
9 | | | ||
10 | |||
11 | Upstream-Status: Inappropriate [Cross-compile specific] | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | CMakeLists.txt | 7 ------- | ||
15 | 1 file changed, 7 deletions(-) | ||
16 | |||
17 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
18 | index be157a55f..54163ae6c 100644 | ||
19 | --- a/CMakeLists.txt | ||
20 | +++ b/CMakeLists.txt | ||
21 | @@ -252,15 +252,6 @@ add_subdirectory(ftparchive) | ||
22 | add_subdirectory(methods) | ||
23 | add_subdirectory(test) | ||
24 | |||
25 | -if (USE_NLS) | ||
26 | -add_subdirectory(po) | ||
27 | -endif() | ||
28 | - | ||
29 | -if(TARGET update-po AND TARGET update-po4a) | ||
30 | -# Link update-po4a into the update-po target | ||
31 | -add_dependencies(update-po update-po4a) | ||
32 | -endif() | ||
33 | - | ||
34 | # Create our directories. | ||
35 | install_empty_directories( | ||
36 | ${CONF_DIR}/apt.conf.d | ||
diff --git a/meta/recipes-devtools/apt/apt/0001-test-libapt-do-not-use-gtest-from-the-host.patch b/meta/recipes-devtools/apt/apt/0001-test-libapt-do-not-use-gtest-from-the-host.patch deleted file mode 100644 index 503b5a5c0b..0000000000 --- a/meta/recipes-devtools/apt/apt/0001-test-libapt-do-not-use-gtest-from-the-host.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From 28e389a0d1275e7693df84a7d4a58b28364be1a9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Thu, 22 Oct 2020 17:33:38 +0200 | ||
4 | Subject: [PATCH] test/libapt: do not use gtest from the host | ||
5 | |||
6 | This really does not work when cross-compiling. | ||
7 | |||
8 | Upstream-Status: Inappropriate [oe-core specific] | ||
9 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
10 | --- | ||
11 | test/libapt/CMakeLists.txt | 16 ---------------- | ||
12 | 1 file changed, 16 deletions(-) | ||
13 | |||
14 | diff --git a/test/libapt/CMakeLists.txt b/test/libapt/CMakeLists.txt | ||
15 | index 035ff07..280b83c 100644 | ||
16 | --- a/test/libapt/CMakeLists.txt | ||
17 | +++ b/test/libapt/CMakeLists.txt | ||
18 | @@ -6,22 +6,6 @@ find_path(GTEST_ROOT src/gtest.cc | ||
19 | find_package(GTest) | ||
20 | set(GTEST_DEPENDENCIES) | ||
21 | |||
22 | -if(NOT GTEST_FOUND AND EXISTS ${GTEST_ROOT}) | ||
23 | - include(ExternalProject) | ||
24 | - ExternalProject_Add(gtest PREFIX ./gtest | ||
25 | - SOURCE_DIR ${GTEST_ROOT} | ||
26 | - INSTALL_COMMAND true) | ||
27 | - | ||
28 | - link_directories(${CMAKE_CURRENT_BINARY_DIR}/gtest/src/gtest-build) | ||
29 | - | ||
30 | - set(GTEST_LIBRARIES "-lgtest") | ||
31 | - set(GTEST_DEPENDENCIES "gtest") | ||
32 | - set(GTEST_FOUND TRUE) | ||
33 | - find_path(GTEST_INCLUDE_DIRS NAMES gtest/gtest.h PATHS ${GTEST_ROOT}/include) | ||
34 | - | ||
35 | - message(STATUS "Found GTest at ${GTEST_ROOT}, headers at ${GTEST_INCLUDE_DIRS}") | ||
36 | -endif() | ||
37 | - | ||
38 | if(GTEST_FOUND) | ||
39 | # gtest produces some warnings with the set of warnings we activate, | ||
40 | # so disable the offending warnings while compiling tests for now | ||
diff --git a/meta/recipes-devtools/apt/apt_1.8.2.2.bb b/meta/recipes-devtools/apt/apt_2.6.1.bb index 6cda61a7d8..fb4ff899d2 100644 --- a/meta/recipes-devtools/apt/apt_1.8.2.2.bb +++ b/meta/recipes-devtools/apt/apt_2.6.1.bb | |||
@@ -1,7 +1,7 @@ | |||
1 | SUMMARY = "Advanced front-end for dpkg" | 1 | SUMMARY = "Advanced front-end for dpkg" |
2 | DESCRIPTION = "APT is the Advanced Package Tool, an advanced interface to the Debian packaging system which provides the apt-get program." | 2 | DESCRIPTION = "APT is the Advanced Package Tool, an advanced interface to the Debian packaging system which provides the apt-get program." |
3 | HOMEPAGE = "https://packages.debian.org/jessie/apt" | 3 | HOMEPAGE = "https://packages.debian.org/sid/apt" |
4 | LICENSE = "GPLv2.0+" | 4 | LICENSE = "GPL-2.0-or-later" |
5 | SECTION = "base" | 5 | SECTION = "base" |
6 | 6 | ||
7 | # Triehash script taken from https://github.com/julian-klode/triehash | 7 | # Triehash script taken from https://github.com/julian-klode/triehash |
@@ -10,55 +10,61 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apt/${BPN}_${PV}.tar.xz \ | |||
10 | file://0001-Disable-documentation-directory-altogether.patch \ | 10 | file://0001-Disable-documentation-directory-altogether.patch \ |
11 | file://0001-Fix-musl-build.patch \ | 11 | file://0001-Fix-musl-build.patch \ |
12 | file://0001-CMakeLists.txt-avoid-changing-install-paths-based-on.patch \ | 12 | file://0001-CMakeLists.txt-avoid-changing-install-paths-based-on.patch \ |
13 | file://0001-test-libapt-do-not-use-gtest-from-the-host.patch \ | 13 | file://0001-cmake-Do-not-build-po-files.patch \ |
14 | file://0001-Hide-fstatat64-and-prlimit64-defines-on-musl.patch \ | ||
15 | file://0001-aptwebserver.cc-Include-array.patch \ | ||
16 | file://0001-Remove-using-std-binary_function.patch \ | ||
14 | " | 17 | " |
15 | 18 | ||
16 | SRC_URI_append_class-native = " \ | 19 | SRC_URI:append:class-native = " \ |
17 | file://0001-Do-not-init-tables-from-dpkg-configuration.patch \ | 20 | file://0001-Do-not-init-tables-from-dpkg-configuration.patch \ |
18 | file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \ | 21 | file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \ |
19 | file://0001-Do-not-configure-packages-on-installation.patch \ | ||
20 | " | 22 | " |
21 | 23 | ||
22 | SRC_URI_append_class-nativesdk = " \ | 24 | SRC_URI:append:class-nativesdk = " \ |
23 | file://0001-Do-not-init-tables-from-dpkg-configuration.patch \ | 25 | file://0001-Do-not-init-tables-from-dpkg-configuration.patch \ |
24 | file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \ | 26 | file://0001-Revert-always-run-dpkg-configure-a-at-the-end-of-our.patch \ |
25 | file://0001-Do-not-configure-packages-on-installation.patch \ | ||
26 | " | 27 | " |
27 | 28 | ||
28 | SRC_URI[sha256sum] = "f5030de22a5cc80db6fe0d42373b5df25d7dc56e94d9155f2eaa80dbd65e82fa" | 29 | SRC_URI[sha256sum] = "86b888c901fa2e78f1bf52a2aaa2f400ff82a472b94ff0ac6631939ee68fa6fd" |
29 | LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 30 | LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
30 | 31 | ||
31 | # the package is taken from snapshots.debian.org; that source is static and goes stale | 32 | # the package is taken from snapshots.debian.org; that source is static and goes stale |
32 | # so we check the latest upstream from a directory that does get updated | 33 | # so we check the latest upstream from a directory that does get updated |
33 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apt/" | 34 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apt/" |
35 | # apt seems to follow a peculiar version policy, where every *other* even version | ||
36 | # is considered stable, e.g. 1.0, 1.4, 1.8, 2.2, 2.6, etc. As there is no way | ||
37 | # to express 'divisible by 4 plus 2' in regex (that I know of), let's hardcode a few. | ||
38 | UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>((2\.2)|(2\.6)|(3\.0)|(3\.4)|(3\.8)|(4\.2))(\.\d+)+)\.tar" | ||
34 | 39 | ||
35 | inherit cmake perlnative bash-completion upstream-version-is-even useradd | 40 | inherit cmake perlnative bash-completion useradd |
36 | 41 | ||
37 | # User is added to allow apt to drop privs, will runtime warn without | 42 | # User is added to allow apt to drop privs, will runtime warn without |
38 | USERADD_PACKAGES = "${PN}" | 43 | USERADD_PACKAGES = "${PN}" |
39 | USERADD_PARAM_${PN} = "--system --home /nonexistent --no-create-home _apt" | 44 | USERADD_PARAM:${PN} = "--system --home /nonexistent --no-create-home _apt" |
40 | 45 | ||
41 | BBCLASSEXTEND = "native nativesdk" | 46 | BBCLASSEXTEND = "native nativesdk" |
42 | 47 | ||
43 | DEPENDS += "virtual/libiconv virtual/libintl db gnutls lz4 zlib bzip2 xz" | 48 | DEPENDS += "db gnutls lz4 zlib bzip2 xz libgcrypt xxhash" |
44 | 49 | ||
45 | EXTRA_OECMAKE_append = " -DCURRENT_VENDOR=debian -DWITH_DOC=False \ | 50 | EXTRA_OECMAKE:append = " -DCURRENT_VENDOR=debian -DWITH_DOC=False \ |
46 | -DUSE_NLS=False -DDPKG_DATADIR=${datadir}/dpkg \ | 51 | -DDPKG_DATADIR=${datadir}/dpkg \ |
47 | -DTRIEHASH_EXECUTABLE=${WORKDIR}/triehash \ | 52 | -DTRIEHASH_EXECUTABLE=${WORKDIR}/triehash \ |
48 | -DCMAKE_DISABLE_FIND_PACKAGE_Zstd=True \ | 53 | -DCMAKE_DISABLE_FIND_PACKAGE_ZSTD=True \ |
54 | -DCMAKE_DISABLE_FIND_PACKAGE_SECCOMP=True \ | ||
55 | -DWITH_TESTS=False \ | ||
49 | " | 56 | " |
50 | 57 | ||
51 | do_configure_prepend () { | 58 | do_configure:prepend() { |
52 | echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >> ${WORKDIR}/toolchain.cmake | 59 | echo "set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH )" >> ${WORKDIR}/toolchain.cmake |
53 | |||
54 | } | 60 | } |
55 | 61 | ||
56 | # Unfortunately apt hardcodes this all over the place | 62 | # Unfortunately apt hardcodes this all over the place |
57 | FILES_${PN} += "${prefix}/lib/dpkg ${prefix}/lib/apt" | 63 | FILES:${PN} += "${prefix}/lib/dpkg ${prefix}/lib/apt" |
58 | RDEPENDS_${PN} += "bash perl dpkg" | 64 | RDEPENDS:${PN} += "bash perl dpkg" |
59 | 65 | ||
60 | customize_apt_conf_sample() { | 66 | customize_apt_conf_sample() { |
61 | cat > ${D}${sysconfdir}/apt/apt.conf.sample << EOF | 67 | cat > ${D}${sysconfdir}/apt/apt.conf.sample << EOF |
62 | Dir "${STAGING_DIR_NATIVE}/" | 68 | Dir "${STAGING_DIR_NATIVE}/" |
63 | { | 69 | { |
64 | State "var/lib/apt/" | 70 | State "var/lib/apt/" |
@@ -110,23 +116,27 @@ DPkg::Path ""; | |||
110 | EOF | 116 | EOF |
111 | } | 117 | } |
112 | 118 | ||
113 | do_install_append_class-native() { | 119 | do_install:append:class-native() { |
114 | customize_apt_conf_sample | 120 | customize_apt_conf_sample |
115 | } | 121 | } |
116 | 122 | ||
117 | do_install_append_class-nativesdk() { | 123 | do_install:append:class-nativesdk() { |
118 | customize_apt_conf_sample | 124 | customize_apt_conf_sample |
125 | rm -rf ${D}${localstatedir}/log | ||
119 | } | 126 | } |
120 | 127 | ||
128 | do_install:append:class-target() { | ||
129 | # Write the correct apt-architecture to apt.conf | ||
130 | APT_CONF=${D}${sysconfdir}/apt/apt.conf | ||
131 | echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} | ||
121 | 132 | ||
122 | do_install_append_class-target() { | 133 | # Remove /var/log/apt. /var/log is normally a link to /var/volatile/log |
123 | #Write the correct apt-architecture to apt.conf | 134 | # and /var/volatile is a tmpfs mount. So anything created in /var/log |
124 | APT_CONF=${D}/etc/apt/apt.conf | 135 | # will not be available when the tmpfs is mounted. |
125 | echo 'APT::Architecture "${DPKG_ARCH}";' > ${APT_CONF} | 136 | rm -rf ${D}${localstatedir}/log |
126 | } | 137 | } |
127 | 138 | ||
128 | # Avoid non-reproducible -src package | 139 | do_install:append() { |
129 | do_install_append () { | 140 | # Avoid non-reproducible -src package |
130 | sed -i -e "s,${B},,g" \ | 141 | sed -i -e "s,${B}/include/,,g" ${B}/apt-pkg/tagfile-keys.cc |
131 | ${B}/apt-pkg/tagfile-keys.cc | ||
132 | } | 142 | } |