index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2020-04-09 21:27:11 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-06-29 10:43:33 +0200 |
commit | 307f8ddb2c0ddab33ceaa0900d324cc011114662 (patch) | |
tree | a372e65911a2b1ef7ce5815680f9d9b3241f3897 | |
parent | a347c0358bb7c9962750602ebe0b7311ee66fb4e (diff) |
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | arch-nspawn.in | 7 | ||||
-rw-r--r-- | archbuild.in | 7 |
@@ -35,6 +35,8 @@ CONFIGFILES = \ pacman-kde-unstable.conf \ pacman-gnome-unstable.conf +SETARCH_ALIASES = \ + COMMITPKG_LINKS = \ extrapkg \ testingpkg \ @@ -101,9 +103,10 @@ clean: install: install -dm0755 $(DESTDIR)$(PREFIX)/bin - install -dm0755 $(DESTDIR)$(PREFIX)/share/devtools + install -dm0755 $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d install -m0755 ${BINPROGS} $(DESTDIR)$(PREFIX)/bin install -m0644 ${CONFIGFILES} $(DESTDIR)$(PREFIX)/share/devtools + for a in ${SETARCH_ALIASES}; do install -m0644 setarch-aliases.d/$$a $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d; done for l in ${COMMITPKG_LINKS}; do ln -sf commitpkg $(DESTDIR)$(PREFIX)/bin/$$l; done for l in ${ARCHBUILD_LINKS}; do ln -sf archbuild $(DESTDIR)$(PREFIX)/bin/$$l; done for l in ${CROSSREPOMOVE_LINKS}; do ln -sf crossrepomove $(DESTDIR)$(PREFIX)/bin/$$l; done @@ -119,6 +122,7 @@ install: uninstall: for f in ${BINPROGS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done for f in ${CONFIGFILES}; do rm -f $(DESTDIR)$(PREFIX)/share/devtools/$$f; done + for f in ${SETARCH_ALIASES}; do rm -f $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d/$$f; done for l in ${COMMITPKG_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done for l in ${ARCHBUILD_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done for l in ${CROSSREPOMOVE_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done diff --git a/arch-nspawn.in b/arch-nspawn.in index cde1f60..eb4d52f 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -126,8 +126,13 @@ copy_hostconf eval "$(grep -a '^CARCH=' "$working_dir/etc/makepkg.conf")" [[ -z $nosetarch ]] || unset CARCH +if [[ -f "@pkgdatadir@/setarch-aliases.d/${CARCH}" ]]; then + set_arch=$(cat "@pkgdatadir@/setarch-aliases.d/${CARCH}") +else + set_arch="${CARCH}" +fi -exec ${CARCH:+setarch "$CARCH"} systemd-nspawn -q \ +exec ${CARCH:+setarch "$set_arch"} systemd-nspawn -q \ -D "$working_dir" \ -E "PATH=/usr/local/sbin:/usr/local/bin:/usr/bin" \ --register=no --keep-unit --as-pid2 \ diff --git a/archbuild.in b/archbuild.in index 32f0d03..c317cc2 100644 --- a/archbuild.in +++ b/archbuild.in @@ -17,6 +17,11 @@ else repo=${tag%-*} arch=${tag##*-} fi +if [[ -f "@pkgdatadir@/setarch-aliases.d/${arch}" ]]; then + set_arch=$(cat "@pkgdatadir@/setarch-aliases.d/${arch}") +else + set_arch="${arch}" +fi chroots='/var/lib/archbuild' clean_first=false @@ -69,7 +74,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 "${arch}" mkarchroot \ + setarch "${set_arch}" mkarchroot \ -C "${pacman_config}" \ -M "${makepkg_config}" \ "${chroots}/${repo}-${arch}/root" \ |