• Apt feature request / suggestion

    From xaq xaq@21:1/5 to All on Thu Oct 6 20:00:01 2022
    Hi, how do I submit a suggestion to the Apt team? I've tried to register on their website (https://salsa.debian.org/apt-team/apt).

    I have two suggestions/discussions to post.
    - Have an option to ignore failures in any source.list file. This will
    allow updates of security repos to proceed.
    - Have Apt not proceed with install if available space is less than
    estimated install space. Especially since --fix-broken-install usually
    requires more space to resolve this.

    Thank you

    <div dir="ltr">Hi, how do I submit a suggestion to the Apt team? I&#39;ve tried to register on their website (<a href="https://salsa.debian.org/apt-team/apt">https://salsa.debian.org/apt-team/apt</a>).<div><br></div><div>I have two suggestions/
    discussions to post. </div><div>- Have an option to ignore failures in any source.list file. This will allow updates of security repos to proceed.</div><div>- Have Apt not proceed with install if available space is less than estimated install space.
    Especially since --fix-broken-install usually requires more space to resolve this.</div><div><br></div><div>Thank you</div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Wise@21:1/5 to xaq xaq on Fri Oct 7 03:50:01 2022
    On Thu, 2022-10-06 at 10:54 -0700, xaq xaq wrote:

    Hi, how do I submit a suggestion to the Apt team? I've tried to
    register on their website (https://salsa.debian.org/apt-team/apt).

    You can report a bug via the Debian BTS:

    https://www.debian.org/Bugs/Reporting

    - Have an option to ignore failures in any source.list file.
    This will allow updates of security repos to proceed.

    This makes it sound like you need to update your apt sources for the
    changes to the security archive that happened in Debian bullseye:

    https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.en.html#security-archive

    - Have Apt not proceed with install if available space is less than
    estimated install space. Especially since --fix-broken-install
    usually requires more space to resolve this.

    Until the apt developers implement this, it might be possible to add a
    hook script added to the DPkg::Pre-Install-Pkgs option in apt.conf.

    It might be hard to write such a script. The apt-listbugs package is
    probably the best example of how to process the hook script input.

    https://sources.debian.org/src/apt-listbugs/0.1.36/10apt-listbugs/ https://sources.debian.org/src/apt-listbugs/0.1.36/bin/apt-listbugs/#L455

    Documentation on DPkg::Pre-Install-Pkgs is in the apt.conf manual page:

    https://manpages.debian.org/bullseye/apt/apt.conf.5.en.html#HOW_APT_CALLS_DPKG(1)

    --
    bye,
    pabs

    https://wiki.debian.org/PaulWise

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEYQsotVz8/kXqG1Y7MRa6Xp/6aaMFAmM/geUACgkQMRa6Xp/6 aaMrNxAAmOoQqWS2a9QT/FeV6E27yi1Ut7d0NHrJEcudN+JyNPf6aGcg6j4Havw6 TFIwEtuzSsrW6Or8Y2IYZu6yjlBzK2/MliuwzflHeTdeJiTx+9eNRkKhNX3eHbVS xRDoxnWhzoKmSR+/nGxPtL6mtPQ1nIgFxajDDsF6tZ+5ZUagUEKBIZPB6ecipnEt wETOh5g+SP7BOtuAMU03Kh0PGGZCgFH++A6ngyelk+MwwOj7nbKvRbOh5mOmYRFT gOq6b4htbpPomiYMFoMoQBQUP4jZ40rv9ejU3ggMd1Ez4zYfC8QMxKj+Zpn/gSuO Qne5GrVO/GKvf9+9fhMR3YebDX/n2FNork9Ir+Vugwr2wJ8NVdQyKL6WG3D7b3A9 sp+u6yIXEg/leQdS1A+C/4caN1gjk7OUq6EPfKVeazFJ1bNrLuMEKqHYhvmxHWQn eoETgcChMvq0AsnX6NbVPOUYQ2eJIQ+krs1nRwDOUYMhonFfG6rmhh5Q6tiJQfN7 s/tXl1ieylHL/ZXwePpRkELIrOQSv2z0pVJs/pYOhU8C3zO5ZISS9rVis7PduPwO /pynon4hh7vpxqVJYAMhK/8E+jiQM4gIHFxSOeFoKe4Pv1JgIHdcYq9mg5kpBro4 /jmiQmVPpw6/WZeG2XCsddhSdWi2IrxTr2YMkfv77jA+QhZ0pTg=
    =OEjl
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Kalnischkies@21:1/5 to Paul Wise on Sun Oct 9 14:50:01 2022
    On Fri, Oct 07, 2022 at 09:33:28AM +0800, Paul Wise wrote:
    On Thu, 2022-10-06 at 10:54 -0700, xaq xaq wrote:
    Hi, how do I submit a suggestion to the Apt team? I've tried to
    register on their website (https://salsa.debian.org/apt-team/apt).

    You can report a bug via the Debian BTS:

    https://www.debian.org/Bugs/Reporting

    Our¹ "website" mentions at the end of our general information blob:
    | Discussion happens mostly on
    | [the mailing list](mailto:[email protected])
    | ([archive](https://lists.debian.org/deity/))
    | and on [IRC](irc://irc.oftc.net/debian-apt).
    | Our bug tracker as well as a general overview can be found at
    | the [Debian Tracker page](https://tracker.debian.org/pkg/apt).

    (in markdown so you can see the direct pointers). It is actually our¹
    README file in the version control system, we don't have a website and
    hence none is given in the Homepage field.

    ¹ "our" as in: I am one of two active apt developers.


    - Have an option to ignore failures in any source.list file.
    This will allow updates of security repos to proceed.

    This makes it sound like you need to update your apt sources for the
    changes to the security archive that happened in Debian bullseye:

    https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.en.html#security-archive

    Apart from what Paul said (and is btw an other indication that "we will
    write it in the release notes and everything is smooth sailing from
    there on out" still means a lot of support questions. I stopped counting
    how often I pointed to that release note section…):

    Please tell us the EXACT and COMPLETE update output you are seeing.
    In the security-archive example an 'apt update' will fail with error
    messages and such about the bad archive, but all the other "working"
    archives will be updated as usual and subsequent apt calls will use
    that information. The failure is hence already "ignored" in a sense.

    So if you don't see that behaviour it might simply be a bug that should
    be fixed.


    - Have Apt not proceed with install if available space is less than estimated install space. Especially since --fix-broken-install
    usually requires more space to resolve this.

    Until the apt developers implement this, it might be possible to add a
    hook script added to the DPkg::Pre-Install-Pkgs option in apt.conf.

    (--fix-broken-install is not a thing, I suppose the last - is a space)

    APT already makes a rough check on the available space for the download,
    so in that step, you aren't going to run out of space. The installation
    is another matter… apt displays a remark on what it thinks will be used/ freed after the upgrade will be complete, but that can be a pretty rough estimate (= is completely wrong most of the time).

    Take apt itself as an example: Download is ~1.5 MB, Install size
    supposedly ~4.5 MB. In practice /var/lib/apt and /var/cache/apt will
    grow into the hundreds of MBs on first use. apt is usually not used
    inside maintainer scripts, but many other things generate lots of data
    which isn't accounted for. The other thing is that e.g. we don't know
    where that space will be needed: If you have a separate /boot for
    example it becomes interesting if your next kernel install will fit into
    it as well or not (and if it does in the middle of the upgrade, not at
    the end after others were perhaps removed) – and it is usually
    accompanied by a generated initrd which isn't accounted for anyhow.


    So, that script would probably contain lots and lots of guesswork and
    would indeed be better of being not part of apt itself (like the
    mentioned listbugs or e.g. listchanges) as src:apt is usually not
    granted as much leeway in terms of updates as "leaf" packages.

    (Beside that this script probably has the same problem as apt itself:
    Ideally an upgrade from X to Y would use the version from Y already)


    Best regards

    David Kalnischkies

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEE5sn+Q4uCja/tn0GrMRvlz3HQeIMFAmNCwIIACgkQMRvlz3HQ eIPGbQ/9HnZwihjHrWHtJfZ+PH75F9k3bjBlVK6w5taIaT2Ds5G8HWCwfA8wzgr0 E5cPxPWXAXVauPM7e2AK3VEK6QaQ3JuBpFbaQIacnFtjIxx1enWxSnwMpfe/EMBF LsjO9scndHgJ8gMxC7mnuTkyulkHTP2asBKza0eWlg8KpDG7TnPzVz7w92Jk15ia AvThYME4OCIEvhyCczoSoZdetOCcngMDjRZYdutXlS7dB6AzoR78vA6Da3evNqOg o0wGuKSkO7xFdrrNsjLJeecC6CJ2iO8rmFTq3TnoPeNpvtm/6YEVNac8pu4TIXjQ c6tZfxNSVRm54THtVoQaurgki8r12AsY4HO3/qenCO0n8uW8cEucgGxBTS/muUrz ez6Gol9rdnEraBaVUYUuF602RLtlghgP6F9yN5iT/Jkhlpq7JbGV3d5l7P30tFsu RkANqGmlHl3aaykhNHI/E3ThSAgIwy8s0LYC6lbLgd4O9x+P730048ilIgKYIwaO 29f5Ja0F3sjn5JIgN96A9rU3doTgVdhhyF2rr/M6Owy5vALTmbRgcRZeGvMpZ2Eh x5Ep4f+ylreMNH6fr226fd6OnkU4PWYatO7ZDun7vFdTo63qy6Q0GGgkj3WM8RzQ wnBrV7hawWk4CywZ2Tr5CUhaYLKM319pIiSUflHOriOLubLL5ZI=
    =faAo
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From xaq xaq@21:1/5 to All on Sun Oct 9 22:30:01 2022
    Thanks Paul and David.

    To simplify a frequently seen halt of `apt upgrade` I have this example.. I
    had to remove keepsolidinc.list
    from /etc/apt/sources.list.d. Then apt update proceeds. Here is the error I
    get with that source list in place:

    *Hit:1 http://archive.ubuntu.com/ubuntu
    <http://archive.ubuntu.com/ubuntu> - InRelease
    Hit:2 http://security.ubuntu.com/ubuntu
    <http://security.ubuntu.com/ubuntu> --security InRelease
    Hit:3 http://archive.ubuntu.com/ubuntu
    <http://archive.ubuntu.com/ubuntu> --updates InRelease
    Hit:4 http://archive.ubuntu.com/ubuntu
    <http://archive.ubuntu.com/ubuntu> --backports InRelease
    Ign:5 http://apt.keepsolid.com/ubuntu
    <http://apt.keepsolid.com/ubuntu> - InRelease
    Err:6 http://apt.keepsolid.com/ubuntu
    <http://apt.keepsolid.com/ubuntu> - Release
    404 Not Found [IP: 144.217.71.199 80]
    Reading package lists... Done
    E: The repository 'http://apt.keepsolid.com/ubuntu <http://apt.keepsolid.com/ubuntu> - Release' does not have a Release
    file.
    N: Updating from such a repository can't be done securely, and is
    therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user
    configuration details.*



    For the size estimation, I understand it is an estimation, and there could
    be guesswork, but I would posit that if the estimate is even roughly
    correct, a user most likely will not want to proceed, because the
    consequences greatly outweigh the benefits of proceeding.

    This is because once a disk is filled, `apt remove` will not undo the
    changes until the install is complete. This creates an impossible
    situation, ie. apt cant remove without space, but install cant proceed
    because there is no space.

    This problem is most relevant today with users heavily relying on VMs where shrinking a disk is often problematic, so creating an image with the least amount of freespace is highly useful, because images are often cloned
    many times for backup and progression. This means repeatedly bumping into
    this "impossible situation".

    It seems a simple solution to just not proceed when the estimated install
    space exceeds the free space. It is already calculated. And the edge cases
    will more likely than not benefit from not proceeding by default. This is because the cost of a false positive is much, much less than getting into a catch-22 of disk space, getting stuck, and not being able to undo what apt
    just did, even following the recommended --fix-broken which wont work if
    the disk is full, which is many times presented because of the disk being
    full. I'm not sure I see many situations where having to use a flag to
    proceed would harm the vast majority of users.

    Thank you


    On Sun, Oct 9, 2022 at 5:37 AM David Kalnischkies <[email protected]> wrote:

    On Fri, Oct 07, 2022 at 09:33:28AM +0800, Paul Wise wrote:
    On Thu, 2022-10-06 at 10:54 -0700, xaq xaq wrote:
    Hi, how do I submit a suggestion to the Apt team? I've tried to
    register on their website (https://salsa.debian.org/apt-team/apt).

    You can report a bug via the Debian BTS:

    https://www.debian.org/Bugs/Reporting

    Our¹ "website" mentions at the end of our general information blob:
    | Discussion happens mostly on
    | [the mailing list](mailto:[email protected])
    | ([archive](https://lists.debian.org/deity/))
    | and on [IRC](irc://irc.oftc.net/debian-apt).
    | Our bug tracker as well as a general overview can be found at
    | the [Debian Tracker page](https://tracker.debian.org/pkg/apt).

    (in markdown so you can see the direct pointers). It is actually our¹
    README file in the version control system, we don't have a website and
    hence none is given in the Homepage field.

    ¹ "our" as in: I am one of two active apt developers.


    - Have an option to ignore failures in any source.list file.
    This will allow updates of security repos to proceed.

    This makes it sound like you need to update your apt sources for the changes to the security archive that happened in Debian bullseye:


    https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.en.html#security-archive

    Apart from what Paul said (and is btw an other indication that "we will
    write it in the release notes and everything is smooth sailing from
    there on out" still means a lot of support questions. I stopped counting
    how often I pointed to that release note section…):

    Please tell us the EXACT and COMPLETE update output you are seeing.
    In the security-archive example an 'apt update' will fail with error
    messages and such about the bad archive, but all the other "working"
    archives will be updated as usual and subsequent apt calls will use
    that information. The failure is hence already "ignored" in a sense.

    So if you don't see that behaviour it might simply be a bug that should
    be fixed.


    - Have Apt not proceed with install if available space is less than estimated install space. Especially since --fix-broken-install
    usually requires more space to resolve this.

    Until the apt developers implement this, it might be possible to add a
    hook script added to the DPkg::Pre-Install-Pkgs option in apt.conf.

    (--fix-broken-install is not a thing, I suppose the last - is a space)

    APT already makes a rough check on the available space for the download,
    so in that step, you aren't going to run out of space. The installation
    is another matter… apt displays a remark on what it thinks will be used/ freed after the upgrade will be complete, but that can be a pretty rough estimate (= is completely wrong most of the time).

    Take apt itself as an example: Download is ~1.5 MB, Install size
    supposedly ~4.5 MB. In practice /var/lib/apt and /var/cache/apt will
    grow into the hundreds of MBs on first use. apt is usually not used
    inside maintainer scripts, but many other things generate lots of data
    which isn't accounted for. The other thing is that e.g. we don't know
    where that space will be needed: If you have a separate /boot for
    example it becomes interesting if your next kernel install will fit into
    it as well or not (and if it does in the middle of the upgrade, not at
    the end after others were perhaps removed) – and it is usually
    accompanied by a generated initrd which isn't accounted for anyhow.


    So, that script would probably contain lots and lots of guesswork and
    would indeed be better of being not part of apt itself (like the
    mentioned listbugs or e.g. listchanges) as src:apt is usually not
    granted as much leeway in terms of updates as "leaf" packages.

    (Beside that this script probably has the same problem as apt itself:
    Ideally an upgrade from X to Y would use the version from Y already)


    Best regards

    David Kalnischkies


    <div dir="ltr">Thanks Paul and David.<div><br></div><div>To simplify a frequently seen halt of `apt upgrade` I have this example.. I had to remove keepsolidinc.list<br>from /etc/apt/sources.list.d. Then apt update proceeds. Here is the error I get with
    that source list in place:</div><div><pre style="margin-top:0px;margin-bottom:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:
    auto"><code style="margin:0px;padding:0px;border:0px;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;background-color:transparent;white-space:inherit;border-radius:0px"><font
    size="1" style=""><i>Hit:1 <a href="http://archive.ubuntu.com/ubuntu">http://archive.ubuntu.com/ubuntu</a> - InRelease
    Hit:2 <a href="http://security.ubuntu.com/ubuntu">http://security.ubuntu.com/ubuntu</a> --security InRelease
    Hit:3 <a href="http://archive.ubuntu.com/ubuntu">http://archive.ubuntu.com/ubuntu</a> --updates InRelease
    Hit:4 <a href="http://archive.ubuntu.com/ubuntu">http://archive.ubuntu.com/ubuntu</a> --backports InRelease
    Ign:5 <a href="http://apt.keepsolid.com/ubuntu">http://apt.keepsolid.com/ubuntu</a> - InRelease
    Err:6 <a href="http://apt.keepsolid.com/ubuntu">http://apt.keepsolid.com/ubuntu</a> - Release
    404 Not Found [IP: 144.217.71.199 80]
    Reading package lists... Done
    E: The repository &#39;<a href="http://apt.keepsolid.com/ubuntu">http://apt.keepsolid.com/ubuntu</a> - Release&#39; does not have a Release file.
    N: Updating from such a repository can&#39;t be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.</i></font></code></pre></div><div><br></div><div><br></div><div>For the size estimation, I understand it is an estimation, and there could be guesswork, but I would
    posit that if the estimate is even roughly correct, a user most likely will not want to proceed, because the consequences greatly outweigh the benefits of proceeding.</div><div><br></div><div>This is because once a disk is filled, `apt remove` will not
    undo the changes until the install is complete. This creates an impossible situation, ie. apt cant remove without space, but install cant proceed because there is no space. </div><div><br></div><div>This problem is most relevant today with users
    heavily relying on VMs where shrinking a disk is often problematic, so creating an image with the least amount of freespace is highly useful, because images are often cloned many times for backup and progression. This means repeatedly bumping into this
    &quot;impossible situation&quot;.</div><div><br></div><div>It seems a simple solution to just not proceed when the estimated install space exceeds the free space. It is already calculated. And the edge cases will more likely than not benefit from not
    proceeding by default. This is because the cost of a false positive is much, much less than getting into a catch-22 of disk space, getting stuck, and not being able to undo what apt just did, even following the recommended --fix-broken which wont work
    if the disk is full, which is many times presented because of the disk being full. I&#39;m not sure I see many situations where having to use a flag to proceed would harm the vast majority of users. </div><div><br></div><div>Thank you</div><div><br></
    </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 9, 2022 at 5:37 AM David Kalnischkies &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="
    margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Oct 07, 2022 at 09:33:28AM +0800, Paul Wise wrote:<br>
    &gt; On Thu, 2022-10-06 at 10:54 -0700, xaq xaq wrote:<br>
    &gt; &gt; Hi, how do I submit a suggestion to the Apt team? I&#39;ve tried to<br>
    &gt; &gt; register on their website (<a href="https://salsa.debian.org/apt-team/apt" rel="noreferrer" target="_blank">https://salsa.debian.org/apt-team/apt</a>).<br>
    &gt; <br>
    &gt; You can report a bug via the Debian BTS:<br>
    &gt; <br>
    &gt; <a href="https://www.debian.org/Bugs/Reporting" rel="noreferrer" target="_blank">https://www.debian.org/Bugs/Reporting</a><br>

    Our¹ &quot;website&quot; mentions at the end of our general information blob:<br>
    | Discussion happens mostly on<br>
    | [the mailing list](mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>)<br>
    | ([archive](<a href="https://lists.debian.org/deity/" rel="noreferrer" target="_blank">https://lists.debian.org/deity/</a>))<br>
    | and on [IRC](irc://<a href="http://irc.oftc.net/debian-apt" rel="noreferrer" target="_blank">irc.oftc.net/debian-apt</a>).<br>
    | Our bug tracker as well as a general overview can be found at<br>
    | the [Debian Tracker page](<a href="https://tracker.debian.org/pkg/apt" rel="noreferrer" target="_blank">https://tracker.debian.org/pkg/apt</a>).<br>

    (in markdown so you can see the direct pointers). It is actually our¹<br> README file in the version control system, we don&#39;t have a website and<br> hence none is given in the Homepage field.<br>

    ¹ &quot;our&quot; as in: I am one of two active apt developers.<br>


    &gt; &gt; - Have an option to ignore failures in any source.list file.<br>
    &gt; &gt;   This will allow updates of security repos to proceed.<br>
    &gt; <br>
    &gt; This makes it sound like you need to update your apt sources for the<br> &gt; changes to the security archive that happened in Debian bullseye:<br>
    &gt; <br>
    &gt; <a href="https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.en.html#security-archive" rel="noreferrer" target="_blank">https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.en.html#security-archive</a><


    Apart from what Paul said (and is btw an other indication that &quot;we will<br>
    write it in the release notes and everything is smooth sailing from<br>
    there on out&quot; still means a lot of support questions. I stopped counting<br>
    how often I pointed to that release note section…):<br>

    Please tell us the EXACT and COMPLETE update output you are seeing.<br>
    In the security-archive example an &#39;apt update&#39; will fail with error<br>
    messages and such about the bad archive, but all the other &quot;working&quot;<br>
    archives will be updated as usual and subsequent apt calls will use<br>
    that information. The failure is hence already &quot;ignored&quot; in a sense.<br>

    So if you don&#39;t see that behaviour it might simply be a bug that should<br> be fixed.<br>


    &gt; &gt; - Have Apt not proceed with install if available space is less than<br>
    &gt; &gt; estimated install space. Especially since --fix-broken-install<br> &gt; &gt; usually requires more space to resolve this.<br>
    &gt; <br>
    &gt; Until the apt developers implement this, it might be possible to add a<br> &gt; hook script added to the DPkg::Pre-Install-Pkgs option in apt.conf.<br>

    (--fix-broken-install is not a thing, I suppose the last - is a space)<br>

    APT already makes a rough check on the available space for the download,<br>
    so in that step, you aren&#39;t going to run out of space. The installation<br> is another matter… apt displays a remark on what it thinks will be used/<br> freed after the upgrade will be complete, but that can be a pretty rough<br> estimate (= is completely wrong most of the time).<br>

    Take apt itself as an example: Download is ~1.5 MB, Install size<br>
    supposedly ~4.5 MB. In practice /var/lib/apt and /var/cache/apt will<br>
    grow into the hundreds of MBs on first use. apt is usually not used<br>
    inside maintainer scripts, but many other things generate lots of data<br> which isn&#39;t accounted for. The other thing is that e.g. we don&#39;t know<br>
    where that space will be needed: If you have a separate /boot for<br>
    example it becomes interesting if your next kernel install will fit into<br>
    it as well or not (and if it does in the middle of the upgrade, not at<br>
    the end after others were perhaps removed) – and it is usually<br> accompanied by a generated initrd which isn&#39;t accounted for anyhow.<br>


    So, that script would probably contain lots and lots of guesswork and<br>
    would indeed be better of being not part of apt itself (like the<br>
    mentioned listbugs or e.g. listchanges) as src:apt is usually not<br>
    granted as much leeway in terms of updates as &quot;leaf&quot; packages.<br>

    (Beside that this script probably has the same problem as apt itself:<br>  Ideally an upgrade from X to Y would use the version from Y already)<br>


    Best regards<br>

    David Kalnischkies<br>
    </blockquote></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Kalnischkies@21:1/5 to xaq xaq on Mon Oct 10 16:00:01 2022
    On Sun, Oct 09, 2022 at 01:21:45PM -0700, xaq xaq wrote:
    To simplify a frequently seen halt of `apt upgrade` I have this example.. I had to remove keepsolidinc.list
    from /etc/apt/sources.list.d. Then apt update proceeds. Here is the error I get with that source list in place:

    *Hit:1 http://archive.ubuntu.com/ubuntu
    <http://archive.ubuntu.com/ubuntu> - InRelease
    Hit:2 http://security.ubuntu.com/ubuntu
    <http://security.ubuntu.com/ubuntu> --security InRelease
    Hit:3 http://archive.ubuntu.com/ubuntu
    <http://archive.ubuntu.com/ubuntu> --updates InRelease
    Hit:4 http://archive.ubuntu.com/ubuntu
    <http://archive.ubuntu.com/ubuntu> --backports InRelease
    Ign:5 http://apt.keepsolid.com/ubuntu
    <http://apt.keepsolid.com/ubuntu> - InRelease
    Err:6 http://apt.keepsolid.com/ubuntu
    <http://apt.keepsolid.com/ubuntu> - Release
    404 Not Found [IP: 144.217.71.199 80]
    Reading package lists... Done
    E: The repository 'http://apt.keepsolid.com/ubuntu <http://apt.keepsolid.com/ubuntu> - Release' does not have a Release
    file.
    N: Updating from such a repository can't be done securely, and is
    therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user
    configuration details.*

    What do you mean with "halt of `apt upgrade`"? You have shown us output
    of 'apt update'? And that output suggests that the other archives were
    updated (just that they were already current: cache "Hit").

    I suppose if the old data still on disk for keepsolid is indicating
    newer versions of packages than you have installed an upgrade would try
    to download them potentially running also into 404 errors (assuming this
    repo is entirely offline). That would indeed "block" upgrades of other
    packages not from that repo, but what is apt supposed to do instead…
    It is asked to upgrade all packages and can't: Partial upgrades are
    technically supported, but hardly tested in practice as it is
    a combinatorial explosion if you tried. So in theory you upgrade from
    a perfectly supported system with updates available to a system with
    unknown support status and still more updates available. That doesn't
    look like a good default move.

    You can tell apt to carry on with --fix-missing if that is what you
    desire, but really, you should either remove that repository (and the
    packages coming from it) for good or work with its provider on fixing
    it/making it available again. After all, --fix-missing lets you carry
    on in a pinch, but it remains that the repository fails to serve updates
    to you, which in the worst case means public known security issues remain exploitable on your system.

    (This could be part of an attack. It usually isn't, but it is
    indistinguishable from a MITM blocking access to a repository so
    that you can not get the security updates the attacker wants to
    exploit. There are better ways, hence its unlikely, but it is just
    a less good way as it shows errors grabbing attention that something
    is wrong. If apt wouldn't, this would be really easy to use.)

    For the size estimation, I understand it is an estimation, and there could
    be guesswork, but I would posit that if the estimate is even roughly
    correct, a user most likely will not want to proceed, because the consequences greatly outweigh the benefits of proceeding.

    As I tried to explain already apt downloads itself at the expense of 1.5
    MB. It will take up installed 4.5 MB. It hardly changes size from
    version to version, so more space freed/used after the upgrade amounts
    to more or less 0 MB. Running and using apt requires additional data
    which easily takes up 200 MB. Lets assume every package is similar to
    apt (they aren't, you e.g. have things like texlive which comes in a
    couple hundred MBs of download already). A typical upgrade can contain
    more than 1000 packages, so which value between 0 and 200 GB are we
    gonna use as a rough estimate for that upgrade? And again, which
    partitions are we gonna talk about if you have multiple, like e.g.
    a separate /boot ?

    APT in this scenario picks 1.5 GB (the size it will need to download all
    the packages) on the partition housing its download location:
    apt's free space check for the download is done against free blocks
    available for everyone. In a default configuration root has an additional
    5% of a partition as free space available for their exclusive use.

    If your idea is that lets say apt should not continue if you don't have
    100 MB free on /boot and 5 GB on / (should be enough, right?) that is
    fine for your system and pretty easy to implement with e.g. a
    dpkg::pre-invoke hook (no need for the heavier dpkg::pre-install-pkgs
    hook). That wont work in the general case though… there are systems
    which don't even have 5 GBs of disk space to begin with.

    (Did you think apts 1.5 GB is a reasonable low bound? For some people
    that is already way too high! Like if your filesystem supports
    compression)


    That script you could package up and make available for everyone who
    needs it. Probably with config knobs to specific sizes. Probably with
    more iterations as people come up with pretty interesting partition
    schemes if you give them the option to… perhaps indeed moving to a pre-install-pkgs hook later on to make better guesses at what a given
    upgrade might need (install of two packages, probably fine… upgrading
    2000 package ~ now we are talking!) …

    If a few months down the line we discover that there is indeed a setup
    which works for – lets say – 95% of Debian users we can always set it
    to prio:standard and install it by default or integrate it into apt
    so (basically) everyone gets it everywhere, but until then it is more beneficial for you and us if we are not burdening ourselves with
    making it work for everyone from day 1.


    Best regards

    David Kalnischkies

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEE5sn+Q4uCja/tn0GrMRvlz3HQeIMFAmNEJHkACgkQMRvlz3HQ eIPkdg/7BDd5hVz/YLBrtDzn1Kj1wbsgxDGJUh21o2/KUYW2qFpOulVpBJ/9GHOf 3r7+AMzDjv/KUVCylvBLNo6HZoORVtgAJkSE1iyTXGgYmEE2lfVu6ijT1auPXVUM a6wk3LqBjqy+PbAISjFbbTUezsAbwUS7/LSjGv6hVhEcuJaiumz/eyxN66JDDUd2 D8lKEF+cdlS6mBuutnLeCbl0v47Eghn8khO2p9/w2Yaocc1hp73kWCmLa46FFSJF cZ7YFI3tk53gOr8Yk55wD/1sX6YT+qWxG/kNYFC12nx5OOzbFbnW8/CaKeyaeBsm 4msc5y0iFxTyBu+5j7VXq34K6UupcU3Z+tNytecjBQL7503rjd/ivJcY+NwcgUy7 duuwp0uAn+j2sdElwyV0u3v2Z+XGcF9iQEnQ2Em4GIjlQCEcdsaVkS+cWHWDBTkl xJj9JMP9N/eItIz3oNUjweYso46LhRJV6DcNO9p/6VKXnW/7prUS9vlatuuE9tbK 4qiDPUX07omOYLdogf/BM+ZI3GnjKFuyTtuWVpjq0xHHRod2JAQJOV4iQoiesblu b5Tteetj9Nsz2jjIAqMXH49DsdXihvUcZiF+m4hvileB088yaAQThXrmV2FfMKdD k0J3jASkgzrP8hzSy0osSdrGsQYnkkurgDwwbj6lsZzUJ8O7VpM=
    =q5Dr
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Austin Moon@21:1/5 to All on Mon Oct 10 17:20:01 2022
    Than you for the thoughtful reply.

    Yes the apt upgrade submit ends there with no further error messages. When moving that source list it proceeds and asks me if i want to install the upgrades.

    Please help me to understand the MITM scenario. So you're saying an
    attacker could be able to redirect all sources except one? Is that even technically likely? Has that ever happened?

    I appreciate you explaining the risk, as I'm trying to understand why.
    Please understand that this also prevents unattended upgrades from
    proceeding, which aside from a real indication of MITM attack seems like unnecessarily putting many systems at a security risk. (Also, shouldn't
    https be used by default in the main sources list that includes security
    repos? Doesn't https prevent MITM?)


    Re space checking: I understand estimates are inaccurate. But it seems
    better to fail on the side of caution in this instance. To be clear, I'm
    not expecting to make waves for so many other users, this could be rolled
    out with a flag option like (--check-space). I do think opt out should be
    the default though.

    I know there are separate partitions, but doesn't the estimation look at
    say /boot when a kernel is queued for install? If it knows where to install packages, it can check those exact locations for free space. (But still
    imho better to fail by default)

    I would take the conservative side of the estimate, as I've said the
    uninstall process can be very complicated, especially when inside a VM with
    no other space available. Usually means manually deleting files that upsets dpkg and then having to reconfigure all that first before making apt happy again.

    I think 1.5GB is reasonable. Doesn't the filesystem not have to be
    uncompressed to install? Wouldn't it already be uncompressed during apt
    use?

    I understand about rolling out in a way to see what possible problems arise before implementing defaults.


    Thank you


    On Mon, Oct 10, 2022, 6:56 AM David Kalnischkies <[email protected]>
    wrote:

    On Sun, Oct 09, 2022 at 01:21:45PM -0700, xaq xaq wrote:
    To simplify a frequently seen halt of `apt upgrade` I have this
    example.. I
    had to remove keepsolidinc.list
    from /etc/apt/sources.list.d. Then apt update proceeds. Here is the
    error I
    get with that source list in place:

    *Hit:1 http://archive.ubuntu.com/ubuntu
    <http://archive.ubuntu.com/ubuntu> - InRelease
    Hit:2 http://security.ubuntu.com/ubuntu
    <http://security.ubuntu.com/ubuntu> --security InRelease
    Hit:3 http://archive.ubuntu.com/ubuntu
    <http://archive.ubuntu.com/ubuntu> --updates InRelease
    Hit:4 http://archive.ubuntu.com/ubuntu
    <http://archive.ubuntu.com/ubuntu> --backports InRelease
    Ign:5 http://apt.keepsolid.com/ubuntu
    <http://apt.keepsolid.com/ubuntu> - InRelease
    Err:6 http://apt.keepsolid.com/ubuntu
    <http://apt.keepsolid.com/ubuntu> - Release
    404 Not Found [IP: 144.217.71.199 80]
    Reading package lists... Done
    E: The repository 'http://apt.keepsolid.com/ubuntu <http://apt.keepsolid.com/ubuntu> - Release' does not have a Release
    file.
    N: Updating from such a repository can't be done securely, and is
    therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user
    configuration details.*

    What do you mean with "halt of `apt upgrade`"? You have shown us output
    of 'apt update'? And that output suggests that the other archives were updated (just that they were already current: cache "Hit").

    I suppose if the old data still on disk for keepsolid is indicating
    newer versions of packages than you have installed an upgrade would try
    to download them potentially running also into 404 errors (assuming this
    repo is entirely offline). That would indeed "block" upgrades of other packages not from that repo, but what is apt supposed to do instead…
    It is asked to upgrade all packages and can't: Partial upgrades are technically supported, but hardly tested in practice as it is
    a combinatorial explosion if you tried. So in theory you upgrade from
    a perfectly supported system with updates available to a system with
    unknown support status and still more updates available. That doesn't
    look like a good default move.

    You can tell apt to carry on with --fix-missing if that is what you
    desire, but really, you should either remove that repository (and the packages coming from it) for good or work with its provider on fixing it/making it available again. After all, --fix-missing lets you carry
    on in a pinch, but it remains that the repository fails to serve updates
    to you, which in the worst case means public known security issues remain exploitable on your system.

    (This could be part of an attack. It usually isn't, but it is
    indistinguishable from a MITM blocking access to a repository so
    that you can not get the security updates the attacker wants to
    exploit. There are better ways, hence its unlikely, but it is just
    a less good way as it shows errors grabbing attention that something
    is wrong. If apt wouldn't, this would be really easy to use.)

    For the size estimation, I understand it is an estimation, and there
    could
    be guesswork, but I would posit that if the estimate is even roughly correct, a user most likely will not want to proceed, because the consequences greatly outweigh the benefits of proceeding.

    As I tried to explain already apt downloads itself at the expense of 1.5
    MB. It will take up installed 4.5 MB. It hardly changes size from
    version to version, so more space freed/used after the upgrade amounts
    to more or less 0 MB. Running and using apt requires additional data
    which easily takes up 200 MB. Lets assume every package is similar to
    apt (they aren't, you e.g. have things like texlive which comes in a
    couple hundred MBs of download already). A typical upgrade can contain
    more than 1000 packages, so which value between 0 and 200 GB are we
    gonna use as a rough estimate for that upgrade? And again, which
    partitions are we gonna talk about if you have multiple, like e.g.
    a separate /boot ?

    APT in this scenario picks 1.5 GB (the size it will need to download all
    the packages) on the partition housing its download location:
    apt's free space check for the download is done against free blocks
    available for everyone. In a default configuration root has an additional
    5% of a partition as free space available for their exclusive use.

    If your idea is that lets say apt should not continue if you don't have
    100 MB free on /boot and 5 GB on / (should be enough, right?) that is
    fine for your system and pretty easy to implement with e.g. a dpkg::pre-invoke hook (no need for the heavier dpkg::pre-install-pkgs
    hook). That wont work in the general case though… there are systems
    which don't even have 5 GBs of disk space to begin with.

    (Did you think apts 1.5 GB is a reasonable low bound? For some people
    that is already way too high! Like if your filesystem supports
    compression)


    That script you could package up and make available for everyone who
    needs it. Probably with config knobs to specific sizes. Probably with
    more iterations as people come up with pretty interesting partition
    schemes if you give them the option to… perhaps indeed moving to a pre-install-pkgs hook later on to make better guesses at what a given
    upgrade might need (install of two packages, probably fine… upgrading
    2000 package ~ now we are talking!) …

    If a few months down the line we discover that there is indeed a setup
    which works for – lets say – 95% of Debian users we can always set it
    to prio:standard and install it by default or integrate it into apt
    so (basically) everyone gets it everywhere, but until then it is more beneficial for you and us if we are not burdening ourselves with
    making it work for everyone from day 1.


    Best regards

    David Kalnischkies


    <div dir="auto"><div>Than you for the thoughtful reply.</div><div dir="auto"><br></div><div dir="auto">Yes the apt upgrade submit ends there with no further error messages. When moving that source list it proceeds and asks me if i want to install the
    upgrades.</div><div dir="auto"><br></div><div dir="auto">Please help me to understand the MITM scenario. So you&#39;re saying an attacker could be able to redirect all sources except one? Is that even technically likely? Has that ever happened? </div><
    div dir="auto"><br></div><div dir="auto">I appreciate you explaining the risk, as I&#39;m trying to understand why. Please understand that this also prevents unattended upgrades from proceeding, which aside from a real indication of MITM attack seems
    like unnecessarily putting many systems at a security risk. (Also, shouldn&#39;t https be used by default in the main sources list that includes security repos? Doesn&#39;t https prevent MITM?)</div><div dir="auto"><br></div><div dir="auto"><br></div><
    div dir="auto">Re space checking: I understand estimates are inaccurate. But it seems better to fail on the side of caution in this instance. To be clear, I&#39;m not expecting to make waves for so many other users, this could be rolled out with a flag
    option like (--check-space). I do think opt out should be the default though.</div><div dir="auto"><br></div><div dir="auto">I know there are separate partitions, but doesn&#39;t the estimation look at say /boot when a kernel is queued for install? If it
    knows where to install packages, it can check those exact locations for free space. (But still imho better to fail by default)</div><div dir="auto"><br></div><div dir="auto">I would take the conservative side of the estimate, as I&#39;ve said the
    uninstall process can be very complicated, especially when inside a VM with no other space available. Usually means manually deleting files that upsets dpkg and then having to reconfigure all that first before making apt happy again.</div><div dir="auto">
    <br></div><div dir="auto">I think 1.5GB is reasonable. Doesn&#39;t the filesystem not have to be uncompressed to install? Wouldn&#39;t it already be uncompressed during apt use? </div><div dir="auto"><br></div><div dir="auto">I understand about rolling
    out in a way to see what possible problems arise before implementing defaults.</div><div dir="auto"><br></div><div dir="auto"><br>Thank you<br><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Mon, Oct 10, 2022, 6:56 AM
    David Kalnischkies &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, Oct 09, 2022 at 01:21:45PM -0700,
    xaq xaq wrote:<br>
    &gt; To simplify a frequently seen halt of `apt upgrade` I have this example.. I<br>
    &gt; had to remove keepsolidinc.list<br>
    &gt; from /etc/apt/sources.list.d. Then apt update proceeds. Here is the error I<br>
    &gt; get with that source list in place:<br>
    &gt; <br>
    &gt; *Hit:1 <a href="http://archive.ubuntu.com/ubuntu" rel="noreferrer noreferrer" target="_blank">http://archive.ubuntu.com/ubuntu</a><br>
    &gt; &lt;<a href="http://archive.ubuntu.com/ubuntu" rel="noreferrer noreferrer" target="_blank">http://archive.ubuntu.com/ubuntu</a>&gt; - InRelease<br>
    &gt; Hit:2 <a href="http://security.ubuntu.com/ubuntu" rel="noreferrer noreferrer" target="_blank">http://security.ubuntu.com/ubuntu</a><br>
    &gt; &lt;<a href="http://security.ubuntu.com/ubuntu" rel="noreferrer noreferrer" target="_blank">http://security.ubuntu.com/ubuntu</a>&gt; --security InRelease<br>
    &gt; Hit:3 <a href="http://archive.ubuntu.com/ubuntu" rel="noreferrer noreferrer" target="_blank">http://archive.ubuntu.com/ubuntu</a><br>
    &gt; &lt;<a href="http://archive.ubuntu.com/ubuntu" rel="noreferrer noreferrer" target="_blank">http://archive.ubuntu.com/ubuntu</a>&gt; --updates InRelease<br>
    &gt; Hit:4 <a href="http://archive.ubuntu.com/ubuntu" rel="noreferrer noreferrer" target="_blank">http://archive.ubuntu.com/ubuntu</a><br>
    &gt; &lt;<a href="http://archive.ubuntu.com/ubuntu" rel="noreferrer noreferrer" target="_blank">http://archive.ubuntu.com/ubuntu</a>&gt; --backports InRelease<br>
    &gt; Ign:5 <a href="http://apt.keepsolid.com/ubuntu" rel="noreferrer noreferrer" target="_blank">http://apt.keepsolid.com/ubuntu</a><br>
    &gt; &lt;<a href="http://apt.keepsolid.com/ubuntu" rel="noreferrer noreferrer" target="_blank">http://apt.keepsolid.com/ubuntu</a>&gt; - InRelease<br>
    &gt; Err:6 <a href="http://apt.keepsolid.com/ubuntu" rel="noreferrer noreferrer" target="_blank">http://apt.keepsolid.com/ubuntu</a><br>
    &gt; &lt;<a href="http://apt.keepsolid.com/ubuntu" rel="noreferrer noreferrer" target="_blank">http://apt.keepsolid.com/ubuntu</a>&gt; - Release<br>
    &gt;   404  Not Found [IP: 144.217.71.199 80]<br>
    &gt; Reading package lists... Done<br>
    &gt; E: The repository &#39;<a href="http://apt.keepsolid.com/ubuntu" rel="noreferrer noreferrer" target="_blank">http://apt.keepsolid.com/ubuntu</a><br>
    &gt; &lt;<a href="http://apt.keepsolid.com/ubuntu" rel="noreferrer noreferrer" target="_blank">http://apt.keepsolid.com/ubuntu</a>&gt; - Release&#39; does not have a Release<br>
    &gt; file.<br>
    &gt; N: Updating from such a repository can&#39;t be done securely, and is<br> &gt; therefore disabled by default.<br>
    &gt; N: See apt-secure(8) manpage for repository creation and user<br>
    &gt; configuration details.*<br>

    What do you mean with &quot;halt of `apt upgrade`&quot;? You have shown us output<br>
    of &#39;apt update&#39;? And that output suggests that the other archives were<br>
    updated (just that they were already current: cache &quot;Hit&quot;).<br>

    I suppose if the old data still on disk for keepsolid is indicating<br>
    newer versions of packages than you have installed an upgrade would try<br>
    to download them potentially running also into 404 errors (assuming this<br> repo is entirely offline). That would indeed &quot;block&quot; upgrades of other<br>
    packages not from that repo, but what is apt supposed to do instead…<br>
    It is asked to upgrade all packages and can&#39;t: Partial upgrades are<br> technically supported, but hardly tested in practice as it is<br>
    a combinatorial explosion if you tried. So in theory you upgrade from<br>
    a perfectly supported system with updates available to a system with<br> unknown support status and still more updates available. That doesn&#39;t<br> look like a good default move.<br>

    You can tell apt to carry on with --fix-missing if that is what you<br>
    desire, but really, you should either remove that repository (and the<br> packages coming from it) for good or work with its provider on fixing<br> it/making it available again. After all, --fix-missing lets you carry<br>
    on in a pinch, but it remains that the repository fails to serve updates<br>
    to you, which in the worst case means public known security issues remain<br> exploitable on your system.<br>

    (This could be part of an attack. It usually isn&#39;t, but it is<br>  indistinguishable from a MITM blocking access to a repository so<br>
     that you can not get the security updates the attacker wants to<br>  exploit. There are better ways, hence its unlikely, but it is just<br>
     a less good way as it shows errors grabbing attention that something<br>
     is wrong. If apt wouldn&#39;t, this would be really easy to use.)<br>

    &gt; For the size estimation, I understand it is an estimation, and there could<br>
    &gt; be guesswork, but I would posit that if the estimate is even roughly<br> &gt; correct, a user most likely will not want to proceed, because the<br>
    &gt; consequences greatly outweigh the benefits of proceeding.<br>

    As I tried to explain already apt downloads itself at the expense of 1.5<br> MB. It will take up installed 4.5 MB. It hardly changes size from<br>
    version to version, so more space freed/used after the upgrade amounts<br>
    to more or less 0 MB. Running and using apt requires additional data<br>
    which easily takes up 200 MB. Lets assume every package is similar to<br>
    apt (they aren&#39;t, you e.g. have things like texlive which comes in a<br> couple hundred MBs of download already). A typical upgrade can contain<br>
    more than 1000 packages, so which value between 0 and 200 GB are we<br>
    gonna use as a rough estimate for that upgrade? And again, which<br>
    partitions are we gonna talk about if you have multiple, like e.g.<br>
    a separate /boot ?<br>

    APT in this scenario picks 1.5 GB (the size it will need to download all<br> the packages) on the partition housing its download location:<br>
    apt&#39;s free space check for the download is done against free blocks<br> available for everyone. In a default configuration root has an additional<br> 5% of a partition as free space available for their exclusive use.<br>

    If your idea is that lets say apt should not continue if you don&#39;t have<br> 100 MB free on /boot and 5 GB on / (should be enough, right?) that is<br>
    fine for your system and pretty easy to implement with e.g. a<br> dpkg::pre-invoke hook (no need for the heavier dpkg::pre-install-pkgs<br> hook). That wont work in the general case though… there are systems<br>
    which don&#39;t even have 5 GBs of disk space to begin with.<br>

    (Did you think apts 1.5 GB is a reasonable low bound? For some people<br>  that is already way too high! Like if your filesystem supports<br>  compression)<br>


    That script you could package up and make available for everyone who<br>
    needs it. Probably with config knobs to specific sizes. Probably with<br>
    more iterations as people come up with pretty interesting partition<br>
    schemes if you give them the option to… perhaps indeed moving to a<br> pre-install-pkgs hook later on to make better guesses at what a given<br> upgrade might need (install of two packages, probably fine… upgrading<br> 2000 package ~ now we are talking!) …<br>

    If a few months down the line we discover that there is indeed a setup<br> which works for – lets say – 95% of Debian users we can always set it<br> to prio:standard and install it by default or integrate it into apt<br>
    so (basically) everyone gets it everywhere, but until then it is more<br> beneficial for you and us if we are not burdening ourselves with<br>
    making it work for everyone from day 1.<br>


    Best regards<br>

    David Kalnischkies<br>
    </blockquote></div></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)