203a18
# Where lock files are stored
203a18
%global _lockdir %{_localstatedir}/lock/lockdev
203a18
203a18
%global checkout 20111007git
203a18
%global co_date  2011-10-07
203a18
203a18
#http://lists.fedoraproject.org/pipermail/devel/2011-August/155358.html
203a18
%global _hardened_build 1
203a18
203a18
Summary: A library for locking devices
203a18
Name: lockdev
203a18
Version: 1.0.4
b98077
Release: 0.13.%{checkout}%{?dist}
203a18
License: LGPLv2
203a18
Group: System Environment/Libraries
203a18
URL: https://alioth.debian.org/projects/lockdev/
203a18
203a18
# This is a nightly snapshot downloaded via
203a18
# https://alioth.debian.org/snapshots.php?group_id=100443
203a18
Source0: lockdev-%{version}.%{checkout}.tar.gz
203a18
203a18
Patch1: lockdev-euidaccess.patch
203a18
203a18
Requires(pre): shadow-utils
203a18
Requires(post): glibc
203a18
Requires(postun): glibc
203a18
Requires: systemd-units >= 13
203a18
203a18
BuildRequires: autoconf
203a18
BuildRequires: automake
203a18
BuildRequires: libtool
203a18
BuildRequires: perl
203a18
BuildRequires: perl(ExtUtils::MakeMaker)
203a18
203a18
%description
203a18
Lockdev provides a reliable way to put an exclusive lock to devices
203a18
using both FSSTND and SVr4 methods.
203a18
203a18
%package devel
203a18
Summary: The header files for the lockdev library
203a18
Group: System Environment/Libraries
203a18
Requires: lockdev = %{version}-%{release}
203a18
203a18
%description devel
203a18
The lockdev library provides a reliable way to put an exclusive lock
203a18
on devices using both FSSTND and SVr4 methods. The lockdev-devel
203a18
package contains the development headers.
203a18
203a18
203a18
%prep
203a18
%setup -q -n lockdev-scm-%{co_date}
203a18
203a18
# Replace access() calls with euidaccess() (600636#c9)
203a18
%patch1 -p1 -b .access
203a18
203a18
%build
203a18
# Generate version information from git release tag
203a18
./scripts/git-version > VERSION
203a18
203a18
# To satisfy automake
203a18
touch ChangeLog
203a18
203a18
# Bootstrap autotools
203a18
autoreconf --verbose --force --install
203a18
203a18
CFLAGS="${RPM_OPT_FLAGS} -D_GNU_SOURCE -D_PATH_LOCK=\\\"%{_lockdir}\\\"" \
203a18
%configure --disable-static --enable-helper
203a18
203a18
make %{?_smp_mflags}
203a18
203a18
%install
203a18
make install DESTDIR=%{buildroot}
203a18
203a18
rm -f %{buildroot}%{_libdir}/*.la
203a18
203a18
# %%ghosted, but needs to be in buildroot
203a18
# on reboot re-created by %%{_prefix}/lib/tmpfiles.d/legacy.conf
203a18
mkdir -p %{buildroot}%{_lockdir}
203a18
203a18
%pre
203a18
getent group lock >/dev/null 2>&1 || groupadd -g 54 -r -f lock >/dev/null 2>&1 || :
203a18
203a18
%post -p /sbin/ldconfig
203a18
203a18
%postun -p /sbin/ldconfig
203a18
203a18
203a18
%files
203a18
%doc COPYING AUTHORS
203a18
%ghost %dir %attr(0775,root,lock) %{_lockdir}
203a18
%attr(2711,root,lock)  %{_sbindir}/lockdev
203a18
%{_libdir}/*.so.*
203a18
%{_mandir}/man8/*
203a18
203a18
%files devel
203a18
%{_libdir}/*.so
203a18
%{_libdir}/pkgconfig/lockdev.pc
203a18
%{_mandir}/man3/*
203a18
%{_includedir}/*
203a18
203a18
%changelog
b98077
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.0.4-0.13.20111007git
b98077
- Mass rebuild 2014-01-24
b98077
b98077
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.0.4-0.12.20111007git
b98077
- Mass rebuild 2013-12-27
b98077
203a18
* Mon Aug 26 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.4-0.11.20111007git
203a18
- Remove the %%post scriptlet completely (#983772)
203a18
203a18
* Mon Aug 26 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.4-0.10.20111007git
203a18
- Silence possible %%post scriptlet errors (#983772)
203a18
203a18
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-0.9.20111007git
203a18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
203a18
203a18
* Fri Jul 12 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.4-0.8.20111007git
203a18
- %%{_lockdir} is %%ghost-ed (#983772)
203a18
203a18
* Mon Jun 03 2013 Jiri Popelka <jpopelka@redhat.com> - 1.0.4-0.7.20111007git
203a18
- Replace access() calls with euidaccess(), build with -D_GNU_SOURCE (600636#c9)
203a18
203a18
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-0.6.20111007git
203a18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
203a18
203a18
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-0.5.20111007git
203a18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
203a18
203a18
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-0.4.20111007git
203a18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
203a18
203a18
* Thu Oct 20 2011 Jiri Popelka <jpopelka@redhat.com> - 1.0.4-0.3.20111007git
203a18
- Define _hardened_build
203a18
203a18
* Wed Oct 19 2011 Jiri Popelka <jpopelka@redhat.com> - 1.0.4-0.2.20111007git
203a18
- Fixed URL
203a18
- Removed unused patches
203a18
203a18
* Fri Oct 07 2011 Jiri Popelka <jpopelka@redhat.com> - 1.0.4-0.1.20111007git
203a18
- pre 1.0.4 nightly snapshot
203a18
203a18
* Mon Apr 04 2011 Jiri Popelka <jpopelka@redhat.com> - 1.0.3-10
203a18
- Revert previous change (#681898)
203a18
- /etc/tmpfiles.d/lockdev.conf moved into systemd upstream (#692714)
203a18
203a18
* Thu Mar 03 2011 Jan Görig <jgorig@redhat.com> - 1.0.3-9
203a18
- Change /var/lock/lockdev permissions to 1777 (#681898)
203a18
203a18
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-8
203a18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
203a18
203a18
* Thu Nov 25 2010 Jiri Popelka <jpopelka@redhat.com> - 1.0.3-7
203a18
- Fixed some rpmlint warnings
203a18
203a18
* Thu Nov 25 2010 Jiri Popelka <jpopelka@redhat.com> - 1.0.3-6
203a18
- Added /etc/tmpfiles.d/lockdev.conf to enable lock directory on tmpfs (#656614)
203a18
- Don't ship static library at all
203a18
203a18
* Mon Apr 19 2010 Jiri Popelka <jpopelka@redhat.com> - 1.0.3-5
203a18
- Changed directory for lock files from /var/lock to /var/lock/lockdev (#581884)
203a18
203a18
* Thu Jan 21 2010 Jiri Popelka <jpopelka@redhat.com> - 1.0.3-4
203a18
- Created -static subpackage to ship static library separately
203a18
- Updated lockdev.8 manpage
203a18
203a18
* Thu Dec 10 2009 Jiri Popelka <jpopelka@redhat.com> - 1.0.3-3
203a18
- Correct rh.patch
203a18
203a18
* Thu Dec 10 2009 Jiri Popelka <jpopelka@redhat.com> - 1.0.3-2
203a18
- Correct rh.patch
203a18
203a18
* Mon Dec 07 2009 Jiri Popelka <jpopelka@redhat.com> - 1.0.3-1
203a18
- 1.0.3.  No longer need 1.0.0-signal, 1.0.1-subdir, 1.0.1-fcntl, 1.0.1-32bit patches.
203a18
- Renumbered patches and sources.
203a18
203a18
* Thu Dec 03 2009 Jiri Popelka <jpopelka@redhat.com> - 1.0.1-20
203a18
- Fixed pre section (http://fedoraproject.org/wiki/Packaging/UsersAndGroups)
203a18
- Added back Buildroot to silence rpmlint's false positive
203a18
203a18
* Tue Dec 01 2009 Jiri Popelka <jpopelka@redhat.com> - 1.0.1-19
203a18
- Added license text to package
203a18
203a18
* Fri Oct 02 2009 Jiri Popelka <jpopelka@redhat.com> - 1.0.1-18
203a18
- Fixed mixed-use-of-spaces-and-tabs
203a18
203a18
* Fri Oct 02 2009 Jiri Popelka <jpopelka@redhat.com> - 1.0.1-17
203a18
- Removed PreReq tag
203a18
203a18
* Fri Sep 25 2009 Jiri Popelka <jpopelka@redhat.com> - 1.0.1-16
203a18
- Manual page for /usr/sbin/lockdev
203a18
203a18
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-15
203a18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
203a18
203a18
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-14
203a18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
203a18
203a18
* Mon Oct  6 2008 Karel Zak <kzak@redhat.com> - 1.0.1-13
203a18
- refresh patches (due --fuzz=0)
203a18
- fix compiler warnings
203a18
203a18
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.0.1-12.1
203a18
- Autorebuild for GCC 4.3
203a18
203a18
* Mon Oct 15 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0.1-11.1
203a18
- correct license tag
203a18
- add BR: perl(ExtUtils::MakeMaker)
203a18
203a18
* Thu Apr 12 2007 Karel Zak <kzak@redhat.com> - 1.0.1-11
203a18
- fix rpmlint issues
203a18
- change lockdev permissions from 2755 to 2711
203a18
203a18
* Wed Jul 19 2006 Karel Zak <kzak@redhat.com> - 1.0.1-10
203a18
- rebuild
203a18
203a18
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 1.0.1-9.2.2
203a18
- rebuild
203a18
203a18
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 1.0.1-9.2.1
203a18
- bump again for double-long bug on ppc(64)
203a18
203a18
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 1.0.1-9.2
203a18
- rebuilt for new gcc4.1 snapshot and glibc changes
203a18
203a18
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
203a18
- rebuilt
203a18
203a18
* Wed Sep 21 2005 Karel Zak <kzak@redhat.com> 1.0.1-9
203a18
- fix #165189 - The naming of the lock file by the lockdev command is abnormal.
203a18
203a18
* Thu Sep  1 2005 Karel Zak <kzak@redhat.com> 1.0.1-8
203a18
- fix #163276 - baudboy.h should include fcntl.h
203a18
203a18
* Sat Mar  5 2005 Karel Zak <kzak@redhat.com> 1.0.1-6
203a18
- rebuilt
203a18
203a18
* Wed Feb 23 2005 Karel Zak <kzak@redhat.com> 1.0.1-5
203a18
- lockdev errs on /dev/input/ttyACM0 (3-component pathname) (#126082, #98160, #74454)
203a18
203a18
* Fri Oct 22 2004 Adrian Havill <havill@redhat.com> 1.0.1-4
203a18
- don't unlock files if pid still exists (#128104)
203a18
203a18
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
203a18
- rebuilt
203a18
203a18
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
203a18
- rebuilt
203a18
203a18
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
203a18
- rebuilt
203a18
203a18
* Tue Sep  9 2003 Nalin Dahyabhai <nalin@redhat.com> 1.0.1-1.3
203a18
- rebuild
203a18
203a18
* Mon Sep  8 2003 Nalin Dahyabhai <nalin@redhat.com> 1.0.1-1.2
203a18
- rebuild
203a18
203a18
* Wed Aug 20 2003 Adrian Havill <havill@redhat.com> 1.0.1-1.1
203a18
- bump n-v-r for 3.0E
203a18
203a18
* Fri Aug 15 2003 Adrian Havill <havill@redhat.com> 1.0.1-1
203a18
- bumped version
203a18
- make the dev rewrite work with ttys in the /dev/input subdir, not just
203a18
  the base level dir (#98160)
203a18
203a18
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
203a18
- rebuilt
203a18
203a18
* Tue Feb 04 2003 Florian La Roche <Florian.LaRoche@redhat.de>
203a18
- add symlink to shared lib
203a18
203a18
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
203a18
- rebuilt
203a18
203a18
* Fri Nov 29 2002 Jeff Johnson <jbj@redhat.com>
203a18
- don't segfault if device arg is missing.
203a18
203a18
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
203a18
- automated rebuild
203a18
203a18
* Wed Jun  5 2002 Jeff Johnson <jbj@redhat.com> 1.0.0-19
203a18
- fix: don't ignore signals, use default behavior instead (#63468).
203a18
203a18
* Thu May 23 2002 Tim Powers <timp@redhat.com>
203a18
- automated rebuild
203a18
203a18
* Mon Feb 25 2002 Nalin Dahyabhai <nalin@redhat.com> 1.0.0-16
203a18
- include liblockdev.so so that programs can link to a shared liblockdev
203a18
- fix shared library version numbers
203a18
203a18
* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
203a18
- automated rebuild
203a18
203a18
* Thu Nov 29 2001 Trond Eivind Glomsrod <teg@redhat.com> 1.0.0-16
203a18
- Rebuilt
203a18
203a18
* Fri Oct 26 2001 Trond Eivind Glomsrod <teg@redhat.com> 1.0.0-15
203a18
- Add copyright/license info to baudboy.h (#54321)
203a18
203a18
* Tue Sep  4 2001 Jeff Johnson <jbj@redhat.com>
203a18
- swap egid and gid for lockdev's access(2) device check (#52029).
203a18
203a18
* Tue Aug 28 2001 Jeff Johnson <jbj@redhat.com>
203a18
- typo in include file (#52704).
203a18
- map specific errno's into status for return from helper.
203a18
203a18
* Tue Aug 14 2001 Jeff Johnson <jbj@redhat.com>
203a18
- set exit status correctly.
203a18
203a18
* Thu Aug  9 2001 Bill Nottingham <notting@redhat.com>
203a18
- check that we can open the device r/w before locking
203a18
- fix calling lockdev without any arguments
203a18
- fix waitpid() call in baudboy.h
203a18
- use umask(002), not umask(0)
203a18
203a18
* Wed Aug  8 2001 Bill Nottingham <notting@redhat.com>
203a18
- add lock group here, own /var/lock as well
203a18
203a18
* Sun Aug  5 2001 Jeff Johnson <jbj@redhat.com>
203a18
- include setgid helper binary and baudboy.h.
203a18
203a18
* Mon Jun 18 2001 Trond Eivind Glomsrod <teg@redhat.com>
203a18
- Make the -devel depend on the main package
203a18
203a18
* Sun Aug 06 2000 Trond Eivind Glomsrod <teg@redhat.com>
203a18
- rebuild
203a18
203a18
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
203a18
- automatic rebuild
203a18
203a18
* Sat Jun 17 2000 Bill Nottingham <notting@redhat.com>
203a18
- add %%defattr for -devel
203a18
203a18
* Sat Jun 10 2000 Trond Eivind Glomsrod <teg@redhat.com>
203a18
- use %%{_mandir}
203a18
203a18
* Thu May 04 2000 Trond Eivind Glomsrod <teg@redhat.com>
203a18
- first build