Compare commits
	
		
			13 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 8cc8b66e7f | |||
| 0ae8c16801 | |||
| bb674109ed | |||
| ede2ac11e2 | |||
| e8913b07c3 | |||
| f5f9a2acb8 | |||
| c6f7df51d2 | |||
| b105207138 | |||
| 55e98abdc1 | |||
| 896c031ea9 | |||
| 8f16db45e8 | |||
| 47ee03e1a4 | |||
| 17f49857e2 | 
@@ -21,6 +21,8 @@ load_config "${USERCONFDIR}/artools/artools.conf" || load_config "${SYSCONFDIR}/
 | 
			
		||||
 | 
			
		||||
create_first=false
 | 
			
		||||
rebuild=false
 | 
			
		||||
no_check=false
 | 
			
		||||
is_checkpkg=false
 | 
			
		||||
 | 
			
		||||
mkchrootpkg_args=(-c -n)
 | 
			
		||||
 | 
			
		||||
@@ -33,6 +35,8 @@ usage() {
 | 
			
		||||
    echo "    -r <dir>           Create chroots in this directory"
 | 
			
		||||
    echo '    -c                 Recreate the chroot before building'
 | 
			
		||||
    echo '    -m                 Major rebuild'
 | 
			
		||||
    echo '    -N                 Disable check() function'
 | 
			
		||||
    echo '    -C                 Run checkpkg after built'
 | 
			
		||||
    echo '    -h                 This help'
 | 
			
		||||
    echo ''
 | 
			
		||||
    echo "Default mkchrootpkg_args args: ${mkchrootpkg_args[*]}"
 | 
			
		||||
@@ -42,13 +46,15 @@ usage() {
 | 
			
		||||
 | 
			
		||||
orig_argv=("$0" "$@")
 | 
			
		||||
 | 
			
		||||
opts='hcmr:'
 | 
			
		||||
opts='hcCNmr:'
 | 
			
		||||
 | 
			
		||||
while getopts "${opts}" arg; do
 | 
			
		||||
    case "${arg}" in
 | 
			
		||||
        r) CHROOTS_PKG="$OPTARG" ;;
 | 
			
		||||
        c) create_first=true ;;
 | 
			
		||||
        m) rebuild=true ;;
 | 
			
		||||
        C) is_checkpkg=true; mkchrootpkg_args+=(-C) ;;
 | 
			
		||||
        N) no_check=true; mkchrootpkg_args+=(-N) ;;
 | 
			
		||||
        h|?) usage 0 ;;
 | 
			
		||||
        *) echo "invalid argument '%s'" "${arg}"; usage 1 ;;
 | 
			
		||||
    esac
 | 
			
		||||
 
 | 
			
		||||
