Hello Lev Veyde,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/32158
to review the following change.
Change subject: ovirt-iso-uploader: Add creation of VDSM user
......................................................................
ovirt-iso-uploader: Add creation of VDSM user
Change-Id: Ibd024327e9263f3523fd39f632d694d55fc78161
Signed-off-by: Lev Veyde <[email protected]>
Bug-Url: https://bugzilla.redhat.com/1129382
(cherry picked from commit a6e511dfef10ad8ed93e1ce44adb842580728514)
---
M configure.ac
M ovirt-iso-uploader.spec.in
2 files changed, 11 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-iso-uploader
refs/changes/58/32158/1
diff --git a/configure.ac b/configure.ac
index f4e5b99..858102e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,8 @@
PACKAGE_RPM_RELEASE="0.1.$(echo VERSION_SUFFIX | sed 's/^_//')"
AC_SUBST([PACKAGE_RPM_VERSION])
AC_SUBST([PACKAGE_RPM_RELEASE])
+AC_SUBST([VDSMUSER], [vdsm])
+AC_SUBST([VDSMGROUP], [kvm])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_SRCDIR([src/ovirt-iso-uploader.8])
diff --git a/ovirt-iso-uploader.spec.in b/ovirt-iso-uploader.spec.in
index 9b13102..e6ca496 100644
--- a/ovirt-iso-uploader.spec.in
+++ b/ovirt-iso-uploader.spec.in
@@ -17,6 +17,9 @@
%global package_version @PACKAGE_VERSION@
%global package_name @PACKAGE_NAME@
+# Required users and groups
+%global vdsm_user @VDSMUSER@
+%global vdsm_group @VDSMGROUP@
Summary: ISO Uploader for oVirt Engine
Name: %{package_name}
@@ -29,6 +32,7 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
BuildArch: noarch
Requires: python
+Requires(pre): shadow-utils
Requires: ovirt-engine-sdk-python >= 3.5.0.2
Requires: logrotate
BuildRequires: gettext
@@ -47,6 +51,11 @@
make %{?_smp_mflags}
+%pre
+getent passwd %{vdsm_user} >/dev/null || \
+ LC_ALL=C useradd -r -u 36 -g %{vdsm_group} -d / \
+ -s /sbin/nologin -c "Node Virtualization Manager" %{vdsm_user}
+
%install
rm -rf "%{buildroot}"
make %{?_smp_mflags} install DESTDIR="%{buildroot}"
--
To view, visit http://gerrit.ovirt.org/32158
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd024327e9263f3523fd39f632d694d55fc78161
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-iso-uploader
Gerrit-Branch: ovirt-iso-uploader-3.5
Gerrit-Owner: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Lev Veyde <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches