Package: mmdebstrap Version: 0.6.0-1 Severity: wishlist [This is more a brainstorm than a "finished" bug report. I hope it's still useful!]
When not using mmdebstrap, I have something like this[0]. I could just specify an exact debian.sources to mmdebstrap on stdin, but I'd rather have mmdebstrap take care of it for me (less code for me). I can get close with mmdebstrap --components=main,contrib,non-free buster I think the only differences are missing backports and proposed-updates. I don't REALLY need proposed-updates, but I rely heavily on backports, for things like smartmontools and linux-image-amd64. It's also useful for debhelper &c. I thought about asking for something like --enable-backports. Then it occurred to me that backports Release already has NotAutomatic: yes ButAutomaticUpgrades: yes So, is it reasonable for mmdebstrap to ALWAYS enable backports for suites that have it? You're already always including volatile ($suite-updates). I think it would look like this[2] (because unstable/testing don't have backports). One potential gotcha is, I think, it takes a few weeks for foo-backports to appear when foo changes from testing to stable. We don't want to break "mmdebstrap stable" during that period! It will also make mmdebstrap slightly slower[3] for everyone. [0] in ansible's yaml/jinja2 markup (sorry it's a bit messy), - name: Minimum sources.list (Debian 10+). when: is_buster_or_newer copy: dest: /etc/apt/sources.list.d/debian.sources content: | # Ref. https://manpages.debian.org/stable/apt/sources.list.5.en.html#DEB822-STYLE_FORMAT # NOTE: apt 1.5+ supports https natively (no apt-transport-https needed) # UPDATE: Using https *and* caching proxy proved to be too problematic. # Therefore we now use SOLELY http (not https). # NOTE: intel-microcode & amd64-microcode needs contrib & non-free! # FIXME: is it safe to place deb.debian.org and security.debian.org together? # UPDATE: SOLELY deb.debian.org (no security.debian.org), # which is identical to security-cdn.debian.org, # which is identical to security.debian.org (mostly) due to SRV records. {% if codename == 'sid' %} # Debian unstable (sid) has no security repo. {% else %} Types: deb URIs: http://deb.debian.org/debian-security Suites: {% if codename == 'buster' %} # NOTE: Debian 11+ use "foo-security" (not "foo/updates"). {{codename}}/updates {% else %} {{codename}}-security {% endif %} Components: main contrib non-free {% endif %} Types: deb URIs: http://deb.debian.org/debian Suites: {% if kind == 'unstable' %} unstable experimental {% elif kind == 'testing' %} {{codename}} unstable experimental {% else %} {{codename}} {{codename}}-updates {{codename}}-proposed-updates {{codename}}-backports {% endif %} Components: main contrib non-free [2] diff -ud --label /usr/bin/mmdebstrap --label \#\<buffer\ mmdebstrap\> /usr/bin/mmdebstrap /tmp/buffer-content-yBjfzf --- /usr/bin/mmdebstrap +++ #<buffer mmdebstrap> @@ -3304,6 +3304,14 @@ $sourceslist .= "deb$signedby $mirror $suite-updates $compstr\n"; + if ( + not any { $_ eq $suite } ( + 'unstable', 'testing', 'sid', 'bullseye' + ) + ) { + $sourceslist + .= "deb$signedby $mirror $suite-backports $compstr\n"; + } if ( any { $_ eq $suite } ( 'oldoldstable', 'oldstable', 'stable', 'jessie', [3] Oops, can't feed a .sources format, so I'll just extract what mmdebstrap wrote itself... # mmdebstrap buster --variant=extract --include=netbase - >/dev/null - < /etc/apt/sources.list.d/debian.sources E: Type 'Types:' is not known on line 10 in source list /tmp/mmdebstrap.v2GZdxqlM9/etc/apt/sources.list # mmdebstrap buster --variant=extract --include=netbase | tar xv --strip-components=3 ./etc/apt/sources.list I: creating tarball... ./etc/apt/sources.list # cat sources.list deb http://deb.debian.org/debian buster main deb http://deb.debian.org/debian buster-updates main deb http://security.debian.org/debian-security buster/updates main Looks like it makes "apt update" about 10% slower (0.5s) with cold cache. # command time mmdebstrap buster --variant=extract --include=netbase - >/dev/null sources.list --quiet 3.19user 0.58system 0:04.47elapsed 84%CPU (0avgtext+0avgdata 49088maxresident)k 6444inputs+0outputs (0major+58036minor)pagefaults 0swaps # echo deb http://deb.debian.org/debian buster-backports main >>sources.list # command time mmdebstrap buster --variant=extract --include=netbase - >/dev/null sources.list --quiet 3.29user 0.64system 0:05.01elapsed 78%CPU (0avgtext+0avgdata 49924maxresident)k 7259inputs+0outputs (0major+66213minor)pagefaults 0swaps