4 changed files with 67 additions and 60 deletions
@ -0,0 +1,48 @@
@@ -0,0 +1,48 @@
|
||||
#!/bin/bash |
||||
|
||||
# this is meant to be put in /usr/bin and allowed to use for for a user |
||||
# cp /home/ppa/arch-ppa/arch-chroot-helper /usr/bin/; chown root.root /usr/bin/arch-chroot-helper; chmod 555 /usr/bin/arch-chroot-helper |
||||
# then add this using visudo: |
||||
# ppa ALL= NOPASSWD: /usr/bin/arch-chroot-helper |
||||
|
||||
ccm_root='/scratch/.chroot64' |
||||
|
||||
prepare() { |
||||
if [ -d "${ccm_root}/root" ]; then |
||||
# this exists, so just update it |
||||
arch-nspawn "${ccm_root}/root" pacman -Syu --noconfirm |
||||
#yes | arch-nspawn "${ccm_root}/root" pacman -Scc |
||||
else |
||||
# does not exist, create it... |
||||
mkdir -p "${ccm_root}" |
||||
mkarchroot -C /etc/pacman.conf -M /etc/makepkg.conf "${ccm_root}/root" base-devel |
||||
fi |
||||
} |
||||
|
||||
nuke() { |
||||
rm -rf "${ccm_root}" |
||||
} |
||||
|
||||
make() { |
||||
set -e |
||||
prepare |
||||
makechrootpkg -c -u -r "${ccm_root}" |
||||
} |
||||
|
||||
case $1 in |
||||
prepare) |
||||
prepare |
||||
exit $? |
||||
;; |
||||
nuke) |
||||
nuke |
||||
exit $? |
||||
;; |
||||
make) |
||||
make |
||||
exit $? |
||||
;; |
||||
*) |
||||
echo "Must specify command: prepare, nuke, make" |
||||
exit 1 |
||||
esac |
@ -1,26 +0,0 @@
@@ -1,26 +0,0 @@
|
||||
# Maintainer: graysky <graysky AT archlinux DOT us> |
||||
|
||||
pkgname=clean-chroot-manager |
||||
pkgver=2.96 |
||||
pkgrel=1 |
||||
pkgdesc='Wrapper for managing clean chroot builds with local repo therein.' |
||||
arch=('any') |
||||
url='https://github.com/graysky2/clean-chroot-manager' |
||||
license=('MIT') |
||||
depends=('devtools>=20180528-1' 'rsync' 'libarchive>=3.3.3') |
||||
conflicts=('clean_chroot_manager') |
||||
replaces=('clean_chroot_manager') |
||||
source=("$pkgname-$pkgver.tar.gz::https://github.com/graysky2/clean-chroot-manager/archive/v$pkgver.tar.gz") |
||||
sha256sums=('3bbe344f92914a490f61c6fcb95189f4c95dacee45da975bf9c530e8fe867806') |
||||
install=ccm.install |
||||
|
||||
build() { |
||||
cd "$pkgname-$pkgver" |
||||
make |
||||
} |
||||
|
||||
package() { |
||||
cd "$pkgname-$pkgver" |
||||
make DESTDIR="$pkgdir" install |
||||
install -Dm644 MIT "$pkgdir/usr/share/licenses/$pkgname/LICENSE" |
||||
} |
@ -1,16 +0,0 @@
@@ -1,16 +0,0 @@
|
||||
## arg 1: the new package version |
||||
## arg 2: the old package version |
||||
|
||||
post_upgrade() { |
||||
for test in 2.92-1 2.87-1 2.81-1 2.73-1 2.72-1 2.55-1 2.17-1 2.22-1 2.69-1 2.93-1; do |
||||
if [ "$(vercmp $2 $test)" -lt 1 ]; then |
||||
echo |
||||
echo '--> Please check ~/.config/clean-chroot-manager.conf against the' |
||||
echo '--> provided /usr/share/clean-chroot-manager/ccm.skel to ensure it is' |
||||
echo '--> updated as the script does not do this automatically.' |
||||
exit 0 |
||||
else |
||||
/bin/true |
||||
fi |
||||
done |
||||
} |
Loading…
Reference in new issue