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

Relocatable RPM (or instructions) #48

Closed
rpwagner opened this issue Jun 3, 2016 · 7 comments
Closed

Relocatable RPM (or instructions) #48

rpwagner opened this issue Jun 3, 2016 · 7 comments

Comments

@rpwagner
Copy link

rpwagner commented Jun 3, 2016

Hey,

I'd like specify the prefix when building an RPM or have the RPM be relocatable. Even if this was just an "edit here" example that would be sufficient.

Thanks

@gmkurtzer
Copy link
Contributor

I don't think I've ever done a relocatable RPM before, and I'm not sure that will work appropriately for Singularity as there are paths which are compiled into the application workflow. The paths can be overriden by standard configuration arguments, but I am pretty sure that changing the installed paths will break Singularity.

Thoughts?

@rpwagner
Copy link
Author

rpwagner commented Jun 3, 2016

It doesn't need to be a relocatable RPM in our case, I'd just like to be able to specify the install location that will be used. When compiling from source you've got the classic ./configure --prefix= option builtin. If there was some way to get that argument into the RPM build process that would be fine, even if it meant editing the spec file. I tried a bit last night and failed so I thought I'd ask.

@gmkurtzer
Copy link
Contributor

Ahhh, try adding the appropriate --define args to the rpmbuild command... For example:

rpmbuild -ta --define="_prefix /opt/singularity" --define "_sysconfdir /opt/singularity/etc" singularity-2.0.tar.gz

@rpwagner
Copy link
Author

rpwagner commented Jun 3, 2016

Almost perfect! The %doc files still end up in /usr/share/singularity-*. I tried adding --define="_docdir /opt/singularity/share" but no luck.

@gmkurtzer
Copy link
Contributor

Ahh, try this:

--define "_defaultdocdir /opt/singularity/share"

@rpwagner
Copy link
Author

rpwagner commented Jun 3, 2016

Boom! Done! Lovely. Thanks for the help and for including a spec file to begin with.

@rpwagner rpwagner closed this as completed Jun 3, 2016
@gmkurtzer
Copy link
Contributor

Wahoo! I will make the appropriate documentation changes on the webpage. Thanks!

pedroalvesbatista referenced this issue in pedroalvesbatista/singularity Jun 8, 2021
Bumps [github.com/vbauerster/mpb/v6](https://github.com/vbauerster/mpb) from 6.0.3 to 6.0.4.
- [Release notes](https://github.com/vbauerster/mpb/releases)
- [Commits](vbauerster/mpb@v6.0.3...v6.0.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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