Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
5d7f006ad9
|
|||
72104728ac
|
|||
423896750a
|
|||
ad09046044
|
|||
c335cab68c
|
|||
e744e80c57 | |||
06bcd79858 | |||
dbb63dcd5e
|
|||
4e510b2f1e
|
@@ -14,9 +14,9 @@
|
|||||||
# default arch to build
|
# default arch to build
|
||||||
# ARCH=$(uname -m)
|
# ARCH=$(uname -m)
|
||||||
|
|
||||||
# default pacman.conf repos to include
|
# default pacman.conf to include
|
||||||
# possible values: {world,galaxy}{-gremlins,-goblins}
|
# possible values: {stable,gremlins,goblins}
|
||||||
# REPO="world"
|
# STABILITY="stable"
|
||||||
|
|
||||||
# default iso storage directory
|
# default iso storage directory
|
||||||
# ISO_POOL="${WORKSPACE_DIR}/iso"
|
# ISO_POOL="${WORKSPACE_DIR}/iso"
|
||||||
|
115
config/pacman/iso-goblins-x86_64.conf
Normal file
115
config/pacman/iso-goblins-x86_64.conf
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
#
|
||||||
|
# /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
|
103
config/pacman/iso-gremlins-x86_64.conf
Normal file
103
config/pacman/iso-gremlins-x86_64.conf
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
#
|
||||||
|
# /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
|
103
config/pacman/iso-x86_64.conf
Normal file
103
config/pacman/iso-x86_64.conf
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
#
|
||||||
|
# /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,7 +92,11 @@ make_rootfs() {
|
|||||||
|
|
||||||
prepare_dir "${rootfs}"
|
prepare_dir "${rootfs}"
|
||||||
|
|
||||||
basestrap "${basestrap_args[@]}" "${rootfs}" "${packages[@]}"
|
local args=()
|
||||||
|
if "${copy_pacconf}"; then
|
||||||
|
args+=(-P)
|
||||||
|
fi
|
||||||
|
basestrap "${basestrap_args[@]}" "${args[@]}" "${rootfs}" "${packages[@]}"
|
||||||
|
|
||||||
copy_overlay "${root_overlay}" "${rootfs}"
|
copy_overlay "${root_overlay}" "${rootfs}"
|
||||||
|
|
||||||
@@ -186,8 +190,8 @@ gen_iso_fn(){
|
|||||||
local vars=("artix") name
|
local vars=("artix") name
|
||||||
vars+=("${profile}")
|
vars+=("${profile}")
|
||||||
vars+=("${INITSYS}")
|
vars+=("${INITSYS}")
|
||||||
case "${repo}" in
|
case "${STABILITY}" in
|
||||||
*-gremlins|*-goblins) vars+=("${repo#*-}") ;;
|
gremlins|goblins) vars+=("${STABILITY}") ;;
|
||||||
esac
|
esac
|
||||||
vars+=("${ISO_VERSION}")
|
vars+=("${ISO_VERSION}")
|
||||||
vars+=("${arch}")
|
vars+=("${arch}")
|
||||||
@@ -197,12 +201,22 @@ gen_iso_fn(){
|
|||||||
printf "%s\n" "$name"
|
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(){
|
prepare_build(){
|
||||||
load_profile
|
load_profile
|
||||||
|
local pac_conf
|
||||||
|
|
||||||
pacman_conf="${DATADIR}/pacman.conf.d/${repo}-${arch}.conf"
|
pac_conf=iso-${arch}.conf
|
||||||
if [[ -f "${USER_CONF_DIR}/pacman.conf.d/${repo}-${arch}.conf" ]]; then
|
if [[ "${STABILITY}" != 'stable' ]]; then
|
||||||
pacman_conf="${USER_CONF_DIR}/pacman.conf.d/${repo}-${arch}.conf"
|
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}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
iso_file=$(gen_iso_fn).iso
|
iso_file=$(gen_iso_fn).iso
|
||||||
@@ -323,11 +337,11 @@ persist=false
|
|||||||
use_dracut=false
|
use_dracut=false
|
||||||
squash_only=false
|
squash_only=false
|
||||||
boot_only=false
|
boot_only=false
|
||||||
|
copy_pacconf=false
|
||||||
|
|
||||||
basestrap_args=(-GMc)
|
basestrap_args=(-GMc)
|
||||||
cmd=${0##*/}
|
cmd=${0##*/}
|
||||||
|
|
||||||
repo=${REPO}
|
|
||||||
owner=${SUDO_USER:-$USER}
|
owner=${SUDO_USER:-$USER}
|
||||||
profile='base'
|
profile='base'
|
||||||
chroots_iso="${CHROOTS_DIR}/buildiso"
|
chroots_iso="${CHROOTS_DIR}/buildiso"
|
||||||
@@ -338,8 +352,8 @@ usage() {
|
|||||||
printf ' -p <profile> Profile [default: %s]\n' "${profile}"
|
printf ' -p <profile> Profile [default: %s]\n' "${profile}"
|
||||||
printf ' -r <dir> Chroots directory\n'
|
printf ' -r <dir> Chroots directory\n'
|
||||||
printf ' [default: %s]\n' "${chroots_iso}"
|
printf ' [default: %s]\n' "${chroots_iso}"
|
||||||
printf ' -R <repo> Build repo\n'
|
printf ' -R <stability> Build stability\n'
|
||||||
printf ' [default: %s]\n' "${repo}"
|
printf ' [default: %s]\n' "${STABILITY}"
|
||||||
printf ' -a <arch> Build arch\n'
|
printf ' -a <arch> Build arch\n'
|
||||||
printf ' [default: %s]\n' "${arch}"
|
printf ' [default: %s]\n' "${arch}"
|
||||||
printf ' -t <dir> Target directory\n'
|
printf ' -t <dir> Target directory\n'
|
||||||
@@ -356,6 +370,7 @@ usage() {
|
|||||||
printf ' -z Generate iso only\n'
|
printf ' -z Generate iso only\n'
|
||||||
printf ' Requires pre built images (-x)\n'
|
printf ' Requires pre built images (-x)\n'
|
||||||
printf ' -d Use dracut instead of mkinitcpio for iso initramfs\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 ' -q Query settings and pretend build\n'
|
||||||
printf ' -h This help\n'
|
printf ' -h This help\n'
|
||||||
printf '\n'
|
printf '\n'
|
||||||
@@ -365,13 +380,13 @@ usage() {
|
|||||||
|
|
||||||
orig_args=("$@")
|
orig_args=("$@")
|
||||||
|
|
||||||
opts='p:r:R:t:i:g:a:czsbxmdqh'
|
opts='p:r:R:t:i:g:a:czsbxwmdqh'
|
||||||
|
|
||||||
while getopts "${opts}" arg; do
|
while getopts "${opts}" arg; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
p) profile="$OPTARG" ;;
|
p) profile="$OPTARG" ;;
|
||||||
a) arch="$OPTARG" ;;
|
a) arch="$OPTARG" ;;
|
||||||
R) repo="$OPTARG" ;;
|
R) STABILITY="$OPTARG" ;;
|
||||||
r) chroots_iso="$OPTARG" ;;
|
r) chroots_iso="$OPTARG" ;;
|
||||||
t) ISO_POOL="$OPTARG" ;;
|
t) ISO_POOL="$OPTARG" ;;
|
||||||
i) INITSYS="$OPTARG" ;;
|
i) INITSYS="$OPTARG" ;;
|
||||||
@@ -383,6 +398,7 @@ while getopts "${opts}" arg; do
|
|||||||
b) boot_only=true ;;
|
b) boot_only=true ;;
|
||||||
m) persist=true ;;
|
m) persist=true ;;
|
||||||
d) use_dracut=true ;;
|
d) use_dracut=true ;;
|
||||||
|
w) copy_pacconf=true ;;
|
||||||
q) pretend=true ;;
|
q) pretend=true ;;
|
||||||
h|?) usage 0 ;;
|
h|?) usage 0 ;;
|
||||||
esac
|
esac
|
||||||
|
@@ -5,66 +5,33 @@
|
|||||||
#{{{ calamares
|
#{{{ calamares
|
||||||
|
|
||||||
yaml_array() {
|
yaml_array() {
|
||||||
local array
|
local array yaml
|
||||||
|
|
||||||
for entry in "$@"; do
|
for entry in "$@"; do
|
||||||
array="${array:-}${array:+,} ${entry}"
|
yaml="{name: ${entry}, action: enable}"
|
||||||
|
array="${array:-}${array:+,} ${yaml}"
|
||||||
done
|
done
|
||||||
printf "%s\n" "[${array}]"
|
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(){
|
configure_calamares(){
|
||||||
local mods="$1/etc/calamares/modules"
|
for config in online offline; do
|
||||||
if [[ -d "$mods" ]];then
|
local mods="$1/etc/calamares-$config/modules"
|
||||||
msg2 "Configuring: Calamares"
|
if [[ -d "$mods" ]];then
|
||||||
write_services_"${INITSYS}"_conf "$mods"
|
msg2 "Configuring: Calamares %s" "$config"
|
||||||
sed -e "s|-openrc|-${INITSYS}|" -i "$1"/etc/calamares/settings.conf
|
|
||||||
if [[ -f "$mods"/netstrap.conf ]]; then
|
if [[ -f "$mods"/services-artix.conf ]]; then
|
||||||
sed -e "s|-openrc|-${INITSYS}|g" -i "$mods"/netstrap.conf
|
local svc
|
||||||
fi
|
svc=$(yaml_array "${SERVICES[@]}") \
|
||||||
if [[ -f "$mods"/netinstall.conf ]]; then
|
yq -P 'with(.;
|
||||||
sed -e "s|netinstall-openrc|netinstall-${INITSYS}|" -i "$mods"/netinstall.conf
|
.command = "artix-service" |
|
||||||
fi
|
.services = env(svc) )' \
|
||||||
if [[ -f "$mods"/netinstall.yaml ]]; then
|
-i "$mods"/services-artix.conf
|
||||||
sed -e "s|-openrc|-${INITSYS}|g" -i "$mods"/netinstall.yaml
|
fi
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
if [[ -d "$1"/etc/calamares-offline ]]; then
|
||||||
|
ln -sf calamares-offline "$1"/etc/calamares
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -13,7 +13,6 @@ prepare_boot_extras(){
|
|||||||
done
|
done
|
||||||
|
|
||||||
cp "$src"/boot/memtest86+/memtest.bin "$dest"/memtest
|
cp "$src"/boot/memtest86+/memtest.bin "$dest"/memtest
|
||||||
cp "$src"/usr/share/licenses/common/GPL2/license.txt "$dest"/memtest.COPYING
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#}}}
|
#}}}
|
||||||
|
@@ -4,29 +4,6 @@
|
|||||||
|
|
||||||
#{{{ initcpio
|
#{{{ 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() {
|
prepare_initramfs_mkinitcpio() {
|
||||||
local mnt="$1" mkinitcpio_conf k
|
local mnt="$1" mkinitcpio_conf k
|
||||||
|
|
||||||
@@ -34,8 +11,8 @@ prepare_initramfs_mkinitcpio() {
|
|||||||
[[ "${profile}" == 'base' ]] && mkinitcpio_conf=mkinitcpio-pxe.conf
|
[[ "${profile}" == 'base' ]] && mkinitcpio_conf=mkinitcpio-pxe.conf
|
||||||
k=$(<"$mnt"/usr/src/linux/version)
|
k=$(<"$mnt"/usr/src/linux/version)
|
||||||
|
|
||||||
if [[ -n "${GPG_KEY}" ]]; then
|
if [[ -v key_export ]]; then
|
||||||
exec {ARTIX_GNUPG_FD}<>"${key_export}"
|
exec {ARTIX_GNUPG_FD}<"${key_export}"
|
||||||
export ARTIX_GNUPG_FD
|
export ARTIX_GNUPG_FD
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -43,13 +20,11 @@ prepare_initramfs_mkinitcpio() {
|
|||||||
-c /etc/"$mkinitcpio_conf" \
|
-c /etc/"$mkinitcpio_conf" \
|
||||||
-g /boot/initramfs.img
|
-g /boot/initramfs.img
|
||||||
|
|
||||||
if [[ -n "${GPG_KEY}" ]]; then
|
if [[ -v key_export ]]; then
|
||||||
exec {ARTIX_GNUPG_FD}<&-
|
exec {ARTIX_GNUPG_FD}<&-
|
||||||
unset ARTIX_GNUPG_FD
|
unset ARTIX_GNUPG_FD
|
||||||
fi
|
fi
|
||||||
if [[ -f "${key_export}" ]]; then
|
rm -rf -- "${key_export}"
|
||||||
rm "${key_export}"
|
|
||||||
fi
|
|
||||||
cp "$mnt"/boot/initramfs.img "${iso_root}"/boot/initramfs-"${arch}".img
|
cp "$mnt"/boot/initramfs.img "${iso_root}"/boot/initramfs-"${arch}".img
|
||||||
prepare_boot_extras "$mnt"
|
prepare_boot_extras "$mnt"
|
||||||
}
|
}
|
||||||
|
@@ -4,6 +4,24 @@
|
|||||||
|
|
||||||
#{{{ squash
|
#{{{ 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(){
|
make_ext_img(){
|
||||||
local src="$1"
|
local src="$1"
|
||||||
local size=32G
|
local size=32G
|
||||||
|
@@ -34,7 +34,7 @@ load_iso_config(){
|
|||||||
|
|
||||||
ARCH=${ARCH:-"$(uname -m)"}
|
ARCH=${ARCH:-"$(uname -m)"}
|
||||||
|
|
||||||
REPO=${REPO:-'world'}
|
STABILITY=${STABILITY:-'stable'}
|
||||||
|
|
||||||
ISO_POOL=${ISO_POOL:-"${WORKSPACE_DIR}/iso"}
|
ISO_POOL=${ISO_POOL:-"${WORKSPACE_DIR}/iso"}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user