From d9e050800067f16ba49cb6932d7a52a6de22ab9d Mon Sep 17 00:00:00 2001 From: Matt Zimmerman Date: Sat, 25 Jun 2005 23:52:00 +0000 Subject: Merge from Debian branch Patches applied: * apt@packages.debian.org/apt--main--0--patch-89 Branch for Debian * apt@packages.debian.org/apt--main--0--patch-90 Update version in configure * apt@packages.debian.org/apt--main--0--patch-91 Fix French man page build * apt@packages.debian.org/apt--main--0--patch-92 Add the current Debian archive signing key * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-6 * build fix for apt--main--0 --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index e3254c2d2..d6ae540ee 100755 --- a/debian/rules +++ b/debian/rules @@ -209,7 +209,7 @@ apt: build debian/shlibs.local cp debian/bugscript debian/$@/usr/share/bug/apt/script - cp share/ubuntu-archive.gpg debian/$@/usr/share/$@ + cp share/*.gpg debian/$@/usr/share/$@ # head -n 500 ChangeLog > debian/ChangeLog -- cgit v1.2.3-70-g09d2 From 602afa46935a1015ae9d07a016b4b4cc199205a2 Mon Sep 17 00:00:00 2001 From: Matt Zimmerman Date: Sun, 26 Jun 2005 20:13:53 +0000 Subject: Improved arch-build rule --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index d6ae540ee..ee02baeb6 100755 --- a/debian/rules +++ b/debian/rules @@ -336,4 +336,4 @@ arch-build: mkdir -p debian/arch-build/apt-$(APT_DEBVER) baz inventory -s | xargs cp -a --parents --target=debian/arch-build/apt-$(APT_DEBVER) $(MAKE) -C debian/arch-build/apt-$(APT_DEBVER) startup doc - (cd debian/arch-build/apt-$(APT_DEBVER); $(DEB_BUILD_PROG)) + (cd debian/arch-build/apt-$(APT_DEBVER); $(DEB_BUILD_PROG); dpkg-genchanges -S > ../apt_$(APT_DEBVER)_source.changes) -- cgit v1.2.3-70-g09d2 From 4e2ded43a51b4f5522d3dd3cdfb4625a3a715966 Mon Sep 17 00:00:00 2001 From: Matt Zimmerman Date: Tue, 28 Jun 2005 18:06:22 +0000 Subject: Merge with mainline Patches applied: * apt@packages.debian.org/apt--main--0--patch-98 Install only one keyring on each branch (Closes: #316119) --- debian/changelog | 1 + debian/rules | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'debian/rules') diff --git a/debian/changelog b/debian/changelog index fd5959423..3279c859e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,7 @@ apt (0.6.39) unstable; urgency=low the patch, thanks to Colin Watson for testing it. - better report network timeouts from the methods to the acuire code, only timeout once per sources.list line + * Install only one keyring on each branch (Closes: #316119) -- diff --git a/debian/rules b/debian/rules index ee02baeb6..6b532cc53 100755 --- a/debian/rules +++ b/debian/rules @@ -209,7 +209,7 @@ apt: build debian/shlibs.local cp debian/bugscript debian/$@/usr/share/bug/apt/script - cp share/*.gpg debian/$@/usr/share/$@ + cp share/debian-archive.gpg debian/$@/usr/share/$@ # head -n 500 ChangeLog > debian/ChangeLog -- cgit v1.2.3-70-g09d2 From 1b2f60fc8fb3e88202dbae5345404f537abd32b1 Mon Sep 17 00:00:00 2001 From: Matt Zimmerman Date: Tue, 28 Jun 2005 18:06:41 +0000 Subject: install only the ubuntu keyring --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 6b532cc53..3bc9f53d9 100755 --- a/debian/rules +++ b/debian/rules @@ -209,7 +209,7 @@ apt: build debian/shlibs.local cp debian/bugscript debian/$@/usr/share/bug/apt/script - cp share/debian-archive.gpg debian/$@/usr/share/$@ + cp share/ubuntu-archive.gpg debian/$@/usr/share/$@ # head -n 500 ChangeLog > debian/ChangeLog -- cgit v1.2.3-70-g09d2 From be2d3759d2b9fb35b0e9c5c24f264d3dafbb1ed0 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 28 Sep 2005 20:46:12 +0000 Subject: * makefile fixes to make apt rosetta friendly --- debian/changelog | 6 +++-- debian/rules | 5 ++++ po/apt-all.pot | 2 +- po/de.po | 2 +- po/fr.po | 78 +++++++++++++++++++++++++------------------------------- po/makefile | 3 +++ 6 files changed, 49 insertions(+), 47 deletions(-) (limited to 'debian/rules') diff --git a/debian/changelog b/debian/changelog index 852029360..7cbcdc61e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,10 @@ apt (0.6.40.1ubuntu8) breezy; urgency=low * Cherry picked michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-62: - fix for a bad memory/file leak in the mmap code (ubuntu #15603) - * po/de.po: - - updated the translation + * po/de.po, po/fr.po: + - updated the translations + * po/makefile: + - create a single pot file in each domain dir to make rosetta happy -- Michael Vogt Wed, 28 Sep 2005 10:16:06 +0200 diff --git a/debian/rules b/debian/rules index 3bc9f53d9..1e339aade 100755 --- a/debian/rules +++ b/debian/rules @@ -213,6 +213,11 @@ apt: build debian/shlibs.local # head -n 500 ChangeLog > debian/ChangeLog + # make rosetta happy and remove pot files in po/ (but leave stuff + # in po/domains/* untouched) and cp *.po into each domain dir + rm -f build/po/*.pot + rm -f po/*.pot + dh_installexamples -p$@ $(BLD)/docs/examples/* dh_installman -p$@ dh_installcron -p$@ diff --git a/po/apt-all.pot b/po/apt-all.pot index 8bf2f9ccd..31b60eb46 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2005-09-13 15:16+0200\n" +"POT-Creation-Date: 2005-09-28 11:55+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/de.po b/po/de.po index ed2aec09c..ba68802b4 100644 --- a/po/de.po +++ b/po/de.po @@ -2786,7 +2786,7 @@ msgstr "Verbindung zu früh beendet" #~ msgid " to " #~ msgstr " nach " -# #~ msgid "Extract " +#~ msgid "Extract " #~ msgstr "Extrahiert " #~ msgid "Aborted, backing out" diff --git a/po/fr.po b/po/fr.po index 96e8538fe..5060ae314 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: apt 0.5.5\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2005-09-13 15:16+0200\n" -"PO-Revision-Date: 2005-07-28 20:52+0200\n" +"PO-Revision-Date: 2005-09-28 19:44+0200\n" "Last-Translator: Christian Perrier \n" "Language-Team: French \n" "MIME-Version: 1.0\n" @@ -765,7 +765,7 @@ msgstr "ATTENTION : les paquets suivants n'ont pas #: cmdline/apt-get.cc:691 msgid "Authentication warning overridden.\n" -msgstr "" +msgstr "Avertissement d'authentification forcé.\n" #: cmdline/apt-get.cc:698 msgid "Install these packages without verification [y/N]? " @@ -781,7 +781,7 @@ msgstr "Il y a des probl #: cmdline/apt-get.cc:753 msgid "Internal error, InstallPackages was called with broken packages!" -msgstr "" +msgstr "Erreur interne, InstallPackages a été appelé avec des paquets cassés !?" #: cmdline/apt-get.cc:762 msgid "Packages need to be removed but remove is disabled." @@ -789,9 +789,8 @@ msgstr "" "Les paquets doivent être enlevés mais la désinstallation est désactivée." #: cmdline/apt-get.cc:773 -#, fuzzy msgid "Internal error, Ordering didn't finish" -msgstr "Erreur interne en ajoutant une déviation" +msgstr "Erreur interne, la mise en ordre ne s'est pas terminée" #: cmdline/apt-get.cc:789 cmdline/apt-get.cc:1780 cmdline/apt-get.cc:1813 msgid "Unable to lock the download directory" @@ -804,7 +803,7 @@ msgstr "La liste des sources ne peut #: cmdline/apt-get.cc:814 msgid "How odd.. The sizes didn't match, email apt@packages.debian.org" -msgstr "" +msgstr "Comme c'est étrange... Les tailles ne correspondent pas, veuillez mailer apt@packages.debian.org" #: cmdline/apt-get.cc:819 #, c-format @@ -828,9 +827,9 @@ msgid "After unpacking %sB disk space will be freed.\n" msgstr "Après dépaquetage, %so d'espace disque seront libérés.\n" #: cmdline/apt-get.cc:844 cmdline/apt-get.cc:1927 -#, fuzzy, c-format +#, c-format msgid "Couldn't determine free space in %s" -msgstr "Pas assez d'espace disponible sur %s" +msgstr "Impossible de déterminer l'espace disponible sur %s" #: cmdline/apt-get.cc:847 #, c-format @@ -1074,9 +1073,8 @@ msgid "Done" msgstr "Fait" #: cmdline/apt-get.cc:1748 cmdline/apt-get.cc:1756 -#, fuzzy msgid "Internal error, problem resolver broke stuff" -msgstr "Erreur interne, AllUpgrade a cassé le boulot !" +msgstr "Erreur interne, le solveur de problèmes a cassé des choses" #: cmdline/apt-get.cc:1856 msgid "Must specify at least one package to fetch source for" @@ -1670,9 +1668,8 @@ msgstr "" "d'utilisation." #: methods/cdrom.cc:169 -#, fuzzy msgid "Disk not found." -msgstr "Fichier non trouvé" +msgstr "Disque non trouvé." #: methods/cdrom.cc:177 methods/file.cc:79 methods/rsh.cc:264 msgid "File not found" @@ -1901,41 +1898,39 @@ msgstr "Impossible de se connecter #: methods/gpgv.cc:92 msgid "E: Argument list from Acquire::gpgv::Options too long. Exiting." -msgstr "" +msgstr "E : Liste d'arguments de Acquire::gpgv::Options trop longues. Sortie." #: methods/gpgv.cc:191 msgid "" "Internal error: Good signature, but could not determine key fingerprint?!" -msgstr "" +msgstr "Erreur interne : Signature correcte, mais impossible de déterminer l'empreinte de la clé !?" #: methods/gpgv.cc:196 msgid "At least one invalid signature was encountered." -msgstr "" +msgstr "Une signature invalide, au moins, a été rencontrée." #. FIXME String concatenation considered harmful. #: methods/gpgv.cc:201 -#, fuzzy msgid "Could not execute " -msgstr "Impossible de verrouiller %s" +msgstr "Impossible de démarrer" #: methods/gpgv.cc:202 msgid " to verify signature (is gnupg installed?)" -msgstr "" +msgstr " pour vérifer la signature (est-ce que gnupg est installé ?)" #: methods/gpgv.cc:206 msgid "Unknown error executing gpgv" -msgstr "" +msgstr "Erreur inconnue lors du lancement de gpgv" #: methods/gpgv.cc:237 -#, fuzzy msgid "The following signatures were invalid:\n" -msgstr "Les paquets supplémentaires suivants seront installés : " +msgstr "Les signatures suivantes étaient invalides :\n" #: methods/gpgv.cc:244 msgid "" "The following signatures couldn't be verified because the public key is not " "available:\n" -msgstr "" +msgstr "Les signatures suivantes n'ont pas pu être vérifiées parce que la clé publique n'est pas disponible :\n" #: methods/gzip.cc:57 #, c-format @@ -2425,7 +2420,7 @@ msgstr "Le r #: apt-pkg/acquire.cc:817 #, c-format msgid "Downloading file %li of %li (%s remaining)" -msgstr "" +msgstr "Téléchargement du fichier %li sur %li (%s restants)" #: apt-pkg/acquire-worker.cc:113 #, c-format @@ -2438,12 +2433,9 @@ msgid "Method %s did not start correctly" msgstr "La méthode %s n'a pas démarré correctement" #: apt-pkg/acquire-worker.cc:377 -#, fuzzy, c-format +#, c-format msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter." -msgstr "" -"Changement de support : veuillez insérer le disque\n" -"« %s »\n" -"dans le lecteur « %s » et appuyez sur la touche Entrée\n" +msgstr "Veuillez insérer le disque « %s » dans le lecteur « %s » et appuyez sur la touche Entrée." #: apt-pkg/init.cc:119 #, c-format @@ -2718,54 +2710,54 @@ msgstr "" "correspondent pas\n" #: apt-pkg/deb/dpkgpm.cc:358 -#, fuzzy, c-format +#, c-format msgid "Preparing %s" -msgstr "Ouverture de %s" +msgstr "Préparation de %s" #: apt-pkg/deb/dpkgpm.cc:359 -#, fuzzy, c-format +#, c-format msgid "Unpacking %s" -msgstr "Ouverture de %s" +msgstr "Dépaquetage de %s" #: apt-pkg/deb/dpkgpm.cc:364 -#, fuzzy, c-format +#, c-format msgid "Preparing to configure %s" -msgstr "Ouverture du fichier de configuration %s" +msgstr "Préparation de la configuration de %s" #: apt-pkg/deb/dpkgpm.cc:365 #, c-format msgid "Configuring %s" -msgstr "" +msgstr "Configuration de %s" #: apt-pkg/deb/dpkgpm.cc:366 -#, fuzzy, c-format +#, c-format msgid "Installed %s" -msgstr " Installé : " +msgstr "Installation de %s" #: apt-pkg/deb/dpkgpm.cc:371 #, c-format msgid "Preparing for removal of %s" -msgstr "" +msgstr "Preparation de la suppression de %s" #: apt-pkg/deb/dpkgpm.cc:372 -#, fuzzy, c-format +#, c-format msgid "Removing %s" -msgstr "Ouverture de %s" +msgstr "Suppression de %s" #: apt-pkg/deb/dpkgpm.cc:373 #, c-format msgid "Removed %s" -msgstr "" +msgstr "Suppression de %s" #: apt-pkg/deb/dpkgpm.cc:378 #, c-format msgid "Preparing for remove with config %s" -msgstr "" +msgstr "Préparation pour la suppression avec configuration %s" #: apt-pkg/deb/dpkgpm.cc:379 #, c-format msgid "Removed with config %s" -msgstr "" +msgstr "Supprimé avec configuration %s" #: methods/rsh.cc:330 msgid "Connection closed prematurely" diff --git a/po/makefile b/po/makefile index bb8118c77..30af41a16 100644 --- a/po/makefile +++ b/po/makefile @@ -40,6 +40,9 @@ $(POTFILES) : $(PO)/%.pot : --files-from=$(PO)/POTFILES_$*.in -o $(PO)/domains/$*/c.pot rm -f $(PO)/POTFILES_$*.in $(MSGCOMM) --more-than=0 $(PO)/domains/$*/c.pot $(PO)/domains/$*/sh.pot --output=$@ + # copy into the domain dirs to make rosetta happy + rm -f $(PO)/domains/$*/*.pot + cp $@ $(PO)/domains/$* $(PACKAGE)-all.pot: $(POTFILES) $(MSGCOMM) --more-than=0 $(POTFILES) --output=$@ -- cgit v1.2.3-70-g09d2 From 7a6058744badb38d2ccac0158d6ed1359cfb0239 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 8 Dec 2005 17:29:42 +0000 Subject: * merged with the current debian version Patches applied: * bubulle@debian.org--2005/apt--main--0--patch-132 Completed Simplified Chinese translation * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-94 * pkgDirStream has (slightly) better extract support now * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-95 * merge fix for #339533 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-96 * merged with bubulle * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-97 * some more debug output * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-98 * ABI change: merged more flexible pkgAcquireFile code * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-99 * merged http download limit for apt (#146877) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-100 * applied parts of the string speedup patch from debian #319377 (ABI change) * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-101 * fix for #340448 --- apt-pkg/acquire-item.cc | 15 +++++++------ apt-pkg/acquire-item.h | 5 +++-- apt-pkg/algorithms.h | 3 ++- apt-pkg/cacheiterators.h | 4 +++- apt-pkg/cdrom.cc | 3 +++ apt-pkg/deb/debsystem.cc | 7 +++++- cmdline/apt-get.cc | 1 + debian/apt.manpages | 1 + debian/rules | 1 + doc/apt-key.8.xml | 47 +++++++++++++++++++++++++++++++++++++---- doc/apt.conf.5.xml | 2 +- doc/fr/apt-config.fr.8.xml | 4 ++-- doc/fr/apt-key.fr.8.xml | 44 +++++++++++++++++++++++++++++++++----- doc/fr/apt_preferences.fr.5.xml | 4 ++-- doc/fr/makefile | 12 +++++++++-- doc/makefile | 3 ++- 16 files changed, 127 insertions(+), 29 deletions(-) (limited to 'debian/rules') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 09f25c0dd..88c25de43 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -142,20 +142,21 @@ pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner, { Decompression = false; Erase = false; - + DestFile = _config->FindDir("Dir::State::lists") + "partial/"; DestFile += URItoFileName(URI); if(comprExt.empty()) { - // autoselect - if(FileExists("/usr/bin/bzip2")) - Desc.URI = URI + ".bz2"; - else - Desc.URI = URI + ".gz"; + // autoselect the compression method + if(FileExists("/usr/bin/bzip2")) + CompressionExtension = ".bz2"; + else + CompressionExtension = ".gz"; } else { - Desc.URI = URI + comprExt; + CompressionExtension = comprExt; } + Desc.URI = URI + CompressionExtension; Desc.Description = URIDesc; Desc.Owner = this; diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 9e7198d8d..c34b5ef69 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -92,7 +92,8 @@ class pkgAcqIndex : public pkgAcquire::Item pkgAcquire::ItemDesc Desc; string RealURI; string ExpectedMD5; - + string CompressionExtension; + public: // Specialized action members @@ -100,7 +101,7 @@ class pkgAcqIndex : public pkgAcquire::Item virtual void Done(string Message,unsigned long Size,string Md5Hash, pkgAcquire::MethodConfig *Cnf); virtual string Custom600Headers(); - virtual string DescURI() {return RealURI + ".gz";}; + virtual string DescURI() {return RealURI + CompressionExtension;}; pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc, string ShortDesct, string ExpectedMD5, string compressExt=""); diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index 174a7f58d..b95218061 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -118,7 +118,8 @@ class pkgProblemResolver // Try to resolve problems only by using keep bool ResolveByKeep(); - + + // Install all protected packages void InstallProtect(); pkgProblemResolver(pkgDepCache *Cache); diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h index 7c6f43351..2b326bd65 100644 --- a/apt-pkg/cacheiterators.h +++ b/apt-pkg/cacheiterators.h @@ -222,7 +222,7 @@ class pkgCache::PrvIterator void operator ++(int) {if (Prv != Owner->ProvideP) Prv = Owner->ProvideP + (Type == PrvVer?Prv->NextPkgProv:Prv->NextProvides);}; inline void operator ++() {operator ++(0);}; - inline bool end() const {return Prv == Owner->ProvideP?true:false;}; + inline bool end() const {return Owner == 0 || Prv == Owner->ProvideP?true:false;}; // Comparison inline bool operator ==(const PrvIterator &B) const {return Prv == B.Prv;}; @@ -244,6 +244,8 @@ class pkgCache::PrvIterator inline PkgIterator OwnerPkg() {return PkgIterator(*Owner,Owner->PkgP + Owner->VerP[Prv->Version].ParentPkg);}; inline unsigned long Index() const {return Prv - Owner->ProvideP;}; + inline PrvIterator() : Prv(0), Type(PrvVer), Owner(0) {}; + inline PrvIterator(pkgCache &Owner,Provides *Trg,Version *) : Prv(Trg), Type(PrvVer), Owner(&Owner) { diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc index d7ef844a2..ce1beb39b 100644 --- a/apt-pkg/cdrom.cc +++ b/apt-pkg/cdrom.cc @@ -422,6 +422,9 @@ bool pkgCdrom::WriteSourceList(string Name,vector &List,bool Source) { F.getline(Buffer,sizeof(Buffer)); CurLine++; + if (F.fail() && !F.eof()) + return _error->Error(_("Line %u too long in source list %s."), + CurLine,File.c_str()); _strtabexpand(Buffer,sizeof(Buffer)); _strstrip(Buffer); diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index 0b3a4f742..2d805ea6f 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -164,7 +164,12 @@ bool debSystem::Initialize(Configuration &Cnf) Cnf.CndSet("Dir::State::userstatus","status.user"); // Defunct Cnf.CndSet("Dir::State::status","/var/lib/dpkg/status"); Cnf.CndSet("Dir::Bin::dpkg","/usr/bin/dpkg"); - + + if (StatusFile) { + delete StatusFile; + StatusFile = 0; + } + return true; } /*}}}*/ diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 356d36b48..48b21a31f 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -2040,6 +2040,7 @@ bool DoSource(CommandLine &CmdL) if (system(S) != 0) { fprintf(stderr,_("Unpack command '%s' failed.\n"),S); + fprintf(stderr,_("Check if the 'dpkg-dev' package is installed.\n")); _exit(1); } } diff --git a/debian/apt.manpages b/debian/apt.manpages index e621e1c49..b52ea3d3d 100644 --- a/debian/apt.manpages +++ b/debian/apt.manpages @@ -3,6 +3,7 @@ doc/apt-cdrom.8 doc/apt-config.8 doc/apt-get.8 doc/apt-key.8 +doc/apt-secure.8 doc/apt.8 doc/apt.conf.5 doc/apt_preferences.5 diff --git a/debian/rules b/debian/rules index 1e339aade..6c0a24fd9 100755 --- a/debian/rules +++ b/debian/rules @@ -274,6 +274,7 @@ apt-utils: build debian/shlibs.local cp $(addprefix $(BLD)/bin/apt-,$(APT_UTILS)) debian/$@/usr/bin/ dh_installdocs -p$@ + dh_installexamples -p$@ # Install the man pages.. dh_installman -p$@ diff --git a/doc/apt-key.8.xml b/doc/apt-key.8.xml index 62686618a..eac61307d 100644 --- a/doc/apt-key.8.xml +++ b/doc/apt-key.8.xml @@ -68,17 +68,56 @@ List trusted keys. + + + update + + + + Update the local keyring with the keyring of Debian archive + keys and removes from the keyring the archive keys which are no + longer valid. + + + + + + + + + Files + + /etc/apt/trusted.gpg + Keyring of local trusted keys, new keys will be added here. + + + /etc/apt/trustdb.gpg + Local trust database of archive keys. + + + /usr/share/keyrings/debian-archive-keyring.gpg + Keyring of Debian archive trusted keys. + + + /usr/share/keyrings/debian-archive-removed-keys.gpg + Keyring of Debian archive removed trusted keys. + + + + + - - - - +See Also + +&apt-get;, &apt-secure; + + &manbugs; &manauthor; diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index 69e212243..43f33681f 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -284,7 +284,7 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; sourcelist gives the location of the sourcelist and main is the default configuration file (setting has no effect, unless it is done from the config file specified by - APT_CONFIG. + APT_CONFIG). The Dir::Parts setting reads in all the config fragments in lexical order from the directory specified. After this is done then the diff --git a/doc/fr/apt-config.fr.8.xml b/doc/fr/apt-config.fr.8.xml index ac9143066..043c58686 100644 --- a/doc/fr/apt-config.fr.8.xml +++ b/doc/fr/apt-config.fr.8.xml @@ -57,7 +57,7 @@ des commandes suivantes doit Le terme shell est utilisé pour accéder aux informations de configuration depuis un script shell. Deux arguments doivent lui être donnés ; le -premier est une variable de shell et le second une valeur de configuration à +premier est une variable du shell et le second une valeur de configuration à demander. La sortie standard consiste en une liste de commandes d'assignation de shell pour chaque valeur présente. Dans un script shell, cette commande devrait @@ -69,7 +69,7 @@ RES=`apt-config shell OPTS MyApp::Options` eval $RES -La variable d'environnement de shell $OPTS sera définie par la valeur de +La variable d'environnement du shell $OPTS sera définie par la valeur de MyApp::Options ou, par défaut, la valeur -f. diff --git a/doc/fr/apt-key.fr.8.xml b/doc/fr/apt-key.fr.8.xml index a31fb7855..29ba237e2 100644 --- a/doc/fr/apt-key.fr.8.xml +++ b/doc/fr/apt-key.fr.8.xml @@ -34,7 +34,7 @@ apt-key gère les clés dont se sert apt pour authentifier les paquets. Les paquets authentifiés par ces clés seront -réputés +réputés fiables. @@ -73,13 +73,47 @@ Afficher la liste des cl + + update + + +Mettre à jour le trousseau de clés local avec le trousseau de clés de l'archive +Debian et supprimer les clés qui sont périmées. + + + + - - - - + Fichiers + + /etc/apt/trusted.gpg +Trousseau de clés locales fiables, les nouvelles clés sont ajoutées ici. + + + + /etc/apt/trustdb.gpg + Base de données locale fiable des clés de l'archive. + + + /usr/share/keyrings/debian-archive-keyring.gpg + Trousseau des clés fiables de l'archive Debian. + + + /usr/share/keyrings/debian-archive-removed-keys.gpg + + >Trousseau des clés fiables supprimées de l'archive Debian. + + + + + +Voir aussi + +&apt-get;, &apt-secure; + + &manbugs; &manauthor; diff --git a/doc/fr/apt_preferences.fr.5.xml b/doc/fr/apt_preferences.fr.5.xml index c6b2c8794..6e1d2043e 100644 --- a/doc/fr/apt_preferences.fr.5.xml +++ b/doc/fr/apt_preferences.fr.5.xml @@ -7,7 +7,7 @@ ]> - + &apt-author.team; @@ -208,7 +208,7 @@ d' Package: * Pin: release a=unstable -Pin-Priority: 50 +Pin-Priority: 500 L'entrée suivante affecte une priorité haute à toutes les versions diff --git a/doc/fr/makefile b/doc/fr/makefile index c0e7fa7ed..596de7b09 100644 --- a/doc/fr/makefile +++ b/doc/fr/makefile @@ -5,11 +5,16 @@ SUBDIR=doc/fr # Bring in the default rules include ../../buildlib/defaults.mak +# Do not use XMLTO, build the manpages directly with XSLTPROC +XSLTPROC=/usr/bin/xsltproc +STYLESHEET=/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl + + # Man pages SOURCE = apt-cache.fr.8 apt-get.fr.8 apt-cdrom.fr.8 apt.conf.fr.5 \ sources.list.fr.5 apt-config.fr.8 apt-sortpkgs.fr.1 \ apt-ftparchive.fr.1 apt_preferences.fr.5 apt-extracttemplates.fr.1 \ - apt-key.fr.8 + apt-key.fr.8 apt-secure.fr.8 INCLUDES = apt.ent.fr @@ -17,7 +22,7 @@ doc: $(SOURCE) $(SOURCE) :: % : %.xml $(INCLUDES) echo Creating man page $@ - $(XMLTO) man $< + $(XSLTPROC) -o $@ $(STYLESHEET) $< apt-cache.fr.8:: apt-cache.8 cp $< $@ @@ -52,4 +57,7 @@ apt-extracttemplates.fr.1:: apt-extracttemplates.1 apt-key.fr.8:: apt-key.8 cp $< $@ +apt-secure.fr.8:: apt-secure.8 + cp $< $@ + diff --git a/doc/makefile b/doc/makefile index f34b3f6e5..31ee061fb 100644 --- a/doc/makefile +++ b/doc/makefile @@ -14,7 +14,8 @@ include $(DEBIANDOC_H) # XML man pages SOURCE = apt-cache.8 apt-get.8 apt-cdrom.8 apt.conf.5 sources.list.5 \ apt-config.8 apt_preferences.5 \ - apt-sortpkgs.1 apt-ftparchive.1 apt-extracttemplates.1 apt-key.8 + apt-sortpkgs.1 apt-ftparchive.1 apt-extracttemplates.1 \ + apt-key.8 apt-secure.8 INCLUDES = apt.ent include $(XML_MANPAGE_H) -- cgit v1.2.3-70-g09d2 From 2913337f8e15ec33e1637a7b7b46c9c11b80d247 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 28 Mar 2006 21:43:03 +0200 Subject: * undo some of the bzr merge damage from the last merge --- debian/apt.postinst | 2 +- debian/rules | 2 +- po/makefile | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'debian/rules') diff --git a/debian/apt.postinst b/debian/apt.postinst index ae1801198..df0433057 100644 --- a/debian/apt.postinst +++ b/debian/apt.postinst @@ -17,7 +17,7 @@ case "$1" in configure) if ! test -f /etc/apt/trusted.gpg; then - cp /usr/share/apt/debian-archive.gpg /etc/apt/trusted.gpg + cp /usr/share/apt/ubuntu-archive.gpg /etc/apt/trusted.gpg fi ;; diff --git a/debian/rules b/debian/rules index bd9073ad2..4d88d5b12 100755 --- a/debian/rules +++ b/debian/rules @@ -210,7 +210,7 @@ apt: build debian/shlibs.local cp debian/bugscript debian/$@/usr/share/bug/apt/script - cp share/debian-archive.gpg debian/$@/usr/share/$@ + cp share/ubuntu-archive.gpg debian/$@/usr/share/$@ # head -n 500 ChangeLog > debian/ChangeLog diff --git a/po/makefile b/po/makefile index 45e5b1e5a..07dc51c07 100644 --- a/po/makefile +++ b/po/makefile @@ -40,6 +40,9 @@ $(POTFILES) : $(PO)/%.pot : --files-from=$(PO)/POTFILES_$*.in -o $(PO)/domains/$*/c.pot rm -f $(PO)/POTFILES_$*.in $(MSGCOMM) --more-than=0 $(PO)/domains/$*/c.pot $(PO)/domains/$*/sh.pot --output=$@ + # copy into the domain dirs to make rosetta happy + rm -f $(PO)/domains/$*/*.pot + cp $@ $(PO)/domains/$* $(PACKAGE)-all.pot: $(POTFILES) $(MSGCOMM) --more-than=0 $(POTFILES) --output=$@ -- cgit v1.2.3-70-g09d2 From 9d2938d4e6e86c6afdb9606f76f4ae9ce0ac4ee5 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 6 Sep 2006 19:12:34 +0200 Subject: * cmdline/apt-get.cc: - always show the autoremove information and give advice how to use it * debian/rules: - install apt.conf.autoremove with blacklist for linux-image and linux-restriceted-modules --- cmdline/apt-get.cc | 45 +++++++++++-------- configure.in | 2 +- debian/apt.conf.autoremove | 8 ++++ debian/apt.dirs | 1 + debian/rules | 2 +- po/apt-all.pot | 108 ++++++++++++++++++++++++--------------------- 6 files changed, 95 insertions(+), 71 deletions(-) create mode 100644 debian/apt.conf.autoremove (limited to 'debian/rules') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 9e7071988..5e1ccb0c0 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1392,31 +1392,42 @@ bool DoUpdate(CommandLine &CmdL) /* Remove unused automatic packages */ bool DoAutomaticRemove(CacheFile &Cache) { - if(_config->FindI("Debug::pkgAutoRemove",false)) + bool Debug = _config->FindI("Debug::pkgAutoRemove",false); + pkgDepCache::ActionGroup group(*Cache); + + if(Debug) std::cout << "DoAutomaticRemove()" << std::endl; if (_config->FindB("APT::Get::Remove",true) == false) return _error->Error(_("We are not supposed to delete stuff, can't " "start AutoRemover")); + string autoremovelist, autoremoveversions; + // look over the cache to see what can be removed + for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); ! Pkg.end(); ++Pkg) { - pkgDepCache::ActionGroup group(*Cache); - - // look over the cache to see what can be removed - for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); ! Pkg.end(); ++Pkg) - { - if (Cache[Pkg].Garbage) - { - if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install()) - fprintf(stdout,"We could delete %s\n", Pkg.Name()); - - if(Pkg.CurrentVer() != 0 && Pkg->CurrentState != pkgCache::State::ConfigFiles) + if (Cache[Pkg].Garbage) + { + if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install()) + if(Debug) + std::cout << "We could delete %s" << Pkg.Name() << std::endl; + + autoremovelist += string(Pkg.Name()) + " "; + autoremoveversions += string(Cache[Pkg].CandVersion) + " "; + if (_config->FindB("APT::Get::AutomaticRemove")) + { + if(Pkg.CurrentVer() != 0 && + Pkg->CurrentState != pkgCache::State::ConfigFiles) Cache->MarkDelete(Pkg, _config->FindB("APT::Get::Purge", false)); - else + else Cache->MarkKeep(Pkg, false, false); - } - } + } + } } + ShowList(c1out, _("The following packages where automatically installed and are no longer required:"), autoremovelist, autoremoveversions); + if (!_config->FindB("APT::Get::AutomaticRemove") && + autoremovelist.size() > 0) + c1out << _("Use 'apt-get autoremove' to remove them.") << std::endl; // Now see if we destroyed anything if (Cache->BrokenCount() != 0) @@ -1632,10 +1643,8 @@ bool DoInstall(CommandLine &CmdL) return _error->Error(_("Broken packages")); } } - if (_config->FindB("APT::Get::AutomaticRemove")) { - if (!DoAutomaticRemove(Cache)) + if (!DoAutomaticRemove(Cache)) return false; - } /* Print out a list of packages that are going to be installed extra to what the user asked */ diff --git a/configure.in b/configure.in index fc4eff203..f0b0d6703 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.6.45") +AC_DEFINE_UNQUOTED(VERSION,"0.6.45.1") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/apt.conf.autoremove b/debian/apt.conf.autoremove new file mode 100644 index 000000000..98143ce9a --- /dev/null +++ b/debian/apt.conf.autoremove @@ -0,0 +1,8 @@ +APT +{ + NeverAutoRemove + { + "^linux-image.*"; + "^linux-restricted-modules.*"; + }; +}; diff --git a/debian/apt.dirs b/debian/apt.dirs index e1cb738fa..1543e8bb1 100644 --- a/debian/apt.dirs +++ b/debian/apt.dirs @@ -2,6 +2,7 @@ usr/bin usr/lib/apt/methods usr/lib/dpkg/methods/apt etc/apt +etc/apt/apt.conf.d etc/apt/sources.list.d var/cache/apt/archives/partial var/lib/apt/lists/partial diff --git a/debian/rules b/debian/rules index 044f742d0..6a142e759 100755 --- a/debian/rules +++ b/debian/rules @@ -211,7 +211,7 @@ apt: build debian/shlibs.local cp debian/bugscript debian/$@/usr/share/bug/apt/script cp share/debian-archive.gpg debian/$@/usr/share/$@ - + cp debian/apt.conf.autoremove debian/$@/etc/apt/apt.conf.d/01autoremove # head -n 500 ChangeLog > debian/ChangeLog dh_installexamples -p$@ $(BLD)/docs/examples/* diff --git a/po/apt-all.pot b/po/apt-all.pot index 2dd720674..0a7a30629 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-09-06 18:03+0200\n" +"POT-Creation-Date: 2006-09-06 18:58+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -148,7 +148,7 @@ msgstr "" #: cmdline/apt-cache.cc:1652 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:550 -#: cmdline/apt-get.cc:2449 cmdline/apt-sortpkgs.cc:144 +#: cmdline/apt-get.cc:2455 cmdline/apt-sortpkgs.cc:144 #, c-format msgid "%s %s for %s %s compiled on %s %s\n" msgstr "" @@ -546,7 +546,7 @@ msgstr "" msgid "Y" msgstr "" -#: cmdline/apt-get.cc:143 cmdline/apt-get.cc:1561 +#: cmdline/apt-get.cc:143 cmdline/apt-get.cc:1569 #, c-format msgid "Regex compilation error - %s" msgstr "" @@ -705,11 +705,11 @@ msgstr "" msgid "Internal error, Ordering didn't finish" msgstr "" -#: cmdline/apt-get.cc:792 cmdline/apt-get.cc:1880 cmdline/apt-get.cc:1913 +#: cmdline/apt-get.cc:792 cmdline/apt-get.cc:1886 cmdline/apt-get.cc:1919 msgid "Unable to lock the download directory" msgstr "" -#: cmdline/apt-get.cc:802 cmdline/apt-get.cc:1961 cmdline/apt-get.cc:2197 +#: cmdline/apt-get.cc:802 cmdline/apt-get.cc:1967 cmdline/apt-get.cc:2203 #: apt-pkg/cachefile.cc:67 msgid "The list of sources could not be read." msgstr "" @@ -738,7 +738,7 @@ msgstr "" msgid "After unpacking %sB disk space will be freed.\n" msgstr "" -#: cmdline/apt-get.cc:847 cmdline/apt-get.cc:2051 +#: cmdline/apt-get.cc:847 cmdline/apt-get.cc:2057 #, c-format msgid "Couldn't determine free space in %s" msgstr "" @@ -772,7 +772,7 @@ msgstr "" msgid "Do you want to continue [Y/n]? " msgstr "" -#: cmdline/apt-get.cc:962 cmdline/apt-get.cc:1366 cmdline/apt-get.cc:2094 +#: cmdline/apt-get.cc:962 cmdline/apt-get.cc:1366 cmdline/apt-get.cc:2100 #, c-format msgid "Failed to fetch %s %s\n" msgstr "" @@ -781,7 +781,7 @@ msgstr "" msgid "Some files failed to download" msgstr "" -#: cmdline/apt-get.cc:981 cmdline/apt-get.cc:2103 +#: cmdline/apt-get.cc:981 cmdline/apt-get.cc:2109 msgid "Download complete and in download only mode" msgstr "" @@ -887,49 +887,55 @@ msgid "" "used instead." msgstr "" -#: cmdline/apt-get.cc:1399 +#: cmdline/apt-get.cc:1402 msgid "We are not supposed to delete stuff, can't start AutoRemover" msgstr "" -#: cmdline/apt-get.cc:1424 +#: cmdline/apt-get.cc:1427 +msgid "" +"The following packages where automatically installed and are no longer " +"required:" +msgstr "" + +#: cmdline/apt-get.cc:1432 msgid "" "Hmm, seems like the AutoRemover destroyed something which really\n" "shouldn't happen. Please file a bug report against apt." msgstr "" -#: cmdline/apt-get.cc:1427 cmdline/apt-get.cc:1629 +#: cmdline/apt-get.cc:1435 cmdline/apt-get.cc:1637 msgid "The following information may help to resolve the situation:" msgstr "" -#: cmdline/apt-get.cc:1431 +#: cmdline/apt-get.cc:1439 msgid "Internal Error, AutoRemover broke stuff" msgstr "" -#: cmdline/apt-get.cc:1450 +#: cmdline/apt-get.cc:1458 msgid "Internal error, AllUpgrade broke stuff" msgstr "" -#: cmdline/apt-get.cc:1548 cmdline/apt-get.cc:1584 +#: cmdline/apt-get.cc:1556 cmdline/apt-get.cc:1592 #, c-format msgid "Couldn't find package %s" msgstr "" -#: cmdline/apt-get.cc:1571 +#: cmdline/apt-get.cc:1579 #, c-format msgid "Note, selecting %s for regex '%s'\n" msgstr "" -#: cmdline/apt-get.cc:1601 +#: cmdline/apt-get.cc:1609 msgid "You might want to run `apt-get -f install' to correct these:" msgstr "" -#: cmdline/apt-get.cc:1604 +#: cmdline/apt-get.cc:1612 msgid "" "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a " "solution)." msgstr "" -#: cmdline/apt-get.cc:1616 +#: cmdline/apt-get.cc:1624 msgid "" "Some packages could not be installed. This may mean that you have\n" "requested an impossible situation or if you are using the unstable\n" @@ -937,159 +943,159 @@ msgid "" "or been moved out of Incoming." msgstr "" -#: cmdline/apt-get.cc:1624 +#: cmdline/apt-get.cc:1632 msgid "" "Since you only requested a single operation it is extremely likely that\n" "the package is simply not installable and a bug report against\n" "that package should be filed." msgstr "" -#: cmdline/apt-get.cc:1632 +#: cmdline/apt-get.cc:1640 msgid "Broken packages" msgstr "" -#: cmdline/apt-get.cc:1663 +#: cmdline/apt-get.cc:1669 msgid "The following extra packages will be installed:" msgstr "" -#: cmdline/apt-get.cc:1752 +#: cmdline/apt-get.cc:1758 msgid "Suggested packages:" msgstr "" -#: cmdline/apt-get.cc:1753 +#: cmdline/apt-get.cc:1759 msgid "Recommended packages:" msgstr "" -#: cmdline/apt-get.cc:1773 +#: cmdline/apt-get.cc:1779 msgid "Calculating upgrade... " msgstr "" -#: cmdline/apt-get.cc:1776 methods/ftp.cc:702 methods/connect.cc:101 +#: cmdline/apt-get.cc:1782 methods/ftp.cc:702 methods/connect.cc:101 msgid "Failed" msgstr "" -#: cmdline/apt-get.cc:1781 +#: cmdline/apt-get.cc:1787 msgid "Done" msgstr "" -#: cmdline/apt-get.cc:1848 cmdline/apt-get.cc:1856 +#: cmdline/apt-get.cc:1854 cmdline/apt-get.cc:1862 msgid "Internal error, problem resolver broke stuff" msgstr "" -#: cmdline/apt-get.cc:1956 +#: cmdline/apt-get.cc:1962 msgid "Must specify at least one package to fetch source for" msgstr "" -#: cmdline/apt-get.cc:1986 cmdline/apt-get.cc:2215 +#: cmdline/apt-get.cc:1992 cmdline/apt-get.cc:2221 #, c-format msgid "Unable to find a source package for %s" msgstr "" -#: cmdline/apt-get.cc:2030 +#: cmdline/apt-get.cc:2036 #, c-format msgid "Skipping already downloaded file '%s'\n" msgstr "" -#: cmdline/apt-get.cc:2054 +#: cmdline/apt-get.cc:2060 #, c-format msgid "You don't have enough free space in %s" msgstr "" -#: cmdline/apt-get.cc:2059 +#: cmdline/apt-get.cc:2065 #, c-format msgid "Need to get %sB/%sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2062 +#: cmdline/apt-get.cc:2068 #, c-format msgid "Need to get %sB of source archives.\n" msgstr "" -#: cmdline/apt-get.cc:2068 +#: cmdline/apt-get.cc:2074 #, c-format msgid "Fetch source %s\n" msgstr "" -#: cmdline/apt-get.cc:2099 +#: cmdline/apt-get.cc:2105 msgid "Failed to fetch some archives." msgstr "" -#: cmdline/apt-get.cc:2127 +#: cmdline/apt-get.cc:2133 #, c-format msgid "Skipping unpack of already unpacked source in %s\n" msgstr "" -#: cmdline/apt-get.cc:2139 +#: cmdline/apt-get.cc:2145 #, c-format msgid "Unpack command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2140 +#: cmdline/apt-get.cc:2146 #, c-format msgid "Check if the 'dpkg-dev' package is installed.\n" msgstr "" -#: cmdline/apt-get.cc:2157 +#: cmdline/apt-get.cc:2163 #, c-format msgid "Build command '%s' failed.\n" msgstr "" -#: cmdline/apt-get.cc:2176 +#: cmdline/apt-get.cc:2182 msgid "Child process failed" msgstr "" -#: cmdline/apt-get.cc:2192 +#: cmdline/apt-get.cc:2198 msgid "Must specify at least one package to check builddeps for" msgstr "" -#: cmdline/apt-get.cc:2220 +#: cmdline/apt-get.cc:2226 #, c-format msgid "Unable to get build-dependency information for %s" msgstr "" -#: cmdline/apt-get.cc:2240 +#: cmdline/apt-get.cc:2246 #, c-format msgid "%s has no build depends.\n" msgstr "" -#: cmdline/apt-get.cc:2292 +#: cmdline/apt-get.cc:2298 #, c-format msgid "" "%s dependency for %s cannot be satisfied because the package %s cannot be " "found" msgstr "" -#: cmdline/apt-get.cc:2344 +#: cmdline/apt-get.cc:2350 #, c-format msgid "" "%s dependency for %s cannot be satisfied because no available versions of " "package %s can satisfy version requirements" msgstr "" -#: cmdline/apt-get.cc:2379 +#: cmdline/apt-get.cc:2385 #, c-format msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new" msgstr "" -#: cmdline/apt-get.cc:2404 +#: cmdline/apt-get.cc:2410 #, c-format msgid "Failed to satisfy %s dependency for %s: %s" msgstr "" -#: cmdline/apt-get.cc:2418 +#: cmdline/apt-get.cc:2424 #, c-format msgid "Build-dependencies for %s could not be satisfied." msgstr "" -#: cmdline/apt-get.cc:2422 +#: cmdline/apt-get.cc:2428 msgid "Failed to process build dependencies" msgstr "" -#: cmdline/apt-get.cc:2454 +#: cmdline/apt-get.cc:2460 msgid "Supported modules:" msgstr "" -#: cmdline/apt-get.cc:2495 +#: cmdline/apt-get.cc:2501 msgid "" "Usage: apt-get [options] command\n" " apt-get [options] install|remove pkg1 [pkg2 ...]\n" -- cgit v1.2.3-70-g09d2 From d546f98d46c6a1d813976825f615e39f17b7ebf5 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 19 Dec 2006 12:03:30 +0100 Subject: * added https transport method as optional pacakge --- configure.in | 2 +- debian/control | 11 ++- debian/rules | 28 ++++++- methods/https.cc | 226 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ methods/https.h | 48 ++++++++++++ methods/makefile | 7 ++ po/apt-all.pot | 10 +-- 7 files changed, 324 insertions(+), 8 deletions(-) create mode 100644 methods/https.cc create mode 100644 methods/https.h (limited to 'debian/rules') diff --git a/configure.in b/configure.in index ad81a8228..fe7c0e3e1 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.6.46.3-0.1") +AC_DEFINE_UNQUOTED(VERSION,"0.6.46.5") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/control b/debian/control index 3cba50acb..405c0bf93 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: important Maintainer: APT Development Team Uploaders: Jason Gunthorpe , Adam Heath , Matt Zimmerman , Michael Vogt Standards-Version: 3.6.2.2 -Build-Depends: debhelper (>= 5.0), libdb4.4-dev, gettext (>= 0.12) +Build-Depends: debhelper (>= 5.0), libdb4.4-dev, gettext (>= 0.12), libcurl3-gnutls-dev Build-Depends-Indep: debiandoc-sgml, docbook-utils (>= 0.6.12-1) Package: apt @@ -65,3 +65,12 @@ Description: APT utility programs apt-extracttemplates is used by debconf to prompt for configuration questions before installation. apt-ftparchive is used to create Package and other index files. apt-sortpkgs is a Package/Source file normalizer. + +Package: apt-transport-https +Architecture: any +Depends: ${shlibs:Depends} +Priority: optional +Section: admin +Description: APT https transport + This package contains a APT https transport. It makes it possible to + use 'deb https://foo distro main' lines in the sources.list. diff --git a/debian/rules b/debian/rules index 02ee734bb..0208d8ea3 100755 --- a/debian/rules +++ b/debian/rules @@ -185,7 +185,7 @@ apt-doc: build-doc # Build architecture-dependent files here. -binary-arch: apt libapt-pkg-dev apt-utils +binary-arch: apt-transport-https apt libapt-pkg-dev apt-utils apt: build debian/shlibs.local dh_testdir -p$@ dh_testroot -p$@ @@ -286,6 +286,32 @@ apt-utils: build debian/shlibs.local dh_md5sums -p$@ dh_builddeb -p$@ +apt-transport-https: build debian/shlibs.local + dh_testdir -p$@ + dh_testroot -p$@ + dh_clean -p$@ -k + dh_installdirs -p$@ + + # install the method + mkdir -p debian/$@/usr/lib/apt/methods + mv $(BLD)/bin/methods/https debian/$@/usr/lib/apt/methods + + dh_installdocs -p$@ + dh_installexamples -p$@ + + # Install the man pages.. + dh_installman -p$@ + + dh_installchangelogs -p$@ + dh_strip -p$@ + dh_compress -p$@ + dh_fixperms -p$@ + dh_installdeb -p$@ + dh_shlibdeps -p$@ -l`pwd`/debian/apt/usr/lib:`pwd`/debian/$@/usr/lib + dh_gencontrol -p$@ + dh_md5sums -p$@ + dh_builddeb -p$@ + source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false diff --git a/methods/https.cc b/methods/https.cc new file mode 100644 index 000000000..06b7dff48 --- /dev/null +++ b/methods/https.cc @@ -0,0 +1,226 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/ +// $Id: http.cc,v 1.59 2004/05/08 19:42:35 mdz Exp $ +/* ###################################################################### + + HTTPS Aquire Method - This is the HTTPS aquire method for APT. + + It uses libcurl + + ##################################################################### */ + /*}}}*/ +// Include Files /*{{{*/ +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "config.h" +#include "https.h" + + /*}}}*/ +using namespace std; + +size_t +HttpsMethod::write_data(void *buffer, size_t size, size_t nmemb, void *userp) +{ + HttpsMethod *me = (HttpsMethod *)userp; + + if(me->File->Write(buffer, size*nmemb) != true) + return false; + + return size*nmemb; +} + +int +HttpsMethod::progress_callback(void *clientp, double dltotal, double dlnow, + double ultotal, double ulnow) +{ + HttpsMethod *me = (HttpsMethod *)clientp; + if(dltotal > 0 && me->Res.Size == 0) { + me->Res.Size = dltotal; + me->URIStart(me->Res); + } + return 0; +} + +bool HttpsMethod::SetupProxy() +{ + URI ServerName = Queue->Uri; + + // Determine the proxy setting + if (getenv("http_proxy") == 0) + { + string DefProxy = _config->Find("Acquire::http::Proxy"); + string SpecificProxy = _config->Find("Acquire::http::Proxy::" + ServerName.Host); + if (SpecificProxy.empty() == false) + { + if (SpecificProxy == "DIRECT") + Proxy = ""; + else + Proxy = SpecificProxy; + } + else + Proxy = DefProxy; + } + + // 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 + int Port = 0; + 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()); + } +} + + +// HttpsMethod::Fetch - Fetch an item /*{{{*/ +// --------------------------------------------------------------------- +/* This adds an item to the pipeline. We keep the pipeline at a fixed + depth. */ +bool HttpsMethod::Fetch(FetchItem *Itm) +{ + stringstream ss; + struct stat SBuf; + struct curl_slist *headers=NULL; + + // TODO: + // - http::Timeout + // - http::Pipeline-Depth + // - error checking/reporting + // - more debug options? (CURLOPT_DEBUGFUNCTION?) + + SetupProxy(); + + // callbacks + curl_easy_setopt(curl, CURLOPT_URL, Itm->Uri.c_str()); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, this); + curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback); + curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, this); + curl_easy_setopt(curl, CURLOPT_NOPROGRESS, false); + curl_easy_setopt(curl, CURLOPT_FAILONERROR, true); + + // FIXME: https: offer various options of verification + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false); + + // cache-control + if(_config->FindB("Acquire::http::No-Cache",false) == false) + { + // cache enabled + if (_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)); + headers = curl_slist_append(headers, ss.str().c_str()); + } else { + // cache disabled by user + headers = curl_slist_append(headers, "Cache-Control: no-cache"); + headers = curl_slist_append(headers, "Pragma: no-cache"); + } + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); + + // set time values + curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE); + curl_easy_setopt(curl, CURLOPT_TIMEVALUE, Itm->LastModified); + + // speed limit + int dlLimit = _config->FindI("Acquire::http::Dl-Limit",0)*1024; + if (dlLimit > 0) + curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, dlLimit); + + // set header + curl_easy_setopt(curl, CURLOPT_USERAGENT,"Debian APT-CURL/1.0 ("VERSION")"); + + // debug + if(_config->FindB("Debug::Acquire::http", false)) + curl_easy_setopt(curl, CURLOPT_VERBOSE, true); + + // In this case we send an if-range query with a range header + if (stat(Itm->DestFile.c_str(),&SBuf) >= 0 && SBuf.st_size > 0) + curl_easy_setopt(curl, CURLOPT_RESUME_FROM, (long)SBuf.st_size); + + // go for it - if the file exists, append on it + File = new FileFd(Itm->DestFile, FileFd::WriteAny); + File->Seek(File->Size()); + + // keep apt updated + Res.Filename = Itm->DestFile; + + // get it! + CURLcode success = curl_easy_perform(curl); + + + // cleanup + if(success != 0) { + Fail(); + return true; + } + + if (Res.Size == 0) + Res.Size = File->Size(); + + // check the downloaded result + struct stat Buf; + if (stat(File->Name().c_str(),&Buf) == 0) + { + Res.Size = Buf.st_size; + Res.Filename = File->Name(); + Res.LastModified = Buf.st_mtime; + Res.IMSHit = false; + if (Itm->LastModified == Buf.st_mtime && Itm->LastModified != 0) + Res.IMSHit = true; + } + + // take hashes + Hashes Hash; + FileFd Fd(Res.Filename, FileFd::ReadOnly); + Hash.AddFD(Fd.Fd(), Fd.Size()); + Res.TakeHashes(Hash); + + // keep apt updated + URIDone(Res); + + // cleanup + File->Close(); + Res.Size = 0; + delete File; + curl_slist_free_all(headers); + + return true; +}; + +int main() +{ + setlocale(LC_ALL, ""); + + HttpsMethod Mth; + curl_global_init(CURL_GLOBAL_SSL) ; + + return Mth.Run(); +} + + diff --git a/methods/https.h b/methods/https.h new file mode 100644 index 000000000..6620a10fc --- /dev/null +++ b/methods/https.h @@ -0,0 +1,48 @@ +// -*- mode: cpp; mode: fold -*- +// Description /*{{{*/// $Id: http.h,v 1.12 2002/04/18 05:09:38 jgg Exp $ +// $Id: http.h,v 1.12 2002/04/18 05:09:38 jgg Exp $ +/* ###################################################################### + + HTTP Aquire Method - This is the HTTP aquire method for APT. + + ##################################################################### */ + /*}}}*/ + +#ifndef APT_HTTP_H +#define APT_HTTP_H + +#define MAXLEN 360 + +#include +#include + +using std::cout; +using std::endl; + +class HttpsMethod; + + +class HttpsMethod : public pkgAcqMethod +{ + + virtual bool Fetch(FetchItem *); + static size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp); + static int progress_callback(void *clientp, double dltotal, double dlnow, + double ultotal, double ulnow); + bool SetupProxy(); + CURL *curl; + FetchResult Res; + + public: + FileFd *File; + + HttpsMethod() : pkgAcqMethod("1.2",Pipeline | SendConfig) + { + File = 0; + curl = curl_easy_init(); + }; +}; + +URI Proxy; + +#endif diff --git a/methods/makefile b/methods/makefile index 1e3b1ef85..e3db7210a 100644 --- a/methods/makefile +++ b/methods/makefile @@ -52,6 +52,13 @@ LIB_MAKES = apt-pkg/makefile SOURCE = http.cc rfc2553emu.cc connect.cc include $(PROGRAM_H) +# The https method +PROGRAM=https +SLIBS = -lapt-pkg -lcurl +LIB_MAKES = apt-pkg/makefile +SOURCE = https.cc +include $(PROGRAM_H) + # The ftp method PROGRAM=ftp SLIBS = -lapt-pkg $(SOCKETLIBS) diff --git a/po/apt-all.pot b/po/apt-all.pot index 6f84389e4..dd8f834da 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2006-10-11 20:34+0200\n" +"POT-Creation-Date: 2006-12-19 11:40+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1894,12 +1894,12 @@ msgstr "" msgid "Syntax error %s:%u: Extra junk at end of file" msgstr "" -#: apt-pkg/contrib/progress.cc:154 +#: apt-pkg/contrib/progress.cc:155 #, c-format msgid "%c%s... Error!" msgstr "" -#: apt-pkg/contrib/progress.cc:156 +#: apt-pkg/contrib/progress.cc:157 #, c-format msgid "%c%s... Done" msgstr "" @@ -2191,13 +2191,13 @@ msgid "" "The package %s needs to be reinstalled, but I can't find an archive for it." msgstr "" -#: apt-pkg/algorithms.cc:1059 +#: apt-pkg/algorithms.cc:1061 msgid "" "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by " "held packages." msgstr "" -#: apt-pkg/algorithms.cc:1061 +#: apt-pkg/algorithms.cc:1063 msgid "Unable to correct problems, you have held broken packages." msgstr "" -- cgit v1.2.3-70-g09d2