Apt-smart

Latest version: v7.1.3

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 5

6.1

---------------------------

- Bug fix for Ubuntu keyring selection that prevented
``ubuntu-archive-removed-keys.gpg`` from being used.
- Bug fix for ``coerce_release()`` when given a release number.
- Moved pathnames of Debian and Ubuntu keyring files to constants.
- Added logging to enable debugging of keyring selection process.
- Added proper tests for keyring selection and release coercion.

.. _Release 6.1: https://github.com/xolox/python-apt-mirror-updater/compare/6.0...6.1

6.0

---------------------------

Enable the creation of Ubuntu <= 12.04 chroots on Ubuntu >= 17.04 hosts by
working around (what I am convinced is) a bug in ``debootstrap`` which picks
the wrong keyring when setting up chroots of old releases. For more information
refer to issue `8`_.

I've bumped the major version number for this release because the highly
specific ``apt_smart.eol`` module changed into the much more generic
``apt_smart.releases`` module. Also the ``release_label`` property was
removed.

.. _Release 6.0: https://github.com/xolox/python-apt-mirror-updater/compare/5.2...6.0
.. _8: https://github.com/xolox/python-apt-mirror-updater/issues/8

5.2

---------------------------

Use `mirrors.ubuntu.com/mirrors.txt`_ without placing our full trust in it like
older versions of ``apt-smart`` did 😇.

Feedback in issue `6`_ suggested that `mirrors.ubuntu.com/mirrors.txt`_ is
working properly (again) and should be preferred over scraping Launchpad.
However I prefer for ``apt-smart`` to be a reliable "do what I mean"
program and `mirrors.ubuntu.com/mirrors.txt`_ has proven to be unreliable in
the past (see the discussion in `6`_). As a compromise I've changed the Ubuntu
mirror discovery as follows:

1. Discover Ubuntu mirrors on Launchpad.

2. Try to discover mirrors using `mirrors.ubuntu.com/mirrors.txt`_ and iff
successful, narrow down the list produced in step 1 based on the URLs
reported in step 2.

3. Rank the discovered / narrowed down mirrors and pick the best one.

The reason why I've decided to add this additional complexity is because it has
bothered me in the past that Ubuntu mirror discovery was slow and this does
help a lot. Also, why not use a service provided by Ubuntu to speed things up?

Unrelated to the use of `mirrors.ubuntu.com/mirrors.txt`_ I've also bumped the
``executor`` requirement (twice) in order to pull in upstream improvements
discussed in `executor issue 10`_ and `executor issue 15`_.

.. _Release 5.2: https://github.com/xolox/python-apt-mirror-updater/compare/5.1...5.2
.. _mirrors.ubuntu.com/mirrors.txt: http://mirrors.ubuntu.com/mirrors.txt
.. _6: https://github.com/xolox/python-apt-mirror-updater/issues/6
.. _executor issue 10: https://github.com/xolox/python-executor/issues/10
.. _executor issue 15: https://github.com/xolox/python-executor/issues/15

5.1

---------------------------

Work on release 5.1 started with the intention of publishing a 5.0.2 bug fix
release for the EOL detection of Debian LTS releases reported in `5`_, however
unrelated changes were required to stabilize the test suite. This explains how
5.0.2 became 5.1 😇.

When I started working on resolving the issue reported in `5`_ it had been
quite a while since the previous release (233 days) and so some technical debt
had accumulated in the project, causing the test suite to break. Most
significantly, Travis CI switched their workers from Ubuntu 12.04 to 14.04.

Here's a detailed overview of changes:

- Bug fix for EOL detection of Debian LTS releases (reported in `5`_).
- Bug fix for trivial string matching issue in test suite (caused by a naively
written test).
- Bug fix for recursive ``repr()`` calls potentially causing infinite
recursion, depending on logging level (see e.g. build 395421319_).
- Updated bundled EOL dates based on distro-info-data available in Ubuntu 18.04.
- Added this changelog to the documentation, including a link in the readme.
- Make sure the ``test_gather_eol_dates`` test method runs on Travis CI (by
installing the distro-info-data_ package). This exposed a Python 3
incompatibility (in build 395410569_) that has since been resolved.
- Include documentation in source distributions (``MANIFEST.in``).
- Silence flake8 complaining about bogus D402 issues.
- Add license='MIT' key to ``setup.py`` script.
- Bumped copyright to 2018.

