sane-backends: the user running configure really need to belong to the scanner

group. Reintroduce the note about that, and use "sg" for configure

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22078 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
Pierre Labastie 2019-09-01 10:24:56 +00:00
parent 9d0c26ed7d
commit 46c597642e

View File

@ -153,36 +153,30 @@
<screen role="root"><userinput>groupadd -g 70 scanner</userinput></screen>
<!-- The following seems to be obsolete: I've built sane several times
as user pierre without adding it to the scanner group
<note>
<para>
The user building <application>SANE</application>-backends should be
a member of the <systemitem class="groupname">scanner</systemitem>
group before proceeding. After you have added the user building the
package to the <systemitem class="groupname">scanner</systemitem>
group, issue the following command to create a new shell:
<command>configure</command> assumes that the user building
<application>SANE</application>-backends is a member of the
<systemitem class="groupname">scanner</systemitem> group for testing
the existence of this group. So the user building the package should
be added to the <systemitem class="groupname">scanner</systemitem>
group. As the <systemitem class="username">root</systemitem> user:
</para>
<screen><userinput>su $(whoami)</userinput></screen>
<para>
Check the output of the <userinput>groups</userinput> command and
ensure the user is a member of the
<systemitem class="groupname">scanner</systemitem> group.
</para>
<screen role="root"><userinput>usermod -G scanner -a <replaceable>username</replaceable></userinput></screen>
</note>
-->
<para>For a USB scanner, if you are linking to <xref linkend="libusb"/>,
include the configure switch --enable-libusb_1_0. Install
<application>SANE</application>-backends by running the following
commands:</para>
<screen><userinput>./configure --prefix=/usr \
<screen><userinput>sg scanner -c " \
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-group=scanner \
--with-docdir=/usr/share/doc/sane-backends-&sane-version; &amp;&amp;
--with-docdir=/usr/share/doc/sane-backends-&sane-version;" &amp;&amp;
make</userinput></screen>
<para>To test the results, issue: <command>make check</command>.</para>
@ -252,6 +246,13 @@ install -v -m644 doc/sane.png xscanimage-icon-48x48-2.png \
<sect2 role="commands">
<title>Command Explanations</title>
<para>
<command>sg scanner -c "..."</command>: runs the command between double
quotes with principal group <systemitem
class="groupname">scanner</systemitem>. This may be needed if the user
has been newly added to group scanner, and has not looged out and in.
</para>
<para><parameter>--sysconfdir=/etc</parameter>: This switch installs the
configuration files in <filename class="directory">/etc/sane.d</filename>
instead of <filename class="directory">/usr/etc/sane.d</filename>.</para>