[apr] 01/02: Use flock for apr_file_lock()/_unlock()
Stefan Fritsch
sf at moszumanska.debian.org
Thu Aug 20 11:53:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
sf pushed a commit to annotated tag debian/1.5.2-3
in repository apr.
commit dd3f9339068a6d7a3a8145ce536ebf1536d61d23
Author: Stefan Fritsch <sf at sfritsch.de>
Date: Thu Aug 20 13:47:04 2015 +0200
Use flock for apr_file_lock()/_unlock()
This has the advantage that the lock is per FD and not per process.
On the other hand, locking over NFS may not work any more for non-Linux
kernels.
---
debian/changelog | 3 +++
debian/patches/series | 1 +
debian/patches/use_fcntl_locking.patch | 22 ++++++++++++++++++++++
3 files changed, 26 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 2bb3cb4..bebadc0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
apr (1.5.2-3) UNRELEASED; urgency=medium
+ * Use flock for apr_file_lock()/_unlock(). This has the advantage that
+ the lock is per FD and not per process. On the other hand, locking over
+ NFS may not work any more for non-Linux kernels. Closes: #752872
* Add debug output for strange test failure on reproducible.debian.net.
-- Stefan Fritsch <sf at debian.org> Thu, 20 Aug 2015 09:13:40 +0200
diff --git a/debian/patches/series b/debian/patches/series
index 79c1c15..554e1c8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ dont_override_external_buildflags
libtoolize_check.patch
apr_mcast_v6.patch
debug_testpoll_failure.patch
+use_fcntl_locking.patch
diff --git a/debian/patches/use_fcntl_locking.patch b/debian/patches/use_fcntl_locking.patch
new file mode 100644
index 0000000..cedb611
--- /dev/null
+++ b/debian/patches/use_fcntl_locking.patch
@@ -0,0 +1,22 @@
+# use flock for apr_file_lock/_unlock()
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752872
+--- apr.orig/file_io/unix/flock.c
++++ apr/file_io/unix/flock.c
+@@ -27,7 +27,7 @@ APR_DECLARE(apr_status_t) apr_file_lock(
+ {
+ int rc;
+
+-#if defined(HAVE_FCNTL_H)
++#if 0 && defined(HAVE_FCNTL_H)
+ {
+ struct flock l = { 0 };
+ int fc;
+@@ -86,7 +86,7 @@ APR_DECLARE(apr_status_t) apr_file_unloc
+ {
+ int rc;
+
+-#if defined(HAVE_FCNTL_H)
++#if 0 && defined(HAVE_FCNTL_H)
+ {
+ struct flock l = { 0 };
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-apache/apr.git
More information about the Pkg-apache-commits
mailing list