Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/sudo: drop legacy, useless, and broken post-configure hook
@ 2024-02-21 20:08 Yann E. MORIN
  2024-03-16 22:33 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Yann E. MORIN @ 2024-02-21 20:08 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=5aade5ced5edc40a4ad848cd276813d273d2d04e
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Commit b9e89b340e27 (sudo: bump version) introduced the explicit build
of mksigname and mksiglist as host tools, as they were required to run
on the build machine, to generate C code then used to build the target
program.

This is now failing to build since the bump to sudo 1.9.15p5 in commit
c87746afefe7 (package/sudo: security bump to version 1.9.15p5)
(lines manually wrapped and slightly elided for ease of reviewing):

    /usr/bin/cpp \
        -I/home/ymorin/dev/buildroot/O/master/per-package/sudo/host/include \
        -I../../include \
        -I../.. \
        ./sys_signame.h \
    | /usr/bin/sed -e '1,/^int sudo_end_of_headers;/d' -e '/^#/d' > mksigname.h
    In file included from /usr/include/features.h:394,
                     from /usr/include/sys/types.h:25,
                     from ./sys_signame.h:4:
    /usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
       26 | #   error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
          |     ^~~~~
    /usr/bin/gcc -I../../include -I../.. -I. -I. \
        -D_PATH_SUDO_CONF=\"/etc/sudo.conf\"
        -I/home/ymorin/dev/buildroot/O/master/per-package/sudo/host/include \
        -DDEFAULT_TEXT_DOMAIN=\"sudo\" \
        -O2 \
        -I/home/ymorin/dev/buildroot/O/master/per-package/sudo/host/include \
        ./mksigname.c -o mksigname
    In file included from /usr/include/features.h:394,
                     from /usr/include/bits/libc-header-start.h:33,
                     from /usr/include/stdlib.h:26,
                     from ./mksigname.c:27:
    /usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
       26 | #   error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
          |     ^~~~~
    make[2]: *** [Makefile:263: mksigname] Error 1

The core of the issue has not been really identified, but it turns out
that neither mksiglist nor mksignames is used during the build. This has
been tested with a minimal sudo with no option, and with a sudo with all
options enabled (linux-pam, zlib, opensldap, and openssl), with the
three types of C libraries (glibc, musl, and uClibc-ng).

Digging in the sudo buildsystem did not reveal an obvious reason when
those would be needed either.

Drop the hook now it seems it is no longer used and is atually breaking
the build.

Fixes: http://autobuild.buildroot.org/results/72f/72ff18fb9b41394a29006f881ee1fbea67a66a09/

Note that there is a second issue in there: the call to the host cpp
fails, but since it is on the LHS of a pipe, the error is lost, as the
RHS of the pipe (the sed call) succeeds; a fix for that will be sent
in a separate patch.

Reported-by: Christian Stewart <christian@aperture.us>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Christian Stewart <christian@aperture.us>
---
 package/sudo/sudo.mk | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/package/sudo/sudo.mk b/package/sudo/sudo.mk
index a4e838dd94..7961a99002 100644
--- a/package/sudo/sudo.mk
+++ b/package/sudo/sudo.mk
@@ -58,15 +58,6 @@ else
 SUDO_CONF_OPTS += --disable-openssl
 endif
 
-# mksigname/mksiglist needs to run on build host to generate source files
-define SUDO_BUILD_MKSIGNAME_MKSIGLIST_HOST
-	$(MAKE) $(HOST_CONFIGURE_OPTS) \
-		CPPFLAGS="$(HOST_CPPFLAGS) -I../../include -I../.." \
-		-C $(@D)/lib/util mksigname mksiglist
-endef
-
-SUDO_POST_CONFIGURE_HOOKS += SUDO_BUILD_MKSIGNAME_MKSIGLIST_HOST
-
 define SUDO_PERMISSIONS
 	/usr/bin/sudo f 4755 0 0 - - - - -
 endef
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [git commit] package/sudo: drop legacy, useless, and broken post-configure hook
  2024-02-21 20:08 [Buildroot] [git commit] package/sudo: drop legacy, useless, and broken post-configure hook Yann E. MORIN
@ 2024-03-16 22:33 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2024-03-16 22:33 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > commit: https://git.buildroot.net/buildroot/commit/?id=5aade5ced5edc40a4ad848cd276813d273d2d04e
 > branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

 > Commit b9e89b340e27 (sudo: bump version) introduced the explicit build
 > of mksigname and mksiglist as host tools, as they were required to run
 > on the build machine, to generate C code then used to build the target
 > program.

 > This is now failing to build since the bump to sudo 1.9.15p5 in commit
 > c87746afefe7 (package/sudo: security bump to version 1.9.15p5)
 > (lines manually wrapped and slightly elided for ease of reviewing):

 >     /usr/bin/cpp \
 >         -I/home/ymorin/dev/buildroot/O/master/per-package/sudo/host/include \
 >         -I../../include \
 >         -I../.. \
 >         ./sys_signame.h \
 >     | /usr/bin/sed -e '1,/^int sudo_end_of_headers;/d' -e '/^#/d' > mksigname.h
 >     In file included from /usr/include/features.h:394,
 >                      from /usr/include/sys/types.h:25,
 >                      from ./sys_signame.h:4:
 >     /usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
 >        26 | #   error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
 >           |     ^~~~~
 >     /usr/bin/gcc -I../../include -I../.. -I. -I. \
 >         -D_PATH_SUDO_CONF=\"/etc/sudo.conf\"
 >         -I/home/ymorin/dev/buildroot/O/master/per-package/sudo/host/include \
 >         -DDEFAULT_TEXT_DOMAIN=\"sudo\" \
 >         -O2 \
 >         -I/home/ymorin/dev/buildroot/O/master/per-package/sudo/host/include \
 >         ./mksigname.c -o mksigname
 >     In file included from /usr/include/features.h:394,
 >                      from /usr/include/bits/libc-header-start.h:33,
 >                      from /usr/include/stdlib.h:26,
 >                      from ./mksigname.c:27:
 >     /usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
 >        26 | #   error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
 >           |     ^~~~~
 >     make[2]: *** [Makefile:263: mksigname] Error 1

 > The core of the issue has not been really identified, but it turns out
 > that neither mksiglist nor mksignames is used during the build. This has
 > been tested with a minimal sudo with no option, and with a sudo with all
 > options enabled (linux-pam, zlib, opensldap, and openssl), with the
 > three types of C libraries (glibc, musl, and uClibc-ng).

 > Digging in the sudo buildsystem did not reveal an obvious reason when
 > those would be needed either.

 > Drop the hook now it seems it is no longer used and is atually breaking
 > the build.

 > Fixes: http://autobuild.buildroot.org/results/72f/72ff18fb9b41394a29006f881ee1fbea67a66a09/

 > Note that there is a second issue in there: the call to the host cpp
 > fails, but since it is on the LHS of a pipe, the error is lost, as the
 > RHS of the pipe (the sed call) succeeds; a fix for that will be sent
 > in a separate patch.

 > Reported-by: Christian Stewart <christian@aperture.us>
 > Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
 > Cc: Peter Korsgaard <peter@korsgaard.com>
 > Reviewed-by: Christian Stewart <christian@aperture.us>

Committed to 2023.02.x and 2023.11.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-16 22:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-21 20:08 [Buildroot] [git commit] package/sudo: drop legacy, useless, and broken post-configure hook Yann E. MORIN
2024-03-16 22:33 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox