Create saslauth user according to fedora packaging guide
This commit is contained in:
parent
edcf0e373f
commit
189981c1de
@ -1,3 +1,4 @@
|
|||||||
|
%define uid 50
|
||||||
%define username saslauth
|
%define username saslauth
|
||||||
%define hint "Saslauthd user"
|
%define hint "Saslauthd user"
|
||||||
%define homedir %{_var}/empty/%{username}
|
%define homedir %{_var}/empty/%{username}
|
||||||
@ -8,7 +9,7 @@
|
|||||||
Summary: The Cyrus SASL library
|
Summary: The Cyrus SASL library
|
||||||
Name: cyrus-sasl
|
Name: cyrus-sasl
|
||||||
Version: 2.1.23
|
Version: 2.1.23
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
# Source0 originally comes from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/;
|
# Source0 originally comes from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/;
|
||||||
@ -41,6 +42,7 @@ BuildRequires: autoconf, automake, libtool, gdbm-devel, groff
|
|||||||
BuildRequires: krb5-devel >= 1.2.2, openssl-devel, pam-devel, pkgconfig
|
BuildRequires: krb5-devel >= 1.2.2, openssl-devel, pam-devel, pkgconfig
|
||||||
BuildRequires: mysql-devel, postgresql-devel, zlib-devel
|
BuildRequires: mysql-devel, postgresql-devel, zlib-devel
|
||||||
BuildRequires: db4-devel
|
BuildRequires: db4-devel
|
||||||
|
BuildRequires: fedora-usermgmt-devel
|
||||||
%if ! %{bootstrap_cyrus_sasl}
|
%if ! %{bootstrap_cyrus_sasl}
|
||||||
BuildRequires: openldap-devel
|
BuildRequires: openldap-devel
|
||||||
%endif
|
%endif
|
||||||
@ -48,8 +50,8 @@ Requires(post): chkconfig, /sbin/service
|
|||||||
Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd
|
Requires(pre): /usr/sbin/useradd /usr/sbin/groupadd
|
||||||
Requires(postun): /usr/sbin/userdel /usr/sbin/groupdel
|
Requires(postun): /usr/sbin/userdel /usr/sbin/groupdel
|
||||||
Requires: /sbin/nologin
|
Requires: /sbin/nologin
|
||||||
Provides: user(%username) = %hint
|
Provides: user(%username) = %uid
|
||||||
Provides: group(%username) = %hint
|
Provides: group(%username) = %uid
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -303,8 +305,8 @@ rm -f $RPM_BUILD_ROOT%{_mandir}/cat8/saslauthd.8
|
|||||||
test "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT
|
test "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
/usr/sbin/groupadd -r %{username} 2> /dev/null || :
|
%__fe_groupadd %{uid} -r %{username} >/dev/null 2>&1 || :
|
||||||
/usr/sbin/useradd -c \"%{hint}\" -g %{username} -s /sbin/nologin -r -d %{homedir} %{username} 2> /dev/null || :
|
%__fe_useradd %{uid} -r -c \"%{hint}\" -g %{username} -s /sbin/nologin -d %{homedir} %{username} >/dev/null 2>&1 || :
|
||||||
|
|
||||||
%post
|
%post
|
||||||
/sbin/chkconfig --add saslauthd
|
/sbin/chkconfig --add saslauthd
|
||||||
@ -319,8 +321,8 @@ fi
|
|||||||
if [ $1 -ne 0 ] ; then
|
if [ $1 -ne 0 ] ; then
|
||||||
/sbin/service saslauthd condrestart 2>&1 > /dev/null
|
/sbin/service saslauthd condrestart 2>&1 > /dev/null
|
||||||
fi
|
fi
|
||||||
/usr/sbin/userdel %{username}
|
%__fe_userdel %{username} >/dev/null 2>&1 || :
|
||||||
/usr/sbin/groupdel %{username}
|
%__fe_groupdel %{username} >/dev/null 2>&1 || :
|
||||||
|
|
||||||
%post lib -p /sbin/ldconfig
|
%post lib -p /sbin/ldconfig
|
||||||
%postun lib -p /sbin/ldconfig
|
%postun lib -p /sbin/ldconfig
|
||||||
@ -387,6 +389,9 @@ fi
|
|||||||
%{_sbindir}/sasl2-shared-mechlist
|
%{_sbindir}/sasl2-shared-mechlist
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Oct 16 2009 Jan F. Chadima <jchadima@redhat.com> - 2.1.23-6
|
||||||
|
- Create the saslauth user according to fedora packaging guide
|
||||||
|
|
||||||
* Thu Sep 24 2009 Jan F. Chadima <jchadima@redhat.com> - 2.1.23-5
|
* Thu Sep 24 2009 Jan F. Chadima <jchadima@redhat.com> - 2.1.23-5
|
||||||
- Repair initscript to make condrestart working properly (#522103)
|
- Repair initscript to make condrestart working properly (#522103)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user