Discussion:
busybox current status
(too old to reply)
Denis Vlasenko
2006-11-29 23:14:47 UTC
Permalink
Done:

telnetd: fixed/improved IPv6 support, inetd+standalone
support, other fixes. Useful IPv6 stuff factored out into libbb.

tar: fix limitations which were preventing bbox tar usage
on a big directories: long names and linknames, pax headers
(Linux kernel tarballs hve that). Fixed a number of obscure bugs.
Raised max file limit (now 64Gb). Security fixes (/../ attacks).

httpd: added support for directory indexer CGI. Example is included.
two small bugs related to string decode fixed.

str->num conversion: regularized. bb_strtoul
is "like strtoul done right". Did you know that
"-" is a valid _unsigned_ number for libc's strtoul?!

od: removed some bloat without loss of functionality
(we are even x3 faster than coreutils in ascii dump modes)

mkfs.minix: size reduction and cleanup.

minor bugfixes to: udhcp, fdisk, mount, ifconfig, sort, tee,
mkswap, wget, insmod.

bug database: closed fixed and hopeless records. Applied
patches from some reports which have those.
Thanks for the reporters! You are really helping us people.

To do:

* 1.2.3 release?
* more fishing in bug database
* remove (most of) e2fsck, sanitize the rest
* Networking: more of ipv6-ization
* Shell: we still BADLY need a decent, bash-like shell
? NOFORK feature is dependent on this
* NOMMU: need audit of unnecessary fork() calls
* Desktop compatibility (what is missing):
? I fixed the most critical stuff by now, i think.
? I guess more bugs/incompats will be found
? by other people trying to use bbox on desktops
* New applets: hose/faucet? ssh[d]? :)
--
vda
Luciano Miguel Ferreira Rocha
2006-11-29 23:44:38 UTC
Permalink
Is this the state of the public svn? I can update my cpio hardlink fix
and httpd cgi output to syslog if you want.
--
lfr
0/0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://busybox.net/lists/busybox/attachments/20061129/e02a3fc8/attachment.pgp
Bernhard Fischer
2006-11-29 23:56:02 UTC
Permalink
Post by Luciano Miguel Ferreira Rocha
Is this the state of the public svn?
yes.
Post by Luciano Miguel Ferreira Rocha
I can update my cpio hardlink fix
and httpd cgi output to syslog if you want.
Please do so if you want them to be integrated. I managed to miss these
patches of your the first time round, so let me ask to resend the
problem description they were solving.

thanks and cheers,
Luciano Miguel Ferreira Rocha
2006-11-30 01:06:11 UTC
Permalink
Post by Bernhard Fischer
Post by Luciano Miguel Ferreira Rocha
Is this the state of the public svn?
yes.
Post by Luciano Miguel Ferreira Rocha
I can update my cpio hardlink fix
and httpd cgi output to syslog if you want.
Please do so if you want them to be integrated. I managed to miss these
patches of your the first time round, so let me ask to resend the
problem description they were solving.
The cpio is already in (bug 0001095).

The httpd patch adds new options to httpd, for logging the output sent
by CGIs to stderr in syslog.

A new patch is attached, for latest revision at svn.
--
lfr
0/0
-------------- next part --------------
Index: networking/httpd.c
===================================================================
--- networking/httpd.c (revision 16736)
+++ networking/httpd.c (working copy)
@@ -100,6 +100,8 @@
static const char httpd_conf[] = "httpd.conf";
static const char home[] = "./";

+SKIP_FEATURE_HTTPD_CGI_SYSLOG_PERPROC(static int logFd);
+
#define TIMEOUT 60

// Note: busybox xfuncs are not used because we want the server to keep running
@@ -943,6 +945,48 @@
else return -1;
}

+#if ENABLE_FEATURE_HTTPD_CGI_SYSLOG
+/****************************************************************************
+ *
+ > $Function: openLogger()
+ *
+ * $Description: Open a connection to a logger
+ *
+ * $Parameters:
+ *
+ * $Return: int . . . . File descriptor for writting to the logger.
+ *
+ * $Errors: None, but returns STDERR on error
+****************************************************************************/
+static int openLogger(void)
+{
+ char *cmd[] = { "logger", "-thttpd", "-p",
+ CONFIG_FEATURE_HTTPD_CGI_SYSLOG_PRIORITY,
+ NULL
+ };
+ int p[2];
+
+ if (pipe(p)) return 2;
+
+ /* connect stdin to pipe */
+ dup2(p[0], 0);
+ close(p[0]);
+
+ /* other endpoint won't be used by the logger, set close on exec.
+ * this will allow the use o vfork */
+ fcntl(p[1], F_SETFD, FD_CLOEXEC);
+
+ if (spawn(cmd) < 0) {
+ close(p[1]);
+ return 2;
+ }
+
+ /* clear close on exec (will be used by cgis) */
+ fcntl(p[1], F_SETFD, 0);
+ return p[1];
+}
+#endif /* FEATURE_HTTPD_CGI_SYSLOG */
+
#if ENABLE_FEATURE_HTTPD_CGI
/****************************************************************************
*
@@ -981,6 +1025,10 @@
int status;
size_t post_readed_size, post_readed_idx;

+#if ENABLE_FEATURE_HTTPD_CGI_SYSLOG_PERPROC
+ int logFd = openLogger();
+#endif
+
if (pipe(fromCgi) != 0)
return 0;
if (pipe(toCgi) != 0)
@@ -1004,8 +1052,13 @@

dup2(inFd, 0); // replace stdin with the pipe
dup2(outFd, 1); // replace stdout with the pipe
+#if ENABLE_FEATURE_HTTPD_CGI_SYSLOG
+ dup2(logFd, 2);
+ close(logFd);
+#else
if (!DEBUG)
dup2(outFd, 2); // replace stderr with the pipe
+#endif

close(toCgi[0]);
close(toCgi[1]);
@@ -1966,5 +2019,8 @@

if (!(opt & OPT_FOREGROUND))
xdaemon(1, 0); /* don't change current directory */
+#if ENABLE_FEATURE_HTTPD_CGI_SYSLOG && !ENABLE_FEATURE_HTTPD_CGI_SYSLOG_PERPROC
+ logFd = openLogger();
+#endif
return miniHttpd(config->server_socket);
}
Index: networking/Config.in
===================================================================
--- networking/Config.in (revision 16736)
+++ networking/Config.in (working copy)
@@ -119,6 +119,31 @@
This option allows scripts and executables to be invoked
when specific URLs are requested.

+config FEATURE_HTTPD_CGI_SYSLOG
+ bool "Log stderr to syslog"
+ default n
+ depends on FEATURE_HTTPD_CGI && LOGGER
+ help
+ This option causes the output sent to standard error from CGIs to
+ be sent to syslog, using the program logger.
+
+config FEATURE_HTTPD_CGI_SYSLOG_PRIORITY
+ string "Priority"
+ default "daemon.notice"
+ depends on FEATURE_HTTPD_CGI_SYSLOG
+ help
+ Define the priority of the messages (facility and level,
+ see -p option for logger).
+
+config FEATURE_HTTPD_CGI_SYSLOG_PERPROC
+ bool "One logger per process"
+ default n
+ depends on FEATURE_HTTPD_CGI_SYSLOG
+ help
+ This option starts one logger per CGI executed, instead of reusing
+ a single, per-httpd, logger. This will prevent output from
+ different processes to be mixed, but will use more memory.
+
config FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
bool "Enable support for running scripts through an interpreter"
default n
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://busybox.net/lists/busybox/attachments/20061130/22f8052c/attachment.pgp
Luciano Miguel Ferreira Rocha
2006-11-30 01:23:33 UTC
Permalink
Post by Bernhard Fischer
Post by Luciano Miguel Ferreira Rocha
Is this the state of the public svn?
yes.
Post by Luciano Miguel Ferreira Rocha
I can update my cpio hardlink fix
and httpd cgi output to syslog if you want.
Please do so if you want them to be integrated. I managed to miss these
patches of your the first time round, so let me ask to resend the
problem description they were solving.
Another one in my queue. This one does two things to chown:

1. Search first for ':' and only if it fails for '.', instead of the
current behaviour of preferring '.'. ('.' is a valid part of a username,
it seems.)

2. Allow an empty specification of the new group (like 'user:'), in
which case the gid associated to the specified user is used.
--
lfr
0/0
-------------- next part --------------
Index: coreutils/chown.c
===================================================================
--- coreutils/chown.c (revision 16736)
+++ coreutils/chown.c (working copy)
@@ -65,18 +65,31 @@
argv += optind;

/* First, check if there is a group name here */
- groupName = strchr(*argv, '.');
+ groupName = strchr(*argv, ':');
if (!groupName) {
- groupName = strchr(*argv, ':');
+ groupName = strchr(*argv, '.');
}

- /* Check for the username and groupname */
+ /* Check for groupname */
if (groupName) {
*groupName++ = '\0';
- gid = get_ug_id(groupName, bb_xgetgrnam);
+ if (*groupName)
+ gid = get_ug_id(groupName, bb_xgetgrnam);
}
- if (--groupName != *argv)
+
+ /* Check for username */
+ if (**argv) {
uid = get_ug_id(*argv, bb_xgetpwnam);
+ if (groupName && *groupName == '\0') {
+ /* groupname defined but empty, use username's default gid */
+ struct passwd *pwe = getpwuid(uid);
+
+ if (!pwe)
+ bb_error_msg_and_die("unknown uid: %s", *argv);
+ gid = pwe->pw_gid;
+ }
+ }
+
++argv;

/* Ok, ready to do the deed now */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://busybox.net/lists/busybox/attachments/20061130/a5f37c12/attachment.pgp
Luciano Miguel Ferreira Rocha
2006-11-30 01:06:11 UTC
Permalink
Post by Bernhard Fischer
Post by Luciano Miguel Ferreira Rocha
Is this the state of the public svn?
yes.
Post by Luciano Miguel Ferreira Rocha
I can update my cpio hardlink fix
and httpd cgi output to syslog if you want.
Please do so if you want them to be integrated. I managed to miss these
patches of your the first time round, so let me ask to resend the
problem description they were solving.
The cpio is already in (bug 0001095).

The httpd patch adds new options to httpd, for logging the output sent
by CGIs to stderr in syslog.

A new patch is attached, for latest revision at svn.
--
lfr
0/0
-------------- next part --------------
Index: networking/httpd.c
===================================================================
--- networking/httpd.c (revision 16736)
+++ networking/httpd.c (working copy)
@@ -100,6 +100,8 @@
static const char httpd_conf[] = "httpd.conf";
static const char home[] = "./";

+SKIP_FEATURE_HTTPD_CGI_SYSLOG_PERPROC(static int logFd);
+
#define TIMEOUT 60

// Note: busybox xfuncs are not used because we want the server to keep running
@@ -943,6 +945,48 @@
else return -1;
}

+#if ENABLE_FEATURE_HTTPD_CGI_SYSLOG
+/****************************************************************************
+ *
+ > $Function: openLogger()
+ *
+ * $Description: Open a connection to a logger
+ *
+ * $Parameters:
+ *
+ * $Return: int . . . . File descriptor for writting to the logger.
+ *
+ * $Errors: None, but returns STDERR on error
+****************************************************************************/
+static int openLogger(void)
+{
+ char *cmd[] = { "logger", "-thttpd", "-p",
+ CONFIG_FEATURE_HTTPD_CGI_SYSLOG_PRIORITY,
+ NULL
+ };
+ int p[2];
+
+ if (pipe(p)) return 2;
+
+ /* connect stdin to pipe */
+ dup2(p[0], 0);
+ close(p[0]);
+
+ /* other endpoint won't be used by the logger, set close on exec.
+ * this will allow the use o vfork */
+ fcntl(p[1], F_SETFD, FD_CLOEXEC);
+
+ if (spawn(cmd) < 0) {
+ close(p[1]);
+ return 2;
+ }
+
+ /* clear close on exec (will be used by cgis) */
+ fcntl(p[1], F_SETFD, 0);
+ return p[1];
+}
+#endif /* FEATURE_HTTPD_CGI_SYSLOG */
+
#if ENABLE_FEATURE_HTTPD_CGI
/****************************************************************************
*
@@ -981,6 +1025,10 @@
int status;
size_t post_readed_size, post_readed_idx;

+#if ENABLE_FEATURE_HTTPD_CGI_SYSLOG_PERPROC
+ int logFd = openLogger();
+#endif
+
if (pipe(fromCgi) != 0)
return 0;
if (pipe(toCgi) != 0)
@@ -1004,8 +1052,13 @@

dup2(inFd, 0); // replace stdin with the pipe
dup2(outFd, 1); // replace stdout with the pipe
+#if ENABLE_FEATURE_HTTPD_CGI_SYSLOG
+ dup2(logFd, 2);
+ close(logFd);
+#else
if (!DEBUG)
dup2(outFd, 2); // replace stderr with the pipe
+#endif

close(toCgi[0]);
close(toCgi[1]);
@@ -1966,5 +2019,8 @@

if (!(opt & OPT_FOREGROUND))
xdaemon(1, 0); /* don't change current directory */
+#if ENABLE_FEATURE_HTTPD_CGI_SYSLOG && !ENABLE_FEATURE_HTTPD_CGI_SYSLOG_PERPROC
+ logFd = openLogger();
+#endif
return miniHttpd(config->server_socket);
}
Index: networking/Config.in
===================================================================
--- networking/Config.in (revision 16736)
+++ networking/Config.in (working copy)
@@ -119,6 +119,31 @@
This option allows scripts and executables to be invoked
when specific URLs are requested.

+config FEATURE_HTTPD_CGI_SYSLOG
+ bool "Log stderr to syslog"
+ default n
+ depends on FEATURE_HTTPD_CGI && LOGGER
+ help
+ This option causes the output sent to standard error from CGIs to
+ be sent to syslog, using the program logger.
+
+config FEATURE_HTTPD_CGI_SYSLOG_PRIORITY
+ string "Priority"
+ default "daemon.notice"
+ depends on FEATURE_HTTPD_CGI_SYSLOG
+ help
+ Define the priority of the messages (facility and level,
+ see -p option for logger).
+
+config FEATURE_HTTPD_CGI_SYSLOG_PERPROC
+ bool "One logger per process"
+ default n
+ depends on FEATURE_HTTPD_CGI_SYSLOG
+ help
+ This option starts one logger per CGI executed, instead of reusing
+ a single, per-httpd, logger. This will prevent output from
+ different processes to be mixed, but will use more memory.
+
config FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR
bool "Enable support for running scripts through an interpreter"
default n
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20061130/22f8052c/attachment-0002.pgp
Luciano Miguel Ferreira Rocha
2006-11-30 01:23:33 UTC
Permalink
Post by Bernhard Fischer
Post by Luciano Miguel Ferreira Rocha
Is this the state of the public svn?
yes.
Post by Luciano Miguel Ferreira Rocha
I can update my cpio hardlink fix
and httpd cgi output to syslog if you want.
Please do so if you want them to be integrated. I managed to miss these
patches of your the first time round, so let me ask to resend the
problem description they were solving.
Another one in my queue. This one does two things to chown:

1. Search first for ':' and only if it fails for '.', instead of the
current behaviour of preferring '.'. ('.' is a valid part of a username,
it seems.)

2. Allow an empty specification of the new group (like 'user:'), in
which case the gid associated to the specified user is used.
--
lfr
0/0
-------------- next part --------------
Index: coreutils/chown.c
===================================================================
--- coreutils/chown.c (revision 16736)
+++ coreutils/chown.c (working copy)
@@ -65,18 +65,31 @@
argv += optind;

/* First, check if there is a group name here */
- groupName = strchr(*argv, '.');
+ groupName = strchr(*argv, ':');
if (!groupName) {
- groupName = strchr(*argv, ':');
+ groupName = strchr(*argv, '.');
}

- /* Check for the username and groupname */
+ /* Check for groupname */
if (groupName) {
*groupName++ = '\0';
- gid = get_ug_id(groupName, bb_xgetgrnam);
+ if (*groupName)
+ gid = get_ug_id(groupName, bb_xgetgrnam);
}
- if (--groupName != *argv)
+
+ /* Check for username */
+ if (**argv) {
uid = get_ug_id(*argv, bb_xgetpwnam);
+ if (groupName && *groupName == '\0') {
+ /* groupname defined but empty, use username's default gid */
+ struct passwd *pwe = getpwuid(uid);
+
+ if (!pwe)
+ bb_error_msg_and_die("unknown uid: %s", *argv);
+ gid = pwe->pw_gid;
+ }
+ }
+
++argv;

/* Ok, ready to do the deed now */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20061130/a5f37c12/attachment-0002.pgp
Bernhard Fischer
2006-11-29 23:56:02 UTC
Permalink
Post by Luciano Miguel Ferreira Rocha
Is this the state of the public svn?
yes.
Post by Luciano Miguel Ferreira Rocha
I can update my cpio hardlink fix
and httpd cgi output to syslog if you want.
Please do so if you want them to be integrated. I managed to miss these
patches of your the first time round, so let me ask to resend the
problem description they were solving.

thanks and cheers,
Bernhard Fischer
2006-11-29 23:52:00 UTC
Permalink
Post by Denis Vlasenko
telnetd: fixed/improved IPv6 support, inetd+standalone
support, other fixes. Useful IPv6 stuff factored out into libbb.
tar: fix limitations which were preventing bbox tar usage
on a big directories: long names and linknames, pax headers
(Linux kernel tarballs hve that). Fixed a number of obscure bugs.
Raised max file limit (now 64Gb). Security fixes (/../ attacks).
httpd: added support for directory indexer CGI. Example is included.
two small bugs related to string decode fixed.
str->num conversion: regularized. bb_strtoul
is "like strtoul done right". Did you know that
"-" is a valid _unsigned_ number for libc's strtoul?!
od: removed some bloat without loss of functionality
(we are even x3 faster than coreutils in ascii dump modes)
mkfs.minix: size reduction and cleanup.
minor bugfixes to: udhcp, fdisk, mount, ifconfig, sort, tee,
mkswap, wget, insmod.
bug database: closed fixed and hopeless records. Applied
patches from some reports which have those.
Thanks for the reporters! You are really helping us people.
Fore!
Post by Denis Vlasenko
* 1.2.3 release?
* more fishing in bug database
* remove (most of) e2fsck, sanitize the rest
What are the applets that should be kept?
lsattr, chattr, fschk, ?
Post by Denis Vlasenko
* Networking: more of ipv6-ization
* Shell: we still BADLY need a decent, bash-like shell
? NOFORK feature is dependent on this
* NOMMU: need audit of unnecessary fork() calls
? I fixed the most critical stuff by now, i think.
? I guess more bugs/incompats will be found
? by other people trying to use bbox on desktops
* New applets: hose/faucet? ssh[d]? :)
If you add ssh[d], then we could as well add gcc et al ;)
Not really my call, though. Saying 'n' in the config is easy :)

* I'll add chrt if i find the time.
* Search for duplicate patterns like fopen(); if errno!=ENOENT etc, etc.
wioctl that warns?
Reduce duplicate strings. Not sexy but really benefical, overall.
* Look at comment from r16630 (vda?)
* Look at 'make checkhelp' and fixup after vda(?)
* Fix egrep "(XXX|FIXME)" * -r
Paul Fox
2006-11-29 23:54:52 UTC
Permalink
Post by Bernhard Fischer
Post by Denis Vlasenko
* New applets: hose/faucet? ssh[d]? :)
If you add ssh[d], then we could as well add gcc et al ;)
do we really think that busybox'ing dropbear would make it that
much smaller?

paul
=---------------------
paul fox, pgf at brightstareng.com
Jason Schoon
2006-11-30 00:47:48 UTC
Permalink
Post by Paul Fox
Post by Bernhard Fischer
Post by Denis Vlasenko
* New applets: hose/faucet? ssh[d]? :)
If you add ssh[d], then we could as well add gcc et al ;)
do we really think that busybox'ing dropbear would make it that
much smaller?
I'll chime in with a resounding "no". Not only do I think a significant
size benefit will be realized, I think we are then in a synchronization
nightmare.

Matt already has a nicely setup multi-call binary application that replaces
other currently larger implementations (such as opensshd). I think we
should let him continue to do that, not move it into Busybox.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/busybox/attachments/20061129/d5daa47e/attachment.html
Larry Brigman
2006-11-30 05:30:15 UTC
Permalink
Sorry, I sent this to the individual instead of the list.
Post by Jason Schoon
Post by Paul Fox
Post by Bernhard Fischer
Post by Denis Vlasenko
* New applets: hose/faucet? ssh[d]? :)
If you add ssh[d], then we could as well add gcc et al ;)
do we really think that busybox'ing dropbear would make it that
much smaller?
I'll chime in with a resounding "no". Not only do I think a significant
size benefit will be realized, I think we are then in a synchronization
nightmare.
Matt already has a nicely setup multi-call binary application that replaces
other currently larger implementations (such as opensshd). I think we
should let him continue to do that, not move it into Busybox.
But if you don't use uclib it requires several libraries that busybox
does not just to get login
working. Just getting to use the busybox lib for user/password would
be a step in the right
direction.

I guess that is really an issue for dropbear not busybox and projects
that need ssh(d)
Bernhard Fischer
2006-11-30 09:05:55 UTC
Permalink
Post by Larry Brigman
Sorry, I sent this to the individual instead of the list.
Post by Jason Schoon
Post by Paul Fox
Post by Bernhard Fischer
Post by Denis Vlasenko
* New applets: hose/faucet? ssh[d]? :)
If you add ssh[d], then we could as well add gcc et al ;)
do we really think that busybox'ing dropbear would make it that
much smaller?
I'll chime in with a resounding "no". Not only do I think a significant
size benefit will be realized, I think we are then in a synchronization
nightmare.
Matt already has a nicely setup multi-call binary application that replaces
other currently larger implementations (such as opensshd). I think we
should let him continue to do that, not move it into Busybox.
Agree, of course.
Post by Larry Brigman
But if you don't use uclib it requires several libraries that busybox
does not just to get login
working. Just getting to use the busybox lib for user/password would
be a step in the right
direction.
We'll provide the possibility to make busybox a PIE in favour of the
older approach that the initial "libbusybox" aimed at, so folks can just
link against
$ ls -ln libbusybox.so*
lrwxrwxrwx 1 100 100 15 Nov 30 10:05 libbusybox.so -> libbusybox.so.1
lrwxrwxrwx 1 100 100 17 Nov 30 10:05 libbusybox.so.1 -> libbusybox.so.1.2
lrwxrwxrwx 1 100 100 19 Nov 30 10:05 libbusybox.so.1.2 -> libbusybox.so.1.2.3
lrwxrwxrwx 1 100 100 7 Nov 30 10:05 libbusybox.so.1.2.3 -> busybox

and reuse our code.

Comments?
walter harms
2006-11-30 12:14:33 UTC
Permalink
Post by Bernhard Fischer
Post by Larry Brigman
Sorry, I sent this to the individual instead of the list.
Post by Jason Schoon
Post by Paul Fox
Post by Bernhard Fischer
Post by Denis Vlasenko
* New applets: hose/faucet? ssh[d]? :)
If you add ssh[d], then we could as well add gcc et al ;)
do we really think that busybox'ing dropbear would make it that
much smaller?
I'll chime in with a resounding "no". Not only do I think a significant
size benefit will be realized, I think we are then in a synchronization
nightmare.
Matt already has a nicely setup multi-call binary application that replaces
other currently larger implementations (such as opensshd). I think we
should let him continue to do that, not move it into Busybox.
Agree, of course.
Post by Larry Brigman
But if you don't use uclib it requires several libraries that busybox
does not just to get login
working. Just getting to use the busybox lib for user/password would
be a step in the right
direction.
We'll provide the possibility to make busybox a PIE in favour of the
older approach that the initial "libbusybox" aimed at, so folks can just
link against
$ ls -ln libbusybox.so*
lrwxrwxrwx 1 100 100 15 Nov 30 10:05 libbusybox.so -> libbusybox.so.1
lrwxrwxrwx 1 100 100 17 Nov 30 10:05 libbusybox.so.1 -> libbusybox.so.1.2
lrwxrwxrwx 1 100 100 19 Nov 30 10:05 libbusybox.so.1.2 -> libbusybox.so.1.2.3
lrwxrwxrwx 1 100 100 7 Nov 30 10:05 libbusybox.so.1.2.3 -> busybox
and reuse our code.
Comments?
LIBBUSYBOX is more or less a clever wrapper around the the libc. so far i understand
was the approach doomed because the interface was to volatile to be useful in other
project. In other words to make it useful we need a API freeze and a wrapper to
the then current libbb. This can be done but would require a maintainer for that API
stuff because the main target for busybox is not exactly to keep a stable API.

re,
wh
Bernhard Fischer
2006-11-30 12:22:17 UTC
Permalink
Post by walter harms
Post by Bernhard Fischer
Post by Larry Brigman
But if you don't use uclib it requires several libraries that busybox
does not just to get login
working. Just getting to use the busybox lib for user/password would
be a step in the right
direction.
We'll provide the possibility to make busybox a PIE in favour of the
older approach that the initial "libbusybox" aimed at, so folks can just
link against
$ ls -ln libbusybox.so*
lrwxrwxrwx 1 100 100 15 Nov 30 10:05 libbusybox.so -> libbusybox.so.1
lrwxrwxrwx 1 100 100 17 Nov 30 10:05 libbusybox.so.1 -> libbusybox.so.1.2
lrwxrwxrwx 1 100 100 19 Nov 30 10:05 libbusybox.so.1.2 -> libbusybox.so.1.2.3
lrwxrwxrwx 1 100 100 7 Nov 30 10:05 libbusybox.so.1.2.3 -> busybox
and reuse our code.
Comments?
LIBBUSYBOX is more or less a clever wrapper around the the libc. so far i understand
was the approach doomed because the interface was to volatile to be useful in other
project. In other words to make it useful we need a API freeze and a wrapper to
the then current libbb. This can be done but would require a maintainer for that API
stuff because the main target for busybox is not exactly to keep a stable API.
I, personally, wouldn't require a stable API. It's overkill. Or are
there volunteers? Even if there were, it'd impose complications and
maybe bloat upon busybox just for the sake of API compatibility, which
doesn't strike me as something we want.
If you have one program that want's to use functions from busybox to
make binary footprint smaller, then you can as well cope with eventual
small changes with it. If you don't think you can cope, Just don't do
it(tm). IMVHO of course.
Roberto A. Foglietta
2006-11-30 12:21:57 UTC
Permalink
Post by walter harms
LIBBUSYBOX is more or less a clever wrapper around the the libc. so far i understand
was the approach doomed because the interface was to volatile to be useful in other
project. In other words to make it useful we need a API freeze and a wrapper to
the then current libbb. This can be done but would require a maintainer for that API
stuff because the main target for busybox is not exactly to keep a stable API.
and API documentation too...
;-)

Cheers,
--
/roberto
Rob Landley
2006-11-30 19:04:33 UTC
Permalink
Post by walter harms
LIBBUSYBOX is more or less a clever wrapper around the the libc. so far i understand
was the approach doomed because the interface was to volatile to be useful in other
project.
The point of libbusybox was never to offer a stable library other projects
could use. The point was to do "make standalone" (what I eventually
implemented a bit of as scripts/individual) with less code duplication.

The API is _not_ stable (and committing to one would just bloat busybox), the
license is gpl (not lgpl), it's not documented, and it's a complete
misinterpretation to think that's what it was ever for in the first place.
Post by walter harms
In other words to make it useful we need a API freeze and a wrapper to
the then current libbb.
Bad idea, sheer bloat, etc.
Post by walter harms
This can be done but would require a maintainer for that API
stuff because the main target for busybox is not exactly to keep a stable API.
It would be _bad_ for busybox to try to maintain a stable API because if we
think of a better way, we do that, and cleanup all the fallout from the
change. And proposing that we _stop_ doing that misses the point of the
entire project.

Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
Bernhard Fischer
2006-11-30 12:22:17 UTC
Permalink
Post by walter harms
Post by Bernhard Fischer
Post by Larry Brigman
But if you don't use uclib it requires several libraries that busybox
does not just to get login
working. Just getting to use the busybox lib for user/password would
be a step in the right
direction.
We'll provide the possibility to make busybox a PIE in favour of the
older approach that the initial "libbusybox" aimed at, so folks can just
link against
$ ls -ln libbusybox.so*
lrwxrwxrwx 1 100 100 15 Nov 30 10:05 libbusybox.so -> libbusybox.so.1
lrwxrwxrwx 1 100 100 17 Nov 30 10:05 libbusybox.so.1 -> libbusybox.so.1.2
lrwxrwxrwx 1 100 100 19 Nov 30 10:05 libbusybox.so.1.2 -> libbusybox.so.1.2.3
lrwxrwxrwx 1 100 100 7 Nov 30 10:05 libbusybox.so.1.2.3 -> busybox
and reuse our code.
Comments?
LIBBUSYBOX is more or less a clever wrapper around the the libc. so far i understand
was the approach doomed because the interface was to volatile to be useful in other
project. In other words to make it useful we need a API freeze and a wrapper to
the then current libbb. This can be done but would require a maintainer for that API
stuff because the main target for busybox is not exactly to keep a stable API.
I, personally, wouldn't require a stable API. It's overkill. Or are
there volunteers? Even if there were, it'd impose complications and
maybe bloat upon busybox just for the sake of API compatibility, which
doesn't strike me as something we want.
If you have one program that want's to use functions from busybox to
make binary footprint smaller, then you can as well cope with eventual
small changes with it. If you don't think you can cope, Just don't do
it(tm). IMVHO of course.
Roberto A. Foglietta
2006-11-30 12:21:57 UTC
Permalink
Post by walter harms
LIBBUSYBOX is more or less a clever wrapper around the the libc. so far i understand
was the approach doomed because the interface was to volatile to be useful in other
project. In other words to make it useful we need a API freeze and a wrapper to
the then current libbb. This can be done but would require a maintainer for that API
stuff because the main target for busybox is not exactly to keep a stable API.
and API documentation too...
;-)

Cheers,
--
/roberto
Rob Landley
2006-11-30 19:04:33 UTC
Permalink
Post by walter harms
LIBBUSYBOX is more or less a clever wrapper around the the libc. so far i understand
was the approach doomed because the interface was to volatile to be useful in other
project.
The point of libbusybox was never to offer a stable library other projects
could use. The point was to do "make standalone" (what I eventually
implemented a bit of as scripts/individual) with less code duplication.

