From d7dcce53396d32c090e1e175c9c606a78f5cb3d6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 2 Feb 2014 20:18:20 -0500 Subject: mkarchroot: don't let the environment affect pacstrap --- src/chroot-tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chroot-tools/Makefile') diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile index d08775e..4ecff51 100644 --- a/src/chroot-tools/Makefile +++ b/src/chroot-tools/Makefile @@ -34,7 +34,7 @@ makechrootpkg.sh: %: %.ugly Makefile mkarchroot: mkarchroot.in Makefile @echo '< $< M4_EDIT | SED > $@' - @<'$<' $(edit) | sed 's|arch-nspawn|$$(librelib chroot/&)|' >'$@' || { rm -f -- '$@'; false; } + @<'$<' $(edit) | sed -e 's|arch-nspawn|$$(librelib chroot/&)|' -e 's/pacstrap/env -i &/' >'$@' || { rm -f -- '$@'; false; } @echo 'CHMOD $<'; chmod 755 "$@" || { rm -f -- '$@'; false; } archroot: %: %.in Makefile -- cgit v1.2.3-2-g168b From 804e5e1093c3aa8258bf9f8c97ff661cdf8407f1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 2 Feb 2014 20:22:24 -0500 Subject: Makefiles: use .DELETE_ON_ERROR: --- src/chroot-tools/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/chroot-tools/Makefile') diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile index 4ecff51..97ca688 100644 --- a/src/chroot-tools/Makefile +++ b/src/chroot-tools/Makefile @@ -27,19 +27,19 @@ makechrootpkg.sh.in: %.sh.in: $(devtoolsdir)/%.in cp $< $@ makechrootpkg.sh.ugly: %.ugly: %.in %.patch Makefile cp $*.in $@ - @echo 'PATCH $@ $*.patch'; patch $@ $*.patch || { rm -f -- '$@'; false; } + @echo 'PATCH $@ $*.patch'; patch $@ $*.patch makechrootpkg.sh: %: %.ugly Makefile - @echo 'EDIT < $< > $@'; $(edit) <'$<' >'$@' || { rm -f -- '$@'; false; } - @echo 'INDENT $@'; $(call indent,$@) || { rm -f -- '$@'; false; } + @echo 'EDIT < $< > $@'; $(edit) <'$<' >'$@' + @echo 'INDENT $@'; $(call indent,$@) mkarchroot: mkarchroot.in Makefile @echo '< $< M4_EDIT | SED > $@' - @<'$<' $(edit) | sed -e 's|arch-nspawn|$$(librelib chroot/&)|' -e 's/pacstrap/env -i &/' >'$@' || { rm -f -- '$@'; false; } - @echo 'CHMOD $<'; chmod 755 "$@" || { rm -f -- '$@'; false; } + @<'$<' $(edit) | sed -e 's|arch-nspawn|$$(librelib chroot/&)|' -e 's/pacstrap/env -i &/' >'$@' + @echo 'CHMOD $<'; chmod 755 "$@" archroot: %: %.in Makefile @echo "GEN $@" - @$(edit) <"$<" >"$@" || { rm -f -- '$@'; false; } - @chmod 755 "$@" || { rm -f -- '$@'; false; } + @$(edit) <"$<" >"$@" + @chmod 755 "$@" distcc-tool.pot: xgettext-keywords-sh+=--keyword=errusage -- cgit v1.2.3-2-g168b From 089c60a05e95bee1ab3c506069f8e0e75eb43657 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 20 Mar 2014 16:27:41 -0400 Subject: Generalize the patching mechanism in the build system. --- src/chroot-tools/Makefile | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'src/chroot-tools/Makefile') diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile index 97ca688..c49c4ac 100644 --- a/src/chroot-tools/Makefile +++ b/src/chroot-tools/Makefile @@ -9,37 +9,15 @@ libs = makechrootpkg.sh $(wildcard hooks-*.sh) pots = $(libexecs) $(libs) pkglibexecdir = $(libexecdir)/libretools/chroot -clean_files = makechrootpkg.sh.ugly* *~ include ../../common.mk -# Usage: $(call indent,FILENAME) -# Command to auto-indent a file. -indent = emacs --batch $1 \ - --eval '(setq sh-basic-offset 8)' \ - --eval '(indent-region (point-min) (point-max) nil)' \ - -f save-buffer &>/dev/null - -# makechrootpkg.sh is special, we patch it and do fancy stuff -# The flow is: -# $(devtoolsdir)/*.in -> *.sh.in + *.sh.patch -> *.sh.ugly -> *.sh - +# makechrootpkg.sh is created from a command, not a library makechrootpkg.sh.in: %.sh.in: $(devtoolsdir)/%.in cp $< $@ -makechrootpkg.sh.ugly: %.ugly: %.in %.patch Makefile - cp $*.in $@ - @echo 'PATCH $@ $*.patch'; patch $@ $*.patch -makechrootpkg.sh: %: %.ugly Makefile - @echo 'EDIT < $< > $@'; $(edit) <'$<' >'$@' - @echo 'INDENT $@'; $(call indent,$@) mkarchroot: mkarchroot.in Makefile @echo '< $< M4_EDIT | SED > $@' @<'$<' $(edit) | sed -e 's|arch-nspawn|$$(librelib chroot/&)|' -e 's/pacstrap/env -i &/' >'$@' @echo 'CHMOD $<'; chmod 755 "$@" -archroot: %: %.in Makefile - @echo "GEN $@" - @$(edit) <"$<" >"$@" - @chmod 755 "$@" - distcc-tool.pot: xgettext-keywords-sh+=--keyword=errusage -- cgit v1.2.3-2-g168b From d17d1d82349f7f4cb60574f7d9c2f786eec3cc93 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 20 Mar 2014 17:16:36 -0400 Subject: Fix issue #487; obey proxy settings when creating a chroot. https://labs.parabola.nu/issues/487 --- src/chroot-tools/Makefile | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/chroot-tools/Makefile') diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile index c49c4ac..e44ad5f 100644 --- a/src/chroot-tools/Makefile +++ b/src/chroot-tools/Makefile @@ -15,9 +15,4 @@ include ../../common.mk makechrootpkg.sh.in: %.sh.in: $(devtoolsdir)/%.in cp $< $@ -mkarchroot: mkarchroot.in Makefile - @echo '< $< M4_EDIT | SED > $@' - @<'$<' $(edit) | sed -e 's|arch-nspawn|$$(librelib chroot/&)|' -e 's/pacstrap/env -i &/' >'$@' - @echo 'CHMOD $<'; chmod 755 "$@" - distcc-tool.pot: xgettext-keywords-sh+=--keyword=errusage -- cgit v1.2.3-2-g168b