Skip to content

Add --disable-syslog configure option#1618

Merged
alejandro-colomar merged 1 commit into
shadow-maint:masterfrom
FreziDok:Add-disable-syslog-option
May 3, 2026
Merged

Add --disable-syslog configure option#1618
alejandro-colomar merged 1 commit into
shadow-maint:masterfrom
FreziDok:Add-disable-syslog-option

Conversation

@FreziDok
Copy link
Copy Markdown
Contributor

Implements --disable-syslog configuration option, as discussed in #1610

Addresses #1610

Comment thread lib/io/syslog.h Outdated
Comment thread configure.ac Outdated
Comment thread configure.ac
@FreziDok FreziDok force-pushed the Add-disable-syslog-option branch from be8177d to 7ce73d8 Compare April 28, 2026 13:14
Comment thread lib/io/syslog.h
@FreziDok FreziDok force-pushed the Add-disable-syslog-option branch from 7ce73d8 to a11d1aa Compare April 28, 2026 13:56
Comment thread configure.ac Outdated
Comment thread configure.ac
Comment thread configure.ac Outdated
@FreziDok FreziDok force-pushed the Add-disable-syslog-option branch from a11d1aa to e17717e Compare April 29, 2026 09:22
Comment thread configure.ac Outdated
    
It allows build systems like Yocto to disable syslog calls during native builds, preventing log spam on the build host.

Closes: <shadow-maint#1610>

Signed-off-by: Dmitry Sakhonchik <frezidok1@gmail.com>
@FreziDok FreziDok force-pushed the Add-disable-syslog-option branch from e17717e to 7da9a45 Compare April 29, 2026 10:15
@hallyn
Copy link
Copy Markdown
Member

hallyn commented May 3, 2026

Thanks. As I don't regularly use autoconf, I tested by creating a minimal configure.ac:

serge@andre:~/autoconf-t2$ cat configure.ac
AC_INIT([test], [1.0])
# Your snippet here:
AC_ARG_ENABLE([syslog],
  [AS_HELP_STRING([--disable-syslog], [disable logging via syslog() calls])],
  [
    AS_CASE([${enableval}],
        [yes|no],[],
        [AC_MSG_ERROR([bad parameter value for --enable-syslog=${enableval}])]
    )
  ],
  [enable_syslog="yes"]
)
AS_VAR_IF([enable_syslog],["yes"],[AC_DEFINE([USE_SYSLOG], [1], [Define to use syslog])])
AC_OUTPUT
AC_MSG_NOTICE([shadow ${PACKAGE_VERSION} has been configured with the following features:
        enable syslog:                  $enable_syslog
])
serge@andre:~/autoconf-t2$ autoconf
serge@andre:~/autoconf-t2$ ./configure
configure: creating ./config.status
configure: shadow 1.0 has been configured with the following features:
        enable syslog:                  yes

serge@andre:~/autoconf-t2$ ./configure --enable-syslog=yes
configure: creating ./config.status
configure: shadow 1.0 has been configured with the following features:
        enable syslog:                  yes

serge@andre:~/autoconf-t2$ ./configure --enable-syslog=no
configure: creating ./config.status
configure: shadow 1.0 has been configured with the following features:
        enable syslog:                  no

serge@andre:~/autoconf-t2$ ./configure --enable-syslog=xxx
configure: error: bad parameter value for --enable-syslog=xxx

Looks good, thanks.

@hallyn
Copy link
Copy Markdown
Member

hallyn commented May 3, 2026

(Please feel free to merge after tests pass. I would enable auto-merge, but that button's not showing up... 🤷)

@alejandro-colomar
Copy link
Copy Markdown
Collaborator

I'll merge, from what you've said. I haven't reviewed myself. I assume everyone's happy with the code. If anyone disagrees, feel free to complain.

@alejandro-colomar alejandro-colomar merged commit 2acdec8 into shadow-maint:master May 3, 2026
16 checks passed
halstead pushed a commit to openembedded/openembedded-core that referenced this pull request May 11, 2026
Upstream has accepted configure option and merged it into their master branch.

shadow-maint/shadow#1618

After they release v4.20 we can remove the patch and rewrite recipe with the configure option.

Fixes [YOCTO #15785]

Signed-off-by: Dmitry Sakhonchik <frezidok1@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kraj pushed a commit to YoeDistro/openembedded-core that referenced this pull request May 12, 2026
Upstream has accepted configure option and merged it into their master branch.

shadow-maint/shadow#1618

After they release v4.20 we can remove the patch and rewrite recipe with the configure option.

Fixes [YOCTO #15785]

Signed-off-by: Dmitry Sakhonchik <frezidok1@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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.

5 participants