Skip to content

Commit

Permalink
Use /var/lib/aurto-builder chroot container
Browse files Browse the repository at this point in the history
  • Loading branch information
alexheretic committed Jan 29, 2018
1 parent 89fafdb commit 8e6d6e5
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 74 deletions.
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2018 Alex Butler

MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5 changes: 2 additions & 3 deletions bin/aurto
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ command=${1:-}
arg1=${2:-}

if [ "$command" == "add" ] && [ -n "$arg1" ]; then
echo "aurto: Running: \`aursync --no-view --rmdeps --no-confirm --chroot --repo=aurto ${*:2}\`" >&2
# TODO use -M /usr/liv/aurto/aurto-makepkg.conf
aursync --no-view --rmdeps --no-confirm --chroot --repo=aurto "${@:2}"
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}"
elif [ "$command" == "remove" ] && [ -n "$arg1" ]; then
removed=""
for pkg in "${@:2}"; do
Expand Down
65 changes: 0 additions & 65 deletions install/aurto.install

This file was deleted.

5 changes: 2 additions & 3 deletions lib/check-aurto-git
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@
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 {
for dir in *; do
if [[ -d $dir ]] && pacman -Qq "$dir" >/dev/null 2>&1; then
cd "$dir" || exit
cd "$dir" || exit
echo -n "Checking $dir..." >&2
before_ver=$(grep -m1 pkgver= PKGBUILD | sed -e 's/^[^=]*=//g')
before_rel=$(grep -m1 pkgrel= PKGBUILD | sed -e 's/^[^=]*=//g')
installed_ver=$(pacman -Q "$dir" | sed -e 's/^[^ ]* //g')

arch-nspawn /var/lib/aurbuild/x86_64/"$user" \
arch-nspawn /var/lib/aurto-builder \
--bind="$SCRIPT_DIR"/tmp/"$dir" \
-u builduser \
/usr/bin/env bash -c "
Expand Down
4 changes: 2 additions & 2 deletions lib/update-aurto
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ fi

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

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

if [ -e /usr/lib/aurto/check-vcs ]; then
rm -f /usr/lib/aurto/check-vcs || true
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ all:
@rm -rf target

@mkdir -p target/etc/pacman.d
@cp conf/aurto.pacman.conf target/etc/pacman.d/
@cp conf/aurto.pacman.conf target/etc/pacman.d/aurto

@mkdir -p target$(PREFIX)/bin
@cp -r bin/* target$(PREFIX)/bin/
Expand Down

0 comments on commit 8e6d6e5

Please sign in to comment.