Compare commits
	
		
			50 Commits
		
	
	
		
			0.32.2
			...
			artools/0.
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| ac672b1623 | |||
| d3af81c7ec | |||
| 5a7ddda12c | |||
| 17f079f4d5 | |||
| ebb601d90f | |||
| bd5e8b403a | |||
| ce17e42320 | |||
| 885f852ca8 | |||
| 3bb00c8c69 | |||
| 5862982bbb | |||
| 608c929d4f | |||
| 35bb702c78 | |||
| 1cebf87b28 | |||
| 3d6d8cc255 | |||
| 6c98f044af | |||
| a342de8b30 | |||
| de2bf041ae | |||
| 8c58b3fa26 | |||
| 85f1e1208b | |||
| 1b7d3b6fdd | |||
| 1d2d57e795 | |||
| bec37d8236 | |||
| 3830037e44 | |||
| acea4e1deb | |||
| 87a95d998e | |||
| 38c0528697 | |||
| e8708ce0c5 | |||
| 41947d9367 | |||
| 858a5f7aed | |||
| 718e2cfc7f | |||
| e3c9a47c97 | |||
| 7dd3f27c12 | |||
| 6d5235a115 | |||
| b14524dca4 | |||
| 5faa5ef599 | |||
| 334a2c2487 | |||
| 2bc6150221 | |||
| 645563b0c5 | |||
| fb8da6fedd | |||
| c31acae021 | |||
| ca1082a8e5 | |||
| 6f12273730 | |||
| b9b15f549d | |||
| c81b643fb2 | |||
| 4362707456 | |||
| 5d8cdf19fe | |||
| 7084a086fa | |||
| 8744bb5355 | |||
| 75747a7d9d | |||
| 75d1e7ce2a | 
| @@ -14,9 +14,9 @@ | ||||
| # default arch to build | ||||
| # ARCH=$(uname -m) | ||||
|  | ||||
| # default pacman.conf to include | ||||
| # possible values: {stable,gremlins,goblins} | ||||
| # STABILITY="stable" | ||||
| # default pacman.conf repos to include | ||||
| # possible values: {world,galaxy}{-gremlins,-goblins} | ||||
| # REPO="world" | ||||
|  | ||||
| # default iso storage directory | ||||
| # ISO_POOL="${WORKSPACE_DIR}/iso" | ||||
|   | ||||
| @@ -1,115 +0,0 @@ | ||||
| # | ||||
| # /etc/pacman.conf | ||||
| # | ||||
| # See the pacman.conf(5) manpage for option and repository directives | ||||
|  | ||||
| # | ||||
| # GENERAL OPTIONS | ||||
| # | ||||
| [options] | ||||
| # The following paths are commented out with their default values listed. | ||||
| # If you wish to use different paths, uncomment and update the paths. | ||||
| #RootDir     = / | ||||
| #DBPath      = /var/lib/pacman/ | ||||
| #CacheDir    = /var/cache/pacman/pkg/ | ||||
| #LogFile     = /var/log/pacman.log | ||||
| #GPGDir      = /etc/pacman.d/gnupg/ | ||||
| #HookDir     = /etc/pacman.d/hooks/ | ||||
| HoldPkg     = pacman glibc | ||||
| #XferCommand = /usr/bin/curl -L -C - -f -o %o %u | ||||
| #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u | ||||
| #CleanMethod = KeepInstalled | ||||
| Architecture = auto | ||||
|  | ||||
| # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup | ||||
| #IgnorePkg   = | ||||
| #IgnoreGroup = | ||||
|  | ||||
| #NoUpgrade   = | ||||
| #NoExtract   = | ||||
|  | ||||
| # Misc options | ||||
| #UseSyslog | ||||
| Color | ||||
| #NoProgressBar | ||||
| CheckSpace | ||||
| VerbosePkgLists | ||||
| ParallelDownloads = 10 | ||||
|  | ||||
| # By default, pacman accepts packages signed by keys that its local keyring | ||||
| # trusts (see pacman-key and its man page), as well as unsigned packages. | ||||
| SigLevel    = Required DatabaseOptional | ||||
| LocalFileSigLevel = Optional | ||||
| #RemoteFileSigLevel = Required | ||||
|  | ||||
| # NOTE: You must run `pacman-key --init` before first using pacman; the local | ||||
| # keyring can then be populated with the keys of all official Artix Linux | ||||
| # packagers with `pacman-key --populate artix`. | ||||
|  | ||||
| # | ||||
| # REPOSITORIES | ||||
| #   - can be defined here or included from another file | ||||
| #   - pacman will search repositories in the order defined here | ||||
| #   - local/custom mirrors can be added here or in separate files | ||||
| #   - repositories listed first will take precedence when packages | ||||
| #     have identical names, regardless of version number | ||||
| #   - URLs will have $repo replaced by the name of the current repo | ||||
| #   - URLs will have $arch replaced by the name of the architecture | ||||
| # | ||||
| # Repository entries are of the format: | ||||
| #       [repo-name] | ||||
| #       Server = ServerName | ||||
| #       Include = IncludePath | ||||
| # | ||||
| # The header [repo-name] is crucial - it must be present and | ||||
| # uncommented to enable the repo. | ||||
| # | ||||
|  | ||||
| # The gremlins repositories are disabled by default. To enable, uncomment the | ||||
| # repo name header and Include lines. You can add preferred servers immediately | ||||
| # after the header, and they will be used before the default mirrors. | ||||
|  | ||||
| [system-goblins] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [system-gremlins] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [system] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [world-goblins] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [world-gremlins] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [world] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [galaxy-goblins] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [galaxy-gremlins] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [galaxy] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| # If you want to run 32 bit applications on your x86_64 system, | ||||
| # enable the lib32 repositories as required here. | ||||
|  | ||||
| # [lib32-goblins] | ||||
| # Include = /etc/pacman.d/mirrorlist | ||||
| # | ||||
| # [lib32-gremlins] | ||||
| # Include = /etc/pacman.d/mirrorlist | ||||
| # | ||||
| # [lib32] | ||||
| # Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| # An example of a custom package repository.  See the pacman manpage for | ||||
| # tips on creating your own repositories. | ||||
| #[custom] | ||||
| #SigLevel = Optional TrustAll | ||||
| #Server = file:///home/custompkgs | ||||
| @@ -1,103 +0,0 @@ | ||||
| # | ||||
| # /etc/pacman.conf | ||||
| # | ||||
| # See the pacman.conf(5) manpage for option and repository directives | ||||
|  | ||||
| # | ||||
| # GENERAL OPTIONS | ||||
| # | ||||
| [options] | ||||
| # The following paths are commented out with their default values listed. | ||||
| # If you wish to use different paths, uncomment and update the paths. | ||||
| #RootDir     = / | ||||
| #DBPath      = /var/lib/pacman/ | ||||
| #CacheDir    = /var/cache/pacman/pkg/ | ||||
| #LogFile     = /var/log/pacman.log | ||||
| #GPGDir      = /etc/pacman.d/gnupg/ | ||||
| #HookDir     = /etc/pacman.d/hooks/ | ||||
| HoldPkg     = pacman glibc | ||||
| #XferCommand = /usr/bin/curl -L -C - -f -o %o %u | ||||
| #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u | ||||
| #CleanMethod = KeepInstalled | ||||
| Architecture = auto | ||||
|  | ||||
| # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup | ||||
| #IgnorePkg   = | ||||
| #IgnoreGroup = | ||||
|  | ||||
| #NoUpgrade   = | ||||
| #NoExtract   = | ||||
|  | ||||
| # Misc options | ||||
| #UseSyslog | ||||
| Color | ||||
| #NoProgressBar | ||||
| CheckSpace | ||||
| VerbosePkgLists | ||||
| ParallelDownloads = 10 | ||||
|  | ||||
| # By default, pacman accepts packages signed by keys that its local keyring | ||||
| # trusts (see pacman-key and its man page), as well as unsigned packages. | ||||
| SigLevel    = Required DatabaseOptional | ||||
| LocalFileSigLevel = Optional | ||||
| #RemoteFileSigLevel = Required | ||||
|  | ||||
| # NOTE: You must run `pacman-key --init` before first using pacman; the local | ||||
| # keyring can then be populated with the keys of all official Artix Linux | ||||
| # packagers with `pacman-key --populate artix`. | ||||
|  | ||||
| # | ||||
| # REPOSITORIES | ||||
| #   - can be defined here or included from another file | ||||
| #   - pacman will search repositories in the order defined here | ||||
| #   - local/custom mirrors can be added here or in separate files | ||||
| #   - repositories listed first will take precedence when packages | ||||
| #     have identical names, regardless of version number | ||||
| #   - URLs will have $repo replaced by the name of the current repo | ||||
| #   - URLs will have $arch replaced by the name of the architecture | ||||
| # | ||||
| # Repository entries are of the format: | ||||
| #       [repo-name] | ||||
| #       Server = ServerName | ||||
| #       Include = IncludePath | ||||
| # | ||||
| # The header [repo-name] is crucial - it must be present and | ||||
| # uncommented to enable the repo. | ||||
| # | ||||
|  | ||||
| # The gremlins repositories are disabled by default. To enable, uncomment the | ||||
| # repo name header and Include lines. You can add preferred servers immediately | ||||
| # after the header, and they will be used before the default mirrors. | ||||
|  | ||||
| [system-gremlins] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [system] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [world-gremlins] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [world] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [galaxy-gremlins] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [galaxy] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| # If you want to run 32 bit applications on your x86_64 system, | ||||
| # enable the lib32 repositories as required here. | ||||
|  | ||||
| # [lib32-gremlins] | ||||
| # Include = /etc/pacman.d/mirrorlist | ||||
| # | ||||
| # [lib32] | ||||
| # Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| # An example of a custom package repository.  See the pacman manpage for | ||||
| # tips on creating your own repositories. | ||||
| #[custom] | ||||
| #SigLevel = Optional TrustAll | ||||
| #Server = file:///home/custompkgs | ||||
| @@ -1,103 +0,0 @@ | ||||
| # | ||||
| # /etc/pacman.conf | ||||
| # | ||||
| # See the pacman.conf(5) manpage for option and repository directives | ||||
|  | ||||
| # | ||||
| # GENERAL OPTIONS | ||||
| # | ||||
| [options] | ||||
| # The following paths are commented out with their default values listed. | ||||
| # If you wish to use different paths, uncomment and update the paths. | ||||
| #RootDir     = / | ||||
| #DBPath      = /var/lib/pacman/ | ||||
| #CacheDir    = /var/cache/pacman/pkg/ | ||||
| #LogFile     = /var/log/pacman.log | ||||
| #GPGDir      = /etc/pacman.d/gnupg/ | ||||
| #HookDir     = /etc/pacman.d/hooks/ | ||||
| HoldPkg     = pacman glibc | ||||
| #XferCommand = /usr/bin/curl -L -C - -f -o %o %u | ||||
| #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u | ||||
| #CleanMethod = KeepInstalled | ||||
| Architecture = auto | ||||
|  | ||||
| # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup | ||||
| #IgnorePkg   = | ||||
| #IgnoreGroup = | ||||
|  | ||||
| #NoUpgrade   = | ||||
| #NoExtract   = | ||||
|  | ||||
| # Misc options | ||||
| #UseSyslog | ||||
| Color | ||||
| #NoProgressBar | ||||
| CheckSpace | ||||
| VerbosePkgLists | ||||
| ParallelDownloads = 10 | ||||
|  | ||||
| # By default, pacman accepts packages signed by keys that its local keyring | ||||
| # trusts (see pacman-key and its man page), as well as unsigned packages. | ||||
| SigLevel    = Required DatabaseOptional | ||||
| LocalFileSigLevel = Optional | ||||
| #RemoteFileSigLevel = Required | ||||
|  | ||||
| # NOTE: You must run `pacman-key --init` before first using pacman; the local | ||||
| # keyring can then be populated with the keys of all official Artix Linux | ||||
| # packagers with `pacman-key --populate artix`. | ||||
|  | ||||
| # | ||||
| # REPOSITORIES | ||||
| #   - can be defined here or included from another file | ||||
| #   - pacman will search repositories in the order defined here | ||||
| #   - local/custom mirrors can be added here or in separate files | ||||
| #   - repositories listed first will take precedence when packages | ||||
| #     have identical names, regardless of version number | ||||
| #   - URLs will have $repo replaced by the name of the current repo | ||||
| #   - URLs will have $arch replaced by the name of the architecture | ||||
| # | ||||
| # Repository entries are of the format: | ||||
| #       [repo-name] | ||||
| #       Server = ServerName | ||||
| #       Include = IncludePath | ||||
| # | ||||
| # The header [repo-name] is crucial - it must be present and | ||||
| # uncommented to enable the repo. | ||||
| # | ||||
|  | ||||
| # The gremlins repositories are disabled by default. To enable, uncomment the | ||||
| # repo name header and Include lines. You can add preferred servers immediately | ||||
| # after the header, and they will be used before the default mirrors. | ||||
|  | ||||
| # [system-gremlins] | ||||
| # Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [system] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| # [world-gremlins] | ||||
| # Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [world] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| # [galaxy-gremlins] | ||||
| # Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [galaxy] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| # If you want to run 32 bit applications on your x86_64 system, | ||||
| # enable the lib32 repositories as required here. | ||||
|  | ||||
| # [lib32-gremlins] | ||||
| # Include = /etc/pacman.d/mirrorlist | ||||
| # | ||||
| # [lib32] | ||||
| # Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| # An example of a custom package repository.  See the pacman manpage for | ||||
| # tips on creating your own repositories. | ||||
| #[custom] | ||||
| #SigLevel = Optional TrustAll | ||||
| #Server = file:///home/custompkgs | ||||
| @@ -92,11 +92,7 @@ make_rootfs() { | ||||
|  | ||||
|         prepare_dir "${rootfs}" | ||||
|  | ||||
|         local args=() | ||||
|         if "${copy_pacconf}"; then | ||||
|             args+=(-P) | ||||
|         fi | ||||
|         basestrap "${basestrap_args[@]}" "${args[@]}" "${rootfs}" "${packages[@]}" | ||||
|         basestrap "${basestrap_args[@]}" "${rootfs}" "${packages[@]}" | ||||
|  | ||||
|         copy_overlay "${root_overlay}" "${rootfs}" | ||||
|  | ||||
| @@ -190,8 +186,8 @@ gen_iso_fn(){ | ||||
|     local vars=("artix") name | ||||
|     vars+=("${profile}") | ||||
|     vars+=("${INITSYS}") | ||||
|     case "${STABILITY}" in | ||||
|         gremlins|goblins) vars+=("${STABILITY}") ;; | ||||
|     case "${repo}" in | ||||
|         *-gremlins|*-goblins) vars+=("${repo#*-}") ;; | ||||
|     esac | ||||
|     vars+=("${ISO_VERSION}") | ||||
|     vars+=("${arch}") | ||||
| @@ -201,22 +197,12 @@ gen_iso_fn(){ | ||||
|     printf "%s\n" "$name" | ||||
| } | ||||
|  | ||||
| export_gpg_publickey() { | ||||
|     key_export="${WORKSPACE_DIR}"/pubkey.gpg | ||||
|     gpg --batch  --no-armor --output "${key_export}" --export "${GPG_KEY}" | ||||
| } | ||||
|  | ||||
| prepare_build(){ | ||||
|     load_profile | ||||
|     local pac_conf | ||||
|  | ||||
|     pac_conf=iso-${arch}.conf | ||||
|     if [[ "${STABILITY}" != 'stable' ]]; then | ||||
|         pac_conf=iso-${STABILITY}-${arch}.conf | ||||
|     fi | ||||
|     pacman_conf="${DATADIR}/pacman.conf.d/${pac_conf}" | ||||
|     if [[ -f "${USER_CONF_DIR}/pacman.conf.d/${pac_conf}" ]]; then | ||||
|         pacman_conf="${USER_CONF_DIR}/pacman.conf.d/${pac_conf}" | ||||
|     pacman_conf="${DATADIR}/pacman.conf.d/${repo}-${arch}.conf" | ||||
|     if [[ -f "${USER_CONF_DIR}/pacman.conf.d/${repo}-${arch}.conf" ]]; then | ||||
|         pacman_conf="${USER_CONF_DIR}/pacman.conf.d/${repo}-${arch}.conf" | ||||
|     fi | ||||
|  | ||||
|     iso_file=$(gen_iso_fn).iso | ||||
| @@ -337,11 +323,11 @@ persist=false | ||||
| use_dracut=false | ||||
| squash_only=false | ||||
| boot_only=false | ||||
| copy_pacconf=false | ||||
|  | ||||
| basestrap_args=(-GMc) | ||||
| cmd=${0##*/} | ||||
|  | ||||
| repo=${REPO} | ||||
| owner=${SUDO_USER:-$USER} | ||||
| profile='base' | ||||
| chroots_iso="${CHROOTS_DIR}/buildiso" | ||||
| @@ -352,8 +338,8 @@ usage() { | ||||
|     printf '    -p <profile>       Profile [default: %s]\n' "${profile}" | ||||
|     printf '    -r <dir>           Chroots directory\n' | ||||
|     printf '                       [default: %s]\n' "${chroots_iso}" | ||||
|     printf '    -R <stability>     Build stability\n' | ||||
|     printf '                       [default: %s]\n' "${STABILITY}" | ||||
|     printf '    -R <repo>          Build repo\n' | ||||
|     printf '                       [default: %s]\n' "${repo}" | ||||
|     printf '    -a <arch>          Build arch\n' | ||||
|     printf '                       [default: %s]\n' "${arch}" | ||||
|     printf '    -t <dir>           Target directory\n' | ||||
| @@ -370,7 +356,6 @@ usage() { | ||||
|     printf '    -z                 Generate iso only\n' | ||||
|     printf '                       Requires pre built images (-x)\n' | ||||
|     printf '    -d                 Use dracut instead of mkinitcpio for iso initramfs\n' | ||||
|     printf '    -w                 Copy the pacman.conf used to the rootfs\n' | ||||
|     printf '    -q                 Query settings and pretend build\n' | ||||
|     printf '    -h                 This help\n' | ||||
|     printf '\n' | ||||
| @@ -380,13 +365,13 @@ usage() { | ||||
|  | ||||
| orig_args=("$@") | ||||
|  | ||||
| opts='p:r:R:t:i:g:a:czsbxwmdqh' | ||||
| opts='p:r:R:t:i:g:a:czsbxmdqh' | ||||
|  | ||||
| while getopts "${opts}" arg; do | ||||
|     case "${arg}" in | ||||
|         p) profile="$OPTARG" ;; | ||||
|         a) arch="$OPTARG" ;; | ||||
|         R) STABILITY="$OPTARG" ;; | ||||
|         R) repo="$OPTARG" ;; | ||||
|         r) chroots_iso="$OPTARG" ;; | ||||
|         t) ISO_POOL="$OPTARG" ;; | ||||
|         i) INITSYS="$OPTARG" ;; | ||||
| @@ -398,7 +383,6 @@ while getopts "${opts}" arg; do | ||||
|         b) boot_only=true ;; | ||||
|         m) persist=true ;; | ||||
|         d) use_dracut=true ;; | ||||
|         w) copy_pacconf=true ;; | ||||
|         q) pretend=true ;; | ||||
|         h|?) usage 0 ;; | ||||
|     esac | ||||
|   | ||||
| @@ -5,28 +5,58 @@ | ||||
| #{{{ calamares | ||||
|  | ||||
| yaml_array() { | ||||
|     local array yaml | ||||
|     local array | ||||
|  | ||||
|     for entry in "$@"; do | ||||
|         yaml="{name: ${entry}, action: enable, alias: add, target: default}" | ||||
|         array="${array:-}${array:+,} ${yaml}" | ||||
|         array="${array:-}${array:+,} ${entry}" | ||||
|     done | ||||
|     printf "%s\n" "[${array}]" | ||||
| } | ||||
|  | ||||
| write_services_conf() { | ||||
|     local key1="$1" key2="$2" val1="$3" val2="$4" | ||||
|     local conf="$5"/services-"${INITSYS}".conf | ||||
|     local svc | ||||
|     svc=$(yaml_array "${SERVICES[@]}") | ||||
|  | ||||
|     yq -n '"---"' > "$conf" | ||||
|  | ||||
|     key1="$key1" key2="$key2" val1="$val1" val2="$val2" svc="$svc" \ | ||||
|     yq -P 'with( | ||||
|         .; | ||||
|             eval(strenv(key1)) = env(val1) | | ||||
|             eval(strenv(key2)) = env(val2) | | ||||
|             .services = env(svc))' \ | ||||
|         -i "$conf" | ||||
|  | ||||
|     if [[ ${INITSYS} == 's6' ]]; then | ||||
|         yq -P '.defaultBundle = "default"' -i "$conf" | ||||
|     fi | ||||
| } | ||||
|  | ||||
| write_services_openrc_conf(){ | ||||
|     write_services_conf '.initdDir' '.runlevelsDir' '/etc/init.d' '/etc/runlevels' "$1" | ||||
| } | ||||
|  | ||||
| write_services_runit_conf(){ | ||||
|     write_services_conf '.svDir' '.runsvDir' '/etc/runit/sv' '/etc/runit/runsvdir' "$1" | ||||
| } | ||||
|  | ||||
| write_services_s6_conf(){ | ||||
|     write_services_conf '.svDir' '.dbDir' '/etc/s6/sv' '/etc/s6/rc/compiled' "$1" | ||||
| } | ||||
|  | ||||
| write_services_dinit_conf(){ | ||||
|     write_services_conf '.initdDir' '.runsvDir' '/etc/dinit.d' '/etc/dinit.d/boot.d' "$1" | ||||
| } | ||||
|  | ||||
| configure_calamares(){ | ||||
|     local mods="$1/etc/calamares/modules" | ||||
|     if [[ -d "$mods" ]];then | ||||
|         msg2 "Configuring: Calamares" | ||||
|  | ||||
|         if [[ -f "$mods"/services-artix.conf ]]; then | ||||
|             local svc init | ||||
|             init="${INITSYS}" svc=$(yaml_array "${SERVICES[@]}") \ | ||||
|                 yq -P 'with(.; | ||||
|                         .manager = env(init) | | ||||
|                         .services = env(svc) )' \ | ||||
|                     -i "$mods"/services-artix.conf | ||||
|         fi | ||||
|         write_services_"${INITSYS}"_conf "$mods" | ||||
|         sed -e "s|services-openrc|services-${INITSYS}|" \ | ||||
|             -i "$1"/etc/calamares/settings.conf | ||||
|     fi | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -4,6 +4,29 @@ | ||||
|  | ||||
| #{{{ initcpio | ||||
|  | ||||
| make_checksum(){ | ||||
|     local file="$1" | ||||
|     msg2 "Creating md5sum ..." | ||||
|     cd "${iso_root}${live_dir}" | ||||
|     md5sum "$file" > "$file".md5 | ||||
|     cd "${OLDPWD}" | ||||
| } | ||||
|  | ||||
| make_sig () { | ||||
|     local file="$1" | ||||
|     msg2 "Creating signature file..." | ||||
|     chown "${owner}:$(id --group "${owner}")" "${iso_root}${live_dir}" | ||||
|     su "${owner}" -c "gpg --detach-sign --output $file.sig --default-key ${GPG_KEY} $file" | ||||
|     chown "root:root" "${iso_root}${live_dir}" | ||||
| } | ||||
|  | ||||
| export_gpg_publickey() { | ||||
|     key_export=${WORKSPACE_DIR}/pubkey.gpg | ||||
|     if [[ ! -e "${key_export}" ]]; then | ||||
|         gpg --batch --output "${key_export}" --export "${GPG_KEY}" | ||||
|     fi | ||||
| } | ||||
|  | ||||
| prepare_initramfs_mkinitcpio() { | ||||
|     local mnt="$1" mkinitcpio_conf k | ||||
|  | ||||
| @@ -11,8 +34,8 @@ prepare_initramfs_mkinitcpio() { | ||||
|     [[ "${profile}" == 'base' ]] && mkinitcpio_conf=mkinitcpio-pxe.conf | ||||
|     k=$(<"$mnt"/usr/src/linux/version) | ||||
|  | ||||
|     if [[ -v key_export ]]; then | ||||
|         exec {ARTIX_GNUPG_FD}<"${key_export}" | ||||
|     if [[ -n "${GPG_KEY}" ]]; then | ||||
|         exec {ARTIX_GNUPG_FD}<>"${key_export}" | ||||
|         export ARTIX_GNUPG_FD | ||||
|     fi | ||||
|  | ||||
| @@ -20,11 +43,13 @@ prepare_initramfs_mkinitcpio() { | ||||
|         -c /etc/"$mkinitcpio_conf" \ | ||||
|         -g /boot/initramfs.img | ||||
|  | ||||
|     if [[ -v key_export ]]; then | ||||
|     if [[ -n "${GPG_KEY}" ]]; then | ||||
|         exec {ARTIX_GNUPG_FD}<&- | ||||
|         unset ARTIX_GNUPG_FD | ||||
|     fi | ||||
|     rm -rf -- "${key_export}" | ||||
|     if [[ -f "${key_export}" ]]; then | ||||
|         rm "${key_export}" | ||||
|     fi | ||||
|     cp "$mnt"/boot/initramfs.img "${iso_root}"/boot/initramfs-"${arch}".img | ||||
|     prepare_boot_extras "$mnt" | ||||
| } | ||||
|   | ||||
| @@ -4,24 +4,6 @@ | ||||
|  | ||||
| #{{{ squash | ||||
|  | ||||
| make_checksum(){ | ||||
|     local file="$1" | ||||
|     msg2 "Creating md5sum ..." | ||||
|     cd "${iso_root}${live_dir}" | ||||
|     md5sum "$file" > "$file".md5 | ||||
|     cd "${OLDPWD}" | ||||
| } | ||||
|  | ||||
| make_sig () { | ||||
|     local file="$1" | ||||
|     msg2 "Creating signature file..." | ||||
|  | ||||
|     chown "${owner}:$(id --group "${owner}")" "${iso_root}${live_dir}" | ||||
|     su "${owner}" -c "gpg --batch --no-armor --no-include-key-block --output $file.sig  --detach-sign \ | ||||
|         --default-key ${GPG_KEY} ${gpg_options[@]} $file" | ||||
|     chown "root:root" "${iso_root}${live_dir}" | ||||
| } | ||||
|  | ||||
| make_ext_img(){ | ||||
|     local src="$1" | ||||
|     local size=32G | ||||
|   | ||||
| @@ -34,7 +34,7 @@ load_iso_config(){ | ||||
|  | ||||
|     ARCH=${ARCH:-"$(uname -m)"} | ||||
|  | ||||
|     STABILITY=${STABILITY:-'stable'} | ||||
|     REPO=${REPO:-'world'} | ||||
|  | ||||
|     ISO_POOL=${ISO_POOL:-"${WORKSPACE_DIR}/iso"} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user