.. _Release 5.1: https://github.com/xolox/python-apt-mirror-updater/compare/5.0.1...5.1
.. _5: https://github.com/xolox/python-apt-mirror-updater/issues/5
.. _395421319: https://travis-ci.org/xolox/python-apt-mirror-updater/jobs/395421319
.. _distro-info-data: https://packages.ubuntu.com/distro-info-data
.. _395410569: https://travis-ci.org/xolox/python-apt-mirror-updater/jobs/395410569

5.0.1

-----------------------------

Bug fix release for invalid enumeration value (oops).

.. _Release 5.0.1: https://github.com/xolox/python-apt-mirror-updater/compare/5.0...5.0.1

5.0

---------------------------

Reliable end of life (EOL) detection.

Recently I ran into the issue that the logic to check whether a release is EOL
(that works by checking if the security mirror serves a ``Release.gpg`` file
for the release) failed on me. More specifically the following URL existed at
the time of writing (2017-11-01) even though Ubuntu 12.04 went EOL back in
April:

http://security.ubuntu.com/ubuntu/dists/precise/Release.gpg

At the same time issue `1`_ and pull request `2`_ were also indications that
the EOL detection was fragile and error prone. This potential fragility had
bugged me ever since publishing `apt-smart` and this week I finally
finished a more robust and deterministic EOL detection scheme.

This release includes pull requests `2`_ and `4`_, fixing issues `1`_ and
`3`_. Here's a detailed overview of changes:

- Addition: Allow optional arguments to ``apt-get update`` (`3`_, `4`_).

- I simplified and improved the feature requested in issue `3`_ and
implemented in pull request `4`_ by switching from an optional list
argument to 'star-args' and applying the same calling convention to
``smart_update()`` as well.

- This is backwards incompatible with the implementation in pull request
`4`_ (which I merged into the ``dev`` branch but never published to PyPI)
and it's also technically backwards incompatible in the sense that keyword
arguments could previously be given to ``smart_update()`` as positional
arguments. This explains why I'm bumping the major version number.

- Bug fix for incorrect marking of EOL when HTTP connections fail (`2`_).
- Refactoring: Apply timeout handling to HTTP response bodies.
- Refactoring: Distinguish 404 from other HTTP errors:

- This change enhances ``validate_mirror()`` by making a distinction between
a confirmed HTTP 404 response versus other error conditions which may be of
a more transient nature.
- The goal of this change is to preserve the semantics requested in issue
`1`_ and implemented in pull request `2`_ without needing the additional
HTTP request performed by ``can_connect_to_mirror()``.
- Because ``validate_mirror()`` previously returned a boolean but now returns
an enumeration member this change is technically backwards incompatible,
then again ``validate_mirror()`` isn't specifically intended for callers
because it concerns internal logic of apt-smart. I'm nevertheless
bumping the major version number.

- Refactoring: Improve HTTP request exception handling:

- 404 responses and timeouts are no longer subject to retrying.
- The exception ``apt_smart.http.NotFoundError`` is now raised on
HTTP 404 responses. Other unexpected HTTP response codes raise
``apt_smart.http.InvalidResponseError``.
- The specific distinction between 404 and !200 was made because the 404
response has become significant in checking for EOL status.

.. _Release 5.0: https://github.com/xolox/python-apt-mirror-updater/compare/4.0...5.0
.. _1: https://github.com/xolox/python-apt-mirror-updater/issues/1
.. _2: https://github.com/xolox/python-apt-mirror-updater/pull/2
.. _3: https://github.com/xolox/python-apt-mirror-updater/issues/3
.. _4: https://github.com/xolox/python-apt-mirror-updater/pull/4

Page 3 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.