Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grunt-rpm broken on OSX (w/ working command-line example) #15

Open
asnowfix opened this issue Jun 16, 2014 · 2 comments
Open

grunt-rpm broken on OSX (w/ working command-line example) #15

asnowfix opened this issue Jun 16, 2014 · 2 comments

Comments

@asnowfix
Copy link

This is the same problem than the one recently fixed by sbt/sbt-native-packager#22, invoking the rpmbuild command-line, but from scala (instead of from Node+Grunt).

[...]
Spawning rpmbuild: {"cmd":"rpmbuild","args":["-bb","--target","noarch","--buildroot","/Users/kowalskif/Desktop/GIT/hp-ws/mpf-client/_rpmbuild/tmp","/Users/kowalskif/Desktop/GIT/hp-ws/mpf-client/_rpmbuild/SPECS/mpf-client.spec"]}
Warning: error: Unable to open temp file.
    Unable to open temp file. Use --force to continue.

Aborted due to warnings.

Here is the spawned command-line execution job:

$ rpmbuild -vvv -bb --target noarch --buildroot /Users/kowalskif/Desktop/GIT/hp-ws/mpf-client/_rpmbuild/t
mp /Users/kowalskif/Desktop/GIT/hp-ws/mpf-client/_rpmbuild/SPECS/mpf-client.spec
Building target platforms: noarch
D:     target platform: noarch
Processing files: mpf-client-0.1.0-SNAPSHOT20140616220711
D:      execv(/opt/local/lib/rpm/find-provides) pid 83186
D:      waitpid(83186) rc 83186 status 0
Finding  Provides: /opt/local/lib/rpm/find-provides
D:      execv(/opt/local/lib/rpm/find-requires) pid 83200
D:      waitpid(83200) rc 83200 status 0
Finding  Requires: /opt/local/lib/rpm/find-requires
Checking for unpackaged file(s): /opt/local/lib/rpm/check-files /Users/kowalskif/Desktop/GIT/hp-ws/mpf-client/_rpmbuild/tmp
D:      execv(/opt/local/lib/rpm/check-files) pid 83219
D:      waitpid(83219) rc 83219 status 0
error: Unable to open temp file.


RPM build errors:
    Unable to open temp file.

Once the generated command is changed into the following format, it works fine:

$ rpmbuild -vvv -bb --target noarch --buildroot /Users/kowalskif/Desktop/GIT/hp-ws/mpf-client/_rpmbuild/t
mp --define "_topdir /Users/kowalskif/Desktop/GIT/hp-ws/mpf-client/_rpmbuild" --define "_tmppath /tmp" /Users/kowalskif/Desktop/GIT/hp-ws/mpf-client/_rpmbuild/SPECS/mpf-cli
ent.spec

As a confirmation, here is the content generated rpm:

$ rpm -qlp _rpmbuild/RPMS/noarch/mpf-client-0.1.0-SNAPSHOT20140616220711.noarch.rpm 
/export/u1/pos-static/mpf/lib/bower_components/angular/angular-csp.css
/export/u1/pos-static/mpf/lib/bower_components/angular/angular.js
/export/u1/pos-static/mpf/lib/bower_components/angular/angular.min.js
[...]
@dod38fr
Copy link

dod38fr commented Jun 17, 2014

By default, rpm use /var/tmp as tmppath. Have you tried to override this value in rpmrc file ? (Either in /etc/rpm/rc or ~/.rpmrc). For more infomration, see tmppath setup in rpmrc

HTH

@asnowfix
Copy link
Author

@dod38fr yes, and the work-around work, but this should not be required on OSX, an OS whose built-in packaging system is not RPM & therefore where there is no /etc/rpmrc or ~/.rpmrc by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants