|
|
21ab4e |
From f05b9db6b3e74d2cf32b339b45f86e82b518be38 Mon Sep 17 00:00:00 2001
|
|
|
21ab4e |
From: Milind Changire <mchangir@redhat.com>
|
|
|
21ab4e |
Date: Tue, 7 Nov 2017 18:32:59 +0530
|
|
|
21ab4e |
Subject: [PATCH 632/632] build: remove pretrans script for python-gluster
|
|
|
21ab4e |
|
|
|
21ab4e |
Remove pretrans scriptlet for python-gluster.
|
|
|
21ab4e |
|
|
|
21ab4e |
Label: DOWNSTREAM ONLY
|
|
|
21ab4e |
|
|
|
21ab4e |
Change-Id: Iee006354c596aedbd70438a3bdd583de28837190
|
|
|
21ab4e |
BUG: 1257520
|
|
|
21ab4e |
Signed-off-by: Milind Changire <mchangir@redhat.com>
|
|
|
21ab4e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/122556
|
|
|
21ab4e |
Reviewed-by: Prashanth Pai <ppai@redhat.com>
|
|
|
21ab4e |
Reviewed-by: Aravinda Vishwanathapura Krishna Murthy <avishwan@redhat.com>
|
|
|
21ab4e |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
21ab4e |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
21ab4e |
---
|
|
|
21ab4e |
glusterfs.spec.in | 42 ------------------------------------------
|
|
|
21ab4e |
1 file changed, 42 deletions(-)
|
|
|
21ab4e |
|
|
|
21ab4e |
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
|
|
|
21ab4e |
index 55747b759..63fbeba31 100644
|
|
|
21ab4e |
--- a/glusterfs.spec.in
|
|
|
21ab4e |
+++ b/glusterfs.spec.in
|
|
|
21ab4e |
@@ -1909,48 +1909,6 @@ end
|
|
|
21ab4e |
|
|
|
21ab4e |
|
|
|
21ab4e |
|
|
|
21ab4e |
-%pretrans -n python-gluster -p <lua>
|
|
|
21ab4e |
-if not posix.access("/bin/bash", "x") then
|
|
|
21ab4e |
- -- initial installation, no shell, no running glusterfsd
|
|
|
21ab4e |
- return 0
|
|
|
21ab4e |
-end
|
|
|
21ab4e |
-
|
|
|
21ab4e |
--- TODO: move this completely to a lua script
|
|
|
21ab4e |
--- For now, we write a temporary bash script and execute that.
|
|
|
21ab4e |
-
|
|
|
21ab4e |
-script = [[#!/bin/sh
|
|
|
21ab4e |
-pidof -c -o %PPID -x glusterfsd &>/dev/null
|
|
|
21ab4e |
-
|
|
|
21ab4e |
-if [ $? -eq 0 ]; then
|
|
|
21ab4e |
- pushd . > /dev/null 2>&1
|
|
|
21ab4e |
- for volume in /var/lib/glusterd/vols/*; do cd $volume;
|
|
|
21ab4e |
- vol_type=`grep '^type=' info | awk -F'=' '{print $2}'`
|
|
|
21ab4e |
- volume_started=`grep '^status=' info | awk -F'=' '{print $2}'`
|
|
|
21ab4e |
- if [ $vol_type -eq 0 ] && [ $volume_started -eq 1 ] ; then
|
|
|
21ab4e |
- exit 1;
|
|
|
21ab4e |
- fi
|
|
|
21ab4e |
- done
|
|
|
21ab4e |
-
|
|
|
21ab4e |
- popd > /dev/null 2>&1
|
|
|
21ab4e |
- exit 1;
|
|
|
21ab4e |
-fi
|
|
|
21ab4e |
-]]
|
|
|
21ab4e |
-
|
|
|
21ab4e |
--- Since we run pretrans scripts only for RPMs built for a server build,
|
|
|
21ab4e |
--- we can now use os.tmpname() since it is available on RHEL6 and later
|
|
|
21ab4e |
--- platforms which are server platforms.
|
|
|
21ab4e |
-tmpname = os.tmpname()
|
|
|
21ab4e |
-tmpfile = io.open(tmpname, "w")
|
|
|
21ab4e |
-tmpfile:write(script)
|
|
|
21ab4e |
-tmpfile:close()
|
|
|
21ab4e |
-ok, how, val = os.execute("/bin/bash " .. tmpname)
|
|
|
21ab4e |
-os.remove(tmpname)
|
|
|
21ab4e |
-if not (ok == 0) then
|
|
|
21ab4e |
- error("Detected running glusterfs processes", ok)
|
|
|
21ab4e |
-end
|
|
|
21ab4e |
-
|
|
|
21ab4e |
-
|
|
|
21ab4e |
-
|
|
|
21ab4e |
%if ( 0%{!?_without_rdma:1} )
|
|
|
21ab4e |
%pretrans rdma -p <lua>
|
|
|
21ab4e |
if not posix.access("/bin/bash", "x") then
|
|
|
21ab4e |
--
|
|
|
21ab4e |
2.13.6
|
|
|
21ab4e |
|