mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 18:06:19 +02:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
01f5cdf33d | ||
![]() |
e333a4da81 | ||
![]() |
86045b965e | ||
![]() |
bea69043fb | ||
![]() |
521c4ceec3 | ||
![]() |
3a684f667b | ||
![]() |
ae7b13646e |
@@ -58,6 +58,13 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
|
||||
-M "@pkgdatadir@/makepkg-${arch}.conf" \
|
||||
"${chroots}/${repo}-${arch}/root" \
|
||||
"${base_packages[@]}"
|
||||
|
||||
# FIXME: temporary workaround until pacman 4.0 moves to [core]
|
||||
case $repo in
|
||||
core|extra|community|multilib)
|
||||
sed -r '/^SigLevel.*/d' -i "${chroots}/${repo}-${arch}/root/etc/pacman.conf"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
setarch ${arch} mkarchroot \
|
||||
-u \
|
||||
|
@@ -86,14 +86,13 @@ done
|
||||
|
||||
# check if changelog and install files are under version control
|
||||
for i in 'changelog' 'install'; do
|
||||
filelist=$(sed -n "s/^[[:space:]]*$i=//p" PKGBUILD)
|
||||
for file in $filelist; do
|
||||
while read -r file; do
|
||||
# evaluate any bash variables used
|
||||
eval file=${file}
|
||||
eval file=\"$(sed 's/^\(['\''"]\)\(.*\)\1$/\2/' <<< "$file")\"
|
||||
if ! svn status -v "${file}" | grep -q '^[ AMRX~]'; then
|
||||
abort "${file} is not under version control"
|
||||
fi
|
||||
done
|
||||
done < <(sed -n "s/^[[:space:]]*$i=//p" PKGBUILD)
|
||||
done
|
||||
|
||||
# see if any limit options were passed, we'll send them to rsync
|
||||
|
@@ -173,11 +173,18 @@ mkdir -p "$copydir/build"
|
||||
# Remove anything in there UNLESS -R (repack) was passed to makepkg
|
||||
$repack || rm -rf "$copydir"/build/*
|
||||
|
||||
# Read .makepkg.conf even if called via sudo
|
||||
# Read .makepkg.conf and .gnupg/pubring.gpg even if called via sudo
|
||||
if [[ -n $SUDO_USER ]]; then
|
||||
makepkg_conf="$(eval echo ~$SUDO_USER)/.makepkg.conf"
|
||||
SUDO_HOME="$(eval echo ~$SUDO_USER)"
|
||||
makepkg_conf="$SUDO_HOME/.makepkg.conf"
|
||||
if [[ -r "$SUDO_HOME/.gnupg/pubring.gpg" ]]; then
|
||||
install -D "$SUDO_HOME/.gnupg/pubring.gpg" "$copydir/build/.gnupg/pubring.gpg"
|
||||
fi
|
||||
else
|
||||
makepkg_conf="$HOME/.makepkg.conf"
|
||||
if [[ -r "$HOME/.gnupg/pubring.gpg" ]]; then
|
||||
install -D "$HOME/.gnupg/pubring.gpg" "$copydir/build/.gnupg/pubring.gpg"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Get SRC/PKGDEST from makepkg.conf
|
||||
@@ -247,9 +254,15 @@ cp PKGBUILD "$copydir/build/"
|
||||
|
||||
chown -R nobody "$copydir"/{build,pkgdest,srcdest}
|
||||
|
||||
echo 'nobody ALL = NOPASSWD: /usr/bin/pacman' > "$copydir/etc/sudoers.d/nobody-pacman"
|
||||
cat > "$copydir/etc/sudoers.d/nobody-pacman" <<EOF
|
||||
Defaults env_keep += "HOME"
|
||||
nobody ALL = NOPASSWD: /usr/bin/pacman
|
||||
EOF
|
||||
chmod 440 "$copydir/etc/sudoers.d/nobody-pacman"
|
||||
|
||||
# Set this system wide as makepkg will source /etc/profile before calling build()
|
||||
echo 'export LANG=C' > "$copydir/etc/locale.conf"
|
||||
|
||||
# This is a little gross, but this way the script is recreated every time in the
|
||||
# working copy
|
||||
cat >"$copydir/chrootbuild" <<EOF
|
||||
|
@@ -33,7 +33,8 @@ Architecture = auto
|
||||
#UseSyslog
|
||||
#UseDelta
|
||||
#TotalDownload
|
||||
CheckSpace
|
||||
# We cannot check disk space from within a chroot environment
|
||||
#CheckSpace
|
||||
#VerbosePkgLists
|
||||
|
||||
# PGP signature checking
|
||||
@@ -45,7 +46,7 @@ CheckSpace
|
||||
# If you wish to check signatures but avoid local sign and trust issues, use
|
||||
# the following line. This will treat any key imported into pacman's keyring as
|
||||
# trusted.
|
||||
SigLevel = Optional TrustAll
|
||||
#SigLevel = Optional TrustAll
|
||||
# Disable signature checks for now
|
||||
SigLevel = Never
|
||||
|
||||
|
@@ -33,7 +33,8 @@ Architecture = auto
|
||||
#UseSyslog
|
||||
#UseDelta
|
||||
#TotalDownload
|
||||
CheckSpace
|
||||
# We cannot check disk space from within a chroot environment
|
||||
#CheckSpace
|
||||
#VerbosePkgLists
|
||||
|
||||
# PGP signature checking
|
||||
|
@@ -33,7 +33,8 @@ Architecture = auto
|
||||
#UseSyslog
|
||||
#UseDelta
|
||||
#TotalDownload
|
||||
CheckSpace
|
||||
# We cannot check disk space from within a chroot environment
|
||||
#CheckSpace
|
||||
#VerbosePkgLists
|
||||
|
||||
# PGP signature checking
|
||||
|
@@ -33,7 +33,8 @@ Architecture = auto
|
||||
#UseSyslog
|
||||
#UseDelta
|
||||
#TotalDownload
|
||||
CheckSpace
|
||||
# We cannot check disk space from within a chroot environment
|
||||
#CheckSpace
|
||||
#VerbosePkgLists
|
||||
|
||||
# PGP signature checking
|
||||
|
@@ -33,7 +33,8 @@ Architecture = auto
|
||||
#UseSyslog
|
||||
#UseDelta
|
||||
#TotalDownload
|
||||
CheckSpace
|
||||
# We cannot check disk space from within a chroot environment
|
||||
#CheckSpace
|
||||
#VerbosePkgLists
|
||||
|
||||
# PGP signature checking
|
||||
|
Reference in New Issue
Block a user