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

autoconf: #define the expanded version of localstatedir #12613

Closed
wants to merge 1 commit into from

Conversation

jasonish
Copy link
Member

Previously we defined LOCAL_STATE_DIR on the command line which relied
on shell expansion, now that we define it in autoconf.h we have to
expand it ourselves first. This broke the creation of the default unix
socket directory and file.

Without this commit autoconf.h contains:

#define LOCAL_STATE_DIR "${prefix}/var"

now it will contain:

#define LOCAL_STATE_DIR "/var/run/suricata"

(prefix respecting of course)

Fixes commit b6a610d.

Previously we defined LOCAL_STATE_DIR on the command line which relied
on shell expansion, now that we define it in autoconf.h we have to
expand it ourselves first. This broke the creation of the default unix
socket directory and file.

Without this commit autoconf.h contains:

    #define LOCAL_STATE_DIR "${prefix}/var"

now it will contain:

    #define LOCAL_STATE_DIR "/var/run/suricata"

(prefix respecting of course)

Fixes commit b6a610d.
@jasonish jasonish requested a review from a team as a code owner February 18, 2025 17:54
@@ -2508,7 +2508,7 @@ AC_SUBST(e_logcertsdir)
AC_SUBST(e_sysconfdir)
AC_DEFINE_UNQUOTED([CONFIG_DIR],["$e_sysconfdir"],[Our CONFIG_DIR])
AC_SUBST(e_localstatedir)
AC_DEFINE_UNQUOTED([LOCAL_STATE_DIR],["$localstatedir"],[Our LOCAL_STATE_DIR])
Copy link
Member

Choose a reason for hiding this comment

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

I used localstatedir as it contains "/var", where e_localstatedir will contain "/var/lib/suricata" iirc. See the failing CI checks output.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, yeah. e_localstatedir should actually be e_projectstatedir or something and e_localstatedir should be nothing more than the expansion of localstatedir.

@jasonish
Copy link
Member Author

Replaced by #12619.

@jasonish jasonish closed this Feb 18, 2025
@jasonish jasonish deleted the localstatedir/fixup/v1 branch February 19, 2025 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants