Added make support for multiple architectures and did cleanup
This commit is contained in:
145
Makefile
145
Makefile
@@ -1,121 +1,40 @@
|
||||
#!/usr/bin/make -f
|
||||
# Change the default shell /bin/sh which does not implement 'source'
|
||||
# source is needed to work in a python virtualenv
|
||||
SHELL := /bin/bash
|
||||
#!/usr/bin/make
|
||||
.DEFAULT_GOAL := list
|
||||
|
||||
# remove 'download_extra' to build without third party software/dotfiles
|
||||
all: install_buildenv build
|
||||
list: #Shows this list
|
||||
@echo The following options are available
|
||||
@grep '^[^#[:space:]].*:' Makefile | grep -v := | sed -e "s/:[^|]*#/: /g"
|
||||
|
||||
download_extra:
|
||||
make -f Makefile.extra
|
||||
|
||||
install_buildenv:
|
||||
# Install packages required to build the image
|
||||
install_buildenv: # Install packages required to build the image
|
||||
sudo apt -y install live-build make build-essential wget git unzip colordiff apt-transport-https rename ovmf rsync python3-venv gnupg apt-utils cpio
|
||||
|
||||
##############################
|
||||
download_extra: #For downloading extra's for iso (not needed/tested)
|
||||
make -f Makefile.extra
|
||||
|
||||
# clear all caches, only required when changing the mirrors/architecture config
|
||||
clean:
|
||||
sudo lb clean --all
|
||||
#Add 'download_extra' to build without third party software/dotfiles (not needed/tested)
|
||||
build: install_buildenv build_amd64 build_i386 clean_env #Runs build for all architectures
|
||||
|
||||
build_amd64: #Build iso for amd64
|
||||
rm -f Custom-image-amd64.iso
|
||||
sudo TargetArch=amd64 lb clean --all
|
||||
sudo TargetArch=amd64 lb config
|
||||
sudo TargetArch=amd64 lb build
|
||||
mv live-image-amd64.hybrid.iso Custom-image-amd64.iso
|
||||
|
||||
build_i386: # Build iso for i386
|
||||
rm -f Custom-image-i386.iso
|
||||
sudo TargetArch=i386 lb clean --all
|
||||
sudo TargetArch=i386 lb config
|
||||
sudo TargetArch=i386 lb build
|
||||
mv live-image-i386.hybrid.iso Custom-image-i386.iso
|
||||
|
||||
clean: clean_env clean_iso #Clear all caches, archives, and isos
|
||||
|
||||
clean_env: #Clear all caches and archives
|
||||
sudo TargetArch=amd64 lb clean --all
|
||||
sudo TargetArch=i386 lb clean --all
|
||||
make -f Makefile.extra clean
|
||||
|
||||
bump_version:
|
||||
@last_tag=$$(git tag | tail -n1); \
|
||||
echo "Please set version to $$last_tag in Makefile doc/md/conf.py config/bootloaders/grub-pc/live-theme/theme.txt config/bootloaders/isolinux/live.cfg.in config/bootloaders/isolinux/menu.cfg auto/config doc/md/download-and-installation.md doc/md/index.md"
|
||||
|
||||
build:
|
||||
# Build the live system/ISO image
|
||||
sudo lb clean --all
|
||||
sudo lb config
|
||||
sudo lb build
|
||||
|
||||
##############################
|
||||
|
||||
release: checksums sign_checksums release_archive
|
||||
|
||||
checksums:
|
||||
# Generate checksums of the resulting ISO image
|
||||
@mkdir -p iso/
|
||||
mv *.iso iso/
|
||||
last_tag=$$(git tag | tail -n1); \
|
||||
cd iso/; \
|
||||
rename "s/live-image/dlc-$$last_tag-debian-bullseye/" *; \
|
||||
sha512sum *.iso > SHA512SUMS; \
|
||||
|
||||
# the signing key must be present and loaded on the build machine
|
||||
# gpg --export-secret-keys --armor $MAINTAINER_EMAIL > $MAINTAINER_EMAIL.key
|
||||
# rsync -avzP $MAINTAINER_EMAIL.key $BUILD_HOST:
|
||||
# ssh -t $BUILD_HOST gpg --import $MAINTAINER_EMAIL.key
|
||||
sign_checksums:
|
||||
# Sign checksums with a GPG private key
|
||||
cd iso; \
|
||||
gpg --detach-sign --armor SHA512SUMS; \
|
||||
mv SHA512SUMS.asc SHA512SUMS.sign
|
||||
# Export the public GPG key used for signing
|
||||
gpg --export --armor nodiscc@gmail.com > dlc-release.key
|
||||
|
||||
release_archive:
|
||||
git archive --format=zip -9 HEAD -o $$(basename $$PWD)-$$(git rev-parse HEAD).zip
|
||||
|
||||
################################
|
||||
|
||||
tests: test_imagesize test_kvm_bios test_kvm_uefi
|
||||
|
||||
test_imagesize:
|
||||
@size=$$(du -b iso/*.iso | cut -f 1); \
|
||||
echo "[INFO] ISO image size: $$size bytes"; \
|
||||
if [[ "$$size" -gt 2147483648 ]]; then \
|
||||
echo '[WARNING] ISO image size is larger than 2GB!'; \
|
||||
fi
|
||||
|
||||
# iso image must be downloaded from the build machine beforehand
|
||||
# rsync -avzP $BUILD_HOST:/var/debian-live-config/debian-live-config/iso/ ./
|
||||
test_kvm_bios:
|
||||
# Run the resulting image in KVM/virt-manager (legacy BIOS mode)
|
||||
virt-install --name dlc-test --boot cdrom --video virtio --disk path=$$PWD/dlc-test-disk0.qcow2,format=qcow2,size=20,device=disk,bus=virtio,cache=none --cdrom 'iso/dlc-3.0.0-debian-bullseye-amd64.hybrid.iso' --memory 4096 --vcpu 2
|
||||
virsh destroy dlc-test
|
||||
virsh undefine dlc-test
|
||||
rm -f $$PWD/dlc-test-disk0.qcow2
|
||||
|
||||
test_kvm_uefi:
|
||||
# Run the resulting image in KVM/virt-manager (UEFI mode)
|
||||
# UEFI support must be enabled in QEMU config for EFI install tests https://wiki.archlinux.org/index.php/Libvirt#UEFI_Support (/usr/share/OVMF/*.fd)
|
||||
virt-install --name dlc-test --boot loader=/usr/share/OVMF/OVMF_CODE.fd --video virtio --disk path=$$PWD/dlc-test-disk0.qcow2,format=qcow2,size=20,device=disk,bus=virtio,cache=none --cdrom 'iso/dlc-3.0.0-debian-bullseye-amd64.hybrid.iso' --memory 4096 --vcpu 2
|
||||
virsh destroy dlc-test
|
||||
virsh undefine dlc-test
|
||||
rm -f $$PWD/dlc-test-disk0.qcow2
|
||||
|
||||
#################################
|
||||
|
||||
# Update TODO.md by fetching issues from the main gitea instance API
|
||||
# requirements: sudo apt install git jq
|
||||
# gitea-cli config defined in ~/.config/gitearc
|
||||
update_todo:
|
||||
git clone https://github.com/bashup/gitea-cli gitea-cli
|
||||
echo '<!-- This file is automatically generated by "make update_todo" -->' >| doc/md/TODO.md
|
||||
echo -e "\n### nodiscc/debian-live-config\n" >> doc/md/TODO.md; \
|
||||
./gitea-cli/bin/gitea issues baron/debian-live-config | jq -r '.[] | "- #\(.number) - \(.title) - **`\(.milestone.title // "-")`** `\(.labels | map(.name) | join(","))`"' | sed 's/ - `null`//' >> doc/md/TODO.md; \
|
||||
rm -rf gitea-cli
|
||||
|
||||
doc: install_dev_docs doc_md doc_html
|
||||
|
||||
# install documentation generator (sphinx + markdown + theme)
|
||||
install_dev_docs:
|
||||
python3 -m venv .venv/
|
||||
source .venv/bin/activate && pip3 install sphinx recommonmark sphinx_rtd_theme
|
||||
|
||||
doc_md:
|
||||
cp README.md doc/md/index.md
|
||||
cp CHANGELOG.md doc/md/
|
||||
cp LICENSE doc/md/LICENSE.md
|
||||
sed -i 's|doc/md/||g' doc/md/*.md
|
||||
./doc/gen_package_lists.py
|
||||
|
||||
# HTML documentation generation (sphinx-build --help)
|
||||
SPHINXOPTS ?=
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SOURCEDIR = doc/md # répertoire source (markdown)
|
||||
BUILDDIR = doc/html # répertoire destination (html)
|
||||
doc_html:
|
||||
source .venv/bin/activate && sphinx-build -c doc/md -b html doc/md doc/html
|
||||
clean_iso: #Removes genereated iso's
|
||||
rm -f Custom-image-amd64.iso Custom-image-i386.iso
|
||||
|
||||
@@ -10,7 +10,6 @@ clean:
|
||||
clean_all: clean
|
||||
rm -rvf cache/downloads/
|
||||
|
||||
|
||||
download_extra: clean
|
||||
# TODO use the APT repository at build time, but disable it in the final chroot/image
|
||||
# TODO file ITPs on bugs.debian.org
|
||||
|
||||
20
auto/config
20
auto/config
@@ -2,10 +2,12 @@
|
||||
# live-build configuration script
|
||||
# see 'man lb config'
|
||||
|
||||
#Add "linux-headers" to linux-packages when using nvidia driver
|
||||
|
||||
lb config noauto \
|
||||
--apt-recommends false \
|
||||
--apt-indices false \
|
||||
--architectures amd64 \
|
||||
--architectures $TargetArch \
|
||||
--archive-areas 'main contrib non-free' \
|
||||
--backports true \
|
||||
--security true \
|
||||
@@ -16,7 +18,7 @@ lb config noauto \
|
||||
--checksums sha256 \
|
||||
--clean \
|
||||
--debconf-frontend noninteractive \
|
||||
--debian-installer false \
|
||||
--debian-installer none \
|
||||
--debian-installer-distribution bullseye \
|
||||
--debian-installer-gui false \
|
||||
--debootstrap-options "--include=apt-transport-https,ca-certificates,openssl" \
|
||||
@@ -24,11 +26,11 @@ lb config noauto \
|
||||
--firmware-binary true \
|
||||
--firmware-chroot true \
|
||||
--initramfs live-boot \
|
||||
--iso-publisher dlc \
|
||||
--iso-volume dlc-3.0.0 \
|
||||
--linux-packages "linux-image linux-headers" \
|
||||
--iso-publisher brammp \
|
||||
--iso-volume Gui-minimal-testing \
|
||||
--linux-packages "linux-image" \
|
||||
--bootappend-live "boot=live config" \
|
||||
--memtest memtest86+ \
|
||||
--win32-loader true \
|
||||
--apt-http-proxy "http://192.168.2.83:80"
|
||||
"${@}"
|
||||
--memtest none \
|
||||
--win32-loader false \
|
||||
--apt-http-proxy "http://192.168.2.83:80" \
|
||||
--zsync false
|
||||
@@ -1,7 +1,7 @@
|
||||
desktop-image: "../splash.png"
|
||||
title-color: "#ffffff"
|
||||
title-font: "DejaVu Sans Bold 16"
|
||||
title-text: "debian-live-config 3.0.0 (Debian 11.1.0)"
|
||||
title-text: "Gui-minimal-testing"
|
||||
message-font: "Unifont Regular 16"
|
||||
terminal-font: "Unifont Regular 16"
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
menu hshift 0
|
||||
menu width 82
|
||||
|
||||
menu title debian-live-config 3.0.0 (Debian 11.1.0)
|
||||
menu title Gui-minimal-testing
|
||||
include stdmenu.cfg
|
||||
|
||||
label live-amd64
|
||||
menu label ^Live system (amd64) (English)
|
||||
menu label ^Live system
|
||||
menu default
|
||||
linux /live/vmlinuz
|
||||
initrd /live/initrd.img
|
||||
@@ -13,7 +13,6 @@ label live-amd64
|
||||
|
||||
label live-amd64-r
|
||||
menu label ^Live system (ToRam)
|
||||
menu default
|
||||
linux /live/vmlinuz
|
||||
initrd /live/initrd.img
|
||||
append boot=live config toram locales=en_US.UTF-8
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#!/bin/bash
|
||||
echo "I: running $0"
|
||||
apt -y purge exim4-base nfs-common rpcbind
|
||||
apt -y purge exim4-base nfs-common rpcbind firmware-netronome grub*
|
||||
|
||||
if [ -f "/usr/bin/x86_64" ] ; then
|
||||
apt purge $(apt list --installed |grep linux-image |grep -v bpo| sed 's#/.*##') -y
|
||||
fi
|
||||
@@ -2,7 +2,7 @@
|
||||
echo "I: running $0"
|
||||
|
||||
disabled_services="avahi-daemon.service openvpn.service rsync.service ssh.service nmbd.service smbd.service libvirtd.service libvirt-guests.service"
|
||||
enabled_services="bumblebeed.service cups-browsed.service bluetooth.service cups.service fancontrol.service laptop-mode.service ntp.service plymouth.service preload.service smartmontools.service rsyslog.service lm-sensors.service hddtemp.service haveged.service"
|
||||
enabled_services="bluetooth.service fancontrol.service laptop-mode.service ntp.service preload.service smartmontools.service rsyslog.service lm-sensors.service hddtemp.service haveged.service"
|
||||
|
||||
for service in $disabled_services; do
|
||||
echo "Disabling $service"
|
||||
|
||||
@@ -3,20 +3,20 @@
|
||||
##### Kernel / firmware
|
||||
|
||||
Package: linux-image-*
|
||||
Pin: release a=bullseye-backports
|
||||
Pin: release a=bullseye-backports , b=amd64
|
||||
Pin-Priority: 600
|
||||
|
||||
Package: linux-headers-*
|
||||
Pin: release a=bullseye-backports
|
||||
Pin: release a=bullseye-backports , b=amd64
|
||||
Pin-Priority: 600
|
||||
|
||||
Package: firmware-*
|
||||
Pin: release a=bullseye-backports
|
||||
Pin: release a=bullseye-backports , b=amd64
|
||||
Pin-Priority: 600
|
||||
|
||||
##### NVIDIA proprietary drivers
|
||||
|
||||
Package: nvidia-driver
|
||||
Pin: release a=bullseye-backports
|
||||
Pin: release a=bullseye-backports , b=amd64
|
||||
Pin-Priority: 600
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
[greeter]
|
||||
background = /usr/share/backgrounds/homeworld-darker-3840x2160.png
|
||||
user-background = false
|
||||
theme-name = Arc-Darker
|
||||
icon-theme-name = Papirus
|
||||
theme-name = Adwaita-dark
|
||||
icon-theme-name = Adwaita
|
||||
font-name = Roboto
|
||||
xft-antialias = true
|
||||
#xft-dpi=
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
! Packages Priority important
|
||||
|
||||
#For updating kernel to Backport
|
||||
#if ARCHITECTURES amd64
|
||||
linux-image-amd64
|
||||
#endif
|
||||
|
||||
@@ -10,8 +10,8 @@ whiptail
|
||||
moreutils
|
||||
less
|
||||
#Section: Packaging
|
||||
debhelper
|
||||
equivs
|
||||
#debhelper
|
||||
#equivs
|
||||
checkinstall
|
||||
debconf-utils
|
||||
lintian
|
||||
|
||||
@@ -57,7 +57,7 @@ colortail
|
||||
#Description: lightdm
|
||||
lightdm
|
||||
lightdm-gtk-greeter
|
||||
light-locker
|
||||
#light-locker
|
||||
|
||||
#Section: Boot screen
|
||||
#plymouth
|
||||
@@ -91,10 +91,10 @@ xfonts-75dpi
|
||||
xfonts-100dpi
|
||||
xserver-xorg
|
||||
xserver-xorg-input-all
|
||||
xserver-xorg-input-wacom
|
||||
xserver-xorg-input-aiptek
|
||||
xserver-xorg-input-elographics
|
||||
xserver-xorg-input-joystick
|
||||
#xserver-xorg-input-wacom
|
||||
#xserver-xorg-input-aiptek
|
||||
#xserver-xorg-input-elographics
|
||||
#xserver-xorg-input-joystick
|
||||
xserver-xorg-input-kbd
|
||||
xserver-xorg-input-mouse
|
||||
xserver-xorg-input-mutouch
|
||||
@@ -109,7 +109,7 @@ hwdata
|
||||
#nvidia-driver
|
||||
##if ARCHITECTURES amd64
|
||||
#linux-headers-amd64
|
||||
#endif
|
||||
##endif
|
||||
##if ARCHITECTURES i386
|
||||
#linux-headers-686:i386
|
||||
##endif
|
||||
@@ -120,13 +120,12 @@ hwdata
|
||||
|
||||
#Section: Kernel/boot/init
|
||||
systemd
|
||||
os-prober
|
||||
#os-prober
|
||||
initramfs-tools
|
||||
console-setup
|
||||
#console-setup
|
||||
user-setup
|
||||
libpam-systemd
|
||||
|
||||
|
||||
#Section: Firmwares
|
||||
firmware-linux-free
|
||||
firmware-linux-nonfree
|
||||
|
||||
Reference in New Issue
Block a user