util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Bruce Dubbs <bruce.dubbs@gmail.com>
Cc: Util-Linux <util-linux@vger.kernel.org>
Subject: Re: Suggested changes to util-linux for FHS compliance.
Date: Mon, 15 Feb 2021 10:16:25 +0100	[thread overview]
Message-ID: <20210215091625.jzaf6ephntdwmi5w@ws.net.home> (raw)
In-Reply-To: <cc08c08e-81d9-f3c7-ce8b-43a27bfe1c72@gmail.com>

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.

> 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.

For example for Fedora we use:

        ./configure --build=x86_64-redhat-linux-gnu \
        --host=x86_64-redhat-linux-gnu --program-prefix= \
        --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr \
        --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc \
        --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 \
        --libexecdir=/usr/libexec --localstatedir=/var \
        --sharedstatedir=/var/lib --mandir=/usr/share/man \
        --infodir=/usr/share/info \
        --with-systemdsystemunitdir=/usr/lib/systemd/system \
        --disable-silent-rules --disable-bfs --disable-pg --enable-chfn-chsh  \
        --enable-usrdir-path --enable-write --enable-raw --enable-hardlink \
        --with-python=3 --with-systemd --with-udev --with-selinux --with-audit \
        --with-utempter --disable-makeinstall-chown


and it also defaults to /run because of --localstatedir=/var

> Currently this change can be manually made by setting an environment
> variable, runstatedir=/run when running configure, but is undocumented.

The current default should be already good enough for usual use-cases :-)

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


  reply	other threads:[~2021-02-15  9:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 17:04 Suggested changes to util-linux for FHS compliance Bruce Dubbs
2021-02-15  9:16 ` Karel Zak [this message]
2021-02-18 15:37   ` Bruce Dubbs
2021-02-19 11:14     ` Karel Zak
2021-02-19 17:12       ` Bruce Dubbs
2021-02-19 11:30   ` Karel Zak
2021-03-08 11:21     ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210215091625.jzaf6ephntdwmi5w@ws.net.home \
    --to=kzak@redhat.com \
    --cc=bruce.dubbs@gmail.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).