Bug 1336137 - PREFIX is not honoured during build and install
Summary: PREFIX is not honoured during build and install
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: build
Version: 3.7.11
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Niels de Vos
QA Contact:
URL:
Whiteboard:
Depends On: 1335717
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-14 16:43 UTC by Niels de Vos
Modified: 2016-07-20 13:55 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.7.13
Doc Type: Bug Fix
Doc Text:
Clone Of: 1335717
Environment:
Last Closed: 2016-07-20 13:55:16 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Niels de Vos 2016-05-14 16:43:37 UTC
+++ This bug was initially created as a clone of Bug #1335717 +++

A lot of paths in GlusterFS have been hardcoded, and do not honour the prefix set when configured.

Following a discussion on the mailing lists, Aravinda has identified [1][2] the following list of files that get installed outside prefix that need to be fixed to install into the correct location.

sbin
sbin/mount.glusterfs
usr/lib/
usr/lib/systemd
usr/lib/systemd/system
usr/lib/systemd/system/glustereventsd.service
usr/lib/systemd/system/glusterd.service
usr/lib/python2.7
usr/lib/python2.7/site-packages
usr/lib/python2.7/site-packages/gluster
usr/lib/python2.7/site-packages/gluster/__init__.pyo
usr/lib/python2.7/site-packages/gluster/__init__.pyc
usr/lib/python2.7/site-packages/gluster/__init__.py
usr/lib/python2.7/site-packages/gluster/glupy
usr/lib/python2.7/site-packages/gluster/glupy/__init__.pyo
usr/lib/python2.7/site-packages/gluster/glupy/__init__.pyc
usr/lib/python2.7/site-packages/gluster/glupy/__init__.py
var/
var/lib
var/lib/glusterd
var/lib/glusterd/glusterfind
var/lib/glusterd/glusterfind/.keys
var/lib/glusterd/groups
var/lib/glusterd/groups/virt
var/lib/glusterd/hooks
var/lib/glusterd/hooks/1
var/lib/glusterd/hooks/1/delete
var/lib/glusterd/hooks/1/delete/post
var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post.py
var/lib/glusterd/hooks/1/gsync-create
var/lib/glusterd/hooks/1/gsync-create/post
var/lib/glusterd/hooks/1/gsync-create/post/S56glusterd-geo-rep-create-post.sh
var/lib/glusterd/hooks/1/reset
var/lib/glusterd/hooks/1/reset/post
var/lib/glusterd/hooks/1/reset/post/S31ganesha-reset.sh
var/lib/glusterd/hooks/1/stop
var/lib/glusterd/hooks/1/stop/pre
var/lib/glusterd/hooks/1/stop/pre/S30samba-stop.sh
var/lib/glusterd/hooks/1/stop/pre/S29CTDB-teardown.sh
var/lib/glusterd/hooks/1/start
var/lib/glusterd/hooks/1/start/post
var/lib/glusterd/hooks/1/start/post/S31ganesha-start.sh
var/lib/glusterd/hooks/1/start/post/S30samba-start.sh
var/lib/glusterd/hooks/1/start/post/S29CTDBsetup.sh
var/lib/glusterd/hooks/1/set
var/lib/glusterd/hooks/1/set/post
var/lib/glusterd/hooks/1/set/post/S32gluster_enable_shared_storage.sh
var/lib/glusterd/hooks/1/set/post/S30samba-set.sh
var/lib/glusterd/hooks/1/add-brick
var/lib/glusterd/hooks/1/add-brick/pre
var/lib/glusterd/hooks/1/add-brick/pre/S28Quota-enable-root-xattr-heal.sh
var/lib/glusterd/hooks/1/add-brick/post
var/lib/glusterd/hooks/1/add-brick/post/disabled-quota-root-xattr-heal.sh
var/log
var/log/glusterfs
var/run
var/run/gluster
usr/lib/
usr/lib/systemd
usr/lib/systemd/system
usr/lib/systemd/system/glusterd.service
usr/lib/python2.7
usr/lib/python2.7/site-packages
usr/lib/python2.7/site-packages/gluster
usr/lib/python2.7/site-packages/gluster/__init__.pyo
usr/lib/python2.7/site-packages/gluster/__init__.pyc
usr/lib/python2.7/site-packages/gluster/__init__.py
usr/lib/python2.7/site-packages/gluster/glupy
usr/lib/python2.7/site-packages/gluster/glupy/__init__.pyo
usr/lib/python2.7/site-packages/gluster/glupy/__init__.pyc
usr/lib/python2.7/site-packages/gluster/glupy/__init__.py
sbin/
sbin/mount.glusterfs

[1] https://www.gluster.org/pipermail/gluster-devel/2016-May/049516.html
[2] https://www.gluster.org/pipermail/gluster-devel/2016-May/049518.html

--- Additional comment from Vijay Bellur on 2016-05-13 07:57:00 CEST ---

REVIEW: http://review.gluster.org/14315 (configure: Prevent glupy python installation outside $prefix) posted (#2) for review on master by Aravinda VK (avishwan)

--- Additional comment from Aravinda VK on 2016-05-13 08:00:40 CEST ---

Kaushal,

That list was generated without --prefix option during configure. With --prefix option list of files which do not honor prefix are,

usr/lib/
usr/lib/systemd
usr/lib/systemd/system
usr/lib/systemd/system/glusterd.service
usr/lib/python2.7
usr/lib/python2.7/site-packages
usr/lib/python2.7/site-packages/gluster
usr/lib/python2.7/site-packages/gluster/__init__.pyo
usr/lib/python2.7/site-packages/gluster/__init__.pyc
usr/lib/python2.7/site-packages/gluster/__init__.py
usr/lib/python2.7/site-packages/gluster/glupy
usr/lib/python2.7/site-packages/gluster/glupy/__init__.pyo
usr/lib/python2.7/site-packages/gluster/glupy/__init__.pyc
usr/lib/python2.7/site-packages/gluster/glupy/__init__.py
sbin/
sbin/mount.glusterfs 

patch sent to fix glupy related issue 
http://review.gluster.org/14315

--- Additional comment from Vijay Bellur on 2016-05-13 08:19:15 CEST ---

REVIEW: http://review.gluster.org/14315 (configure: Prevent glupy/systemd/mount.glusterfs installation outside $prefix) posted (#3) for review on master by Aravinda VK (avishwan)

--- Additional comment from Vijay Bellur on 2016-05-13 08:58:23 CEST ---

REVIEW: http://review.gluster.org/14315 (configure: Prevent glupy/systemd/mount.glusterfs installation outside $prefix) posted (#4) for review on master by Aravinda VK (avishwan)

--- Additional comment from Aravinda VK on 2016-05-13 09:03:08 CEST ---

Now the same patch addresses all the other issues mentioned in comment 2

--- Additional comment from Vijay Bellur on 2016-05-13 11:34:14 CEST ---

REVIEW: http://review.gluster.org/14315 (configure: Prevent glupy installation outside $prefix) posted (#5) for review on master by Aravinda VK (avishwan)

--- Additional comment from Vijay Bellur on 2016-05-14 18:39:49 CEST ---

COMMIT: http://review.gluster.org/14315 committed in master by Niels de Vos (ndevos) 
------
commit 85de0c83392d861ba47c97664ff73fd7f8705a3a
Author: Aravinda VK <avishwan>
Date:   Fri May 13 09:40:38 2016 +0530

    configure: Prevent glupy installation outside $prefix
    
    glupy was installed in the global path outside the prefix path,
    even if --prefix is passed.
    
    ./configure --prefix=/usr/local
    make install
    
    Expected: ${DESTDIR}${prefix}/lib64/python<VERSION>/site-packages/gluster
    Actual: ${DESTDIR}/usr/lib64/python<VERSION>/site-packages/gluster
    
    prefix was not honoured.
    
    With this patch, glupy will be installed inside the prefix path.
    
    BUG: 1335717
    Change-Id: I810dd8d2d6c403540d4b738f5ab54237c7358bf6
    Signed-off-by: Aravinda VK <avishwan>
    Reviewed-on: http://review.gluster.org/14315
    Smoke: Gluster Build System <jenkins.com>
    Reviewed-by: Niels de Vos <ndevos>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Jeff Darcy <jdarcy>
    CentOS-regression: Gluster Build System <jenkins.com>

