From 46a1281ed9e91c80bfcee47ce809a825c7fdcd4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Popelka?= Date: Fri, 25 Sep 2009 17:01:58 +0000 Subject: [PATCH] - Manual page for /usr/sbin/lockdev --- lockdev-1.0.1-man8.patch | 13 +++++++++++++ lockdev.8 | 40 ++++++++++++++++++++++++++++++++++++++++ lockdev.spec | 17 ++++++++++++----- 3 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 lockdev-1.0.1-man8.patch create mode 100644 lockdev.8 diff --git a/lockdev-1.0.1-man8.patch b/lockdev-1.0.1-man8.patch new file mode 100644 index 0000000..3960c51 --- /dev/null +++ b/lockdev-1.0.1-man8.patch @@ -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} diff --git a/lockdev.8 b/lockdev.8 new file mode 100644 index 0000000..1522c27 --- /dev/null +++ b/lockdev.8 @@ -0,0 +1,40 @@ +.\" +.TH LOCKDEV 8 "SEPTEMBER 2009" "" "" +.\" +.\" Man page written by Jiri Popelka +.\" +.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). diff --git a/lockdev.spec b/lockdev.spec index f02a315..9a47b1c 100644 --- a/lockdev.spec +++ b/lockdev.spec @@ -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 - 1.0.1-16 +- Manual page for /usr/sbin/lockdev + * Sat Jul 25 2009 Fedora Release Engineering - 1.0.1-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild