[bacula/el5] Remove fedora-usermgmt

Simone Caronni slaanesh at fedoraproject.org
Wed Jul 18 13:21:45 UTC 2012


commit b9052f1592e5e5f0f4c4b48cf2d9aacd65edfef9
Author: Simone Caronni <negativo17 at gmail.com>
Date:   Wed Jul 18 15:21:29 2012 +0200

    Remove fedora-usermgmt

 bacula.spec |   27 +++++++++++++++++----------
 1 files changed, 17 insertions(+), 10 deletions(-)
---
diff --git a/bacula.spec b/bacula.spec
index c2f25d0..75ebf65 100644
--- a/bacula.spec
+++ b/bacula.spec
@@ -1,7 +1,10 @@
+%global uid 133
+%global username bacula
+
 Summary:        Cross platform network backup for Linux, Unix, Mac and Windows
 Name:           bacula
 Version:        2.4.4
-Release:        3%{?dist}
+Release:        4%{?dist}
 License:        GPL
 Group:          System Environment/Daemons
 URL:            http://www.%{name}.org
@@ -121,8 +124,6 @@ Summary:        Common Bacula Director files
 Group:          System Environment/Daemons
 Requires:       %{name}-director = %{version}-%{release}
 Requires:       %{name}-common = %{version}-%{release}
-Requires(pre):          fedora-usermgmt
-Requires(postun):       fedora-usermgmt
 
 %description director-common
 Bacula is a set of programs that allow you to manage the backup, recovery, and
@@ -230,8 +231,8 @@ devices. This storage has support for the PostgresSQL database.
 %package        common
 Summary:        Common Bacula utilities
 Group:          System Environment/Daemons
-Requires(pre):          fedora-usermgmt
-Requires(postun):       fedora-usermgmt
+Requires(pre):          shadow-utils
+Requires(postun):       shadow-utils
 
 %description    common
 Bacula is a set of programs that allow you to manage the backup, recovery, and
@@ -667,14 +668,16 @@ remove_all_fake_dir_alternatives() {
 remove_all_fake_dir_alternatives postgresql
 
 %pre common
-/usr/sbin/fedora-groupadd 33 -r %{name} &>/dev/null || :
-/usr/sbin/fedora-useradd  33 -r -s /sbin/nologin -d /var/spool/%{name} -M \
-        -c 'Bacula Backup System' -g %{name} %{name} &>/dev/null || :
+getent group %username >/dev/null || groupadd -g %uid -r %username &>/dev/null || :
+getent passwd %username >/dev/null || useradd -u %uid -r -s /sbin/nologin \
+    -d /var/spool/bacula -M -c 'Bacula Backup System' -g %username %username &>/dev/null || :
+exit 0
 
 
 %postun common
-test "$1" != 0 || /usr/sbin/fedora-userdel  %{name} &>/dev/null || :
-test "$1" != 0 || /usr/sbin/fedora-groupdel %{name} &>/dev/null || :
+test "$1" != 0 || userdel %username &>/dev/null || :
+test "$1" != 0 || groupdel %username &>/dev/null || :
+exit 0
 
 
 %post storage-mysql
@@ -995,6 +998,10 @@ fi
 
 
 %changelog
+* Wed Jul 18 2012 Simone Caronni <negativo17 at gmail.com> 2.4.4-4
+- Remove fedora-usermgmt entirely, see thread at:
+  http://lists.fedoraproject.org/pipermail/packaging/2011-December/008034.html
+
 * Wed Jul 18 2012 Simone Caronni <negativo17 at gmail.com> 2.4.4-3
 - Removed commented stuff that will never come back.
 - Cleaned up init files.


More information about the scm-commits mailing list