The API is _not_ stable (and committing to one would just bloat busybox), the
license is gpl (not lgpl), it's not documented, and it's a complete
misinterpretation to think that's what it was ever for in the first place.
Post by walter harms
In other words to make it useful we need a API freeze and a wrapper to
the then current libbb.
Bad idea, sheer bloat, etc.
Post by walter harms
This can be done but would require a maintainer for that API
stuff because the main target for busybox is not exactly to keep a stable API.
It would be _bad_ for busybox to try to maintain a stable API because if we
think of a better way, we do that, and cleanup all the fallout from the
change. And proposing that we _stop_ doing that misses the point of the
entire project.

Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
walter harms
2006-11-30 12:14:33 UTC
Permalink
Post by Bernhard Fischer
Post by Larry Brigman
Sorry, I sent this to the individual instead of the list.
Post by Jason Schoon
Post by Paul Fox
Post by Bernhard Fischer
Post by Denis Vlasenko
* New applets: hose/faucet? ssh[d]? :)
If you add ssh[d], then we could as well add gcc et al ;)
do we really think that busybox'ing dropbear would make it that
much smaller?
I'll chime in with a resounding "no". Not only do I think a significant
size benefit will be realized, I think we are then in a synchronization
nightmare.
Matt already has a nicely setup multi-call binary application that replaces
other currently larger implementations (such as opensshd). I think we
should let him continue to do that, not move it into Busybox.
Agree, of course.
Post by Larry Brigman
But if you don't use uclib it requires several libraries that busybox
does not just to get login
working. Just getting to use the busybox lib for user/password would
be a step in the right
direction.
We'll provide the possibility to make busybox a PIE in favour of the
older approach that the initial "libbusybox" aimed at, so folks can just
link against
$ ls -ln libbusybox.so*
lrwxrwxrwx 1 100 100 15 Nov 30 10:05 libbusybox.so -> libbusybox.so.1
lrwxrwxrwx 1 100 100 17 Nov 30 10:05 libbusybox.so.1 -> libbusybox.so.1.2
lrwxrwxrwx 1 100 100 19 Nov 30 10:05 libbusybox.so.1.2 -> libbusybox.so.1.2.3
lrwxrwxrwx 1 100 100 7 Nov 30 10:05 libbusybox.so.1.2.3 -> busybox
and reuse our code.
Comments?
LIBBUSYBOX is more or less a clever wrapper around the the libc. so far i understand
was the approach doomed because the interface was to volatile to be useful in other
project. In other words to make it useful we need a API freeze and a wrapper to
the then current libbb. This can be done but would require a maintainer for that API
stuff because the main target for busybox is not exactly to keep a stable API.

re,
wh
Bernhard Fischer
2006-11-30 09:05:55 UTC
Permalink
Post by Larry Brigman
Sorry, I sent this to the individual instead of the list.
Post by Jason Schoon
Post by Paul Fox
Post by Bernhard Fischer
Post by Denis Vlasenko
* New applets: hose/faucet? ssh[d]? :)
If you add ssh[d], then we could as well add gcc et al ;)
do we really think that busybox'ing dropbear would make it that
much smaller?
I'll chime in with a resounding "no". Not only do I think a significant
size benefit will be realized, I think we are then in a synchronization
nightmare.
Matt already has a nicely setup multi-call binary application that replaces
other currently larger implementations (such as opensshd). I think we
should let him continue to do that, not move it into Busybox.
Agree, of course.
Post by Larry Brigman
But if you don't use uclib it requires several libraries that busybox
does not just to get login
working. Just getting to use the busybox lib for user/password would
be a step in the right
direction.
We'll provide the possibility to make busybox a PIE in favour of the
older approach that the initial "libbusybox" aimed at, so folks can just
link against
$ ls -ln libbusybox.so*
lrwxrwxrwx 1 100 100 15 Nov 30 10:05 libbusybox.so -> libbusybox.so.1
lrwxrwxrwx 1 100 100 17 Nov 30 10:05 libbusybox.so.1 -> libbusybox.so.1.2
lrwxrwxrwx 1 100 100 19 Nov 30 10:05 libbusybox.so.1.2 -> libbusybox.so.1.2.3
lrwxrwxrwx 1 100 100 7 Nov 30 10:05 libbusybox.so.1.2.3 -> busybox

and reuse our code.

Comments?
Larry Brigman
2006-11-30 05:30:15 UTC
Permalink
Sorry, I sent this to the individual instead of the list.
Post by Jason Schoon
Post by Paul Fox
Post by Bernhard Fischer
Post by Denis Vlasenko
* New applets: hose/faucet? ssh[d]? :)
If you add ssh[d], then we could as well add gcc et al ;)
do we really think that busybox'ing dropbear would make it that
much smaller?
I'll chime in with a resounding "no". Not only do I think a significant
size benefit will be realized, I think we are then in a synchronization
nightmare.
Matt already has a nicely setup multi-call binary application that replaces
other currently larger implementations (such as opensshd). I think we
should let him continue to do that, not move it into Busybox.
But if you don't use uclib it requires several libraries that busybox
does not just to get login
working. Just getting to use the busybox lib for user/password would
be a step in the right
direction.

I guess that is really an issue for dropbear not busybox and projects
that need ssh(d)
Jason Schoon
2006-11-30 00:47:48 UTC
Permalink
Post by Paul Fox
Post by Bernhard Fischer
Post by Denis Vlasenko
* New applets: hose/faucet? ssh[d]? :)
If you add ssh[d], then we could as well add gcc et al ;)
do we really think that busybox'ing dropbear would make it that
much smaller?
I'll chime in with a resounding "no". Not only do I think a significant
size benefit will be realized, I think we are then in a synchronization
nightmare.

Matt already has a nicely setup multi-call binary application that replaces
other currently larger implementations (such as opensshd). I think we
should let him continue to do that, not move it into Busybox.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20061129/d5daa47e/attachment.htm
Roberto A. Foglietta
2006-11-30 12:20:36 UTC
Permalink
Post by Denis Vlasenko
* more fishing in bug database
the bug n.615 still open and I have updated patch to 1.2.2.1 and today
snapshot (in attachment)
http://bugs.busybox.net/view.php?ida5

the bug n.980 still open and I have updated and correct patch for
1.2.2.1 and today snapshot (in attachment)
http://bugs.busybox.net/view.php?id?0

the bug n.347 is not anymore open in 1.2.2.1 you please close it
http://bugs.busybox.net/view.php?id47

sorry but I have not SVN access, so I have to use daily snapshots.
Post by Denis Vlasenko
* New applets: hose/faucet? ssh[d]? :)
Timeout applets still pending but Rob suggested I would adapt it much
more to busybox in order to reduce size and increase integration.

http://bugs.busybox.net/view.php?idh0





Finally I suggests

for i in conf.c mconf.c gconf.c; do
sed -e "s/kernel configuration/busybox configuration/g"
scripts/kconfig/$i >$i.new && mv $i.new $i
done


Cheers,
--
/roberto
--
/roberto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox-20061130-ifconfig_3.patch.bz2
Type: application/x-bzip2
Size: 1389 bytes
Desc: not available
Url : http://busybox.net/lists/busybox/attachments/20061130/005f9b8f/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox-20061130_sed.patch.bz2
Type: application/x-bzip2
Size: 1300 bytes
Desc: not available
Url : http://busybox.net/lists/busybox/attachments/20061130/005f9b8f/attachment-0001.bin
Rob Landley
2006-11-30 19:10:07 UTC
Permalink
Post by Roberto A. Foglietta
sorry but I have not SVN access, so I have to use daily snapshots.
Everybody has anonymous svn access. You can check stuff out any time you like
without any credentials, you just can't check anything _in_ without an ssh
account.

Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
Roberto A. Foglietta
2006-12-01 08:11:37 UTC
Permalink
Post by Rob Landley
Post by Roberto A. Foglietta
sorry but I have not SVN access, so I have to use daily snapshots.
Everybody has anonymous svn access. You can check stuff out any time you like
without any credentials, you just can't check anything _in_ without an ssh
account.
The company firewall blocks every connections execpt throught port 80

Cheers,
--
/roberto
Rob Landley
2006-12-01 18:41:19 UTC
Permalink
Post by Roberto A. Foglietta
Post by Rob Landley
Post by Roberto A. Foglietta
sorry but I have not SVN access, so I have to use daily snapshots.
Everybody has anonymous svn access. You can check stuff out any time you like
without any credentials, you just can't check anything _in_ without an ssh
account.
The company firewall blocks every connections execpt throught port 80
I know mercurial can be accessed entirely through http (hg co
static-http://blah/blah/blah) but when I just downloaded tailor and tried to
convert the svn repository to hg to throw a copy in the ~landley directory on
busybox, it died because busybox.net's version of svn is too old (doesn't
support the --limit command to svn log).

Sorry about your company.

Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
Rob Landley
2006-12-01 18:41:19 UTC
Permalink
Post by Roberto A. Foglietta
Post by Rob Landley
Post by Roberto A. Foglietta
sorry but I have not SVN access, so I have to use daily snapshots.
Everybody has anonymous svn access. You can check stuff out any time you like
without any credentials, you just can't check anything _in_ without an ssh
account.
The company firewall blocks every connections execpt throught port 80
I know mercurial can be accessed entirely through http (hg co
static-http://blah/blah/blah) but when I just downloaded tailor and tried to
convert the svn repository to hg to throw a copy in the ~landley directory on
busybox, it died because busybox.net's version of svn is too old (doesn't
support the --limit command to svn log).

Sorry about your company.

Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
Roberto A. Foglietta
2006-12-01 08:11:37 UTC
Permalink
Post by Rob Landley
Post by Roberto A. Foglietta
sorry but I have not SVN access, so I have to use daily snapshots.
Everybody has anonymous svn access. You can check stuff out any time you like
without any credentials, you just can't check anything _in_ without an ssh
account.
The company firewall blocks every connections execpt throught port 80

