Skip to content

Commit

Permalink
Use chroot
Browse files Browse the repository at this point in the history
  • Loading branch information
alexheretic committed Jan 29, 2018
1 parent e67f54c commit 8fb6c7e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bin/aurto
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ command=${1:-}
arg1=${2:-}

if [ "$command" == "add" ] && [ -n "$arg1" ]; then
echo "aurto: Running: \`aursync --no-view --rmdeps --no-confirm -C /var/lib/aurto-builder --repo=aurto ${*:2}\`" >&2
aursync --no-view --rmdeps --no-confirm -C /var/lib/aurto-builder --repo=aurto "${@:2}"
echo "aurto: Running: \`aursync --no-view --rmdeps --no-confirm --chroot --repo=aurto ${*:2}\`" >&2
aursync --no-view --rmdeps --no-confirm --chroot --repo=aurto "${@:2}"
elif [ "$command" == "remove" ] && [ -n "$arg1" ]; then
removed=""
for pkg in "${@:2}"; do
Expand Down
4 changes: 3 additions & 1 deletion lib/check-aurto-git
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
set -u

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
user=$(cat /usr/lib/aurto/user)
command -v aurfetch >/dev/null 2>&1 || { echo >&2 "aurfetch not installed. Aborting."; exit 1; }

function check_auto_updates {
Expand All @@ -15,7 +16,8 @@ function check_auto_updates {
before_rel=$(grep -m1 pkgrel= PKGBUILD | sed -e 's/^[^=]*=//g')
installed_ver=$(pacman -Q "$dir" | sed -e 's/^[^ ]* //g')

arch-nspawn /var/lib/aurto-builder \
# TODO this is pretty fragile relying on aurutils internals
arch-nspawn /var/lib/aurbuild/"$(uname -m)/$user" \
--bind="$SCRIPT_DIR"/tmp/"$dir" \
-u builduser \
/usr/bin/env bash -c "
Expand Down
3 changes: 1 addition & 2 deletions lib/update-aurto
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ fi

pacman -Sy >/dev/null 2>&1

sudo -u "$user" aursync --no-view --rmdeps --no-confirm --repo aurto \
-C /var/lib/aurto-builder --update
sudo -u "$user" aursync --no-view --rmdeps --no-confirm --repo aurto --chroot --update

if [ -e /usr/lib/aurto/check-vcs ]; then
rm -f /usr/lib/aurto/check-vcs || true
Expand Down

0 comments on commit 8fb6c7e

Please sign in to comment.