Opened 14 years ago
Last modified 8 years ago
#25041 assigned defect
rpmbuild uses /opt/local/var/tmp
Reported by: | noahcampbell@… | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.2 |
Keywords: | Cc: | afb@…, peter_e@… | |
Port: | rpm |
Description (last modified by mf2k (Frank Schima))
rpmbuild tries to access a directory that doesn't exist.
noahc-mbp:modules noahcampbell$ rpm --eval %_tmppath /opt/local/var/tmp
On my machine (fairly new) this directory doesn't exist. The work around is to great it and provide my user access to write to it.
I believe this is related to the compilation of rpmbuild given my CentOS machine reports the %_tmppath to be /var/tmp
Change History (9)
comment:1 Changed 14 years ago by mf2k (Frank Schima)
Description: | modified (diff) |
---|---|
Owner: | changed from macports-tickets@… to n3npq@… |
comment:2 Changed 14 years ago by afb@…
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:3 follow-up: 4 Changed 14 years ago by noahcampbell@…
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
I guess my point was more about the defaults in rpmbuild, not so much how to change it. OOTB, rpmbuild won't work for a non-root user because it's compiled to depend on a directory that doesn't exist. If the path is correct in terms of proper path requirements for MacPorts, then either the port "spec" file should create the directory the build should depend on a different path.
comment:4 follow-up: 5 Changed 14 years ago by afb@…
OOTB, rpmbuild won't work for a non-root user
That is correct. But /opt/local/var/tmp will be created during the first (root) run, if needed.
So this seems more about running rpmbuild as non-root, than about missing directories ?
comment:5 Changed 14 years ago by noahcampbell@…
Replying to afb@…:
So this seems more about running rpmbuild as non-root, than about missing directories ?
Yeah, I'd say that's accurate...I'm wasn't aware that the directory would be created if run as root. Due to my (mis?)understanding that you shouldn't use rpmbuild as root, I never tried it.
comment:6 Changed 14 years ago by afb@…
MacPorts was doing all package building (see port rpm portname
...) as root, mostly since it was running in a chroot anyway...
The default macro config for the old rpm is:
%_tmppath %{_var}/tmp %_topdir %{_usrsrc}/rpm
Where "rpm" replaced the previous "%_vendor".
If you want to use rpmbuild for building your own packages, you will need to change configuration. Including %_topdir and %_tmppath.
Then again if you want to use RPM for building things outside of MacPorts, you might also want to use a release slightly newer than 2007.
comment:8 Changed 10 years ago by jmroot (Joshua Root)
Cc: | afb@… added |
---|
comment:9 Changed 8 years ago by kurthindenburg (Kurt Hindenburg)
Owner: | n3npq@… deleted |
---|---|
Status: | reopened → assigned |
You can change the default %_tmppath (in ~/.rpmmacros) if you don't want to build as root.
In the same place you can also change %_topdir from the default /opt/local/src/macports...