From 50f39a3b23aa077df3a69ff3904c571998fa5d1c Mon Sep 17 00:00:00 2001 From: fhdk Date: Sun, 18 Mar 2018 13:42:00 +0100 Subject: [PATCH 1/5] no_extra option added --- bin/buildiso.in | 5 ++++- lib/util-iso.sh | 7 ++++++- lib/util.sh | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/bin/buildiso.in b/bin/buildiso.in index 789cbaf..caa9817 100755 --- a/bin/buildiso.in +++ b/bin/buildiso.in @@ -111,6 +111,7 @@ display_settings(){ msg2 "images_only: %s" "${images_only}" msg2 "iso_only: %s" "${iso_only}" msg2 "persist: %s" "${persist}" + msg2 "extra: %s" "${extra}" msg "DIST SETTINGS:" msg2 "dist_name: %s" "${dist_name}" @@ -155,6 +156,7 @@ usage() { echo ' -g The gpg key for sfs signing' echo " [default: ${gpgkey}]" echo ' -m Set SquashFS image mode to persistence' + echo ' -n Build minimal if available (extra=false)' echo ' -c Disable clean work dir' echo ' -x Build images only' echo ' -z Generate iso only' @@ -169,7 +171,7 @@ usage() { orig_argv=("$0" "$@") -opts='p:a:b:r:t:k:i:g:czxmvqh' +opts='p:a:b:r:t:k:i:g:czxmnvqh' while getopts "${opts}" arg; do case "${arg}" in @@ -185,6 +187,7 @@ while getopts "${opts}" arg; do x) images_only=true ;; z) iso_only=true ;; m) persist=true ;; + n) no_extra=true ;; v) verbose=true ;; q) pretend=true ;; h|?) usage 0 ;; diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 0cc03bf..6c72001 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -254,13 +254,18 @@ make_iso() { gen_iso_fn(){ local vars=() name vars+=("${iso_name}") + + if ${no_extra}: then + vars+=("minimal") + fi + if ! ${chrootcfg};then [[ -n ${profile} ]] && vars+=("${profile}") fi [[ ${initsys} == 'openrc' ]] && vars+=("${initsys}") vars+=("${dist_release}") vars+=("${target_branch}") - vars+=("${target_arch}") + vars+=("${target_arch}") for n in ${vars[@]};do name=${name:-}${name:+-}${n} done diff --git a/lib/util.sh b/lib/util.sh index 9a1aae0..20833c3 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -379,6 +379,10 @@ load_profile_config(){ [[ -z ${smb_workgroup} ]] && smb_workgroup='' + if ${no_extra}; then + extra='false' + fi + basic='true' [[ -z ${extra} ]] && extra='false' From acb144f1e3b363ee4b07ad2409395f56a8c77c2c Mon Sep 17 00:00:00 2001 From: Frede H Date: Sun, 18 Mar 2018 13:48:45 +0100 Subject: [PATCH 2/5] Update buildiso.in removed extra from verbose --- bin/buildiso.in | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/buildiso.in b/bin/buildiso.in index caa9817..5391d21 100755 --- a/bin/buildiso.in +++ b/bin/buildiso.in @@ -111,7 +111,6 @@ display_settings(){ msg2 "images_only: %s" "${images_only}" msg2 "iso_only: %s" "${iso_only}" msg2 "persist: %s" "${persist}" - msg2 "extra: %s" "${extra}" msg "DIST SETTINGS:" msg2 "dist_name: %s" "${dist_name}" From 610a63117eef103631e019358525e0ea551cbed4 Mon Sep 17 00:00:00 2001 From: Frede H Date: Sun, 18 Mar 2018 14:09:22 +0100 Subject: [PATCH 3/5] Update util-iso.sh fix : to ; --- lib/util-iso.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 6c72001..5052c71 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -255,7 +255,7 @@ gen_iso_fn(){ local vars=() name vars+=("${iso_name}") - if ${no_extra}: then + if ${no_extra}; then vars+=("minimal") fi From c2933bb14380a9ea295873de50f41acbcaf8d153 Mon Sep 17 00:00:00 2001 From: Frede H Date: Sun, 18 Mar 2018 14:12:46 +0100 Subject: [PATCH 4/5] Update util-iso.sh moved the minimal addition xxx-${dist_release}-unstable-minimal-${arch} --- lib/util-iso.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 5052c71..018f298 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -253,18 +253,16 @@ make_iso() { gen_iso_fn(){ local vars=() name - vars+=("${iso_name}") - - if ${no_extra}; then - vars+=("minimal") - fi - + vars+=("${iso_name}") if ! ${chrootcfg};then [[ -n ${profile} ]] && vars+=("${profile}") fi [[ ${initsys} == 'openrc' ]] && vars+=("${initsys}") vars+=("${dist_release}") vars+=("${target_branch}") + if ${no_extra}; then + vars+=("minimal") + fi vars+=("${target_arch}") for n in ${vars[@]};do name=${name:-}${name:+-}${n} From 266b8db1576099b5745ede6b0c2f732944d9453e Mon Sep 17 00:00:00 2001 From: fhdk Date: Sun, 18 Mar 2018 18:11:17 +0100 Subject: [PATCH 5/5] -f build full_iso instead of -n no_extra --- bin/buildiso.in | 8 ++++---- lib/util-iso.sh | 2 +- lib/util.sh | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/buildiso.in b/bin/buildiso.in index 5391d21..2bf4236 100755 --- a/bin/buildiso.in +++ b/bin/buildiso.in @@ -155,8 +155,8 @@ usage() { echo ' -g The gpg key for sfs signing' echo " [default: ${gpgkey}]" echo ' -m Set SquashFS image mode to persistence' - echo ' -n Build minimal if available (extra=false)' echo ' -c Disable clean work dir' + echo ' -f Build full iso (extra=true)' echo ' -x Build images only' echo ' -z Generate iso only' echo ' Requires pre built images (-x)' @@ -170,7 +170,7 @@ usage() { orig_argv=("$0" "$@") -opts='p:a:b:r:t:k:i:g:czxmnvqh' +opts='p:a:b:r:t:k:i:g:cfzxmvqh' while getopts "${opts}" arg; do case "${arg}" in @@ -183,10 +183,10 @@ while getopts "${opts}" arg; do i) initsys="$OPTARG" ;; g) gpgkey="$OPTARG" ;; c) clean_first=false ;; + f) full_iso=true ;; x) images_only=true ;; z) iso_only=true ;; - m) persist=true ;; - n) no_extra=true ;; + m) persist=true ;; v) verbose=true ;; q) pretend=true ;; h|?) usage 0 ;; diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 018f298..b235217 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -260,7 +260,7 @@ gen_iso_fn(){ [[ ${initsys} == 'openrc' ]] && vars+=("${initsys}") vars+=("${dist_release}") vars+=("${target_branch}") - if ${no_extra}; then + if ! ${full_iso}; then vars+=("minimal") fi vars+=("${target_arch}") diff --git a/lib/util.sh b/lib/util.sh index 20833c3..1881b82 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -379,8 +379,8 @@ load_profile_config(){ [[ -z ${smb_workgroup} ]] && smb_workgroup='' - if ${no_extra}; then - extra='false' + if ${full_iso}; then + extra='true' fi basic='true'