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

--workdir accepts option but still rpm build goes to /tmp/ only, have modified clamp options to return new value. #714

Closed
wants to merge 1 commit into from

Conversation

@dhajoshi
Copy link

dhajoshi commented Jun 5, 2014

... modified --workdir in options

@dhajoshi

This comment has been minimized.

Copy link
Author

dhajoshi commented Jun 18, 2014

Hello Jordan,

even if i specify --workdir for rpm to do it's work in some other directory then /tmp, it doesnt take that new directory option, after applying this fix now if i specify --workdir </var/tmp> my rpm build and other stuff goes to /var/tmp and not to /tmp (which is default) ..

hope m doing right thing ?

@jordansissel

This comment has been minimized.

Copy link
Owner

jordansissel commented Jun 18, 2014

I dont' think your patch has any effect.

Here's what I see in the fpm logs:

Running command {:args=>["rpmbuild", "-bb", "--define", "buildroot /tmp/example/package-rpm-build20140618-31973-sb8sfc/BUILD", "--define", "_topdir /tmp/example/package-rpm-build20140618-31973-sb8sfc", "--define", "_sourcedir /tmp/example/package-rpm-build20140618-31973-sb8sfc", "--define", "_rpmdir /tmp/example/package-rpm-build20140618-31973-sb8sfc/RPMS", "/tmp/example/package-rpm-build20140618-31973-sb8sfc/SPECS/fizz.spec"], :level=>:debug, :file=>"/home/jls/projects/fpm/lib/fpm/util.rb", :line=>"59"}
Process is running {:pid=>31978, :level=>:debug, :file=>"/home/jls/projects/fpm/lib/fpm/util.rb", :line=>"72"}
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.slSxHM {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"46"}
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.w2Bmzk {:level=>:info, :file=>"cabin/mixins/pipe.rb", :line=>"46"

So --workdir affects fpm's locations for temporary things, but not rpm's. Knowing what setting in rpmbuild chooses /var/tmp would help fix this quickly.

@jordansissel

This comment has been minimized.

Copy link
Owner

jordansissel commented Jun 19, 2014

^ Above patch result:

% bin/fpm -f --verbose --workdir /tmp/example -s empty -t rpm -n foo
...
Running rpmbuild {:args=>["rpmbuild", "-bb", "--define", "buildroot /tmp/example/package-rpm-build20140619-11007-1bn2a2w/BUILD", "--define", "_topdir /tmp/example/package-rpm-build20140619-11007-1bn2a2w", "--define", "_sourcedir /tmp/example/package-rpm-build20140619-11007-1bn2a2w", "--define", "_rpmdir /tmp/example/package-rpm-build20140619-11007-1bn2a2w/RPMS", "--define", "_tmppath /tmp/example", "/tmp/example/package-rpm-build20140619-11007-1bn2a2w/SPECS/foo.spec"], :level=>:info}
Executing(%prep): /bin/sh -e /tmp/example/rpm-tmp.tqsWWs {:level=>:info}
Executing(%build): /bin/sh -e /tmp/example/rpm-tmp.P5C0lY {:level=>:info}
Executing(%install): /bin/sh -e /tmp/example/rpm-tmp.AkWALt {:level=>:info}

You can see it using /tmp/example as the rpm _tmppath instead of the default of /var/lib. :)

prof-milki pushed a commit to prof-milki/xpm that referenced this pull request Dec 18, 2014
prof-milki pushed a commit to prof-milki/xpm that referenced this pull request Dec 27, 2014
jordansissel added a commit that referenced this pull request Apr 24, 2015
jordansissel added a commit that referenced this pull request Jun 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.