1
0
forked from artix/artools

Compare commits

...

3 Commits
0.8.5 ... 0.8.6

Author SHA1 Message Date
udeved
ef794a0b85 mkchrootpkg: whitelist return code 14 from makepkg 2018-05-31 18:07:31 +02:00
udeved
aa12fc42bd buildtree: quote version vars 2018-05-29 17:29:07 +02:00
udeved
50f90ab53c mkchrootpkg: arch patches 2018-05-29 13:30:32 +02:00
2 changed files with 16 additions and 10 deletions

View File

@@ -67,18 +67,18 @@ show_version_table(){
local archver=$(get_full_version $pkg) local archver=$(get_full_version $pkg)
fi fi
if ${artix};then if ${artix};then
if [ $(vercmp $artixver $archver) -eq 0 ] || [ $(vercmp $artixver $archver) -gt 0 ];then if [ $(vercmp "$artixver" "$archver") -eq 0 ] || [ $(vercmp "$artixver" "$archver") -gt 0 ];then
local ar=$(arch_to_artix_repo "$artixrepo") local ar=$(arch_to_artix_repo "$artixrepo")
case $ar in case $ar in
*goblins) *goblins)
if [[ $archrepo == $artixrepo ]];then if [[ "$archrepo" == "$artixrepo" ]];then
msg_row "%-20s %-20s %-25s %-30s %-30s" "${archrepo%-*}" "${ar}" "$pkg" "$archver" "$artixver" msg_row "%-20s %-20s %-25s %-30s %-30s" "${archrepo%-*}" "${ar}" "$pkg" "$archver" "$artixver"
else else
msg_row_notify "%-20s %-20s %-25s %-30s %-30s" "${archrepo%-*}" "${ar}" "$pkg" "$archver" "$artixver" msg_row_notify "%-20s %-20s %-25s %-30s %-30s" "${archrepo%-*}" "${ar}" "$pkg" "$archver" "$artixver"
fi fi
;; ;;
*gremlins) *gremlins)
if [[ $archrepo == $artixrepo ]];then if [[ "$archrepo" == "$artixrepo" ]];then
msg_row "%-20s %-20s %-25s %-30s %-30s" "${archrepo%-*}" "${ar}" "$pkg" "$archver" "$artixver" msg_row "%-20s %-20s %-25s %-30s %-30s" "${archrepo%-*}" "${ar}" "$pkg" "$archver" "$artixver"
else else
msg_row_notify "%-20s %-20s %-25s %-30s %-30s" "${archrepo%-*}" "${ar}" "$pkg" "$archver" "$artixver" msg_row_notify "%-20s %-20s %-25s %-30s %-30s" "${archrepo%-*}" "${ar}" "$pkg" "$archver" "$artixver"
@@ -87,11 +87,11 @@ show_version_table(){
esac esac
fi fi
else else
if [ $(vercmp $artixver $archver) -lt 0 ];then if [ $(vercmp "$artixver" "$archver") -lt 0 ];then
local ar=$(arch_to_artix_repo "$artixrepo") local ar=$(arch_to_artix_repo "$artixrepo")
${upgrades} && msg_row_upgrade "%-20s %-20s %-25s %-30s %-30s" "${archrepo%-*}" "${ar}" "$pkg" "$archver" "$artixver" ${upgrades} && msg_row_upgrade "%-20s %-20s %-25s %-30s %-30s" "${archrepo%-*}" "${ar}" "$pkg" "$archver" "$artixver"
fi fi
if [ $(vercmp $artixver $archver) -gt 0 ];then if [ $(vercmp "$artixver" "$archver") -gt 0 ];then
local ar=$(arch_to_artix_repo "$artixrepo") local ar=$(arch_to_artix_repo "$artixrepo")
if [[ -n $archver ]] && [[ -n $archrepo ]];then if [[ -n $archver ]] && [[ -n $archrepo ]];then
${downgrades} && msg_row_downgrade "%-20s %-20s %-25s %-30s %-30s" "${archrepo%-*}" "${ar}" "$pkg" "$archver" "$artixver" ${downgrades} && msg_row_downgrade "%-20s %-20s %-25s %-30s %-30s" "${archrepo%-*}" "${ar}" "$pkg" "$archver" "$artixver"

View File

@@ -163,10 +163,10 @@ prepare_chroot() {
$install -d "$copydir"/{build,build/.gnupg,startdir,{pkg,srcpkg,src,log}dest} $install -d "$copydir"/{build,build/.gnupg,startdir,{pkg,srcpkg,src,log}dest}
for x in .gnupg/pubring.{kbx,gpg}; do # for x in .gnupg/pubring.{kbx,gpg}; do
[[ -r $USER_HOME/$x ]] || continue # [[ -r $USER_HOME/$x ]] || continue
$install -m 644 "$USER_HOME/$x" "$copydir/build/$x" # $install -m 644 "$USER_HOME/$x" "$copydir/build/$x"
done # done
sed -e '/^MAKEFLAGS=/d' -e '/^PACKAGER=/d' -i "$copydir/etc/makepkg.conf" sed -e '/^MAKEFLAGS=/d' -e '/^PACKAGER=/d' -i "$copydir/etc/makepkg.conf"
for x in BUILDDIR=/build PKGDEST=/pkgdest SRCPKGDEST=/srcpkgdest SRCDEST=/srcdest LOGDEST=/logdest \ for x in BUILDDIR=/build PKGDEST=/pkgdest SRCPKGDEST=/srcpkgdest SRCDEST=/srcdest LOGDEST=/logdest \
@@ -215,6 +215,12 @@ _chrootbuild() {
locale-gen &> /dev/null locale-gen &> /dev/null
sudo --preserve-env=SOURCE_DATE_EPOCH -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@" sudo --preserve-env=SOURCE_DATE_EPOCH -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@"
ret=$?
case $ret in
0|14) return 0;;
*) return $ret;;
esac
} }
_chrootnamcap() { _chrootnamcap() {
@@ -236,7 +242,7 @@ download_sources() {
local builddir local builddir
builddir="$(mktemp -d)" builddir="$(mktemp -d)"
# chmod 1777 "$builddir" # chmod 1777 "$builddir"
chown "$makepkg_user:$makepkg_user" "$builddir" chown "$makepkg_user:" "$builddir"
# Ensure sources are downloaded # Ensure sources are downloaded
sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \ sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \