From 24a59c62efafbdb8387b2d3c5616b04b9fd21306 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 13:15:15 +0200 Subject: Add missing includes and external definitions Several modules use std::array without including the array header. Bad modules. Some modules use STDOUT_FILENO and friends, or close() without including unistd.h, where they are defined. One module also uses WIFEXITED() without including sys/wait.h. Finally, environ is not specified to be defined in unistd.h. We are required to define it ourselves according to POSIX, so let's do that. --- apt-pkg/contrib/strutl.cc | 1 + apt-pkg/deb/debindexfile.cc | 1 + apt-pkg/deb/dpkgpm.cc | 2 ++ apt-pkg/edsp/edsplistparser.cc | 2 ++ 4 files changed, 6 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index 6c72859d4..e7cc1a759 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index 65bd3e6ee..c55847305 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -30,6 +30,7 @@ #include #include +#include /*}}}*/ // Sources Index /*{{{*/ diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index b0700bcc6..0ac74d479 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -61,6 +61,8 @@ #include /*}}}*/ +extern char **environ; + using namespace std; APT_PURE static string AptHistoryRequestingUser() /*{{{*/ diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc index dd8890f0e..c6fd528da 100644 --- a/apt-pkg/edsp/edsplistparser.cc +++ b/apt-pkg/edsp/edsplistparser.cc @@ -21,6 +21,8 @@ #include #include +#include + /*}}}*/ // ListParser::edspListParser - Constructor /*{{{*/ -- cgit v1.2.3 From 374ab017c262108c0f12bcdc8d15ff242c7adc56 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 13:38:19 +0200 Subject: CMake: Do not hardcode -ldl Does not exist on FreeBSD Gbp-Dch: ignore --- apt-pkg/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/CMakeLists.txt b/apt-pkg/CMakeLists.txt index a90bb1d8c..9bbc6bd98 100644 --- a/apt-pkg/CMakeLists.txt +++ b/apt-pkg/CMakeLists.txt @@ -30,7 +30,7 @@ target_include_directories(apt-pkg ${LZMA_INCLUDE_DIRS} ${LZ4_INCLUDE_DIRS}) target_link_libraries(apt-pkg - PRIVATE -lutil -ldl -lresolv + PRIVATE -lutil ${CMAKE_DL_LIBS} -lresolv ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} -- cgit v1.2.3 From ad5282bb0c97fd0254b20fb71a59d0f755c3ed65 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 13:42:54 +0200 Subject: CMake: Do not use -lresolv if res_init exists in libc Gbp-Dch: ignore --- apt-pkg/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/CMakeLists.txt b/apt-pkg/CMakeLists.txt index 9bbc6bd98..3f85bc143 100644 --- a/apt-pkg/CMakeLists.txt +++ b/apt-pkg/CMakeLists.txt @@ -30,7 +30,7 @@ target_include_directories(apt-pkg ${LZMA_INCLUDE_DIRS} ${LZ4_INCLUDE_DIRS}) target_link_libraries(apt-pkg - PRIVATE -lutil ${CMAKE_DL_LIBS} -lresolv + PRIVATE -lutil ${CMAKE_DL_LIBS} ${RESOLV_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} -- cgit v1.2.3 From 0fb16c3e678044d6d06ba8a6199b1e96487ee0d8 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 20:19:11 +0200 Subject: Use C locale instead of C.UTF-8 for protocol strings The C.UTF-8 locale is not portable, so we need to use C, otherwise we crash on other systems. We can use std::locale::classic() for that, which might also be a bit cheaper than using locale("C"). --- apt-pkg/acquire-item.cc | 2 +- apt-pkg/acquire.cc | 2 +- apt-pkg/contrib/strutl.cc | 4 ++-- apt-pkg/install-progress.cc | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 7abb7b206..d72e62725 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -2047,7 +2047,7 @@ bool pkgAcqDiffIndex::ParseDiffIndex(string const &IndexDiffFile) /*{{{*/ HashStringList ServerHashes; unsigned long long ServerSize = 0; - auto const &posix = std::locale("C.UTF-8"); + auto const &posix = std::locale::classic(); for (char const * const * type = HashString::SupportedHashes(); *type != NULL; ++type) { std::string tagname = *type; diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 1efb772b4..33c98cf2e 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -1259,7 +1259,7 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner) // build the status str std::ostringstream str; - str.imbue(std::locale("C.UTF-8")); + str.imbue(std::locale::classic()); str.precision(4); str << "dlstatus" << ':' << std::fixed << i << ':' << Percent << ':' << msg << '\n'; auto const dlstatus = str.str(); diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index e7cc1a759..66b0078dc 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -759,7 +759,7 @@ string TimeRFC1123(time_t Date, bool const NumericTimezone) if (gmtime_r(&Date, &Conv) == NULL) return ""; - auto const posix = std::locale("C.UTF-8"); + auto const posix = std::locale::classic(); std::ostringstream datestr; datestr.imbue(posix); APT::StringView const fmt("%a, %d %b %Y %H:%M:%S"); @@ -946,7 +946,7 @@ bool RFC1123StrToTime(const char* const str,time_t &time) signed int year = 0; // yes, Y23K problem – we gonna worry then… std::string weekday, month, datespec, timespec, zone; std::istringstream ss(str); - auto const &posix = std::locale("C.UTF-8"); + auto const &posix = std::locale::classic(); ss.imbue(posix); ss >> weekday; // we only superficially check weekday, mostly to avoid accepting localized diff --git a/apt-pkg/install-progress.cc b/apt-pkg/install-progress.cc index 256495420..6c3e51b2c 100644 --- a/apt-pkg/install-progress.cc +++ b/apt-pkg/install-progress.cc @@ -84,7 +84,7 @@ static std::string GetProgressFdString(char const * const status, { float const progress{Done / static_cast(Total) * 100}; std::ostringstream str; - str.imbue(std::locale("C.UTF-8")); + str.imbue(std::locale::classic()); str.precision(4); str << status << ':' << pkg << ':' << std::fixed << progress << ':' << msg << '\n'; return str.str(); @@ -165,7 +165,7 @@ static std::string GetProgressDeb822String(char const * const status, { float const progress{Done / static_cast(Total) * 100}; std::ostringstream str; - str.imbue(std::locale("C.UTF-8")); + str.imbue(std::locale::classic()); str.precision(4); str << "Status: " << status << '\n'; if (pkg != nullptr) -- cgit v1.2.3 From 8757a0fdeee00ea6a7cc717188a0e129ad8a553c Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 23 Aug 2016 19:41:58 +0200 Subject: Make directory paths configurable This allows other vendors to use different paths, or to build your own APT in /opt for testing. Note that this uses + 1 in some places, as the paths we receive are absolute, but we need to strip of the initial /. --- apt-pkg/acquire-item.cc | 2 +- apt-pkg/contrib/gpgv.cc | 2 +- apt-pkg/deb/debsystem.cc | 8 ++++---- apt-pkg/init.cc | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index d72e62725..7238d692e 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -145,7 +145,7 @@ static void ReportMirrorFailureToCentral(pkgAcquire::Item const &I, std::string << FailCode << std::endl; #endif string const report = _config->Find("Methods::Mirror::ProblemReporting", - "/usr/lib/apt/apt-report-mirror-failure"); + LIBEXEC_DIR "/apt-report-mirror-failure"); if(!FileExists(report)) return; diff --git a/apt-pkg/contrib/gpgv.cc b/apt-pkg/contrib/gpgv.cc index 8796195b8..941f901e8 100644 --- a/apt-pkg/contrib/gpgv.cc +++ b/apt-pkg/contrib/gpgv.cc @@ -48,7 +48,7 @@ void ExecGPGV(std::string const &File, std::string const &FileGPG, int const &statusfd, int fd[2], std::string const &key) { #define EINTERNAL 111 - std::string const aptkey = _config->Find("Dir::Bin::apt-key", "/usr/bin/apt-key"); + std::string const aptkey = _config->Find("Dir::Bin::apt-key", CMAKE_INSTALL_FULL_BINDIR "/apt-key"); bool const Debug = _config->FindB("Debug::Acquire::gpgv", false); struct exiter { diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index f7968ec47..899f7328b 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -188,7 +188,7 @@ static std::string getDpkgStatusLocation(Configuration const &Cnf) { Configuration PathCnf; PathCnf.Set("Dir", Cnf.Find("Dir", "/")); PathCnf.Set("Dir::State::status", "status"); - auto const cnfstatedir = Cnf.Find("Dir::State", "var/lib/apt/"); + auto const cnfstatedir = Cnf.Find("Dir::State", STATE_DIR + 1); // if the state dir ends in apt, replace it with dpkg - // for the default this gives us the same as the fallback below. // This can't be a ../dpkg as that would play bad with symlinks @@ -211,7 +211,7 @@ bool debSystem::Initialize(Configuration &Cnf) Cnf.CndSet("Dir::State::extended_states", "extended_states"); if (Cnf.Exists("Dir::State::status") == false) Cnf.Set("Dir::State::status", getDpkgStatusLocation(Cnf)); - Cnf.CndSet("Dir::Bin::dpkg","/usr/bin/dpkg"); + Cnf.CndSet("Dir::Bin::dpkg",BIN_DIR"/dpkg"); if (d->StatusFile) { delete d->StatusFile; @@ -239,9 +239,9 @@ APT_PURE bool debSystem::ArchiveSupported(const char *Type) signed debSystem::Score(Configuration const &Cnf) { signed Score = 0; - if (FileExists(Cnf.FindFile("Dir::State::status","/var/lib/dpkg/status")) == true) + if (FileExists(Cnf.FindFile("Dir::State::status",getDpkgStatusLocation(Cnf).c_str())) == true) Score += 10; - if (FileExists(Cnf.Find("Dir::Bin::dpkg","/usr/bin/dpkg")) == true) + if (FileExists(Cnf.Find("Dir::Bin::dpkg",BIN_DIR"/dpkg")) == true) Score += 10; if (FileExists("/etc/debian_version") == true) Score += 10; diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index fa679e6c6..282c0daf0 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -47,19 +47,19 @@ bool pkgInitConfig(Configuration &Cnf) Cnf.CndSet("Dir","/"); // State - Cnf.CndSet("Dir::State","var/lib/apt/"); + Cnf.CndSet("Dir::State", STATE_DIR + 1); Cnf.CndSet("Dir::State::lists","lists/"); Cnf.CndSet("Dir::State::cdroms","cdroms.list"); Cnf.CndSet("Dir::State::mirrors","mirrors/"); // Cache - Cnf.CndSet("Dir::Cache","var/cache/apt/"); + Cnf.CndSet("Dir::Cache", CACHE_DIR + 1); Cnf.CndSet("Dir::Cache::archives","archives/"); Cnf.CndSet("Dir::Cache::srcpkgcache","srcpkgcache.bin"); Cnf.CndSet("Dir::Cache::pkgcache","pkgcache.bin"); // Configuration - Cnf.CndSet("Dir::Etc","etc/apt/"); + Cnf.CndSet("Dir::Etc", CONF_DIR + 1); Cnf.CndSet("Dir::Etc::sourcelist","sources.list"); Cnf.CndSet("Dir::Etc::sourceparts","sources.list.d"); Cnf.CndSet("Dir::Etc::main","apt.conf"); @@ -69,12 +69,12 @@ bool pkgInitConfig(Configuration &Cnf) Cnf.CndSet("Dir::Etc::preferencesparts","preferences.d"); Cnf.CndSet("Dir::Etc::trusted", "trusted.gpg"); Cnf.CndSet("Dir::Etc::trustedparts","trusted.gpg.d"); - Cnf.CndSet("Dir::Bin::methods","/usr/lib/apt/methods"); - Cnf.CndSet("Dir::Bin::solvers::","/usr/lib/apt/solvers"); + Cnf.CndSet("Dir::Bin::methods", LIBEXEC_DIR "/methods"); + Cnf.CndSet("Dir::Bin::solvers::",LIBEXEC_DIR "/apt/solvers"); Cnf.CndSet("Dir::Media::MountPath","/media/apt"); // State - Cnf.CndSet("Dir::Log","var/log/apt"); + Cnf.CndSet("Dir::Log", LOG_DIR + 1); Cnf.CndSet("Dir::Log::Terminal","term.log"); Cnf.CndSet("Dir::Log::History","history.log"); Cnf.CndSet("Dir::Log::Planner","eipp.log.xz"); -- cgit v1.2.3 From 2ed62ba6abcad809d1898a40950f86217af73812 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 25 Aug 2016 14:24:49 +0200 Subject: changelog: Respect Dir setting for local changelog getting This fixes issues with chroots, but the goal here was to get the test suite working on systems without dpkg. --- apt-pkg/acquire-item.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 7238d692e..f715e060e 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -3488,7 +3488,8 @@ std::string pkgAcqChangelog::URI(pkgCache::VerIterator const &Ver) /*{{{*/ pkgCache::PkgIterator const Pkg = Ver.ParentPkg(); if (Pkg->CurrentVer != 0 && Pkg.CurrentVer() == Ver) { - std::string const basename = std::string("/usr/share/doc/") + Pkg.Name() + "/changelog"; + std::string const root = _config->FindDir("Dir"); + std::string const basename = root + std::string("usr/share/doc/") + Pkg.Name() + "/changelog"; std::string const debianname = basename + ".Debian"; if (FileExists(debianname)) return "copy://" + debianname; -- cgit v1.2.3 From 6f1f3c9afdb6ade6a7be110b90c8fc9e603254cf Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 25 Aug 2016 16:25:00 +0200 Subject: Make root group configurable via ROOT_GROUP This is needed on BSD where root's default group is wheel, not root. --- apt-pkg/acquire-item.cc | 2 +- apt-pkg/acquire-worker.cc | 4 ++-- apt-pkg/acquire.cc | 4 ++-- apt-pkg/indexcopy.cc | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index f715e060e..88b5a58b5 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -3440,7 +3440,7 @@ void pkgAcqChangelog::Init(std::string const &DestDir, std::string const &DestFi TemporaryDirectory = tmpname; ChangeOwnerAndPermissionOfFile("Item::QueueURI", TemporaryDirectory.c_str(), - SandboxUser.c_str(), "root", 0700); + SandboxUser.c_str(), ROOT_GROUP, 0700); DestFile = flCombine(TemporaryDirectory, DestFileName); if (DestDir.empty() == false) diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc index a4fbc7651..7afbec72a 100644 --- a/apt-pkg/acquire-worker.cc +++ b/apt-pkg/acquire-worker.cc @@ -732,7 +732,7 @@ bool pkgAcquire::Worker::QueueItem(pkgAcquire::Queue::QItem *Item) { std::string const SandboxUser = _config->Find("APT::Sandbox::User"); ChangeOwnerAndPermissionOfFile("Item::QueueURI", Item->Owner->DestFile.c_str(), - SandboxUser.c_str(), "root", 0600); + SandboxUser.c_str(), ROOT_GROUP, 0600); } if (Debug == true) @@ -828,7 +828,7 @@ void pkgAcquire::Worker::PrepareFiles(char const * const caller, pkgAcquire::Que { if (RealFileExists(Itm->Owner->DestFile)) { - ChangeOwnerAndPermissionOfFile(caller, Itm->Owner->DestFile.c_str(), "root", "root", 0644); + ChangeOwnerAndPermissionOfFile(caller, Itm->Owner->DestFile.c_str(), "root", ROOT_GROUP, 0644); std::string const filename = Itm->Owner->DestFile; for (pkgAcquire::Queue::QItem::owner_iterator O = Itm->Owners.begin(); O != Itm->Owners.end(); ++O) { diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 33c98cf2e..b5f88e1b3 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -80,7 +80,7 @@ void pkgAcquire::Initialize() if (getuid() == 0 && SandboxUser.empty() == false && SandboxUser != "root") // if we aren't root, we can't chown, so don't try it { struct passwd const * const pw = getpwnam(SandboxUser.c_str()); - struct group const * const gr = getgrnam("root"); + struct group const * const gr = getgrnam(ROOT_GROUP); if (pw != NULL && gr != NULL) { std::string const AuthConf = _config->FindFile("Dir::Etc::netrc"); @@ -106,7 +106,7 @@ static bool SetupAPTPartialDirectory(std::string const &grand, std::string const if (getuid() == 0 && SandboxUser.empty() == false && SandboxUser != "root") // if we aren't root, we can't chown, so don't try it { struct passwd const * const pw = getpwnam(SandboxUser.c_str()); - struct group const * const gr = getgrnam("root"); + struct group const * const gr = getgrnam(ROOT_GROUP); if (pw != NULL && gr != NULL) { // chown the partial dir diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index 4a35e3847..ca5c42cb7 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -207,7 +207,7 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector &List, FinalF += URItoFileName(S); if (rename(TargetF.c_str(),FinalF.c_str()) != 0) return _error->Errno("rename","Failed to rename"); - ChangeOwnerAndPermissionOfFile("CopyPackages", FinalF.c_str(), "root", "root", 0644); + ChangeOwnerAndPermissionOfFile("CopyPackages", FinalF.c_str(), "root", ROOT_GROUP, 0644); } /* Mangle the source to be in the proper notation with @@ -531,7 +531,7 @@ bool SigVerify::CopyMetaIndex(string CDROM, string CDName, /*{{{*/ Rel.Open(prefix + file,FileFd::ReadOnly); if (CopyFile(Rel,Target) == false || Target.Close() == false) return _error->Error("Copying of '%s' for '%s' from '%s' failed", file.c_str(), CDName.c_str(), prefix.c_str()); - ChangeOwnerAndPermissionOfFile("CopyPackages", TargetF.c_str(), "root", "root", 0644); + ChangeOwnerAndPermissionOfFile("CopyPackages", TargetF.c_str(), "root", ROOT_GROUP, 0644); return true; } @@ -738,7 +738,7 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/ FinalF += URItoFileName(S); if (rename(TargetF.c_str(),FinalF.c_str()) != 0) return _error->Errno("rename","Failed to rename"); - ChangeOwnerAndPermissionOfFile("CopyTranslations", FinalF.c_str(), "root", "root", 0644); + ChangeOwnerAndPermissionOfFile("CopyTranslations", FinalF.c_str(), "root", ROOT_GROUP, 0644); } CurrentSize += FileSize; -- cgit v1.2.3 From 01d207a5076b6fc37a064645b13f2c6550f58b94 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Fri, 26 Aug 2016 17:55:28 +0200 Subject: CMake: Add missing iconv dependency FreeBSD has two iconv systems: It ships an iconv.h itself, and symbols for that in the libc. But there's also the port of GNU libiconv, which unfortunately for us, Doxygen depends on. This changes things to prefer a separate libiconv library over the system one; that is, the port on FreeBSD. Gbp-Dch: ignore --- apt-pkg/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/CMakeLists.txt b/apt-pkg/CMakeLists.txt index 3f85bc143..34930c8e9 100644 --- a/apt-pkg/CMakeLists.txt +++ b/apt-pkg/CMakeLists.txt @@ -28,14 +28,19 @@ target_include_directories(apt-pkg PRIVATE ${ZLIB_INCLUDE_DIRS} ${BZIP2_INCLUDE_DIR} ${LZMA_INCLUDE_DIRS} - ${LZ4_INCLUDE_DIRS}) + ${LZ4_INCLUDE_DIRS} + ${ICONV_DIRECTORIES} +) + target_link_libraries(apt-pkg PRIVATE -lutil ${CMAKE_DL_LIBS} ${RESOLV_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${LZMA_LIBRARIES} - ${LZ4_LIBRARIES}) + ${LZ4_LIBRARIES} + ${ICONV_LIBRARIES} +) set_target_properties(apt-pkg PROPERTIES VERSION ${MAJOR}.${MINOR}) set_target_properties(apt-pkg PROPERTIES SOVERSION ${MAJOR}) add_version_script(apt-pkg) -- cgit v1.2.3