@@ -74,7 +74,7 @@ show_deps(){
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
subrepo_new(){
 | 
			
		||||
    local group="$1" team="$2"
 | 
			
		||||
    local group="${1:-$GROUP}" team="${2:-$TEAM}"
 | 
			
		||||
    local dest=${TREE_DIR_ARTIX}/$group/${PACKAGE}/trunk
 | 
			
		||||
 | 
			
		||||
    cd ${TREE_DIR_ARTIX}/$group
 | 
			
		||||
 
 | 
			
		||||
@@ -17,33 +17,88 @@
 | 
			
		||||
 | 
			
		||||
shopt -s extglob
 | 
			
		||||
 | 
			
		||||
# Source makepkg.conf; fail if it is not found
 | 
			
		||||
if [[ -r '/etc/makepkg.conf' ]]; then
 | 
			
		||||
    # shellcheck source=makepkg-x86_64.conf
 | 
			
		||||
    source '/etc/makepkg.conf'
 | 
			
		||||
else
 | 
			
		||||
    die '/etc/makepkg.conf not found!'
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
load_user_info
 | 
			
		||||
# Source user-specific makepkg.conf overrides
 | 
			
		||||
if [[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/pacman/makepkg.conf" ]]; then
 | 
			
		||||
    # shellcheck source=/dev/null
 | 
			
		||||
    source "${XDG_CONFIG_HOME:-$HOME/.config}/pacman/makepkg.conf"
 | 
			
		||||
elif [[ -r "$HOME/.makepkg.conf" ]]; then
 | 
			
		||||
    # shellcheck source=/dev/null
 | 
			
		||||
    source "$HOME/.makepkg.conf"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
load_vars "${USERCONFDIR}/pacman/makepkg.conf" || load_vars "$USER_HOME/.makepkg.conf"
 | 
			
		||||
load_vars /etc/makepkg.conf
 | 
			
		||||
usage() {
 | 
			
		||||
    cat <<- _EOF_
 | 
			
		||||
        Usage: ${BASH_SOURCE[0]##*/} [OPTIONS]
 | 
			
		||||
 | 
			
		||||
        Searches for a locally built package corresponding to the PKGBUILD, and
 | 
			
		||||
        downloads the last version of that package from the Pacman repositories.
 | 
			
		||||
        It then compares the list of .so files provided by each version of the
 | 
			
		||||
        package and outputs if there are soname differences for the new package.
 | 
			
		||||
        A directory is also created using mktemp with files containing a file
 | 
			
		||||
        list for both packages and a library list for both packages.
 | 
			
		||||
 | 
			
		||||
        OPTIONS
 | 
			
		||||
            -r, --rmdir     Remove the temporary directory
 | 
			
		||||
            -w, --warn      Print a warning in case of differences
 | 
			
		||||
            -h, --help      Show this help text
 | 
			
		||||
_EOF_
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
RMDIR=0
 | 
			
		||||
WARN=0
 | 
			
		||||
 | 
			
		||||
OPT_SHORT='rwh'
 | 
			
		||||
OPT_LONG=('rmdir' 'warn' 'help')
 | 
			
		||||
if ! parseopts "$OPT_SHORT" "${OPT_LONG[@]}" -- "$@"; then
 | 
			
		||||
    exit 1
 | 
			
		||||
fi
 | 
			
		||||
set  -- "${OPTRET[@]}"
 | 
			
		||||
 | 
			
		||||
while :; do
 | 
			
		||||
    case $1 in
 | 
			
		||||
        -r|--rmdir)
 | 
			
		||||
            RMDIR=1
 | 
			
		||||
            ;;
 | 
			
		||||
        -w|--warn)
 | 
			
		||||
            WARN=1
 | 
			
		||||
            ;;
 | 
			
		||||
        -h|--help)
 | 
			
		||||
            usage
 | 
			
		||||
            exit 0
 | 
			
		||||
            ;;
 | 
			
		||||
        --)
 | 
			
		||||
            shift; break
 | 
			
		||||
            ;;
 | 
			
		||||
    esac
 | 
			
		||||
    shift
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
if [[ ! -f PKGBUILD ]]; then
 | 
			
		||||
    die 'This must be run in the directory of a built package.'
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# shellcheck source=PKGBUILD.proto
 | 
			
		||||
. ./PKGBUILD
 | 
			
		||||
if [[ $arch == 'any' ]]; then
 | 
			
		||||
if [[ ${arch[0]} == 'any' ]]; then
 | 
			
		||||
    CARCH='any'
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
STARTDIR=$(pwd)
 | 
			
		||||
(( RMDIR )) && trap 'rm -rf $TEMPDIR' EXIT INT TERM QUIT
 | 
			
		||||
TEMPDIR=$(mktemp -d --tmpdir checkpkg-script.XXXX)
 | 
			
		||||
 | 
			
		||||
for _pkgname in "${pkgname[@]}"; do
 | 
			
		||||
    comparepkg=$_pkgname
 | 
			
		||||
    pkgurl=
 | 
			
		||||
    target_pkgver=$(get_full_version)
 | 
			
		||||
    target_pkgver=$(get_full_version "$_pkgname")
 | 
			
		||||
    if ! pkgfile=$(find_cached_package "$_pkgname" "$target_pkgver" "$CARCH"); then
 | 
			
		||||
        die 'tarball not found for package: %s' "${_pkgname}-$target_pkgver"
 | 
			
		||||
    fi
 | 
			
		||||
@@ -90,9 +145,12 @@ for _pkgname in "${pkgname[@]}"; do
 | 
			
		||||
    find-libprovides "$TEMPDIR/$oldpkg" 2>/dev/null | sort > "$TEMPDIR/libraries-$_pkgname-old"
 | 
			
		||||
    find-libprovides "$pkgfile" 2>/dev/null | sort > "$TEMPDIR/libraries-$_pkgname"
 | 
			
		||||
    if ! diff_output="$(sdiff -s "$TEMPDIR/libraries-$_pkgname-old" "$TEMPDIR/libraries-$_pkgname")"; then
 | 
			
		||||
        msg "Sonames differ in %s!" "$_pkgname"
 | 
			
		||||
        message="Sonames differ in $_pkgname!"
 | 
			
		||||
        (( WARN )) && warning "$message" || msg "$message"
 | 
			
		||||
        echo "$diff_output"
 | 
			
		||||
    else
 | 
			
		||||
        msg "No soname differences for %s" "$_pkgname."
 | 
			
		||||
        msg "No soname differences for %s." "$_pkgname"
 | 
			
		||||
    fi
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
(( RMDIR )) || msg "Files saved to %s" "$TEMPDIR"
 | 
			
		||||
 
 | 
			
		||||
@@ -65,7 +65,6 @@ update_repo2(){
 | 
			
		||||
            if ${add_pkg};then
 | 
			
		||||
                local action='add'
 | 
			
		||||
                packages+=("$name")
 | 
			
		||||
#                 checkpkg "${pkgfile}" || return 2
 | 
			
		||||
                if ${sign_pkg};then
 | 
			
		||||
                    [[ -e ${pkgfile}.sig ]] && rm ${pkgfile}.sig
 | 
			
		||||
                    signfile ${pkgfile}
 | 
			
		||||
@@ -109,7 +108,6 @@ update_repo(){
 | 
			
		||||
            if ${add_pkg};then
 | 
			
		||||
                local action='add'
 | 
			
		||||
                packages+=("$pkg")
 | 
			
		||||
#                 checkpkg "${pkgfile}" || return 2
 | 
			
		||||
                if ${sign_pkg};then
 | 
			
		||||
                    [[ -e ${pkgfile}.sig ]] && rm ${pkgfile}.sig
 | 
			
		||||
                    signfile ${pkgfile}
 | 
			
		||||
 
 | 
			
		||||
@@ -33,6 +33,7 @@ REPO_DB_PREFIX=
 | 
			
		||||
REPO_DB_SUFFIX=
 | 
			
		||||
LOCKFILE=
 | 
			
		||||
CLEAN_LOCK=0
 | 
			
		||||
PREVENT_DOWNGRADE=0
 | 
			
		||||
 | 
			
		||||
. @libdir@/artools/util-base.sh
 | 
			
		||||
 | 
			
		||||
@@ -52,6 +53,7 @@ Multiple packages to add can be specified on the command line.\n"
 | 
			
		||||
        printf -- "\n"
 | 
			
		||||
        printf -- "Options:\n"
 | 
			
		||||
        printf -- "  -n, --new         only add packages that are not already in the database\n"
 | 
			
		||||
        printf -- "$(gettext "  -p, --prevent-downgrade  do not add package to database if a newer version is already present\n")"
 | 
			
		||||
    elif [[ $cmd == "links-remove" ]] ; then
 | 
			
		||||
        printf -- "Usage: links-remove [options] <path-to-db> <packagename> ...\n"
 | 
			
		||||
        printf -- "\n"
 | 
			
		||||
@@ -199,6 +201,18 @@ db_write_entry() {
 | 
			
		||||
        if (( ONLYADDNEW )); then
 | 
			
		||||
            return 0
 | 
			
		||||
        fi
 | 
			
		||||
    else
 | 
			
		||||
        pkgentry=$(find_pkgentry "$pkgname")
 | 
			
		||||
        if [[ -n $pkgentry ]]; then
 | 
			
		||||
 | 
			
		||||
            local version=$(sed -n '/^%VERSION%$/ {n;p;q}' "$pkgentry/desc")
 | 
			
		||||
            if (( $(vercmp "$version" "$pkgver") > 0 )); then
 | 
			
		||||
                warning "$(gettext "A newer version for '%s' is already present in database")" "$pkgname"
 | 
			
		||||
                if (( PREVENT_DOWNGRADE )); then
 | 
			
		||||
                    return 0
 | 
			
		||||
                fi
 | 
			
		||||
            fi
 | 
			
		||||
        fi
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # remove an existing entry if it exists, ignore failures
 | 
			
		||||
@@ -459,6 +473,7 @@ while (( $# )); do
 | 
			
		||||
        -s|--sign) SIGN=1 ;;
 | 
			
		||||
        -k|--key) KEY=1 ; shift; GPGKEY=$1 ;;
 | 
			
		||||
        -v|--verify) VERIFY=1 ;;
 | 
			
		||||
        -p|--prevent-downgrade) PREVENT_DOWNGRADE=1 ;;
 | 
			
		||||
        *) args+=("$1") ;;
 | 
			
		||||
    esac
 | 
			
		||||
    shift
 | 
			
		||||
 
 | 
			
		||||
@@ -29,7 +29,9 @@ keepbuilddir=0
 | 
			
		||||
update_first=0
 | 
			
		||||
clean_first=0
 | 
			
		||||
run_namcap=0
 | 
			
		||||
run_checkpkg=0
 | 
			
		||||
temp_chroot=0
 | 
			
		||||
run_nocheck=0
 | 
			
		||||
 | 
			
		||||
bindmounts_ro=()
 | 
			
		||||
bindmounts_rw=()
 | 
			
		||||
@@ -73,6 +75,8 @@ usage() {
 | 
			
		||||
    echo '           Useful for maintaining multiple copies'
 | 
			
		||||
    echo "           Default: $copy"
 | 
			
		||||
    echo '-n         Run namcap on the package'
 | 
			
		||||
    echo '-C         Run checkpkg on the package'
 | 
			
		||||
    echo '-N         Disable check() function'
 | 
			
		||||
    echo '-T         Build in a temporary directory'
 | 
			
		||||
    echo '-U         Run makepkg as a specified user'
 | 
			
		||||
    exit 1
 | 
			
		||||
@@ -80,37 +84,31 @@ usage() {
 | 
			
		||||
 | 
			
		||||
# {{{ functions
 | 
			
		||||
 | 
			
		||||
# Usage: sync_chroot $rootdir $copydir [$copy]
 | 
			
		||||
# Usage: sync_chroot $chrootdir $copydir [$copy]
 | 
			
		||||
sync_chroot() {
 | 
			
		||||
    local rootdir=$1
 | 
			
		||||
    local chrootdir=$1
 | 
			
		||||
    local copydir=$2
 | 
			
		||||
    local copy=${3:-$2}
 | 
			
		||||
 | 
			
		||||
    if [[ "$rootdir" -ef "$copydir" ]]; then
 | 
			
		||||
    if [[ "$chrootdir/root" -ef "$copydir" ]]; then
 | 
			
		||||
        error 'Cannot sync copy with itself: %s' "$copydir"
 | 
			
		||||
        return 1
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    # Get a read lock on the root chroot to make
 | 
			
		||||
    # sure we don't clone a half-updated chroot
 | 
			
		||||
    slock 8 "$rootdir.lock" \
 | 
			
		||||
        "Locking clean chroot [%s]" "$rootdir"
 | 
			
		||||
    slock 8 "$chrootdir/root.lock" \
 | 
			
		||||
        "Locking clean chroot [%s]" "$chrootdir/root"
 | 
			
		||||
 | 
			
		||||
    stat_busy "Synchronizing chroot copy [%s] -> [%s]" "$rootdir" "$copy"
 | 
			
		||||
    if is_subvolume "$rootdir" && is_same_fs "$rootdir" "$(dirname -- "$copydir")" && ! mountpoint -q "$copydir"; then
 | 
			
		||||
        if is_subvolume "$copydir"; then
 | 
			
		||||
    stat_busy "Synchronizing chroot copy [%s] -> [%s]" "$chrootdir/root" "$copy"
 | 
			
		||||
    if is_btrfs "$chrootdir" && ! mountpoint -q "$copydir"; then
 | 
			
		||||
        subvolume_delete_recursive "$copydir" ||
 | 
			
		||||
            die "Unable to delete subvolume %s" "$copydir"
 | 
			
		||||
        else
 | 
			
		||||
            # avoid change of filesystem in case of an umount failure
 | 
			
		||||
            rm --recursive --force --one-file-system "$copydir" ||
 | 
			
		||||
                die "Unable to delete %s" "$copydir"
 | 
			
		||||
        fi
 | 
			
		||||
        btrfs subvolume snapshot "$rootdir" "$copydir" >/dev/null ||
 | 
			
		||||
        btrfs subvolume snapshot "$chrootdir/root" "$copydir" >/dev/null ||
 | 
			
		||||
            die "Unable to create subvolume %s" "$copydir"
 | 
			
		||||
    else
 | 
			
		||||
        mkdir -p "$copydir"
 | 
			
		||||
        rsync -a --delete -q -W -x "$rootdir/" "$copydir"
 | 
			
		||||
        rsync -a --delete -q -W -x "$chrootdir/root/" "$copydir"
 | 
			
		||||
    fi
 | 
			
		||||
    stat_done
 | 
			
		||||
 | 
			
		||||
@@ -249,9 +247,6 @@ download_sources() {
 | 
			
		||||
        env SRCDEST="$SRCDEST" BUILDDIR="$WORKDIR" \
 | 
			
		||||
        makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o "${verifysource_args[@]}" ||
 | 
			
		||||
        die "Could not download sources."
 | 
			
		||||
 | 
			
		||||
    # Clean up garbage from verifysource
 | 
			
		||||
#     rm -rf "$builddir"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
move_products() {
 | 
			
		||||
@@ -287,7 +282,7 @@ move_products() {
 | 
			
		||||
 | 
			
		||||
orig_argv=("$0" "$@")
 | 
			
		||||
 | 
			
		||||
opts='hcur:I:l:nTD:d:U:'
 | 
			
		||||
opts='hcur:I:l:nNCTD:d:U:'
 | 
			
		||||
 | 
			
		||||
while getopts "${opts}" arg; do
 | 
			
		||||
    case "$arg" in
 | 
			
		||||
@@ -299,6 +294,8 @@ while getopts "${opts}" arg; do
 | 
			
		||||
        I) install_pkgs+=("$OPTARG") ;;
 | 
			
		||||
        l) copy="$OPTARG" ;;
 | 
			
		||||
        n) run_namcap=1; makepkg_args+=(--install) ;;
 | 
			
		||||
        N) run_nocheck=1; makepkg_args+=(--nocheck) ;;
 | 
			
		||||
        C) run_checkpkg=1 ;;
 | 
			
		||||
        T) temp_chroot=1; copy+="-$$" ;;
 | 
			
		||||
        U) makepkg_user="$OPTARG" ;;
 | 
			
		||||
        h|*) usage ;;
 | 
			
		||||
@@ -352,7 +349,7 @@ load_vars /etc/makepkg.conf
 | 
			
		||||
lock 9 "$copydir.lock" "Locking chroot copy [%s]" "$copy"
 | 
			
		||||
 | 
			
		||||
if [[ ! -d $copydir ]] || (( clean_first )); then
 | 
			
		||||
    sync_chroot "$chrootdir/root" "$copydir" "$copy"
 | 
			
		||||
    sync_chroot "$chrootdir" "$copydir" "$copy"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
bindmounts_rw+=("${PWD}:/startdir" "${SRCDEST}:/srcdest")
 | 
			
		||||
@@ -385,6 +382,11 @@ if chroot-run \
 | 
			
		||||
    "$copydir" \
 | 
			
		||||
    /chrootbuild "${makepkg_args[@]}"
 | 
			
		||||
then
 | 
			
		||||
    pkgnames=()
 | 
			
		||||
    for pkgfile in "$copydir"/pkgdest/*; do
 | 
			
		||||
        pkgfile=${pkgfile##*/};
 | 
			
		||||
        pkgnames+=("${pkgfile%-*-*-*}");
 | 
			
		||||
    done
 | 
			
		||||
    move_products
 | 
			
		||||
else
 | 
			
		||||
    (( ret += 1 ))
 | 
			
		||||
