From ff6be0b564adaa045ef43bb33fcee0900f668bb4 Mon Sep 17 00:00:00 2001 From: John Zimmermann Date: Thu, 15 Nov 2018 00:30:16 +0100 Subject: [PATCH 01/12] build-x86-images: add gnome image support --- build-x86-images.sh.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build-x86-images.sh.in b/build-x86-images.sh.in index aea0d00..7a34856 100644 --- a/build-x86-images.sh.in +++ b/build-x86-images.sh.in @@ -7,7 +7,7 @@ while getopts "a:b:hr:" opt; do case $opt in a) ARCH="$OPTARG";; b) IMAGE="$OPTARG";; - h) echo "${0#/*}: [-a arch] [-b base|e|xfce|mate|cinnamon|kde|lxde|lxqt] [-r repo]" >&2; exit 1;; + h) echo "${0#/*}: [-a arch] [-b base|e|xfce|mate|cinnamon|gnome|kde|lxde|lxqt] [-r repo]" >&2; exit 1;; r) REPO="-r $OPTARG $REPO";; esac done @@ -21,6 +21,7 @@ readonly E_IMG=void-live-${ARCH}-${DATE}-enlightenment.iso readonly XFCE_IMG=void-live-${ARCH}-${DATE}-xfce.iso readonly MATE_IMG=void-live-${ARCH}-${DATE}-mate.iso readonly CINNAMON_IMG=void-live-${ARCH}-${DATE}-cinnamon.iso +readonly GNOME_IMG=void-live-${ARCH}-${DATE}-gnome.iso readonly KDE_IMG=void-live-${ARCH}-${DATE}-kde.iso readonly LXDE_IMG=void-live-${ARCH}-${DATE}-lxde.iso readonly LXQT_IMG=void-live-${ARCH}-${DATE}-lxqt.iso @@ -33,6 +34,7 @@ readonly E_PKGS="$X_PKGS lxdm enlightenment terminology econnman udisks2 firefox readonly XFCE_PKGS="$X_PKGS lxdm xfce4 gnome-themes-standard gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr" readonly MATE_PKGS="$X_PKGS lxdm mate mate-extra gnome-keyring network-manager-applet gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr" readonly CINNAMON_PKGS="$X_PKGS lxdm cinnamon gnome-keyring colord gnome-terminal gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr" +readonly GNOME_PKGS="$X_PKGS gnome gnome-terminal firefox-esr" readonly KDE_PKGS="$X_PKGS kde5 konsole firefox dolphin" readonly LXDE_PKGS="$X_PKGS lxdm lxde gvfs-afc gvfs-mtp gvfs-smb udisks2 firefox-esr" readonly LXQT_PKGS="$X_PKGS lxdm lxqt gvfs-afc gvfs-mtp gvfs-smb udisks2 qupzilla" @@ -64,6 +66,13 @@ if [ -z "$IMAGE" -o "$IMAGE" = cinnamon ]; then ./mklive.sh -a $ARCH -o $CINNAMON_IMG -p "$CINNAMON_PKGS" ${REPO} $@ fi fi + +if [ -z "$IMAGE" -o "$IMAGE" = gnome ]; then + if [ ! -e $CINNAMON_IMG ]; then + ./mklive.sh -a $ARCH -o $GNOME_IMG -p "$GNOME_PKGS" ${REPO} $@ + fi +fi + if [ -z "$IMAGE" -o "$IMAGE" = lxde ]; then if [ ! -e $LXDE_IMG ]; then ./mklive.sh -a $ARCH -o $LXDE_IMG -p "$LXDE_PKGS" ${REPO} $@ From 7ca1cbc16876b4335f61fa61cf4cecbdc92ffc71 Mon Sep 17 00:00:00 2001 From: Noah Huppert Date: Mon, 1 Apr 2019 14:41:00 -0400 Subject: [PATCH 02/12] mklive: added -v kerver option Signed-off-by: Noah Huppert --- mklive.sh.in | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/mklive.sh.in b/mklive.sh.in index c568e45..b6ce1cd 100644 --- a/mklive.sh.in +++ b/mklive.sh.in @@ -81,6 +81,7 @@ directory if unset). -C "cmdline args" Add additional kernel command line arguments. -T "title" Modify the bootloader title. + -v linux Install a custom Linux version on ISO image (linux meta-package if unset). -K Do not remove builddir. The $PROGNAME script generates a live image of the Void Linux distribution. @@ -293,7 +294,7 @@ generate_iso_image() { # # main() # -while getopts "a:b:r:c:C:T:Kk:l:i:I:s:S:o:p:h" opt; do +while getopts "a:b:r:c:C:T:Kk:l:i:I:s:S:o:p:v:h" opt; do case $opt in a) BASE_ARCH="$OPTARG";; b) BASE_SYSTEM_PKG="$OPTARG";; @@ -310,6 +311,7 @@ while getopts "a:b:r:c:C:T:Kk:l:i:I:s:S:o:p:h" opt; do p) PACKAGE_LIST="$OPTARG";; C) BOOT_CMDLINE="$OPTARG";; T) BOOT_TITLE="$OPTARG";; + v) LINUX_VERSION="$OPTARG";; h) usage;; *) usage;; esac @@ -378,10 +380,26 @@ copy_void_keys "$VOIDHOSTDIR" XBPS_ARCH=$BASE_ARCH $XBPS_INSTALL_CMD -r "$ROOTFS" ${XBPS_REPOSITORY} -S XBPS_ARCH=$ARCH $XBPS_INSTALL_CMD -r "$VOIDHOSTDIR" ${XBPS_REPOSITORY} -S -_linux_series=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -x linux|head -1) +# Get linux version for ISO +# If linux version option specified use +if [ -n "$LINUX_VERSION" ]; then + if ! echo "$LINUX_VERSION" | grep "linux[0-9._]*"; then + die "-v option must be in format linux" + fi + + _linux_series="$LINUX_VERSION" + PACKAGE_LIST="$PACKAGE_LIST $LINUX_VERSION" +else # Otherwise find latest stable version from linux meta-package + _linux_series=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -x linux|head -1) +fi + _kver=$(XBPS_ARCH=$BASE_ARCH $XBPS_QUERY_CMD -r "$ROOTFS" ${XBPS_REPOSITORY:=-R} -p pkgver ${_linux_series}) KERNELVERSION=$($XBPS_UHELPER_CMD getpkgversion ${_kver}) +if [ "$?" -ne "0" ]; then + die "Failed to find kernel package version" +fi + : ${OUTPUT_FILE="void-live-${BASE_ARCH}-${KERNELVERSION}-$(date +%Y%m%d).iso"} print_step "Installing software to generate the image: ${REQUIRED_PKGS} ..." From a3f49d0c110a2202f18a9237a5acb3a3bfc6c1a6 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 6 Jun 2019 13:59:23 +0200 Subject: [PATCH 03/12] installer.sh.in: update my email address. Signed-off-by: Juan RP --- installer.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer.sh.in b/installer.sh.in index c007316..b5bab03 100644 --- a/installer.sh.in +++ b/installer.sh.in @@ -1,6 +1,6 @@ #!/bin/bash #- -# Copyright (c) 2012-2015 Juan Romero Pardines . +# Copyright (c) 2012-2015 Juan Romero Pardines . # 2012 Dave Elusive . # All rights reserved. # From f4458db134dbc77c78522c18ec19cd55f51d2238 Mon Sep 17 00:00:00 2001 From: q66 Date: Thu, 18 Jul 2019 21:06:17 +0200 Subject: [PATCH 04/12] installer.sh: fail validation for EFI systems without proper ESP Right now the installer will print an error dialog but mark the filesystems done anyway and march on, which will later result in a failed GRUB installation. --- installer.sh.in | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/installer.sh.in b/installer.sh.in index b5bab03..c2a6f11 100644 --- a/installer.sh.in +++ b/installer.sh.in @@ -952,6 +952,7 @@ menu_network() { validate_filesystems() { local mnts dev size fstype mntpt mkfs rootfound fmt local usrfound efi_system_partition + local bootdev=$(get_option BOOTLOADER) unset TARGETFS mnts=$(grep -E '^MOUNTPOINT.*' $CONF_FILE) @@ -985,10 +986,11 @@ the mount point for the root filesystem (/) has not yet been configured." ${MSGB DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} \ /usr mount point has been configured but is not supported, please remove it to continue." ${MSGBOXSIZE} return 1 - elif [ -n "$EFI_SYSTEM" -a -z "$efi_system_partition" ]; then + elif [ -n "$EFI_SYSTEM" -a "$bootdev" != "none" -a -z "$efi_system_partition" ]; then DIALOG --msgbox "${BOLD}${RED}ERROR:${RESET} \ The EFI System Partition has not yet been configured, please create it\n as FAT32, mountpoint /boot/efi and at least with 100MB of size." ${MSGBOXSIZE} + return 1 fi FILESYSTEMS_DONE=1 } @@ -1191,17 +1193,10 @@ enable_dhcpd() { } menu_install() { - # Don't continue if filesystems are not ready. - validate_filesystems || return 1 - ROOTPASSWORD_DONE="$(get_option ROOTPASSWORD)" BOOTLOADER_DONE="$(get_option BOOTLOADER)" - if [ -z "$FILESYSTEMS_DONE" ]; then - DIALOG --msgbox "${BOLD}Required filesystems were not configured, \ -please do so before starting the installation.${RESET}" ${MSGBOXSIZE} - return 1 - elif [ -z "$ROOTPASSWORD_DONE" ]; then + if [ -z "$ROOTPASSWORD_DONE" ]; then DIALOG --msgbox "${BOLD}The root password has not been configured, \ please do so before starting the installation.${RESET}" ${MSGBOXSIZE} return 1 @@ -1211,6 +1206,16 @@ configured, please do so before starting the installation.${RESET}" ${MSGBOXSIZE return 1 fi + # Validate filesystems after making sure bootloader is done, + # so that specific checks can be made based on the selection + validate_filesystems || return 1 + + if [ -z "$FILESYSTEMS_DONE" ]; then + DIALOG --msgbox "${BOLD}Required filesystems were not configured, \ +please do so before starting the installation.${RESET}" ${MSGBOXSIZE} + return 1 + fi + DIALOG --yesno "${BOLD}The following operations will be executed:${RESET}\n\n ${BOLD}${TARGETFS}${RESET}\n ${BOLD}${RED}WARNING: data on partitions will be COMPLETELY DESTROYED for new \ From de6cc17b0c780b116211ded995eedcd311ab27ef Mon Sep 17 00:00:00 2001 From: Robert Lowry Date: Wed, 23 Oct 2019 10:39:17 -0500 Subject: [PATCH 05/12] make docker use curl --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ea91666..a3056f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ FROM alpine:3.9 as stage0 ARG REPOSITORY=https://alpha.de.repo.voidlinux.org ARG ARCH=x86_64 COPY keys/* /target/var/db/xbps/keys/ -RUN apk add ca-certificates && \ - wget -O - ${REPOSITORY}/static/xbps-static-latest.$(uname -m)-musl.tar.xz | \ +RUN apk add ca-certificates curl && \ + curl ${REPOSITORY}/static/xbps-static-latest.$(uname -m)-musl.tar.xz | \ tar Jx && \ XBPS_ARCH=${ARCH} xbps-install.static -yMU \ --repository=${REPOSITORY}/current \ From b71d3f9c7b15615f22e9635cf887f94e0c39d05b Mon Sep 17 00:00:00 2001 From: Jeremy Jackins Date: Wed, 16 Oct 2019 16:29:47 -0700 Subject: [PATCH 06/12] installer.sh.in: add -f flag to mkfs.f2fs Without -f, mkfs.f2fs refuses to overwrite an existing filesystem, causing installation to fail. With this flag we match the behavior of the other filesystems. --- installer.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installer.sh.in b/installer.sh.in index b5bab03..de48959 100644 --- a/installer.sh.in +++ b/installer.sh.in @@ -1031,7 +1031,7 @@ failed to activate swap on $dev!\ncheck $LOG for errors." ${MSGBOXSIZE} ext2) MKFS="mke2fs -F"; modprobe ext2 >$LOG 2>&1;; ext3) MKFS="mke2fs -F -j"; modprobe ext3 >$LOG 2>&1;; ext4) MKFS="mke2fs -F -t ext4"; modprobe ext4 >$LOG 2>&1;; - f2fs) MKFS="mkfs.f2fs"; modprobe f2fs >$LOG 2>&1;; + f2fs) MKFS="mkfs.f2fs -f"; modprobe f2fs >$LOG 2>&1;; vfat) MKFS="mkfs.vfat -F32"; modprobe vfat >$LOG 2>&1;; xfs) MKFS="mkfs.xfs -f -i sparse=0"; modprobe xfs >$LOG 2>&1;; esac From a1352601ca0472bbee6b1f93d706c4f1abe73c32 Mon Sep 17 00:00:00 2001 From: Piraty Date: Wed, 23 Oct 2019 18:13:27 +0200 Subject: [PATCH 07/12] add dockerignore --- .dockerignore | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..7b23a0b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +xbps-cachedir-*/ +*.iso +*.img* +*.tar* From 8ad31657b76a72ccebd4141c9e07b9c091a5ef0b Mon Sep 17 00:00:00 2001 From: madjack Date: Sat, 6 Jul 2019 15:50:35 +0000 Subject: [PATCH 08/12] Fix additional packages not installed --- mkplatformfs.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkplatformfs.sh.in b/mkplatformfs.sh.in index dfd860c..69fbc92 100644 --- a/mkplatformfs.sh.in +++ b/mkplatformfs.sh.in @@ -135,7 +135,7 @@ set_target_arch_from_platform set_cachedir # Append any additional packages if they were requested -if [ -z "$EXTRA_PKGS" ] ; then +if [ -n "$EXTRA_PKGS" ] ; then PKGS="$PKGS $EXTRA_PKGS" fi From 163a923529da258d838ac6cf355aa98f3ed7b6d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Thu, 13 Jun 2019 22:46:13 +0200 Subject: [PATCH 09/12] Dockerfile: include spdx-licenses-list This is for linting license field on Travis. One can also customize image as simple as docker build "--build-arg=ADDINS=moreutils jq" --- Dockerfile | 3 ++- Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ea91666..027d89f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ FROM scratch as stage1 ARG REPOSITORY=https://alpha.de.repo.voidlinux.org ARG ARCH=x86_64 ARG BASEPKG=base-minimal +ARG ADDINS= COPY --from=stage0 /target / COPY keys/* /target/var/db/xbps/keys/ RUN xbps-reconfigure -a && \ @@ -25,7 +26,7 @@ RUN xbps-reconfigure -a && \ --repository=${REPOSITORY}/current \ --repository=${REPOSITORY}/current/musl \ -r /target \ - ${BASEPKG} + ${BASEPKG} ${ADDINS} # 3) configure and clean up the final image FROM scratch diff --git a/Makefile b/Makefile index 4d80243..debacde 100644 --- a/Makefile +++ b/Makefile @@ -99,6 +99,6 @@ masterdir-all-print: masterdir-all: $(ALL_MASTERDIRS) masterdir-%: - $(SUDO) docker build --build-arg REPOSITORY=$(XBPS_REPOSITORY) --build-arg ARCH=$* -t voidlinux/masterdir-$*:$(DATECODE) . + $(SUDO) docker build --build-arg REPOSITORY=$(XBPS_REPOSITORY) --build-arg ARCH=$* --build-arg ADDINS=spdx-licenses-list -t voidlinux/masterdir-$*:$(DATECODE) . .PHONY: clean dist rootfs-all-print rootfs-all platformfs-all-print platformfs-all pxe-all-print pxe-all masterdir-all-print masterdir-all masterdir-push-all From f19733f80fa3bf26e4f35ae4d9056288e687accb Mon Sep 17 00:00:00 2001 From: human Date: Sat, 1 Jun 2019 23:31:08 +0300 Subject: [PATCH 10/12] mklive: fix bashism --- mklive.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mklive.sh.in b/mklive.sh.in index a4dca79..8f47f8a 100644 --- a/mklive.sh.in +++ b/mklive.sh.in @@ -350,7 +350,7 @@ GRUB_DIR="$BOOT_DIR/grub" ISOLINUX_CFG="$ISOLINUX_DIR/isolinux.cfg" CURRENT_STEP=0 STEP_COUNT=9 -[ -n "${INCLUDE_DIRECTORY}" ] && ((STEP_COUNT=STEP_COUNT+1)) +[ -n "${INCLUDE_DIRECTORY}" ] && STEP_COUNT=$((STEP_COUNT+1)) : ${SYSLINUX_DATADIR:="$VOIDHOSTDIR"/usr/lib/syslinux} : ${GRUB_DATADIR:="$VOIDHOSTDIR"/usr/share/grub} From 56e7ba356577c5916c919dcce811792fd0118b4d Mon Sep 17 00:00:00 2001 From: Adeel Mujahid Date: Fri, 13 Sep 2019 12:44:27 +0300 Subject: [PATCH 11/12] Add /bin/dash as default command --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 027d89f..7471215 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,3 +33,5 @@ FROM scratch COPY --from=stage1 /target / RUN xbps-reconfigure -a && \ rm -r /var/cache/xbps + +CMD ["/bin/sh"] From 2ca28459d70cb5b928ba3f0d8af9bc02b130236c Mon Sep 17 00:00:00 2001 From: Piraty Date: Sun, 27 Oct 2019 17:03:48 +0100 Subject: [PATCH 12/12] build-x86-images.sh: fix image detection for new gnome flavor --- build-x86-images.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-x86-images.sh.in b/build-x86-images.sh.in index 7a34856..6f08673 100644 --- a/build-x86-images.sh.in +++ b/build-x86-images.sh.in @@ -68,7 +68,7 @@ if [ -z "$IMAGE" -o "$IMAGE" = cinnamon ]; then fi if [ -z "$IMAGE" -o "$IMAGE" = gnome ]; then - if [ ! -e $CINNAMON_IMG ]; then + if [ ! -e $GNOME_IMG ]; then ./mklive.sh -a $ARCH -o $GNOME_IMG -p "$GNOME_PKGS" ${REPO} $@ fi fi