util-linux: add menu items for login utilities
PATCH 1/1 util-linux: add menu items for login utilities
This change extends to the login utilities the current policy of having a selection item in the configuration menu for each utility that has an --enable/--disable knob in the "configure" script:
- add selection items for login, runuser, su and sulogin(*).
- make "login utilities" select last, login, runuser, su and sulogin
- move the "login utilities" selection to the top of the list, right below "basic set"
- add "Utility groups" and "Individual utilities" section titles
(*) there was already an item for "last".
--- package/util-linux/Config.in | 66 +++++++++++++++++++++++++++++++--------- package/util-linux/util-linux.mk | 7 +++-- 2 files changed, 56 insertions(+), 17 deletions(-)
package/util-linux/Config.in +51 -15
@@ -42,6 +42,8 @@ config BR2_PACKAGE_UTIL_LINUX_LIBUUID help Install libuuid. +comment "Utility groups" + config BR2_PACKAGE_UTIL_LINUX_BINARIES bool "basic set" depends on BR2_USE_MMU # fork()
@@ -64,6 +66,26 @@ config BR2_PACKAGE_UTIL_LINUX_BINARIES The setarch utility also installs architecture-specific symlinks like linux32, linux64, uname26, i386 and x86_64. +config BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS + bool "login utilities" + depends on BR2_USE_MMU # fork() (login, runuser, su, sulogin) + depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + select BR2_PACKAGE_UTIL_LINUX_LAST + select BR2_PACKAGE_UTIL_LINUX_LOGIN + select BR2_PACKAGE_UTIL_LINUX_RUNUSER + select BR2_PACKAGE_UTIL_LINUX_SU + select BR2_PACKAGE_UTIL_LINUX_SULOGIN + help + Login utilities (last, login, runuser, su, sulogin) + +comment "Individual utilities" + +comment "login utilities needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ + || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL + config BR2_PACKAGE_UTIL_LINUX_AGETTY bool "agetty" depends on BR2_USE_MMU # fork()
@@ -164,26 +186,20 @@ config BR2_PACKAGE_UTIL_LINUX_LINE help Read one line -config BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS - bool "login utilities" - depends on BR2_USE_MMU # fork() (login, runuser, su, sulogin) - depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam - depends on !BR2_STATIC_LIBS - depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam - depends on BR2_USE_MMU # linux-pam - select BR2_PACKAGE_LINUX_PAM - help - Login utilities (last, login, runuser, su, sulogin) - -comment "login utilities needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library" - depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ - || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL - config BR2_PACKAGE_UTIL_LINUX_LOGGER bool "logger" help Enter messages into the system log +config BR2_PACKAGE_UTIL_LINUX_LOGIN + bool "login" + depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + depends on BR2_USE_MMU # fork(), linux-pam + select BR2_PACKAGE_LINUX_PAM + help + Begin a session on the system + config BR2_PACKAGE_UTIL_LINUX_LOSETUP bool "losetup" depends on BR2_USE_MMU # libsmartcols
@@ -296,6 +312,14 @@ config BR2_PACKAGE_UTIL_LINUX_RESET help Reset the terminal +config BR2_PACKAGE_UTIL_LINUX_RUNUSER + bool "runuser" + depends on BR2_USE_MMU # fork() + help + Run a command with substitute user and group ID (does not need + to ask for a password, because it may be executed by the root + user only) + config BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS bool "scheduling utilities" help
@@ -313,6 +337,18 @@ config BR2_PACKAGE_UTIL_LINUX_SETTERM help Set terminal attributes +config BR2_PACKAGE_UTIL_LINUX_SU + bool "su" + depends on BR2_USE_MMU # fork() + help + Run a command with substitute user and group ID + +config BR2_PACKAGE_UTIL_LINUX_SULOGIN + bool "sulogin" + depends on BR2_USE_MMU # fork() + help + Single-user login + config BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT bool "switch_root" depends on BR2_USE_MMU # fork()
package/util-linux/util-linux.mk +5 -2
@@ -118,7 +118,7 @@ UTIL_LINUX_CONF_OPTS += \ $(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),--enable-libuuid,--disable-libuuid) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LINE),--enable-line,--disable-line) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LOGGER),--enable-logger,--disable-logger) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),--enable-last --enable-login --enable-runuser --enable-su --enable-sulogin,--disable-last --disable-login --disable-runuser --disable-su --disable-sulogin) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN),--enable-login,--disable-login) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LOSETUP),--enable-losetup,--disable-losetup) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LSLOGINS),--enable-lslogins,--disable-lslogins) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LSMEM),--enable-lsmem,--disable-lsmem) \
@@ -136,9 +136,12 @@ UTIL_LINUX_CONF_OPTS += \ $(if $(BR2_PACKAGE_UTIL_LINUX_RAW),--enable-raw,--disable-raw) \ $(if $(BR2_PACKAGE_UTIL_LINUX_RENAME),--enable-rename,--disable-rename) \ $(if $(BR2_PACKAGE_UTIL_LINUX_RESET),--enable-reset,--disable-reset) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_RUNUSER),--enable-runuser,--disable-runuser) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS),--enable-schedutils,--disable-schedutils) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SETPRIV),--enable-setpriv,--disable-setpriv) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SETTERM),--enable-setterm,--disable-setterm) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SU),--enable-su,--disable-su) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SULOGIN),--enable-sulogin,--disable-sulogin) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT),--enable-switch_root,--disable-switch_root) \ $(if $(BR2_PACKAGE_UTIL_LINUX_TUNELP),--enable-tunelp,--disable-tunelp) \ $(if $(BR2_PACKAGE_UTIL_LINUX_UL),--enable-ul,--disable-ul) \
@@ -200,7 +203,7 @@ UTIL_LINUX_CONF_OPTS += --without-audit endif # Install PAM configuration files -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_SU),y) define UTIL_LINUX_INSTALL_PAMFILES $(INSTALL) -m 0644 package/util-linux/su.pam \ $(TARGET_DIR)/etc/pam.d/su
Signature · 1 line
2.13.5
PATCH 1/1 util-linux: add menu items for login utilities
Hello,
package/util-linux/Config.in config BR2_PACKAGE_UTIL_LINUX_BINARIES · line 79
Quoted 11 lines · Carlos Santos
package/util-linux/Config.in +11
-0+config BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS + bool "login utilities" + depends on BR2_USE_MMU # fork() (login, runuser, su, sulogin) + depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + select BR2_PACKAGE_UTIL_LINUX_LAST + select BR2_PACKAGE_UTIL_LINUX_LOGIN + select BR2_PACKAGE_UTIL_LINUX_RUNUSER + select BR2_PACKAGE_UTIL_LINUX_SU + select BR2_PACKAGE_UTIL_LINUX_SULOGIN
I don't really see the need to keep this option. We have BR2_PACKAGE_UTIL_LINUX_BINARIES, because it matches the upstream --enable-all-programs option. But here, BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS doesn't match anything provided by upstream, it's just a random category created by Buildroot.
So let's get rid of this option, with appropriate Config.in.legacy handling selecting all the individual tools, and only have sub-options per tools, matching the --enable-<foo> options provided by util-linux configure script.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 util-linux: add menu items for login utilities
Quoted 28 lines
From: "Thomas Petazzoni" <[email protected]>
To: "Carlos Santos" <[email protected]>
Cc: buildroot at buildroot.org
Sent: Wednesday, August 23, 2017 10:42:52 AM
Subject: Re: [Buildroot] [PATCH] util-linux: add menu items for login utilitiesHello,
package/util-linux/Config.in config BR2_PACKAGE_UTIL_LINUX_BINARIES · line 79
Quoted 11 lines · Carlos Santos
package/util-linux/Config.in +11
-0+config BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS + bool "login utilities" + depends on BR2_USE_MMU # fork() (login, runuser, su, sulogin) + depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + select BR2_PACKAGE_UTIL_LINUX_LAST + select BR2_PACKAGE_UTIL_LINUX_LOGIN + select BR2_PACKAGE_UTIL_LINUX_RUNUSER + select BR2_PACKAGE_UTIL_LINUX_SU + select BR2_PACKAGE_UTIL_LINUX_SULOGINI don't really see the need to keep this option. We have
BR2_PACKAGE_UTIL_LINUX_BINARIES, because it matches the upstream --enable-all-programs option. But here,BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILSdoesn't match anything provided by upstream, it's just a random category created by Buildroot.
Quoted 4 lines
So let's get rid of this option, with appropriate Config.in.legacy handling selecting all the individual tools, and only have sub-options per tools, matching the --enable-<foo> options provided by util-linux configure script.
I'm not particularly fond of this option but maintained it because it is usefull reduce the size of the defconfig files. Anyway, I will send a new patch removing the login utils group.
Signature · 4 lines
Carlos Santos (Casantos) - DATACOM, P&D ?The greatest triumph that modern PR can offer is the transcendent success of having your words and actions judged by your reputation, rather than the other way about.? ? Christopher Hitchens
PATCH 1/2 util-linux: add menu items for login utilities
In reply to Thomas PetazzoniThis change extends to the login utilities the current policy of having a selection item in the configuration menu for each utility that has an --enable/--disable knob in the "configure" script:
- add selection items for login, runuser, su and sulogin (there was already an item for "last")
- move "login utilities" to Config.in.legacy
- make "login utilities" select last, login, runuser, su and sulogin
--- Config.in.legacy | 16 +++++++++++++++ package/util-linux/Config.in | 44 ++++++++++++++++++++++++++-------------- package/util-linux/util-linux.mk | 7 +++++-- 3 files changed, 50 insertions(+), 17 deletions(-)
Config.in.legacy +16 -0
@@ -145,6 +145,22 @@ endif ############################################################################### comment "Legacy options removed in 2017.08" +config BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS + bool "login utilities option removed" + depends on BR2_USE_MMU # fork() (login, runuser, su, sulogin) + depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + select BR2_LEGACY + select BR2_PACKAGE_UTIL_LINUX_LAST + select BR2_PACKAGE_UTIL_LINUX_LOGIN + select BR2_PACKAGE_UTIL_LINUX_RUNUSER + select BR2_PACKAGE_UTIL_LINUX_SU + select BR2_PACKAGE_UTIL_LINUX_SULOGIN + help + Login utilities (last, login, runuser, su, sulogin) now have + their own selecion items in the configuration menu. + config BR2_BINUTILS_VERSION_2_26_X bool "binutils version 2.26 support removed" select BR2_LEGACY
package/util-linux/Config.in +29 -15
67 lines not on this page · raw message
package/util-linux/util-linux.mk +5 -2
@@ -118,7 +118,7 @@ UTIL_LINUX_CONF_OPTS += \ $(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),--enable-libuuid,--disable-libuuid) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LINE),--enable-line,--disable-line) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LOGGER),--enable-logger,--disable-logger) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),--enable-last --enable-login --enable-runuser --enable-su --enable-sulogin,--disable-last --disable-login --disable-runuser --disable-su --disable-sulogin) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN),--enable-login,--disable-login) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LOSETUP),--enable-losetup,--disable-losetup) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LSLOGINS),--enable-lslogins,--disable-lslogins) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LSMEM),--enable-lsmem,--disable-lsmem) \
@@ -136,9 +136,12 @@ UTIL_LINUX_CONF_OPTS += \ $(if $(BR2_PACKAGE_UTIL_LINUX_RAW),--enable-raw,--disable-raw) \ $(if $(BR2_PACKAGE_UTIL_LINUX_RENAME),--enable-rename,--disable-rename) \ $(if $(BR2_PACKAGE_UTIL_LINUX_RESET),--enable-reset,--disable-reset) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_RUNUSER),--enable-runuser,--disable-runuser) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS),--enable-schedutils,--disable-schedutils) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SETPRIV),--enable-setpriv,--disable-setpriv) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SETTERM),--enable-setterm,--disable-setterm) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SU),--enable-su,--disable-su) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SULOGIN),--enable-sulogin,--disable-sulogin) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT),--enable-switch_root,--disable-switch_root) \ $(if $(BR2_PACKAGE_UTIL_LINUX_TUNELP),--enable-tunelp,--disable-tunelp) \ $(if $(BR2_PACKAGE_UTIL_LINUX_UL),--enable-ul,--disable-ul) \
@@ -200,7 +203,7 @@ UTIL_LINUX_CONF_OPTS += --without-audit endif # Install PAM configuration files -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_SU),y) define UTIL_LINUX_INSTALL_PAMFILES $(INSTALL) -m 0644 package/util-linux/su.pam \ $(TARGET_DIR)/etc/pam.d/su
Signature · 1 line
2.13.5
PATCH 2/2 util-linux: use a patch from upstream to fix ncursesw support
This patch is much smaller the the previous one and will unlikely cause a conflict with some forthcoming 2.30.x release.
--- ...-Revert-build-sys-ncurses-headers-cleanup.patch | 191 --------------------- ...upport-ncursesw-without-headers-in-ncurse.patch | 58 +++++++ 2 files changed, 58 insertions(+), 191 deletions(-) delete mode 100644 package/util-linux/0001-Revert-build-sys-ncurses-headers-cleanup.patch create mode 100644 package/util-linux/0001-build-sys-support-ncursesw-without-headers-in-ncurse.patch
package/util-linux/0001-Revert-build-sys-ncurses-headers-cleanup.patch deleted +0 -191
@@ -1,191 +0,0 @@ -From 51157b7416cd9d09cb21ee8cebf5750b48f44201 Mon Sep 17 00:00:00 2001 -From: Carlos Santos <[email protected]> -Date: Thu, 22 Jun 2017 20:53:55 -0300 -Subject: [PATCH] Revert "build-sys: ncurses headers cleanup" - -This reverts commit 3947ca4ca9737d830f54658ef353f5626c0d0282. ---- - configure.ac | 8 +++++--- - lib/colors.c | 15 ++++----------- - misc-utils/cal.c | 8 ++++---- - term-utils/setterm.c | 8 ++++---- - text-utils/more.c | 8 ++++---- - text-utils/pg.c | 16 +++++++++------- - text-utils/ul.c | 8 ++++---- - 7 files changed, 34 insertions(+), 37 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 53d25b8ab..3512162df 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -803,8 +803,9 @@ have_ncursesw_header=no - AS_IF([test "x$with_ncursesw" != xno], [ - UL_NCURSES_CHECK([ncursesw]) - AS_IF([test "x$have_ncursesw" = xyes], [ -- AC_CHECK_HEADERS([ncursesw/ncurses.h], [have_ncursesw_header=yes]) -- AC_CHECK_HEADERS([ncursesw/term.h]) -+ AC_CHECK_HEADERS([ncursesw/ncurses.h ncurses.h], -+ [have_ncursesw_header=yes]) -+ AC_CHECK_HEADERS([ncursesw/term.h term.h]) - AS_IF([test "x$have_ncursesw_header" = xno], [have_ncursesw=no]) - ]) - AS_IF([test "x$have_ncursesw" = xyes], [ -@@ -829,7 +830,8 @@ AS_CASE([$with_ncurses:$build_widechar], - AS_IF([test "x$have_ncursesw" = xno -a "x$with_ncurses" != xno ], [ - UL_NCURSES_CHECK([ncurses]) - AS_IF([test "x$have_ncurses" = xyes], [ -- AC_CHECK_HEADERS([ncurses/ncurses.h ncurses.h], [have_ncurses_header=yes]) -+ AC_CHECK_HEADERS([ncurses/ncurses.h ncurses.h], -+ [have_ncurses_header=yes]) - AC_CHECK_HEADERS([ncurses/term.h term.h]) - AS_IF([test "x$have_ncurses_header" = xno], [have_ncurses=no]) - ]) -diff --git a/lib/colors.c b/lib/colors.c -index f82496d7a..72c5158cb 100644 ---- a/lib/colors.c -+++ b/lib/colors.c -@@ -12,19 +12,12 @@ - #include <ctype.h> - - #if defined(HAVE_LIBNCURSES) || defined(HAVE_LIBNCURSESW) --# if defined(HAVE_NCURSESW_NCURSES_H) --# include <ncursesw/ncurses.h> --# elif defined(HAVE_NCURSES_NCURSES_H) --# include <ncurses/ncurses.h> --# elif defined(HAVE_NCURSES_H) --# include <ncurses.h> --# endif --# if defined(HAVE_NCURSESW_TERM_H) --# include <ncursesw/term.h> -+# ifdef HAVE_TERM_H -+# include <term.h> - # elif defined(HAVE_NCURSES_TERM_H) - # include <ncurses/term.h> --# elif defined(HAVE_TERM_H) --# include <term.h> -+# elif defined(HAVE_NCURSESW_TERM_H) -+# include <ncursesw/term.h> - # endif - #endif - -diff --git a/misc-utils/cal.c b/misc-utils/cal.c -index 604eb26a7..2b16979db 100644 ---- a/misc-utils/cal.c -+++ b/misc-utils/cal.c -@@ -80,12 +80,12 @@ static int has_term = 0; - static const char *Senter = "", *Sexit = ""; /* enter and exit standout mode */ - - #if defined(HAVE_LIBNCURSES) || defined(HAVE_LIBNCURSESW) --# if defined(HAVE_NCURSESW_TERM_H) --# include <ncursesw/term.h> -+# ifdef HAVE_TERM_H -+# include <term.h> - # elif defined(HAVE_NCURSES_TERM_H) - # include <ncurses/term.h> --# elif defined(HAVE_TERM_H) --# include <term.h> -+# elif defined(HAVE_NCURSESW_TERM_H) -+# include <ncursesw/term.h> - # endif - #endif - -diff --git a/term-utils/setterm.c b/term-utils/setterm.c -index 9f60e5693..53826f954 100644 ---- a/term-utils/setterm.c -+++ b/term-utils/setterm.c -@@ -60,12 +60,12 @@ - #include <termios.h> - #include <unistd.h> - --#if defined(HAVE_NCURSESW_TERM_H) --# include <ncursesw/term.h> -+#ifdef HAVE_TERM_H -+# include <term.h> - #elif defined(HAVE_NCURSES_TERM_H) - # include <ncurses/term.h> --#elif defined(HAVE_TERM_H) --# include <term.h> -+#elif defined(HAVE_NCURSESW_TERM_H) -+# include <ncursesw/term.h> - #endif - - #ifdef HAVE_LINUX_TIOCL_H -diff --git a/text-utils/more.c b/text-utils/more.c -index 72dd96bf4..cc53075f6 100644 ---- a/text-utils/more.c -+++ b/text-utils/more.c -@@ -190,12 +190,12 @@ static struct { - } context, screen_start; - extern char PC; /* pad character */ - --#if defined(HAVE_NCURSESW_TERM_H) --# include <ncursesw/term.h> -+#ifdef HAVE_TERM_H -+# include <term.h> - #elif defined(HAVE_NCURSES_TERM_H) - # include <ncurses/term.h> --#elif defined(HAVE_TERM_H) --# include <term.h> -+#elif defined(HAVE_NCURSESW_TERM_H) -+# include <ncursesw/term.h> - #endif - - #define TERM_AUTO_RIGHT_MARGIN "am" -diff --git a/text-utils/pg.c b/text-utils/pg.c -index 1b9b8d7dd..bc485e2fe 100644 ---- a/text-utils/pg.c -+++ b/text-utils/pg.c -@@ -59,20 +59,22 @@ - #include <signal.h> - #include <setjmp.h> - --#if defined(HAVE_NCURSESW_NCURSES_H) -+#ifdef HAVE_NCURSESW_H -+# include <ncursesw.h> -+#elif defined(HAVE_NCURSES_H) -+# include <ncurses.h> -+#elif defined(HAVE_NCURSESW_NCURSES_H) - # include <ncursesw/ncurses.h> - #elif defined(HAVE_NCURSES_NCURSES_H) - # include <ncurses/ncurses.h> --#elif defined(HAVE_NCURSES_H) --# include <ncurses.h> - #endif - --#if defined(HAVE_NCURSESW_TERM_H) --# include <ncursesw/term.h> -+#ifdef HAVE_TERM_H -+# include <term.h> - #elif defined(HAVE_NCURSES_TERM_H) - # include <ncurses/term.h> --#elif defined(HAVE_TERM_H) --# include <term.h> -+#elif defined(HAVE_NCURSESW_TERM_H) -+# include <ncursesw/term.h> - #endif - - #include "nls.h" -diff --git a/text-utils/ul.c b/text-utils/ul.c -index 3986b4206..3d1518cea 100644 ---- a/text-utils/ul.c -+++ b/text-utils/ul.c -@@ -49,12 +49,12 @@ - #include <errno.h> - #include <getopt.h> - --#if defined(HAVE_NCURSESW_TERM_H) --# include <ncursesw/term.h> -+#ifdef HAVE_TERM_H -+# include <term.h> - #elif defined(HAVE_NCURSES_TERM_H) - # include <ncurses/term.h> --#elif defined(HAVE_TERM_H) --# include <term.h> -+#elif defined(HAVE_NCURSESW_TERM_H) -+# include <ncursesw/term.h> - #endif - - #include "nls.h" --- -2.11.0 -
package/util-linux/0001-build-sys-support-ncursesw-without-headers-in-ncurse.patch new file +58 -0
58 lines not on this page · raw message
Signature · 1 line
2.13.5
Thomas Petazzoni
AppliedPATCH 2/2 util-linux: use a patch from upstream to fix ncursesw support
Hello,
Quoted 10 lines · Carlos Santos
This patch is much smaller the the previous one and will unlikely cause a conflict with some forthcoming 2.30.x release.
Signed-off-by Carlos Santos <[email protected]>--- ...-Revert-build-sys-ncurses-headers-cleanup.patch | 191 --------------------- ...upport-ncursesw-without-headers-in-ncurse.patch | 58 +++++++ 2 files changed, 58 insertions(+), 191 deletions(-) delete mode 100644 package/util-linux/0001-Revert-build-sys-ncurses-headers-cleanup.patch create mode 100644 package/util-linux/0001-build-sys-support-ncursesw-without-headers-in-ncurse.patch
Applied to next, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/2 util-linux: add menu items for login utilities
In reply to Carlos SantosHello,
Config.in.legacy endif · line 149
Quoted 2 lines · Carlos Santos
Config.in.legacy +2
-0+config BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS + bool "login utilities option removed"
bool "util-linux login utilities option removed"
Config.in.legacy endif · line 153
Quoted 4 lines
Config.in.legacy +4
-0+ depends on BR2_USE_MMU # fork() (login, runuser, su, sulogin) + depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam
All those "depends on" can be dropped.
Config.in.legacy endif · line 162
Quoted 9 lines
Config.in.legacy +9
-0+ select BR2_LEGACY + select BR2_PACKAGE_UTIL_LINUX_LAST + select BR2_PACKAGE_UTIL_LINUX_LOGIN + select BR2_PACKAGE_UTIL_LINUX_RUNUSER + select BR2_PACKAGE_UTIL_LINUX_SU + select BR2_PACKAGE_UTIL_LINUX_SULOGIN + help + Login utilities (last, login, runuser, su, sulogin) now have + their own selecion items in the configuration menu.
selecion -> selection
Perhaps you can say "in the util-linux package configuration options" or something like this.
package/util-linux/Config.in config BR2_PACKAGE_UTIL_LINUX_LINE · line 174
Quoted 12 lines
package/util-linux/Config.in +3
-4-comment "login utilities needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library" - depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ - || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL - config BR2_PACKAGE_UTIL_LINUX_LOGGER bool "logger" help Enter messages into the system log +config BR2_PACKAGE_UTIL_LINUX_LOGIN + bool "login" + depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam
Should be split on two lines, one per depends on. I know it wasn't like that before, but let's take this opportunity to fix it.
package/util-linux/Config.in config BR2_PACKAGE_UTIL_LINUX_LINE · line 179
Quoted 5 lines
package/util-linux/Config.in +5
-0+ depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + depends on BR2_USE_MMU # fork(), linux-pam + select BR2_PACKAGE_LINUX_PAM + help + Begin a session on the system
Missing Config.in comment.
Otherwise, looks OK to me. So, by the time you send the next iteration, if nobody else complains, I'll apply.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v3 1/1 util-linux: add menu items for login utilities
This change extends to the login utilities the current policy of having a selection item in the configuration menu for each utility that has an --enable/--disable knob in the "configure" script:
- add selection items for login, runuser, su and sulogin (there was already an item for "last")
- move "login utilities" to Config.in.legacy
- make "login utilities" select last, login, runuser, su and sulogin
---
Changes v1->v2
- do not add section titles
- deprecate the "login utilities" group
Changes v2->v3
- improve comments
- fix spelling errors
- add comment to show when "login" is unavailable
--- Config.in.legacy | 12 +++++++++++ package/util-linux/Config.in | 45 ++++++++++++++++++++++++++++------------ package/util-linux/util-linux.mk | 7 +++++-- 3 files changed, 49 insertions(+), 15 deletions(-)
Config.in.legacy +12 -0
@@ -145,6 +145,18 @@ endif ############################################################################### comment "Legacy options removed in 2017.08" +config BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS + bool "util-linux login utilities option removed" + select BR2_LEGACY + select BR2_PACKAGE_UTIL_LINUX_LAST + select BR2_PACKAGE_UTIL_LINUX_LOGIN + select BR2_PACKAGE_UTIL_LINUX_RUNUSER + select BR2_PACKAGE_UTIL_LINUX_SU + select BR2_PACKAGE_UTIL_LINUX_SULOGIN + help + Login utilities (last, login, runuser, su, sulogin) now have + their own configuration options in the util-linux menu. + config BR2_BINUTILS_VERSION_2_26_X bool "binutils version 2.26 support removed" select BR2_LEGACY
package/util-linux/Config.in +32 -13
70 lines not on this page · raw message
package/util-linux/util-linux.mk +5 -2
@@ -118,7 +118,7 @@ UTIL_LINUX_CONF_OPTS += \ $(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),--enable-libuuid,--disable-libuuid) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LINE),--enable-line,--disable-line) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LOGGER),--enable-logger,--disable-logger) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),--enable-last --enable-login --enable-runuser --enable-su --enable-sulogin,--disable-last --disable-login --disable-runuser --disable-su --disable-sulogin) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN),--enable-login,--disable-login) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LOSETUP),--enable-losetup,--disable-losetup) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LSLOGINS),--enable-lslogins,--disable-lslogins) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LSMEM),--enable-lsmem,--disable-lsmem) \
@@ -136,9 +136,12 @@ UTIL_LINUX_CONF_OPTS += \ $(if $(BR2_PACKAGE_UTIL_LINUX_RAW),--enable-raw,--disable-raw) \ $(if $(BR2_PACKAGE_UTIL_LINUX_RENAME),--enable-rename,--disable-rename) \ $(if $(BR2_PACKAGE_UTIL_LINUX_RESET),--enable-reset,--disable-reset) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_RUNUSER),--enable-runuser,--disable-runuser) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS),--enable-schedutils,--disable-schedutils) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SETPRIV),--enable-setpriv,--disable-setpriv) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SETTERM),--enable-setterm,--disable-setterm) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SU),--enable-su,--disable-su) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SULOGIN),--enable-sulogin,--disable-sulogin) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT),--enable-switch_root,--disable-switch_root) \ $(if $(BR2_PACKAGE_UTIL_LINUX_TUNELP),--enable-tunelp,--disable-tunelp) \ $(if $(BR2_PACKAGE_UTIL_LINUX_UL),--enable-ul,--disable-ul) \
@@ -200,7 +203,7 @@ UTIL_LINUX_CONF_OPTS += --without-audit endif # Install PAM configuration files -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_SU),y) define UTIL_LINUX_INSTALL_PAMFILES $(INSTALL) -m 0644 package/util-linux/su.pam \ $(TARGET_DIR)/etc/pam.d/su
Signature · 1 line
2.13.5
PATCH v3 1/1 util-linux: add menu items for login utilities
Hi Carlos,
Quoted 8 lines · Carlos Santos
This change extends to the login utilities the current policy of having a selection item in the configuration menu for each utility that has an --enable/--disable knob in the "configure" script:
- add selection items for login, runuser, su and sulogin (there was already an item for "last")
- move "login utilities" to Config.in.legacy
- make "login utilities" select last, login, runuser, su and sulogin
The problem with these changes is combinatorial explosion, leading to...
[snip]
Quoted 5 lines
package/util-linux/Config.in +5
-0+config BR2_PACKAGE_UTIL_LINUX_SU + bool "su" + depends on BR2_USE_MMU # fork() + help + Run a command with substitute user and group ID
[snip]
package/util-linux/util-linux.mk UTIL_LINUX_CONF_OPTS += --without-audit · line 209
Quoted 6 lines
# Install PAM configuration files
package/util-linux/util-linux.mk +1
-1-ifeq ($(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_SU),y) define UTIL_LINUX_INSTALL_PAMFILES $(INSTALL) -m 0644 package/util-linux/su.pam \ $(TARGET_DIR)/etc/pam.d/su
So su does not select PAM, but it does select a PAM file?
Well, I guess it indeed doesn't strictly require PAM, but we should probably
only intall the PAM file if LINUX_PAM is selected as well, no?
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
PATCH v4 1/1 util-linux: add menu items for login utilities
This change extends to the login utilities the current policy of having a selection item in the configuration menu for each utility that has an --enable/--disable knob in the "configure" script:
- add selection items for login, runuser, su and sulogin (there was already an item for "last")
- move "login utilities" to Config.in.legacy
- make "login utilities" select last, login, runuser, su and sulogin
---
Changes v1->v2
- do not add section titles
- deprecate the "login utilities" group
Changes v2->v3
- improve comments
- fix spelling errors
- add comment to show when "login" is unavailable
Changes v3->v4
- install PAM files only if linux-pam is selected
--- Config.in.legacy | 12 +++++++++++ package/util-linux/Config.in | 45 ++++++++++++++++++++++++++++------------ package/util-linux/util-linux.mk | 10 +++++---- 3 files changed, 50 insertions(+), 17 deletions(-)
Config.in.legacy +12 -0
@@ -145,6 +145,18 @@ endif ############################################################################### comment "Legacy options removed in 2017.08" +config BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS + bool "util-linux login utilities option removed" + select BR2_LEGACY + select BR2_PACKAGE_UTIL_LINUX_LAST + select BR2_PACKAGE_UTIL_LINUX_LOGIN + select BR2_PACKAGE_UTIL_LINUX_RUNUSER + select BR2_PACKAGE_UTIL_LINUX_SU + select BR2_PACKAGE_UTIL_LINUX_SULOGIN + help + Login utilities (last, login, runuser, su, sulogin) now have + their own configuration options in the util-linux menu. + config BR2_BINUTILS_VERSION_2_26_X bool "binutils version 2.26 support removed" select BR2_LEGACY
package/util-linux/Config.in +32 -13
70 lines not on this page · raw message
package/util-linux/util-linux.mk +6 -4
@@ -118,7 +118,7 @@ UTIL_LINUX_CONF_OPTS += \ $(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),--enable-libuuid,--disable-libuuid) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LINE),--enable-line,--disable-line) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LOGGER),--enable-logger,--disable-logger) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),--enable-last --enable-login --enable-runuser --enable-su --enable-sulogin,--disable-last --disable-login --disable-runuser --disable-su --disable-sulogin) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN),--enable-login,--disable-login) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LOSETUP),--enable-losetup,--disable-losetup) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LSLOGINS),--enable-lslogins,--disable-lslogins) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LSMEM),--enable-lsmem,--disable-lsmem) \
@@ -136,9 +136,12 @@ UTIL_LINUX_CONF_OPTS += \ $(if $(BR2_PACKAGE_UTIL_LINUX_RAW),--enable-raw,--disable-raw) \ $(if $(BR2_PACKAGE_UTIL_LINUX_RENAME),--enable-rename,--disable-rename) \ $(if $(BR2_PACKAGE_UTIL_LINUX_RESET),--enable-reset,--disable-reset) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_RUNUSER),--enable-runuser,--disable-runuser) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS),--enable-schedutils,--disable-schedutils) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SETPRIV),--enable-setpriv,--disable-setpriv) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SETTERM),--enable-setterm,--disable-setterm) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SU),--enable-su,--disable-su) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SULOGIN),--enable-sulogin,--disable-sulogin) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT),--enable-switch_root,--disable-switch_root) \ $(if $(BR2_PACKAGE_UTIL_LINUX_TUNELP),--enable-tunelp,--disable-tunelp) \ $(if $(BR2_PACKAGE_UTIL_LINUX_UL),--enable-ul,--disable-ul) \
@@ -200,7 +203,7 @@ UTIL_LINUX_CONF_OPTS += --without-audit endif # Install PAM configuration files -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_SU)$(BR2_PACKAGE_LINUX_PAM),yy) define UTIL_LINUX_INSTALL_PAMFILES $(INSTALL) -m 0644 package/util-linux/su.pam \ $(TARGET_DIR)/etc/pam.d/su
@@ -208,9 +211,8 @@ define UTIL_LINUX_INSTALL_PAMFILES $(TARGET_DIR)/etc/pam.d/su-l $(UTIL_LINUX_SELINUX_PAMFILES_TWEAK) endef -endif - UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_INSTALL_PAMFILES +endif # Install agetty->getty symlink to avoid breakage when there's no busybox ifeq ($(BR2_PACKAGE_UTIL_LINUX_AGETTY),y)
Signature · 1 line
2.13.5
PATCH v5 1/1 util-linux: add menu items for login utilities
This change extends to the login utilities the current policy of having a selection item in the configuration menu for each utility that has an --enable/--disable knob in the "configure" script:
- add selection items for login, runuser, su and sulogin (there was already an item for "last")
- move "login utilities" to Config.in.legacy
- make "login utilities" select last, login, runuser, su and sulogin
---
Changes v1->v2
- do not add section titles
- deprecate the "login utilities" group
Changes v2->v3
- improve comments
- fix spelling errors
- add comment to show when "login" is unavailable
Changes v3->v4
- install PAM files only if linux-pam is selected
Changes v4->v5
- Fix merge conflict in Config.in.legacy
--- Config.in.legacy | 15 ++++++++++++++ package/util-linux/Config.in | 45 ++++++++++++++++++++++++++++------------ package/util-linux/util-linux.mk | 10 +++++---- 3 files changed, 53 insertions(+), 17 deletions(-)
Config.in.legacy +15 -0
@@ -143,6 +143,21 @@ comment "----------------------------------------------------" endif ############################################################################### +comment "Legacy options removed in 2017.11" + +config BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS + bool "util-linux login utilities option removed" + select BR2_LEGACY + select BR2_PACKAGE_UTIL_LINUX_LAST + select BR2_PACKAGE_UTIL_LINUX_LOGIN + select BR2_PACKAGE_UTIL_LINUX_RUNUSER + select BR2_PACKAGE_UTIL_LINUX_SU + select BR2_PACKAGE_UTIL_LINUX_SULOGIN + help + Login utilities (last, login, runuser, su, sulogin) now have + their own configuration options in the util-linux menu. + +############################################################################### comment "Legacy options removed in 2017.08" config BR2_PACKAGE_SIMICSFS
package/util-linux/Config.in +32 -13
70 lines not on this page · raw message
package/util-linux/util-linux.mk +6 -4
@@ -118,7 +118,7 @@ UTIL_LINUX_CONF_OPTS += \ $(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),--enable-libuuid,--disable-libuuid) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LINE),--enable-line,--disable-line) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LOGGER),--enable-logger,--disable-logger) \ - $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),--enable-last --enable-login --enable-runuser --enable-su --enable-sulogin,--disable-last --disable-login --disable-runuser --disable-su --disable-sulogin) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN),--enable-login,--disable-login) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LOSETUP),--enable-losetup,--disable-losetup) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LSLOGINS),--enable-lslogins,--disable-lslogins) \ $(if $(BR2_PACKAGE_UTIL_LINUX_LSMEM),--enable-lsmem,--disable-lsmem) \
@@ -136,9 +136,12 @@ UTIL_LINUX_CONF_OPTS += \ $(if $(BR2_PACKAGE_UTIL_LINUX_RAW),--enable-raw,--disable-raw) \ $(if $(BR2_PACKAGE_UTIL_LINUX_RENAME),--enable-rename,--disable-rename) \ $(if $(BR2_PACKAGE_UTIL_LINUX_RESET),--enable-reset,--disable-reset) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_RUNUSER),--enable-runuser,--disable-runuser) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS),--enable-schedutils,--disable-schedutils) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SETPRIV),--enable-setpriv,--disable-setpriv) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SETTERM),--enable-setterm,--disable-setterm) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SU),--enable-su,--disable-su) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SULOGIN),--enable-sulogin,--disable-sulogin) \ $(if $(BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT),--enable-switch_root,--disable-switch_root) \ $(if $(BR2_PACKAGE_UTIL_LINUX_TUNELP),--enable-tunelp,--disable-tunelp) \ $(if $(BR2_PACKAGE_UTIL_LINUX_UL),--enable-ul,--disable-ul) \
@@ -200,7 +203,7 @@ UTIL_LINUX_CONF_OPTS += --without-audit endif # Install PAM configuration files -ifeq ($(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),y) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_SU)$(BR2_PACKAGE_LINUX_PAM),yy) define UTIL_LINUX_INSTALL_PAMFILES $(INSTALL) -m 0644 package/util-linux/su.pam \ $(TARGET_DIR)/etc/pam.d/su
@@ -208,9 +211,8 @@ define UTIL_LINUX_INSTALL_PAMFILES $(TARGET_DIR)/etc/pam.d/su-l $(UTIL_LINUX_SELINUX_PAMFILES_TWEAK) endef -endif - UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_INSTALL_PAMFILES +endif # Install agetty->getty symlink to avoid breakage when there's no busybox ifeq ($(BR2_PACKAGE_UTIL_LINUX_AGETTY),y)
Signature · 1 line
2.13.5
Thomas Petazzoni
AppliedPATCH v5 1/1 util-linux: add menu items for login utilities
Hello,
Quoted 23 lines · Carlos Santos
This change extends to the login utilities the current policy of having a selection item in the configuration menu for each utility that has an --enable/--disable knob in the "configure" script:
- add selection items for login, runuser, su and sulogin (there was already an item for "last")
- move "login utilities" to Config.in.legacy
- make "login utilities" select last, login, runuser, su and suloginSigned-off-by Carlos Santos <[email protected]>---
Changesv1->v2
- do not add section titles
- deprecate the "login utilities" group
Changesv2->v3
- improve comments
- fix spelling errors
- add comment to show when "login" is unavailable
Changesv3->v4
- install PAM files only if linux-pam is selected
Changesv4->v5
- Fix merge conflict in Config.in.legacy
Quoted 5 lines
--- Config.in.legacy | 15 ++++++++++++++ package/util-linux/Config.in | 45 ++++++++++++++++++++++++++++------------ package/util-linux/util-linux.mk | 10 +++++---- 3 files changed, 53 insertions(+), 17 deletions(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com