Cheers,
--
/roberto
Denis Vlasenko
2006-11-30 23:03:56 UTC
Permalink
Post by Roberto A. Foglietta
Post by Denis Vlasenko
* more fishing in bug database
the bug n.615 still open and I have updated patch to 1.2.2.1 and today
snapshot (in attachment)
http://bugs.busybox.net/view.php?id=615
- if (temp) {
- *no_newline = !(len && temp[len-1] == '\n');
+ if (temp && len > 0) {
+ endzero += !temp[len-1];
+ *no_newline = !(temp[len-1]=='\n');
if (!*no_newline) temp[len-1] = 0;
break;

old code: if len == 0: 'break' is taken
new code: if len == 0: 'break' is not taken
is it ok?
Post by Roberto A. Foglietta
the bug n.347 is not anymore open in 1.2.2.1 you please close it
http://bugs.busybox.net/view.php?id=347
bug comment says:
In my opinion this bug was fixed in 1.2.2.1 at least
[root at GEDX0327 busybox-1.2.2.1]# _install/bin/busybox tar tvjf pippo.tar.bz2
tar: Decompression failed
tar: Short header

It means that tar detects uncompressor output which isn't a multiple
of tar block size. But it can so happen that corrupted archive
will end so that uncompressed output wil end at block boundary
(1/512 chance).
Post by Roberto A. Foglietta
Post by Denis Vlasenko
* New applets: hose/faucet? ssh[d]? :)
Timeout applets still pending but Rob suggested I would adapt it much
more to busybox in order to reduce size and increase integration.
http://bugs.busybox.net/view.php?id=680
Will take a look when I will comb through bug database.
Post by Roberto A. Foglietta
Finally I suggests
for i in conf.c mconf.c gconf.c; do
sed -e "s/kernel configuration/busybox configuration/g"
scripts/kconfig/$i >$i.new && mv $i.new $i
done
done, thanks!
--
vda
Roberto A. Foglietta
2006-12-02 19:50:34 UTC
Permalink
[cut]
Post by Denis Vlasenko
Post by Roberto A. Foglietta
the bug n.347 is not anymore open in 1.2.2.1 you please close it
http://bugs.busybox.net/view.php?id=347
In my opinion this bug was fixed in 1.2.2.1 at least
[root at GEDX0327 busybox-1.2.2.1]# _install/bin/busybox tar tvjf pippo.tar.bz2
tar: Decompression failed
tar: Short header
It means that tar detects uncompressor output which isn't a multiple
of tar block size. But it can so happen that corrupted archive
will end so that uncompressed output wil end at block boundary
(1/512 chance).
I hope this solve your dubts (and I hope to have understood your msg):

[roberto at nbraf busybox]$ dd if=/dev/zero bs=512 count=1 >pippo.tar
entrati 1+0 record
usciti 1+0 record
[roberto at nbraf busybox]$ gzip pippo.tar
[roberto at nbraf busybox]$ ./busybox tar xvzf pippo.tar.gz
tar: short read
[roberto at nbraf busybox]$ echo $?
1

Cheers,
Denis Vlasenko
2006-12-02 20:24:56 UTC
Permalink
Post by Roberto A. Foglietta
[roberto at nbraf busybox]$ dd if=/dev/zero bs=512 count=1 >pippo.tar
entrati 1+0 record
usciti 1+0 record
[roberto at nbraf busybox]$ gzip pippo.tar
[roberto at nbraf busybox]$ ./busybox tar xvzf pippo.tar.gz
tar: short read
You have a valid compressed file (so gzip returns 0), which
isn't a valid tar file. Our tar handles this correctly.

What is handled incorrectly is when gzip returns !0,
but tar ignores that and happily eats truncated input.
If it will so happen that truncated input is a valid
tar file (just a few thousand tarred files are cut off
at the tail), tar will terminate with exit code 0.
Which is a lie. Files were not extracted without errors.
--
vda
Denis Vlasenko
2006-12-02 20:24:56 UTC
Permalink
Post by Roberto A. Foglietta
[roberto at nbraf busybox]$ dd if=/dev/zero bs=512 count=1 >pippo.tar
entrati 1+0 record
usciti 1+0 record
[roberto at nbraf busybox]$ gzip pippo.tar
[roberto at nbraf busybox]$ ./busybox tar xvzf pippo.tar.gz
tar: short read
You have a valid compressed file (so gzip returns 0), which
isn't a valid tar file. Our tar handles this correctly.

What is handled incorrectly is when gzip returns !0,
but tar ignores that and happily eats truncated input.
If it will so happen that truncated input is a valid
tar file (just a few thousand tarred files are cut off
at the tail), tar will terminate with exit code 0.
Which is a lie. Files were not extracted without errors.
--
vda
Roberto A. Foglietta
2006-12-02 21:48:39 UTC
Permalink
Post by Denis Vlasenko
Post by Roberto A. Foglietta
Post by Denis Vlasenko
* more fishing in bug database
the bug n.615 still open and I have updated patch to 1.2.2.1 and today
snapshot (in attachment)
http://bugs.busybox.net/view.php?id=615
- if (temp) {
- *no_newline = !(len && temp[len-1] == '\n');
+ if (temp && len > 0) {
+ endzero += !temp[len-1];
+ *no_newline = !(temp[len-1]=='\n');
if (!*no_newline) temp[len-1] = 0;
break;
old code: if len == 0: 'break' is taken
new code: if len == 0: 'break' is not taken
is it ok?
I tested your patch but it seems it does not work at least against
with 2006-12-01

Cheers,
--
/roberto
Roberto A. Foglietta
2006-12-02 21:53:24 UTC
Permalink
Post by Roberto A. Foglietta
Post by Denis Vlasenko
Post by Roberto A. Foglietta
Post by Denis Vlasenko
* more fishing in bug database
the bug n.615 still open and I have updated patch to 1.2.2.1 and today
snapshot (in attachment)
http://bugs.busybox.net/view.php?id=615
- if (temp) {
- *no_newline = !(len && temp[len-1] == '\n');
+ if (temp && len > 0) {
+ endzero += !temp[len-1];
+ *no_newline = !(temp[len-1]=='\n');
if (!*no_newline) temp[len-1] = 0;
break;
old code: if len == 0: 'break' is taken
new code: if len == 0: 'break' is not taken
is it ok?
I tested your patch but it seems it does not work at least against
with 2006-12-01
[roberto at nbraf busybox]$ tar xvjf busybox-20061201.tar.bz2
[roberto at nbraf busybox]$ cd busybox
[roberto at nbraf busybox]$ patch -p1 < ../../sed_rev16754.patch
[roberto at nbraf busybox]$ echo -n thingy >z1
[roberto at nbraf busybox]$ echo -n again >z2
[roberto at nbraf busybox]$ ./busybox sed "s/i/z/" z1 z2 | hexdump -vC
00000000 74 68 7a 6e 67 79 61 67 61 7a 6e |thzngyagazn|
0000000b
[roberto at nbraf busybox]$ sed "s/i/z/" z1 z2 | hexdump -vC
00000000 74 68 7a 6e 67 79 0a 61 67 61 7a 6e |thzngy.agazn|
0000000c

Cheers,
--
/roberto
Rob Landley
2006-12-02 22:07:49 UTC
Permalink
Post by Roberto A. Foglietta
[roberto at nbraf busybox]$ tar xvjf busybox-20061201.tar.bz2
[roberto at nbraf busybox]$ cd busybox
[roberto at nbraf busybox]$ patch -p1 < ../../sed_rev16754.patch
[roberto at nbraf busybox]$ echo -n thingy >z1
[roberto at nbraf busybox]$ echo -n again >z2
[roberto at nbraf busybox]$ ./busybox sed "s/i/z/" z1 z2 | hexdump -vC
00000000 74 68 7a 6e 67 79 61 67 61 7a 6e |thzngyagazn|
0000000b
[roberto at nbraf busybox]$ sed "s/i/z/" z1 z2 | hexdump -vC
00000000 74 68 7a 6e 67 79 0a 61 67 61 7a 6e |thzngy.agazn|
0000000c
svn 16070 is the last version of this I made a code change to, and that worked
just fine.

Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
Denis Vlasenko
2006-12-02 22:27:35 UTC
Permalink
Post by Rob Landley
Post by Roberto A. Foglietta
[roberto at nbraf busybox]$ tar xvjf busybox-20061201.tar.bz2
[roberto at nbraf busybox]$ cd busybox
[roberto at nbraf busybox]$ patch -p1 < ../../sed_rev16754.patch
[roberto at nbraf busybox]$ echo -n thingy >z1
[roberto at nbraf busybox]$ echo -n again >z2
[roberto at nbraf busybox]$ ./busybox sed "s/i/z/" z1 z2 | hexdump -vC
00000000 74 68 7a 6e 67 79 61 67 61 7a 6e |thzngyagazn|
0000000b
[roberto at nbraf busybox]$ sed "s/i/z/" z1 z2 | hexdump -vC
00000000 74 68 7a 6e 67 79 0a 61 67 61 7a 6e |thzngy.agazn|
0000000c
svn 16070 is the last version of this I made a code change to, and that worked
just fine.
sed NUL support was added to svn in two patches. Second one
fixes this issue. Already in svn. There are still unfixed
problems, but there are no regressions.
--
vda
Denis Vlasenko
2006-12-02 22:27:35 UTC
Permalink
Post by Rob Landley
Post by Roberto A. Foglietta
[roberto at nbraf busybox]$ tar xvjf busybox-20061201.tar.bz2
[roberto at nbraf busybox]$ cd busybox
[roberto at nbraf busybox]$ patch -p1 < ../../sed_rev16754.patch
[roberto at nbraf busybox]$ echo -n thingy >z1
[roberto at nbraf busybox]$ echo -n again >z2
[roberto at nbraf busybox]$ ./busybox sed "s/i/z/" z1 z2 | hexdump -vC
00000000 74 68 7a 6e 67 79 61 67 61 7a 6e |thzngyagazn|
0000000b
[roberto at nbraf busybox]$ sed "s/i/z/" z1 z2 | hexdump -vC
00000000 74 68 7a 6e 67 79 0a 61 67 61 7a 6e |thzngy.agazn|
0000000c
svn 16070 is the last version of this I made a code change to, and that worked
just fine.
sed NUL support was added to svn in two patches. Second one
fixes this issue. Already in svn. There are still unfixed
problems, but there are no regressions.
--
vda
Rob Landley
2006-12-02 22:07:49 UTC
Permalink
Post by Roberto A. Foglietta
[roberto at nbraf busybox]$ tar xvjf busybox-20061201.tar.bz2
[roberto at nbraf busybox]$ cd busybox
[roberto at nbraf busybox]$ patch -p1 < ../../sed_rev16754.patch
[roberto at nbraf busybox]$ echo -n thingy >z1
[roberto at nbraf busybox]$ echo -n again >z2
[roberto at nbraf busybox]$ ./busybox sed "s/i/z/" z1 z2 | hexdump -vC
00000000 74 68 7a 6e 67 79 61 67 61 7a 6e |thzngyagazn|
0000000b
[roberto at nbraf busybox]$ sed "s/i/z/" z1 z2 | hexdump -vC
00000000 74 68 7a 6e 67 79 0a 61 67 61 7a 6e |thzngy.agazn|
0000000c
svn 16070 is the last version of this I made a code change to, and that worked
just fine.

Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
Denis Vlasenko
2006-12-02 22:05:14 UTC
Permalink
Post by Roberto A. Foglietta
Post by Denis Vlasenko
Post by Roberto A. Foglietta
Post by Denis Vlasenko
* more fishing in bug database
the bug n.615 still open and I have updated patch to 1.2.2.1 and today
snapshot (in attachment)
http://bugs.busybox.net/view.php?id=615
- if (temp) {
- *no_newline = !(len && temp[len-1] == '\n');
+ if (temp && len > 0) {
+ endzero += !temp[len-1];
+ *no_newline = !(temp[len-1]=='\n');
if (!*no_newline) temp[len-1] = 0;
break;
old code: if len == 0: 'break' is taken
new code: if len == 0: 'break' is not taken
is it ok?
I tested your patch but it seems it does not work at least against
with 2006-12-01
I sent you new sed.c which has that fixed.

Roberto, I was looking into your patch busybox-20061130_sed.patch.
I have some problems with it.

Try to limit usage of static data.

Try to make code easier to understand. sed code is convoluted enough
already, have heart for poor souls (probably you, a year from now)
which will come later and will try to figure out how it works.
It's best to try to make it so that C code itself is easy to read,
but if you have clever but obscure trick, document how it works
in comments. Reread your comments when you generate patch
for submission. I frequently find my own comments too cryptic
and edit them again.

About that particular patch: "static char prisubst" variable name
is not descriptive. Is it used to skip subst commands (if I read
the code right)? Why it is called prisubst and not skip_next_subst?
--
vda
Rob Landley
2006-12-02 22:36:55 UTC
Permalink
Post by Denis Vlasenko
I sent you new sed.c which has that fixed.
I'm not going to test that statement. :)
Post by Denis Vlasenko
Roberto, I was looking into your patch busybox-20061130_sed.patch.
I have some problems with it.
Try to limit usage of static data.
Try to make code easier to understand. sed code is convoluted enough
already, have heart for poor souls (probably you, a year from now)
which will come later and will try to figure out how it works.
When I started with busybox, the first thing I did was upgrade the sed that
was there to make it actually _work_ with the ./configure stages of binutils
and gcc. (This took something like a month.)

I never actually went back and redid the structure I'd inherited (my goal was
minimally intrustive changes), but for toybox I'm writing a new one.
Post by Denis Vlasenko
It's best to try to make it so that C code itself is easy to read,
but if you have clever but obscure trick, document how it works
in comments.
One of my early patches to the thing added an overview, because I wanted to
document what had been hard for me to understand by reading the thing:
http://busybox.net/cgi-bin/viewcvs.cgi/trunk/busybox/editors/sed.c?rev=7583&r1=7560&r2=7583

Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
Denis Vlasenko
2006-12-03 09:30:20 UTC
Permalink
Post by Rob Landley
Post by Denis Vlasenko
Roberto, I was looking into your patch busybox-20061130_sed.patch.
I have some problems with it.
Try to limit usage of static data.
Try to make code easier to understand. sed code is convoluted enough
already, have heart for poor souls (probably you, a year from now)
which will come later and will try to figure out how it works.
When I started with busybox, the first thing I did was upgrade the sed that
was there to make it actually _work_ with the ./configure stages of binutils
and gcc. (This took something like a month.)
I never actually went back and redid the structure I'd inherited (my goal was
minimally intrustive changes), but for toybox I'm writing a new one.
I'm usually not rewriting stuff from scratch (maybe because I am lazy).

Will be happy to see/test/use your new code - it's usually both
very good and much smaller. Thank you for your work.
--
vda
Rob Landley
2006-12-03 20:56:04 UTC
Permalink
Post by Denis Vlasenko
Post by Rob Landley
I never actually went back and redid the structure I'd inherited (my goal was
minimally intrustive changes), but for toybox I'm writing a new one.
I'm usually not rewriting stuff from scratch (maybe because I am lazy).
I find writing code easier than reading code. This is a trap I try not to
fall into, since often the existing code has been debugged for years and now
handles all sorts of strange corner cases that are totally undocumented
anywhere except in the implementation.

Joel Spolsky wrote a couple articles about this:
http://www.joelonsoftware.com/articles/fog0000000069.html
http://www.joelonsoftware.com/articles/fog0000000027.html

Doing a minimally invasive set of changes to sed and preserving as much of the
existing structure as possible was a learning exercise on my part (and also a
response to the fact that I didn't have a _clue_ how sed worked, and thus if
I broke stuff outside of the test cases I was trying to fix, I'd have no way
of knowing).

That said, once you understand the problem you generally _can_ write a much
smaller version. (Joel's deep in the proprietary software tradition, and
doesn't fully understand either open source or hobbyist programming.) But
you can't skip the "understanding the problem" step. (For example, with
command shells I've been studying on and off for a year, and consider myself
about halfway there.)
Post by Denis Vlasenko
Will be happy to see/test/use your new code - it's usually both
very good and much smaller. Thank you for your work.
You're welcome to it (it's GPLv2), but I don't know how much use it'll be.
I'm designing toybox around very different principles.

For example, the "union of global structs" thing I mentioned idly here months
ago is integral to how toybox works: it can't parse command line options
without it. There's a global "struct toys toys;" that contains data supplied
to all commands, and a "toy.command" (ala toy.df or toy.mdev) that's the
union with data for this particular command.

The command line parsing is integrated into the overall toybox infrastructure,
so each command's arguments are parsed from toybox_main(), before the
command_main() gets run. The getopt-like string telling get_optlfags() how
to parse the arguments for this command is one of the arguments to the
NEWTOY() macro in toys/toylist.h, and the data that would have gone into
varargs in busybox instead goes into the first fiew fields of the
appropriate "toy" union.

For example, with the "df" command has the following in toys/toylist.h:

struct df_data {
struct arg_list *fstype;
long units;
};

USE_DF(NEWTOY(df, "Pkt*a", TOYFLAG_USR|TOYFLAG_SBIN))

Because of that, when df_main() gets run, toys.optflags is already filled out
based on the flags seen (so "a" sets flag 1, "t" sets flag 2, "k" sets flag
4, and "p" sets flag 8. This order makes more sense to me because it's the
same order boolean digits go in: values are supposed to increase as you go to
the left.)

The * after t means this takes an argument and it can occur more than once so
it should be a list, and since that's the first entry returning an argument
it stores its result in toy.df.fstype. Note that toy.df.fstype isn't filled
out by option parsing, so it's initialized to 0.

Remaining arguments are copied into toys.optargs[], and although that array of
char * is malloced, the strings it points to aren't (they're the raw
environment data) and shouldn't be freed. (toys.optargs[] itself is freed by
the return to toybox_main().) You can still access the raw unmodified
argument list through toys.argv[], they're not permuted and parsing them
shouldn't change what appears in "ps".

That's just one example of the infrastructure being different. I haven't used
any code from BusyBox yet, although I'm starting to port over some of the
applets I wrote. (Which includes going through the svn history to make sure
I know where it all came from. Currently I've just taken stuff I'm the only
contributor to.)

Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
Rob Landley
2006-12-03 20:56:04 UTC
Permalink
Post by Denis Vlasenko
Post by Rob Landley
I never actually went back and redid the structure I'd inherited (my goal was
minimally intrustive changes), but for toybox I'm writing a new one.
I'm usually not rewriting stuff from scratch (maybe because I am lazy).
I find writing code easier than reading code. This is a trap I try not to
fall into, since often the existing code has been debugged for years and now
handles all sorts of strange corner cases that are totally undocumented
anywhere except in the implementation.

Joel Spolsky wrote a couple articles about this:
http://www.joelonsoftware.com/articles/fog0000000069.html
http://www.joelonsoftware.com/articles/fog0000000027.html

Doing a minimally invasive set of changes to sed and preserving as much of the
existing structure as possible was a learning exercise on my part (and also a
response to the fact that I didn't have a _clue_ how sed worked, and thus if
I broke stuff outside of the test cases I was trying to fix, I'd have no way
of knowing).

That said, once you understand the problem you generally _can_ write a much
smaller version. (Joel's deep in the proprietary software tradition, and
doesn't fully understand either open source or hobbyist programming.) But
you can't skip the "understanding the problem" step. (For example, with
command shells I've been studying on and off for a year, and consider myself
about halfway there.)
Post by Denis Vlasenko
Will be happy to see/test/use your new code - it's usually both
very good and much smaller. Thank you for your work.
You're welcome to it (it's GPLv2), but I don't know how much use it'll be.
I'm designing toybox around very different principles.

For example, the "union of global structs" thing I mentioned idly here months
ago is integral to how toybox works: it can't parse command line options
without it. There's a global "struct toys toys;" that contains data supplied
to all commands, and a "toy.command" (ala toy.df or toy.mdev) that's the
union with data for this particular command.

The command line parsing is integrated into the overall toybox infrastructure,
so each command's arguments are parsed from toybox_main(), before the
command_main() gets run. The getopt-like string telling get_optlfags() how
to parse the arguments for this command is one of the arguments to the
NEWTOY() macro in toys/toylist.h, and the data that would have gone into
varargs in busybox instead goes into the first fiew fields of the
appropriate "toy" union.

For example, with the "df" command has the following in toys/toylist.h:

struct df_data {
struct arg_list *fstype;
long units;
};

USE_DF(NEWTOY(df, "Pkt*a", TOYFLAG_USR|TOYFLAG_SBIN))

Because of that, when df_main() gets run, toys.optflags is already filled out
based on the flags seen (so "a" sets flag 1, "t" sets flag 2, "k" sets flag
4, and "p" sets flag 8. This order makes more sense to me because it's the
same order boolean digits go in: values are supposed to increase as you go to
the left.)

The * after t means this takes an argument and it can occur more than once so
it should be a list, and since that's the first entry returning an argument
it stores its result in toy.df.fstype. Note that toy.df.fstype isn't filled
out by option parsing, so it's initialized to 0.

Remaining arguments are copied into toys.optargs[], and although that array of
char * is malloced, the strings it points to aren't (they're the raw
environment data) and shouldn't be freed. (toys.optargs[] itself is freed by
the return to toybox_main().) You can still access the raw unmodified
argument list through toys.argv[], they're not permuted and parsing them
shouldn't change what appears in "ps".

That's just one example of the infrastructure being different. I haven't used
any code from BusyBox yet, although I'm starting to port over some of the
applets I wrote. (Which includes going through the svn history to make sure
I know where it all came from. Currently I've just taken stuff I'm the only
contributor to.)

Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
Denis Vlasenko
2006-12-03 09:30:20 UTC
Permalink
Post by Rob Landley
Post by Denis Vlasenko
Roberto, I was looking into your patch busybox-20061130_sed.patch.
I have some problems with it.
Try to limit usage of static data.
Try to make code easier to understand. sed code is convoluted enough
already, have heart for poor souls (probably you, a year from now)
which will come later and will try to figure out how it works.
When I started with busybox, the first thing I did was upgrade the sed that
was there to make it actually _work_ with the ./configure stages of binutils
and gcc. (This took something like a month.)
I never actually went back and redid the structure I'd inherited (my goal was
minimally intrustive changes), but for toybox I'm writing a new one.
I'm usually not rewriting stuff from scratch (maybe because I am lazy).

Will be happy to see/test/use your new code - it's usually both
very good and much smaller. Thank you for your work.
--
vda
Roberto A. Foglietta
2006-12-03 10:12:00 UTC
Permalink
Post by Denis Vlasenko
Roberto, I was looking into your patch busybox-20061130_sed.patch.
I have some problems with it.
Try to limit usage of static data.
ok, prisubst could be passed as an argument pointer as no_newline.
I just used static thinking: I will found a solution and after I will
make it more beauty after
Post by Denis Vlasenko
Try to make code easier to understand. sed code is convoluted enough
already, have heart for poor souls (probably you, a year from now)
which will come later and will try to figure out how it works.
ok, you are right but sed is difficult itself I did not added much
more complexity.
Post by Denis Vlasenko
About that particular patch: "static char prisubst" variable name
is not descriptive. Is it used to skip subst commands (if I read
the code right)? Why it is called prisubst and not skip_next_subst?
yes you are right... the name was PRIor SUBSTitution, not so bad
thinking I would have changed it after I made it works in something
like no_newline

4th: I have not left for tomorow what I would have been done for today!
;-)

Cheers,
--
/roberto
Rob Landley
2006-12-02 22:36:55 UTC
Permalink
Post by Denis Vlasenko
I sent you new sed.c which has that fixed.
I'm not going to test that statement. :)
Post by Denis Vlasenko
Roberto, I was looking into your patch busybox-20061130_sed.patch.
I have some problems with it.
Try to limit usage of static data.
Try to make code easier to understand. sed code is convoluted enough
already, have heart for poor souls (probably you, a year from now)
which will come later and will try to figure out how it works.
When I started with busybox, the first thing I did was upgrade the sed that
was there to make it actually _work_ with the ./configure stages of binutils
and gcc. (This took something like a month.)

I never actually went back and redid the structure I'd inherited (my goal was
minimally intrustive changes), but for toybox I'm writing a new one.
Post by Denis Vlasenko
It's best to try to make it so that C code itself is easy to read,
but if you have clever but obscure trick, document how it works
in comments.
One of my early patches to the thing added an overview, because I wanted to
document what had been hard for me to understand by reading the thing:
http://busybox.net/cgi-bin/viewcvs.cgi/trunk/busybox/editors/sed.c?rev=7583&r1=7560&r2=7583

Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
Roberto A. Foglietta
2006-12-03 10:12:00 UTC
Permalink
Post by Denis Vlasenko
Roberto, I was looking into your patch busybox-20061130_sed.patch.
I have some problems with it.
Try to limit usage of static data.
ok, prisubst could be passed as an argument pointer as no_newline.
I just used static thinking: I will found a solution and after I will
make it more beauty after
Post by Denis Vlasenko
Try to make code easier to understand. sed code is convoluted enough
already, have heart for poor souls (probably you, a year from now)
which will come later and will try to figure out how it works.
ok, you are right but sed is difficult itself I did not added much
more complexity.
Post by Denis Vlasenko
About that particular patch: "static char prisubst" variable name
is not descriptive. Is it used to skip subst commands (if I read
the code right)? Why it is called prisubst and not skip_next_subst?
yes you are right... the name was PRIor SUBSTitution, not so bad
thinking I would have changed it after I made it works in something
like no_newline

4th: I have not left for tomorow what I would have been done for today!
;-)