Comment 1 Vijay Bellur 2016-05-14 17:50:50 UTC
REVIEW: http://review.gluster.org/14338 (build: place glupy under $prefix while installing) posted (#1) for review on release-3.7 by Niels de Vos (ndevos)

Comment 2 Vijay Bellur 2016-05-14 17:50:53 UTC
REVIEW: http://review.gluster.org/14339 (build: Filter -D_FORTIFY_SOURCE from CFLAGS) posted (#1) for review on release-3.7 by Niels de Vos (ndevos)

Comment 3 Vijay Bellur 2016-05-14 17:50:55 UTC
REVIEW: http://review.gluster.org/14340 (configure: Prevent glupy installation outside $prefix) posted (#1) for review on release-3.7 by Niels de Vos (ndevos)

Comment 4 Vijay Bellur 2016-06-10 12:35:51 UTC
REVIEW: http://review.gluster.org/14339 (build: Filter -D_FORTIFY_SOURCE from CFLAGS) posted (#2) for review on release-3.7 by Aravinda VK (avishwan)

Comment 5 Vijay Bellur 2016-06-10 12:35:54 UTC
REVIEW: http://review.gluster.org/14338 (build: place glupy under $prefix while installing) posted (#2) for review on release-3.7 by Aravinda VK (avishwan)

Comment 6 Vijay Bellur 2016-06-10 12:35:56 UTC
REVIEW: http://review.gluster.org/14340 (configure: Prevent glupy installation outside $prefix) posted (#2) for review on release-3.7 by Aravinda VK (avishwan)

Comment 7 Vijay Bellur 2016-06-16 09:27:39 UTC
REVIEW: http://review.gluster.org/14339 (build: Filter -D_FORTIFY_SOURCE from CFLAGS) posted (#3) for review on release-3.7 by Anoop C S (anoopcs)

Comment 8 Vijay Bellur 2016-06-16 09:27:42 UTC
REVIEW: http://review.gluster.org/14340 (configure: Prevent glupy installation outside $prefix) posted (#3) for review on release-3.7 by Anoop C S (anoopcs)

Comment 9 Vijay Bellur 2016-06-27 20:15:30 UTC
COMMIT: http://review.gluster.org/14338 committed in release-3.7 by Kaleb KEITHLEY (kkeithle) 
------
commit 94b743782200b2399f2d23d4b47356e602f62777
Author: Niels de Vos <ndevos>
Date:   Sat May 14 19:19:39 2016 +0200

    build: place glupy under $prefix while installing
    
    Regression testing on FreeBSD fails due to this error:
    
      --- install-pyglupyPYTHON ---
       /usr/home/jenkins/root/workspace/freebsd-smoke/install-sh -c -d '/usr/local/lib/python2.7/site-packages/gluster/glupy'
      mkdir: /usr/local/lib/python2.7/site-packages/gluster: Permission denied
      mkdir: /usr/local/lib/python2.7/site-packages/gluster: Permission denied
      *** [install-pyglupyPYTHON] Error code 1
    
    The installation prefix is set to "/build/install" and glupy should be
    placed there as well. The default to "/usr/local" is incorrect.
    
    Cherry picked from commit a34c406445fc0294de41a8e4706f106a83e136a0:
    > Change-Id: I166412a271576f2344aecec94c7835f0fe9b1cf3
    > BUG: 1198849
    > Signed-off-by: Niels de Vos <ndevos>
    > Reviewed-on: http://review.gluster.org/13208
    > Smoke: Gluster Build System <jenkins.com>
    > NetBSD-regression: NetBSD Build System <jenkins.org>
    > CentOS-regression: Gluster Build System <jenkins.com>
    > Reviewed-by: Kaleb KEITHLEY <kkeithle>
    
    Change-Id: I166412a271576f2344aecec94c7835f0fe9b1cf3
    BUG: 1336137
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/14338
    Smoke: Gluster Build System <jenkins.org>
    Tested-by: Aravinda VK <avishwan>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Kaleb KEITHLEY <kkeithle>

Comment 10 Vijay Bellur 2016-06-28 04:51:23 UTC
REVIEW: http://review.gluster.org/14339 (build: Filter -D_FORTIFY_SOURCE from CFLAGS) posted (#4) for review on release-3.7 by Anoop C S (anoopcs)

Comment 11 Vijay Bellur 2016-06-28 04:51:25 UTC
REVIEW: http://review.gluster.org/14340 (configure: Prevent glupy installation outside $prefix) posted (#4) for review on release-3.7 by Anoop C S (anoopcs)

Comment 12 Vijay Bellur 2016-06-29 16:54:05 UTC
COMMIT: http://review.gluster.org/14339 committed in release-3.7 by Vijay Bellur (vbellur) 
------
commit f9a6eba4e0b31247116256545b3c12e1df88c0de
Author: Niels de Vos <ndevos>
Date:   Sat May 14 19:23:09 2016 +0200

    build: Filter -D_FORTIFY_SOURCE from CFLAGS
    
    We use python-config to get recommended CFLAGS. It provides
    -D_FORTIFY_SOURCE=2 by default that conflicts with our
    --enable-debug option or a developer provided no-optimization option.
    Hence, filter it out from default CFLAGS.
    
    Cherry picked from commit 5e65701f2660d1be101da81bffea7721d4f9ece0:
    > Change-Id: Id80196baeb55415b1ea334e7b17143e56dfbadb3
    > BUG: 1283948
    > Co-authored-by: Kaleb S KEITHLEY <kkeithle>
    > Signed-off-by: Raghavendra Talur <rtalur>
    > Reviewed-on: http://review.gluster.org/12707
    > Smoke: Gluster Build System <jenkins.com>
    > CentOS-regression: Gluster Build System <jenkins.com>
    > NetBSD-regression: NetBSD Build System <jenkins.org>
    > Reviewed-by: Kaleb KEITHLEY <kkeithle>
    
    Change-Id: Id80196baeb55415b1ea334e7b17143e56dfbadb3
    BUG: 1336137
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/14339
    Smoke: Gluster Build System <jenkins.org>
    Tested-by: Anoop C S <anoopcs>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Kaleb KEITHLEY <kkeithle>

Comment 13 Vijay Bellur 2016-06-29 16:54:50 UTC
COMMIT: http://review.gluster.org/14340 committed in release-3.7 by Vijay Bellur (vbellur) 
------
commit 4d62806d3031cea33bab1641e0c14a1a8cb11c46
Author: Niels de Vos <ndevos>
Date:   Sat May 14 19:23:20 2016 +0200

    configure: Prevent glupy installation outside $prefix
    
    glupy was installed in the global path outside the prefix path,
    even if --prefix is passed.
    
    ./configure --prefix=/usr/local
    make install
    
    Expected: ${DESTDIR}${prefix}/lib64/python<VERSION>/site-packages/gluster
    Actual: ${DESTDIR}/usr/lib64/python<VERSION>/site-packages/gluster
    
    prefix was not honoured.
    
    With this patch, glupy will be installed inside the prefix path.
    
    Cherry picked from commit 85de0c83392d861ba47c97664ff73fd7f8705a3a:
    > BUG: 1335717
    > Change-Id: I810dd8d2d6c403540d4b738f5ab54237c7358bf6
    > Signed-off-by: Aravinda VK <avishwan>
    > Reviewed-on: http://review.gluster.org/14315
    > Smoke: Gluster Build System <jenkins.com>
    > Reviewed-by: Niels de Vos <ndevos>
    > NetBSD-regression: NetBSD Build System <jenkins.org>
    > Reviewed-by: Jeff Darcy <jdarcy>
    > CentOS-regression: Gluster Build System <jenkins.com>
    
    BUG: 1336137
    Change-Id: I810dd8d2d6c403540d4b738f5ab54237c7358bf6
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/14340
    Smoke: Gluster Build System <jenkins.org>
    Tested-by: Anoop C S <anoopcs>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 14 Kaushal 2016-07-20 13:55:16 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.13, please open a new bug report.

glusterfs-3.7.13 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] https://www.gluster.org/pipermail/gluster-users/2016-July/027604.html
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


Note You need to log in before you can comment on or make changes to this bug.