Skip to content

autotools: Properly order install dependencies of pam_lastlog2#3104

Merged
karelzak merged 2 commits intoutil-linux:masterfrom
t-8ch:automake/install-dependency
Jul 2, 2024
Merged

autotools: Properly order install dependencies of pam_lastlog2#3104
karelzak merged 2 commits intoutil-linux:masterfrom
t-8ch:automake/install-dependency

Conversation

@t-8ch
Copy link
Member

@t-8ch t-8ch commented Jun 30, 2024

Fixes for pam_lastlog2 installation.

Closes: #3011

@t-8ch t-8ch mentioned this pull request Jun 30, 2024
@t-8ch t-8ch force-pushed the automake/install-dependency branch from 2350bc6 to 13551bc Compare June 30, 2024 09:42
securelib_LTLIBRARIES = pam_lastlog2.la
securelibexecdir = $(libdir)/security
securelibexec_LTLIBRARIES = pam_lastlog2.la

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to move the directory definition to ./configure.ac (and meson.build) and use
usrsecurelib_execdir as name (for compatibility with other paths).

My suggestion (autotools only):

diff --git a/configure.ac b/configure.ac
index 23594ff23..ed285d83c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,6 +120,10 @@ AS_CASE([$libdir],
 )
 AC_SUBST([usrlib_execdir])
 
+usrsecurelib_execdir='${usrlib_execdir}/security'
+AC_SUBST([usrsecurelib_execdir])
+
+
 # static configuration maintaned by packages (e.g. /usr/lib)
 AC_ARG_VAR([SYSCONFSTATICDIR],
           [Path to static system configuration, default ${prefix}/lib])
diff --git a/pam_lastlog2/src/Makemodule.am b/pam_lastlog2/src/Makemodule.am
index f9a9b6b41..57fce35c1 100644
--- a/pam_lastlog2/src/Makemodule.am
+++ b/pam_lastlog2/src/Makemodule.am
@@ -1,5 +1,4 @@
-securelibdir = $(libdir)/security
-securelib_LTLIBRARIES = pam_lastlog2.la
+usrsecurelib_execdir_LTLIBRARIES = pam_lastlog2.la
 
 pam_lastlog2_la_SOURCES = \
        pam_lastlog2/src/pam_lastlog2.c

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. But shouldn't an empty usrsecurelib_execdir_LTLIBRARIES also go into Makemodule.am and then in pam_lastlog2 we can use +=.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's probably better (more robust) to define the generic variables as empty in the top-level Makefile.am and everywhere else, use +=.

I planned to release v2.40.2 today, but it seems we need to fix this and the rename issue before the release :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

I planned to release v2.40.2 today, but it seems we need to fix this and the rename issue before the release :-)

Indeed.

Do you intend to also include the libuuid fixes in v2.40.2?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm ... the latest libuuid fixes are missing the branch. We need it, too, in 2.40.2 (at least conditional uuid_time64; duplicate liuuid_la_LDFLAGS). Would you like me to prepare the PR (or will I do it tomorrow)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the clear-cache-on-fork change is also important.
If you could do the PR, that would be great.

t-8ch added 2 commits July 1, 2024 14:04
While at it, also move the initial definition of
usesecurelib_exec_LTLIBRARIES into Makefile.am.
Also add "exec" to the target name which is recognized by automake to
mark the targets as architecture-specific.

Signed-off-by: Thomas Weißschuh <[email protected]>
As pam_lastlog2 is relinked during installation, all its dependencies
need to already be installed.
This is the same issue that affected pylibmount which was fixed in
commit 324330a ("build-sys: Properly order install dependencies of pylibmount").
Extend the logic added in that commit to also apply to pam_lastlog2.

Closes: util-linux#3011
Signed-off-by: Thomas Weißschuh <[email protected]>
@t-8ch t-8ch force-pushed the automake/install-dependency branch from 13551bc to 20dc72d Compare July 1, 2024 12:10
@karelzak karelzak merged commit 0588f24 into util-linux:master Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure with 2.40.1

2 participants