From a77a635016e0ed5bf8b3d5a10123404f6f58cf41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 13 May 2014 04:40:09 +0200 Subject: [PATCH] template flavor support (#828) Set TEMPLATE_FLAVOR variable to select template to build. That type will be appended to template name. Actual configuration can vary on template distribution, but generally config files with suffix "_${TEMPLATE_FLAVOR}" will be used. --- Makefile | 3 +++ qubeize_image | 4 +++- scripts_fedora/02_install_groups.sh | 15 +++++++++++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f057940..cd9b670 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,9 @@ endif #TODO: build template name somehow smarter TEMPLATE_NAME := $${DIST/fc/fedora-}-x64 +ifdef TEMPLATE_FLAVOR +TEMPLATE_NAME := $(TEMPLATE_NAME)-$(TEMPLATE_FLAVOR) +endif VERSION := $(shell cat version) TIMESTAMP := $(shell date -u +%Y%m%d%H%M) diff --git a/qubeize_image b/qubeize_image index 6f30e13..f84f3c0 100755 --- a/qubeize_image +++ b/qubeize_image @@ -67,7 +67,9 @@ echo "--> Creating the Apps Menu templates..." echo "--> Choosing appmenus whitelists..." rm -f appmenus -if [ -d "appmenus_$DIST" ]; then +if [ -d "appmenus_${DIST}_${TEMPLATE_FLAVOR}" ]; then + ln -s "appmenus_${DIST}_${TEMPLATE_FLAVOR}" appmenus +elif [ -d "appmenus_$DIST" ]; then ln -s "appmenus_$DIST" appmenus else ln -s "appmenus_generic" appmenus diff --git a/scripts_fedora/02_install_groups.sh b/scripts_fedora/02_install_groups.sh index 0b7a931..90e9914 100755 --- a/scripts_fedora/02_install_groups.sh +++ b/scripts_fedora/02_install_groups.sh @@ -1,12 +1,19 @@ #!/bin/sh -echo "--> Preparing environment..." -mount -t proc proc mnt/proc - -if [ -r "$SCRIPTSDIR/packages_${DIST}.list" ]; then +if [ -n "${TEMPLATE_FLAVOR}" ]; then + PKGLISTFILE="$SCRIPTSDIR/packages_${DIST}_${TEMPLATE_FLAVOR}.list" + if ! [ -r "${PKGLISTFILE}" ]; then + echo "ERROR: ${PKGLISTFILE} does not exists!" + exit 1 + fi +elif [ -r "$SCRIPTSDIR/packages_${DIST}.list" ]; then PKGLISTFILE="$SCRIPTSDIR/packages_${DIST}.list" else PKGLISTFILE="$SCRIPTSDIR/packages.list" fi + +echo "--> Preparing environment..." +mount -t proc proc mnt/proc + export PKGGROUPS=$(cat $PKGLISTFILE) export YUM0=$PWD/yum_repo_qubes