stage3 tarball is now an xz archive

This commit is contained in:
Jörg Deckert 2021-02-05 12:27:13 +01:00
parent 3a70e8d398
commit dea00e187e
3 changed files with 15 additions and 9 deletions

4
.gitignore vendored
View File

@ -7,5 +7,5 @@ images/
*.cfg *.cfg
latest-stage3.txt latest-stage3.txt
portage-snapshot.tar.bz2 portage-snapshot.tar.bz2
stage3-*-latest.tar.bz2 stage3-*-latest.tar.xz
stage3-*.tar.bz2 stage3-*.tar.xz

View File

@ -132,22 +132,22 @@ $(PREPROOT): $(STAGE3) $(PORTAGE_DIR) $(CHROOT)/etc/fstab $(etc_portage) $(porta
COPY -L /etc/resolv.conf /etc/resolv.conf COPY -L /etc/resolv.conf /etc/resolv.conf
touch $(PREPROOT) touch $(PREPROOT)
stage3-$(VA_ARCH).tar.bz2: stage3-$(VA_ARCH).tar.xz:
@print You do not have a stage3 tarball. Consider \"make sync_stage3\" @print You do not have a stage3 tarball. Consider \"make sync_stage3\"
@exit 1 @exit 1
sync_stage3: sync_stage3:
fetch-stage3 --specialty=systemd --outfile=stage3-$(VA_ARCH).tar.bz2 $(VA_ARCH) fetch-stage3 --systemd --outfile=stage3-$(VA_ARCH).tar.xz $(VA_ARCH)
$(STAGE3): stage3-$(VA_ARCH).tar.bz2 configs/stage3-tarball-excludes $(STAGE3): stage3-$(VA_ARCH).tar.xz configs/stage3-tarball-excludes
mkdir -p $(CHROOT) mkdir -p $(CHROOT)
ifdef stage4-exists ifdef stage4-exists
@print Using stage4 tarball: `basename $(STAGE4_TARBALL)` @print Using stage4 tarball: `basename $(STAGE4_TARBALL)`
tar xpf "$(STAGE4_TARBALL)" -C $(CHROOT) tar xpf "$(STAGE4_TARBALL)" -C $(CHROOT)
else else
@print Using stage3 tarball @print Using stage3 tarball
tar xpf stage3-$(VA_ARCH).tar.bz2 -C $(CHROOT) --exclude-from=configs/stage3-tarball-excludes tar xpf stage3-$(VA_ARCH).tar.xz -C $(CHROOT) --exclude-from=configs/stage3-tarball-excludes
endif endif
rm -f $(CHROOT)/etc/localtime rm -f $(CHROOT)/etc/localtime
touch $(STAGE3) touch $(STAGE3)
@ -306,7 +306,7 @@ $(VMDK_IMAGE): $(RAW_IMAGE)
vmdk: $(VMDK_IMAGE) vmdk: $(VMDK_IMAGE)
$(STAGE4_TARBALL): $(PORTAGE_DIR) stage3-$(VA_ARCH).tar.bz2 appliances/$(APPLIANCE) configs/rsync-excludes $(STAGE4_TARBALL): $(PORTAGE_DIR) stage3-$(VA_ARCH).tar.xz appliances/$(APPLIANCE) configs/rsync-excludes
$(MAKE) $(STAGE3) $(MAKE) $(STAGE3)
$(MAKE) $(PREPROOT) $(MAKE) $(PREPROOT)
$(MAKE) $(SOFTWARE) $(MAKE) $(SOFTWARE)
@ -339,7 +339,7 @@ realclean: clean
distclean: distclean:
rm -f -- *.qcow *.img *.vmdk rm -f -- *.qcow *.img *.vmdk
rm -f stage3-*.tar.bz2 rm -f stage3-*.tar.xz
rm -f portage-snapshot.tar.bz2 rm -f portage-snapshot.tar.bz2
appliance-list: appliance-list:

View File

@ -9,9 +9,10 @@ import sys
from collections import namedtuple from collections import namedtuple
MIRROR = 'http://gentoo.osuosl.org/' MIRROR = 'http://gentoo.osuosl.org/'
Stage3 = namedtuple('Stage3', 'url cpu specialty minimal nomultilib size') Stage3 = namedtuple('Stage3', 'url cpu specialty minimal nomultilib systemd size')
MINIMAL = re.compile(r'[\+-]minimal-') MINIMAL = re.compile(r'[\+-]minimal-')
NOMULTILIB = re.compile(r'[\+-]nomultilib-') NOMULTILIB = re.compile(r'[\+-]nomultilib-')
SYSTEMD = re.compile(r'[\+-]systemd-')
def parse_args(): def parse_args():
@ -19,6 +20,7 @@ def parse_args():
parser.add_argument('--cpu', type=str, default=None) parser.add_argument('--cpu', type=str, default=None)
parser.add_argument('--specialty', type=str, default=None) parser.add_argument('--specialty', type=str, default=None)
parser.add_argument('--no-multilib', action='store_true', default=False) parser.add_argument('--no-multilib', action='store_true', default=False)
parser.add_argument('--systemd', action='store_true', default=False)
parser.add_argument('--minimal', action='store_true', default=False) parser.add_argument('--minimal', action='store_true', default=False)
parser.add_argument('--outfile', type=str, default=None) parser.add_argument('--outfile', type=str, default=None)
parser.add_argument('arch', type=str) parser.add_argument('arch', type=str)
@ -53,12 +55,15 @@ def get_manifest(arch, mirror=MIRROR):
cpu = rest.split('-', 2)[1] cpu = rest.split('-', 2)[1]
nomultilib = 'nomultilib-' in rest nomultilib = 'nomultilib-' in rest
nomultilib = bool(NOMULTILIB.search(rest)) nomultilib = bool(NOMULTILIB.search(rest))
systemd = 'systemd-' in rest
systemd = bool(SYSTEMD.search(rest))
minimal = bool(MINIMAL.search(rest)) minimal = bool(MINIMAL.search(rest))
stage3 = Stage3( stage3 = Stage3(
cpu=cpu, cpu=cpu,
minimal=minimal, minimal=minimal,
nomultilib=nomultilib, nomultilib=nomultilib,
systemd=systemd,
size=size, size=size,
specialty=specialty, specialty=specialty,
url=base_url + filename, url=base_url + filename,
@ -94,6 +99,7 @@ def main():
if not all([ if not all([
args.minimal == item.minimal, args.minimal == item.minimal,
args.no_multilib == item.nomultilib, args.no_multilib == item.nomultilib,
args.systemd == item.systemd,
args.specialty == item.specialty, args.specialty == item.specialty,
]): ]):
continue continue