Hello Lev Veyde,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/32156
to review the following change.
Change subject: ovirt-image-uploader: Add creation of VDSM user
......................................................................
ovirt-image-uploader: Add creation of VDSM user
Change-Id: I58506d1a979201d2026c890a8ebbb9580827d50f
Signed-off-by: Lev Veyde <[email protected]>
Bug-Url: https://bugzilla.redhat.com/1111229
(cherry picked from commit 53631137640a9ad53c8f4e6ea9c3df240dfa3e21)
---
M configure.ac
M ovirt-image-uploader.spec.in
2 files changed, 11 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-image-uploader
refs/changes/56/32156/1
diff --git a/configure.ac b/configure.ac
index bceed45..49745d9 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/engine-image-uploader.8])
diff --git a/ovirt-image-uploader.spec.in b/ovirt-image-uploader.spec.in
index 434a8c8..48608b0 100644
--- a/ovirt-image-uploader.spec.in
+++ b/ovirt-image-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: Image Uploader for oVirt Engine
Name: %{package_name}
@@ -30,6 +33,7 @@
BuildArch: noarch
Requires: python
Requires: python-lxml
+Requires(pre): shadow-utils
Requires: ovirt-engine-sdk-python >= 3.5.0.2
Requires: logrotate
BuildRequires: gettext
@@ -52,6 +56,11 @@
%check
make check
+%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/32156
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I58506d1a979201d2026c890a8ebbb9580827d50f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-image-uploader
Gerrit-Branch: ovirt-image-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