Bug 1005328 - Using framework.make with DESTDIR results in path referencing buildroot
Using framework.make with DESTDIR results in path referencing buildroot
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gnustep-make (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jochen Schmitt
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-06 12:27 EDT by Sandro Mani
Modified: 2013-09-06 18:55 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-06 15:40:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch (905 bytes, patch)
2013-09-06 12:27 EDT, Sandro Mani
no flags Details | Diff

  None (edit)
Description Sandro Mani 2013-09-06 12:27:25 EDT
Created attachment 794884 [details]
Patch

Description of problem:
Trying to create a package for the SOGo groupware server, I ended up having rpmbuild complaining about an installed file containing a reference to the buildroot.

Closer investigation showed the following issue:

- The framework.make creates a NSFramework_SOGo.m file containing a frameworkPath string, which is set to $(FRAMEWORK_INSTALL_DIR) - see framework.make:496

- $(FRAMEWORK_INSTALL_DIR) is by default set to $($(GNUSTEP_INSTANCE)_INSTALL_DIR) (if nonempty), or $(GNUSTEP_FRAMEWORKS) otherwise - see framework.make:305-311

- $($(GNUSTEP_INSTANCE)_INSTALL_DIR) would presumably be specified in the makefile. If it includes the DESTDIR component, the $(FRAMEWORK_INSTALL_DIR) would also include the DESTDIR. If does not include the DESTDIR component, framework.make would install the files incorrectly in the systemroot instead of the buildroot, and presumably fail due to permission problems - see framework.make:771

- $(GNUSTEP_FRAMEWORKS) on the other hand:
*  is equal to $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_FRAMEWORKS) (see common.make:305)
* $(GNUSTEP_INSTALLATION_DOMAIN) is SYSTEM
* Hence $(GNUSTEP_FRAMEWORKS) is equal to $(GNUSTEP_SYSTEM_FRAMEWORKS)
* $(GNUSTEP_SYSTEM_FRAMEWORKS) is equal to $(GNUSTEP_SYSTEM_LIBRARY)/Frameworks (see filesystem.make:74)
* $(GNUSTEP_SYSTEM_LIBRARY) equal to %{_libdir}/GNUstep (see filesystem.make:62)
* $(MAYBE_DESTDIR) is equal to $(DESTDIR)/ (see common.make:288)
=> Therefore $(MAYBE_DESTDIR)$(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_FRAMEWORKS) is equal to $(DESTDIR)/%{_libdir}/GNUstep/Frameworks, which again references the DESTDIR

A shot-in-the-dark-patch which however seems to work is attached. Basically, frameworkPath is set to $(GNUSTEP_$(GNUSTEP_INSTALLATION_DOMAIN)_FRAMEWORKS) instead of $(FRAMEWORK_INSTALL_DIR).

Version-Release number of selected component (if applicable):
gnustep-make-2.6.5-3.1.fc21.x86_64


Note:
This is the first time I'm fiddling with GNUstep, so I am not really knowledgeable of the GNUstep framework.
Comment 1 Jochen Schmitt 2013-09-06 15:40:53 EDT





Should be fixed with gnustep-make-2.6.5-4.fc21
Comment 2 Sandro Mani 2013-09-06 18:55:39 EDT
Thanks

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