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