Re: Suggested changes to util-linux for FHS compliance.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/15/21 3:16 AM, Karel Zak wrote:
On Fri, Feb 12, 2021 at 11:04:59AM -0600, Bruce Dubbs wrote:
I don't recall if this has come up before, but I suggest a couple of changes
to the default util-linux build configuuration:

1. Change the default ADJTIME_PATH to be /var/lib/hwclock/adjtime

Good idea. I'll do that.

Thanks.

Note: Sorry to take so long to reply. We've been without power/internet for three days in Texas.


2. Change the references to /var/run to just /run or at least add a
configure option --runstatedir=<path>.

The current default is /run if --localstatedir is NONE or /var, see
configure.ac:

  # default for old versions without $runstatedir
  AS_IF([test x"$runstatedir" = x], [runstatedir='${localstatedir}/run'])
# our default if $localstatedir unchanged
  AS_CASE([$localstatedir:$runstatedir],
   [NONE:'${localstatedir}/run' | /var:'${localstatedir}/run' | NONE:'/run' ],
     [runstatedir=/run; AC_MSG_NOTICE([  --runstatedir defaults to /run])]
  )
AC_SUBST([runstatedir])


Try it without an option:

         $ ./configure
         ...
         configure: Default --exec-prefix detected.
         configure:   --bindir defaults to /bin
         configure:   --sbindir defaults to /sbin
         configure:   --libdir defaults to /lib64
         configure:   --runstatedir defaults to /run

the @runstatedir@ should be available since autoconf 2.70
https://www.gnu.org/prep/standards/html_node/Directory-Variables.html
but not sure about the option.

We have autoconf 2.71, but we are not using it for util-linux. The standard tarball defaults to [PREFIX/var] for localstatedir and it is very common to use --prefix=/usr, so that makes using --localstatedir required if runstatedir=/run is desired.

This is an indirect implied result.  Shouldn't it be made explicit?

Perhaps another solution would be to make the default for localstatedir be /var instead of PREFIX/var.

For now we are just using the environment variable runstatedir=/run.

  -- Bruce



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux