[MacPorts] #25041: rpmbuild uses /opt/local/var/tmp
#25041: rpmbuild uses /opt/local/var/tmp ------------------------------------+--------------------------------------- Reporter: noahcampbell@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: rpm ------------------------------------+--------------------------------------- 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 -- Ticket URL: <http://trac.macports.org/ticket/25041> MacPorts <http://www.macports.org/> Ports system for Mac OS
#25041: rpmbuild uses /opt/local/var/tmp ------------------------------------+--------------------------------------- Reporter: noahcampbell@… | Owner: n3npq@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: rpm ------------------------------------+--------------------------------------- Changes (by macsforever2000@…): * owner: macports-tickets@… => n3npq@… Old description:
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
New description: 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 -- -- Ticket URL: <http://trac.macports.org/ticket/25041#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#25041: rpmbuild uses /opt/local/var/tmp -------------------------------------+-------------------------------------- Reporter: noahcampbell@… | Owner: n3npq@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Resolution: worksforme | Keywords: Port: rpm | -------------------------------------+-------------------------------------- Changes (by afb@…): * status: new => closed * resolution: => worksforme Comment: 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... -- Ticket URL: <http://trac.macports.org/ticket/25041#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#25041: rpmbuild uses /opt/local/var/tmp -------------------------------------+-------------------------------------- Reporter: noahcampbell@… | Owner: n3npq@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Resolution: | Keywords: Port: rpm | -------------------------------------+-------------------------------------- Changes (by noahcampbell@…): * status: closed => reopened * resolution: worksforme => Comment: 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. -- Ticket URL: <http://trac.macports.org/ticket/25041#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#25041: rpmbuild uses /opt/local/var/tmp -------------------------------------+-------------------------------------- Reporter: noahcampbell@… | Owner: n3npq@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Resolution: | Keywords: Port: rpm | -------------------------------------+-------------------------------------- Comment(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 ? -- Ticket URL: <http://trac.macports.org/ticket/25041#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#25041: rpmbuild uses /opt/local/var/tmp -------------------------------------+-------------------------------------- Reporter: noahcampbell@… | Owner: n3npq@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Resolution: | Keywords: Port: rpm | -------------------------------------+-------------------------------------- Comment(by noahcampbell@…): Replying to [comment:4 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. -- Ticket URL: <http://trac.macports.org/ticket/25041#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#25041: rpmbuild uses /opt/local/var/tmp -------------------------------------+-------------------------------------- Reporter: noahcampbell@… | Owner: n3npq@… Type: defect | Status: reopened Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Resolution: | Keywords: Port: rpm | -------------------------------------+-------------------------------------- Comment(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. -- Ticket URL: <http://trac.macports.org/ticket/25041#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts