-
Notifications
You must be signed in to change notification settings - Fork 7
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
how do you do DESTDIR, it's necessary for packaging #33
Comments
@SolarAquarion This is how to change the installation directory and installation prefix from def build(ctx):
ctx.install_destdir = 'the/target/installation/directory'
ctx.install_prefix = '/usr/not-actually-local' Of course, you probably don't want to have to edit your build script in order to set the installation directory. In other to allow it to be passed over the command line (e.g. def arguments(parser):
group = parser.add_argument_group('config options')
group.add_argument('--destdir', help='Set the installation destdir', default='/')
group.add_argument('--prefix', help='Set the installation prefix', default='usr')
# Other arguments go here.
def build(ctx):
ctx.install_destdir = ctx.options.destdir
ctx.install_prefix = ctx.options.prefix This is described in the manual here. A full example in one of my own projects is here. Does that answer your question? (Also, out of curiosity, how exactly did you come about this question?) |
Arch creates a fakeroot directory named "pkg" which is not / but is /
because it's going to be / after you install it with sudo pacman -U
uterm-git*.pkg.tar.xz
…On Mar 15, 2018 3:41 PM, "Ryan Gonzalez" ***@***.***> wrote:
@SolarAquarion <https://github.com/solaraquarion> This is how to change
the installation directory and installation prefix from fbuildroot.py:
def build(ctx):
ctx.install_destdir = 'the/target/installation/directory'
ctx.install_prefix = '/usr/not-actually-local'
Of course, you probably don't want to have to edit your build script in
order to set the installation directory. In other to allow it to be passed
over the command line (e.g. fbuild --destdir=some-path or so), you can do
this:
def arguments(parser):
group = parser.add_argument_group('config options')
group.add_argument('--destdir', help='Set the installation destdir', default='/')
group.add_argument('--prefix', help='Set the installation prefix', default='usr')
# Other arguments go here.
def build(ctx):
ctx.install_destdir = ctx.options.destdir
ctx.install_prefix = ctx.options.prefix
This is described in the manual here
<http://fbuild.readthedocs.io/en/latest/manual.html#command-line-options>.
A full example in one of my own projects is here
<https://github.com/kirbyfan64/uprocd/blob/master/fbuildroot.py>.
Does that answer your question?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFD6iHM2r9wqwcg11abD329LePQ3AT9pks5tesP6gaJpZM4SshKc>
.
|
I'm trying to create a package for arch Linux. I already packaged fbuild
…On Mar 15, 2018 3:41 PM, "Ryan Gonzalez" ***@***.***> wrote:
@SolarAquarion <https://github.com/solaraquarion> This is how to change
the installation directory and installation prefix from fbuildroot.py:
def build(ctx):
ctx.install_destdir = 'the/target/installation/directory'
ctx.install_prefix = '/usr/not-actually-local'
Of course, you probably don't want to have to edit your build script in
order to set the installation directory. In other to allow it to be passed
over the command line (e.g. fbuild --destdir=some-path or so), you can do
this:
def arguments(parser):
group = parser.add_argument_group('config options')
group.add_argument('--destdir', help='Set the installation destdir', default='/')
group.add_argument('--prefix', help='Set the installation prefix', default='usr')
# Other arguments go here.
def build(ctx):
ctx.install_destdir = ctx.options.destdir
ctx.install_prefix = ctx.options.prefix
This is described in the manual here
<http://fbuild.readthedocs.io/en/latest/manual.html#command-line-options>.
A full example in one of my own projects is here
<https://github.com/kirbyfan64/uprocd/blob/master/fbuildroot.py>.
Does that answer your question?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFD6iHM2r9wqwcg11abD329LePQ3AT9pks5tesP6gaJpZM4SshKc>
.
|
@SolarAquarion In that case, it depends on the project you're trying to package adding that argument... What project are you trying to package? Also, I saw the Arch Linux package, and it looks great! |
uterm, i am trying to package uterm
…On Thu, Mar 15, 2018 at 6:23 PM, Ryan Gonzalez ***@***.***> wrote:
@SolarAquarion <https://github.com/solaraquarion> In that case, it
depends on the project you're trying to package adding that argument...
What project are you trying to package?
Also, I saw the Arch Linux package, and it looks great!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFD6iJ02MGpHp985P6yj2Pwq1lzD_pACks5teunogaJpZM4SshKc>
.
|
maybe a "--root=$pkgdir" would be a interesting thing to add to the
features of fbuild
…On Thu, Mar 15, 2018 at 6:23 PM, Ryan Gonzalez ***@***.***> wrote:
@SolarAquarion <https://github.com/solaraquarion> In that case, it
depends on the project you're trying to package adding that argument...
What project are you trying to package?
Also, I saw the Arch Linux package, and it looks great!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFD6iJ02MGpHp985P6yj2Pwq1lzD_pACks5teunogaJpZM4SshKc>
.
|
you don't have a prefix setting in that fbuildroot
On Thu, Mar 15, 2018 at 6:58 PM, Solomon Choina <[email protected]>
wrote:
… maybe a "--root=$pkgdir" would be a interesting thing to add to the
features of fbuild
On Thu, Mar 15, 2018 at 6:23 PM, Ryan Gonzalez ***@***.***>
wrote:
> @SolarAquarion <https://github.com/solaraquarion> In that case, it
> depends on the project you're trying to package adding that argument...
> What project are you trying to package?
>
> Also, I saw the Arch Linux package, and it looks great!
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#33 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AFD6iJ02MGpHp985P6yj2Pwq1lzD_pACks5teunogaJpZM4SshKc>
> .
>
|
That's a good point... Anyhow, I added |
There needs to be an option for prefix to be /usr and the destdir a
fakeroot known as $pkgdir. It still doesn't create all the directories in
the fakeroot
On Mar 15, 2018 8:33 PM, "Ryan Gonzalez" <[email protected]> wrote:
That's a good point...
Anyhow, I added --destdir and --prefix to uterm in the latest commit. I'll
leave this open for some pondering on how to solve this more generically.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFD6iJGZeFJX8ifkIcMm9gFKQj_5Y1I5ks5tewg7gaJpZM4SshKc>
.
|
@SolarAquarion Whoops, sorry...I wasn't actually installing anything yet... You should be able to just do |
aceback (most recent call last): |
@SolarAquarion Sorry for the delay, but yeah, that one's definitely a bug. (Seems to be somewhere in path manipulation...) You can try |
I see, thanks
…On Sat, Apr 7, 2018, 1:49 PM Ryan Gonzalez ***@***.***> wrote:
@SolarAquarion <https://github.com/SolarAquarion> Sorry for the delay,
but yeah, that one's definitely a bug. (Seems to be somewhere in path
manipulation...) You can try fbuild install --release --destdir="$pkgdir"
--prefix=usr as a workaround (notice I dropped the leading / off of
--prefix's value).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#33 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFD6iGcK1VNVsaeKNWRoI2PC59Y6XOc1ks5tmPwGgaJpZM4SshKc>
.
|
No description provided.
The text was updated successfully, but these errors were encountered: