Compare commits
	
		
			13 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 17dc31cdc7 | |||
| 2ba8cb4fa5 | |||
| 278a6d17a7 | |||
| d068fa6b75 | |||
| 70e93c3843 | |||
| 8a0168cbe5 | |||
| c2082be241 | |||
| d5d89cf7a4 | |||
| cc8c2fe38e | |||
| 9bf2bd2671 | |||
| eb638abdfe | |||
| 332cc9751b | |||
| f86e36c361 | 
| @@ -93,7 +93,7 @@ done | ||||
| unshare --mount basestrap -${umode}Mc ${pacman_conf:+-C "$pacman_conf"} "$working_dir" \ | ||||
|     "${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages' | ||||
|  | ||||
| printf '%s.UTF-8 UTF-8\n' C en_US de_DE > "$working_dir/etc/locale.gen" | ||||
| printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$working_dir/etc/locale.gen" | ||||
| printf 'LANG=C.UTF-8\n' > "$working_dir/etc/locale.conf" | ||||
| # printf 'KEYMAP=en\n' > "$working_dir/etc/vconsole.conf" | ||||
| printf "%s\n" "${CHROOTVERSION}" > "$working_dir/.artools" | ||||
|   | ||||
| @@ -112,10 +112,13 @@ update_tree() { | ||||
|  | ||||
| set_maintainer() { | ||||
|     local name email path="$1" | ||||
|     name=$(git config --get user.name) | ||||
|     email=$(git config --get user.email) | ||||
|     name=$(git -C $path config --get user.name) | ||||
|     email=$(git -C $path config --get user.email) | ||||
|     firstline=$(head -n 1 "$path"/PKGBUILD) | ||||
|     sed "2i ${firstline}" -i "$path"/PKGBUILD | ||||
|     sed -e "1s|Maintainer:.*|Maintainer: $name <$email>|" \ | ||||
|         -i "$path"/PKGBUILD | ||||
|     sed -e "2s|Maintainer|Contributor|" -i "$path"/PKGBUILD | ||||
| } | ||||
|  | ||||
| patch_pkg(){ | ||||
| @@ -323,12 +326,22 @@ shift $(( OPTIND - 1 )) | ||||
|  | ||||
| set_arch_repos "$testing" "$staging" "$unstable" | ||||
|  | ||||
| ${sync} && sync_repos | ||||
| if ${sync}; then | ||||
|     sync_repos | ||||
| fi | ||||
|  | ||||
| ${view} && view_build | ||||
| if ${view}; then | ||||
|     view_build | ||||
| fi | ||||
|  | ||||
| ${check} && check_tree | ||||
| if ${check}; then | ||||
|     check_tree | ||||
| fi | ||||
|  | ||||
| ${import} && from_arch | ||||
| if ${import}; then | ||||
|     from_arch | ||||
| fi | ||||
|  | ||||
| ${createnew} && pkgrepo_new | ||||
| if ${createnew}; then | ||||
|     pkgrepo_new | ||||
| fi | ||||
|   | ||||
| @@ -15,8 +15,6 @@ | ||||
| m4_include(lib/base/message.sh) | ||||
| m4_include(lib/pkg/diff.sh) | ||||
|  | ||||
| shopt -s extglob | ||||
|  | ||||
| load_makepkg_config | ||||
|  | ||||
| usage() { | ||||
|   | ||||
| @@ -22,18 +22,6 @@ m4_include(lib/pkg/repo.sh) | ||||
|  | ||||
| #{{{ functions | ||||
|  | ||||
| check_rebuild(){ | ||||
|     if [[ -d "$CARCH"/"${valid_names[10]}" ]] \ | ||||
|     && [[ "${repo_dest}" == "${valid_names[7]}" ]]; then | ||||
|         git rm -r "$CARCH"/"${valid_names[10]}" | ||||
|         git commit -m "switch from ${valid_names[10]} to ${valid_names[7]}" | ||||
|     elif [[ -d "$CARCH"/"${valid_names[7]}" ]] \ | ||||
|     && [[ "${repo_dest}" == "${valid_names[10]}" ]]; then | ||||
|         git rm -r "$CARCH"/"${valid_names[7]}" | ||||
|         git commit -m "switch from ${valid_names[7]} to ${valid_names[10]}" | ||||
|     fi | ||||
| } | ||||
|  | ||||
| check_team(){ | ||||
|     if [[ "${repo_src}" == "${valid_names[0]}" && "${repo_dest}" == "${valid_names[1]}" ]] || \ | ||||
|         [[ "${repo_src}" == "${valid_names[1]}" && "${repo_dest}" == "${valid_names[0]}" ]] || \ | ||||
| @@ -50,11 +38,24 @@ check_team(){ | ||||
|     fi | ||||
| } | ||||
|  | ||||
| path_config() { | ||||
|     [[ "${repo_src}" != 'trunk' ]] && pkgbuild="$CARCH/${repo_src}"/PKGBUILD | ||||
| push_super() { | ||||
|     local name="$1" | ||||
|     msg "Update (%s)" "$name" | ||||
|     git push origin master | ||||
|     git prune | ||||
|     if [[ "${cmd}" != 'commitpkg' ]]; then | ||||
|         check_team | ||||
|     fi | ||||
| } | ||||
|  | ||||
|     # shellcheck disable=1090 | ||||
|     . "$pkgbuild" | ||||
| push_pkg() { | ||||
|     local name="$1" | ||||
|     if braid push "${package}"; then | ||||
|         braid update "${package}" | ||||
|         push_super "$name" | ||||
|     else | ||||
|         error "'braid push %s' failed.\n" "${package}" | ||||
|     fi | ||||
| } | ||||
|  | ||||
| get_repo_commit_msg() { | ||||
| @@ -72,15 +73,15 @@ commit_pkg() { | ||||
|         commit_msg=$(get_commit_msg) | ||||
|         msg "Action: %s" "$commit_msg" | ||||
|         if [[ "${repo_src}" == 'trunk' ]];then | ||||
|             git rm -r trunk | ||||
|             git rm -r $package/trunk | ||||
|         else | ||||
|             git rm -r "$CARCH/${repo_src}" | ||||
|             git rm -r "$package/$CARCH/${repo_src}" | ||||
|         fi | ||||
|     else | ||||
|         action='modify' | ||||
|         commit_msg=$(get_commit_msg) | ||||
|         msg "Action: %s" "$commit_msg" | ||||
|         git add . | ||||
|         git add "$package" | ||||
|     fi | ||||
|     git commit -m "$commit_msg" | ||||
| } | ||||
| @@ -88,60 +89,51 @@ commit_pkg() { | ||||
| repo_commit_pkg() { | ||||
|     local commit_msg | ||||
|  | ||||
|     [[ -d "$CARCH/${repo_dest}" ]] && git rm -r "$CARCH/${repo_dest}" | ||||
|     [[ ! -d "$CARCH" ]] && mkdir "$CARCH" | ||||
|     [[ ! -d "$CARCH/${repo_dest}" ]] && mkdir "$CARCH/${repo_dest}" | ||||
|     [[ -d "$package/$CARCH/${repo_dest}" ]] && git rm -r "$package/$CARCH/${repo_dest}" | ||||
|     [[ ! -d "$package/$CARCH" ]] && mkdir "$package/$CARCH" | ||||
|     [[ ! -d "$package/$CARCH/${repo_dest}" ]] && mkdir "$package/$CARCH/${repo_dest}" | ||||
|  | ||||
|     if [[ "${repo_src}" == 'trunk' ]]; then | ||||
|         action='add' | ||||
|         commit_msg=$(get_repo_commit_msg) | ||||
|         msg "Action: %s" "$commit_msg" | ||||
|         check_rebuild | ||||
|         cp -r trunk/* "$CARCH/${repo_dest}"/ | ||||
|         cp -r "$package"/trunk/* "$package/$CARCH/${repo_dest}"/ | ||||
|     else | ||||
|         action='move' | ||||
|         [[ ! -f $pkgbuild ]] && die "%s does not exist!" "$pkgbuild" | ||||
|         commit_msg=$(get_repo_commit_msg) | ||||
|         msg "Action: %s" "$commit_msg" | ||||
|         cp -r "$CARCH/${repo_src}"/* "$CARCH/${repo_dest}"/ | ||||
|         git rm -r "$CARCH/${repo_src}" | ||||
|         cp -r "$package/$CARCH/${repo_src}"/* "$package/$CARCH/${repo_dest}"/ | ||||
|         git rm -r "$package/$CARCH/${repo_src}" | ||||
|     fi | ||||
|     git add . | ||||
|     git add "$package" | ||||
|     git commit -m "$commit_msg" | ||||
| } | ||||
|  | ||||
| run(){ | ||||
|     local artixpath head tree | ||||
|     local artixpath head tree tree_name | ||||
|     artixpath=$(find_pkg "${TREE_DIR_ARTIX}" "${package}") | ||||
|     if [[ -n ${artixpath} ]];then | ||||
|         tree=${artixpath%/*} | ||||
|         tree_name=${tree##*/} | ||||
|         cd "$tree" || return | ||||
|         head=$(get_local_head) | ||||
|  | ||||
|         cd "${artixpath}" || return | ||||
|  | ||||
|         path_config | ||||
|  | ||||
|         if [[ "${cmd}" == 'commitpkg' ]];then | ||||
|             commit_pkg | ||||
|         else | ||||
|             repo_commit_pkg | ||||
|         pkgbuild="$package"/trunk/PKGBUILD | ||||
|         if [[ "${repo_src}" != 'trunk' ]]; then | ||||
|             pkgbuild="$package/$CARCH/${repo_src}"/PKGBUILD | ||||
|         fi | ||||
|         # shellcheck disable=1090 | ||||
|         . "$pkgbuild" | ||||
|  | ||||
|         cd "$tree" || return | ||||
|         case "${cmd}" in | ||||
|             'commitpkg') commit_pkg ;; | ||||
|             *) repo_commit_pkg ;; | ||||
|         esac | ||||
|  | ||||
|         msg "Checking (%s) (Artix)" "${tree##*/}" | ||||
|         pull_tree "${tree##*/}" "$head" | ||||
|  | ||||
|         if braid push "${package}"; then | ||||
|             braid update "${package}" | ||||
|             msg "Update (%s)" "${tree##*/}" | ||||
|             git push origin master | ||||
|             git prune | ||||
|             [[ "${cmd}" != 'commitpkg' ]] && check_team | ||||
|         else | ||||
|             warning "'braid push %s' failed.\n" "${package}" | ||||
|         fi | ||||
|         msg "Checking (%s) (Artix)" "$tree_name" | ||||
|         pull_tree "$tree_name" "$head" | ||||
|         push_pkg "$tree_name" | ||||
|     else | ||||
|         die "Package '%s' does not exist!" "${package}" | ||||
|     fi | ||||
| @@ -168,8 +160,6 @@ repo_src='trunk' | ||||
| package='' | ||||
| remove=false | ||||
|  | ||||
| pkgbuild=trunk/PKGBUILD | ||||
|  | ||||
| cmd=${0##*/} | ||||
| repo_dest=${cmd%pkg} | ||||
|  | ||||
|   | ||||
| @@ -23,6 +23,8 @@ add(){ | ||||
|     if pkgfile=$(find_cached_pkgfile "${pkgname}"); then | ||||
|         msg "Found: %s" "${pkgfile}" | ||||
|         packages+=("${pkgname}") | ||||
|         dbargs+=("${packages[@]}") | ||||
|         linksargs+=("${packages[@]}") | ||||
|         action='add' | ||||
|         ln -sfv "${pkgfile}"{,.sig} "$repo_path"/ | ||||
|     fi | ||||
| @@ -36,13 +38,17 @@ remove(){ | ||||
|  | ||||
| repo_action(){ | ||||
|     local packages=() action func="$1" | ||||
|     local dbargs=( -R "${dest_repo}.${pkgdb_ext}") | ||||
|     local linksargs=("${dest_repo}.${linksdb_ext}" ) | ||||
|     for pkgname in "${passfiles[@]}"; do | ||||
|         "$func" | ||||
|     done | ||||
|     cd "$repo_path" || return | ||||
|     if [[ -n "${action}" ]]; then | ||||
|         repo-"${action}" -R "${dest_repo}"."${pkgdb_ext}" "${packages[@]}" | ||||
|         ${linksdb} && links-"${action}" "${dest_repo}"."${linksdb_ext}" "${packages[@]}" | ||||
|         repo-"${action}" "${dbargs[@]}" | ||||
|         if ${linksdb}; then | ||||
|             links-"${action}" "${linksargs[@]}" | ||||
|         fi | ||||
|     fi | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -2,8 +2,6 @@ | ||||
| # | ||||
| # SPDX-License-Identifier: GPL-3.0-or-later | ||||
|  | ||||
| shopt -s extglob | ||||
|  | ||||
| m4_include(lib/base/message.sh) | ||||
| m4_include(lib/pkg/diff.sh) | ||||
|  | ||||
| @@ -37,12 +35,19 @@ _EOF_ | ||||
| } | ||||
|  | ||||
| MAKEPKG_CONF=/etc/makepkg.conf | ||||
| POOLDIR=/srv/pkgpool | ||||
|  | ||||
| VERBOSE=0 | ||||
| TARLIST=0 | ||||
| DIFFOSCOPE=0 | ||||
| PKGINFO=0 | ||||
| BUILDINFO=0 | ||||
|  | ||||
| DIFFMODE=--side-by-side | ||||
| DIFFCOLOR=--color=auto | ||||
| DIFFWIDTH=--width=auto | ||||
| DIFFOPTIONS=(--expand-tabs) | ||||
|  | ||||
| # option checking | ||||
| while (( $# )); do | ||||
|     case $1 in | ||||
| @@ -51,6 +56,7 @@ while (( $# )); do | ||||
|             exit 0 | ||||
|         ;; | ||||
|         -M|--makepkg-config) | ||||
|             (( $# <= 1 )) && die "missing argument for %s" "$1" | ||||
|             MAKEPKG_CONF="$2" | ||||
|             shift 2 | ||||
|         ;; | ||||
| @@ -74,11 +80,50 @@ while (( $# )); do | ||||
|             VERBOSE=1 | ||||
|             shift | ||||
|         ;; | ||||
|         -u|-U|--unified) | ||||
|             DIFFMODE=--unified | ||||
|             shift | ||||
|         ;; | ||||
|         -y|--side-by-side) | ||||
|             DIFFMODE=--side-by-side | ||||
|             shift | ||||
|         ;; | ||||
|         --color|--color=*) | ||||
|             if [[ $2 == never || $2 == always || $2 == auto ]]; then | ||||
|                 DIFFCOLOR="--color=$2" | ||||
|                 shift 2 | ||||
|                 continue | ||||
|             fi | ||||
|             if [[ $1 == --color ]]; then | ||||
|                 DIFFCOLOR="--color=auto" | ||||
|             else | ||||
|                 DIFFCOLOR="$1" | ||||
|             fi | ||||
|             shift | ||||
|         ;; | ||||
|         -W|--width) | ||||
|             (( $# <= 1 )) && die "missing argument for %s" "$1" | ||||
|             DIFFWIDTH="--width=$2" | ||||
|             shift 2 | ||||
|         ;; | ||||
|         --width=*) | ||||
|             DIFFWIDTH="$1" | ||||
|             shift | ||||
|         ;; | ||||
|         -P|--pool) | ||||
|             (( $# <= 1 )) && die "missing argument for %s" "$1" | ||||
|             POOLDIR="$2" | ||||
|             shift 2 | ||||
|         ;; | ||||
|         --pool=*) | ||||
|             POOLDIR="${1#*=}" | ||||
|             shift | ||||
|         ;; | ||||
|         --) | ||||
|             shift | ||||
|             break | ||||
|         ;; | ||||
|         -*,--*) | ||||
|         -*|--*) | ||||
|             die "invalid argument: %s" "$1" | ||||
|         ;; | ||||
|         *) | ||||
| @@ -87,13 +132,29 @@ while (( $# )); do | ||||
|     esac | ||||
| done | ||||
|  | ||||
| # Set options based on flags or magic values | ||||
| if (( VERBOSE )); then | ||||
|     if [[ $DIFFMODE == --unified ]]; then | ||||
|         DIFFMODE="--unified=99999" | ||||
|     fi | ||||
| else | ||||
|     DIFFOPTIONS+=(--suppress-common-lines) | ||||
| fi | ||||
| if [[ $DIFFWIDTH == --width=columns ]]; then | ||||
|     DIFFWIDTH="--width=${COLUMNS:-130}" | ||||
| fi | ||||
| if [[ $DIFFWIDTH != --width=auto ]]; then | ||||
|     DIFFOPTIONS+=("${DIFFWIDTH}") | ||||
| fi | ||||
| DIFFOPTIONS+=("${DIFFMODE}" "${DIFFCOLOR}") | ||||
|  | ||||
| if ! (( DIFFOSCOPE || TARLIST || PKGINFO || BUILDINFO )); then | ||||
|     TARLIST=1 | ||||
| fi | ||||
|  | ||||
| # Source makepkg.conf; fail if it is not found | ||||
| if [[ -r "${MAKEPKG_CONF}" ]]; then | ||||
|     # shellcheck source=makepkg-x86_64.conf | ||||
|     # shellcheck source=config/makepkg/x86_64.conf | ||||
|     source "${MAKEPKG_CONF}" | ||||
| else | ||||
|     die "${MAKEPKG_CONF} not found!" | ||||
| @@ -121,6 +182,19 @@ tar_list() { | ||||
|     fi | sort | ||||
| } | ||||
|  | ||||
| file_line_length() { | ||||
|     path="$1" | ||||
|     wc -L "${path}" | tail -n1 | sed -E 's/^ +//g' | cut -d' ' -f1 | ||||
| } | ||||
|  | ||||
| file_diff_columns() { | ||||
|     file1="$1" | ||||
|     file2="$2" | ||||
|     file1_length=$(file_line_length "$file1") | ||||
|     file2_length=$(file_line_length "$file2") | ||||
|     echo $(( file1_length + file2_length + 3 )) | ||||
| } | ||||
|  | ||||
| diff_pkgs() { | ||||
|     local oldpkg newpkg | ||||
|     oldpkg=$(readlink -m "$1") | ||||
| @@ -129,32 +203,45 @@ diff_pkgs() { | ||||
|     [[ -f $oldpkg ]] || die "No such file: %s" "${oldpkg}" | ||||
|     [[ -f $newpkg ]] || die "No such file: %s" "${newpkg}" | ||||
|  | ||||
|     if (( TARLIST )); then | ||||
|         tar_list "$oldpkg" > "$TMPDIR/filelist-old" | ||||
|         tar_list "$newpkg" > "$TMPDIR/filelist" | ||||
|     DIFFOPTIONS+=(--label "${oldpkg}" --label "${newpkg}") | ||||
|  | ||||
|         sdiff -s "$TMPDIR/filelist-old" "$TMPDIR/filelist" | ||||
|     if (( TARLIST )); then | ||||
|         tar_list "$oldpkg" > "$TMPDIR/old" | ||||
|         tar_list "$newpkg" > "$TMPDIR/new" | ||||
|     fi | ||||
|  | ||||
|     if (( PKGINFO )); then | ||||
|         bsdtar xOqf "$oldpkg" .PKGINFO > "$TMPDIR/pkginfo-old" | ||||
|         bsdtar xOqf "$newpkg" .PKGINFO > "$TMPDIR/pkginfo" | ||||
|  | ||||
|         sdiff -s "$TMPDIR/pkginfo-old" "$TMPDIR/pkginfo" | ||||
|         bsdtar xOqf "$oldpkg" .PKGINFO > "$TMPDIR/old" | ||||
|         bsdtar xOqf "$newpkg" .PKGINFO > "$TMPDIR/new" | ||||
|     fi | ||||
|  | ||||
|     if (( BUILDINFO )); then | ||||
|         bsdtar xOqf "$oldpkg" .BUILDINFO > "$TMPDIR/buildinfo-old" | ||||
|         bsdtar xOqf "$newpkg" .BUILDINFO > "$TMPDIR/buildinfo" | ||||
|         bsdtar xOqf "$oldpkg" .BUILDINFO > "$TMPDIR/old" | ||||
|         bsdtar xOqf "$newpkg" .BUILDINFO > "$TMPDIR/new" | ||||
|     fi | ||||
|  | ||||
|         sdiff -s "$TMPDIR/buildinfo-old" "$TMPDIR/buildinfo" | ||||
|     if (( TARLIST || PKGINFO || BUILDINFO )); then | ||||
|     # Resolve dynamic auto width one we know the content to diff | ||||
|         if [[ $DIFFWIDTH == --width=auto ]]; then | ||||
|             AUTOLENGTH=$(file_diff_columns "$TMPDIR/old" "$TMPDIR/new") | ||||
|             DIFFOPTIONS+=("--width=${AUTOLENGTH}") | ||||
|         fi | ||||
|  | ||||
|         # Print a header for side-by-side view as it lacks labels | ||||
|         if [[ $DIFFMODE == --side-by-side ]]; then | ||||
|             printf -- "--- %s\n+++ %s\n" "${oldpkg}" "${newpkg}" | ||||
|         fi | ||||
|  | ||||
|         diff "${DIFFOPTIONS[@]}" "$TMPDIR/old" "$TMPDIR/new" | ||||
|     fi | ||||
|  | ||||
|     if (( DIFFOSCOPE )); then | ||||
|         diffoscope "$oldpkg" "$newpkg" | ||||
|         diffoscope "${DIFFCOLOR/--color/--text-color}" "$oldpkg" "$newpkg" | ||||
|     fi | ||||
| } | ||||
|  | ||||
| shopt -s extglob | ||||
|  | ||||
| fetch_pkg() { | ||||
|     local pkg pkgdest pkgurl | ||||
|     case $1 in | ||||
| @@ -170,8 +257,19 @@ fetch_pkg() { | ||||
|             pkg=$1 ;; | ||||
|     esac | ||||
|  | ||||
|     [[ -n $pkgurl ]] || pkgurl=$(pacman -Spdd --print-format '%l' --noconfirm "$pkg") || | ||||
|     if [[ -z ${pkgurl} ]]; then | ||||
|         # Try to find latest package in pool dir | ||||
|         if [[ -d ${POOLDIR} ]]; then | ||||
|             shopt -s extglob nullglob | ||||
|             pkgurl=$(printf "%s\n" "${POOLDIR}"/*/"${_pkgname}"-!(*-*)-!(*-*)-!(*-*).pkg.tar!(*.sig)|sort -Vr|head -1) | ||||
|             shopt -u extglob nullglob | ||||
|         fi | ||||
|         # Search via pacman database if no pool file exists | ||||
|         if [[ ! -f ${pkgurl} ]]; then | ||||
|             pkgurl=$(pacman -Spdd --print-format '%l' --noconfirm "$pkg") || | ||||
|             die "Couldn't download previous package for %s." "$pkg" | ||||
|         fi | ||||
|     fi | ||||
|  | ||||
|     pkg=${pkgurl##*/} | ||||
|     pkgdest=$(mktemp -t -d "${pkg}-XXXXXX")/${pkg} | ||||
| @@ -192,12 +290,14 @@ fetch_pkg() { | ||||
|     echo "$pkgdest" | ||||
| } | ||||
|  | ||||
| shopt -u extglob | ||||
|  | ||||
| if (( $# < 2 )); then | ||||
|     if [[ ! -f PKGBUILD ]]; then | ||||
|         die "This must be run in the directory of a built package.\nTry '$(basename "$0") --help' for more information." | ||||
|     fi | ||||
|  | ||||
|     # shellcheck source=PKGBUILD.proto | ||||
|     # shellcheck source=contrib/makepkg/PKGBUILD.proto | ||||
|     . ./PKGBUILD | ||||
|     if [[ ${arch[0]} == 'any' ]]; then | ||||
|         CARCH='any' | ||||
|   | ||||
| @@ -15,7 +15,6 @@ | ||||
| m4_include(lib/base/message.sh) | ||||
|  | ||||
| set -e | ||||
| shopt -s extglob | ||||
|  | ||||
| IGNORE_INTERNAL=0 | ||||
|  | ||||
| @@ -51,9 +50,13 @@ else | ||||
|     pushd "$WORKDIR" >/dev/null | ||||
| fi | ||||
|  | ||||
| shopt -s extglob | ||||
|  | ||||
| process_sofile() { | ||||
|     # extract the library name: libfoo.so | ||||
|     shopt -s extglob nullglob | ||||
|     soname="${sofile%.so?(+(.+([0-9])))}".so | ||||
|     shopt -u extglob nullglob | ||||
|     # extract the major version: 1 | ||||
|     soversion="${sofile##*\.so\.}" | ||||
|     if [[ "$soversion" = "$sofile" ]] && ((IGNORE_INTERNAL)); then | ||||
| @@ -66,6 +69,8 @@ process_sofile() { | ||||
|     fi | ||||
| } | ||||
|  | ||||
| shopt -u extglob | ||||
|  | ||||
| case $script_mode in | ||||
|     deps) find_args=(-perm -u+x);; | ||||
|     provides) find_args=(-name '*.so*');; | ||||
|   | ||||
| @@ -329,13 +329,14 @@ fi | ||||
| # Pass all arguments after -- right to makepkg | ||||
| makepkg_args+=("${@:$OPTIND}") | ||||
|  | ||||
| # See if -R or -e was passed to makepkg | ||||
| # See if -R, -e or -A was passed to makepkg | ||||
| for arg in "${@:$OPTIND}"; do | ||||
|     case ${arg%%=*} in | ||||
|         --skip*|--holdver) verifysource_args+=("$arg") ;; | ||||
|         --skip*|--holdver|--ignorearch) verifysource_args+=("$arg") ;; | ||||
|         --repackage|--noextract) keepbuilddir=1 ;; | ||||
|         --*) ;; | ||||
|         -*R*|-*e*) keepbuilddir=1 ;; | ||||
|         -*A*) verifysource_args+=(-A) ;;& | ||||
|         -*R*|-*e*) keepbuilddir=1 ;;& | ||||
|     esac | ||||
| done | ||||
|  | ||||
|   | ||||
| @@ -46,13 +46,13 @@ CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \ | ||||
| CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS" | ||||
| LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" | ||||
| LTOFLAGS="-flto=auto" | ||||
| #RUSTFLAGS="-C opt-level=2" | ||||
| RUSTFLAGS="" | ||||
| #-- Make Flags: change this for DistCC/SMP systems | ||||
| #MAKEFLAGS="-j2" | ||||
| #-- Debugging flags | ||||
| DEBUG_CFLAGS="-g" | ||||
| DEBUG_CXXFLAGS="$DEBUG_CFLAGS" | ||||
| #DEBUG_RUSTFLAGS="-C debuginfo=2" | ||||
| DEBUG_RUSTFLAGS="-C debuginfo=2" | ||||
|  | ||||
| ######################################################################### | ||||
| # BUILD ENVIRONMENT | ||||
|   | ||||
| @@ -1,99 +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  = usr/share/help/* !usr/share/help/en* | ||||
| NoExtract  = usr/share/gtk-doc/html/* usr/share/doc/* | ||||
| NoExtract  = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/* | ||||
| NoExtract   = !*locale*/en*/* !usr/share/i18n/charmaps/UTF-8.gz !usr/share/*locale*/locale.* | ||||
| NoExtract   = !usr/share/*locales/en_?? !usr/share/*locales/i18n* !usr/share/*locales/iso* | ||||
| NoExtract   = !usr/share/*locales/trans* | ||||
| NoExtract  = usr/share/man/* usr/share/info/* | ||||
| NoExtract  = usr/share/vim/vim*/lang/* | ||||
|  | ||||
| # Misc options | ||||
| #UseSyslog | ||||
| #Color | ||||
| NoProgressBar | ||||
| # We cannot check disk space from within a chroot environment | ||||
| #CheckSpace | ||||
| VerbosePkgLists | ||||
| ParallelDownloads = 5 | ||||
|  | ||||
| # 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] | ||||
| Include = /etc/pacman.d/mirrorlist | ||||
|  | ||||
| [world] | ||||
| 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] | ||||
| #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 | ||||
| @@ -9,8 +9,6 @@ | ||||
|  | ||||
| export LANG=C | ||||
|  | ||||
| shopt -s extglob | ||||
|  | ||||
| if [[ -t 2 && "$TERM" != dumb ]]; then | ||||
|     colorize | ||||
| else | ||||
|   | ||||
| @@ -16,7 +16,7 @@ get_pkg_org(){ | ||||
|     case ${pkg} in | ||||
|         ruby-*) org="packagesRuby" ;; | ||||
|         perl-*) org="packagesPerl" ;; | ||||
|         python-*|python2-*) org="packagesPython" ;; | ||||
|         python-*) org="packagesPython" ;; | ||||
|         *) sub=${pkg:0:1}; org="packages${sub^^}" ;; | ||||
|     esac | ||||
|     printf "%s\n" "$org" | ||||
|   | ||||
| @@ -2,6 +2,8 @@ | ||||
|  | ||||
| #{{{ functions | ||||
|  | ||||
| shopt -s extglob | ||||
|  | ||||
| find_cached_pkgfile() { | ||||
|     local searchdirs=("$PKGDEST" "$PWD") results=() | ||||
|     local pkg="$1" | ||||
| @@ -25,6 +27,8 @@ find_cached_pkgfile() { | ||||
|     esac | ||||
| } | ||||
|  | ||||
| shopt -u extglob | ||||
|  | ||||
| get_pkgbasename() { | ||||
|     local name="$1" | ||||
|     local rm_pkg=${name%.pkg.tar*} | ||||
|   | ||||
| @@ -12,15 +12,21 @@ pkgver_equal() { | ||||
|     fi | ||||
| } | ||||
|  | ||||
| shopt -s extglob | ||||
|  | ||||
| find_cached_package() { | ||||
|     local searchdirs=("$PKGDEST" "$PWD") results=() | ||||
|     local searchdirs=("$PWD" "$PKGDEST") results=() | ||||
|     local targetname=$1 targetver=$2 targetarch=$3 | ||||
|     local dir pkg pkgbasename name ver rel arch r results | ||||
|     local dir pkg packages pkgbasename name ver rel arch r results | ||||
|  | ||||
|     for dir in "${searchdirs[@]}"; do | ||||
|         [[ -d $dir ]] || continue | ||||
|  | ||||
|         for pkg in "$dir"/*.pkg.tar?(.!(sig|*.*)); do | ||||
|         shopt -s extglob nullglob | ||||
|         mapfile -t packages < <(printf "%s\n" "$dir"/"${targetname}"-"${targetver}"-*"${targetarch}".pkg.tar?(.!(sig|*.*))) | ||||
|         shopt -u extglob nullglob | ||||
|  | ||||
|         for pkg in "${packages[@]}"; do | ||||
|             [[ -f $pkg ]] || continue | ||||
|  | ||||
|             # avoid adding duplicates of the same inode | ||||
| @@ -64,4 +70,6 @@ find_cached_package() { | ||||
|     esac | ||||
| } | ||||
|  | ||||
| shopt -u extglob | ||||
|  | ||||
| #}}} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user