Opened 14 years ago

Closed 14 years ago

#2481 closed task (wontfix)

tcp_wrapper lib inaccessable when /usr is nfs mount

Reported by: thomas Owned by: blfs-book@…
Priority: normal Milestone: 6.3
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

Spinal has suggested the following in ticket #2387:

<citate> Hello there!

I wanted to post the ticket about portmap too. I'm working now on diskless system using LFS.

What I have noticed.

1) ...

2) I changed the order of loading bootscripts (to be able to mount /usr hierarchy from the server) and noticed that portmap depends on libwrap.so which is located in /usr/lib and /usr cannot be mounted before portmap is started. So I suggest to extend installation of tcp_wrappers with commands (after make install):

mv -v /usr/lib/libwrap.so /lib &&
ln -sv /lib/libwrap.so /usr/lib

Thanks for attention. </citate>

Change History (6)

comment:1 by Randy McMurchy, 14 years ago

Actually, the commands are not really correct. .so, .la and .a files should always be in /usr/lib (for packages that originate in /usr/lib).

The files that need to be moved into /lib are /usr/lib/libwrap.so.0.7.6 and /usr/lib/libwrap.so.0. Then those files are symlinked in /usr/lib.

Reason being that .so .a and .la files are only used at build time for other packages. The .so.x.x.x and .so.x files are run-time. And we're looking to get the run-time files into /lib.

Now that said, I'm not sure we should do this in the TCP Wrappers instructions (as mentioned above if I'm reading it right). Instead, these commands should be in the portmap instructions. If it's portmap that needs them at run-time, then yes they should be in /lib if /usr/lib is not available at boot-time.

No need to move TCP Wrapper libraries if there is no run-time requirement to have them there before /usr is mounted. At least that's my thoughts anyway.

in reply to:  1 comment:2 by thomas, 14 years ago

Replying to randy@linuxfromscratch.org:

Actually, the commands are not really correct. .so, .la and .a files should always be in /usr/lib (for packages that originate in /usr/lib).

The files that need to be moved into /lib are /usr/lib/libwrap.so.0.7.6 and /usr/lib/libwrap.so.0. Then those files are symlinked in /usr/lib.

Reason being that .so .a and .la files are only used at build time for other packages. The .so.x.x.x and .so.x files are run-time. And we're looking to get the run-time files into /lib.

Yes quite right - I think Spinal meant that this way.

Now that said, I'm not sure we should do this in the TCP Wrappers instructions (as mentioned above if I'm reading it right). Instead, these commands should be in the portmap instructions. If it's portmap that needs them at run-time, then yes they should be in /lib if /usr/lib is not available at boot-time.

No need to move TCP Wrapper libraries if there is no run-time requirement to have them there before /usr is mounted. At least that's my thoughts anyway.

Hmm, i can understand what you saying. On the other side, I don't feel good when the installation of one package moves/symlinks objects of another package. What happens when there [is|will be] another package which has the same issue (needing the libs in /lib). Doing the moves in each package could potentially damage the whole installation because the second one then moves only the symlinks while the binaries would be in the correct place already. I was going to modify the tcp_wrapper.xml that way, that i make a note about the issue when /usr isn't available and than show the commands - like this:

<para>The <filename>libwrap.so.0.x.x</filename> are installed in <filename>/usr/lib</filename> by default. This is unusable in case of having the <filename>/usr</filename> directory mounted while system startup using NFS; but Portmap depends on that libraries. Solve that issue by moving the libraries to <filename>/lib</filename>:</para>

<screen role="root"><userinput>mv -v /usr/lib/libwrap.so.0{,.7.6} /lib &amp;&amp; ln -sv /lib/libwrap.so.0{,.7.6} /usr/lib/</userinput></screen>

comment:3 by Randy McMurchy, 14 years ago

Resolution: fixed
Status: newclosed

I would rather we put the mv and ln commands in the portmap instructions. There is already precedent to do it that way in other packages (see Heimdal, Kerberos, and I think there are others that I cannot recall right now).

Additionally, a couple of things have to be required to put libwrap in /lib: 1. you must have portmap installed 2. /usr must be a separate partition. That would probably be a small percentage of libwrap installers that need this.

The message in the Wrappers instructions you propose is fine, but I'd rather we keep the libraries in /usr/lib as the default. But then I find that having the same messages and instructions in both packages redundant.

We can discuss further, but if we change tcpwrappers default installation path then we need to do it in all packages that could be moved to /lib depending on circumstance (Berkeley DB in the LFS instructions for one thing, which would be a big-time hassle).

I suggest posting a message to BLFS-Dev and get a discussion going there. Many more folks will see it and have an opportunity to provide comments. I cannot see moving the libraries myself, as the portmap/NFS mount of /usr combination is really the only thing that would ever require libwrap in lib.

comment:4 by Randy McMurchy, 14 years ago

Resolution: fixed
Status: closedreopened

comment:5 by Randy McMurchy, 14 years ago

Oops, hit the wrong button and closed the ticket. Reopened.

comment:6 by thomas, 14 years ago

Resolution: wontfix
Status: reopenedclosed

Won't do too much on this because having /usr or /var on the network is not supported in {,B}LFS. Especially upgrading some packages seems to become quite difficult in such scenarios. There is a note in portmap page about the issue, too.

Note: See TracTickets for help on using tickets.