Use fcntl instead of flock for locking to make nfs safe

This commit is contained in:
Karel Klíč 2010-04-12 14:09:08 +00:00
parent 57192786d8
commit f2eb019cf3

View File

@ -1,7 +1,7 @@
Summary: A GNU set of database routines which use extensible hashing
Name: gdbm
Version: 1.8.3
Release: 5%{?dist}
Release: 6%{?dist}
Source: http://ftp.gnu.org/gnu/gdbm/gdbm-%{version}.tar.gz
# Prevent gdbm from storing uninitialized memory content
# to database files.
@ -61,6 +61,14 @@ autoconf
%build
%configure --disable-static
# flock does not work on nfs
# fcntl should be used instead of it
# see `man 2 flock`
# rhbz#477300
echo "/* We use fcntl locking (POSIX) instead of flock (BSD) */" >> autoconf.h
echo "#undef HAVE_FLOCK" >> autoconf.h
make
%install
@ -103,6 +111,9 @@ fi
rm -rf ${RPM_BUILD_ROOT}
%changelog
* Mon Apr 12 2010 Karel Klic <kklic@redhat.com> - 1.8.3-6
- Use fcntl instead of flock for locking to make nfs safe (#477300)
* Thu Mar 11 2010 Karel Klic <kklic@redhat.com> - 1.8.3-5
- Removed fake Provides: libgdbm.so.2 and corresponding symlinks
- Moved autoconf, libtoolize from %%build to %%prep section