Rich Felker | 24 May 02:21

Problems with --sort-section=alignment

Busybox is linked with --sort-section=alignment, and this seems to be
causing an obscure bugs one of my users experienced building busybox
on ARM/musl target. I've filed a bug report with binutils, but I'm not
sure where the issue should be addressed. See here:

http://sourceware.org/bugzilla/show_bug.cgi?id=14156

Basically, --sort-section=alignment wants to reorder the .init
section, which is not possible. The problem does not show up on other
targets, but I can't see anything that inhibits reordering .init, so
it seems to be working only by chance...

Rich
Andy Lee | 23 May 03:02
Picon

swapon: implementing discard option.

Hi,

This makes swapon to use discard option.
Enable support for discarding freed pages before they are reused.

Cheers,
Andy

---
 util-linux/Config.src  |    7 +++++++
 util-linux/swaponoff.c |   41 +++++++++++++++++++++++++++++++++--------
 2 files changed, 40 insertions(+), 8 deletions(-)

diff --git a/util-linux/Config.src b/util-linux/Config.src
index 57a52ce..84652eb 100644
--- a/util-linux/Config.src
+++ b/util-linux/Config.src
@@ -606,6 +606,13 @@ config FEATURE_SWAPON_PRI
 	help
 	  Enable support for setting swap device priority in swapon.

+config FEATURE_SWAPON_DISCARD
+	bool "Support discard option -d"
+	default y
+	depends on SWAPONOFF
+	help
+	  Enable support for discarding freed pages before they are reused.
+
 config SWITCH_ROOT
 	bool "switch_root"
(Continue reading)

Natanael Copa | 22 May 16:56
Picon
Gravatar

[PATCH] unzip: ignore chmod errors

This makes unzip to FAT filesystems not exit with error.

This similar to how the "normal" unzip works.
---
 archival/unzip.c       |    2 +-
 include/libbb.h        |    1 +
 libbb/make_directory.c |    7 ++++++-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/archival/unzip.c b/archival/unzip.c
index 3c76cda..c1b945a 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -596,7 +596,7 @@ int unzip_main(int argc, char **argv)
 						printf("   creating: %s\n", dst_fn);
 					}
 					unzip_create_leading_dirs(dst_fn);
