From bb1293d975294884a95b9cb298432c9cf9ecc995 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 11 Dec 2009 00:23:18 +0100 Subject: Backport rred patches from my own sid branch to the 0.7.25 branch * rewrite and refactor rred method to be able to handle even big (>30 MB) patches (Closes: #554349) and hardening the method itself by using more constants and a return value which can't be misinterpreted as linenumber * Finally adope the patch from Morten Hustveit to be able to optional use mmaps and iovec to increase patch speed - but as this increase memory usage we can always fall back to the "old" method which doesn't depend on mmaps. --- debian/changelog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 64e676709..c54fb431b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -90,6 +90,10 @@ apt (0.7.25) UNRELEASED; urgency=low - add APT::FTPArchive::LongDescription to be able to disable them * apt-pkg/deb/debsrcrecords.cc: - use "diff" filetype for .debian.tar.* files (Closes: #554898) + * methods/rred.cc: + - rewrite to be able to handle even big patch files + - adopt optional mmap+iovec patch from Morten Hustveit + (Closes: #463354) which should speed up a bit. Thanks! [ Chris Leick ] * doc/ various manpages: -- cgit v1.2.3-70-g09d2 From 9f542bae2b3620887345ebc3e61970f8903123a0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 11 Dec 2009 00:32:01 +0100 Subject: add config setting for User-Agent in http and https to the Acquire group, thanks Timothy J. Miller! (Closes: #355782) --- debian/changelog | 3 +++ doc/apt.conf.5.xml | 7 ++++++- doc/examples/configure-index | 3 +++ methods/http.cc | 3 ++- methods/https.cc | 5 ++++- 5 files changed, 18 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c54fb431b..0cfd36c00 100644 --- a/debian/changelog +++ b/debian/changelog @@ -94,6 +94,9 @@ apt (0.7.25) UNRELEASED; urgency=low - rewrite to be able to handle even big patch files - adopt optional mmap+iovec patch from Morten Hustveit (Closes: #463354) which should speed up a bit. Thanks! + * methods/http{,s}.cc + - add config setting for User-Agent to the Acquire group, + thanks Timothy J. Miller! (Closes: #355782) [ Chris Leick ] * doc/ various manpages: diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index e2db9defb..726bca2cc 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -275,7 +275,12 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; The used bandwidth can be limited with Acquire::http::Dl-Limit which accepts integer values in kilobyte. The default value is 0 which deactivates the limit and tries uses as much as possible of the bandwidth (Note that this option implicit - deactivates the download from multiple servers at the same time.) + deactivates the download from multiple servers at the same time.) + + Acquire::http::User-Agent can be used to set a different + User-Agent for the http download method as some proxies allow access for clients + only if the client uses a known identifier. + https diff --git a/doc/examples/configure-index b/doc/examples/configure-index index f5f996460..333c8df7e 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -191,6 +191,7 @@ Acquire Max-Age "86400"; // 1 Day age on index files No-Store "false"; // Prevent the cache from storing archives Dl-Limit "7"; // 7Kb/sec maximum download rate + User-Agent "Debian APT-HTTP/1.3"; }; // HTTPS method configuration: @@ -204,6 +205,8 @@ Acquire CaPath "/etc/ssl/certs"; Verify-Host" "true"; AllowRedirect "true"; + + User-Agent "Debian APT-CURL/1.0"; }; ftp diff --git a/methods/http.cc b/methods/http.cc index 3b210f6b6..2dae87a02 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -731,7 +731,8 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out) Req += string("Authorization: Basic ") + Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n"; } - Req += "User-Agent: Debian APT-HTTP/1.3 ("VERSION")\r\n\r\n"; + Req += "User-Agent: " + _config->Find("Acquire::http::User-Agent", + "Debian APT-HTTP/1.3 ("VERSION")") + "\r\n\r\n"; if (Debug == true) cerr << Req << endl; diff --git a/methods/https.cc b/methods/https.cc index 86d7f3a6b..a4f39c379 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -211,7 +211,10 @@ bool HttpsMethod::Fetch(FetchItem *Itm) curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, dlLimit); // set header - curl_easy_setopt(curl, CURLOPT_USERAGENT,"Debian APT-CURL/1.0 ("VERSION")"); + curl_easy_setopt(curl, CURLOPT_USERAGENT, + _config->Find("Acquire::https::User-Agent", + _config->Find("Acquire::http::User-Agent", + "Debian APT-CURL/1.0 ("VERSION")"))); // set timeout int timeout = _config->FindI("Acquire::http::Timeout",120); -- cgit v1.2.3-70-g09d2 From b9e9a44b3377cae2fb9aca3210f379ae1cb802ba Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 11 Dec 2009 00:38:13 +0100 Subject: add https options which default to the ones from http for the https method as this is more sane than using only the http options without a possibility to override these for https. --- debian/changelog | 2 + doc/apt.conf.5.xml | 8 ++-- doc/examples/configure-index | 33 ++++++++++---- methods/https.cc | 100 +++++++++++++++++++------------------------ 4 files changed, 76 insertions(+), 67 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 0cfd36c00..e930de0dd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -56,6 +56,7 @@ apt (0.7.25) UNRELEASED; urgency=low * doc/po4a.conf: activate translation of guide.sgml and offline.sgml * doc/apt.conf.5.xml: - provide a few more details about APT::Immediate-Configure + - briefly document the behaviour of the new https options * doc/sources.list.5.xml: - add note about additional apt-transport-methods * doc/apt-mark.8.xml: @@ -97,6 +98,7 @@ apt (0.7.25) UNRELEASED; urgency=low * methods/http{,s}.cc - add config setting for User-Agent to the Acquire group, thanks Timothy J. Miller! (Closes: #355782) + - add https options which default to http ones (Closes: #557085) [ Chris Leick ] * doc/ various manpages: diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index 726bca2cc..d7ad51cfb 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -284,9 +284,11 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; https - HTTPS URIs. Cache-control and proxy options are the same as for - http method. - Pipeline-Depth option is not supported yet. + HTTPS URIs. Cache-control, Timeout, AllowRedirect, Dl-Limit and + proxy options are the same as for http method and will also + default to the options from the http method if they are not + explicitly set for https. Pipeline-Depth option is not + supported yet. CaInfo suboption specifies place of file that holds info about trusted certificates. diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 333c8df7e..ced390447 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -194,19 +194,34 @@ Acquire User-Agent "Debian APT-HTTP/1.3"; }; - // HTTPS method configuration: - // - uses the http proxy config - // - uses the http cache-control values - // - uses the http Dl-Limit values - https + + + // HTTPS method configuration: uses the http + // - proxy config + // - cache-control values + // - Dl-Limit, Timout, ... values + // if not set explicit for https + // + // see /usr/share/doc/apt/examples/apt-https-method-example.conf.gz + // for more examples + https { Verify-Peer "false"; SslCert "/etc/apt/some.pem"; - CaPath "/etc/ssl/certs"; - Verify-Host" "true"; - AllowRedirect "true"; + CaPath "/etc/ssl/certs"; + Verify-Host" "true"; + AllowRedirect "true"; + + Timeout "120"; + AllowRedirect "true"; + + // Cache Control. Note these do not work with Squid 2.0.2 + No-Cache "false"; + Max-Age "86400"; // 1 Day age on index files + No-Store "false"; // Prevent the cache from storing archives + Dl-Limit "7"; // 7Kb/sec maximum download rate - User-Agent "Debian APT-CURL/1.0"; + User-Agent "Debian APT-CURL/1.0"; }; ftp diff --git a/methods/https.cc b/methods/https.cc index a4f39c379..ed1f18150 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -1,4 +1,4 @@ -// -*- mode: cpp; mode: fold -*- +//-*- mode: cpp; mode: fold -*- // Description /*{{{*/ // $Id: http.cc,v 1.59 2004/05/08 19:42:35 mdz Exp $ /* ###################################################################### @@ -57,54 +57,38 @@ HttpsMethod::progress_callback(void *clientp, double dltotal, double dlnow, return 0; } -void HttpsMethod::SetupProxy() -{ - URI ServerName = Queue->Uri; - - // Determine the proxy setting - string SpecificProxy = _config->Find("Acquire::http::Proxy::" + ServerName.Host); - if (!SpecificProxy.empty()) - { - if (SpecificProxy == "DIRECT") - Proxy = ""; - else - Proxy = SpecificProxy; - } - else - { - string DefProxy = _config->Find("Acquire::http::Proxy"); - if (!DefProxy.empty()) - { - Proxy = DefProxy; - } - else - { - char* result = getenv("http_proxy"); - Proxy = result ? result : ""; - } - } - - // Parse no_proxy, a , separated list of domains - if (getenv("no_proxy") != 0) - { - if (CheckDomainList(ServerName.Host,getenv("no_proxy")) == true) - Proxy = ""; - } - - // Determine what host and port to use based on the proxy settings - string Host; - if (Proxy.empty() == true || Proxy.Host.empty() == true) - { - } - else - { - if (Proxy.Port != 0) - curl_easy_setopt(curl, CURLOPT_PROXYPORT, Proxy.Port); - curl_easy_setopt(curl, CURLOPT_PROXY, Proxy.Host.c_str()); - } -} - - +void HttpsMethod::SetupProxy() { /*{{{*/ + URI ServerName = Queue->Uri; + + // Determine the proxy setting - try https first, fallback to http and use env at last + string UseProxy = _config->Find("Acquire::https::Proxy::" + ServerName.Host, + _config->Find("Acquire::http::Proxy::" + ServerName.Host)); + + if (UseProxy.empty() == true) + UseProxy = _config->Find("Acquire::https::Proxy", _config->Find("Acquire::http::Proxy")); + + // User want to use NO proxy, so nothing to setup + if (UseProxy == "DIRECT") + return; + + if (UseProxy.empty() == false) { + // Parse no_proxy, a comma (,) separated list of domains we don't want to use + // a proxy for so we stop right here if it is in the list + if (getenv("no_proxy") != 0 && CheckDomainList(ServerName.Host,getenv("no_proxy")) == true) + return; + } else { + const char* result = getenv("http_proxy"); + UseProxy = result == NULL ? "" : result; + } + + // Determine what host and port to use based on the proxy settings + if (UseProxy.empty() == false) { + Proxy = UseProxy; + if (Proxy.Port != 1) + curl_easy_setopt(curl, CURLOPT_PROXYPORT, Proxy.Port); + curl_easy_setopt(curl, CURLOPT_PROXY, Proxy.Host.c_str()); + } +} /*}}}*/ // HttpsMethod::Fetch - Fetch an item /*{{{*/ // --------------------------------------------------------------------- /* This adds an item to the pipeline. We keep the pipeline at a fixed @@ -191,12 +175,15 @@ bool HttpsMethod::Fetch(FetchItem *Itm) curl_easy_setopt(curl, CURLOPT_SSLVERSION, final_version); // cache-control - if(_config->FindB("Acquire::http::No-Cache",false) == false) + if(_config->FindB("Acquire::https::No-Cache", + _config->FindB("Acquire::http::No-Cache",false)) == false) { // cache enabled - if (_config->FindB("Acquire::http::No-Store",false) == true) + if (_config->FindB("Acquire::https::No-Store", + _config->FindB("Acquire::http::No-Store",false)) == true) headers = curl_slist_append(headers,"Cache-Control: no-store"); - ioprintf(ss, "Cache-Control: max-age=%u", _config->FindI("Acquire::http::Max-Age",0)); + ioprintf(ss, "Cache-Control: max-age=%u", _config->FindI("Acquire::https::Max-Age", + _config->FindI("Acquire::http::Max-Age",0))); headers = curl_slist_append(headers, ss.str().c_str()); } else { // cache disabled by user @@ -206,7 +193,8 @@ bool HttpsMethod::Fetch(FetchItem *Itm) curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); // speed limit - int dlLimit = _config->FindI("Acquire::http::Dl-Limit",0)*1024; + int dlLimit = _config->FindI("Acquire::https::Dl-Limit", + _config->FindI("Acquire::http::Dl-Limit",0))*1024; if (dlLimit > 0) curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, dlLimit); @@ -217,14 +205,16 @@ bool HttpsMethod::Fetch(FetchItem *Itm) "Debian APT-CURL/1.0 ("VERSION")"))); // set timeout - int timeout = _config->FindI("Acquire::http::Timeout",120); + int timeout = _config->FindI("Acquire::https::Timeout", + _config->FindI("Acquire::http::Timeout",120)); curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, timeout); //set really low lowspeed timeout (see #497983) curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, DL_MIN_SPEED); curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, timeout); // set redirect options and default to 10 redirects - bool AllowRedirect = _config->FindI("Acquire::https::AllowRedirect", true); + bool AllowRedirect = _config->FindB("Acquire::https::AllowRedirect", + _config->FindB("Acquire::http::AllowRedirect",true)); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, AllowRedirect); curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 10); -- cgit v1.2.3-70-g09d2 From d746ad6e049c472339003396f934e8ee93a0a378 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 11 Dec 2009 00:42:43 +0100 Subject: add AI_ADDRCONFIG to ai_flags in connect.cc as suggested by Aurelien Jarno in his response to Bernhard R. Link's patch, thanks! (Closes: #505020) --- debian/changelog | 2 ++ methods/connect.cc | 1 + 2 files changed, 3 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index e930de0dd..b8e435330 100644 --- a/debian/changelog +++ b/debian/changelog @@ -69,6 +69,8 @@ apt (0.7.25) UNRELEASED; urgency=low - add --debian-only as alias for --diff-only * methods/connect.cc: - display also strerror of "wicked" getaddrinfo errors + - add AI_ADDRCONFIG to ai_flags as suggested by Aurelien Jarno + in response to Bernhard R. Link, thanks! (Closes: #505020) * buildlib/configure.mak, buildlib/config.{sub,guess}: - remove (outdated) config.{sub,guess} and use the ones provided by the new added build-dependency autotools-dev instead diff --git a/methods/connect.cc b/methods/connect.cc index 74e670ebd..adb16a199 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -158,6 +158,7 @@ bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd, struct addrinfo Hints; memset(&Hints,0,sizeof(Hints)); Hints.ai_socktype = SOCK_STREAM; + Hints.ai_flags = AI_ADDRCONFIG; Hints.ai_protocol = 0; // if we couldn't resolve the host before, we don't try now -- cgit v1.2.3-70-g09d2 From 879cbcc8685781ba6f89a9123acd50c794490f2c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 11 Dec 2009 00:44:32 +0100 Subject: check cache size even if we do nothing else otherwise in apt.cron.daily, thanks Francesco Poli for patch(s) and patience! (Closes: #459344) --- debian/apt.cron.daily | 6 +++++- debian/changelog | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/apt.cron.daily b/debian/apt.cron.daily index b6099ee75..e59b05ee4 100644 --- a/debian/apt.cron.daily +++ b/debian/apt.cron.daily @@ -401,12 +401,16 @@ eval $(apt-config shell BackupArchiveInterval APT::Periodic::BackupArchiveInterv Debdelta=1 eval $(apt-config shell Debdelta APT::Periodic::Download-Upgradeable-Packages-Debdelta) -# check if we actually have to do anything +# check if we actually have to do anything that requires locking the cache if [ $UpdateInterval -eq 0 ] && [ $DownloadUpgradeableInterval -eq 0 ] && [ $UnattendedUpgradeInterval -eq 0 ] && [ $BackupArchiveInterval -eq 0 ] && [ $AutocleanInterval -eq 0 ]; then + + # check cache size + check_size_constraints + exit 0 fi diff --git a/debian/changelog b/debian/changelog index b8e435330..7fa06e02c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -101,6 +101,9 @@ apt (0.7.25) UNRELEASED; urgency=low - add config setting for User-Agent to the Acquire group, thanks Timothy J. Miller! (Closes: #355782) - add https options which default to http ones (Closes: #557085) + * debian/apt.cron.daily: + - check cache size even if we do nothing else otherwise, thanks + Francesco Poli for patch(s) and patience! (Closes: #459344) [ Chris Leick ] * doc/ various manpages: -- cgit v1.2.3-70-g09d2 From ca4907db7c8ec2d409a9ca32aeb2ccb4c3cd40aa Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 11 Dec 2009 00:48:52 +0100 Subject: fix a few typos in strings, comments and manpage of apt-ftparchive thanks Karl Goetz! (Closes: #558757) --- debian/changelog | 3 +++ doc/apt-ftparchive.1.xml | 2 +- ftparchive/apt-ftparchive.cc | 4 ++-- ftparchive/cachedb.cc | 6 +++--- ftparchive/contents.cc | 2 +- ftparchive/multicompress.cc | 2 +- ftparchive/writer.cc | 2 +- 7 files changed, 12 insertions(+), 9 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 7fa06e02c..af68b8ec2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -104,6 +104,9 @@ apt (0.7.25) UNRELEASED; urgency=low * debian/apt.cron.daily: - check cache size even if we do nothing else otherwise, thanks Francesco Poli for patch(s) and patience! (Closes: #459344) + * ftparchive/*: + - fix a few typos in strings, comments and manpage, + thanks Karl Goetz! (Closes: #558757) [ Chris Leick ] * doc/ various manpages: diff --git a/doc/apt-ftparchive.1.xml b/doc/apt-ftparchive.1.xml index d47df957a..fb1b10adc 100644 --- a/doc/apt-ftparchive.1.xml +++ b/doc/apt-ftparchive.1.xml @@ -285,7 +285,7 @@ Sources - Sets the output Packages file. Defaults to + Sets the output Sources file. Defaults to $(DIST)/$(SECTION)/source/Sources diff --git a/ftparchive/apt-ftparchive.cc b/ftparchive/apt-ftparchive.cc index d0dea7768..5b6b3940c 100644 --- a/ftparchive/apt-ftparchive.cc +++ b/ftparchive/apt-ftparchive.cc @@ -3,7 +3,7 @@ // $Id: apt-ftparchive.cc,v 1.8.2.3 2004/01/02 22:01:48 mdz Exp $ /* ###################################################################### - apt-scanpackages - Efficient work-alike for dpkg-scanpackages + apt-ftparchive - Efficient work-alike for dpkg-scanpackages Let contents be disabled from the conf @@ -792,7 +792,7 @@ bool Generate(CommandLine &CmdL) if (_config->FindB("APT::FTPArchive::Contents",true) == false) return true; - c1out << "Done Packages, Starting contents." << endl; + c1out << "Packages done, Starting contents." << endl; // Sort the contents file list by date string ArchiveDir = Setup.FindDir("Dir::ArchiveDir"); diff --git a/ftparchive/cachedb.cc b/ftparchive/cachedb.cc index dfda827b6..e02f0e1b6 100644 --- a/ftparchive/cachedb.cc +++ b/ftparchive/cachedb.cc @@ -69,7 +69,7 @@ bool CacheDB::ReadyDB(string DB) // apt 0.6.44 if (err == EINVAL) { - _error->Error(_("DB format is invalid. If you upgraded from a older version of apt, please remove and re-create the database.")); + _error->Error(_("DB format is invalid. If you upgraded from an older version of apt, please remove and re-create the database.")); } if (err) { @@ -83,7 +83,7 @@ bool CacheDB::ReadyDB(string DB) return true; } /*}}}*/ -// CacheDB::OpenFile - Open the filei /*{{{*/ +// CacheDB::OpenFile - Open the file /*{{{*/ // --------------------------------------------------------------------- /* */ bool CacheDB::OpenFile() @@ -139,7 +139,7 @@ bool CacheDB::GetCurStat() if (DBLoaded) { - /* First see if thre is anything about it + /* First see if there is anything about it in the database */ /* Get the flags (and mtime) */ diff --git a/ftparchive/contents.cc b/ftparchive/contents.cc index 1f2cbcc3d..fb1438f74 100644 --- a/ftparchive/contents.cc +++ b/ftparchive/contents.cc @@ -13,7 +13,7 @@ removing the massive sort time overhead. By breaking all the pathnames into components and storing them - separately a space savings is realized by not duplicating the string + separately a space saving is realized by not duplicating the string over and over again. Ultimately this saving is sacrificed to storage of the tree structure itself but the tree structure yields a speed gain in the sorting and processing. Ultimately it takes about 5 seconds to diff --git a/ftparchive/multicompress.cc b/ftparchive/multicompress.cc index 2fc8efcbf..16cef9769 100644 --- a/ftparchive/multicompress.cc +++ b/ftparchive/multicompress.cc @@ -365,7 +365,7 @@ bool MultiCompress::CloseOld(int Fd,pid_t Proc) // MultiCompress::Child - The writer child /*{{{*/ // --------------------------------------------------------------------- /* The child process forks a bunch of compression children and takes - input on FD and passes it to all the compressor childer. On the way it + input on FD and passes it to all the compressor child. On the way it computes the MD5 of the raw data. After this the raw data in the original files is compared to see if this data is new. If the data is new then the temp files are renamed, otherwise they are erased. */ diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index b2ebdca8a..4e6c9a77d 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -463,7 +463,7 @@ bool PackagesWriter::DoPackage(string FileName) SetTFRewriteData(Changes[End++], "Maintainer", NewMaint.c_str()); /* Get rid of the Optional tag. This is an ugly, ugly, ugly hack that - dpkg-scanpackages does.. Well sort of. dpkg-scanpackages just does renaming + dpkg-scanpackages does. Well sort of. dpkg-scanpackages just does renaming but dpkg does this append bit. So we do the append bit, at least that way the status file and package file will remain similar. There are other transforms but optional is the only legacy one still in use for some lazy reason. */ -- cgit v1.2.3-70-g09d2 From c0a73937424fa427972835342f12f5fbaa6d0c88 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 12 Dec 2009 01:54:33 +0100 Subject: revert this commit as fast as possible (aka next ABI break) This commit sets up our faked library extension to trick the build system into building the packages with libc6.9-6 while we are actually already at libc6.10-6. Oh dear... --- apt-pkg/init.h | 2 +- buildlib/library.mak | 14 +++++++------- buildlib/libversion.mak | 7 +++++++ debian/rules | 14 +++++++------- 4 files changed, 22 insertions(+), 15 deletions(-) (limited to 'debian') diff --git a/apt-pkg/init.h b/apt-pkg/init.h index dde4cf679..b1ed5922b 100644 --- a/apt-pkg/init.h +++ b/apt-pkg/init.h @@ -23,7 +23,7 @@ // See also buildlib/libversion.mak // FIXME: this needs to be changed to "4" (without quotes) on the next // ABI break -#define APT_PKG_MAJOR libc6.10-6-4 +#define APT_PKG_MAJOR 4 #define APT_PKG_MINOR 8 #define APT_PKG_RELEASE 0 diff --git a/buildlib/library.mak b/buildlib/library.mak index 029e87463..2a4bb782a 100644 --- a/buildlib/library.mak +++ b/buildlib/library.mak @@ -16,11 +16,11 @@ # See defaults.mak for information about LOCAL # Some local definitions -LOCAL := lib$(LIBRARY).so.$(MAJOR).$(MINOR) +LOCAL := lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR) $(LOCAL)-OBJS := $(addprefix $(OBJ)/,$(addsuffix .opic,$(notdir $(basename $(SOURCE))))) $(LOCAL)-DEP := $(addprefix $(DEP)/,$(addsuffix .opic.d,$(notdir $(basename $(SOURCE))))) $(LOCAL)-HEADERS := $(addprefix $(INCLUDE)/,$(HEADERS)) -$(LOCAL)-SONAME := lib$(LIBRARY).so.$(MAJOR) +$(LOCAL)-SONAME := lib$(LIBRARY)$(LIBEXT).so.$(MAJOR) $(LOCAL)-SLIBS := $(SLIBS) $(LOCAL)-LIBRARY := $(LIBRARY) @@ -29,7 +29,7 @@ include $(PODOMAIN_H) # Install the command hooks headers: $($(LOCAL)-HEADERS) -library: $(LIB)/lib$(LIBRARY).so $(LIB)/lib$(LIBRARY).so.$(MAJOR) +library: $(LIB)/lib$(LIBRARY).so $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR) clean: clean/$(LOCAL) veryclean: veryclean/$(LOCAL) @@ -44,14 +44,14 @@ veryclean/$(LOCAL): clean/$(LOCAL) -rm -f $($(@F)-HEADERS) $(LIB)/lib$($(@F)-LIBRARY)*.so* # Build rules for the two symlinks -.PHONY: $(LIB)/lib$(LIBRARY).so.$(MAJOR) $(LIB)/lib$(LIBRARY).so -$(LIB)/lib$(LIBRARY).so.$(MAJOR): $(LIB)/lib$(LIBRARY).so.$(MAJOR).$(MINOR) +.PHONY: $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR) $(LIB)/lib$(LIBRARY).so +$(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR): $(LIB)/lib$(LIBRARY)$(LIBEXT).so.$(MAJOR).$(MINOR) ln -sf $( /dev/null echo Building shared library $@ $(CXX) $(CXXFLAGS) $(LDFLAGS) $(PICFLAGS) $(LFLAGS) $(LFLAGS_SO)\ diff --git a/buildlib/libversion.mak b/buildlib/libversion.mak index 796c956e7..26ca86ced 100644 --- a/buildlib/libversion.mak +++ b/buildlib/libversion.mak @@ -12,3 +12,10 @@ LIBAPTPKG_RELEASE=$(shell grep -E '^\#define APT_PKG_RELEASE' $(BASE)/apt-pkg/in # The versionnumber is extracted from apt-inst/makefile - see also there. LIBAPTINST_MAJOR=$(shell egrep '^MAJOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2) LIBAPTINST_MINOR=$(shell egrep '^MINOR=' $(BASE)/apt-inst/makefile |cut -d '=' -f 2) + +# FIXME: In previous releases this lovely variable includes +# the detected libc and libdc++ version. As this is bogus we +# want to drop this, but this a ABI break. +# And we don't want to do this now. So we hardcode a value here, +# and drop it later on (hopefully as fast as possible). +LIBEXT=-libc6.9-6 diff --git a/debian/rules b/debian/rules index f69c0cffb..d01b57cd6 100755 --- a/debian/rules +++ b/debian/rules @@ -78,21 +78,21 @@ APT_UTILS=ftparchive sortpkgs extracttemplates include buildlib/libversion.mak # Determine which package we should provide in the control files -LIBAPTPKG_PROVIDE=libapt-pkg-$(LIBAPTPKG_MAJOR) -LIBAPTINST_PROVIDE=libapt-inst-$(LIBAPTINST_MAJOR) +LIBAPTPKG_PROVIDE=libapt-pkg$(LIBEXT)-$(LIBAPTPKG_MAJOR) +LIBAPTINST_PROVIDE=libapt-inst$(LIBEXT)-$(LIBAPTINST_MAJOR) debian/shlibs.local: apt-pkg/makefile # We have 3 shlibs.local files.. One for 'apt', one for 'apt-utils' and # one for the rest of the packages. This ensures that each package gets # the right overrides.. rm -rf $@ $@.apt $@.apt-utils - echo "libapt-pkg $(LIBAPTPKG_MAJOR)" > $@.apt + echo "libapt-pkg$(LIBEXT) $(LIBAPTPKG_MAJOR)" > $@.apt - echo "libapt-pkg $(LIBAPTPKG_MAJOR) $(LIBAPTPKG_PROVIDE)" > $@.apt-utils - echo "libapt-inst $(LIBAPTINST_MAJOR)" >> $@.apt-utils + echo "libapt-pkg$(LIBEXT) $(LIBAPTPKG_MAJOR) $(LIBAPTPKG_PROVIDE)" > $@.apt-utils + echo "libapt-inst$(LIBEXT) $(LIBAPTINST_MAJOR)" >> $@.apt-utils - echo "libapt-pkg $(LIBAPTPKG_MAJOR) $(LIBAPTPKG_PROVIDE)" > $@ - echo "libapt-inst $(LIBAPTINST_MAJOR) $(LIBAPTINST_PROVIDE)" >> $@ + echo "libapt-pkg$(LIBEXT) $(LIBAPTPKG_MAJOR) $(LIBAPTPKG_PROVIDE)" > $@ + echo "libapt-inst$(LIBEXT) $(LIBAPTINST_MAJOR) $(LIBAPTINST_PROVIDE)" >> $@ build: build/build-stamp build-doc: build/build-doc-stamp -- cgit v1.2.3-70-g09d2 From c42d68057cf711b53e9da0217a0ec54cffef4036 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 12 Dec 2009 16:28:25 +0100 Subject: refactor the current changelog a bit --- debian/changelog | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index af68b8ec2..d60bdb51f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,8 +13,6 @@ apt (0.7.25) UNRELEASED; urgency=low Closes: #548571 * German translation update by Holger Wansing Closes: #551534 - * German translation of manpages by Chris Leick - Closes: #552606 * Italian translation update by Milo Casagrande Closes: #555797 * Simplified Chinese translation update by Aron Xu @@ -37,7 +35,7 @@ apt (0.7.25) UNRELEASED; urgency=low * apt-pkg/deb/dpkgpm.cc: - add "purge" to list of known actions * apt-pkg/init.h: - - add compatibilty with old ABI name until the next ABI break + - add compatibility with old ABI name until the next ABI break [ Brian Murray ] * apt-pkg/depcache.cc, apt-pkg/indexcopy.cc: @@ -62,7 +60,7 @@ apt (0.7.25) UNRELEASED; urgency=low * doc/apt-mark.8.xml: - correct showauto synopsis, thanks Andrew Schulman (Closes: #551440) * cmdline/apt-get.cc: - - source should displays his final pkg pick (Closes: #249383, #550952) + - source should display his final pkg pick (Closes: #249383, #550952) - source doesn't need the complete version for match (Closes: #245250) - source ignores versions/releases if not available (Closes: #377424) - only warn if (free) space overflows (Closes: #522238) @@ -84,11 +82,6 @@ apt (0.7.25) UNRELEASED; urgency=low - bump policy to 3.8.3 as we have no outdated manpages anymore * debian/NEWS: - fix a typo in 0.7.24: Allready -> Already (Closes: #557674) - * cmdline/apt-mark: - - print an error if a new state file can't be created, - thanks Carl Chenet! (Closes: #521289) - - print an error and exit if python-apt is not installed, - thanks Carl Chenet! (Closes: #521284) * ftparchive/writer.{cc,h}: - add APT::FTPArchive::LongDescription to be able to disable them * apt-pkg/deb/debsrcrecords.cc: @@ -108,7 +101,14 @@ apt (0.7.25) UNRELEASED; urgency=low - fix a few typos in strings, comments and manpage, thanks Karl Goetz! (Closes: #558757) + [ Carl Chenet ] + * cmdline/apt-mark: + - print an error if a new state file can't be created + (Closes: #521289) and + - exit nicely if python-apt is not installed (Closes: #521284) + [ Chris Leick ] + * doc/de: German translation of manpages (Closes: #552606) * doc/ various manpages: - correct various errors, typos and oddities (Closes: #552535) * doc/apt-secure.8.xml: -- cgit v1.2.3-70-g09d2 From f8b832bdbe85ca315404edcf1159fb1225fddfbf Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 12 Dec 2009 16:32:18 +0100 Subject: remove informalexample tag which hides the programlisting in the tree section of the apt-ftparchive manpage, thanks Chris Leick for noticing it! --- debian/changelog | 2 ++ doc/apt-ftparchive.1.xml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d60bdb51f..2b09c9b68 100644 --- a/debian/changelog +++ b/debian/changelog @@ -113,6 +113,8 @@ apt (0.7.25) UNRELEASED; urgency=low - correct various errors, typos and oddities (Closes: #552535) * doc/apt-secure.8.xml: - replace literal with emphasis tags in Archive configuration + * doc/apt-ftparchive.1.xml: + - remove informalexample tag which hides the programlisting [ Eugene V. Lyubimkin ] * apt-pkg/contib/strutl.h diff --git a/doc/apt-ftparchive.1.xml b/doc/apt-ftparchive.1.xml index fb1b10adc..c56ff235a 100644 --- a/doc/apt-ftparchive.1.xml +++ b/doc/apt-ftparchive.1.xml @@ -350,11 +350,11 @@ When processing a Tree section apt-ftparchive performs an operation similar to: - + for i in Sections do for j in Architectures do Generate for DIST=scope SECTION=i ARCH=j - + Sections -- cgit v1.2.3-70-g09d2 From 5d70f74c114450f001d415eea101610eedaee05b Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 12 Dec 2009 19:06:01 +0100 Subject: fix to other oddities observed by Chris Leick while translating in doc/apt-get.8.xml, namely: - change equivalent "for" to "to the" (purge command) - clarify --fix-broken sentence about specifying packages --- debian/changelog | 3 +++ doc/apt-get.8.xml | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 2b09c9b68..cd4573468 100644 --- a/debian/changelog +++ b/debian/changelog @@ -115,6 +115,9 @@ apt (0.7.25) UNRELEASED; urgency=low - replace literal with emphasis tags in Archive configuration * doc/apt-ftparchive.1.xml: - remove informalexample tag which hides the programlisting + * doc/apt-get.8.xml: + - change equivalent "for" to "to the" (purge command) + - clarify --fix-broken sentence about specifying packages [ Eugene V. Lyubimkin ] * apt-pkg/contib/strutl.h diff --git a/doc/apt-get.8.xml b/doc/apt-get.8.xml index d3c3772bd..3d22f262c 100644 --- a/doc/apt-get.8.xml +++ b/doc/apt-get.8.xml @@ -333,8 +333,8 @@ Fix; attempt to correct a system with broken dependencies in place. This option, when used with install/remove, can omit any packages - to permit APT to deduce a likely solution. Any Package that are specified - must completely correct the problem. The option is sometimes necessary when + to permit APT to deduce a likely solution. If packages are specified, + these have to completely correct the problem. The option is sometimes necessary when running APT for the first time; APT itself does not allow broken package dependencies to exist on a system. It is possible that a system's dependency structure can be so corrupt as to require manual intervention @@ -466,7 +466,7 @@ Use purge instead of remove for anything that would be removed. An asterisk ("*") will be displayed next to packages which are - scheduled to be purged. is equivalent for + scheduled to be purged. is equivalent to the command. Configuration Item: APT::Get::Purge. -- cgit v1.2.3-70-g09d2 From 6847d275374c198f787c4978a49e7056f65a0a3d Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 14 Dec 2009 17:45:51 +0100 Subject: merge segfault fix from Mario Sanchez Prada, many thanks (closes: #561109) --- apt-pkg/deb/dpkgpm.cc | 3 ++- debian/changelog | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 6eb3b40ac..d1a275a47 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -879,7 +879,8 @@ bool pkgDPkgPM::Go(int OutStatusFd) const char *s = _("Can not write log, openpty() " "failed (/dev/pts not mounted?)\n"); fprintf(stderr, "%s",s); - fprintf(term_out, "%s",s); + if(term_out) + fprintf(term_out, "%s",s); master = slave = -1; } else { struct termios rtt; diff --git a/debian/changelog b/debian/changelog index cd4573468..c2a253484 100644 --- a/debian/changelog +++ b/debian/changelog @@ -36,6 +36,8 @@ apt (0.7.25) UNRELEASED; urgency=low - add "purge" to list of known actions * apt-pkg/init.h: - add compatibility with old ABI name until the next ABI break + * merge segfault fix from Mario Sanchez Prada, many thanks + (closes: #561109) [ Brian Murray ] * apt-pkg/depcache.cc, apt-pkg/indexcopy.cc: -- cgit v1.2.3-70-g09d2 From 82c9bbffa2a8c9d614514d24eff0842961212486 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 15 Dec 2009 13:49:21 +0100 Subject: releasing version 0.7.25 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c2a253484..53dfcce12 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -apt (0.7.25) UNRELEASED; urgency=low +apt (0.7.25) unstable; urgency=low [ Christian Perrier ] * Fix apt-ftparchive(1) wrt description of the "-o" option. @@ -139,7 +139,7 @@ apt (0.7.25) UNRELEASED; urgency=low * debian/apt.conf.autoremove: - Add kfreebsd-image-* to the list (Closes: #558803) - -- Michael Vogt Thu, 10 Dec 2009 22:02:38 +0100 + -- Michael Vogt Tue, 15 Dec 2009 09:21:55 +0100 apt (0.7.24) unstable; urgency=low -- cgit v1.2.3-70-g09d2