Compare commits

..

1 Commits

Author SHA1 Message Date
Levente Polyak
aff81d34fd Version 20200407 2020-04-07 19:46:10 +02:00
6 changed files with 12 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
V=20200213
V=20200407
PREFIX = /usr/local
MANDIR = $(PREFIX)/share/man

View File

@@ -31,6 +31,7 @@ usage() {
echo ' -M <file> Location of a makepkg config file'
echo ' -c <dir> Set pacman cache'
echo ' -f <file> Copy file from the host to the chroot'
echo ' -s Do not run setarch'
echo ' -h This message'
exit 1
}
@@ -41,6 +42,7 @@ while getopts 'hC:M:c:f:s' arg; do
M) makepkg_conf="$OPTARG" ;;
c) cache_dirs+=("$OPTARG") ;;
f) files+=("$OPTARG") ;;
s) nosetarch=1 ;;
h|?) usage ;;
*) error "invalid argument '%s'" "$arg"; usage ;;
esac
@@ -122,7 +124,8 @@ fi
copy_hostconf
eval "$(grep -a '^CARCH=' "$working_dir/etc/makepkg.conf")"
setarch --list | grep -qx "$CARCH" || unset CARCH
[[ -z $nosetarch ]] || unset CARCH
exec ${CARCH:+setarch "$CARCH"} systemd-nspawn -q \
-D "$working_dir" \

View File

@@ -69,10 +69,7 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
rm -rf --one-file-system "${chroots}/${repo}-${arch}"
(umask 0022; mkdir -p "${chroots}/${repo}-${arch}")
setarch --list | grep -qx "$arch" && setarch_cmd="setarch $arch"
${setarch_cmd} mkarchroot \
setarch "${arch}" mkarchroot \
-C "${pacman_config}" \
-M "${makepkg_config}" \
"${chroots}/${repo}-${arch}/root" \

View File

@@ -35,6 +35,9 @@ Options
*-f* <file>::
Copy file from the host to the chroot.
*-s*::
Do not run setarch.
*-h*::
Output command line options.

View File

@@ -31,6 +31,7 @@ usage() {
echo ' -M <file> Location of a makepkg config file'
echo ' -c <dir> Set pacman cache'
echo ' -f <file> Copy file from the host to the chroot'
echo ' -s Do not run setarch'
echo ' -h This message'
exit 1
}
@@ -42,6 +43,7 @@ while getopts 'hUC:M:c:f:s' arg; do
M) makepkg_conf="$OPTARG" ;;
c) cache_dirs+=("$OPTARG") ;;
f) files+=("$OPTARG") ;;
s) nosetarch=1 ;;
h|?) usage ;;
*) error "invalid argument '%s'" "$arg"; usage ;;
esac

View File

@@ -21,6 +21,7 @@ _arch_nspawn_args=(
'-M[Location of a makepkg config file]:makepkg_config:_files -g "*.conf(.)"'
'-c[Set pacman cache]:pacman_cache:_files -/'
'-f[Copy file from the host to the chroot]:copy_file:_files'
'-s[Do not run setarch]'
'-h[Display usage]'
'1:chroot_dir:_files -/'
)