Bug 1005328 - Using framework.make with DESTDIR results in path referencing buildroot
Summary: Using framework.make with DESTDIR results in path referencing buildroot
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnustep-make
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jochen Schmitt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-06 16:27 UTC by Sandro Mani
Modified: 2013-09-06 22:55 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-06 19:40:53 UTC
Type: Bug
Embargoed:


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

Description Sandro Mani 2013-09-06 16:27:25 UTC
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 19:40:53 UTC





Should be fixed with gnustep-make-2.6.5-4.fc21

Comment 2 Sandro Mani 2013-09-06 22:55:39 UTC
Thanks


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