@@ -399,6 +401,15 @@ if (( ret != 0 )); then
 | 
			
		||||
        die "Build failed, check %s/build" "$copydir"
 | 
			
		||||
    fi
 | 
			
		||||
else
 | 
			
		||||
    if (( run_checkpkg )); then
 | 
			
		||||
        msg "Running checkpkg"
 | 
			
		||||
        msg2 "Downloading current versions"
 | 
			
		||||
        if pacman --noconfirm -Swdd --logfile /dev/null "${pkgnames[@]}"; then
 | 
			
		||||
            msg2 "Checking packages"
 | 
			
		||||
            sudo -u "$makepkg_user" checkpkg --rmdir --warn
 | 
			
		||||
        else
 | 
			
		||||
            warning "Skipped checkpkg due to missing packages"
 | 
			
		||||
        fi
 | 
			
		||||
    fi
 | 
			
		||||
    true
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -19,6 +19,7 @@
 | 
			
		||||
 | 
			
		||||
# TREE_DIR_ARTIX=${WORKSPACE_DIR}/artixlinux
 | 
			
		||||
 | 
			
		||||
# customize buildtree, packages and community should be enabled
 | 
			
		||||
# TREE_NAMES_ARTIX=(
 | 
			
		||||
#         packages
 | 
			
		||||
