|
|
d1681e |
From ea80ad2022197bbc910a2a8426f968d3a657dab7 Mon Sep 17 00:00:00 2001
|
|
|
d1681e |
From: Milind Changire <mchangir@redhat.com>
|
|
|
d1681e |
Date: Thu, 30 Nov 2017 17:37:12 +0530
|
|
|
d1681e |
Subject: [PATCH 128/128] build: remove pretrans script for ganesha
|
|
|
d1681e |
|
|
|
d1681e |
pretrans script for ganesha gets in the way of package installation.
|
|
|
d1681e |
There's no hard requirement for gluster processes to be shut down
|
|
|
d1681e |
for pacakge installation.
|
|
|
d1681e |
|
|
|
d1681e |
Label: DOWNSTREAM ONLY
|
|
|
d1681e |
|
|
|
d1681e |
BUG: 1410719
|
|
|
d1681e |
Change-Id: I3611cfa8eacbd8caa5560909b55d7705d2fc8678
|
|
|
d1681e |
Signed-off-by: Milind Changire <mchangir@redhat.com>
|
|
|
d1681e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/127783
|
|
|
d1681e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
d1681e |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
d1681e |
---
|
|
|
d1681e |
glusterfs.spec.in | 45 +++------------------------------------------
|
|
|
d1681e |
1 file changed, 3 insertions(+), 42 deletions(-)
|
|
|
d1681e |
|
|
|
d1681e |
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
|
|
|
d1681e |
index abebb28..a230b24 100644
|
|
|
d1681e |
--- a/glusterfs.spec.in
|
|
|
d1681e |
+++ b/glusterfs.spec.in
|
|
|
d1681e |
@@ -1875,48 +1875,6 @@ end
|
|
|
d1681e |
|
|
|
d1681e |
|
|
|
d1681e |
|
|
|
d1681e |
-%pretrans ganesha -p <lua>
|
|
|
d1681e |
-if not posix.access("/bin/bash", "x") then
|
|
|
d1681e |
- -- initial installation, no shell, no running glusterfsd
|
|
|
d1681e |
- return 0
|
|
|
d1681e |
-end
|
|
|
d1681e |
-
|
|
|
d1681e |
--- TODO: move this completely to a lua script
|
|
|
d1681e |
--- For now, we write a temporary bash script and execute that.
|
|
|
d1681e |
-
|
|
|
d1681e |
-script = [[#!/bin/sh
|
|
|
d1681e |
-pidof -c -o %PPID -x glusterfsd &>/dev/null
|
|
|
d1681e |
-
|
|
|
d1681e |
-if [ $? -eq 0 ]; then
|
|
|
d1681e |
- pushd . > /dev/null 2>&1
|
|
|
d1681e |
- for volume in /var/lib/glusterd/vols/*; do cd $volume;
|
|
|
d1681e |
- vol_type=`grep '^type=' info | awk -F'=' '{print $2}'`
|
|
|
d1681e |
- volume_started=`grep '^status=' info | awk -F'=' '{print $2}'`
|
|
|
d1681e |
- if [ $vol_type -eq 0 ] && [ $volume_started -eq 1 ] ; then
|
|
|
d1681e |
- exit 1;
|
|
|
d1681e |
- fi
|
|
|
d1681e |
- done
|
|
|
d1681e |
-
|
|
|
d1681e |
- popd > /dev/null 2>&1
|
|
|
d1681e |
- exit 1;
|
|
|
d1681e |
-fi
|
|
|
d1681e |
-]]
|
|
|
d1681e |
-
|
|
|
d1681e |
--- Since we run pretrans scripts only for RPMs built for a server build,
|
|
|
d1681e |
--- we can now use os.tmpname() since it is available on RHEL6 and later
|
|
|
d1681e |
--- platforms which are server platforms.
|
|
|
d1681e |
-tmpname = os.tmpname()
|
|
|
d1681e |
-tmpfile = io.open(tmpname, "w")
|
|
|
d1681e |
-tmpfile:write(script)
|
|
|
d1681e |
-tmpfile:close()
|
|
|
d1681e |
-ok, how, val = os.execute("/bin/bash " .. tmpname)
|
|
|
d1681e |
-os.remove(tmpname)
|
|
|
d1681e |
-if not (ok == 0) then
|
|
|
d1681e |
- error("Detected running glusterfs processes", ok)
|
|
|
d1681e |
-end
|
|
|
d1681e |
-
|
|
|
d1681e |
-
|
|
|
d1681e |
-
|
|
|
d1681e |
%if ( 0%{!?_without_georeplication:1} )
|
|
|
d1681e |
%pretrans geo-replication -p <lua>
|
|
|
d1681e |
if not posix.access("/bin/bash", "x") then
|
|
|
d1681e |
@@ -2183,6 +2141,9 @@ fi
|
|
|
d1681e |
%endif
|
|
|
d1681e |
|
|
|
d1681e |
%changelog
|
|
|
d1681e |
+* Wed Jan 17 2018 Milind Changire <mchangir@redhat.com>
|
|
|
d1681e |
+- DOWNSTREAM ONLY - Removed pretrans script for glusterfs-ganesha - (#1410719)
|
|
|
d1681e |
+
|
|
|
d1681e |
* Wed Jan 17 2018 Mohit Agrawal <moagrawa@redhat.com>
|
|
|
d1681e |
- Exclude control-cpu-load.sh and control-mem.sh for RHEL_7 client builds only (#1534530)
|
|
|
d1681e |
|
|
|
d1681e |
--
|
|
|
d1681e |
1.8.3.1
|
|
|
d1681e |
|