Cheers,
--
/roberto
Roberto A. Foglietta
2006-12-02 21:53:24 UTC
Permalink
Post by Roberto A. Foglietta
Post by Denis Vlasenko
Post by Roberto A. Foglietta
Post by Denis Vlasenko
* more fishing in bug database
the bug n.615 still open and I have updated patch to 1.2.2.1 and today
snapshot (in attachment)
http://bugs.busybox.net/view.php?id=615
- if (temp) {
- *no_newline = !(len && temp[len-1] == '\n');
+ if (temp && len > 0) {
+ endzero += !temp[len-1];
+ *no_newline = !(temp[len-1]=='\n');
if (!*no_newline) temp[len-1] = 0;
break;
old code: if len == 0: 'break' is taken
new code: if len == 0: 'break' is not taken
is it ok?
I tested your patch but it seems it does not work at least against
with 2006-12-01
[roberto at nbraf busybox]$ tar xvjf busybox-20061201.tar.bz2
[roberto at nbraf busybox]$ cd busybox
[roberto at nbraf busybox]$ patch -p1 < ../../sed_rev16754.patch
[roberto at nbraf busybox]$ echo -n thingy >z1
[roberto at nbraf busybox]$ echo -n again >z2
[roberto at nbraf busybox]$ ./busybox sed "s/i/z/" z1 z2 | hexdump -vC
00000000 74 68 7a 6e 67 79 61 67 61 7a 6e |thzngyagazn|
0000000b
[roberto at nbraf busybox]$ sed "s/i/z/" z1 z2 | hexdump -vC
00000000 74 68 7a 6e 67 79 0a 61 67 61 7a 6e |thzngy.agazn|
0000000c

Cheers,
--
/roberto
Denis Vlasenko
2006-12-02 22:05:14 UTC
Permalink
Post by Roberto A. Foglietta
Post by Denis Vlasenko
Post by Roberto A. Foglietta
Post by Denis Vlasenko
* more fishing in bug database
the bug n.615 still open and I have updated patch to 1.2.2.1 and today
snapshot (in attachment)
http://bugs.busybox.net/view.php?id=615
- if (temp) {
- *no_newline = !(len && temp[len-1] == '\n');
+ if (temp && len > 0) {
+ endzero += !temp[len-1];
+ *no_newline = !(temp[len-1]=='\n');
if (!*no_newline) temp[len-1] = 0;
break;
old code: if len == 0: 'break' is taken
new code: if len == 0: 'break' is not taken
is it ok?
I tested your patch but it seems it does not work at least against
with 2006-12-01
I sent you new sed.c which has that fixed.

Roberto, I was looking into your patch busybox-20061130_sed.patch.
I have some problems with it.

Try to limit usage of static data.

Try to make code easier to understand. sed code is convoluted enough
already, have heart for poor souls (probably you, a year from now)
which will come later and will try to figure out how it works.
It's best to try to make it so that C code itself is easy to read,
but if you have clever but obscure trick, document how it works
in comments. Reread your comments when you generate patch
for submission. I frequently find my own comments too cryptic
and edit them again.

About that particular patch: "static char prisubst" variable name
is not descriptive. Is it used to skip subst commands (if I read
the code right)? Why it is called prisubst and not skip_next_subst?
--
vda
Roberto A. Foglietta
2006-12-02 19:50:34 UTC
Permalink
[cut]
Post by Denis Vlasenko
Post by Roberto A. Foglietta
the bug n.347 is not anymore open in 1.2.2.1 you please close it
http://bugs.busybox.net/view.php?id=347
In my opinion this bug was fixed in 1.2.2.1 at least
[root at GEDX0327 busybox-1.2.2.1]# _install/bin/busybox tar tvjf pippo.tar.bz2
tar: Decompression failed
tar: Short header
It means that tar detects uncompressor output which isn't a multiple
of tar block size. But it can so happen that corrupted archive
will end so that uncompressed output wil end at block boundary
(1/512 chance).
I hope this solve your dubts (and I hope to have understood your msg):

[roberto at nbraf busybox]$ dd if=/dev/zero bs=512 count=1 >pippo.tar
entrati 1+0 record
usciti 1+0 record
[roberto at nbraf busybox]$ gzip pippo.tar
[roberto at nbraf busybox]$ ./busybox tar xvzf pippo.tar.gz
tar: short read
[roberto at nbraf busybox]$ echo $?
1

Cheers,
Roberto A. Foglietta
2006-12-02 21:48:39 UTC
Permalink
Post by Denis Vlasenko
Post by Roberto A. Foglietta
Post by Denis Vlasenko
* more fishing in bug database
the bug n.615 still open and I have updated patch to 1.2.2.1 and today
snapshot (in attachment)
http://bugs.busybox.net/view.php?id=615
- if (temp) {
- *no_newline = !(len && temp[len-1] == '\n');
+ if (temp && len > 0) {
+ endzero += !temp[len-1];
+ *no_newline = !(temp[len-1]=='\n');
if (!*no_newline) temp[len-1] = 0;
break;
old code: if len == 0: 'break' is taken
new code: if len == 0: 'break' is not taken
is it ok?
I tested your patch but it seems it does not work at least against
with 2006-12-01

Cheers,
--
/roberto
Rob Landley
2006-11-30 19:10:07 UTC
Permalink
Post by Roberto A. Foglietta
sorry but I have not SVN access, so I have to use daily snapshots.
Everybody has anonymous svn access. You can check stuff out any time you like
without any credentials, you just can't check anything _in_ without an ssh
account.

Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
Denis Vlasenko
2006-11-30 23:03:56 UTC
Permalink
Post by Roberto A. Foglietta
Post by Denis Vlasenko
* more fishing in bug database
the bug n.615 still open and I have updated patch to 1.2.2.1 and today
snapshot (in attachment)
http://bugs.busybox.net/view.php?id=615
- if (temp) {
- *no_newline = !(len && temp[len-1] == '\n');
+ if (temp && len > 0) {
+ endzero += !temp[len-1];
+ *no_newline = !(temp[len-1]=='\n');
if (!*no_newline) temp[len-1] = 0;
break;

old code: if len == 0: 'break' is taken
new code: if len == 0: 'break' is not taken
is it ok?
Post by Roberto A. Foglietta
the bug n.347 is not anymore open in 1.2.2.1 you please close it
http://bugs.busybox.net/view.php?id=347
bug comment says:
In my opinion this bug was fixed in 1.2.2.1 at least
[root at GEDX0327 busybox-1.2.2.1]# _install/bin/busybox tar tvjf pippo.tar.bz2
tar: Decompression failed
tar: Short header

It means that tar detects uncompressor output which isn't a multiple
of tar block size. But it can so happen that corrupted archive
will end so that uncompressed output wil end at block boundary
(1/512 chance).
Post by Roberto A. Foglietta
Post by Denis Vlasenko
* New applets: hose/faucet? ssh[d]? :)
Timeout applets still pending but Rob suggested I would adapt it much
more to busybox in order to reduce size and increase integration.
http://bugs.busybox.net/view.php?id=680
Will take a look when I will comb through bug database.
Post by Roberto A. Foglietta
Finally I suggests
for i in conf.c mconf.c gconf.c; do
sed -e "s/kernel configuration/busybox configuration/g"
scripts/kconfig/$i >$i.new && mv $i.new $i
done
done, thanks!
--
vda
Denis Vlasenko
2006-11-18 16:04:04 UTC
Permalink
Done:

find: taking many more of standard options
ps: POSIX-compliant -o implemented
httpd: added -i (inetd), -f (foreground), fixed 2 bugs
cp: added -s, -l
grep: added -r, fixed -h
watch: make it exec child like standard one does
(was totally incompatible)
runit: added applets: svlogd, runsv[dir], sv
now it is usable
minor bugfixes to: login, dd, umount, chmod, chown, ln

RFC for deprecation:

* e2fsprogs are not maintained and generally shouldn't be
in bbox in my opinion. Also they are very large:
text+data text+rodata rwdata bss filename
79939 79779 160 504 e2fsprogs/e2fsck.o
10261 10245 16 1092 e2fsprogs/mke2fs.o
7319 7319 0 348 e2fsprogs/fsck.o
6226 6210 16 142 e2fsprogs/tune2fs.o
(full bbox is ~900k. e2fsprogs are ~10% of that)
Maybe lsattr/chattr can stay...
* Are we sure our hdparm doesn't suffer from the
bugs? lack of new features?
text+data text+rodata rwdata bss filename
21744 21744 0 852 miscutils/hdparm.o

To do:

* httpd lacks indexing, this makes it sort of not very useful
for "poor man's file server" role. I still use Apache...
* telnetd probably needs the same love as httpd (-i,-f)
* Examples for "life without /sbin/init". I keep
saying that it is possible and even saner that with /sbin/init,
but probably example would be more explanatory.
* Networking: ipv6-ization still isn't even started.
Appalling number of "%u.%u.%u.%u" in the tree.
* Shell: we still BADLY need a decent, bash-like shell.
NOFORK feature is dependent on this.
* NOMMU: need audit of unnecessary fork() calls.
* Desktop compatibility (what is missing):
I fixed the most critical stuff by now, i think.
I guess more bugs/incompats will be found
by other people trying to use bbox on desktops.
* New applets: hose/faucet? ssh[d]? :)
--
vda
Denis Vlasenko
2006-11-29 23:14:47 UTC
Permalink
Done:

telnetd: fixed/improved IPv6 support, inetd+standalone
support, other fixes. Useful IPv6 stuff factored out into libbb.

tar: fix limitations which were preventing bbox tar usage
on a big directories: long names and linknames, pax headers
(Linux kernel tarballs hve that). Fixed a number of obscure bugs.
Raised max file limit (now 64Gb). Security fixes (/../ attacks).

httpd: added support for directory indexer CGI. Example is included.
two small bugs related to string decode fixed.

str->num conversion: regularized. bb_strtoul
is "like strtoul done right". Did you know that
"-" is a valid _unsigned_ number for libc's strtoul?!

od: removed some bloat without loss of functionality
(we are even x3 faster than coreutils in ascii dump modes)

mkfs.minix: size reduction and cleanup.

minor bugfixes to: udhcp, fdisk, mount, ifconfig, sort, tee,
mkswap, wget, insmod.

bug database: closed fixed and hopeless records. Applied
patches from some reports which have those.
Thanks for the reporters! You are really helping us people.

To do:

* 1.2.3 release?
* more fishing in bug database
* remove (most of) e2fsck, sanitize the rest
* Networking: more of ipv6-ization
* Shell: we still BADLY need a decent, bash-like shell
? NOFORK feature is dependent on this
* NOMMU: need audit of unnecessary fork() calls
* Desktop compatibility (what is missing):
? I fixed the most critical stuff by now, i think.
? I guess more bugs/incompats will be found
? by other people trying to use bbox on desktops
* New applets: hose/faucet? ssh[d]? :)
--
vda
Luciano Miguel Ferreira Rocha
2006-11-29 23:44:38 UTC
Permalink
Is this the state of the public svn? I can update my cpio hardlink fix
and httpd cgi output to syslog if you want.
--
lfr
0/0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20061129/e02a3fc8/attachment-0002.pgp
Bernhard Fischer
2006-11-29 23:52:00 UTC
Permalink
Post by Denis Vlasenko
telnetd: fixed/improved IPv6 support, inetd+standalone
support, other fixes. Useful IPv6 stuff factored out into libbb.
tar: fix limitations which were preventing bbox tar usage
on a big directories: long names and linknames, pax headers
(Linux kernel tarballs hve that). Fixed a number of obscure bugs.
Raised max file limit (now 64Gb). Security fixes (/../ attacks).
httpd: added support for directory indexer CGI. Example is included.
two small bugs related to string decode fixed.
str->num conversion: regularized. bb_strtoul
is "like strtoul done right". Did you know that
"-" is a valid _unsigned_ number for libc's strtoul?!
od: removed some bloat without loss of functionality
(we are even x3 faster than coreutils in ascii dump modes)
mkfs.minix: size reduction and cleanup.
minor bugfixes to: udhcp, fdisk, mount, ifconfig, sort, tee,
mkswap, wget, insmod.
bug database: closed fixed and hopeless records. Applied
patches from some reports which have those.
Thanks for the reporters! You are really helping us people.
Fore!
Post by Denis Vlasenko
* 1.2.3 release?
* more fishing in bug database
* remove (most of) e2fsck, sanitize the rest
What are the applets that should be kept?
lsattr, chattr, fschk, ?
Post by Denis Vlasenko
* Networking: more of ipv6-ization
* Shell: we still BADLY need a decent, bash-like shell
? NOFORK feature is dependent on this
* NOMMU: need audit of unnecessary fork() calls
? I fixed the most critical stuff by now, i think.
? I guess more bugs/incompats will be found
? by other people trying to use bbox on desktops
* New applets: hose/faucet? ssh[d]? :)
If you add ssh[d], then we could as well add gcc et al ;)
Not really my call, though. Saying 'n' in the config is easy :)

* I'll add chrt if i find the time.
* Search for duplicate patterns like fopen(); if errno!=ENOENT etc, etc.
wioctl that warns?
Reduce duplicate strings. Not sexy but really benefical, overall.
* Look at comment from r16630 (vda?)
* Look at 'make checkhelp' and fixup after vda(?)
* Fix egrep "(XXX|FIXME)" * -r
Paul Fox
2006-11-29 23:54:52 UTC
Permalink
Post by Bernhard Fischer
Post by Denis Vlasenko
* New applets: hose/faucet? ssh[d]? :)
If you add ssh[d], then we could as well add gcc et al ;)
do we really think that busybox'ing dropbear would make it that
much smaller?

paul
=---------------------
paul fox, pgf at brightstareng.com
Roberto A. Foglietta
2006-11-30 12:20:36 UTC
Permalink
Post by Denis Vlasenko
* more fishing in bug database
the bug n.615 still open and I have updated patch to 1.2.2.1 and today
snapshot (in attachment)
http://bugs.busybox.net/view.php?id=615

the bug n.980 still open and I have updated and correct patch for
1.2.2.1 and today snapshot (in attachment)
http://bugs.busybox.net/view.php?id=980

the bug n.347 is not anymore open in 1.2.2.1 you please close it
http://bugs.busybox.net/view.php?id=347

sorry but I have not SVN access, so I have to use daily snapshots.
Post by Denis Vlasenko
* New applets: hose/faucet? ssh[d]? :)
Timeout applets still pending but Rob suggested I would adapt it much
more to busybox in order to reduce size and increase integration.

http://bugs.busybox.net/view.php?id=680





Finally I suggests

for i in conf.c mconf.c gconf.c; do
sed -e "s/kernel configuration/busybox configuration/g"
scripts/kconfig/$i >$i.new && mv $i.new $i
done


Cheers,
--
/roberto
--
/roberto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox-20061130-ifconfig_3.patch.bz2
Type: application/x-bzip2
Size: 1389 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20061130/005f9b8f/attachment-0004.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox-20061130_sed.patch.bz2
Type: application/x-bzip2
Size: 1300 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20061130/005f9b8f/attachment-0005.bin
Continue reading on narkive:
Loading...