diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | apt-pkg/deb/debsystem.cc | 2 | ||||
-rw-r--r-- | debian/changelog | 22 | ||||
-rw-r--r-- | doc/apt-verbatim.ent | 2 | ||||
-rw-r--r-- | doc/po/apt-doc.pot | 4 | ||||
-rw-r--r-- | doc/po/fr.po | 55 | ||||
-rw-r--r-- | doc/po/pt.po | 4 | ||||
-rw-r--r-- | methods/connect.cc | 79 | ||||
-rw-r--r-- | po/apt-all.pot | 4 |
9 files changed, 103 insertions, 71 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e90b3a91..cb3a97cfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -196,7 +196,7 @@ check_cxx_target(HAVE_FMV_SSE42_AND_CRC32DI "sse4.2" "__builtin_ia32_crc32di(0, # Configure some variables like package, version and architecture. set(PACKAGE ${PROJECT_NAME}) set(PACKAGE_MAIL "APT Development Team <deity@lists.debian.org>") -set(PACKAGE_VERSION "1.8.1") +set(PACKAGE_VERSION "1.8.2") string(REGEX MATCH "^[0-9.]+" PROJECT_VERSION ${PACKAGE_VERSION}) if (NOT DEFINED DPKG_DATADIR) diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index 5df6c58a1..0c7e9ff39 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -153,8 +153,8 @@ bool debSystem::UnLock(bool NoErrors) return _error->Error(_("Not locked")); if (--d->LockCount == 0) { - close(d->FrontendLockFD); close(d->LockFD); + close(d->FrontendLockFD); d->LockCount = 0; } diff --git a/debian/changelog b/debian/changelog index 4c6e0fa5f..a98cc5ad6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,25 @@ +apt (1.8.2) unstable; urgency=medium + + [ Alwin Henseler ] + * Flip /: in documented default value of DPkg::Path (Closes: #917986) + + [ TilmanK ] + * Fix typo in German manpage translation + + [ Américo Monteiro ] + * Portuguese manpages translation update (Closes: #926614) + + [ Jean-Pierre Giraud ] + * French manpages translation update (Closes: #929290) + + [ Michael Zhivich ] + * methods: https: handle requests for TLS re-handshake (LP: #1829861) + + [ Julian Andres Klode ] + * Unlock dpkg locks in reverse locking order (LP: #1829860) + + -- Julian Andres Klode <jak@debian.org> Tue, 28 May 2019 16:40:29 +0200 + apt (1.8.1) unstable; urgency=medium * Add test case for local-only packages pinned to never diff --git a/doc/apt-verbatim.ent b/doc/apt-verbatim.ent index 7e16eaab3..11e6c7f15 100644 --- a/doc/apt-verbatim.ent +++ b/doc/apt-verbatim.ent @@ -268,7 +268,7 @@ "> <!-- this will be updated by 'prepare-release' --> -<!ENTITY apt-product-version "1.8.1"> +<!ENTITY apt-product-version "1.8.2"> <!-- (Code)names for various things used all over the place --> <!ENTITY debian-oldstable-codename "stretch"> diff --git a/doc/po/apt-doc.pot b/doc/po/apt-doc.pot index ced3644c4..017ad0fb9 100644 --- a/doc/po/apt-doc.pot +++ b/doc/po/apt-doc.pot @@ -5,9 +5,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: apt-doc 1.8.0\n" +"Project-Id-Version: apt-doc 1.8.2\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2019-05-06 10:41+0200\n" +"POT-Creation-Date: 2019-05-28 16:41+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" diff --git a/doc/po/fr.po b/doc/po/fr.po index 7d23a5c9e..74a7cd613 100644 --- a/doc/po/fr.po +++ b/doc/po/fr.po @@ -7,13 +7,13 @@ # Jérôme Marant, 2000. # Philippe Batailler, 2005. # Christian Perrier <bubulle@debian.org>, 2009, 2010, 2011, 2012, 2013. -# Jean-Pierre Giraud <jean-pierregiraud@neuf.fr>, 2014, 2017, 2018. +# Jean-Pierre Giraud <jean-pierregiraud@neuf.fr>, 2014, 2017-2019. msgid "" msgstr "" "Project-Id-Version: apt-doc 1.8.0\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2019-02-04 15:34+0100\n" -"PO-Revision-Date: 2018-11-26 17:47+0100\n" +"POT-Creation-Date: 2019-05-21 14:38+0200\n" +"PO-Revision-Date: 2019-05-01 17:00+0100\n" "Last-Translator: Jean-Pierre Giraud <jean-pierregiraud@neuf.fr>\n" "Language-Team: French <debian-l10n-french@lists.debian.org>\n" "Language: fr\n" @@ -1174,16 +1174,12 @@ msgstr "" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-get.8.xml -#, fuzzy -#| msgid "" -#| "A new <literal>list</literal> command is available similar to " -#| "<literal>dpkg --list</literal>." msgid "" "<literal>reinstall</literal> is an alias for <literal>install --reinstall</" "literal>." msgstr "" -"Une nouvelle commande <literal>list</literal> est disponible, semblable à la " -"commande <literal>dpkg --list</literal>." +"<literal>reinstall</literal> est un alias de la commande <literal>install --" +"reinstall</literal>." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-get.8.xml @@ -3093,11 +3089,6 @@ msgstr "" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-mark.8.xml -#, fuzzy -#| msgid "" -#| "<literal>auto</literal> is used to mark a package as being automatically " -#| "installed, which will cause the package to be removed when no more " -#| "manually installed packages depend on this package." msgid "" "<literal>minimize-manual</literal> is used to mark (transitive) dependencies " "of metapackages as automatically installed. This can be used after an " @@ -3105,9 +3096,11 @@ msgid "" "packages; or continuously on systems managed by system configuration " "metapackages." msgstr "" -"<literal>auto</literal> permet de marquer un paquet comme ayant été installé " -"automatiquement. Un tel paquet sera supprimé automatiquement dès que plus " -"aucun paquet installé manuellement ne dépend de lui." +"<literal>minimize-manual</literal> permet de marquer les dépendances " +"(transitives) de métapaquets comme ayant été installées automatiquement. " +"Cela peut être utilisé par exemple après une installation pour réduire le " +"nombre de paquets installés manuellement, ou de façon permanente sur des " +"systèmes gérés par des métapaquets de configuration système." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt-mark.8.xml @@ -5570,6 +5563,10 @@ msgid "" "used when running dpkg. It may be set to any valid value of that environment " "variable; or the empty string, in which case the variable is not changed." msgstr "" +"Il s'agit d'une chaîne qui définit la variable d'environnement <envar>PATH</" +"envar> utilisée lors de l'exécution de dpkg. Elle peut être définie à " +"n'importe quelle valeur valable pour cette variable d'environnement ou être " +"une chaîne vide, dans ce cas la variable n'est pas modifiée." #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.conf.5.xml @@ -9870,19 +9867,15 @@ msgstr "" #. type: Content of: <refentry><refsect1><para> #: apt_auth.conf.5.xml -#, fuzzy -#| msgid "" -#| "The APT auth.conf file <filename>/etc/apt/auth.conf</filename> can be " -#| "used to store login information in a netrc-like format with restrictive " -#| "file permissions." msgid "" "The APT auth.conf file <filename>/etc/apt/auth.conf</filename>, and .conf " "files inside <filename>/etc/apt/auth.conf.d</filename> can be used to store " "login information in a netrc-like format with restrictive file permissions." msgstr "" -"Le fichier auth.conf d'APT <filename>/etc/apt/auth.conf</filename> peut être " -"utilisé pour stocker les informations de connexion dans un format detype " -"netrc avec des droits d'accès restreints" +"Le fichier auth.conf d'APT <filename>/etc/apt/auth.conf</filename> ainsi que " +"les fichiers .conf dans <filename>/etc/apt/auth.conf.d</filename> peuvent " +"être utilisés pour stocker les informations de connexion dans un format de " +"type netrc avec des droits d'accès restreints." #. type: Content of: <refentry><refsect1><title> #: apt_auth.conf.5.xml @@ -10092,24 +10085,18 @@ msgstr "" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt_auth.conf.5.xml -#, fuzzy -#| msgid "<filename>/etc/apt/auth.conf</filename>" msgid "<filename>/etc/apt/auth.conf.d/*.conf</filename>" -msgstr "<filename>/etc/apt/auth.conf</filename>" +msgstr "<filename>/etc/apt/auth.conf.d/*.conf</filename>" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt_auth.conf.5.xml -#, fuzzy -#| msgid "" -#| "Login information for APT sources and proxies in a netrc-like format. " -#| "Configuration Item: <literal>Dir::Etc::netrc</literal>." msgid "" "Login information for APT sources and proxies in a netrc-like format. " "Configuration Item: <literal>Dir::Etc::netrcparts</literal>." msgstr "" "Informations de connexion pour les sources et les mandataires d'APT dans un " -"format de type netrc. Élément de configuration : <literal>Dir::Etc::netrc</" -"literal>." +"format de type netrc. Élément de configuration : <literal>Dir::Etc::" +"netrcparts</literal>." #. type: Content of: <refentry><refsect1><para> #: apt_auth.conf.5.xml diff --git a/doc/po/pt.po b/doc/po/pt.po index a4693a832..1f3dae7fe 100644 --- a/doc/po/pt.po +++ b/doc/po/pt.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: apt 1.8.0\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2019-04-08 13:05+0200\n" +"POT-Creation-Date: 2019-05-21 14:35+0200\n" "PO-Revision-Date: 2019-04-07 22:02+0000\n" "Last-Translator: Américo Monteiro <a_monteiro@gmx.com>\n" "Language-Team: Portuguese <>\n" @@ -721,7 +721,7 @@ msgstr "" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><term> #: apt.8.xml msgid "(&apt-get;)" -msgstr "(&apt-get;)" +msgstr "apt-get" #. type: Content of: <refentry><refsect1><variablelist><varlistentry><listitem><para> #: apt.8.xml diff --git a/methods/connect.cc b/methods/connect.cc index fdcf965f8..61968efe0 100644 --- a/methods/connect.cc +++ b/methods/connect.cc @@ -808,6 +808,7 @@ struct TlsFd : public MethodFd gnutls_session_t session; gnutls_certificate_credentials_t credentials; std::string hostname; + unsigned long Timeout; int Fd() APT_OVERRIDE { return UnderlyingFd->Fd(); } @@ -820,9 +821,56 @@ struct TlsFd : public MethodFd return HandleError(gnutls_record_send(session, buf, count)); } + ssize_t DoTLSHandshake() + { + int err; + // Do the handshake. Our socket is non-blocking, so we need to call WaitFd() + // accordingly. + do + { + err = gnutls_handshake(session); + if ((err == GNUTLS_E_INTERRUPTED || err == GNUTLS_E_AGAIN) && + WaitFd(this->Fd(), gnutls_record_get_direction(session) == 1, Timeout) == false) + { + _error->Errno("select", "Could not wait for server fd"); + return err; + } + } while (err < 0 && gnutls_error_is_fatal(err) == 0); + + if (err < 0) + { + // Print reason why validation failed. + if (err == GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR) + { + gnutls_datum_t txt; + auto type = gnutls_certificate_type_get(session); + auto status = gnutls_session_get_verify_cert_status(session); + if (gnutls_certificate_verification_status_print(status, type, &txt, 0) == 0) + { + _error->Error("Certificate verification failed: %s", txt.data); + } + gnutls_free(txt.data); + } + _error->Error("Could not handshake: %s", gnutls_strerror(err)); + } + return err; + } + template <typename T> T HandleError(T err) { + // Server may request re-handshake if client certificates need to be provided + // based on resource requested + if (err == GNUTLS_E_REHANDSHAKE) + { + int rc = DoTLSHandshake(); + // Only reset err if DoTLSHandshake() fails. + // Otherwise, we want to follow the original error path and set errno to EAGAIN + // so that the request is retried. + if (rc < 0) + err = rc; + } + if (err < 0 && gnutls_error_is_fatal(err)) errno = EIO; else if (err < 0) @@ -859,6 +907,7 @@ ResultState UnwrapTLS(std::string Host, std::unique_ptr<MethodFd> &Fd, tlsFd->hostname = Host; tlsFd->UnderlyingFd = MethodFd::FromFd(-1); // For now + tlsFd->Timeout = Timeout; if ((err = gnutls_init(&tlsFd->session, GNUTLS_CLIENT | GNUTLS_NONBLOCK)) < 0) { @@ -992,37 +1041,11 @@ ResultState UnwrapTLS(std::string Host, std::unique_ptr<MethodFd> &Fd, tlsFd->UnderlyingFd = std::move(Fd); Fd.reset(tlsFd); - // Do the handshake. Our socket is non-blocking, so we need to call WaitFd() - // accordingly. - do - { - err = gnutls_handshake(tlsFd->session); - if ((err == GNUTLS_E_INTERRUPTED || err == GNUTLS_E_AGAIN) && - WaitFd(Fd->Fd(), gnutls_record_get_direction(tlsFd->session) == 1, Timeout) == false) - { - _error->Errno("select", "Could not wait for server fd"); - return ResultState::TRANSIENT_ERROR; - } - } while (err < 0 && gnutls_error_is_fatal(err) == 0); + // Do the handshake. + err = tlsFd->DoTLSHandshake(); if (err < 0) - { - // Print reason why validation failed. - if (err == GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR) - { - gnutls_datum_t txt; - auto type = gnutls_certificate_type_get(tlsFd->session); - auto status = gnutls_session_get_verify_cert_status(tlsFd->session); - if (gnutls_certificate_verification_status_print(status, - type, &txt, 0) == 0) - { - _error->Error("Certificate verification failed: %s", txt.data); - } - gnutls_free(txt.data); - } - _error->Error("Could not handshake: %s", gnutls_strerror(err)); return ResultState::FATAL_ERROR; - } return ResultState::SUCCESSFUL; } diff --git a/po/apt-all.pot b/po/apt-all.pot index bf9439d93..37a8f2287 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -5,9 +5,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: apt 1.8.0\n" +"Project-Id-Version: apt 1.8.2\n" "Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n" -"POT-Creation-Date: 2019-05-06 10:41+0200\n" +"POT-Creation-Date: 2019-05-28 16:41+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" |