On 2018-07-05 10:14 -0500, Bruce Dubbs wrote:
> On 07/05/2018 02:50 AM, Xi Ruoyao wrote:
> > 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.
> 
> OK, You've convinced me.  I'll do it as a destdir install.  Do we need 
> to use a sed to add -C to mesonbuild/minstall.py?  Or just wait for the 
> next version?
> 
>    -- Bruce

A patch is attached here.  It contains a sed to add '-C'.

meson-0.47.1 should be released soon.  I think it would be released
earlier than LFS 8.3.  I'll keep an eye on it.
-- 
Xi Ruoyao <[email protected]>
School of Aerospace Science and Technology, Xidian University
From 4e542a4623248308fc49f94bfefdc8c30ce76ac9 Mon Sep 17 00:00:00 2001
From: Xi Ruoyao <[email protected]>
Date: Fri, 6 Jul 2018 03:58:59 +0800
Subject: [PATCH] Update to meson-0.47.0

---
 chapter06/meson.xml | 29 ++++++++++++++++++++++-------
 packages.ent        |  4 ++--
 2 files changed, 24 insertions(+), 9 deletions(-)

diff --git a/chapter06/meson.xml b/chapter06/meson.xml
index 12b88720..c06bfdfe 100644
--- a/chapter06/meson.xml
+++ b/chapter06/meson.xml
@@ -40,6 +40,10 @@
   <sect2 role="installation">
     <title>Installation of Meson</title>
 
+    <para>Make a fix from upstream:</para>
+
+<screen><userinput remap="pre">sed -i '309 [email protected]()@-C, &amp;@' mesonbuild/minstall.py</userinput></screen>
+
     <para>Compile Meson with the following command:</para>
 
 <screen><userinput remap="make">python3 setup.py build</userinput></screen>
@@ -48,14 +52,25 @@
 
     <para>Install the package:</para>
 
-<screen><userinput remap="install">python3 setup.py install</userinput></screen>
+<screen><userinput remap="install">python3 setup.py install --root=dest
+cp -rv dest/* /</userinput></screen>
 
-    <para>At last, move Meson man pages to correct location:</para>
-
-<screen><userinput remap="install">mv -v /usr/lib/python3.6/site-packages/meson-&meson-version;-py3.6.egg/share/man/man1/*.1 \
-      /usr/share/man/man1
-rm -r /usr/lib/python3.6/site-packages/meson-&meson-version;-py3.6.egg/share</userinput></screen>
+    <variablelist>
+      <title>The meaning of the install parameters:</title>
+      
+      <varlistentry>
+        <term><parameter>--root=dest</parameter></term>
+        <listitem>
+          <para>By default <command>python3 setup.py install</command>
+          installs various files (such as man pages) into Python Eggs.
+          With an alternated root, <command>setup.py</command> installs
+          these files into a standard hierarchy.  Then we can just copy
+          the hierarchy so the files would be in the standard location.
+	      </para>
+        </listitem>
+      </varlistentry>
 
+    </variablelist>
   </sect2>
 
 
@@ -68,7 +83,7 @@ rm -r /usr/lib/python3.6/site-packages/meson-&meson-version;-py3.6.egg/share</us
 
       <seglistitem>
         <seg>meson, mesonconf, mesonintrospect, mesontest, and wraptool</seg>
-		<seg>/usr/lib/python3.6/site-packages/meson-&meson-version;-py3.6.egg</seg>
+		<seg>/usr/lib/python3.6/site-packages/meson-&meson-version;-py3.6.egg-info and /usr/lib/python3.6/site-packages/mesonbuild</seg>
       </seglistitem>
     </segmentedlist>
 
diff --git a/packages.ent b/packages.ent
index dd68e76d..28b6d51b 100644
--- a/packages.ent
+++ b/packages.ent
@@ -470,8 +470,8 @@
 <!ENTITY man-pages-ch6-du "27 MB">
 <!ENTITY man-pages-ch6-sbu "less than 0.1 SBU">
 
-<!ENTITY meson-version "0.46.1">
-<!ENTITY meson-size "1,176 KB">
+<!ENTITY meson-version "0.47.0">
+<!ENTITY meson-size "1,217 KB">
 <!ENTITY meson-url "&github;/mesonbuild/meson/releases/download/&meson-version;/meson-&meson-version;.tar.gz">
 <!ENTITY meson-md5 "1698f6526574839de5dcdc45e3f7d582">
 <!ENTITY meson-home "https://mesonbuild.com";>
-- 
2.16.2

-- 
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to