* Tue Jan 09 2008 Eric Sandeen <sandeen@redhat.com> 1.40.4-3
- New uuidd subpackage, and properly set up uuidd at install.
This commit is contained in:
parent
e6e6b9e88d
commit
858507e01a
18
e2fsprogs-1.40.4-uuidd-tidy.patch
Normal file
18
e2fsprogs-1.40.4-uuidd-tidy.patch
Normal file
@ -0,0 +1,18 @@
|
||||
Index: e2fsprogs-1.39/misc/uuidd.8.in
|
||||
===================================================================
|
||||
--- e2fsprogs-1.39.orig/misc/uuidd.8.in
|
||||
+++ e2fsprogs-1.39/misc/uuidd.8.in
|
||||
@@ -64,11 +64,11 @@ UUID's.
|
||||
.TP
|
||||
.BI \-p " pidfile"
|
||||
Specify the pathname where the pid file should be written. By default,
|
||||
-the pid file is written to /var/run/uuidd.pid.
|
||||
+the pid file is written to /var/lib/libuuid/uuidd.pid.
|
||||
.TP
|
||||
.BI \-s " socketpath"
|
||||
Specify the pathname used for the unix-domain socket used by uuidd. By
|
||||
-qdefault, the pathname used is /var/run/uuidd.sock. This is primarily
|
||||
+default, the pathname used is /var/lib/libuuid/uuidd.sock. This is primarily
|
||||
for debugging purposes, since the pathname is hard-coded in the libuuid
|
||||
library.
|
||||
.TP
|
@ -4,7 +4,7 @@
|
||||
Summary: Utilities for managing the second and third extended (ext2/ext3) filesystems
|
||||
Name: e2fsprogs
|
||||
Version: 1.40.4
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
# License based on upstream-modified COPYING file,
|
||||
# which clearly states "V2" intent.
|
||||
License: GPLv2
|
||||
@ -12,9 +12,11 @@ Group: System Environment/Base
|
||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
||||
Source1: ext2_types-wrapper.h
|
||||
Source2: blkid_types-wrapper.h
|
||||
Patch34: e2fsprogs-1.39-blkid-devmapper.patch
|
||||
Patch36: e2fsprogs-1.38-etcblkid.patch
|
||||
Patch62: e2fsprogs-1.39-mkinstalldirs.patch
|
||||
Source3: uuidd.init
|
||||
Patch1: e2fsprogs-1.39-blkid-devmapper.patch
|
||||
Patch2: e2fsprogs-1.38-etcblkid.patch
|
||||
Patch3: e2fsprogs-1.39-mkinstalldirs.patch
|
||||
Patch4: e2fsprogs-1.40.4-uuidd-tidy.patch
|
||||
|
||||
Url: http://e2fsprogs.sourceforge.net/
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
@ -72,14 +74,28 @@ You should install e2fsprogs-devel if you want to develop ext2/ext3
|
||||
filesystem-specific programs. If you install e2fsprogs-devel, you'll
|
||||
also want to install e2fsprogs.
|
||||
|
||||
%package -n uuidd
|
||||
Summary: helper daemon to guarantee uniqueness of time-based UUIDs
|
||||
Group: System Environment/Daemons
|
||||
Requires: e2fsprogs-libs = %{version}-%{release}
|
||||
License: GPLv2
|
||||
Requires(pre): shadow-utils
|
||||
|
||||
%description -n uuidd
|
||||
The uuidd package contains a userspace daemon (uuidd) which guarantees
|
||||
uniqueness of time-based UUID generation even at very high rates on
|
||||
SMP systems.
|
||||
|
||||
%prep
|
||||
%setup -q -n e2fsprogs-%{version}
|
||||
# look at device mapper devices
|
||||
%patch34 -p1 -b .dm
|
||||
%patch1 -p1 -b .dm
|
||||
# put blkid.tab in /etc/blkid/
|
||||
%patch36 -p1 -b .etcblkid
|
||||
%patch2 -p1 -b .etcblkid
|
||||
# Fix for newer autoconf (#220715)
|
||||
%patch62 -p1 -b .mkinstalldirs
|
||||
%patch3 -p1 -b .mkinstalldirs
|
||||
# uuidd manpage tidyup
|
||||
%patch4 -p1 -b .uuidd-tidy
|
||||
|
||||
%build
|
||||
aclocal
|
||||
@ -102,6 +118,11 @@ mv -f $RPM_BUILD_ROOT%{_includedir}/blkid/blkid_types.h \
|
||||
$RPM_BUILD_ROOT%{_includedir}/blkid/blkid_types-%{_arch}.h
|
||||
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_includedir}/blkid/blkid_types.h
|
||||
|
||||
# Our own initscript for uuidd
|
||||
install -m 755 %{SOURCE3} $RPM_BUILD_ROOT/etc/init.d/uuidd
|
||||
# And a dir uuidd needs that the makefiles don't create
|
||||
install -d $RPM_BUILD_ROOT/var/lib/libuuid
|
||||
|
||||
%find_lang %{name}
|
||||
|
||||
%check
|
||||
@ -130,6 +151,23 @@ if [ $1 = 0 ]; then
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%pre -n uuidd
|
||||
getent group uuidd >/dev/null || groupadd -r uuidd
|
||||
getent passwd uuidd >/dev/null || \
|
||||
useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \
|
||||
-c "UUID generator helper daemon" uuidd
|
||||
exit 0
|
||||
|
||||
%post -n uuidd
|
||||
/sbin/chkconfig --add uuidd
|
||||
|
||||
%preun -n uuidd
|
||||
if [ "$1" = 0 ]
|
||||
then
|
||||
/sbin/service uuidd stop > /dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del uuidd
|
||||
fi
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root)
|
||||
%doc README RELEASE-NOTES
|
||||
@ -155,7 +193,6 @@ exit 0
|
||||
%{_root_sbindir}/tune2fs
|
||||
%{_sbindir}/filefrag
|
||||
%{_sbindir}/mklost+found
|
||||
%{_sbindir}/uuidd
|
||||
|
||||
%{_bindir}/chattr
|
||||
%{_bindir}/lsattr
|
||||
@ -186,7 +223,6 @@ exit 0
|
||||
%{_mandir}/man8/mklost+found.8*
|
||||
%{_mandir}/man8/resize2fs.8*
|
||||
%{_mandir}/man8/tune2fs.8*
|
||||
%{_mandir}/man8/uuidd.8*
|
||||
|
||||
%files libs
|
||||
%defattr(-,root,root)
|
||||
@ -241,7 +277,17 @@ exit 0
|
||||
%{_mandir}/man3/uuid_time.3*
|
||||
%{_mandir}/man3/uuid_unparse.3*
|
||||
|
||||
%files -n uuidd
|
||||
%defattr(-,root,root)
|
||||
/etc/init.d/uuidd
|
||||
%{_mandir}/man8/uuidd.8*
|
||||
%attr(-, uuidd, uuidd) %{_sbindir}/uuidd
|
||||
%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid
|
||||
|
||||
%changelog
|
||||
* Tue Jan 09 2008 Eric Sandeen <sandeen@redhat.com> 1.40.4-3
|
||||
- New uuidd subpackage, and properly set up uuidd at install.
|
||||
|
||||
* Tue Jan 01 2008 Eric Sandeen <esandeen@redhat.com> 1.40.4-2
|
||||
- Add new uidd files to specfile
|
||||
|
||||
|
75
uuidd.init
Executable file
75
uuidd.init
Executable file
@ -0,0 +1,75 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# uuidd uuidd daemon for unique time-based UUID generation
|
||||
#
|
||||
# Author: Eric Sandeen <sandeen@redhat.com>
|
||||
#
|
||||
# chkconfig: 2345 60 99
|
||||
#
|
||||
# description: uuidd is a helper daemon to guarantee uniqueness of \
|
||||
# time-based UUIDs when using libuuid.
|
||||
# processname: uuidd
|
||||
# pidfile: /var/lib/libuuid/uuidd.pid
|
||||
#
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: uuidd
|
||||
# Required-Start: $time $local_fs
|
||||
# Required-Stop: $time $local_fs
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: UUID daemon
|
||||
# Description: Daemon which guarantees uniqueness of time-based UUIDS
|
||||
# when using libuuid.
|
||||
### END INIT INFO
|
||||
|
||||
|
||||
# source function library
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
RETVAL=0
|
||||
DAEMON=uuidd
|
||||
|
||||
start() {
|
||||
echo -n $"Starting uuidd: "
|
||||
daemon --user uuidd --pidfile /var/lib/libuuid/uuidd.pid /usr/sbin/uuidd
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/uuidd
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n $"Stopping uuidd: "
|
||||
killproc uuidd
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/uuidd
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart|force-reload|reload)
|
||||
restart
|
||||
;;
|
||||
condrestart)
|
||||
[ -f /var/lock/subsys/uuidd ] && restart
|
||||
;;
|
||||
status)
|
||||
status -p /var/lib/libuuid/uuidd.pid uuidd uuidd
|
||||
REVAL=$?
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit $RETVAL
|
Loading…
Reference in New Issue
Block a user