tweaks to build system, mainly making menuconfig text and order clearer
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 12 Oct 2010 02:18:05 +0000 (04:18 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 12 Oct 2010 02:18:05 +0000 (04:18 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Config.in
include/applets.src.h
include/busybox.h
libbb/appletlib.c
miscutils/Config.src
networking/Config.src

index 828b30471acd5ce8d13420074e5d54d03be0e574..d9c823199df6706016f70685eda2b500df30876e 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -123,6 +123,14 @@ config FEATURE_INSTALLER
          busybox at runtime to create hard links or symlinks for all the
          applets that are compiled into busybox.
 
+config INSTALL_NO_USR
+       bool "Don't use /usr"
+       default n
+       depends on FEATURE_INSTALLER
+       help
+         Disable use of /usr. busybox --install will install applets
+         only to /bin and /sbin, never to /usr/bin or /usr/sbin.
+
 config LOCALE_SUPPORT
        bool "Enable locale support (system needs locale for this to work)"
        default n
@@ -275,15 +283,6 @@ config FEATURE_CLEAN_UP
          Don't enable this unless you have a really good reason to clean
          things up manually.
 
-config FEATURE_UTMP
-       bool "Support utmp file"
-       default y
-       help
-         The file /var/run/utmp is used to track who is currently logged in.
-         With this option on, certain applets (getty, login, telnetd etc)
-         will create and delete entries there.
-         "who" applet requires this option.
-
 config FEATURE_WTMP
        bool "Support wtmp file"
        default y
@@ -295,6 +294,15 @@ config FEATURE_WTMP
          will append new entries there.
          "last" applet requires this option.
 
+config FEATURE_UTMP
+       bool "Support utmp file"
+       default y
+       help
+         The file /var/run/utmp is used to track who is currently logged in.
+         With this option on, certain applets (getty, login, telnetd etc)
+         will create and delete entries there.
+         "who" applet requires this option.
+
 config FEATURE_PIDFILE
        bool "Support writing pidfiles"
        default y
@@ -307,14 +315,19 @@ config FEATURE_SUID
        default y
        help
          With this option you can install the busybox binary belonging
-         to root with the suid bit set, and it will automatically drop
-         priviledges for applets that don't need root access.
+         to root with the suid bit set, enabling some applets to perform
+         root-level operations even when run by ordinary users
+         (for example, mounting of user mounts in fstab needs this).
+
+         Busybox will automatically drop priviledges for applets
+         that don't need root access.
 
          If you are really paranoid and don't want to do this, build two
          busybox binaries with different applets in them (and the appropriate
          symlinks pointing to each binary), and only set the suid bit on the
-         one that needs it. The applets currently marked to need the suid bit
-         are:
+         one that needs it.
+
+         The applets currently marked to need the suid bit are:
 
          crontab, dnsd, findfs, ipcrm, ipcs, login, passwd, ping, su,
          traceroute, vlock.
@@ -651,20 +664,13 @@ endchoice
 
 endmenu
 
-menu 'Installation Options'
-
-config INSTALL_NO_USR
-       bool "Don't use /usr"
-       default n
-       help
-         Disable use of /usr. Don't activate this option if you don't know
-         that you really want this behaviour.
+menu 'Installation Options ("make install" behavior)'
 
 choice
-       prompt "Applets links"
+       prompt "What kind of applet links to install"
        default INSTALL_APPLET_SYMLINKS
        help
-         Choose how you install applets links.
+         Choose what kind of links to applets are created by "make install".
 
 config INSTALL_APPLET_SYMLINKS
        bool "as soft-links"
@@ -688,8 +694,9 @@ config INSTALL_APPLET_DONT
        bool "not installed"
        depends on FEATURE_INSTALLER || FEATURE_SH_STANDALONE || FEATURE_PREFER_APPLETS
        help
-         Do not install applet links. Useful when using the -install feature
-         or a standalone shell for rescue purposes.
+         Do not install applet links. Useful when you plan to use
+         busybox --install for installing links, or plan to use
+         a standalone shell and thus don't need applet links.
 
 endchoice
 
@@ -713,8 +720,8 @@ config INSTALL_SH_APPLET_HARDLINK
 config INSTALL_SH_APPLET_SCRIPT_WRAPPER
        bool "as script wrapper"
        help
-         Install /bin/sh applet as script wrapper that call the busybox
-         binary.
+         Install /bin/sh applet as script wrapper that calls
+         the busybox binary.
 
 endchoice
 
index d2b1d198fee806edf7f65e493d27dfb7eb1b3e6b..6a14a658869abc81c126759ad1dbc96491c02bf2 100644 (file)
@@ -56,11 +56,6 @@ s     - suid type:
 # define APPLET_NOFORK(name,main,l,s,name2)  { #name, #main, l, s, 1, 1 },
 #endif
 
-#if ENABLE_INSTALL_NO_USR
-# define _BB_DIR_USR_BIN _BB_DIR_BIN
-# define _BB_DIR_USR_SBIN _BB_DIR_SBIN
-#endif
-
 
 INSERT
 IF_TEST(APPLET_NOFORK([,  test, _BB_DIR_USR_BIN, _BB_SUID_DROP, test))
index 76415dd723571f8a790906f0f7abe87f75b3ce33..757317fc7098d4c1d3b84a0c0c707555e1b9b3ed 100644 (file)
@@ -16,8 +16,13 @@ typedef enum bb_install_loc_t {
        _BB_DIR_ROOT = 0,
        _BB_DIR_BIN,
        _BB_DIR_SBIN,
+#if ENABLE_INSTALL_NO_USR
+       _BB_DIR_USR_BIN  = _BB_DIR_BIN,
+       _BB_DIR_USR_SBIN = _BB_DIR_SBIN,
+#else
        _BB_DIR_USR_BIN,
-       _BB_DIR_USR_SBIN
+       _BB_DIR_USR_SBIN,
+#endif
 } bb_install_loc_t;
 
 typedef enum bb_suid_t {
index 7326f4fa54fe00f9be27abdb0cdb3e8299303fb2..b32ff8808ca1a120ead2efd0cb92e2e079073831 100644 (file)
@@ -592,9 +592,11 @@ static const char usr_sbin[] ALIGN1 = "/usr/sbin/";
 static const char *const install_dir[] = {
        &usr_bin [8], /* "/" */
        &usr_bin [4], /* "/bin/" */
-       &usr_sbin[4], /* "/sbin/" */
-       usr_bin,
-       usr_sbin
+       &usr_sbin[4]  /* "/sbin/" */
+# if !ENABLE_INSTALL_NO_USR
+       ,usr_bin
+       ,usr_sbin
+# endif
 };
 
 
index 151f61bcc0be96a3db219f416bb3d3442e1e43ff..4912daf882e7cc35a4f477a182b186414285a8f9 100644 (file)
@@ -136,7 +136,6 @@ config CHRT
 config CROND
        bool "crond"
        default y
-       select FEATURE_SUID
        select FEATURE_SYSLOG
        help
          Crond is a background daemon that parses individual crontab
index 9fc122bf3f8eb0ee3e5b50f5aaa5d997ebc37687..6dd7df75492ef265ff840ad9686eeaa367851db7 100644 (file)
@@ -804,7 +804,7 @@ config TELNETD
 
                  mount -t devpts devpts /dev/pts
 
-         You need to be sure that Busybox has LOGIN and
+         You need to be sure that busybox has LOGIN and
          FEATURE_SUID enabled. And finally, you should make
          certain that Busybox has been installed setuid root: