summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-08-26 08:14:36 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2015-08-26 16:44:23 +0200
commit92186b70ca9c520fc726e0885aac633aadace655 (patch)
treeddef3fcf99f329dc62294dfafc111d350cfa2e50 /Makefile
parentbed1c80a465683a34063acd78ef3d86a8e196296 (diff)
downloadabuild-92186b70ca9c520fc726e0885aac633aadace655.tar.bz2
abuild-92186b70ca9c520fc726e0885aac633aadace655.tar.xz
abuild: fix fetch lock file on nfs
flock(2) on an NFS mount will on the server side convert the lock to a POSIX lock (fcntl(F_SETLK)). This means that abuild running on NFS server and client will create different locks and they will both try download same file at same time. We fix this by creating a small abuild-fetch application that will create a POSIX lock which works with NFS.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 81c2851..b7332b2 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ abuildrepo ?= ~/.cache/abuild
SCRIPTS := abuild abuild-keygen abuild-sign newapkbuild \
abump apkgrel buildlab apkbuild-cpan checkapk \
apkbuild-gem-resolver
-USR_BIN_FILES := $(SCRIPTS) abuild-tar abuild-sudo
+USR_BIN_FILES := $(SCRIPTS) abuild-tar abuild-sudo abuild-fetch
SAMPLES := sample.APKBUILD sample.initd sample.confd \
sample.pre-install sample.post-install
AUTOTOOLS_TOOLCHAIN_FILES := config.sub
@@ -47,6 +47,7 @@ LIBS-abuild-tar = $(SSL_LIBS)
CFLAGS-abuild-tar = $(SSL_CFLAGS)
OBJS-abuild-sudo = abuild-sudo.o
+OBJS-abuild-fetch = abuild-fetch.o
.SUFFIXES: .sh.in .in
%.sh: %.sh.in
@@ -73,6 +74,9 @@ abuild-sudo: abuild-sudo.o
abuild-tar: abuild-tar.o
$(LINK)
+abuild-fetch: abuild-fetch.o
+ $(LINK)
+
abuild-tar.static: abuild-tar.o
$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS-$@) -o $@ -static $(LIBS-$@) $^