-					if (bb_make_directory(dst_fn, dir_mode, 0)) {
+					if (bb_make_directory(dst_fn, dir_mode, FILEUTILS_IGNORE_CHMOD_ERR)) {
 						xfunc_die();
 					}
 				} else {
diff --git a/include/libbb.h b/include/libbb.h
index f12800f..5e5c8c7 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -333,6 +333,7 @@ enum {	/* DO NOT CHANGE THESE VALUES!  cp.c, mv.c, install.c depend on them. */
 	FILEUTILS_PRESERVE_SECURITY_CONTEXT = 1 << 9, /* -c */
 	FILEUTILS_SET_SECURITY_CONTEXT = 1 << 10,
 #endif
(Continue reading)

Tias | 22 May 00:03
Favicon

patches for building with Android NDK

Dear Busybox developers,

Since Rob Walker's patch[1], building busybox with the Android NDK has 
really become dead simple; no special hacks or external libraries are 
needed anymore.

However, a large number of applets can currently not be built.

I started documenting why applets don't build, as well as collecting 
patches from different sources, that fix the issues:
https://github.com/tias/android-busybox-ndk
https://github.com/tias/android-busybox-ndk/tree/master/patches

I would love to see the ideas behind these patches integrated, so that a 
standard busybox build can be used in the many android open-source 
projects that depend on it (and currently use a statically built 
third-party blob).

However, I am unfamiliar with the coding practices of the busybox 
community, and many of these patches were written to fix the build and 
not necessarily to get merged upstream.
I consider my work in collecting these patches as just a first step.
Hence, I would like to solicit feedback on what can and can not be 
merged, and what would be required to get these fixes in.

Thanks in advance,
Tias

[1] http://lists.busybox.net/pipermail/busybox/2012-March/077486.html
(Continue reading)

Boris Reisig | 21 May 21:24
Picon

[PATCH] Allow XZ streaming format in tar.

Here's a patch that will allow tar to uncompress XZ file formats when it 
can't properly detect XZ data formats when the input data comes from the 
standard input.  I have added the (-J) option to force tar to recognize 
XZ file format. Without this patch, it won't work with data streams.

Example: wget -O - http://192.168.0.1/1.xz | tar -xvJf -

diff -uNr busybox-original/archival/tar.c busybox/archival/tar.c
--- busybox-original/archival/tar.c     2012-05-21 00:19:38.876360998 -0500
+++ busybox/archival/tar.c      2012-05-21 00:05:08.299222265 -0500
@@ -693,6 +693,7 @@
  //usage:       "-[" IF_FEATURE_TAR_CREATE("c") "xt"
  //usage:       IF_FEATURE_SEAMLESS_Z("Z")
  //usage:       IF_FEATURE_SEAMLESS_GZ("z")
+//usage:       IF_FEATURE_SEAMLESS_XZ("J")
  //usage:       IF_FEATURE_SEAMLESS_BZ2("j")
  //usage:       IF_FEATURE_SEAMLESS_LZMA("a")
  //usage:       IF_FEATURE_TAR_CREATE("h")
@@ -719,6 +720,9 @@
  //usage:       IF_FEATURE_SEAMLESS_GZ(
  //usage:     "\n       z       (De)compress using gzip"
  //usage:       )
+//usage:       IF_FEATURE_SEAMLESS_XZ(
+//usage:     "\n       J       (De)compress using xz"
+//usage:       )
  //usage:       IF_FEATURE_SEAMLESS_BZ2(
  //usage:     "\n       j       (De)compress using bzip2"
  //usage:       )
@@ -765,6 +769,7 @@
         IF_FEATURE_TAR_FROM(     OPTBIT_INCLUDE_FROM,)
(Continue reading)

Michael J. Hammel | 17 May 05:06
Favicon

/sbin/reboot does SIGINT and not SIGTERM?

I was trying to get rcK to run to shutdown gracefully and noticed that
the inittab should use SHUTDOWN for the action.  If I run /sbin/reboot
this causes a SIGINT, which doesn't cause the rcK to get run.  If I do
kill -15 1 then rcK gets run and I get a reboot.

Is this the intended action for /sbin/reboot or am I doing something
wrong here?  poweroff also doesn't do SIGTERM for init.

I'm using Busybox 1.19.4.  My relevant inittab lines are:

# Stuff to do for the 3-finger salute
::ctrlaltdel:/sbin/reboot

# Stuff to do before rebooting
::shutdown:/etc/init.d/rcK
::shutdown:/bin/umount -a -r
::shutdown:/sbin/swapoff -a

--

-- 
Michael J. Hammel <busybox <at> graphics-muse.org>
Tanguy Pruvot | 16 May 01:22
Picon
Gravatar

[PATCH] ext4 detection in blkid applet

Available here :

http://review.cyanogenmod.com/16046

--
Tanguy Pruvot                         email : tanguy.pruvot <at> gmail.com
Anthony G. Basile | 15 May 13:36
Favicon

[PATCH] Fix link time error for functions calling check_signature16()

From: Anthony G. Basile <blueness <at> gentoo.org>

archival/libarchive/decompress_bunzip2.c, decompress_gunzip.c and
decompress_uncompress.c all make calls to check_signature16() which
is defined in open_transformer.c.  However, Kbuild.src does not
properly respect this dependency leading to a link time error.
This patch addresses this problem.

Signed-off-by: Anthony G. Basile <blueness <at> gentoo.org>
---
 archival/libarchive/Kbuild.src |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/archival/libarchive/Kbuild.src b/archival/libarchive/Kbuild.src
index e2134be..72dc733 100644
--- a/archival/libarchive/Kbuild.src
+++ b/archival/libarchive/Kbuild.src
@@ -39,17 +39,17 @@ DPKG_FILES:= \
 INSERT

 lib-$(CONFIG_AR)                        += get_header_ar.o unpack_ar_archive.o
-lib-$(CONFIG_BUNZIP2)                   += decompress_bunzip2.o
+lib-$(CONFIG_BUNZIP2)                   += open_transformer.o decompress_bunzip2.o
 lib-$(CONFIG_UNLZMA)                    += decompress_unlzma.o
 lib-$(CONFIG_UNXZ)                      += decompress_unxz.o
 lib-$(CONFIG_CPIO)                      += get_header_cpio.o
 lib-$(CONFIG_DPKG)                      += $(DPKG_FILES)
 lib-$(CONFIG_DPKG_DEB)                  += $(DPKG_FILES)
-lib-$(CONFIG_GUNZIP)                    += decompress_gunzip.o
-lib-$(CONFIG_RPM2CPIO)                  += decompress_gunzip.o get_header_cpio.o
(Continue reading)

Walter Dnes | 14 May 09:45

mdev automount questions

  This really should be a separate topic.  Sorry for derailing the wifi
question.

On Sun, May 13, 2012 at 12:16:37PM +0200, Laurent Bercot wrote

>  Just have a single rule for /dev/sd* and have a
>   if [ "$DEV" = "/dev/sda" ] ; exit 0
> line at the beginning of your rule script. (Maybe $DEV isn't the right
> variable name, I don't remember.)

  A couple of options...

1) The comments in /lib/mdev/usbdisk_link say
# NOTE: since mdev -s only provide $MDEV, don't depend on any hotplug vars.
Can I use the lack of an ACTION var to assume that this call is from
"mdev -s" (i.e. bootup), whereas if ACTION is present, assume that it's
a hotplug
if [ "X${ACTION}" == "X" ]; then
   assume it's a hard drive coming up at boot time (mdev -s)
else
   it's from the command in /proc/sys/kernel/hotplug (userspace hotplug)
fi

2) Get info from /sys

cat /sys/block/sda/removable
0

cat /sys/block/sdb/removable 
1
(Continue reading)

Tom Isaacson | 14 May 02:08

MAC address deny in udhcpd

In the example udhcpd.conf it shows how to declare a static IP address 
for a specific MAC address:

|   # Static leases map
   static_lease 00:60:08:11:CE:4E 192.168.0.54
|

You can also use a MAC address range by using the wildcard:

|   static_lease 00:21:5a:e7:xx:xx 10.10.1.254

But it doesn't seem possible to deny an IP address to a MAC address or range, which is possible in dhcpd.conf.
I was thinking this could be done in the same way static leases are done:
||   static_lease 00:21:5a:e7:xx:xx 0.0.0.0|
Alternatively we could add a new command:
   deny|00:21:5a:e7:xx:xx|

What are your thoughts?

|Tom

|
Walter Dnes | 14 May 00:14

Possible change to /etc/mdev.conf default?

  I was spelunking through my /etc/mdev.conf, looking at the syntax,
when something occured to me looking at...

sr[0-9]*        root:cdrom 660 @ln -sf $MDEV cdrom

  What happens if you have multiple devices, e.g. "sr0" and "sr1"?  Does
the system get confused?  Would the following work better...

sr[0-9]*        root:cdrom 660 @ln -sf $MDEV cdrom%1

--

-- 
Walter Dnes <waltdnes <at> waltdnes.org>

Gmane