Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
f4e3abae46 | |||
a7cef500ad | |||
f7c29d1c98 | |||
f1b2af947b | |||
5637ba0f8f | |||
a383531e5d | |||
6b4acbdd94 | |||
b7fd0a4e41 |
@@ -85,14 +85,12 @@ shift 1
|
|||||||
|
|
||||||
[[ -z $working_dir ]] && die 'Please specify a working directory.'
|
[[ -z $working_dir ]] && die 'Please specify a working directory.'
|
||||||
|
|
||||||
pacconf_cmd=$(command -v pacman-conf || command -v pacconf)
|
|
||||||
|
|
||||||
if (( ${#cache_dirs[@]} == 0 )); then
|
if (( ${#cache_dirs[@]} == 0 )); then
|
||||||
mapfile -t cache_dirs < <($pacconf_cmd --config "${pac_conf:-$working_dir/etc/pacman.conf}" CacheDir)
|
mapfile -t cache_dirs < <(pacman-conf --config "${pac_conf:-$working_dir/etc/pacman.conf}" CacheDir)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=2016
|
# shellcheck disable=2016
|
||||||
host_mirrors=($("$pacconf_cmd" --repo world Server 2> /dev/null | sed -r 's#(.*/)world/os/.*#\1$repo/os/$arch#'))
|
host_mirrors=($(pacman-conf --repo world Server 2> /dev/null | sed -r 's#(.*/)world/os/.*#\1$repo/os/$arch#'))
|
||||||
|
|
||||||
for host_mirror in "${host_mirrors[@]}"; do
|
for host_mirror in "${host_mirrors[@]}"; do
|
||||||
if [[ $host_mirror == *file://* ]]; then
|
if [[ $host_mirror == *file://* ]]; then
|
||||||
@@ -104,7 +102,7 @@ done
|
|||||||
|
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
# shellcheck disable=2016
|
# shellcheck disable=2016
|
||||||
mapfile -t lines < <($pacconf_cmd --config "${pac_conf:-$working_dir/etc/pacman.conf}" \
|
mapfile -t lines < <(pacman-conf --config "${pac_conf:-$working_dir/etc/pacman.conf}" \
|
||||||
--repo "$line" Server | sed -r 's#(.*/)[^/]+/os/.+#\1#')
|
--repo "$line" Server | sed -r 's#(.*/)[^/]+/os/.+#\1#')
|
||||||
for line in "${lines[@]}"; do
|
for line in "${lines[@]}"; do
|
||||||
if [[ $line = file://* ]]; then
|
if [[ $line = file://* ]]; then
|
||||||
@@ -112,7 +110,7 @@ while read -r line; do
|
|||||||
in_array "$line" "${cache_dirs[@]}" || cache_dirs+=("$line")
|
in_array "$line" "${cache_dirs[@]}" || cache_dirs+=("$line")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done < <("$pacconf_cmd" --config "${pac_conf:-$working_dir/etc/pacman.conf}" --repo-list)
|
done < <(pacman-conf --config "${pac_conf:-$working_dir/etc/pacman.conf}" --repo-list)
|
||||||
|
|
||||||
copy_hostconf () {
|
copy_hostconf () {
|
||||||
unshare --fork --pid gpg --homedir "$working_dir"/etc/pacman.d/gnupg/ --no-permission-warning --quiet --batch --import --import-options import-local-sigs "$(pacman-conf GpgDir)"/pubring.gpg >/dev/null 2>&1
|
unshare --fork --pid gpg --homedir "$working_dir"/etc/pacman.d/gnupg/ --no-permission-warning --quiet --batch --import --import-options import-local-sigs "$(pacman-conf GpgDir)"/pubring.gpg >/dev/null 2>&1
|
||||||
|
@@ -64,10 +64,8 @@ shift 1
|
|||||||
|
|
||||||
[[ -z $working_dir ]] && die 'Please specify a working directory.'
|
[[ -z $working_dir ]] && die 'Please specify a working directory.'
|
||||||
|
|
||||||
pacconf_cmd=$(command -v pacman-conf || command -v pacconf)
|
|
||||||
|
|
||||||
if (( ${#cache_dirs[@]} == 0 )); then
|
if (( ${#cache_dirs[@]} == 0 )); then
|
||||||
mapfile -t cache_dirs < <($pacconf_cmd CacheDir)
|
mapfile -t cache_dirs < <(pacman-conf CacheDir)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
umask 0022
|
umask 0022
|
||||||
|
@@ -52,6 +52,9 @@ compare_m(){
|
|||||||
|
|
||||||
compare_u(){
|
compare_u(){
|
||||||
if [ "$result" -eq -1 ];then
|
if [ "$result" -eq -1 ];then
|
||||||
|
# local arel=${archver##*-} brel=${artixver##*-}
|
||||||
|
# local reldiff
|
||||||
|
# reldiff=$(( $arel-${brel%.*} ))
|
||||||
msg_row_red "${table}" "${a}" "${b}" "$pkg" "$archver" "$artixver" "${group#*-}"
|
msg_row_red "${table}" "${a}" "${b}" "$pkg" "$archver" "$artixver" "${group#*-}"
|
||||||
write_list "${a}:$pkg" pkg_upgrades
|
write_list "${a}:$pkg" pkg_upgrades
|
||||||
fi
|
fi
|
||||||
|
@@ -249,7 +249,7 @@ download_sources() {
|
|||||||
chown "$makepkg_user:" "$WORKDIR"
|
chown "$makepkg_user:" "$WORKDIR"
|
||||||
|
|
||||||
# Ensure sources are downloaded
|
# Ensure sources are downloaded
|
||||||
sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \
|
sudo -u "$makepkg_user" --preserve-env=GNUPGHOME,SSH_AUTH_SOCK \
|
||||||
env SRCDEST="$SRCDEST" BUILDDIR="$WORKDIR" \
|
env SRCDEST="$SRCDEST" BUILDDIR="$WORKDIR" \
|
||||||
makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o "${verifysource_args[@]}" ||
|
makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o "${verifysource_args[@]}" ||
|
||||||
die "Could not download sources."
|
die "Could not download sources."
|
||||||
|
@@ -17,6 +17,24 @@ m4_include(lib/base/yaml.sh)
|
|||||||
|
|
||||||
#{{{ functions
|
#{{{ functions
|
||||||
|
|
||||||
|
print_package_names() {
|
||||||
|
local version=$(get_full_version)
|
||||||
|
local architecture pkg
|
||||||
|
for pkg in ${pkgname[@]}; do
|
||||||
|
architecture=$(get_pkg_arch $pkg)
|
||||||
|
printf "%s/%s-%s-%s%s\n" "$PKGDEST" "$pkg" "$version" "$architecture" "$PKGEXT"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
print_debug_package_names() {
|
||||||
|
local version=$(get_full_version)
|
||||||
|
local architecture
|
||||||
|
if check_option "debug" "y" && check_option "strip" "y"; then
|
||||||
|
architecture=$(get_pkg_arch)
|
||||||
|
printf "%s/%s-%s-%s-%s%s\n" "$PKGDEST" "$pkgbase" "debug" "$version" "$architecture" "$PKGEXT"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
srcyaml_write_attr(){
|
srcyaml_write_attr(){
|
||||||
local ident1="$1" ident2="$2" ident3="$3"
|
local ident1="$1" ident2="$2" ident3="$3"
|
||||||
local attrname=$4 attrvalues=("${@:5}")
|
local attrname=$4 attrvalues=("${@:5}")
|
||||||
@@ -108,13 +126,19 @@ yaml_write_fileinfo(){
|
|||||||
pkgbase=${pkgbase:-$pkgname}
|
pkgbase=${pkgbase:-$pkgname}
|
||||||
Yaml+=$(write_yaml_map 0 "version" "${version:-0}")
|
Yaml+=$(write_yaml_map 0 "version" "${version:-0}")
|
||||||
Yaml+=$(write_empty_line)
|
Yaml+=$(write_empty_line)
|
||||||
local pkgfile
|
local pkgfile debug_pkg
|
||||||
pkgfile=$(print_all_package_names)
|
pkgfile=$(print_package_names)
|
||||||
Yaml+=$(write_yaml_map 0 "files")
|
Yaml+=$(write_yaml_map 0 "files")
|
||||||
for f in ${pkgfile}; do
|
for f in ${pkgfile}; do
|
||||||
Yaml+=$(write_yaml_seq 2 "${f##*/}")
|
Yaml+=$(write_yaml_seq 2 "${f##*/}")
|
||||||
done
|
done
|
||||||
Yaml+=$(write_empty_line)
|
Yaml+=$(write_empty_line)
|
||||||
|
debug_pkg=$(print_debug_package_names)
|
||||||
|
Yaml+=$(write_yaml_map 0 "debug")
|
||||||
|
for d in ${debug_pkg}; do
|
||||||
|
Yaml+=$(write_yaml_seq 2 "${d##*/}")
|
||||||
|
done
|
||||||
|
Yaml+=$(write_empty_line)
|
||||||
}
|
}
|
||||||
|
|
||||||
write_srcyaml(){
|
write_srcyaml(){
|
||||||
|
@@ -15,15 +15,20 @@
|
|||||||
# packages-runit
|
# packages-runit
|
||||||
# packages-s6
|
# packages-s6
|
||||||
# packages-suite66
|
# packages-suite66
|
||||||
|
# packages-dinit
|
||||||
# packages-perl
|
# packages-perl
|
||||||
# packages-java
|
# packages-java
|
||||||
# packages-ruby
|
# packages-ruby
|
||||||
# packages-kf5
|
# packages-gtk
|
||||||
|
# packages-qt5
|
||||||
|
# packages-qt6
|
||||||
|
# packages-xorg
|
||||||
# packages-plasma
|
# packages-plasma
|
||||||
# packages-kde
|
# packages-kde
|
||||||
# packages-gnome
|
# packages-gnome
|
||||||
# packages-cinnamon
|
# packages-cinnamon
|
||||||
# packages-lxqt
|
# packages-lxqt
|
||||||
|
# packages-lxde
|
||||||
# packages-mate
|
# packages-mate
|
||||||
# packages-xfce
|
# packages-xfce
|
||||||
# packages-wm
|
# packages-wm
|
||||||
@@ -33,6 +38,8 @@
|
|||||||
# packages-misc
|
# packages-misc
|
||||||
# python-world
|
# python-world
|
||||||
# python-galaxy
|
# python-galaxy
|
||||||
|
# python-galaxy-groups
|
||||||
|
# python-misc
|
||||||
# packages-python
|
# packages-python
|
||||||
# packages-lib32
|
# packages-lib32
|
||||||
# )
|
# )
|
||||||
|
@@ -11,10 +11,10 @@
|
|||||||
#
|
#
|
||||||
#-- The download utilities that makepkg should use to acquire sources
|
#-- The download utilities that makepkg should use to acquire sources
|
||||||
# Format: 'protocol::agent'
|
# Format: 'protocol::agent'
|
||||||
DLAGENTS=('file::/usr/bin/curl -gqC - -o %o %u'
|
DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u'
|
||||||
'ftp::/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
|
'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
|
||||||
'http::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
|
'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
|
||||||
'https::/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
|
'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
|
||||||
'rsync::/usr/bin/rsync --no-motd -z %u %o'
|
'rsync::/usr/bin/rsync --no-motd -z %u %o'
|
||||||
'scp::/usr/bin/scp -C %u %o')
|
'scp::/usr/bin/scp -C %u %o')
|
||||||
|
|
||||||
@@ -49,8 +49,8 @@ LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
|
|||||||
#-- Make Flags: change this for DistCC/SMP systems
|
#-- Make Flags: change this for DistCC/SMP systems
|
||||||
#MAKEFLAGS="-j2"
|
#MAKEFLAGS="-j2"
|
||||||
#-- Debugging flags
|
#-- Debugging flags
|
||||||
DEBUG_CFLAGS="-g -fvar-tracking-assignments"
|
DEBUG_CFLAGS="-g"
|
||||||
DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
|
DEBUG_CXXFLAGS="-g"
|
||||||
#DEBUG_RUSTFLAGS="-C debuginfo=2"
|
#DEBUG_RUSTFLAGS="-C debuginfo=2"
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
@@ -93,7 +93,7 @@ BUILDENV=(!distcc color !ccache check !sign)
|
|||||||
#-- debug: Add debugging flags as specified in DEBUG_* variables
|
#-- debug: Add debugging flags as specified in DEBUG_* variables
|
||||||
#-- lto: Add compile flags for building with link time optimization
|
#-- lto: Add compile flags for building with link time optimization
|
||||||
#
|
#
|
||||||
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto)
|
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto)
|
||||||
|
|
||||||
#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
|
#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
|
||||||
INTEGRITY_CHECK=(sha256)
|
INTEGRITY_CHECK=(sha256)
|
||||||
|
@@ -56,7 +56,8 @@ read_from_list() {
|
|||||||
read_from_services() {
|
read_from_services() {
|
||||||
for svc in "${SERVICES[@]}"; do
|
for svc in "${SERVICES[@]}"; do
|
||||||
case "$svc" in
|
case "$svc" in
|
||||||
sddm|gdm|lightdm|mdm|greetd|lxdm|xdm) packages+=("$svc-${INITSYS}") ;;
|
sddm|gdm|lightdm|mdm|greetd|lxdm|xdm)
|
||||||
|
packages+=("$svc-${INITSYS}"); display_manager="$svc" ;;
|
||||||
NetworkManager) packages+=("networkmanager-${INITSYS}") ;;
|
NetworkManager) packages+=("networkmanager-${INITSYS}") ;;
|
||||||
connmand) packages+=("connman-${INITSYS}") ;;
|
connmand) packages+=("connman-${INITSYS}") ;;
|
||||||
cupsd) packages+=("cups-${INITSYS}") ;;
|
cupsd) packages+=("cups-${INITSYS}") ;;
|
||||||
|
@@ -23,24 +23,26 @@ add_svc_runit(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
add_svc_s6(){
|
add_svc_s6(){
|
||||||
local mnt="$1" names="$2" rlvl="${3:-default}" error ret
|
local mnt="$1" names="$2" rlvl="${3:-default}" dep
|
||||||
local db=/etc/s6/rc/compiled
|
dep="$mnt"/etc/s6/sv/"$display_manager"-srv/dependencies.d
|
||||||
for svc in $names; do
|
for svc in $names; do
|
||||||
error=false
|
msg2 "Setting %s: [%s]" "${INITSYS}" "$svc"
|
||||||
chroot "$mnt" s6-rc-db -c "$db" type "$svc" &> /dev/null || error=true
|
chroot "$mnt" s6-service add "$rlvl" "$svc"
|
||||||
ret="$?"
|
if [[ "$svc" == "$display_manager" ]]; then
|
||||||
if [ $ret -eq 0 ] && [[ "$error" == false ]]; then
|
if [[ -d "$dep" ]]; then
|
||||||
msg2 "Setting %s: [%s]" "${INITSYS}" "$svc"
|
touch "$dep"/artix-live
|
||||||
chroot "$mnt" s6-rc-bundle-update -c "$db" add "$rlvl" "$svc"
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
local rlvl=/etc/s6/current
|
chroot "$mnt" s6-db-reload -r
|
||||||
|
|
||||||
|
local src=/etc/s6/current skel=/etc/s6/skel getty='/usr/bin/agetty -L -8 tty7 115200'
|
||||||
# rebuild s6-linux-init binaries
|
# rebuild s6-linux-init binaries
|
||||||
chroot "$mnt" rm -r "$rlvl"
|
chroot "$mnt" rm -r "$src"
|
||||||
chroot "$mnt" s6-linux-init-maker -1 -N -f /etc/s6/skel -G "/usr/bin/agetty -L -8 tty7 115200" -c "$rlvl" "$rlvl"
|
chroot "$mnt" s6-linux-init-maker -1 -N -f "$skel" -G "$getty" -c "$src" "$src"
|
||||||
chroot "$mnt" mv "$rlvl"/bin/init "$rlvl"/bin/s6-init
|
chroot "$mnt" mv "$src"/bin/init "$src"/bin/s6-init
|
||||||
chroot "$mnt" cp -a "$rlvl"/bin /usr
|
chroot "$mnt" cp -a "$src"/bin /usr
|
||||||
}
|
}
|
||||||
|
|
||||||
add_svc_suite66(){
|
add_svc_suite66(){
|
||||||
|
@@ -23,19 +23,19 @@ load_pkg_config(){
|
|||||||
|
|
||||||
ARTIX_TREE=(
|
ARTIX_TREE=(
|
||||||
packages community
|
packages community
|
||||||
packages-{gfx,gtk,media,net,qt5,xorg}
|
packages-{gfx,media,net}
|
||||||
)
|
)
|
||||||
|
|
||||||
local dev_tree=(
|
local dev_tree=(
|
||||||
packages-{llvm,python,perl,java,ruby}
|
packages-{llvm,python,perl,java,ruby,misc}
|
||||||
python-{world,galaxy}
|
python-{world,galaxy,galaxy-groups,misc}
|
||||||
)
|
)
|
||||||
|
|
||||||
local init_tree=(packages-{openrc,runit,s6,suite66,dinit})
|
local init_tree=(packages-{openrc,runit,s6,suite66,dinit})
|
||||||
|
|
||||||
local desktop_tree=(
|
local desktop_tree=(
|
||||||
packages-{kf5,plasma,kde,qt6}
|
packages-{kf5,plasma,kde,qt5,qt6,xorg,gtk}
|
||||||
packages-{lxqt,gnome,cinnamon,mate,xfce,wm}
|
packages-{lxqt,gnome,cinnamon,mate,xfce,wm,lxde}
|
||||||
)
|
)
|
||||||
|
|
||||||
[[ -z ${TREE_NAMES_ARTIX[*]} ]] && \
|
[[ -z ${TREE_NAMES_ARTIX[*]} ]] && \
|
||||||
|
Reference in New Issue
Block a user