From 92186b70ca9c520fc726e0885aac633aadace655 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 26 Aug 2015 08:14:36 +0200 Subject: 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. --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile') 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-$@) $^ -- cgit v1.2.3-70-g09d2