rpms/Canna/devel Canna.spec,1.12,1.13

Akira Tagoh (tagoh) fedora-extras-commits at redhat.com
Tue Aug 14 12:53:11 UTC 2007


Author: tagoh

Update of /cvs/pkgs/rpms/Canna/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15093

Modified Files:
	Canna.spec 
Log Message:
* Tue Aug 14 2007 Akira TAGOH <tagoh at redhat.com> - 3.7p3-21
- Update the user and the group handling.


Index: Canna.spec
===================================================================
RCS file: /cvs/pkgs/rpms/Canna/devel/Canna.spec,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Canna.spec	13 Aug 2007 12:28:26 -0000	1.12
+++ Canna.spec	14 Aug 2007 12:52:39 -0000	1.13
@@ -2,9 +2,6 @@
 %define zipcodever 20030204
 %define cannadicver 0.95c
 %define cannadir Canna37p3
-### See http://fedoraproject.org/wiki/PackageUserCreation
-%bcond_without fedora
-%global uid           42
 %global username      canna
 %global homedir       %{_var}/lib/%{username}
 %global gecos         Canna Service User
@@ -13,7 +10,7 @@
 Summary: A Japanese character set input system.
 Name: Canna
 Version: 3.7p3
-Release: 20%{?dist}
+Release: 21%{?dist}
 # lib/RKindep/cksum.c is licensed under 4-clause BSD, otherwise MIT.
 License: MIT and BSD with advertising
 Group: System Environment/Libraries
@@ -48,17 +45,13 @@
 Patch43: Canna-3.7p3-fix-gcc4-warning.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires(pre): /bin/grep /etc/passwd %{_sbindir}/userdel %{_bindir}/id
+Requires(pre): shadow-utils
 Requires(post): /bin/grep /etc/services /sbin/chkconfig %{__chown}
 Requires(preun): /sbin/service /sbin/chkconfig
 Requires(postun): /sbin/service
-Provides: user(%username) = %{uid}
-Provides: group(%username) = %{uid}
 BuildRequires: cpp gawk
 BuildRequires: imake >= 1.0.1-3
-BuildRequires: fedora-usermgmt-devel
 Obsoletes: tamago
-%{?FE_USERADD_REQ}
 
 %description
 Canna provides a user interface for inputting Japanese characters.
@@ -261,12 +254,9 @@
 
 
 %pre
-[ -f /etc/passwd ] && if grep -q canna /etc/passwd; then
-	# old one might be there
-	[ "x`%{_bindir}/id -u canna`" = "x39" ] && %{_sbindir}/userdel canna &> /dev/null || :
-fi
-%{__fe_groupadd} %{uid} -r %{username} &> /dev/null || :
-%{__fe_useradd} %{uid} -r -s /sbin/nologin -d %{homedir} -M -c '%{gecos}' -g %{username} %{username} &>/dev/null || :
+getent group %{username} >/dev/null || groupadd -r %{username}
+getent passwd %{username} >/dev/null || useradd -r -g %{username} -d %{homedir} -s /sbin/nologin -c '%{gecos}' %{username}
+exit 0
 
 %post
 if ! grep -q canna /etc/services
@@ -286,8 +276,6 @@
 if [ "$1" -ge "1" ]; then
     /sbin/service canna try-restart >/dev/null 2>&1 || :
 fi
-%{__fe_userdel} %{username} &>/dev/null || :
-%{__fe_groupdel} %{username} &>/dev/null || :
 
 %post libs -p /sbin/ldconfig
 
@@ -341,6 +329,9 @@
 %{_libdir}/libcanna16.so.*
 
 %changelog
+* Tue Aug 14 2007 Akira TAGOH <tagoh at redhat.com> - 3.7p3-21
+- Update the user and the group handling.
+
 * Mon Aug 13 2007 Akira TAGOH <tagoh at redhat.com> - 3.7p3-20
 - Follow UserCreation documentation to have canna user. (#223838)
 




More information about the fedora-extras-commits mailing list