* building nvmetcli in buildroot
@ 2017-11-09 11:48 stephane gonauer
2017-11-09 17:10 ` Christoph Hellwig
0 siblings, 1 reply; 6+ messages in thread
From: stephane gonauer @ 2017-11-09 11:48 UTC (permalink / raw)
Hello,
I would like to embed nvmetcli into a buildroot project of mine. So I
wrote the first patch (0001-package-add-nvmetcli-package.patch) to
include the nvmetcli as a package .
However this doesn't work well because the setup.cfg from your tree
ends up causing buildroot to try to copy nvmetcli.py to the *HOST*
/usr/sbin.
I looked around other python packages built in my configuration and
no-one seems to use the same "install_scripts" keyword.
So I made the second patch (0001-build-remove-setup.cfg.patch) which
applies against the current nvmetcli tree. With this one, buildroot
does work but the script is placed into /usr/bin.
I wonder if this patch could be applied to your tree or if a better
solution exists.
St?phane
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-package-add-nvmetcli-package.patch
Type: text/x-patch
Size: 2281 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-nvme/attachments/20171109/517df33f/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-build-remove-setup.cfg.patch
Type: text/x-patch
Size: 753 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-nvme/attachments/20171109/517df33f/attachment-0003.bin>
^ permalink raw reply [flat|nested] 6+ messages in thread
* building nvmetcli in buildroot
2017-11-09 11:48 building nvmetcli in buildroot stephane gonauer
@ 2017-11-09 17:10 ` Christoph Hellwig
2017-11-10 7:43 ` stephane gonauer
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2017-11-09 17:10 UTC (permalink / raw)
I'm perfectly happy to make life for buildroots easier, but nvmetcli
is an admin tool that should live in /usr/sbin. We'll need to find
a way for that to still be the default.
^ permalink raw reply [flat|nested] 6+ messages in thread
* building nvmetcli in buildroot
2017-11-09 17:10 ` Christoph Hellwig
@ 2017-11-10 7:43 ` stephane gonauer
2017-11-10 8:19 ` Christoph Hellwig
2017-11-10 11:17 ` Mauro Rodrigues
0 siblings, 2 replies; 6+ messages in thread
From: stephane gonauer @ 2017-11-10 7:43 UTC (permalink / raw)
Hi,
I dug further into the question to better understand.
>From my understanding the root cause lies in setuptools :
- buildroot uses --prefix option to set the prefix to $(TARGET_DIR)
- the setup.cfg from nvmetcli uses -install-script
- When both options are present, install-script completely overrides
--prefix and is considered as an absolute path.
I tried to uses $(TARGET_DIR) inside setup.cfg but it is not evaluated
when reaching setup.cfg (and it results in a path containing the
TARGET_DIR and not its value).
Unless someone knows how to better use setuptools, I don't see a
solution inside nvmetcli tree
St?phane
2017-11-09 18:10 GMT+01:00 Christoph Hellwig <hch at lst.de>:
> I'm perfectly happy to make life for buildroots easier, but nvmetcli
> is an admin tool that should live in /usr/sbin. We'll need to find
> a way for that to still be the default.
^ permalink raw reply [flat|nested] 6+ messages in thread
* building nvmetcli in buildroot
2017-11-10 7:43 ` stephane gonauer
@ 2017-11-10 8:19 ` Christoph Hellwig
2017-11-10 11:17 ` Mauro Rodrigues
1 sibling, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2017-11-10 8:19 UTC (permalink / raw)
On Fri, Nov 10, 2017@08:43:05AM +0100, stephane gonauer wrote:
> Hi,
>
> I dug further into the question to better understand.
>
> >From my understanding the root cause lies in setuptools :
>
> - buildroot uses --prefix option to set the prefix to $(TARGET_DIR)
> - the setup.cfg from nvmetcli uses -install-script
> - When both options are present, install-script completely overrides
> --prefix and is considered as an absolute path.
>
> I tried to uses $(TARGET_DIR) inside setup.cfg but it is not evaluated
> when reaching setup.cfg (and it results in a path containing the
> TARGET_DIR and not its value).
>
> Unless someone knows how to better use setuptools, I don't see a
> solution inside nvmetcli tree
What do other python tools that install into sbin or similar use?
There must be all kinds of precedence for this..
^ permalink raw reply [flat|nested] 6+ messages in thread
* building nvmetcli in buildroot
2017-11-10 7:43 ` stephane gonauer
2017-11-10 8:19 ` Christoph Hellwig
@ 2017-11-10 11:17 ` Mauro Rodrigues
2017-11-10 14:31 ` stephane gonauer
1 sibling, 1 reply; 6+ messages in thread
From: Mauro Rodrigues @ 2017-11-10 11:17 UTC (permalink / raw)
On Fri, Nov 10, 2017@08:43:05AM +0100, stephane gonauer wrote:
> Hi,
>
> I dug further into the question to better understand.
>
> From my understanding the root cause lies in setuptools :
>
> - buildroot uses --prefix option to set the prefix to $(TARGET_DIR)
> - the setup.cfg from nvmetcli uses -install-script
> - When both options are present, install-script completely overrides
> --prefix and is considered as an absolute path.
>
> I tried to uses $(TARGET_DIR) inside setup.cfg but it is not evaluated
> when reaching setup.cfg (and it results in a path containing the
> TARGET_DIR and not its value).
>
> Unless someone knows how to better use setuptools, I don't see a
> solution inside nvmetcli tree
>
> St?phane
>From the top of my head I don't recall to see a different solution for
this.
Is your buildroot tool opensource? I would like to see how it deals
with python packages.
Also, I'll take a look if there is a different option from setuptools
standpoint.
>
> 2017-11-09 18:10 GMT+01:00 Christoph Hellwig <hch at lst.de>:
> > I'm perfectly happy to make life for buildroots easier, but nvmetcli
> > is an admin tool that should live in /usr/sbin. We'll need to find
> > a way for that to still be the default.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* building nvmetcli in buildroot
2017-11-10 11:17 ` Mauro Rodrigues
@ 2017-11-10 14:31 ` stephane gonauer
0 siblings, 0 replies; 6+ messages in thread
From: stephane gonauer @ 2017-11-10 14:31 UTC (permalink / raw)
Hi,
We are using official buildroot 2017.08.
The build I made was for a not yet open source target but the issue
should be the same on a standard x86 buildroot.
(And we didn't patch build infrastructure for that target)
St?phane
2017-11-10 12:17 GMT+01:00 Mauro Rodrigues <maurosr at linux.vnet.ibm.com>:
> On Fri, Nov 10, 2017@08:43:05AM +0100, stephane gonauer wrote:
>> Hi,
>>
>> I dug further into the question to better understand.
>>
>> From my understanding the root cause lies in setuptools :
>>
>> - buildroot uses --prefix option to set the prefix to $(TARGET_DIR)
>> - the setup.cfg from nvmetcli uses -install-script
>> - When both options are present, install-script completely overrides
>> --prefix and is considered as an absolute path.
>>
>> I tried to uses $(TARGET_DIR) inside setup.cfg but it is not evaluated
>> when reaching setup.cfg (and it results in a path containing the
>> TARGET_DIR and not its value).
>>
>> Unless someone knows how to better use setuptools, I don't see a
>> solution inside nvmetcli tree
>>
>> St?phane
>
> From the top of my head I don't recall to see a different solution for
> this.
>
> Is your buildroot tool opensource? I would like to see how it deals
> with python packages.
>
> Also, I'll take a look if there is a different option from setuptools
> standpoint.
>>
>> 2017-11-09 18:10 GMT+01:00 Christoph Hellwig <hch at lst.de>:
>> > I'm perfectly happy to make life for buildroots easier, but nvmetcli
>> > is an admin tool that should live in /usr/sbin. We'll need to find
>> > a way for that to still be the default.
>>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-11-10 14:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-09 11:48 building nvmetcli in buildroot stephane gonauer
2017-11-09 17:10 ` Christoph Hellwig
2017-11-10 7:43 ` stephane gonauer
2017-11-10 8:19 ` Christoph Hellwig
2017-11-10 11:17 ` Mauro Rodrigues
2017-11-10 14:31 ` stephane gonauer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.