- Manual page for /usr/sbin/lockdev

This commit is contained in:
Jiří Popelka 2009-09-25 17:01:58 +00:00
parent f2239e241e
commit 46a1281ed9
3 changed files with 65 additions and 5 deletions

13
lockdev-1.0.1-man8.patch Normal file
View File

@ -0,0 +1,13 @@
diff -up lockdev-1.0.1/Makefile.man8 lockdev-1.0.1/Makefile
--- lockdev-1.0.1/Makefile.man8 2009-09-25 18:36:19.000000000 +0200
+++ lockdev-1.0.1/Makefile 2009-09-25 18:37:00.000000000 +0200
@@ -72,7 +72,9 @@ install_profile: ${static} ${shared}
install_doc: docs/lockdev.3
install -m755 -d ${mandir}/man3
+ install -m755 -d ${mandir}/man8
install -m644 docs/lockdev.3 ${mandir}/man3
+ install -m644 docs/lockdev.8 ${mandir}/man8
install_run: ${shared}
install -m755 -d ${libdir}

40
lockdev.8 Normal file
View File

@ -0,0 +1,40 @@
.\"
.TH LOCKDEV 8 "SEPTEMBER 2009" "" ""
.\"
.\" Man page written by Jiri Popelka <jpopelka AT redhat DOT com>
.\"
.SH NAME
\fBlockdev\fR demonstrates functionality of liblockdev library.
.SH SYNOPSIS
.B /usr/sbin/lockdev
.RB [< operation >]
.RB < device >
.SH DESCRIPTION
The \fBlockdev\fR command can perform one of the following operations:
\fB-l\fR - lock device with \fBdev_lock()\fR function
\fB-u\fR - unlock device with \fBdev_unlock()\fR function
\fBno operation\fR - test lock with \fBdev_testlock()\fR function
.SH RETURN VALUES
Value dev_lock dev_unlock dev_testlock
0 OK OK not locked
1 locked other locked other locked
2 EACCES
3 EROFS
4 EFAULT
5 EINVAL
6 ENAMETOOLONG
7 ENOENT
8 ENOTDIR
9 ENOMEM
10 ELOOP
11 EIO
255 error error error
.SH SEE ALSO
.BR lockdev (3).

View File

@ -1,11 +1,12 @@
Summary: A library for locking devices
Name: lockdev
Version: 1.0.1
Release: 15%{?dist}
Release: 16%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://packages.debian.org/unstable/source/lockdev
Source: http://ftp.debian.org/debian/pool/main/l/lockdev/%{name}_%{version}.orig.tar.gz
Source0: http://ftp.debian.org/debian/pool/main/l/lockdev/%{name}_%{version}.orig.tar.gz
Source1: lockdev.8
Patch0: lockdev-1.0.0-rh.patch
Patch1: lockdev-1.0.0-shared.patch
@ -17,6 +18,7 @@ Patch6: lockdev-1.0.1-subdir.patch
Patch7: lockdev-1.0.1-fcntl.patch
Patch8: lockdev-1.0.1-32bit.patch
Patch9: lockdev-1.0.1-gccwarn.patch
Patch10: lockdev-1.0.1-man8.patch
Requires(pre): shadow-utils
Requires(post): glibc
@ -25,7 +27,6 @@ PreReq: filesystem >= 2.1.4-1
BuildRequires: perl
BuildRequires: perl(ExtUtils::MakeMaker)
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
Lockdev provides a reliable way to put an exclusive lock to devices
@ -53,12 +54,14 @@ package contains the development headers and a static library.
%patch7 -p1 -b .fcntl
%patch8 -p1 -b .32bit
%patch9 -p1 -b .warn
%patch10 -p1 -b .man8
cp %SOURCE1 ./docs
%build
make "CFLAGS=${RPM_OPT_FLAGS} -fPIC"
%install
rm -fr $RPM_BUILD_ROOT
make \
sbindir=${RPM_BUILD_ROOT}%{_sbindir} \
libdir=${RPM_BUILD_ROOT}%{_libdir} \
@ -82,15 +85,19 @@ rm -fr $RPM_BUILD_ROOT
%defattr(-,root,root)
%attr(2711,root,lock) %{_sbindir}/lockdev
%{_libdir}/*.so.*
%{_mandir}/man8/*
%files devel
%defattr(-,root,root)
%{_libdir}/*.a
%{_libdir}/*.so
%{_mandir}/man*/*
%{_mandir}/man3/*
%{_includedir}/*
%changelog
* Fri Sep 25 2009 Jiri Popelka <jpopelka@redhat.com> - 1.0.1-16
- Manual page for /usr/sbin/lockdev
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild