forked from artix/artools
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef794a0b85 | ||
|
|
aa12fc42bd | ||
|
|
50f90ab53c |
@@ -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"
|
||||||
|
|||||||
@@ -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 \
|
||||||
|
|||||||
Reference in New Issue
Block a user