On 2018-07-04 15:21 -0500, Bruce Dubbs wrote: > On 07/04/2018 09:30 AM, Xi Ruoyao wrote: > > On 2018-07-04 05:49 -0500, DJ Lucas wrote: > > > On July 3, 2018 10:21:43 PM CDT, Bruce Dubbs <[email protected]> > > > wrote: > > > > I'm checking out meson-0.47.0 for lfs and the instructions in the bool > > > > work nicely with the exception of the last two: > > > > > > > > mv -v > > > > /usr/lib/python3.6/site-packages/meson-0.47.0-py3.6.egg/share/man/man1/*.1 > > > > \ > > > > /usr/share/man/man1 > > > > rm -r /usr/lib/python3.6/site-packages/meson-0.47.0-py3.6.egg/share > > > > > > > > Actually the mv command is OK, but there is more in the share > > > > directory: > > > > > > > > /usr/lib/python3.6/site-packages/meson-0.47.0-py3.6.egg/share/polkit-1/actions/com.mesonbuild.install.policy > > > > > > > > What that appears to be for is installing packages via meson (we use > > > > ninja, but I don't know if meson inserts things into the build files). > > > > > > > > We do not install polkit in LFS, so I don't know what to do with this > > > > file now or later in BLFS when we do install polkit. > > > > > > > > I have three options that I can see: > > > > > > > > 1. Throw away the .policy file and leave the meson instructions as > > > > they > > > > are. > > > > 2. Just delete the man portion: rm ...egg/share/man > > > > 3. Create /usr/share/polkit-1/actions/ and move the .policy file > > > > there. > > > > > > > > Opinions? > > > Option 3. > > > > Unfortunately the polkit action policy doesn't work with our configuration. > > Meson seems "designed" to be installed with: > > > > python3 setup.py install --root=dest > > cp -rv dest/* / > > > > I suggest to do this. If we still use "python3 setup.py install", the > > polkit action file is useless (at least for now). > > It would be interesting to see the differences between what you suggest > and what we have now.
1. The man pages, polkit rules, etc. would be copied to correct location. 2. "python3 setup.py install" installs Meson scripts into /usr/lib/python3.x/site-packages/meson-*-egg/EGG-INFO/scripts, and creates their "easy install" wrappers in /usr/bin. The polkit rule only matches "/usr/bin/python3 /usr/bin/meson install ..." and doesn't work when meson script is in EGG-INFO/scripts directory. With "--root", the "real" meson scripts will be installed into /usr/bin. > > And, "meson install" with polkit authentication is completely broken now. > > I'll submit a PR tomorrow to fix it. https://github.com/mesonbuild/meson/pull/3835 > Nowhere in lfs or blfs do we do 'meson install'. We use it as a > substitute for configure and then use ninja instead of make. c.f. https://github.com/mesonbuild/meson/pull/3567 The polkit file mentioned in the origin thread is used to support unprivillaged user running `meson install` with polkit support. It shows a better prompt ("Authentication is required to install this project") for root password. With "python3 setup.py install" this rule doesn't work. So I think we have the options: 1. Keep "python3 setup.py install", and remove the polkit rule. Without it polkit authentication would still work, just with a defaulted prompt. 2. Use "--root=dest" and copy the files from "dest" to "/". It would place meson scripts and data into standard location without wrapping, and enable the polkit rule to work. 3. Keep "python3 setup.py install", but fix the polkit rule with: mv -v /usr/lib/python3.x/site-packages/meson-*/.../actions/* \ /usr/share/polkit-1/actions sed 's@/usr/bin/meson@/usr/lib/python3.6/.../scripts/meson@' \ -i /usr/share/polkit-1/actions/com.mesonbuild.install.policy I don't like the idea to leave an useless polkit rule in the LFS system. If we wish to keep "python3 setup.py install", we should either fix it or remove it. -- Xi Ruoyao <[email protected]> School of Aerospace Science and Technology, Xidian University -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
