Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure: use runstatedir for default pid path #7409

Closed
wants to merge 1 commit into from

Conversation

pbrezina
Copy link
Member

@pbrezina pbrezina commented Jun 5, 2024

make distcheck yields the following error because pidpath is currently hardcoded to
/run/sssd (with the run directory hardcoded) and prefix is not correctly applied.

autoreconf -if && ./configure && make distcheck/usr/bin/mkdir: cannot create directory '/run/sssd': Permission denied
make[5]: *** [Makefile:47801: installsssddirs] Error 1
2024-06-04T16:35:23.1627995Z /usr/bin/mkdir -p \
2024-06-04T16:35:23.1628921Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/include \
2024-06-04T16:35:23.1629987Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/lib \
2024-06-04T16:35:23.1631024Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/bin \
2024-06-04T16:35:23.1632011Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/sbin \
2024-06-04T16:35:23.1632919Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/share/man \
2024-06-04T16:35:23.1633620Z     /run/sssd \
2024-06-04T16:35:23.1634262Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/lib/sssd \
2024-06-04T16:35:23.1635121Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/lib/ldb \
2024-06-04T16:35:23.1635921Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/share/dbus-1/system.d \
2024-06-04T16:35:23.1636710Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/share/dbus-1/system-services \
2024-06-04T16:35:23.1637387Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/lib/sssd \
2024-06-04T16:35:23.1637936Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/lib/sssd \
2024-06-04T16:35:23.1638495Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/share/sssd \
2024-06-04T16:35:23.1639022Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/lib \
2024-06-04T16:35:23.1639592Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/lib/sssd/modules \
2024-06-04T16:35:23.1640407Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/var/lib/sss/pipes/private \
2024-06-04T16:35:23.1641288Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/share/sssd/krb5-snippets \

@alexey-tikhonov alexey-tikhonov added the no-backport This should go to target branch only. label Jun 5, 2024
@alexey-tikhonov alexey-tikhonov self-assigned this Jun 5, 2024
@alexey-tikhonov
Copy link
Member

Works, ACK.

@pbrezina
Copy link
Member Author

pbrezina commented Jun 5, 2024

centos-9 copr build failed with: https://download.copr.fedorainfracloud.org/results/@sssd/pr7409/centos-stream-9-x86_64/07532187-sssd/builder-live.log.gz

Makefile used default runstatedir ($localstatedir/run) but spec file expects _rundir (/run)

@sumit-bose
Copy link
Contributor

Hi,

to make make distcheck pass locally I had to add

diff --git a/src/conf_macros.m4 b/src/conf_macros.m4
index 72c0d77e9..0164e02a1 100644
--- a/src/conf_macros.m4
+++ b/src/conf_macros.m4
@@ -202,7 +202,7 @@ AC_DEFUN([WITH_SYSTEMD_UNIT_DIR],
   if test x"$with_systemdunitdir" != x; then
     systemdunitdir=$with_systemdunitdir
   else
-    systemdunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
+    systemdunitdir=${prefix}$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
     if test x"$systemdunitdir" = x; then
       AC_MSG_ERROR([Could not detect systemd unit directory])
     fi
@@ -222,7 +222,7 @@ AC_DEFUN([WITH_SYSTEMD_CONF_DIR],
   if test x"$with_systemdconfdir" != x; then
     systemdconfdir=$with_systemdconfdir
   else
-    systemdconfdir=$($PKG_CONFIG --variable=systemdsystemconfdir systemd)
+    systemdconfdir=${prefix}$($PKG_CONFIG --variable=systemdsystemconfdir systemd)
     if test x"$systemdconfdir" = x; then
       AC_MSG_ERROR([Could not detect systemd config directory])
     fi

Maybe this is related to --with-initscript=systemd.

bye,
Sumit

make distcheck yields the following error because pidpath is currently hardcoded to
/run/sssd (with the run directory hardcoded) and prefix is not correctly applied.

```
autoreconf -if && ./configure && make distcheck/usr/bin/mkdir: cannot create directory '/run/sssd': Permission denied
make[5]: *** [Makefile:47801: installsssddirs] Error 1
```

```
2024-06-04T16:35:23.1627995Z /usr/bin/mkdir -p \
2024-06-04T16:35:23.1628921Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/include \
2024-06-04T16:35:23.1629987Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/lib \
2024-06-04T16:35:23.1631024Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/bin \
2024-06-04T16:35:23.1632011Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/sbin \
2024-06-04T16:35:23.1632919Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/share/man \
2024-06-04T16:35:23.1633620Z     /run/sssd \
2024-06-04T16:35:23.1634262Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/lib/sssd \
2024-06-04T16:35:23.1635121Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/lib/ldb \
2024-06-04T16:35:23.1635921Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/share/dbus-1/system.d \
2024-06-04T16:35:23.1636710Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/share/dbus-1/system-services \
2024-06-04T16:35:23.1637387Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/lib/sssd \
2024-06-04T16:35:23.1637936Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/lib/sssd \
2024-06-04T16:35:23.1638495Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/share/sssd \
2024-06-04T16:35:23.1639022Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/lib \
2024-06-04T16:35:23.1639592Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/lib/sssd/modules \
2024-06-04T16:35:23.1640407Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/var/lib/sss/pipes/private \
2024-06-04T16:35:23.1641288Z     /__w/sssd/sssd/x86_64/sssd-2.10.0/_inst/share/sssd/krb5-snippets \
```
@alexey-tikhonov
Copy link
Member

@pbrezina , CI is green.
Would you like to add additional patch from @sumit-bose ?

@sumit-bose
Copy link
Contributor

Hi,

I'm sorry, my patch does not work if the systemd path already contains the prefix. Since I'm the only one who have see the issue with those path and make distcheck I'd like to suggest to use the patch as is and I will have a closer look at my patch for one of the next releases.

bye,
Sumit

@pbrezina
Copy link
Member Author

pbrezina commented Jun 6, 2024

Pushed PR: #7409

  • master
    • 5ae0531 - configure: use runstatedir for default pid path

@pbrezina pbrezina added Pushed and removed Accepted Ready to push Ready to push labels Jun 6, 2024
@pbrezina pbrezina closed this Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-backport This should go to target branch only. Pushed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants