From 19995bbac3d04e1bcc4346dc4791e573e332f217 Mon Sep 17 00:00:00 2001 From: udeved Date: Thu, 16 Feb 2017 19:39:39 +0100 Subject: [PATCH 1/8] buildiso: use new repo identifier file --- lib/util-iso.sh | 2 +- lib/util.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util-iso.sh b/lib/util-iso.sh index 072ac6a..1cde59d 100644 --- a/lib/util-iso.sh +++ b/lib/util-iso.sh @@ -435,7 +435,7 @@ make_syslinux() { } check_requirements(){ - [[ -f ${run_dir}/.buildiso ]] || die "%s is not a valid iso profiles directory!" "${run_dir}" + [[ -f ${run_dir}/repo_info ]] || die "%s is not a valid iso profiles directory!" "${run_dir}" if ! $(is_valid_arch_iso ${target_arch});then die "%s is not a valid arch!" "${target_arch}" fi diff --git a/lib/util.sh b/lib/util.sh index fd0c7fe..20a29cd 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -704,7 +704,7 @@ clean_dir(){ } write_repo_conf(){ - local repos=$(find $USER_HOME -type f -name ".buildiso") + local repos=$(find $USER_HOME -type f -name "repo_info") local path name [[ -z ${repos[@]} ]] && run_dir=${DATADIR}/iso-profiles && return 1 for r in ${repos[@]}; do From 9a50eaed940bdab1878cb9ddbbcf30648d370c06 Mon Sep 17 00:00:00 2001 From: udeved Date: Thu, 16 Feb 2017 22:06:39 +0100 Subject: [PATCH 2/8] util-iso-boot: only remove gpgkey if it exists --- lib/util-iso-boot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util-iso-boot.sh b/lib/util-iso-boot.sh index d4bddfb..bec3465 100644 --- a/lib/util-iso-boot.sh +++ b/lib/util-iso-boot.sh @@ -58,7 +58,7 @@ prepare_initramfs(){ if [[ -n ${gpgkey} ]]; then exec 17<&- fi - rm ${USERCONFDIR}/gpgkey + [[ -f ${USERCONFDIR}/gpgkey ]] && rm ${USERCONFDIR}/gpgkey } prepare_boot_extras(){ From a95e8d6fcc600f377d1b53fa83a1f85ef7e71de3 Mon Sep 17 00:00:00 2001 From: udeved Date: Thu, 16 Feb 2017 22:18:47 +0100 Subject: [PATCH 3/8] util-iso-boot: fix key file removal --- lib/util-iso-boot.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/util-iso-boot.sh b/lib/util-iso-boot.sh index bec3465..973b361 100644 --- a/lib/util-iso-boot.sh +++ b/lib/util-iso-boot.sh @@ -58,7 +58,9 @@ prepare_initramfs(){ if [[ -n ${gpgkey} ]]; then exec 17<&- fi - [[ -f ${USERCONFDIR}/gpgkey ]] && rm ${USERCONFDIR}/gpgkey + if [[ -f ${USERCONFDIR}/gpgkey ]]; then + rm ${USERCONFDIR}/gpgkey + fi } prepare_boot_extras(){ From 49412f7dae233aead7b587f7dbab7ff05a75f966 Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 19 Feb 2017 16:24:34 +0100 Subject: [PATCH 4/8] util-yaml: make netgroups url profile based --- lib/util-yaml.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/util-yaml.sh b/lib/util-yaml.sh index 0b5c31b..47ffd92 100644 --- a/lib/util-yaml.sh +++ b/lib/util-yaml.sh @@ -241,12 +241,11 @@ write_postcfg_conf(){ get_yaml(){ local args=() yaml if ${chrootcfg};then - args+=('chrootcfg') + args+=("${profile}/chrootcfg") else - args+=("packages") + args+=("${profile}/packages") fi args+=("${initsys}") - [[ ${edition} == 'sonar' ]] && args+=("${edition}") for arg in ${args[@]};do yaml=${yaml:-}${yaml:+-}${arg} done @@ -400,7 +399,7 @@ write_pacman_group_yaml(){ prepare_check(){ profile=$1 - edition=$(get_edition ${profile}) + local edition=$(get_edition ${profile}) profile_dir=${run_dir}/${edition}/${profile} check_profile load_profile_config "${profile_dir}/profile.conf" From 3d9cca313f77cd68130e2d294296c2d5178e3ac0 Mon Sep 17 00:00:00 2001 From: udeved Date: Sun, 19 Feb 2017 19:35:02 +0100 Subject: [PATCH 5/8] data: set iso list default to xfce --- data/iso.list.d/default.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/iso.list.d/default.list b/data/iso.list.d/default.list index 6e69584..8c4ca0c 100644 --- a/data/iso.list.d/default.list +++ b/data/iso.list.d/default.list @@ -1 +1 @@ -xfce-minimal +xfce From 00810ca7fc5a720a55a1985c5977a91049cc0db5 Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 20 Feb 2017 15:21:17 +0100 Subject: [PATCH 6/8] util: fix profiles dir detection --- lib/util.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/util.sh b/lib/util.sh index 20a29cd..2d42185 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -708,7 +708,7 @@ write_repo_conf(){ local path name [[ -z ${repos[@]} ]] && run_dir=${DATADIR}/iso-profiles && return 1 for r in ${repos[@]}; do - path=${r%/.*} + path=${r%/repo_info} name=${path##*/} echo "run_dir=$path" > ${USERCONFDIR}/$name.conf done From c89c9254a00d014a3120f68a0f7fcfb043ed8153 Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 20 Feb 2017 15:39:23 +0100 Subject: [PATCH 7/8] manjaro-tools.conf: remove profile_repo setting --- README.md | 3 --- data/manjaro-tools.conf | 3 --- lib/util.sh | 4 ++-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6d27b77..1ce7c51 100644 --- a/README.md +++ b/README.md @@ -88,9 +88,6 @@ overriding ################ buildiso ################ -# the name of the profiles directory -# profile_repo='manjaro-tools-iso-profiles' - # default iso build list; name without .list extension # build_list_iso=default diff --git a/data/manjaro-tools.conf b/data/manjaro-tools.conf index 5640758..b5db79c 100644 --- a/data/manjaro-tools.conf +++ b/data/manjaro-tools.conf @@ -37,9 +37,6 @@ ################ buildiso ################ -# the name of the profiles directory -# profile_repo='iso-profiles' - # default iso build list; name without .list extension # build_list_iso=default diff --git a/lib/util.sh b/lib/util.sh index 2d42185..d1ca1ef 100644 --- a/lib/util.sh +++ b/lib/util.sh @@ -295,6 +295,8 @@ init_buildiso(){ cache_dir_iso="${cache_dir}/iso" + profile_repo='iso-profiles' + ##### iso settings ##### [[ -z ${dist_release} ]] && dist_release=$(get_release) @@ -315,8 +317,6 @@ init_buildiso(){ [[ -z ${use_overlayfs} ]] && use_overlayfs='true' - [[ -z ${profile_repo} ]] && profile_repo='iso-profiles' - [[ -z ${gpgkey} ]] && gpgkey='' mhwd_repo="/opt/pkg" From 46717354ed77861fc90cdafae997cdaec8c45d9c Mon Sep 17 00:00:00 2001 From: udeved Date: Mon, 20 Feb 2017 20:22:21 +0100 Subject: [PATCH 8/8] Reset environment for builduser https://git.archlinux.org/devtools.git/commit/?id=76dec8507e2e767db07f967644ed8958f85cd5a2 --- bin/mkchrootpkg.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/mkchrootpkg.in b/bin/mkchrootpkg.in index 2ae5527..4a7ff9a 100644 --- a/bin/mkchrootpkg.in +++ b/bin/mkchrootpkg.in @@ -239,9 +239,10 @@ EOF # so no global variables _chrootbuild() { . /etc/profile - export HOME=/build - cd /startdir - sudo -u builduser makepkg "$@" +# export HOME=/build +# cd /startdir +# sudo -u builduser makepkg "$@" + sudo -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@" } _chrootnamcap() {