Commit 0d4be2ff authored by Chris Boot's avatar Chris Boot

New upstream version 1.29.0

parents 3134d6a6 10a38174

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This diff is collapsed.
VERSION = 1
PATCHLEVEL = 27
SUBLEVEL = 2
PATCHLEVEL = 29
SUBLEVEL = 0
EXTRAVERSION =
NAME = Unnamed
......@@ -178,7 +178,7 @@ endif
# SUBARCH is subsequently ignored.
ifneq ($(CROSS_COMPILE),)
SUBARCH := $(shell echo $(CROSS_COMPILE) | cut -d- -f1)
SUBARCH := $(shell echo $(CROSS_COMPILE) | cut -d- -f1 | sed 's:^.*/::g')
else
SUBARCH := $(shell uname -m)
endif
......@@ -368,7 +368,7 @@ gen_build_files: $(wildcard $(srctree)/*/*.c) $(wildcard $(srctree)/*/*/*.c)
# we depend on scripts_basic, since scripts/basic/fixdep
# must be built before any other host prog
PHONY += applets_dir
applets_dir: scripts_basic gen_build_files
applets_dir: scripts_basic gen_build_files include/config/MARKER
$(Q)$(MAKE) $(build)=applets
applets/%: applets_dir ;
......@@ -470,6 +470,7 @@ libs-y := \
coreutils/ \
coreutils/libcoreutils/ \
debianutils/ \
klibc-utils/ \
e2fsprogs/ \
editors/ \
findutils/ \
......@@ -508,6 +509,8 @@ ifeq ($(dot-config),1)
# To avoid any implicit rule to kick in, define an empty command
.config .kconfig.d: ;
-include $(srctree)/arch/$(ARCH)/Makefile
# Now we can define CFLAGS etc according to .config
include $(srctree)/Makefile.flags
......@@ -531,8 +534,6 @@ endif
# Defaults busybox but it is usually overridden in the arch makefile
all: busybox doc
-include $(srctree)/arch/$(ARCH)/Makefile
# arch Makefile may override CC so keep this after arch Makefile is included
#bbox# NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
CHECKFLAGS += $(NOSTDINC_FLAGS)
......
......@@ -11,6 +11,9 @@ busybox.cfg.nosuid: $(srctree)/applets/busybox.mksuid $(objtree)/include/autocon
$(Q)-SUID="DROP" $(SHELL) $^ > $@
.PHONY: install
ifeq ($(CONFIG_INSTALL_APPLET_DONT),y)
INSTALL_OPTS:= --none
endif
ifeq ($(CONFIG_INSTALL_APPLET_SYMLINKS),y)
INSTALL_OPTS:= --symlinks
endif
......@@ -46,6 +49,9 @@ ifeq ($(strip $(CONFIG_FEATURE_SUID)),y)
@echo
endif
install-noclobber: INSTALL_OPTS+=--noclobber
install-noclobber: install
uninstall: busybox.links
rm -f $(CONFIG_PREFIX)/bin/busybox
for i in `cat busybox.links` ; do rm -f $(CONFIG_PREFIX)$$i; done
......
......@@ -15,7 +15,7 @@ CPPFLAGS += \
-include include/autoconf.h \
-D_GNU_SOURCE -DNDEBUG \
$(if $(CONFIG_LFS),-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) \
-D"BB_VER=KBUILD_STR($(BB_VER))" -DBB_BT=AUTOCONF_TIMESTAMP
-D"BB_VER=KBUILD_STR($(BB_VER))"
CFLAGS += $(call cc-option,-Wall,)
CFLAGS += $(call cc-option,-Wshadow,)
......@@ -156,6 +156,10 @@ CPPFLAGS += $(SELINUX_CFLAGS)
LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%))
endif
ifeq ($(CONFIG_FEATURE_NSLOOKUP_BIG),y)
LDLIBS += resolv
endif
ifeq ($(CONFIG_EFENCE),y)
LDLIBS += efence
endif
......
This diff is collapsed.
#!/bin/sh
exec >NOFORK_NOEXEC.lst1
false && grep -Fv 'NOFORK' NOFORK_NOEXEC.lst \
| grep -v 'noexec.' | grep -v 'noexec$' \
| grep -v ' suid' \
| grep -v ' daemon' \
| grep -v ' longterm' \
| grep rare
echo === nofork candidate
grep -F 'nofork candidate' NOFORK_NOEXEC.lst \
echo === noexec candidate
grep -F 'noexec candidate' NOFORK_NOEXEC.lst \
echo === ^C
grep -F '^C' NOFORK_NOEXEC.lst \
| grep -F ' - ' \
echo === talks
grep -F 'talks' NOFORK_NOEXEC.lst \
| grep -F ' - ' \
echo ===
grep -Fv 'NOFORK' NOFORK_NOEXEC.lst \
| grep '^[^ ][^ ]* - ' \
| grep -v 'noexec.' | grep -v ' - noexec$' \
| grep -v ' suid' \
| grep -v ' daemon' \
| grep -v 'longterm' \
| grep -v 'interactive' \
| grep -v 'hardware' \
......@@ -224,8 +224,6 @@ Minor stuff:
---
support start-stop-daemon -d <chdir-path>
---
vdprintf() -> similar sized functionality
---
(TODO list after discussion 11.05.2009)
......
......@@ -10,6 +10,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
......@@ -61,6 +62,7 @@ static int str_isalnum_(const char *s)
int main(int argc, char **argv)
{
int i, j;
char tmp1[PATH_MAX], tmp2[PATH_MAX];
// In find_applet_by_name(), before linear search, narrow it down
// by looking at N "equidistant" names. With ~350 applets:
......@@ -84,7 +86,8 @@ int main(int argc, char **argv)
if (!argv[1])
return 1;
i = open(argv[1], O_WRONLY | O_TRUNC | O_CREAT, 0666);
snprintf(tmp1, PATH_MAX, "%s.%u.new", argv[1], (int) getpid());
i = open(tmp1, O_WRONLY | O_TRUNC | O_CREAT, 0666);
if (i < 0)
return 1;
dup2(i, 1);
......@@ -209,12 +212,21 @@ int main(int argc, char **argv)
// fclose(fp);
// }
// if (strcmp(line_old, line_new) != 0) {
fp = fopen(argv[2], "w");
snprintf(tmp2, PATH_MAX, "%s.%u.new", argv[2], (int) getpid());
fp = fopen(tmp2, "w");
if (!fp)
return 1;
fputs(line_new, fp);
if (fclose(fp))
return 1;
// }
}
if (fclose(stdout))
return 1;
if (rename(tmp1, argv[1]))
return 1;
if (rename(tmp2, argv[2]))
return 1;
return 0;
}
......@@ -5,9 +5,12 @@ export LC_CTYPE=POSIX
prefix=$1
if [ -z "$prefix" ]; then
echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/--binaries/--scriptwrapper]"
echo "usage: applets/install.sh DESTINATION TYPE [OPTS ...]"
echo " TYPE is one of: --symlinks --hardlinks --binaries --scriptwrapper --none"
echo " OPTS is one or more of: --cleanup --noclobber"
exit 1
fi
shift # Keep only remaining options
# Source the configuration
. ./.config
......@@ -21,20 +24,23 @@ scriptwrapper="n"
binaries="n"
cleanup="0"
noclobber="0"
case "$2" in
--hardlinks) linkopts="-f";;
--symlinks) linkopts="-fs";;
--binaries) binaries="y";;
--scriptwrapper) scriptwrapper="y";swrapall="y";;
--sw-sh-hard) scriptwrapper="y";linkopts="-f";;
--sw-sh-sym) scriptwrapper="y";linkopts="-fs";;
--cleanup) cleanup="1";;
--noclobber) noclobber="1";;
"") h="";;
*) echo "Unknown install option: $2"; exit 1;;
esac
while [ ${#} -gt 0 ]; do
case "$1" in
--hardlinks) linkopts="-f";;
--symlinks) linkopts="-fs";;
--binaries) binaries="y";;
--scriptwrapper) scriptwrapper="y"; swrapall="y";;
--sw-sh-hard) scriptwrapper="y"; linkopts="-f";;
--sw-sh-sym) scriptwrapper="y"; linkopts="-fs";;
--cleanup) cleanup="1";;
--noclobber) noclobber="1";;
--none) h="";;
*) echo "Unknown install option: $1"; exit 1;;
esac
shift
done
if [ -n "$DO_INSTALL_LIBS" ] && [ "$DO_INSTALL_LIBS" != "n" ]; then
if [ -n "$DO_INSTALL_LIBS" ] && [ x"$DO_INSTALL_LIBS" != x"n" ]; then
# get the target dir for the libs
# assume it starts with lib
libdir=$($CC -print-file-name=libc.so | \
......@@ -54,7 +60,7 @@ if [ -n "$DO_INSTALL_LIBS" ] && [ "$DO_INSTALL_LIBS" != "n" ]; then
done
fi
if [ "$cleanup" = "1" ] && [ -e "$prefix/bin/busybox" ]; then
if [ x"$cleanup" = x"1" ] && [ -e "$prefix/bin/busybox" ]; then
inode=`ls -i "$prefix/bin/busybox" | awk '{print $1}'`
sub_shell_it=`
cd "$prefix"
......@@ -77,9 +83,13 @@ install -m 755 busybox "$prefix/bin/busybox" || exit 1
for i in $h; do
appdir=`dirname "$i"`
app=`basename "$i"`
if [ x"$noclobber" = x"1" ] && [ -e "$prefix/$i" ]; then
echo " $prefix/$i already exists"
continue
fi
mkdir -p "$prefix/$appdir" || exit 1
if [ "$scriptwrapper" = "y" ]; then
if [ "$swrapall" != "y" ] && [ "$i" = "/bin/sh" ]; then
if [ x"$scriptwrapper" = x"y" ]; then
if [ x"$swrapall" != x"y" ] && [ x"$i" = x"/bin/sh" ]; then
ln $linkopts busybox "$prefix/$i" || exit 1
else
rm -f "$prefix/$i"
......@@ -87,21 +97,17 @@ for i in $h; do
chmod +x "$prefix/$i"
fi
echo " $prefix/$i"
elif [ "$binaries" = "y" ]; then
elif [ x"$binaries" = x"y" ]; then
# Copy the binary over rather
if [ -e $sharedlib_dir/$app ]; then
if [ "$noclobber" = "0" ] || [ ! -e "$prefix/$i" ]; then
echo " Copying $sharedlib_dir/$app to $prefix/$i"
cp -pPR $sharedlib_dir/$app $prefix/$i || exit 1
else
echo " $prefix/$i already exists"
fi
if [ -e "$sharedlib_dir/$app" ]; then
echo " Copying $sharedlib_dir/$app to $prefix/$i"
cp -pPR "$sharedlib_dir/$app" "$prefix/$i" || exit 1
else