mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 18:06:19 +02:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ee4edefa2f | ||
![]() |
a8b64995ee | ||
![]() |
2c9855fe6b | ||
![]() |
4d4ffb5d8f | ||
![]() |
2d79191c97 |
17
archbuild.in
17
archbuild.in
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
m4_include(lib/common.sh)
|
m4_include(lib/common.sh)
|
||||||
|
|
||||||
# FIXME: temporary added curl until pacman 4.0 moves to [core]
|
base_packages=(base base-devel sudo)
|
||||||
base_packages=(base base-devel sudo curl)
|
|
||||||
|
|
||||||
cmd="${0##*/}"
|
cmd="${0##*/}"
|
||||||
if [[ "${cmd%%-*}" == 'multilib' ]]; then
|
if [[ "${cmd%%-*}" == 'multilib' ]]; then
|
||||||
@@ -53,15 +52,6 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
|
|||||||
done
|
done
|
||||||
exec 9>&-
|
exec 9>&-
|
||||||
|
|
||||||
# FIXME: temporary workaround until pacman 4.0 moves to [core]
|
|
||||||
if pacman -V | grep -q 'v4.' && ( [[ "$repo" == 'extra' || "$repo" == 'multilib' ]] ); then
|
|
||||||
pacman_conf=$(mktemp)
|
|
||||||
cp "@pkgdatadir@/pacman-${repo}.conf" "${pacman_conf}"
|
|
||||||
sed -r 's/^#(SigLevel = Never)/\1/' -i "${pacman_conf}"
|
|
||||||
else
|
|
||||||
pacman_conf="@pkgdatadir@/pacman-${repo}.conf"
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -rf "${chroots}/${repo}-${arch}"
|
rm -rf "${chroots}/${repo}-${arch}"
|
||||||
mkdir -p "${chroots}/${repo}-${arch}"
|
mkdir -p "${chroots}/${repo}-${arch}"
|
||||||
setarch "${arch}" mkarchroot \
|
setarch "${arch}" mkarchroot \
|
||||||
@@ -69,11 +59,6 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
|
|||||||
-M "@pkgdatadir@/makepkg-${arch}.conf" \
|
-M "@pkgdatadir@/makepkg-${arch}.conf" \
|
||||||
"${chroots}/${repo}-${arch}/root" \
|
"${chroots}/${repo}-${arch}/root" \
|
||||||
"${base_packages[@]}"
|
"${base_packages[@]}"
|
||||||
|
|
||||||
# FIXME: temporary workaround until pacman 4.0 moves to [core]
|
|
||||||
if pacman -V | grep -q 'v4.' && ( [[ "$repo" == 'extra' || "$repo" == 'multilib' ]] ); then
|
|
||||||
cp "@pkgdatadir@/pacman-${repo}.conf" "${chroots}/${repo}-${arch}/root/etc/pacman.conf"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
setarch ${arch} mkarchroot \
|
setarch ${arch} mkarchroot \
|
||||||
-u \
|
-u \
|
||||||
|
29
commitpkg.in
29
commitpkg.in
@@ -3,13 +3,19 @@
|
|||||||
m4_include(lib/common.sh)
|
m4_include(lib/common.sh)
|
||||||
|
|
||||||
getpkgfile() {
|
getpkgfile() {
|
||||||
if [[ ${#} -ne 1 ]]; then
|
case $# in
|
||||||
die 'No canonical package found!'
|
0)
|
||||||
elif [[ ! -f $1 ]]; then
|
error 'No canonical package found!'
|
||||||
die "Package ${1} not found!"
|
return 1
|
||||||
fi
|
;;
|
||||||
|
[!1])
|
||||||
|
error 'Failed to canonicalize package name -- multiple packages found:'
|
||||||
|
msg2 '%s' "$@"
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo ${1}
|
echo "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Source makepkg.conf; fail if it is not found
|
# Source makepkg.conf; fail if it is not found
|
||||||
@@ -127,15 +133,10 @@ for _arch in ${arch[@]}; do
|
|||||||
|
|
||||||
for _pkgname in ${pkgname[@]}; do
|
for _pkgname in ${pkgname[@]}; do
|
||||||
fullver=$(get_full_version $_pkgname)
|
fullver=$(get_full_version $_pkgname)
|
||||||
pkgfile=$(getpkgfile "$_pkgname-$fullver-${_arch}".pkg.tar.?z 2>/dev/null)
|
|
||||||
pkgdestfile=$(getpkgfile "$PKGDEST/$_pkgname-$fullver-${_arch}".pkg.tar.?z 2>/dev/null)
|
|
||||||
|
|
||||||
if [[ -f $pkgfile ]]; then
|
if ! pkgfile=$(shopt -s nullglob;
|
||||||
pkgfile="./$pkgfile"
|
getpkgfile "${DESTDIR+$DESTDIR/}$_pkgname-$fullver-${_arch}".pkg.tar.?z); then
|
||||||
elif [[ -f $pkgdestfile ]]; then
|
warning "Skipping $_pkgname-$fullver-$_arch: failed to locate package file"
|
||||||
pkgfile="$pkgdestfile"
|
|
||||||
else
|
|
||||||
warning "Could not find ${pkgfile}. Skipping ${_arch}"
|
|
||||||
skip_arches+=($_arch)
|
skip_arches+=($_arch)
|
||||||
continue 2
|
continue 2
|
||||||
fi
|
fi
|
||||||
|
@@ -73,7 +73,7 @@ find . -type f $find_args | while read filename; do
|
|||||||
if [[ $script_mode = "provides" ]]; then
|
if [[ $script_mode = "provides" ]]; then
|
||||||
# get the string binaries link to: libfoo.so.1.2 -> libfoo.so.1
|
# get the string binaries link to: libfoo.so.1.2 -> libfoo.so.1
|
||||||
sofile=$(LC_ALL=C readelf -d "$filename" 2>/dev/null | sed -n 's/.*Library soname: \[\(.*\)\].*/\1/p')
|
sofile=$(LC_ALL=C readelf -d "$filename" 2>/dev/null | sed -n 's/.*Library soname: \[\(.*\)\].*/\1/p')
|
||||||
[[ -z $sofile" ]] && sofile="${filename##*/}"
|
[[ -z $sofile ]] && sofile="${filename##*/}"
|
||||||
process_sofile
|
process_sofile
|
||||||
elif [[ $script_mode = "deps" ]]; then
|
elif [[ $script_mode = "deps" ]]; then
|
||||||
# process all libraries needed by the binary
|
# process all libraries needed by the binary
|
||||||
|
@@ -20,6 +20,7 @@ install_pkg=
|
|||||||
add_to_db=false
|
add_to_db=false
|
||||||
run_namcap=false
|
run_namcap=false
|
||||||
chrootdir=
|
chrootdir=
|
||||||
|
passeddir=
|
||||||
|
|
||||||
default_copy=$USER
|
default_copy=$USER
|
||||||
[[ -n $SUDO_USER ]] && default_copy=$SUDO_USER
|
[[ -n $SUDO_USER ]] && default_copy=$SUDO_USER
|
||||||
@@ -52,8 +53,8 @@ usage() {
|
|||||||
echo '-I <pkg> Install a package into the working copy of the chroot'
|
echo '-I <pkg> Install a package into the working copy of the chroot'
|
||||||
echo '-l <copy> The directory to use as the working copy of the chroot'
|
echo '-l <copy> The directory to use as the working copy of the chroot'
|
||||||
echo ' Useful for maintaining multiple copies.'
|
echo ' Useful for maintaining multiple copies.'
|
||||||
echo '-n Run namcap on the package'
|
|
||||||
echo " Default: $default_copy"
|
echo " Default: $default_copy"
|
||||||
|
echo '-n Run namcap on the package'
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +64,7 @@ while getopts 'hcudr:I:l:n' arg; do
|
|||||||
c) clean_first=true ;;
|
c) clean_first=true ;;
|
||||||
u) update_first=true ;;
|
u) update_first=true ;;
|
||||||
d) add_to_db=true ;;
|
d) add_to_db=true ;;
|
||||||
r) chrootdir="$OPTARG" ;;
|
r) passeddir="$OPTARG" ;;
|
||||||
I) install_pkg="$OPTARG" ;;
|
I) install_pkg="$OPTARG" ;;
|
||||||
l) copy="$OPTARG" ;;
|
l) copy="$OPTARG" ;;
|
||||||
n) run_namcap=true ;;
|
n) run_namcap=true ;;
|
||||||
@@ -72,7 +73,7 @@ while getopts 'hcudr:I:l:n' arg; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Canonicalize chrootdir, getting rid of trailing /
|
# Canonicalize chrootdir, getting rid of trailing /
|
||||||
chrootdir=$(readlink -e "$chrootdir")
|
chrootdir=$(readlink -e "$passeddir")
|
||||||
|
|
||||||
if [[ ${copy:0:1} = / ]]; then
|
if [[ ${copy:0:1} = / ]]; then
|
||||||
copydir=$copy
|
copydir=$copy
|
||||||
@@ -101,7 +102,7 @@ if [[ ! -f PKGBUILD && -z $install_pkg ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d $chrootdir ]]; then
|
if [[ ! -d $chrootdir ]]; then
|
||||||
die "No chroot dir defined, or invalid path '$chrootdir'"
|
die "No chroot dir defined, or invalid path '$passeddir'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d $chrootdir/root ]]; then
|
if [[ ! -d $chrootdir/root ]]; then
|
||||||
|
@@ -47,8 +47,8 @@ Architecture = auto
|
|||||||
# the following line. This will treat any key imported into pacman's keyring as
|
# the following line. This will treat any key imported into pacman's keyring as
|
||||||
# trusted.
|
# trusted.
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
# Disable signature checks for now
|
# For now, off by default unless you read the above.
|
||||||
#SigLevel = Never
|
SigLevel = Never
|
||||||
|
|
||||||
#
|
#
|
||||||
# REPOSITORIES
|
# REPOSITORIES
|
||||||
|
@@ -47,7 +47,7 @@ Architecture = auto
|
|||||||
# the following line. This will treat any key imported into pacman's keyring as
|
# the following line. This will treat any key imported into pacman's keyring as
|
||||||
# trusted.
|
# trusted.
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
# Disable signature checks for now
|
# For now, off by default unless you read the above.
|
||||||
SigLevel = Never
|
SigLevel = Never
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -47,7 +47,7 @@ Architecture = auto
|
|||||||
# the following line. This will treat any key imported into pacman's keyring as
|
# the following line. This will treat any key imported into pacman's keyring as
|
||||||
# trusted.
|
# trusted.
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
# Disable signature checks for now
|
# For now, off by default unless you read the above.
|
||||||
SigLevel = Never
|
SigLevel = Never
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -47,7 +47,7 @@ Architecture = auto
|
|||||||
# the following line. This will treat any key imported into pacman's keyring as
|
# the following line. This will treat any key imported into pacman's keyring as
|
||||||
# trusted.
|
# trusted.
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
# Disable signature checks for now
|
# For now, off by default unless you read the above.
|
||||||
SigLevel = Never
|
SigLevel = Never
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -47,7 +47,7 @@ Architecture = auto
|
|||||||
# the following line. This will treat any key imported into pacman's keyring as
|
# the following line. This will treat any key imported into pacman's keyring as
|
||||||
# trusted.
|
# trusted.
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
# Disable signature checks for now
|
# For now, off by default unless you read the above.
|
||||||
SigLevel = Never
|
SigLevel = Never
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -47,8 +47,8 @@ Architecture = auto
|
|||||||
# the following line. This will treat any key imported into pacman's keyring as
|
# the following line. This will treat any key imported into pacman's keyring as
|
||||||
# trusted.
|
# trusted.
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
# Disable signature checks for now
|
# For now, off by default unless you read the above.
|
||||||
#SigLevel = Never
|
SigLevel = Never
|
||||||
|
|
||||||
#
|
#
|
||||||
# REPOSITORIES
|
# REPOSITORIES
|
||||||
|
@@ -47,7 +47,7 @@ Architecture = auto
|
|||||||
# the following line. This will treat any key imported into pacman's keyring as
|
# the following line. This will treat any key imported into pacman's keyring as
|
||||||
# trusted.
|
# trusted.
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
# Disable signature checks for now
|
# For now, off by default unless you read the above.
|
||||||
SigLevel = Never
|
SigLevel = Never
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -47,7 +47,7 @@ Architecture = auto
|
|||||||
# the following line. This will treat any key imported into pacman's keyring as
|
# the following line. This will treat any key imported into pacman's keyring as
|
||||||
# trusted.
|
# trusted.
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
# Disable signature checks for now
|
# For now, off by default unless you read the above.
|
||||||
SigLevel = Never
|
SigLevel = Never
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user