Skip to content

Commit fee754d

Browse files
authored
Merge pull request #5 from JedMeister/buster-dev
Buster dev
2 parents 26f91ac + 2c02463 commit fee754d

File tree

4 files changed

+21
-16
lines changed

4 files changed

+21
-16
lines changed

pylib/installer.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def _install(self, packages, ignore_errors=[], extra_apt_args=[]):
132132
for packages in (high, regular):
133133
if packages:
134134
try:
135-
args = ['install', '--force-yes', '--assume-yes']
135+
args = ['install', '--assume-yes']
136136
args.extend(extra_apt_args)
137137
self.chroot.system("apt-get", *(args + packages))
138138
except executil.ExecError, e:
@@ -208,17 +208,23 @@ def filesize(path):
208208
def md5sum(path):
209209
return str(hashlib.md5(open(path, 'rb').read()).hexdigest())
210210

211+
def sha256sum(path):
212+
return str(hashlib.sha256(open(path, 'rb').read()).hexdigest())
213+
211214
index = []
212215
for package in os.listdir(packagedir):
213216
path = os.path.join(packagedir, package)
217+
# dl_path would best be calculated; but we don't have access to chroot_path here...
218+
dl_path = os.path.join('var/cache/apt/archives', package)
214219
if path.endswith('.deb'):
215220
control = debinfo.get_control_fields(path)
216221
for field in control.keys():
217222
index.append(field + ": " + control[field])
218223

219-
index.append("Filename: " + path)
224+
index.append("Filename: " + dl_path)
220225
index.append("Size: " + filesize(path))
221226
index.append("MD5sum: " + md5sum(path))
227+
index.append("SHA256: " + sha256sum(path))
222228
index.append("")
223229

224230
return index

share/bootstrap.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/make -f
2-
# Copyright (c) TurnKey GNU/Linux - http://www.turnkeylinux.org
2+
# Copyright (c) TurnKey GNU/Linux - https://www.turnkeylinux.org
33
#
44
# This file is part of Fab
55
#
@@ -28,7 +28,7 @@ POOL ?= $(FAB_PATH)/pools/$(CODENAME)
2828
export FAB_POOL_PATH = $(POOL)
2929

3030
FAB_ARCH = $(shell dpkg --print-architecture)
31-
DEBOOTSTRAP_SUITE ?= generic
31+
DEBOOTSTRAP_SUITE ?= turnkey
3232

3333
# build output path
3434
O ?= build
@@ -121,7 +121,6 @@ define bootstrap/body
121121
$(BSP)/exclude_spec.py $O/base.spec $O/required.spec > $O/base-excl-req.spec
122122
$(BSP)/debootstrap.py $(FAB_ARCH) $(DEBOOTSTRAP_SUITE) $O/bootstrap `pwd`/$O/repo $O/required.spec $O/base-excl-req.spec
123123

124-
fab-chroot $O/bootstrap --script $(BSP)/cleanup.sh
125124
fab-chroot $O/bootstrap 'echo "do_initrd = Yes" > /etc/kernel-img.conf'
126125
endef
127126

share/bootstrap/debootstrap.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
import os
1212
import sys
1313
from os.path import *
14-
15-
from executil import system
14+
import subprocess
1615

1716
def usage(s=None):
1817
if s: print >> sys.stderr, s
@@ -24,6 +23,7 @@ def get_packages(spec_file):
2423
for line in file(spec_file).readlines() ]
2524

2625
def main():
26+
2727
args = sys.argv[1:]
2828
if len(args) != 6:
2929
usage()
@@ -34,7 +34,7 @@ def main():
3434
os.environ["BASE_PACKAGES"] = " ".join(get_packages(base_spec))
3535
repo = abspath(repo)
3636

37-
system("debootstrap --arch %s %s %s file://%s" % (arch, suite, target, repo))
37+
subprocess.check_output(["debootstrap", "--arch", arch, suite, target, "file://"+repo])
3838

3939
if __name__=="__main__":
4040
main()

share/product.mk

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ UNIT_DIRS ?= unit.d
108108
CONF_SCRIPTS ?= conf.d
109109
PATCHES_PATH ?= patches.d
110110

111-
INITRAMFS_PACKAGES ?= busybox-initramfs casper
111+
INITRAMFS_PACKAGES ?= busybox live-boot
112112

113113
# build output path
114114
O ?= build
@@ -437,10 +437,10 @@ cdroot/deps ?= $(STAMPS_DIR)/root.patched $(_CDROOT)
437437
define cdroot/body
438438
if [ -e $O/cdroot ]; then rm -rf $O/cdroot; fi
439439
cp -a $(_CDROOT) $O/cdroot
440-
mkdir $O/cdroot/casper
440+
mkdir $O/cdroot/live
441441
if [ -d $(CDROOT_OVERLAY) ]; then fab-apply-overlay $(CDROOT_OVERLAY) $O/cdroot; fi
442442

443-
$(MKSQUASHFS) $O/root.patched $O/cdroot/casper/10root.squashfs $(MKSQUASHFS_OPTS)
443+
$(MKSQUASHFS) $O/root.patched $O/cdroot/live/10root.squashfs $(MKSQUASHFS_OPTS)
444444
endef
445445

446446
define run-genisoimage
@@ -475,15 +475,15 @@ define cdroot-dynamic/body
475475
cp $O/root.sandbox/usr/lib/syslinux/modules/bios/libcom32.c32 $O/cdroot/isolinux
476476
cp $O/root.sandbox/usr/lib/syslinux/modules/bios/vesamenu.c32 $O/cdroot/isolinux
477477
cp $O/root.sandbox/usr/lib/syslinux/modules/bios/gfxboot.c32 $O/cdroot/isolinux
478-
cp $O/root.sandbox/boot/$(shell basename $(shell readlink $O/root.sandbox/vmlinuz)) $O/cdroot/casper/vmlinuz
479-
cp $O/root.sandbox/boot/$(shell basename $(shell readlink $O/root.sandbox/initrd.img)) $O/cdroot/casper/initrd.gz
478+
cp $O/root.sandbox/boot/$(shell basename $(shell readlink $O/root.sandbox/vmlinuz)) $O/cdroot/live/vmlinuz
479+
cp $O/root.sandbox/boot/$(shell basename $(shell readlink $O/root.sandbox/initrd.img)) $O/cdroot/live/initrd.gz
480480

481-
rm -f $O/cdroot/casper/20sandbox.squashfs
481+
rm -f $O/cdroot/live/20sandbox.squashfs
482482
@if deck --isdirty $O/root.sandbox; then \
483483
$(call root-cleanup, $O/root.sandbox) \
484484
\
485485
get_last_level="deck --get-level=last $O/root.sandbox"; \
486-
output=$O/cdroot/casper/20sandbox.squashfs; \
486+
output=$O/cdroot/live/20sandbox.squashfs; \
487487
echo "mksquashfs \$$($$get_last_level) $$output"; \
488488
\
489489
last_level=$$($$get_last_level); \
@@ -504,7 +504,7 @@ define updated-initramfs/body
504504
rm -rf $O/product.iso
505505
$(root.patched/body)
506506
fab-install $$FAB_INSTALL_OPTS $O/root.patched $(INITRAMFS_PACKAGES)
507-
cp $O/root.patched/boot/$(shell basename $(shell readlink $O/root.patched/initrd.img)) $O/cdroot/casper/initrd.gz
507+
cp $O/root.patched/boot/$(shell basename $(shell readlink $O/root.patched/initrd.img)) $O/cdroot/live/initrd.gz
508508
$(run-genisoimage)
509509
endef
510510

0 commit comments

Comments
 (0)