Compare commits

..

No commits in common. "6617436d700e6154a962891693cd976549c72560" and "5055b1b44c843ee90b8c2658f5bdba183b0df69a" have entirely different histories.

5 changed files with 2 additions and 43 deletions

View file

@ -1,8 +1,3 @@
1.5.4 (2024-10-28)
------------------
- do not generate apt sources.list entry if SUITE is empty
1.5.3 (2024-09-13) 1.5.3 (2024-09-13)
------------------ ------------------

View file

@ -433,5 +433,3 @@ Modes: unshare
Test: zombie-reaping Test: zombie-reaping
Modes: unshare Modes: unshare
Test: empty-suite

View file

@ -23,7 +23,7 @@
use strict; use strict;
use warnings; use warnings;
our $VERSION = '1.5.4'; our $VERSION = '1.5.3';
use English; use English;
use Getopt::Long; use Getopt::Long;
@ -5265,10 +5265,6 @@ sub get_sourceslist_by_suite {
my $compstr = shift; my $compstr = shift;
my $suite_by_vendor = shift; my $suite_by_vendor = shift;
if (!$suite) {
error "get_sourceslist_by_suite cannot operate with an empty suite";
}
my @debstable = keys %{ $suite_by_vendor->{'debian'} }; my @debstable = keys %{ $suite_by_vendor->{'debian'} };
my @ubuntustable = keys %{ $suite_by_vendor->{'ubuntu'} }; my @ubuntustable = keys %{ $suite_by_vendor->{'ubuntu'} };
my @tanglustable = keys %{ $suite_by_vendor->{'tanglu'} }; my @tanglustable = keys %{ $suite_by_vendor->{'tanglu'} };
@ -6529,10 +6525,6 @@ sub main() {
}; };
} }
} elsif ($arg =~ /:\/\//) { } elsif ($arg =~ /:\/\//) {
if (!$options->{suite}) {
error( "cannot create sources.list entry for URI"
. "with empty suite");
}
my $content = join ' ', my $content = join ' ',
( (
"deb$signedby", "deb$signedby",
@ -6588,9 +6580,6 @@ sub main() {
error "invalid mirror: $arg"; error "invalid mirror: $arg";
} }
} }
} elsif (!length($options->{suite})) {
warning
"cannot guess apt sources.list entry with empty suite name";
} else { } else {
my $sourceslist my $sourceslist
= get_sourceslist_by_suite($options->{suite}, = get_sourceslist_by_suite($options->{suite},
@ -8661,16 +8650,6 @@ Create a tarball for use with C<sbuild --chroot-mode=unshare>:
$ mmdebstrap --variant=buildd unstable ~/.cache/sbuild/unstable-amd64.tar $ mmdebstrap --variant=buildd unstable ~/.cache/sbuild/unstable-amd64.tar
Create a buildd tarball for EOL distro:
$ mmdebstrap --include=apt --variant=buildd --aptopt \
'Apt::Key::gpgvcommand "/usr/libexec/mmdebstrap/gpgvnoexpkeysig"' \
--aptopt='Acquire::Check-Valid-Until "false"' \
--keyring=/usr/share/keyrings/debian-archive-removed-keys.gpg \
--hook-dir=/usr/share/mmdebstrap/hooks/maybe-jessie-or-older \
jessie ~/.cache/sbuild/jessie-arm64.tar \
http://archive.debian.org/debian
Instead of a tarball, a squashfs image can be created: Instead of a tarball, a squashfs image can be created:
$ mmdebstrap unstable unstable-chroot.squashfs $ mmdebstrap unstable unstable-chroot.squashfs

View file

@ -109,7 +109,7 @@ if [ "{{ VARIANT }}" = "-" ]; then
rm /tmp/debian-{{ DIST }}-debootstrap/var/lib/systemd/catalog/database rm /tmp/debian-{{ DIST }}-debootstrap/var/lib/systemd/catalog/database
rm /tmp/debian-{{ DIST }}-mm/var/lib/systemd/catalog/database rm /tmp/debian-{{ DIST }}-mm/var/lib/systemd/catalog/database
case {{ DIST }} in oldstable | stable) case {{ DIST }} in oldstable | stable | testing)
cap=$(chroot /tmp/debian-{{ DIST }}-debootstrap /sbin/getcap /bin/ping) cap=$(chroot /tmp/debian-{{ DIST }}-debootstrap /sbin/getcap /bin/ping)
expected="/bin/ping cap_net_raw=ep" expected="/bin/ping cap_net_raw=ep"
if [ "$cap" != "$expected" ]; then if [ "$cap" != "$expected" ]; then

View file

@ -1,13 +0,0 @@
#!/bin/sh
set -eu
export LC_ALL=C.UTF-8
export SOURCE_DATE_EPOCH={{ SOURCE_DATE_EPOCH }}
trap "rm -f /tmp/debian-chroot.tar" EXIT INT TERM
{{ CMD }} --variant={{ VARIANT }} --verbose \
--setup-hook='echo deb {{ MIRROR }} {{ DIST }} main >> "$1"/etc/apt/sources.list' \
'' /tmp/debian-chroot.tar
cmp ./cache/mmdebstrap-{{ DIST }}-{{ VARIANT }}.tar /tmp/debian-chroot.tar \
|| diffoscope ./cache/mmdebstrap-{{ DIST }}-{{ VARIANT }}.tar /tmp/debian-chroot.tar