diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2019-10-29 14:30:25 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-10-29 14:33:45 +0100 |
commit | 7ac611a2788443f67df1d963aa510d1dd42e1472 (patch) | |
tree | bdf030a03b07275be54232d55b017c635919c472 /main/abuild/0001-abuild-chdir-to-builddir-if-it-exists.patch | |
parent | 615b572ef6341859fe6be51d0809da4e783eb89e (diff) | |
download | aports-7ac611a2788443f67df1d963aa510d1dd42e1472.tar.bz2 aports-7ac611a2788443f67df1d963aa510d1dd42e1472.tar.xz |
main/abuild: backport chdir to "$builddir"
This makes it easier to backport security fixes which has the `cd
"$builddir"` removed.
Diffstat (limited to 'main/abuild/0001-abuild-chdir-to-builddir-if-it-exists.patch')
-rw-r--r-- | main/abuild/0001-abuild-chdir-to-builddir-if-it-exists.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/main/abuild/0001-abuild-chdir-to-builddir-if-it-exists.patch b/main/abuild/0001-abuild-chdir-to-builddir-if-it-exists.patch new file mode 100644 index 0000000000..d07b5a464e --- /dev/null +++ b/main/abuild/0001-abuild-chdir-to-builddir-if-it-exists.patch @@ -0,0 +1,30 @@ +From 2fe29d5829c0973ace1db350141b3c810ac888a7 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Wed, 3 Oct 2018 11:48:11 +0000 +Subject: [PATCH] abuild: chdir to $builddir if it exists + +chdir to $builddir before running prepare, build, package or check. +--- + abuild.in | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/abuild.in b/abuild.in +index b1be8fc..8d69b4b 100644 +--- a/abuild.in ++++ b/abuild.in +@@ -594,6 +594,12 @@ runpart() { + local part=$1 + [ -n "$DEBUG" ] && msg "$part" + trap "die '$part failed'" EXIT ++ if [ -d "$builddir" ]; then ++ case "$part" in ++ prepare|build|package|check) ++ cd "$builddir";; ++ esac ++ fi + $part + trap - EXIT + } +-- +2.18.1 + |