#         community
 | 
			
		||||
@@ -30,6 +31,7 @@
 | 
			
		||||
#         packages-xorg
 | 
			
		||||
#         packages-python
 | 
			
		||||
#         packages-perl
 | 
			
		||||
#         packages-java
 | 
			
		||||
#         packages-qt5
 | 
			
		||||
#         packages-devel
 | 
			
		||||
#         packages-ruby
 | 
			
		||||
 
 | 
			
		||||
@@ -84,6 +84,7 @@ init_artools_pkg(){
 | 
			
		||||
            packages-xorg
 | 
			
		||||
            packages-python
 | 
			
		||||
            packages-perl
 | 
			
		||||
            packages-java
 | 
			
		||||
            packages-qt5
 | 
			
		||||
            packages-devel
 | 
			
		||||
            packages-ruby
 | 
			
		||||
@@ -94,6 +95,7 @@ init_artools_pkg(){
 | 
			
		||||
            packages-mate
 | 
			
		||||
            packages-kde
 | 
			
		||||
            packages-xfce
 | 
			
		||||
#             packages-haskell
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    HOST_TREE_ARTIX=${HOST_TREE_ARTIX:-"gitea@${GIT_DOMAIN}:artixlinux"}
 | 
			
		||||
 
 | 
			
		||||
@@ -32,8 +32,8 @@ add_svc_s6(){
 | 
			
		||||
    local mnt="$1" name="$2"
 | 
			
		||||
    if [[ -d $mnt/etc/s6/sv/$name ]]; then
 | 
			
		||||
        msg2 "Setting %s ..." "$name"
 | 
			
		||||
        chroot $mnt s6-rc-bundle $name default &>/dev/null
 | 
			
		||||
        chroot $mnt s6-rc -u change default &>/dev/null
 | 
			
		||||
#         chroot $mnt s6-rc-bundle $name default &>/dev/null
 | 
			
		||||
#         chroot $mnt s6-rc -u change default &>/dev/null
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -168,7 +168,7 @@ write_unpackfs_conf(){
 | 
			
		||||
    yaml+=$(write_yaml_map 0 'unpack')
 | 
			
		||||
    yaml+=$(write_yaml_seq_map 2 'source' "/run/artix/bootmnt/artix/x86_64/rootfs.sfs")
 | 
			
		||||
    yaml+=$(write_yaml_map 4 'sourcefs' 'squashfs')
 | 
			
		||||
    yaml+=$(write_yaml_map 4 'destination' '')
 | 
			
		||||
    yaml+=$(write_yaml_map 4 'destination' '""')
 | 
			
		||||
    yaml+=$(write_empty_line)
 | 
			
		||||
    printf '%s' "${yaml}"
 | 
			
		||||
}
 | 
			
		||||
@@ -193,6 +193,7 @@ configure_image(){
 | 
			
		||||
    configure_services "$fs"
 | 
			
		||||
    configure_calamares "$fs"
 | 
			
		||||
    [[ ! -d "$fs/etc/artools" ]] && mkdir -p "$fs/etc/artools"
 | 
			
		||||
    msg2 "Writing live.conf"
 | 
			
		||||
    write_live_session_conf > "$fs/etc/artools/live.conf"
 | 
			
		||||
    msg "Done configuring [%s]" "${fs##*/}"
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -32,7 +32,7 @@ prepare_initramfs(){
 | 
			
		||||
        su ${OWNER} -c "gpg --export ${GPG_KEY} >/tmp/GPG_KEY"
 | 
			
		||||
        exec 17<>/tmp/GPG_KEY
 | 
			
		||||
    fi
 | 
			
		||||
    local _kernel=$(cat $mnt/usr/lib/modules/*/version)
 | 
			
		||||
    local _kernel=$(<$mnt/usr/src/linux/version)
 | 
			
		||||
    ARTIX_GNUPG_FD=${GPG_KEY:+17} artools-chroot $mnt \
 | 
			
		||||
        /usr/bin/mkinitcpio -k ${_kernel} \
 | 
			
		||||
        -c /etc/mkinitcpio-artix.conf \
 | 
			
		||||
@@ -59,8 +59,7 @@ prepare_boot_extras(){
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
configure_grub(){
 | 
			
		||||
    local conf="$1/boot/grub/kernels.cfg"
 | 
			
		||||
    sed -e "s|@iso_label@|${iso_label}|" -i $conf
 | 
			
		||||
    sed -e "s|@iso_label@|${iso_label}|" -i ${iso_root}/boot/grub/kernels.cfg
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
prepare_grub(){
 | 
			
		||||
@@ -104,7 +103,7 @@ prepare_grub(){
 | 
			
		||||
        grub-mkfont -o ${grub}/unicode.pf2 /usr/share/fonts/misc/unifont.bdf
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    local size=4M mnt="${mnt_dir}/efiboot" efi_img="$3/efi.img"
 | 
			
		||||
    local size=4M mnt="${mnt_dir}/efiboot" efi_img="${iso_root}/efi.img"
 | 
			
		||||
    msg2 "Creating fat image of %s ..." "${size}"
 | 
			
		||||
    truncate -s ${size} "${efi_img}"
 | 
			
		||||
    mkfs.fat -n ARTIX_EFI "${efi_img}" &>/dev/null
 | 
			
		||||
 
 | 
			
		||||
@@ -69,7 +69,6 @@ load_profile(){
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
write_live_session_conf(){
 | 
			
		||||
    msg2 "Writing live.conf"
 | 
			
		||||
    local conf=''
 | 
			
		||||
    conf+=$(printf '%s\n' '# live session configuration')
 | 
			
		||||
    conf+=$(printf "\nAUTOLOGIN=%s\n" "${AUTOLOGIN}")
 | 
			
		||||
@@ -85,7 +84,7 @@ load_pkgs(){
 | 
			
		||||
 | 
			
		||||
    local _init="s|@$init||g"
 | 
			
		||||
    case "$init" in
 | 
			
		||||
        'openrc') _init_rm1="s|@runit.*||g"; _init_rm2="s|@s6*||g" ;;
 | 
			
		||||
        'openrc') _init_rm1="s|@runit.*||g"; _init_rm2="s|@s6.*||g" ;;
 | 
			
		||||
        's6') _init_rm1="s|@runit.*||g"; _init_rm2="s|@openrc.*||g" ;;
 | 
			
		||||
        'runit') _init_rm1="s|@s6.*||g"; _init_rm2="s|@openrc.*||g" ;;
 | 
			
		||||
    esac
 | 
			
		||||
 
 | 
			
		||||
@@ -54,9 +54,10 @@ load_team_id(){
 | 
			
		||||
add_repo_to_team(){
 | 
			
		||||
    local pkg="$1" org="$2" team="$3"
 | 
			
		||||
    local id=$(load_team_id "$org" "$team")
 | 
			
		||||
    local gitname=$(get_compliant_name "$pkg")
 | 
			
		||||
 | 
			
		||||
    msg2 "Adding package repo [%s] to team (%s)" "$pkg" "$team"
 | 
			
		||||
    msg2 "Adding package repo [%s] to team (%s)" "$gitname" "$team"
 | 
			
		||||
 | 
			
		||||
    curl -s -X PUT "${GIT_URL}/api/v1/teams/$id/repos/$org/$pkg?access_token=${GIT_TOKEN}" \
 | 
			
		||||
    curl -s -X PUT "${GIT_URL}/api/v1/teams/$id/repos/$org/$gitname?access_token=${GIT_TOKEN}" \
 | 
			
		||||
        -H  "accept: application/json"
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -81,7 +81,7 @@ pull_tree(){
 | 
			
		||||
    local remote_head=$(get_remote_head)
 | 
			
		||||
 | 
			
		||||
    msg "Checking %s (%s)" "${tree}" "$os"
 | 
			
		||||
    if $(has_changes "${local_head}" "${remote_head}");then
 | 
			
		||||
    if has_changes "${local_head}" "${remote_head}";then
 | 
			
		||||
        git pull origin master
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -154,6 +154,8 @@ get_artix_tree(){
 | 
			
		||||
        $(get_cases xorg)) tree=packages-xorg ;;
 | 
			
		||||
        $(get_cases qt5)) tree=packages-qt5 ;;
 | 
			
		||||
        $(get_cases gtk)) tree=packages-gtk ;;
 | 
			
		||||
        $(get_cases java)) tree=packages-java ;;
 | 
			
		||||
        $(get_cases haskell)) tree=packages-haskell ;;
 | 
			
		||||
        $(get_cases devel)) tree=packages-devel ;;
 | 
			
		||||
        $(get_cases lxqt)) tree=packages-lxqt ;;
 | 
			
		||||
        $(get_cases cinnamon)) tree=packages-cinnamon ;;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user