Compare commits
3 commits
dfeb21cfe5
...
bda207af63
Author | SHA1 | Date | |
---|---|---|---|
|
bda207af63 | ||
d0c30c70bd | |||
1a4bb39aad |
3 changed files with 16 additions and 2 deletions
|
@ -5737,6 +5737,9 @@ sub main() {
|
||||||
if (!can_execute 'mke2fs', '-V') {
|
if (!can_execute 'mke2fs', '-V') {
|
||||||
error "need mke2fs for ext4 format";
|
error "need mke2fs for ext4 format";
|
||||||
}
|
}
|
||||||
|
require DynaLoader;
|
||||||
|
my $libarchive = DynaLoader::dl_load_file("libarchive.so.13", 0)
|
||||||
|
or error "need libarchive for ext4 format";
|
||||||
$blocksize = 4096;
|
$blocksize = 4096;
|
||||||
} elsif ($options->{format} eq 'squashfs') {
|
} elsif ($options->{format} eq 'squashfs') {
|
||||||
if (!can_execute 'tar2sqfs') {
|
if (!can_execute 'tar2sqfs') {
|
||||||
|
|
|
@ -235,26 +235,31 @@ case "$ARCHITECTURE" in
|
||||||
EFIIMG=bootx64.efi
|
EFIIMG=bootx64.efi
|
||||||
QEMUARCH=x86_64
|
QEMUARCH=x86_64
|
||||||
VMFPKG=ovmf
|
VMFPKG=ovmf
|
||||||
|
LINUXIMAGE=linux-image-amd64
|
||||||
;;
|
;;
|
||||||
arm64)
|
arm64)
|
||||||
EFIIMG=bootaa64.efi
|
EFIIMG=bootaa64.efi
|
||||||
QEMUARCH=aarch64
|
QEMUARCH=aarch64
|
||||||
VMFPKG=qemu-efi-aarch64
|
VMFPKG=qemu-efi-aarch64
|
||||||
|
LINUXIMAGE=linux-image-arm64
|
||||||
;;
|
;;
|
||||||
armhf)
|
armhf)
|
||||||
EFIIMG=bootarm.efi
|
EFIIMG=bootarm.efi
|
||||||
QEMUARCH=arm
|
QEMUARCH=arm
|
||||||
VMFPKG=qemu-efi-arm
|
VMFPKG=qemu-efi-arm
|
||||||
|
LINUXIMAGE=linux-image-armmp
|
||||||
;;
|
;;
|
||||||
i386)
|
i386)
|
||||||
EFIIMG=bootia32.efi
|
EFIIMG=bootia32.efi
|
||||||
QEMUARCH=i386
|
QEMUARCH=i386
|
||||||
VMFPKG=ovmf-ia32
|
VMFPKG=ovmf-ia32
|
||||||
|
LINUXIMAGE=linux-image-686-pae
|
||||||
;;
|
;;
|
||||||
riscv64)
|
riscv64)
|
||||||
EFIIMG=bootriscv64.efi
|
EFIIMG=bootriscv64.efi
|
||||||
QEMUARCH=riscv64
|
QEMUARCH=riscv64
|
||||||
VMFPKG=
|
VMFPKG=
|
||||||
|
LINUXIMAGE=linux-image-riscv64
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
die "unsupported architecture: $ARCHITECTURE"
|
die "unsupported architecture: $ARCHITECTURE"
|
||||||
|
@ -344,7 +349,7 @@ test "$RELEASE" = jessie &&
|
||||||
set -- "$@" --hook-dir=/usr/share/mmdebstrap/hooks/jessie-or-older
|
set -- "$@" --hook-dir=/usr/share/mmdebstrap/hooks/jessie-or-older
|
||||||
|
|
||||||
set -- "$@" \
|
set -- "$@" \
|
||||||
"--include=init,linux-image-$ARCHITECTURE,python3" \
|
"--include=init,$LINUXIMAGE,python3" \
|
||||||
'--customize-hook=echo host >"$1/etc/hostname"' \
|
'--customize-hook=echo host >"$1/etc/hostname"' \
|
||||||
'--customize-hook=echo 127.0.0.1 localhost host >"$1/etc/hosts"' \
|
'--customize-hook=echo 127.0.0.1 localhost host >"$1/etc/hosts"' \
|
||||||
'--customize-hook=passwd --root "$1" --delete root' \
|
'--customize-hook=passwd --root "$1" --delete root' \
|
||||||
|
|
|
@ -5,6 +5,12 @@ export SOURCE_DATE_EPOCH={{ SOURCE_DATE_EPOCH }}
|
||||||
|
|
||||||
tmpdir="$(mktemp -d)"
|
tmpdir="$(mktemp -d)"
|
||||||
chmod 755 "$tmpdir"
|
chmod 755 "$tmpdir"
|
||||||
debootstrap "$([ "{{ DIST }}" = oldstable ] && echo --no-merged-usr || echo --merged-usr)" --variant={{ VARIANT }} {{ DIST }} "$tmpdir" {{ MIRROR }}
|
ret=0
|
||||||
|
debootstrap "$([ "{{ DIST }}" = oldstable ] && echo --no-merged-usr || echo --merged-usr)" --variant={{ VARIANT }} {{ DIST }} "$tmpdir" {{ MIRROR }} || ret=$?
|
||||||
|
if [ "$ret" -ne 0 ]; then
|
||||||
|
echo "E: debootstrap failed, dumping $tmpdir/debootstrap/debootstrap.log"
|
||||||
|
cat "$tmpdir/debootstrap/debootstrap.log"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
tar --sort=name --mtime=@$SOURCE_DATE_EPOCH --clamp-mtime --numeric-owner --one-file-system --xattrs -C "$tmpdir" -c . > "./cache/debian-{{ DIST }}-{{ VARIANT }}.tar"
|
tar --sort=name --mtime=@$SOURCE_DATE_EPOCH --clamp-mtime --numeric-owner --one-file-system --xattrs -C "$tmpdir" -c . > "./cache/debian-{{ DIST }}-{{ VARIANT }}.tar"
|
||||||
rm -r "$tmpdir"
|
rm -r "$tmpdir"
|
||||||
|
|
Loading…
Reference in a new issue