Skip Menu |
 

To: krb5-bugs@mit.edu
Subject: Apparent bug with configure and "make install"
Date: Thu, 31 Dec 2020 09:49:37 -0600
From: "Mike Jetzer" <mjetzer.cdc@gmail.com>
Compiling krb5-1.18.3 on a Red Hat Enterprise Linux 7 system.  When I did a "make install" as a non-privileged user, I got a "mkdir: cannot create directory '/run/krb5kdc': Permission denied" in the initial "mkdir" section of the "make install".

Inspecting src/Makefile, INSTALLMKDIRS includes ${localstatedir}/run and ${localstatedir}/run/krb5kdc, but these are the only two occurrences of the string "localstatedir" in this Makefile.

I see that localstatdir is defined as ${prefix}/var in src/doc/Makefile, so I manually added this definition to my src/Makefile, which allowed "make install" to run without error.
I bet this only happens with the recently released autoconf 2.70.  Near the top of configure.ac we have:

Show quoted text
# If $runstatedir isn't set by autoconf (<2.70), set it manually.               
if test x"$runstatedir" = x; then
  runstatedir=$localstatedir/run
fi
AC_SUBST(runstatedir)

The compatibility code uses the immediate value of $localstatedir, while autoconf 2.70 presumably substitutes "${localstatedir}/run".  Since we are sloppy and directly use @localstatedir@ and @runstatedir@ in Makefile.in files, the real version doesn't work for us.

I will submit a PR next week to add appropriate definitions to config/pre.in and use $(localstatedir) and $(runstatedir).
 
To: rt@krbdev.mit.edu
Date: Mon, 4 Jan 2021 08:04:29 -0600
From: "Mike Jetzer" <mjetzer.cdc@gmail.com>
Subject: Re: [krbdev.mit.edu #8975] Apparent bug with configure and "make install"
As I noted in my original report, this occurred with krb5-1.18.3.

On Fri, Jan 1, 2021 at 1:21 AM Greg Hudson via RT <rt@krbdev.mit.edu> wrote:
Show quoted text
I bet this only happens with the recently released autoconf 2.70. Near the top
of configure.ac we have:

# If $runstatedir isn't set by autoconf (<2.70), set it manually.
if test x"$runstatedir" = x; then
runstatedir=$localstatedir/run
fi
AC_SUBST(runstatedir)

The compatibility code uses the immediate value of $localstatedir, while
autoconf 2.70 presumably substitutes "${localstatedir}/run". Since we are
sloppy and directly use @localstatedir@ and @runstatedir@ in Makefile.in files,
the real version doesn't work for us.

I will submit a PR next week to add appropriate definitions to config/pre.in
and use $(localstatedir) and $(runstatedir).


On further investigation, the Debian autoconf package present in Ubuntu 18.04 added support for runstatedir in 2.69-9.  So this issue affects the 1.18.3 and 1.17.4 source releases as they were built on Ubuntu 18.04.  Upstream autoconf also added runstatedir support in 2.69b, not just in 2.70.
 
From: "Robbie Harwood" <rharwood@redhat.com>
Date: Tue, 05 Jan 2021 14:11:03 -0500
Subject: Re: [krbdev.mit.edu #8975] Apparent bug with configure and "make install"
To: rt-comment@krbdev.mit.edu
For historical reasons, RHEL/Fedora set a bunch of krb5 paths
differently than upstream does. To do this, we customize runstatedir
and localstatedir. This for Fedora:
https://github.com/frozencemetery/krb5.fedora/blob/master/krb5.spec#L227-L240
(previously, %{_var}/run was used instead of /run).

Thanks,
--Robbie
Download signature.asc
application/pgp-signature 861B

Message body not shown because it is not plain text.

Subject: git commit
From: ghudson@mit.edu

Fix runstatedir makefile substitution

Set localstatedir and runstatedir in config/pre.in so that the default
runstatedir value of ${localstatedir}/run works. Reported by Mike
Jetzer.

https://github.com/krb5/krb5/commit/fd005a1967510004c9197f7da9f1d85ee81f4734
Author: Greg Hudson <ghudson@mit.edu>
Commit: fd005a1967510004c9197f7da9f1d85ee81f4734
Branch: master
src/Makefile.in | 4 ++--
src/config/pre.in | 3 ++-
src/configure.ac | 2 +-
src/doc/Makefile.in | 2 --
src/man/Makefile.in | 2 --
5 files changed, 5 insertions(+), 8 deletions(-)
From: ghudson@mit.edu
Subject: git commit

Fix runstatedir makefile substitution

Set localstatedir and runstatedir in config/pre.in so that the default
runstatedir value of ${localstatedir}/run works. Reported by Mike
Jetzer.

(cherry picked from commit fd005a1967510004c9197f7da9f1d85ee81f4734)

https://github.com/krb5/krb5/commit/b399721b5aedacc490158c04f6a3fa77c98f0b62
Author: Greg Hudson <ghudson@mit.edu>
Commit: b399721b5aedacc490158c04f6a3fa77c98f0b62
Branch: krb5-1.17
src/Makefile.in | 4 ++--
src/config/pre.in | 3 ++-
src/configure.in | 2 +-
src/doc/Makefile.in | 2 --
src/man/Makefile.in | 2 --
5 files changed, 5 insertions(+), 8 deletions(-)
Subject: git commit
From: ghudson@mit.edu

Fix runstatedir makefile substitution

Set localstatedir and runstatedir in config/pre.in so that the default
runstatedir value of ${localstatedir}/run works. Reported by Mike
Jetzer.

(cherry picked from commit fd005a1967510004c9197f7da9f1d85ee81f4734)

https://github.com/krb5/krb5/commit/8da1e0afb15cfc6f721677a84d00eeb4b51470bd
Author: Greg Hudson <ghudson@mit.edu>
Commit: 8da1e0afb15cfc6f721677a84d00eeb4b51470bd
Branch: krb5-1.18
src/Makefile.in | 4 ++--
src/config/pre.in | 3 ++-
src/configure.ac | 2 +-
src/doc/Makefile.in | 2 --
src/man/Makefile.in | 2 --
5 files changed, 5 insertions(+), 8 deletions(-)
From: ghudson@mit.edu
Subject: git commit

Fix runstatedir makefile substitution

Set localstatedir and runstatedir in config/pre.in so that the default
runstatedir value of ${localstatedir}/run works. Reported by Mike
Jetzer.

(cherry picked from commit fd005a1967510004c9197f7da9f1d85ee81f4734)

https://github.com/krb5/krb5/commit/5d6fc4604750bd3755e57cb83200f1d9aa49a990
Author: Greg Hudson <ghudson@mit.edu>
Commit: 5d6fc4604750bd3755e57cb83200f1d9aa49a990
Branch: krb5-1.19
src/Makefile.in | 4 ++--
src/config/pre.in | 3 ++-
src/configure.ac | 2 +-
src/doc/Makefile.in | 2 --
src/man/Makefile.in | 2 --
5 files changed, 5 insertions(+), 8 deletions(-)