Changeset 6204


Ignore:
Timestamp:
2007-01-25T20:08:01+01:00 (9 years ago)
Author:
nbd
Message:

upgrade busybox to 1.4.0

Location:
trunk/package/busybox
Files:
3 added
6 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/busybox/Makefile

    r6023 r6204  
    1010 
    1111PKG_NAME:=busybox 
    12 PKG_VERSION:=1.3.1 
     12PKG_VERSION:=1.4.0 
    1313PKG_RELEASE:=1 
    1414 
     
    1616PKG_SOURCE_URL:=http://www.busybox.net/downloads \ 
    1717                http://distfiles.gentoo.org/distfiles/ 
    18 PKG_MD5SUM:=571531cfa83726947ccb566de017ad4f 
     18PKG_MD5SUM:=f24a3c1e08bc55ec44381d588e8bcced 
    1919PKG_CAT:=bzcat 
    2020 
  • trunk/package/busybox/config/Config.in

    r5953 r6204  
    397397endchoice 
    398398 
    399 config BUSYBOX_CONFIG_DEBUG_YANK_SUSv2 
    400         bool "Disable obsolete features removed before SUSv3?" 
    401         default y 
    402         help 
    403           This option will disable backwards compatibility with SuSv2, 
     399config BUSYBOX_CONFIG_INCLUDE_SUSv2 
     400        bool "Enable obsolete features removed before SUSv3?" 
     401        default y 
     402        help 
     403          This option will enable backwards compatibility with SuSv2, 
    404404          specifically, old-style numeric options ('command -1 <file>') 
    405           will not be supported in head, tail, and fold.  (Note: should 
    406           yank from renice too.) 
     405          will be supported in head, tail, and fold.  (Note: should 
     406          affect renice too.) 
    407407 
    408408endmenu 
     
    441441       depends on BUSYBOX_CONFIG_FEATURE_INSTALLER || BUSYBOX_CONFIG_FEATURE_SH_STANDALONE_SHELL 
    442442       help 
    443          Do not install applets links. Usefull when using the -install feature 
     443         Do not install applet links. Useful when using the -install feature 
    444444         or a standalone shell for rescue pruposes. 
    445445 
  • trunk/package/busybox/config/archival/Config.in

    r5953 r6204  
    140140        default n 
    141141        help 
    142           Mini RPM applet - queries and extracts 
     142          Mini RPM applet - queries and extracts RPM packages. 
    143143 
    144144config BUSYBOX_CONFIG_TAR 
  • trunk/package/busybox/config/e2fsprogs/Config.in

    r3587 r6204  
    1212          chattr changes the file attributes on a second extended file system. 
    1313 
    14 config BUSYBOX_CONFIG_E2FSCK 
    15         bool "e2fsck" 
    16         default n 
    17         help 
    18           e2fsck is used to check Linux second extended file systems (ext2fs). 
    19           e2fsck also supports ext2 filesystems countaining a journal (ext3). 
    20           The normal compat symlinks 'fsck.ext2' and 'fsck.ext3' are also 
    21           provided. 
     14### config E2FSCK 
     15###     bool "e2fsck" 
     16###     default n 
     17###     help 
     18###       e2fsck is used to check Linux second extended file systems (ext2fs). 
     19###       e2fsck also supports ext2 filesystems countaining a journal (ext3). 
     20###       The normal compat symlinks 'fsck.ext2' and 'fsck.ext3' are also 
     21###       provided. 
    2222 
    2323config BUSYBOX_CONFIG_FSCK 
     
    3535          lsattr lists the file attributes on a second extended file system. 
    3636 
    37 config BUSYBOX_CONFIG_MKE2FS 
    38         bool "mke2fs" 
    39         default n 
    40         help 
    41           mke2fs is used to create an ext2/ext3 filesystem.  The normal compat 
    42           symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided. 
     37### config MKE2FS 
     38###     bool "mke2fs" 
     39###     default n 
     40###     help 
     41###       mke2fs is used to create an ext2/ext3 filesystem.  The normal compat 
     42###       symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided. 
    4343 
    44 config BUSYBOX_CONFIG_TUNE2FS 
    45         bool "tune2fs" 
    46         default n 
    47         help 
    48           tune2fs allows the system administrator to adjust various tunable 
    49           filesystem parameters on Linux ext2/ext3 filesystems. 
     44### config TUNE2FS 
     45###     bool "tune2fs" 
     46###     default n 
     47###     help 
     48###       tune2fs allows the system administrator to adjust various tunable 
     49###       filesystem parameters on Linux ext2/ext3 filesystems. 
    5050 
    51 config BUSYBOX_CONFIG_E2LABEL 
    52         bool "e2label" 
    53         default n 
    54         depends on BUSYBOX_CONFIG_TUNE2FS 
    55         help 
    56           e2label will display or change the filesystem label on the ext2 
    57           filesystem located on device. 
     51### config E2LABEL 
     52###     bool "e2label" 
     53###     default n 
     54###     depends on TUNE2FS 
     55###     help 
     56###       e2label will display or change the filesystem label on the ext2 
     57###       filesystem located on device. 
    5858 
    59 config BUSYBOX_CONFIG_FINDFS 
    60         bool "findfs" 
    61         default n 
    62         depends on BUSYBOX_CONFIG_TUNE2FS 
    63         help 
    64           findfs will search the disks in the system looking for a filesystem 
    65           which has a label matching label or a UUID equal to uuid. 
     59### config FINDFS 
     60###     bool "findfs" 
     61###     default n 
     62###     depends on TUNE2FS 
     63###     help 
     64###       findfs will search the disks in the system looking for a filesystem 
     65###       which has a label matching label or a UUID equal to uuid. 
    6666 
    6767endmenu 
  • trunk/package/busybox/config/editors/Config.in

    r4528 r6204  
    128128          and it makes the applet a tiny bit larger. 
    129129 
     130config BUSYBOX_CONFIG_FEATURE_ALLOW_EXEC 
     131        bool "Allow vi and awk to execute shell commands" 
     132        default y 
     133        depends on BUSYBOX_CONFIG_VI || BUSYBOX_CONFIG_AWK 
     134        help 
     135          Enables vi and awk features which allows user to execute 
     136          shell commands (using system() C call). 
     137 
    130138endmenu 
    131  
  • trunk/package/busybox/config/loginutils/Config.in

    r5953 r6204  
    143143          work properly. 
    144144 
     145config BUSYBOX_CONFIG_FEATURE_PASSWD_WEAK_CHECK 
     146        bool "Check new passwords for weakness" 
     147        default y 
     148        depends on BUSYBOX_CONFIG_PASSWD 
     149        help 
     150          With this option passwd will refuse new passwords which are "weak". 
     151 
    145152config BUSYBOX_CONFIG_SU 
    146153        bool "su" 
     
    155162          work properly. 
    156163 
    157 config BUSYBOX_CONFIG_SU_SYSLOG 
    158         bool "Support for syslog in su" 
     164config BUSYBOX_CONFIG_FEATURE_SU_SYSLOG 
     165        bool "Enable su to write to syslog" 
    159166        default n 
    160167        depends on BUSYBOX_CONFIG_SU 
    161         help 
    162           Enables support for syslog in su. 
     168 
     169config BUSYBOX_CONFIG_FEATURE_SU_CHECKS_SHELLS 
     170        bool "Enable su to check user's shell to be listed in /etc/shells" 
     171        depends on BUSYBOX_CONFIG_SU 
     172        default n 
    163173 
    164174config BUSYBOX_CONFIG_SULOGIN 
  • trunk/package/busybox/config/miscutils/Config.in

    r5953 r6204  
    133133          'less' is a pager, meaning that it displays text files. It possesses 
    134134          a wide array of features, and is an improvement over 'more'. 
     135 
     136config BUSYBOX_CONFIG_FEATURE_LESS_MAXLINES 
     137        int "Max number of input lines less will try to eat" 
     138        default 9999999 
     139        depends on BUSYBOX_CONFIG_LESS 
    135140 
    136141config BUSYBOX_CONFIG_FEATURE_LESS_BRACKETS 
  • trunk/package/busybox/config/networking/Config.in

    r5959 r6204  
    1313          This adds IPv6 support in the networking applets. 
    1414 
     15config BUSYBOX_CONFIG_ARP 
     16        bool "arp" 
     17        default n 
     18        help 
     19          Manipulate the system ARP cache 
     20 
    1521config BUSYBOX_CONFIG_ARPING 
    1622        bool "arping" 
     
    7379        bool "Support reloading the global config file using hup signal" 
    7480        default n 
    75         depends on BUSYBOX_CONFIG_HTTPD && BUSYBOX_CONFIG_FEATURE_HTTPD_WITHOUT_INETD 
     81        depends on BUSYBOX_CONFIG_HTTPD 
    7682        help 
    7783          This option enables processing of SIGHUP to reload cached 
     
    7985 
    8086config BUSYBOX_CONFIG_FEATURE_HTTPD_SETUID 
    81         bool "Enable support -u <user> option" 
    82         default n 
    83         depends on BUSYBOX_CONFIG_HTTPD && BUSYBOX_CONFIG_FEATURE_HTTPD_WITHOUT_INETD 
     87        bool "Enable -u <user> option" 
     88        default n 
     89        depends on BUSYBOX_CONFIG_HTTPD 
    8490        help 
    8591          This option allows the server to run as a specific user 
  • trunk/package/busybox/config/procps/Config.in

    r4528 r6204  
    4343        default y 
    4444        depends on BUSYBOX_CONFIG_KILL 
    45          
     45 
    4646config BUSYBOX_CONFIG_PIDOF 
    4747        bool "pidof" 
  • trunk/package/busybox/patches/140-trylink_bash.patch

    r6201 r6204  
    44@@ -1,4 +1,4 @@ 
    55-#!/bin/sh 
    6 +#!/bin/bash 
     6+#!/usr/bin/env bash 
    77  
    88 debug=false 
  • trunk/package/busybox/patches/330-httpd_user_agent.patch

    r5941 r6204  
    1 diff -ruN busybox-1.3.1-old/networking/httpd.c busybox-1.3.1/networking/httpd.c 
    2 --- busybox-1.3.1-old/networking/httpd.c        2006-12-27 05:52:39.000000000 +0100 
    3 +++ busybox-1.3.1/networking/httpd.c    2006-12-28 18:04:53.000000000 +0100 
     1diff -ur busybox.old/networking/httpd.c busybox.dev/networking/httpd.c 
     2--- busybox.old/networking/httpd.c      2007-01-19 22:22:59.000000000 +0100 
     3+++ busybox.dev/networking/httpd.c      2007-01-22 13:09:03.000000000 +0100 
    44@@ -137,6 +137,7 @@ 
    55        const char *query; 
     
    1010        const char *configFile; 
    1111  
    12 @@ -1062,6 +1063,7 @@ 
    13                 putenv("SERVER_PROTOCOL=HTTP/1.0"); 
    14                 putenv("GATEWAY_INTERFACE=CGI/1.1"); 
    15                 setenv1("REMOTE_ADDR", config->rmt_ip_str); 
    16 +               setenv1("HTTP_USER_AGENT", config->user_agent); 
     12@@ -1066,6 +1067,7 @@ 
     13                        if (cp) *cp = '\0'; /* delete :PORT */ 
     14                        setenv1("REMOTE_ADDR", p); 
     15                } 
     16+               setenv1("HTTP_USER_AGENT", config->user_agent); 
    1717 #if ENABLE_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV 
    1818                setenv_long("REMOTE_PORT", config->port); 
    1919 #endif 
    20 @@ -1605,6 +1607,8 @@ 
     20@@ -1629,6 +1631,8 @@ 
    2121                                        content_type = strdup(skip_whitespace(buf + sizeof("Content-Type:")-1)); 
    2222                                } else if ((STRNCASECMP(buf, "Referer:") == 0)) { 
  • trunk/package/busybox/patches/400-revert_awk_getopt.patch

    r5958 r6204  
    11diff -ur busybox.old/editors/awk.c busybox.dev/editors/awk.c 
    2 --- busybox.old/editors/awk.c   2006-12-27 05:56:50.000000000 +0100 
    3 +++ busybox.dev/editors/awk.c   2007-01-01 23:12:04.000000000 +0100 
    4 @@ -2634,8 +2634,6 @@ 
     2--- busybox.old/editors/awk.c   2007-01-19 22:23:12.000000000 +0100 
     3+++ busybox.dev/editors/awk.c   2007-01-25 20:01:26.000000000 +0100 
     4@@ -2639,14 +2639,13 @@ 
    55  
    66 int awk_main(int argc, char **argv) 
     
    88-       unsigned opt; 
    99-       char *opt_F, *opt_v, *opt_W; 
    10         char *s, *s1; 
    11         int i, j, c, flen; 
     10        int i, j, flen; 
    1211        var *v; 
    13 @@ -2691,32 +2689,44 @@ 
     12        var tv; 
     13        char **envp; 
     14        char *vnames = (char *)vNames; /* cheat */ 
     15        char *vvalues = (char *)vValues; 
     16+       int c; 
     17  
     18        /* Undo busybox.c, or else strtod may eat ','! This breaks parsing: 
     19         * $1,$2 == '$1,' '$2', NOT '$1' ',' '$2' */ 
     20@@ -2694,39 +2693,46 @@ 
    1421                free(s); 
    1522        } 
    1623  
    1724-       opt = getopt32(argc, argv, "F:v:f:W:", &opt_F, &opt_v, &programname, &opt_W); 
     25-       argv += optind; 
     26-       argc -= optind; 
    1827-       if (opt & 0x1) setvar_s(V[FS], opt_F); // -F 
    1928-       if (opt & 0x2) if (!is_assignment(opt_v)) bb_show_usage(); // -v 
    2029-       if (opt & 0x4) { // -f 
    21 -               from_file = TRUE; 
    22 -               F = afopen(programname, "r"); 
    23 -               s = NULL; 
     30-               char *s = s; /* die, gcc, die */ 
     31-               FILE *from_file = afopen(programname, "r"); 
    2432-               /* one byte is reserved for some trick in next_token */ 
    25 -               if (fseek(F, 0, SEEK_END) == 0) { 
    26 -                       flen = ftell(F); 
    27 -                       s = (char *)xmalloc(flen+4); 
    28 -                       fseek(F, 0, SEEK_SET); 
    29 -                       i = 1 + fread(s+1, 1, flen, F); 
     33-               if (fseek(from_file, 0, SEEK_END) == 0) { 
     34-                       flen = ftell(from_file); 
     35-                       s = xmalloc(flen + 4); 
     36-                       fseek(from_file, 0, SEEK_SET); 
     37-                       i = 1 + fread(s + 1, 1, flen, from_file); 
    3038-               } else { 
    31 -                       for (i=j=1; j>0; i+=j) { 
    32 -                               s = (char *)xrealloc(s, i+4096); 
    33 -                               j = fread(s+i, 1, 4094, F); 
    34 -                       } 
     39-                       for (i = j = 1; j > 0; i += j) { 
     40-                               s = xrealloc(s, i + 4096); 
     41-                               j = fread(s + i, 1, 4094, from_file); 
    3542+       while((c = getopt(argc, argv, "F:v:f:W:")) != EOF) { 
    3643+               switch (c) { 
     
    4249+                                       bb_show_usage(); 
    4350+                               break; 
    44 +                       case 'f': 
    45 +                               from_file = TRUE; 
    46 +                               F = afopen(programname = optarg, "r"); 
    47 +                               s = NULL; 
     51+                       case 'f': { 
     52+                               FILE *F = afopen(programname = optarg, "r"); 
     53+                               char *s = NULL; 
    4854+                               /* one byte is reserved for some trick in next_token */ 
    4955+                               if (fseek(F, 0, SEEK_END) == 0) { 
     
    6369+                               free(s); 
    6470+                               break; 
     71                        } 
    6572+                       case 'W': 
    6673+                               bb_error_msg("Warning: unrecognized option '-W %s' ignored\n", optarg); 
     
    7178                } 
    7279-               s[i] = '\0'; 
    73 -               fclose(F); 
    74 -               parse_program(s+1); 
     80-               fclose(from_file); 
     81-               parse_program(s + 1); 
    7582-               free(s); 
     83-       } else { // no -f: take program from 1st parameter 
     84-               if (!argc) 
     85-                       bb_show_usage(); 
     86-               programname = "cmd. line"; 
     87-               parse_program(*argv++); 
     88-               argc--; 
    7689        } 
    7790-       if (opt & 0x8) // -W 
    7891-               bb_error_msg("warning: unrecognized option '-W %s' ignored", opt_W); 
     92+       argc -= optind; 
     93+       argv += optind; 
    7994  
    80         if (!from_file) { 
    81                 if (argc == optind) 
     95        /* fill in ARGV array */ 
     96        setvar_i(V[ARGC], argc + 1); 
  • trunk/package/busybox/patches/911-ipkg.patch

    r5941 r6204  
    1 # Copyright (C) 2006 OpenWrt.org 
    2 # 
    3 # This is free software, licensed under the GNU General Public License v2. 
    4 # See /LICENSE for more information. 
    5 # 
    6 # add ipkg support to busybox  
    7 # 
    8 diff -ruN busybox-1.3.1-orig/archival/Config.in busybox-1.3.1-911/archival/Config.in 
    9 --- busybox-1.3.1-orig/archival/Config.in       2006-12-27 05:53:54.000000000 +0100 
    10 +++ busybox-1.3.1-911/archival/Config.in        2006-12-28 02:41:16.000000000 +0100 
     1diff -urN busybox.old/archival/Config.in busybox.dev/archival/Config.in 
     2--- busybox.old/archival/Config.in      2007-01-19 22:23:02.000000000 +0100 
     3+++ busybox.dev/archival/Config.in      2007-01-22 13:41:03.000000000 +0100 
    114@@ -121,6 +121,14 @@ 
    125          gzip is used to compress files. 
     
    2417        bool "rpm2cpio" 
    2518        default n 
    26 diff -ruN busybox-1.3.1-orig/archival/dpkg.c busybox-1.3.1-911/archival/dpkg.c 
    27 --- busybox-1.3.1-orig/archival/dpkg.c  2006-12-27 05:53:54.000000000 +0100 
    28 +++ busybox-1.3.1-911/archival/dpkg.c   2006-12-27 19:41:04.000000000 +0100 
    29 @@ -1507,6 +1507,10 @@ 
     19diff -urN busybox.old/archival/dpkg.c busybox.dev/archival/dpkg.c 
     20--- busybox.old/archival/dpkg.c 2007-01-19 22:23:02.000000000 +0100 
     21+++ busybox.dev/archival/dpkg.c 2007-01-22 13:41:03.000000000 +0100 
     22@@ -1463,6 +1463,10 @@ 
    3023        return ar_handle->sub_archive->buffer; 
    3124 } 
     
    3831 { 
    3932        char *name_ptr = archive_handle->file_header->name; 
    40 @@ -1519,6 +1523,8 @@ 
     33@@ -1475,6 +1479,8 @@ 
    4134        return; 
    4235 } 
     
    4740 { 
    4841        const char *package_name = name_hashtable[package_hashtable[deb_file->package]->name]; 
    49 diff -ruN busybox-1.3.1-orig/archival/ipkg.c busybox-1.3.1-911/archival/ipkg.c 
    50 --- busybox-1.3.1-orig/archival/ipkg.c  1970-01-01 01:00:00.000000000 +0100 
    51 +++ busybox-1.3.1-911/archival/ipkg.c   2006-12-27 19:41:04.000000000 +0100 
     42diff -urN busybox.old/archival/ipkg.c busybox.dev/archival/ipkg.c 
     43--- busybox.old/archival/ipkg.c 1970-01-01 01:00:00.000000000 +0100 
     44+++ busybox.dev/archival/ipkg.c 2007-01-22 13:41:03.000000000 +0100 
    5245@@ -0,0 +1,26 @@ 
    5346+/* ipkg.c - the itsy package management system 
     
    7770+       return ipkg_op(argc, argv); 
    7871+} 
    79 diff -ruN busybox-1.3.1-orig/archival/Kbuild busybox-1.3.1-911/archival/Kbuild 
    80 --- busybox-1.3.1-orig/archival/Kbuild  2006-12-27 05:53:54.000000000 +0100 
    81 +++ busybox-1.3.1-911/archival/Kbuild   2006-12-27 19:51:09.000000000 +0100 
     72diff -urN busybox.old/archival/Kbuild busybox.dev/archival/Kbuild 
     73--- busybox.old/archival/Kbuild 2007-01-19 22:23:02.000000000 +0100 
     74+++ busybox.dev/archival/Kbuild 2007-01-22 13:41:03.000000000 +0100 
    8275@@ -15,6 +15,7 @@ 
    8376 lib-$(CONFIG_DPKG_DEB)         += dpkg_deb.o 
     
    8881 lib-$(CONFIG_RPM)              += rpm.o 
    8982 lib-$(CONFIG_TAR)              += tar.o 
    90 diff -ruN busybox-1.3.1-orig/archival/libipkg/args.c busybox-1.3.1-911/archival/libipkg/args.c 
    91 --- busybox-1.3.1-orig/archival/libipkg/args.c  1970-01-01 01:00:00.000000000 +0100 
    92 +++ busybox-1.3.1-911/archival/libipkg/args.c   2006-12-27 19:41:04.000000000 +0100 
     83diff -urN busybox.old/archival/libipkg/args.c busybox.dev/archival/libipkg/args.c 
     84--- busybox.old/archival/libipkg/args.c 1970-01-01 01:00:00.000000000 +0100 
     85+++ busybox.dev/archival/libipkg/args.c 2007-01-22 13:41:03.000000000 +0100 
    9386@@ -0,0 +1,242 @@ 
    9487+/* args.c - parse command-line args 
     
    334327+       bb_error_msg("version %s\n", IPKG_VERSION); 
    335328+} 
    336 diff -ruN busybox-1.3.1-orig/archival/libipkg/args.h busybox-1.3.1-911/archival/libipkg/args.h 
    337 --- busybox-1.3.1-orig/archival/libipkg/args.h  1970-01-01 01:00:00.000000000 +0100 
    338 +++ busybox-1.3.1-911/archival/libipkg/args.h   2006-12-27 19:41:04.000000000 +0100 
     329diff -urN busybox.old/archival/libipkg/args.h busybox.dev/archival/libipkg/args.h 
     330--- busybox.old/archival/libipkg/args.h 1970-01-01 01:00:00.000000000 +0100 
     331+++ busybox.dev/archival/libipkg/args.h 2007-01-22 13:41:03.000000000 +0100 
    339332@@ -0,0 +1,72 @@ 
    340333+/* args.h - parse command-line args 
     
    410403+ 
    411404+#endif 
    412 diff -ruN busybox-1.3.1-orig/archival/libipkg/conffile.c busybox-1.3.1-911/archival/libipkg/conffile.c 
    413 --- busybox-1.3.1-orig/archival/libipkg/conffile.c      1970-01-01 01:00:00.000000000 +0100 
    414 +++ busybox-1.3.1-911/archival/libipkg/conffile.c       2006-12-27 19:41:04.000000000 +0100 
     405diff -urN busybox.old/archival/libipkg/conffile.c busybox.dev/archival/libipkg/conffile.c 
     406--- busybox.old/archival/libipkg/conffile.c     1970-01-01 01:00:00.000000000 +0100 
     407+++ busybox.dev/archival/libipkg/conffile.c     2007-01-22 13:41:03.000000000 +0100 
    415408@@ -0,0 +1,64 @@ 
    416409+/* conffile.c - the itsy package management system 
     
    478471+    return ret; 
    479472+} 
    480 diff -ruN busybox-1.3.1-orig/archival/libipkg/conffile.h busybox-1.3.1-911/archival/libipkg/conffile.h 
    481 --- busybox-1.3.1-orig/archival/libipkg/conffile.h      1970-01-01 01:00:00.000000000 +0100 
    482 +++ busybox-1.3.1-911/archival/libipkg/conffile.h       2006-12-27 19:41:04.000000000 +0100 
     473diff -urN busybox.old/archival/libipkg/conffile.h busybox.dev/archival/libipkg/conffile.h 
     474--- busybox.old/archival/libipkg/conffile.h     1970-01-01 01:00:00.000000000 +0100 
     475+++ busybox.dev/archival/libipkg/conffile.h     2007-01-22 13:41:03.000000000 +0100 
    483476@@ -0,0 +1,30 @@ 
    484477+/* conffile.h - the itsy package management system 
     
    512505+#endif 
    513506+ 
    514 diff -ruN busybox-1.3.1-orig/archival/libipkg/conffile_list.c busybox-1.3.1-911/archival/libipkg/conffile_list.c 
    515 --- busybox-1.3.1-orig/archival/libipkg/conffile_list.c 1970-01-01 01:00:00.000000000 +0100 
    516 +++ busybox-1.3.1-911/archival/libipkg/conffile_list.c  2006-12-27 19:41:04.000000000 +0100 
     507diff -urN busybox.old/archival/libipkg/conffile_list.c busybox.dev/archival/libipkg/conffile_list.c 
     508--- busybox.old/archival/libipkg/conffile_list.c        1970-01-01 01:00:00.000000000 +0100 
     509+++ busybox.dev/archival/libipkg/conffile_list.c        2007-01-22 13:41:03.000000000 +0100 
    517510@@ -0,0 +1,47 @@ 
    518511+/* conffile_list.c - the itsy package management system 
     
    563556+} 
    564557+ 
    565 diff -ruN busybox-1.3.1-orig/archival/libipkg/conffile_list.h busybox-1.3.1-911/archival/libipkg/conffile_list.h 
    566 --- busybox-1.3.1-orig/archival/libipkg/conffile_list.h 1970-01-01 01:00:00.000000000 +0100 
    567 +++ busybox-1.3.1-911/archival/libipkg/conffile_list.h  2006-12-27 19:41:04.000000000 +0100 
     558diff -urN busybox.old/archival/libipkg/conffile_list.h busybox.dev/archival/libipkg/conffile_list.h 
     559--- busybox.old/archival/libipkg/conffile_list.h        1970-01-01 01:00:00.000000000 +0100 
     560+++ busybox.dev/archival/libipkg/conffile_list.h        2007-01-22 13:41:03.000000000 +0100 
    568561@@ -0,0 +1,36 @@ 
    569562+/* conffile_list.h - the itsy package management system 
     
    603596+#endif 
    604597+ 
    605 diff -ruN busybox-1.3.1-orig/archival/libipkg/file_util.c busybox-1.3.1-911/archival/libipkg/file_util.c 
    606 --- busybox-1.3.1-orig/archival/libipkg/file_util.c     1970-01-01 01:00:00.000000000 +0100 
    607 +++ busybox-1.3.1-911/archival/libipkg/file_util.c      2006-12-27 19:41:04.000000000 +0100 
    608 @@ -0,0 +1,177 @@ 
     598diff -urN busybox.old/archival/libipkg/file_util.c busybox.dev/archival/libipkg/file_util.c 
     599--- busybox.old/archival/libipkg/file_util.c    1970-01-01 01:00:00.000000000 +0100 
     600+++ busybox.dev/archival/libipkg/file_util.c    2007-01-22 14:00:52.000000000 +0100 
     601@@ -0,0 +1,132 @@ 
    609602+/* file_util.c - convenience routines for common stat operations 
    610603+ 
     
    630623+#include "sprintf_alloc.h" 
    631624+#include "file_util.h" 
    632 +#include "md5.h" 
    633625+#include "libbb.h" 
    634626+#undef strlen 
     
    732724+int file_mkdir_hier(const char *path, long mode) 
    733725+{ 
    734 +    return bb_make_directory(path, mode, FILEUTILS_RECUR); 
     726+    return bb_make_directory((char *)path, mode, FILEUTILS_RECUR); 
    735727+} 
    736728+ 
    737729+char *file_md5sum_alloc(const char *file_name) 
    738730+{ 
    739 +    static const int md5sum_bin_len = 16; 
    740 +    static const int md5sum_hex_len = 32; 
    741 + 
    742 +    static const unsigned char bin2hex[16] = { 
    743 +       '0', '1', '2', '3', 
    744 +       '4', '5', '6', '7', 
    745 +       '8', '9', 'a', 'b', 
    746 +       'c', 'd', 'e', 'f' 
    747 +    }; 
    748 + 
    749 +    int i, err; 
    750 +    FILE *file; 
    751 +    unsigned char *md5sum_hex; 
    752 +    unsigned char md5sum_bin[md5sum_bin_len]; 
    753 + 
    754 +    md5sum_hex = malloc(md5sum_hex_len + 1); 
    755 +    if (md5sum_hex == NULL) { 
    756 +       fprintf(stderr, "%s: out of memory\n", __FUNCTION__); 
    757 +       return strdup(""); 
    758 +    } 
    759 + 
    760 +    file = fopen(file_name, "r"); 
    761 +    if (file == NULL) { 
    762 +       fprintf(stderr, "%s: Failed to open file %s: %s\n", 
    763 +               __FUNCTION__, file_name, strerror(errno)); 
    764 +       return strdup(""); 
    765 +    } 
    766 + 
    767 +    err = md5_stream(file, md5sum_bin); 
    768 +    if (err) { 
    769 +       fprintf(stderr, "%s: ERROR computing md5sum for %s: %s\n", 
    770 +               __FUNCTION__, file_name, strerror(err)); 
    771 +       return strdup(""); 
    772 +    } 
    773 + 
    774 +    fclose(file); 
    775 + 
    776 +    for (i=0; i < md5sum_bin_len; i++) { 
    777 +       md5sum_hex[i*2] = bin2hex[md5sum_bin[i] >> 4]; 
    778 +       md5sum_hex[i*2+1] = bin2hex[md5sum_bin[i] & 0xf]; 
    779 +    } 
    780 +     
    781 +    md5sum_hex[md5sum_hex_len] = '\0'; 
    782 +     
    783 +    return md5sum_hex; 
    784 +} 
    785 + 
    786 diff -ruN busybox-1.3.1-orig/archival/libipkg/file_util.h busybox-1.3.1-911/archival/libipkg/file_util.h 
    787 --- busybox-1.3.1-orig/archival/libipkg/file_util.h     1970-01-01 01:00:00.000000000 +0100 
    788 +++ busybox-1.3.1-911/archival/libipkg/file_util.h      2006-12-27 19:41:04.000000000 +0100 
     731+       return hash_file(file_name, HASH_MD5); 
     732+} 
     733+ 
     734diff -urN busybox.old/archival/libipkg/file_util.h busybox.dev/archival/libipkg/file_util.h 
     735--- busybox.old/archival/libipkg/file_util.h    1970-01-01 01:00:00.000000000 +0100 
     736+++ busybox.dev/archival/libipkg/file_util.h    2007-01-22 13:41:03.000000000 +0100 
    789737@@ -0,0 +1,29 @@ 
    790738+/* file_util.h - convenience routines for common file operations 
     
    817765+ 
    818766+#endif 
    819 diff -ruN busybox-1.3.1-orig/archival/libipkg/hash_table.c busybox-1.3.1-911/archival/libipkg/hash_table.c 
    820 --- busybox-1.3.1-orig/archival/libipkg/hash_table.c    1970-01-01 01:00:00.000000000 +0100 
    821 +++ busybox-1.3.1-911/archival/libipkg/hash_table.c     2006-12-27 19:41:04.000000000 +0100 
     767diff -urN busybox.old/archival/libipkg/hash_table.c busybox.dev/archival/libipkg/hash_table.c 
     768--- busybox.old/archival/libipkg/hash_table.c   1970-01-01 01:00:00.000000000 +0100 
     769+++ busybox.dev/archival/libipkg/hash_table.c   2007-01-22 13:41:03.000000000 +0100 
    822770@@ -0,0 +1,155 @@ 
    823771+/* hash.c - hash tables for ipkg 
     
    976924+} 
    977925+ 
    978 diff -ruN busybox-1.3.1-orig/archival/libipkg/hash_table.h busybox-1.3.1-911/archival/libipkg/hash_table.h 
    979 --- busybox-1.3.1-orig/archival/libipkg/hash_table.h    1970-01-01 01:00:00.000000000 +0100 
    980 +++ busybox-1.3.1-911/archival/libipkg/hash_table.h     2006-12-27 19:41:04.000000000 +0100 
     926diff -urN busybox.old/archival/libipkg/hash_table.h busybox.dev/archival/libipkg/hash_table.h 
     927--- busybox.old/archival/libipkg/hash_table.h   1970-01-01 01:00:00.000000000 +0100 
     928+++ busybox.dev/archival/libipkg/hash_table.h   2007-01-22 13:41:03.000000000 +0100 
    981929@@ -0,0 +1,44 @@ 
    982930+/* hash.h - hash tables for ipkg 
     
    1024972+ 
    1025973+#endif /* _HASH_TABLE_H_ */ 
    1026 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_cmd.c busybox-1.3.1-911/archival/libipkg/ipkg_cmd.c 
    1027 --- busybox-1.3.1-orig/archival/libipkg/ipkg_cmd.c      1970-01-01 01:00:00.000000000 +0100 
    1028 +++ busybox-1.3.1-911/archival/libipkg/ipkg_cmd.c       2006-12-27 19:41:04.000000000 +0100 
     974diff -urN busybox.old/archival/libipkg/ipkg_cmd.c busybox.dev/archival/libipkg/ipkg_cmd.c 
     975--- busybox.old/archival/libipkg/ipkg_cmd.c     1970-01-01 01:00:00.000000000 +0100 
     976+++ busybox.dev/archival/libipkg/ipkg_cmd.c     2007-01-22 13:47:47.000000000 +0100 
    1029977@@ -0,0 +1,1431 @@ 
    1030978+/* ipkg_cmd.c - the itsy package management system 
     
    12751223+                  in = fopen (tmp_file_name, "r"); 
    12761224+                  out = fopen (list_file_name, "w"); 
    1277 +                  if (in && out) 
    1278 +                       inflate_unzip (in, out); 
    1279 +                  else 
     1225+                  if (in && out) { 
     1226+                       inflate_unzip_result res; 
     1227+                       inflate_unzip (&res, 0x8000, fileno(in), fileno(out)); 
     1228+                  } else 
    12801229+                       err = 1; 
    12811230+                  if (in) 
     
    19241873+     } else { 
    19251874+         pkg_vec_t *installed_pkgs = pkg_vec_alloc(); 
    1926 +         int i; 
    19271875+         int flagged_pkg_count = 0; 
    19281876+         int removed; 
     
    19311879+ 
    19321880+         for (i = 0; i < installed_pkgs->len; i++) { 
    1933 +              pkg_t *pkg = installed_pkgs->pkgs[i]; 
     1881+              pkg = installed_pkgs->pkgs[i]; 
    19341882+              if (pkg->state_flag & SF_USER) { 
    19351883+                   flagged_pkg_count++; 
     
    19511899+              removed = 0; 
    19521900+              for (i = 0; i < installed_pkgs->len; i++) { 
    1953 +                   pkg_t *pkg = installed_pkgs->pkgs[i]; 
     1901+                   pkg = installed_pkgs->pkgs[i]; 
    19541902+                   if (!(pkg->state_flag & SF_USER) 
    19551903+                       && !pkg_has_installed_dependents(conf, pkg->parent, pkg, NULL)) { 
     
    20061954+     int i; 
    20071955+     pkg_t *pkg; 
    2008 +     const char *flags = argv[0]; 
     1956+     char *flags = argv[0]; 
    20091957+     
    20101958+     global_conf = conf; 
     
    24592407+ 
    24602408+ 
    2461 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_cmd.h busybox-1.3.1-911/archival/libipkg/ipkg_cmd.h 
    2462 --- busybox-1.3.1-orig/archival/libipkg/ipkg_cmd.h      1970-01-01 01:00:00.000000000 +0100 
    2463 +++ busybox-1.3.1-911/archival/libipkg/ipkg_cmd.h       2006-12-27 19:41:04.000000000 +0100 
     2409diff -urN busybox.old/archival/libipkg/ipkg_cmd.h busybox.dev/archival/libipkg/ipkg_cmd.h 
     2410--- busybox.old/archival/libipkg/ipkg_cmd.h     1970-01-01 01:00:00.000000000 +0100 
     2411+++ busybox.dev/archival/libipkg/ipkg_cmd.h     2007-01-22 13:41:03.000000000 +0100 
    24642412@@ -0,0 +1,46 @@ 
    24652413+/* ipkg_cmd.h - the itsy package management system 
     
    25092457+ 
    25102458+#endif 
    2511 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_conf.c busybox-1.3.1-911/archival/libipkg/ipkg_conf.c 
    2512 --- busybox-1.3.1-orig/archival/libipkg/ipkg_conf.c     1970-01-01 01:00:00.000000000 +0100 
    2513 +++ busybox-1.3.1-911/archival/libipkg/ipkg_conf.c      2006-12-27 19:41:04.000000000 +0100 
     2459diff -urN busybox.old/archival/libipkg/ipkg_conf.c busybox.dev/archival/libipkg/ipkg_conf.c 
     2460--- busybox.old/archival/libipkg/ipkg_conf.c    1970-01-01 01:00:00.000000000 +0100 
     2461+++ busybox.dev/archival/libipkg/ipkg_conf.c    2007-01-22 13:41:06.000000000 +0100 
    25142462@@ -0,0 +1,711 @@ 
    25152463+/* ipkg_conf.c - the itsy package management system 
     
    30573005+              ipkg_conf_set_option(options, name, value); 
    30583006+         } else if (strcmp(type, "src") == 0) { 
    3059 +              if (!nv_pair_list_find(pkg_src_list, name)) { 
     3007+              if (!nv_pair_list_find((nv_pair_list_t *)pkg_src_list, name)) { 
    30603008+                   pkg_src_list_append (pkg_src_list, name, value, extra, 0); 
    30613009+              } else { 
     
    30643012+              } 
    30653013+         } else if (strcmp(type, "src/gz") == 0) { 
    3066 +              if (!nv_pair_list_find(pkg_src_list, name)) { 
     3014+              if (!nv_pair_list_find((nv_pair_list_t *)pkg_src_list, name)) { 
    30673015+                   pkg_src_list_append (pkg_src_list, name, value, extra, 1); 
    30683016+              } else { 
     
    32243172+     return root_filename; 
    32253173+} 
    3226 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_conf.h busybox-1.3.1-911/archival/libipkg/ipkg_conf.h 
    3227 --- busybox-1.3.1-orig/archival/libipkg/ipkg_conf.h     1970-01-01 01:00:00.000000000 +0100 
    3228 +++ busybox-1.3.1-911/archival/libipkg/ipkg_conf.h      2006-12-27 19:41:04.000000000 +0100 
     3174diff -urN busybox.old/archival/libipkg/ipkg_conf.h busybox.dev/archival/libipkg/ipkg_conf.h 
     3175--- busybox.old/archival/libipkg/ipkg_conf.h    1970-01-01 01:00:00.000000000 +0100 
     3176+++ busybox.dev/archival/libipkg/ipkg_conf.h    2007-01-22 13:41:03.000000000 +0100 
    32293177@@ -0,0 +1,107 @@ 
    32303178+/* ipkg_conf.h - the itsy package management system 
     
    33353283+ 
    33363284+#endif 
    3337 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_configure.c busybox-1.3.1-911/archival/libipkg/ipkg_configure.c 
    3338 --- busybox-1.3.1-orig/archival/libipkg/ipkg_configure.c        1970-01-01 01:00:00.000000000 +0100 
    3339 +++ busybox-1.3.1-911/archival/libipkg/ipkg_configure.c 2006-12-27 19:41:04.000000000 +0100 
     3285diff -urN busybox.old/archival/libipkg/ipkg_configure.c busybox.dev/archival/libipkg/ipkg_configure.c 
     3286--- busybox.old/archival/libipkg/ipkg_configure.c       1970-01-01 01:00:00.000000000 +0100 
     3287+++ busybox.dev/archival/libipkg/ipkg_configure.c       2007-01-22 13:41:03.000000000 +0100 
    33403288@@ -0,0 +1,40 @@ 
    33413289+/* ipkg_configure.c - the itsy package management system 
     
    33793327+} 
    33803328+ 
    3381 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_configure.h busybox-1.3.1-911/archival/libipkg/ipkg_configure.h 
    3382 --- busybox-1.3.1-orig/archival/libipkg/ipkg_configure.h        1970-01-01 01:00:00.000000000 +0100 
    3383 +++ busybox-1.3.1-911/archival/libipkg/ipkg_configure.h 2006-12-27 19:41:04.000000000 +0100 
     3329diff -urN busybox.old/archival/libipkg/ipkg_configure.h busybox.dev/archival/libipkg/ipkg_configure.h 
     3330--- busybox.old/archival/libipkg/ipkg_configure.h       1970-01-01 01:00:00.000000000 +0100 
     3331+++ busybox.dev/archival/libipkg/ipkg_configure.h       2007-01-22 13:41:03.000000000 +0100 
    33843332@@ -0,0 +1,25 @@ 
    33853333+/* ipkg_configure.h - the itsy package management system 
     
    34083356+ 
    34093357+#endif 
    3410 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_download.c busybox-1.3.1-911/archival/libipkg/ipkg_download.c 
    3411 --- busybox-1.3.1-orig/archival/libipkg/ipkg_download.c 1970-01-01 01:00:00.000000000 +0100 
    3412 +++ busybox-1.3.1-911/archival/libipkg/ipkg_download.c  2006-12-27 19:41:04.000000000 +0100 
     3358diff -urN busybox.old/archival/libipkg/ipkg_download.c busybox.dev/archival/libipkg/ipkg_download.c 
     3359--- busybox.old/archival/libipkg/ipkg_download.c        1970-01-01 01:00:00.000000000 +0100 
     3360+++ busybox.dev/archival/libipkg/ipkg_download.c        2007-01-22 13:41:06.000000000 +0100 
    34133361@@ -0,0 +1,195 @@ 
    34143362+/* ipkg_download.c - the itsy package management system 
     
    35803528+              return err; 
    35813529+         pkg->local_filename = strdup(url); 
    3582 +         ipkg_message(conf, IPKG_DEBUG2, "Package %s provided by hand \(%s\).\n", pkg->name,pkg->local_filename); 
     3530+         ipkg_message(conf, IPKG_DEBUG2, "Package %s provided by hand (%s).\n", pkg->name,pkg->local_filename); 
    35833531+          pkg->provided_by_hand = 1; 
    35843532+ 
     
    36073555+     return 0; 
    36083556+} 
    3609 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_download.h busybox-1.3.1-911/archival/libipkg/ipkg_download.h 
    3610 --- busybox-1.3.1-orig/archival/libipkg/ipkg_download.h 1970-01-01 01:00:00.000000000 +0100 
    3611 +++ busybox-1.3.1-911/archival/libipkg/ipkg_download.h  2006-12-27 19:41:04.000000000 +0100 
     3557diff -urN busybox.old/archival/libipkg/ipkg_download.h busybox.dev/archival/libipkg/ipkg_download.h 
     3558--- busybox.old/archival/libipkg/ipkg_download.h        1970-01-01 01:00:00.000000000 +0100 
     3559+++ busybox.dev/archival/libipkg/ipkg_download.h        2007-01-22 13:41:03.000000000 +0100 
    36123560@@ -0,0 +1,30 @@ 
    36133561+/* ipkg_download.h - the itsy package management system 
     
    36413589+ 
    36423590+#endif 
    3643 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg.h busybox-1.3.1-911/archival/libipkg/ipkg.h 
    3644 --- busybox-1.3.1-orig/archival/libipkg/ipkg.h  1970-01-01 01:00:00.000000000 +0100 
    3645 +++ busybox-1.3.1-911/archival/libipkg/ipkg.h   2006-12-27 19:41:04.000000000 +0100 
     3591diff -urN busybox.old/archival/libipkg/ipkg.h busybox.dev/archival/libipkg/ipkg.h 
     3592--- busybox.old/archival/libipkg/ipkg.h 1970-01-01 01:00:00.000000000 +0100 
     3593+++ busybox.dev/archival/libipkg/ipkg.h 2007-01-22 13:41:03.000000000 +0100 
    36463594@@ -0,0 +1,74 @@ 
    36473595+/* ipkg.h - the itsy package management system 
     
    37193667+ 
    37203668+#endif 
    3721 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_includes.h busybox-1.3.1-911/archival/libipkg/ipkg_includes.h 
    3722 --- busybox-1.3.1-orig/archival/libipkg/ipkg_includes.h 1970-01-01 01:00:00.000000000 +0100 
    3723 +++ busybox-1.3.1-911/archival/libipkg/ipkg_includes.h  2006-12-27 19:41:04.000000000 +0100 
     3669diff -urN busybox.old/archival/libipkg/ipkg_includes.h busybox.dev/archival/libipkg/ipkg_includes.h 
     3670--- busybox.old/archival/libipkg/ipkg_includes.h        1970-01-01 01:00:00.000000000 +0100 
     3671+++ busybox.dev/archival/libipkg/ipkg_includes.h        2007-01-22 13:41:03.000000000 +0100 
    37243672@@ -0,0 +1,79 @@ 
    37253673+#ifndef IPKG_INCLUDES_H 
     
    38023750+ 
    38033751+#endif /* IPKG_INCLUDES_H */ 
    3804 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_install.c busybox-1.3.1-911/archival/libipkg/ipkg_install.c 
    3805 --- busybox-1.3.1-orig/archival/libipkg/ipkg_install.c  1970-01-01 01:00:00.000000000 +0100 
    3806 +++ busybox-1.3.1-911/archival/libipkg/ipkg_install.c   2006-12-28 02:28:27.000000000 +0100 
     3752diff -urN busybox.old/archival/libipkg/ipkg_install.c busybox.dev/archival/libipkg/ipkg_install.c 
     3753--- busybox.old/archival/libipkg/ipkg_install.c 1970-01-01 01:00:00.000000000 +0100 
     3754+++ busybox.dev/archival/libipkg/ipkg_install.c 2007-01-22 13:41:03.000000000 +0100 
    38073755@@ -0,0 +1,1942 @@ 
    38083756+/* ipkg_install.c - the itsy package management system 
     
    57515699+ 
    57525700+#endif 
    5753 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_install.h busybox-1.3.1-911/archival/libipkg/ipkg_install.h 
    5754 --- busybox-1.3.1-orig/archival/libipkg/ipkg_install.h  1970-01-01 01:00:00.000000000 +0100 
    5755 +++ busybox-1.3.1-911/archival/libipkg/ipkg_install.h   2006-12-27 19:41:04.000000000 +0100 
     5701diff -urN busybox.old/archival/libipkg/ipkg_install.h busybox.dev/archival/libipkg/ipkg_install.h 
     5702--- busybox.old/archival/libipkg/ipkg_install.h 1970-01-01 01:00:00.000000000 +0100 
     5703+++ busybox.dev/archival/libipkg/ipkg_install.h 2007-01-22 13:41:03.000000000 +0100 
    57565704@@ -0,0 +1,35 @@ 
    57575705+/* ipkg_install.h - the itsy package management system 
     
    57905738+ 
    57915739+#endif 
    5792 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_message.c busybox-1.3.1-911/archival/libipkg/ipkg_message.c 
    5793 --- busybox-1.3.1-orig/archival/libipkg/ipkg_message.c  1970-01-01 01:00:00.000000000 +0100 
    5794 +++ busybox-1.3.1-911/archival/libipkg/ipkg_message.c   2006-12-27 19:41:04.000000000 +0100 
     5740diff -urN busybox.old/archival/libipkg/ipkg_message.c busybox.dev/archival/libipkg/ipkg_message.c 
     5741--- busybox.old/archival/libipkg/ipkg_message.c 1970-01-01 01:00:00.000000000 +0100 
     5742+++ busybox.dev/archival/libipkg/ipkg_message.c 2007-01-22 13:41:03.000000000 +0100 
    57955743@@ -0,0 +1,61 @@ 
    57965744+/* ipkg_message.c - the itsy package management system 
     
    58555803+} 
    58565804+#endif 
    5857 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_message.h busybox-1.3.1-911/archival/libipkg/ipkg_message.h 
    5858 --- busybox-1.3.1-orig/archival/libipkg/ipkg_message.h  1970-01-01 01:00:00.000000000 +0100 
    5859 +++ busybox-1.3.1-911/archival/libipkg/ipkg_message.h   2006-12-27 19:41:04.000000000 +0100 
     5805diff -urN busybox.old/archival/libipkg/ipkg_message.h busybox.dev/archival/libipkg/ipkg_message.h 
     5806--- busybox.old/archival/libipkg/ipkg_message.h 1970-01-01 01:00:00.000000000 +0100 
     5807+++ busybox.dev/archival/libipkg/ipkg_message.h 2007-01-22 13:41:03.000000000 +0100 
    58605808@@ -0,0 +1,32 @@ 
    58615809+/* ipkg_message.h - the itsy package management system 
     
    58915839+ 
    58925840+#endif /* _IPKG_MESSAGE_H_ */ 
    5893 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_remove.c busybox-1.3.1-911/archival/libipkg/ipkg_remove.c 
    5894 --- busybox-1.3.1-orig/archival/libipkg/ipkg_remove.c   1970-01-01 01:00:00.000000000 +0100 
    5895 +++ busybox-1.3.1-911/archival/libipkg/ipkg_remove.c    2006-12-27 19:41:04.000000000 +0100 
     5841diff -urN busybox.old/archival/libipkg/ipkg_remove.c busybox.dev/archival/libipkg/ipkg_remove.c 
     5842--- busybox.old/archival/libipkg/ipkg_remove.c  1970-01-01 01:00:00.000000000 +0100 
     5843+++ busybox.dev/archival/libipkg/ipkg_remove.c  2007-01-22 13:41:03.000000000 +0100 
    58965844@@ -0,0 +1,383 @@ 
    58975845+/* ipkg_remove.c - the itsy package management system 
     
    62786226+    return 0; 
    62796227+} 
    6280 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_remove.h busybox-1.3.1-911/archival/libipkg/ipkg_remove.h 
    6281 --- busybox-1.3.1-orig/archival/libipkg/ipkg_remove.h   1970-01-01 01:00:00.000000000 +0100 
    6282 +++ busybox-1.3.1-911/archival/libipkg/ipkg_remove.h    2006-12-27 19:41:04.000000000 +0100 
     6228diff -urN busybox.old/archival/libipkg/ipkg_remove.h busybox.dev/archival/libipkg/ipkg_remove.h 
     6229--- busybox.old/archival/libipkg/ipkg_remove.h  1970-01-01 01:00:00.000000000 +0100 
     6230+++ busybox.dev/archival/libipkg/ipkg_remove.h  2007-01-22 13:41:03.000000000 +0100 
    62836231@@ -0,0 +1,33 @@ 
    62846232+/* ipkg_remove.h - the itsy package management system 
     
    63156263+ 
    63166264+#endif 
    6317 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_upgrade.c busybox-1.3.1-911/archival/libipkg/ipkg_upgrade.c 
    6318 --- busybox-1.3.1-orig/archival/libipkg/ipkg_upgrade.c  1970-01-01 01:00:00.000000000 +0100 
    6319 +++ busybox-1.3.1-911/archival/libipkg/ipkg_upgrade.c   2006-12-27 19:41:04.000000000 +0100 
     6265diff -urN busybox.old/archival/libipkg/ipkg_upgrade.c busybox.dev/archival/libipkg/ipkg_upgrade.c 
     6266--- busybox.old/archival/libipkg/ipkg_upgrade.c 1970-01-01 01:00:00.000000000 +0100 
     6267+++ busybox.dev/archival/libipkg/ipkg_upgrade.c 2007-01-22 13:41:03.000000000 +0100 
    63206268@@ -0,0 +1,77 @@ 
    63216269+/* ipkg_upgrade.c - the itsy package management system 
     
    63966344+     return ipkg_install_pkg(conf, new,1); 
    63976345+} 
    6398 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_upgrade.h busybox-1.3.1-911/archival/libipkg/ipkg_upgrade.h 
    6399 --- busybox-1.3.1-orig/archival/libipkg/ipkg_upgrade.h  1970-01-01 01:00:00.000000000 +0100 
    6400 +++ busybox-1.3.1-911/archival/libipkg/ipkg_upgrade.h   2006-12-27 19:41:04.000000000 +0100 
     6346diff -urN busybox.old/archival/libipkg/ipkg_upgrade.h busybox.dev/archival/libipkg/ipkg_upgrade.h 
     6347--- busybox.old/archival/libipkg/ipkg_upgrade.h 1970-01-01 01:00:00.000000000 +0100 
     6348+++ busybox.dev/archival/libipkg/ipkg_upgrade.h 2007-01-22 13:41:03.000000000 +0100 
    64016349@@ -0,0 +1,18 @@ 
    64026350+/* ipkg_upgrade.c - the itsy package management system 
     
    64186366+ 
    64196367+int ipkg_upgrade_pkg(ipkg_conf_t *conf, pkg_t *old); 
    6420 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_utils.c busybox-1.3.1-911/archival/libipkg/ipkg_utils.c 
    6421 --- busybox-1.3.1-orig/archival/libipkg/ipkg_utils.c    1970-01-01 01:00:00.000000000 +0100 
    6422 +++ busybox-1.3.1-911/archival/libipkg/ipkg_utils.c     2006-12-27 19:41:04.000000000 +0100 
     6368diff -urN busybox.old/archival/libipkg/ipkg_utils.c busybox.dev/archival/libipkg/ipkg_utils.c 
     6369--- busybox.old/archival/libipkg/ipkg_utils.c   1970-01-01 01:00:00.000000000 +0100 
     6370+++ busybox.dev/archival/libipkg/ipkg_utils.c   2007-01-22 13:41:03.000000000 +0100 
    64236371@@ -0,0 +1,181 @@ 
    64246372+/* ipkg_utils.c - the itsy package management system 
     
    66036551+ 
    66046552+        
    6605 diff -ruN busybox-1.3.1-orig/archival/libipkg/ipkg_utils.h busybox-1.3.1-911/archival/libipkg/ipkg_utils.h 
    6606 --- busybox-1.3.1-orig/archival/libipkg/ipkg_utils.h    1970-01-01 01:00:00.000000000 +0100 
    6607 +++ busybox-1.3.1-911/archival/libipkg/ipkg_utils.h     2006-12-27 19:41:04.000000000 +0100 
     6553diff -urN busybox.old/archival/libipkg/ipkg_utils.h busybox.dev/archival/libipkg/ipkg_utils.h 
     6554--- busybox.old/archival/libipkg/ipkg_utils.h   1970-01-01 01:00:00.000000000 +0100 
     6555+++ busybox.dev/archival/libipkg/ipkg_utils.h   2007-01-22 13:41:03.000000000 +0100 
    66086556@@ -0,0 +1,29 @@ 
    66096557+/* ipkg_utils.h - the itsy package management system 
     
    66366584+ 
    66376585+#endif 
    6638 diff -ruN busybox-1.3.1-orig/archival/libipkg/Kbuild busybox-1.3.1-911/archival/libipkg/Kbuild 
    6639 --- busybox-1.3.1-orig/archival/libipkg/Kbuild  1970-01-01 01:00:00.000000000 +0100 
    6640 +++ busybox-1.3.1-911/archival/libipkg/Kbuild   2006-12-28 02:03:22.000000000 +0100 
    6641 @@ -0,0 +1,61 @@ 
     6586diff -urN busybox.old/archival/libipkg/Kbuild busybox.dev/archival/libipkg/Kbuild 
     6587--- busybox.old/archival/libipkg/Kbuild 1970-01-01 01:00:00.000000000 +0100 
     6588+++ busybox.dev/archival/libipkg/Kbuild 2007-01-22 14:01:06.000000000 +0100 
     6589@@ -0,0 +1,60 @@ 
    66426590+# Makefile for busybox 
    66436591+# 
     
    66866634+       file_util.o \ 
    66876635+       ipkg_message.o \ 
    6688 +       md5.o \ 
    66896636+       str_util.o \ 
    66906637+       xsystem.o \ 
     
    67016648+endif 
    67026649+CFLAGS += -DIPKG_LIB -DIPKGLIBDIR="\"/usr/lib\"" -DHOST_CPU_STR="\"$(IPKG_ARCH)\"" 
    6703 diff -ruN busybox-1.3.1-orig/archival/libipkg/libipkg.c busybox-1.3.1-911/archival/libipkg/libipkg.c 
    6704 --- busybox-1.3.1-orig/archival/libipkg/libipkg.c       1970-01-01 01:00:00.000000000 +0100 
    6705 +++ busybox-1.3.1-911/archival/libipkg/libipkg.c        2006-12-27 19:41:04.000000000 +0100 
     6650diff -urN busybox.old/archival/libipkg/libipkg.c busybox.dev/archival/libipkg/libipkg.c 
     6651--- busybox.old/archival/libipkg/libipkg.c      1970-01-01 01:00:00.000000000 +0100 
     6652+++ busybox.dev/archival/libipkg/libipkg.c      2007-01-22 13:41:06.000000000 +0100 
    67066653@@ -0,0 +1,527 @@ 
    67076654+/* ipkglib.c - the itsy package management system 
     
    71527099+ipkg_op (int argc, char *argv[]) 
    71537100+{ 
    7154 +       int err, optind; 
     7101+       int err, opt_index; 
    71557102+       args_t args; 
    71567103+       char *cmd_name; 
     
    71607107+       args_init (&args); 
    71617108+ 
    7162 +       optind = args_parse (&args, argc, argv); 
    7163 +       if (optind == argc || optind < 0) 
     7109+       opt_index = args_parse (&args, argc, argv); 
     7110+       if (opt_index == argc || opt_index < 0) 
    71647111+       { 
    71657112+               args_usage ("ipkg must have one sub-command argument"); 
    71667113+       } 
    71677114+ 
    7168 +       cmd_name = argv[optind++]; 
     7115+       cmd_name = argv[opt_index++]; 
    71697116+/* Pigi: added a flag to disable the checking of structures if the command does not need to  
    71707117+         read anything from there. 
     
    72167163+       } 
    72177164+ 
    7218 +       if (cmd->requires_args && optind == argc) 
     7165+       if (cmd->requires_args && opt_index == argc) 
    72197166+       { 
    72207167+               fprintf (stderr, 
     
    72247171+       } 
    72257172+ 
    7226 +       err = ipkg_cmd_exec (cmd, &ipkg_conf, argc - optind, (const char **) (argv + optind), NULL); 
     7173+       err = ipkg_cmd_exec (cmd, &ipkg_conf, argc - opt_index, (const char **) (argv + opt_index), NULL); 
    72277174+ 
    72287175+       ipkg_conf_deinit (&ipkg_conf); 
     
    72327179+ 
    72337180+#endif /* IPKG_LIB */ 
    7234 diff -ruN busybox-1.3.1-orig/archival/libipkg/libipkg.h busybox-1.3.1-911/archival/libipkg/libipkg.h 
    7235 --- busybox-1.3.1-orig/archival/libipkg/libipkg.h       1970-01-01 01:00:00.000000000 +0100 
    7236 +++ busybox-1.3.1-911/archival/libipkg/libipkg.h        2006-12-27 19:41:04.000000000 +0100 
     7181diff -urN busybox.old/archival/libipkg/libipkg.h busybox.dev/archival/libipkg/libipkg.h 
     7182--- busybox.old/archival/libipkg/libipkg.h      1970-01-01 01:00:00.000000000 +0100 
     7183+++ busybox.dev/archival/libipkg/libipkg.h      2007-01-22 13:41:03.000000000 +0100 
    72377184@@ -0,0 +1,87 @@ 
    72387185+/* ipkglib.h - the itsy package management system 
     
    73237270+ 
    73247271+#endif 
    7325 diff -ruN busybox-1.3.1-orig/archival/libipkg/md5.c busybox-1.3.1-911/archival/libipkg/md5.c 
    7326 --- busybox-1.3.1-orig/archival/libipkg/md5.c   1970-01-01 01:00:00.000000000 +0100 
    7327 +++ busybox-1.3.1-911/archival/libipkg/md5.c    2006-12-27 19:41:04.000000000 +0100 
    7328 @@ -0,0 +1,48 @@ 
    7329 +/* md5.c - wrappers to busybox md5 functions 
    7330 + * 
    7331 + * Copyright (C) 1995-1999 Free Software Foundation, Inc. 
    7332 + * 
    7333 + * This program is free software; you can redistribute it and/or modify 
    7334 + * it under the terms of the GNU General Public License as published by 
    7335 + * the Free Software Foundation; either version 2, or (at your option) 
    7336 + * any later version. 
    7337 + * 
    7338 + * This program is distributed in the hope that it will be useful, 
    7339 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    7340 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    7341 + * GNU General Public License for more details. 
    7342 + * 
    7343 + * You should have received a copy of the GNU General Public License 
    7344 + * along with this program; if not, write to the Free Software Foundation, 
    7345 + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
    7346 + */ 
    7347 + 
    7348 +#include <stdio.h> 
    7349 +#include "libbb.h" 
    7350 + 
    7351 +#include "md5.h" 
    7352 + 
    7353 +int md5_stream(FILE *stream, void *resblock) 
    7354 +{ 
    7355 +       int fd; 
    7356 +       int sum; 
    7357 +        
    7358 +       if( (fd = fileno(stream)) == -1 ) { 
    7359 +               bb_error_msg("bad file descriptor"); 
    7360 +               return 1; 
    7361 +       } 
    7362 + 
    7363 +       hash_fd(fd, HASH_MD5, (uint8_t *)resblock); 
    7364 + 
    7365 +       return 0; 
    7366 +} 
    7367 + 
    7368 +void *md5_buffer(const char *buffer, size_t len, void *resblock) 
    7369 +{ 
    7370 +       md5_ctx_t md5_cx; 
    7371 + 
    7372 +       md5_begin(&md5_cx); 
    7373 +       md5_hash(buffer, len, &md5_cx); 
    7374 +       return md5_end(resblock, &md5_cx); 
    7375 +} 
    7376 + 
    7377 diff -ruN busybox-1.3.1-orig/archival/libipkg/md5.h busybox-1.3.1-911/archival/libipkg/md5.h 
    7378 --- busybox-1.3.1-orig/archival/libipkg/md5.h   1970-01-01 01:00:00.000000000 +0100 
    7379 +++ busybox-1.3.1-911/archival/libipkg/md5.h    2006-12-27 19:41:04.000000000 +0100 
    7380 @@ -0,0 +1,35 @@ 
    7381 +/* md5.h - Compute MD5 checksum of files or strings according to the 
    7382 + *         definition of MD5 in RFC 1321 from April 1992. 
    7383 + * Copyright (C) 1995-1999 Free Software Foundation, Inc. 
    7384 + * 
    7385 + * This program is free software; you can redistribute it and/or modify 
    7386 + * it under the terms of the GNU General Public License as published by 
    7387 + * the Free Software Foundation; either version 2, or (at your option) 
    7388 + * any later version. 
    7389 + * 
    7390 + * This program is distributed in the hope that it will be useful, 
    7391 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    7392 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    7393 + * GNU General Public License for more details. 
    7394 + * 
    7395 + * You should have received a copy of the GNU General Public License 
    7396 + * along with this program; if not, write to the Free Software Foundation, 
    7397 + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
    7398 + */ 
    7399 + 
    7400 +#ifndef MD5_H 
    7401 +#define MD5_H 
    7402 + 
    7403 +/* Compute MD5 message digest for bytes read from STREAM.  The 
    7404 +   resulting message digest number will be written into the 16 bytes 
    7405 +   beginning at RESBLOCK.  */ 
    7406 +int md5_stream(FILE *stream, void *resblock); 
    7407 + 
    7408 +/* Compute MD5 message digest for LEN bytes beginning at BUFFER.  The 
    7409 +   result is always in little endian byte order, so that a byte-wise 
    7410 +   output yields to the wanted ASCII representation of the message 
    7411 +   digest.  */ 
    7412 +void *md5_buffer(const char *buffer, size_t len, void *resblock); 
    7413 + 
    7414 +#endif 
    7415 + 
    7416 diff -ruN busybox-1.3.1-orig/archival/libipkg/nv_pair.c busybox-1.3.1-911/archival/libipkg/nv_pair.c 
    7417 --- busybox-1.3.1-orig/archival/libipkg/nv_pair.c       1970-01-01 01:00:00.000000000 +0100 
    7418 +++ busybox-1.3.1-911/archival/libipkg/nv_pair.c        2006-12-27 19:41:04.000000000 +0100 
     7272diff -urN busybox.old/archival/libipkg/nv_pair.c busybox.dev/archival/libipkg/nv_pair.c 
     7273--- busybox.old/archival/libipkg/nv_pair.c      1970-01-01 01:00:00.000000000 +0100 
     7274+++ busybox.dev/archival/libipkg/nv_pair.c      2007-01-22 13:41:03.000000000 +0100 
    74197275@@ -0,0 +1,40 @@ 
    74207276+/* nv_pair.c - the itsy package management system 
     
    74587314+ 
    74597315+ 
    7460 diff -ruN busybox-1.3.1-orig/archival/libipkg/nv_pair.h busybox-1.3.1-911/archival/libipkg/nv_pair.h 
    7461 --- busybox-1.3.1-orig/archival/libipkg/nv_pair.h       1970-01-01 01:00:00.000000000 +0100 
    7462 +++ busybox-1.3.1-911/archival/libipkg/nv_pair.h        2006-12-27 19:41:04.000000000 +0100 
     7316diff -urN busybox.old/archival/libipkg/nv_pair.h busybox.dev/archival/libipkg/nv_pair.h 
     7317--- busybox.old/archival/libipkg/nv_pair.h      1970-01-01 01:00:00.000000000 +0100 
     7318+++ busybox.dev/archival/libipkg/nv_pair.h      2007-01-22 13:41:03.000000000 +0100 
    74637319@@ -0,0 +1,32 @@ 
    74647320+/* nv_pair.h - the itsy package management system 
     
    74947350+#endif 
    74957351+ 
    7496 diff -ruN busybox-1.3.1-orig/archival/libipkg/nv_pair_list.c busybox-1.3.1-911/archival/libipkg/nv_pair_list.c 
    7497 --- busybox-1.3.1-orig/archival/libipkg/nv_pair_list.c  1970-01-01 01:00:00.000000000 +0100 
    7498 +++ busybox-1.3.1-911/archival/libipkg/nv_pair_list.c   2006-12-27 19:41:04.000000000 +0100 
     7352diff -urN busybox.old/archival/libipkg/nv_pair_list.c busybox.dev/archival/libipkg/nv_pair_list.c 
     7353--- busybox.old/archival/libipkg/nv_pair_list.c 1970-01-01 01:00:00.000000000 +0100 
     7354+++ busybox.dev/archival/libipkg/nv_pair_list.c 2007-01-22 13:41:03.000000000 +0100 
    74997355@@ -0,0 +1,98 @@ 
    75007356+/* nv_pair_list.c - the itsy package management system 
     
    75967452+     return NULL; 
    75977453+} 
    7598 diff -ruN busybox-1.3.1-orig/archival/libipkg/nv_pair_list.h busybox-1.3.1-911/archival/libipkg/nv_pair_list.h 
    7599 --- busybox-1.3.1-orig/archival/libipkg/nv_pair_list.h  1970-01-01 01:00:00.000000000 +0100 
    7600 +++ busybox-1.3.1-911/archival/libipkg/nv_pair_list.h   2006-12-27 19:41:04.000000000 +0100 
     7454diff -urN busybox.old/archival/libipkg/nv_pair_list.h busybox.dev/archival/libipkg/nv_pair_list.h 
     7455--- busybox.old/archival/libipkg/nv_pair_list.h 1970-01-01 01:00:00.000000000 +0100 
     7456+++ busybox.dev/archival/libipkg/nv_pair_list.h 2007-01-22 13:41:03.000000000 +0100 
    76017457@@ -0,0 +1,60 @@ 
    76027458+/* nv_pair_list.h - the itsy package management system 
     
    76607516+#endif 
    76617517+ 
    7662 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg.c busybox-1.3.1-911/archival/libipkg/pkg.c 
    7663 --- busybox-1.3.1-orig/archival/libipkg/pkg.c   1970-01-01 01:00:00.000000000 +0100 
    7664 +++ busybox-1.3.1-911/archival/libipkg/pkg.c    2006-12-27 19:41:04.000000000 +0100 
    7665 @@ -0,0 +1,1754 @@ 
     7518diff -urN busybox.old/archival/libipkg/pkg.c busybox.dev/archival/libipkg/pkg.c 
     7519--- busybox.old/archival/libipkg/pkg.c  1970-01-01 01:00:00.000000000 +0100 
     7520+++ busybox.dev/archival/libipkg/pkg.c  2007-01-22 13:41:10.000000000 +0100 
     7521@@ -0,0 +1,1747 @@ 
    76667522+/* pkg.c - the itsy package management system 
    76677523+ 
     
    80257881+         oldpkg->essential = newpkg->essential; 
    80267882+ 
     7883+     oldpkg->provided_by_hand |= newpkg->provided_by_hand; 
     7884+ 
    80277885+     return 0; 
    80287886+} 
     
    81948052+{ 
    81958053+     static size_t LINE_LEN = 128; 
     8054+     char line_str[LINE_LEN]; 
    81968055+     char * temp = (char *)malloc(1); 
    81978056+     int len = 0; 
     
    82338092+              /* Conffiles */ 
    82348093+              conffile_list_elt_t *iter; 
    8235 +               char confstr[LINE_LEN]; 
    82368094+ 
    82378095+              if (pkg->conffiles.head == NULL) { 
     
    82548112+              for (iter = pkg->conffiles.head; iter; iter = iter->next) { 
    82558113+                   if (iter->data->name && iter->data->value) { 
    8256 +                         snprintf(confstr, LINE_LEN, "%s %s\n", iter->data->name, iter->data->value); 
    8257 +                         strncat(temp, confstr, strlen(confstr));            
     8114+                         snprintf(line_str, LINE_LEN, "%s %s\n", iter->data->name, iter->data->value); 
     8115+                         strncat(temp, line_str, strlen(line_str));            
    82588116+                   } 
    82598117+              } 
     
    82628120+ 
    82638121+              if (pkg->conflicts_count) { 
    8264 +                    char conflictstr[LINE_LEN]; 
    82658122+                    len = 14 ; 
    82668123+                   for(i = 0; i < pkg->conflicts_count; i++) { 
     
    82758132+                    strncpy(temp, "Conflicts:", 11); 
    82768133+                   for(i = 0; i < pkg->conflicts_count; i++) { 
    8277 +                        snprintf(conflictstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->conflicts_str[i]); 
    8278 +                        strncat(temp, conflictstr, strlen(conflictstr));            
     8134+                        snprintf(line_str, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->conflicts_str[i]); 
     8135+                        strncat(temp, line_str, strlen(line_str));            
    82798136+                    } 
    82808137+                    strncat(temp, "\n", strlen("\n"));  
     
    82918148+ 
    82928149+              if (pkg->depends_count) { 
    8293 +                    char depstr[LINE_LEN]; 
    82948150+                    len = 14 ; 
    82958151+                   for(i = 0; i < pkg->depends_count; i++) { 
     
    83048160+                    strncpy(temp, "Depends:", 10); 
    83058161+                   for(i = 0; i < pkg->depends_count; i++) { 
    8306 +                        snprintf(depstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->depends_str[i]); 
    8307 +                        strncat(temp, depstr, strlen(depstr));            
     8162+                        snprintf(line_str, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->depends_str[i]); 
     8163+                        strncat(temp, line_str, strlen(line_str));            
    83088164+                    } 
    83098165+                    strncat(temp, "\n", strlen("\n"));  
     
    84708326+         if (strcasecmp (field, "Replaces") == 0) { 
    84718327+              if (pkg->replaces_count) { 
    8472 +                    char replstr[LINE_LEN]; 
    84738328+                    len = 14; 
    84748329+                   for (i = 0; i < pkg->replaces_count; i++) { 
     
    84838338+                    strncpy(temp, "Replaces:", 12); 
    84848339+                   for (i = 0; i < pkg->replaces_count; i++) { 
    8485 +                        snprintf(replstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->replaces_str[i]); 
    8486 +                        strncat(temp, replstr, strlen(replstr));            
     8340+                        snprintf(line_str, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->replaces_str[i]); 
     8341+                        strncat(temp, line_str, strlen(line_str));            
    84878342+                    } 
    84888343+                    strncat(temp, "\n", strlen("\n"));  
     
    84908345+         } else if (strcasecmp (field, "Recommends") == 0) { 
    84918346+              if (pkg->recommends_count) { 
    8492 +                    char recstr[LINE_LEN]; 
    84938347+                    len = 15; 
    84948348+                   for(i = 0; i < pkg->recommends_count; i++) { 
     
    85038357+                    strncpy(temp, "Recommends:", 13); 
    85048358+                   for(i = 0; i < pkg->recommends_count; i++) { 
    8505 +                        snprintf(recstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->recommends_str[i]); 
    8506 +                        strncat(temp, recstr, strlen(recstr));            
     8359+                        snprintf(line_str, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->recommends_str[i]); 
     8360+                        strncat(temp, line_str, strlen(line_str));            
    85078361+                    } 
    85088362+                    strncat(temp, "\n", strlen("\n"));  
     
    85738427+              if (pkg->suggests_count) { 
    85748428+                   int i; 
    8575 +                    char sugstr[LINE_LEN]; 
    85768429+                    len = 13; 
    85778430+                   for(i = 0; i < pkg->suggests_count; i++) { 
     
    85868439+                    strncpy(temp, "Suggests:", 10); 
    85878440+                   for(i = 0; i < pkg->suggests_count; i++) { 
    8588 +                        snprintf(sugstr, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->suggests_str[i]); 
    8589 +                        strncat(temp, sugstr, strlen(sugstr));            
     8441+                        snprintf(line_str, LINE_LEN, "%s %s", i == 0 ? "" : ",", pkg->suggests_str[i]); 
     8442+                        strncat(temp, line_str, strlen(line_str));            
    85908443+                    } 
    85918444+                    strncat(temp, "\n", strlen("\n"));  
     
    88068659+} 
    88078660+ 
    8808 +int pkg_name_version_and_architecture_compare(void *p1, void *p2) 
    8809 +{ 
    8810 +     const pkg_t *a = *(const pkg_t **)p1; 
    8811 +     const pkg_t *b = *(const pkg_t **)p2; 
     8661+int pkg_name_version_and_architecture_compare(pkg_t *a, pkg_t *b) 
     8662+{ 
    88128663+     int namecmp; 
    88138664+     int vercmp; 
     
    88368687+} 
    88378688+ 
    8838 +int abstract_pkg_name_compare(void *p1, void *p2) 
    8839 +{ 
    8840 +     const abstract_pkg_t *a = *(const abstract_pkg_t **)p1; 
    8841 +     const abstract_pkg_t *b = *(const abstract_pkg_t **)p2; 
     8689+int abstract_pkg_name_compare(abstract_pkg_t *a, abstract_pkg_t *b) 
     8690+{ 
    88428691+     if (!a->name || !b->name) { 
    88438692+       fprintf(stderr, "abstract_pkg_name_compare: a=%p a->name=%p b=%p b->name=%p\n", 
     
    88598708+ 
    88608709+     if (pkg->epoch) { 
    8861 +         sprintf_alloc(&epoch_str, "%d:", pkg->epoch); 
     8710+         sprintf_alloc(&epoch_str, "%d:", (int)(pkg->epoch)); 
    88628711+     } else { 
    88638712+         epoch_str = strdup(""); 
     
    94189267+     return 0; 
    94199268+} 
    9420 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_depends.c busybox-1.3.1-911/archival/libipkg/pkg_depends.c 
    9421 --- busybox-1.3.1-orig/archival/libipkg/pkg_depends.c   1970-01-01 01:00:00.000000000 +0100 
    9422 +++ busybox-1.3.1-911/archival/libipkg/pkg_depends.c    2006-12-27 19:41:04.000000000 +0100 
    9423 @@ -0,0 +1,1033 @@ 
     9269diff -urN busybox.old/archival/libipkg/pkg_depends.c busybox.dev/archival/libipkg/pkg_depends.c 
     9270--- busybox.old/archival/libipkg/pkg_depends.c  1970-01-01 01:00:00.000000000 +0100 
     9271+++ busybox.dev/archival/libipkg/pkg_depends.c  2007-01-22 13:41:06.000000000 +0100 
     9272@@ -0,0 +1,1031 @@ 
    94249273+/* pkg_depends.c - the itsy package management system 
    94259274+ 
     
    94929341+{ 
    94939342+     pkg_t * satisfier_entry_pkg; 
    9494 +     register int i, j, k; 
     9343+     register int i, j, k, l; 
    94959344+     int count, found; 
    94969345+     char ** the_lost; 
     
    95379386+                   int nposs = ab_provider_vec->len; 
    95389387+                   abstract_pkg_t **ab_providers = ab_provider_vec->pkgs;  
    9539 +                   int l; 
    95409388+                   for (l = 0; l < nposs; l++) { 
    95419389+                        pkg_vec_t *test_vec = ab_providers[l]->pkgs; 
     
    95619409+                                                                               &newstuff); 
    95629410+                                  if (newstuff == NULL) { 
    9563 +                                       int i; 
    95649411+                                       int ok = 1; 
    9565 +                                       for (i = 0; i < rc; i++) { 
    9566 +                                           pkg_t *p = tmp_vec->pkgs[i]; 
     9412+                                       for (l = 0; l < rc; l++) { 
     9413+                                           pkg_t *p = tmp_vec->pkgs[l]; 
    95679414+                                           if (p->state_want == SW_INSTALL) 
    95689415+                                               continue; 
     
    1023810085+ *   [npredepends+nrecommends+nsuggests,npredepends+nrecommends+nsuggests+ndepends) -> returns depends_str[index] 
    1023910086+ */ 
    10240 +char *pkg_depend_str(pkg_t *pkg, int index) 
    10241 +{ 
    10242 +     if (index < pkg->pre_depends_count) { 
    10243 +         return pkg->pre_depends_str[index]; 
    10244 +     } 
    10245 +     index -= pkg->pre_depends_count; 
    10246 + 
    10247 +     if (index < pkg->recommends_count) { 
    10248 +         return pkg->recommends_str[index]; 
    10249 +     } 
    10250 +     index -= pkg->recommends_count; 
    10251 + 
    10252 +     if (index < pkg->suggests_count) { 
    10253 +         return pkg->suggests_str[index]; 
    10254 +     } 
    10255 +     index -= pkg->suggests_count; 
    10256 + 
    10257 +     if (index < pkg->depends_count) { 
    10258 +         return pkg->depends_str[index]; 
    10259 +     } 
    10260 +     fprintf(stderr, "pkg_depend_str: index %d out of range for pkg=%s\n", index, pkg->name); 
     10087+char *pkg_depend_str(pkg_t *pkg, int pkg_index) 
     10088+{ 
     10089+     if (pkg_index < pkg->pre_depends_count) { 
     10090+         return pkg->pre_depends_str[pkg_index]; 
     10091+     } 
     10092+     pkg_index -= pkg->pre_depends_count; 
     10093+ 
     10094+     if (pkg_index < pkg->recommends_count) { 
     10095+         return pkg->recommends_str[pkg_index]; 
     10096+     } 
     10097+     pkg_index -= pkg->recommends_count; 
     10098+ 
     10099+     if (pkg_index < pkg->suggests_count) { 
     10100+         return pkg->suggests_str[pkg_index]; 
     10101+     } 
     10102+     pkg_index -= pkg->suggests_count; 
     10103+ 
     10104+     if (pkg_index < pkg->depends_count) { 
     10105+         return pkg->depends_str[pkg_index]; 
     10106+     } 
     10107+     fprintf(stderr, "pkg_depend_str: index %d out of range for pkg=%s\n", pkg_index, pkg->name); 
    1026110108+     return NULL; 
    1026210109+} 
     
    1045510302+     return 0; 
    1045610303+} 
    10457 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_depends.h busybox-1.3.1-911/archival/libipkg/pkg_depends.h 
    10458 --- busybox-1.3.1-orig/archival/libipkg/pkg_depends.h   1970-01-01 01:00:00.000000000 +0100 
    10459 +++ busybox-1.3.1-911/archival/libipkg/pkg_depends.h    2006-12-27 19:41:04.000000000 +0100 
     10304diff -urN busybox.old/archival/libipkg/pkg_depends.h busybox.dev/archival/libipkg/pkg_depends.h 
     10305--- busybox.old/archival/libipkg/pkg_depends.h  1970-01-01 01:00:00.000000000 +0100 
     10306+++ busybox.dev/archival/libipkg/pkg_depends.h  2007-01-22 13:41:06.000000000 +0100 
    1046010307@@ -0,0 +1,105 @@ 
    1046110308+/* pkg_depends.h - the itsy package management system 
     
    1055310400+int pkg_conflicts(pkg_t *pkg, pkg_t *conflicts); 
    1055410401+ 
    10555 +char *pkg_depend_str(pkg_t *pkg, int index); 
     10402+char *pkg_depend_str(pkg_t *pkg, int pkg_index); 
    1055610403+void buildDependedUponBy(pkg_t * pkg, abstract_pkg_t * ab_pkg); 
    1055710404+void freeDepends(pkg_t *pkg); 
     
    1056410411+ 
    1056510412+#endif 
    10566 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_dest.c busybox-1.3.1-911/archival/libipkg/pkg_dest.c 
    10567 --- busybox-1.3.1-orig/archival/libipkg/pkg_dest.c      1970-01-01 01:00:00.000000000 +0100 
    10568 +++ busybox-1.3.1-911/archival/libipkg/pkg_dest.c       2006-12-27 19:41:04.000000000 +0100 
     10413diff -urN busybox.old/archival/libipkg/pkg_dest.c busybox.dev/archival/libipkg/pkg_dest.c 
     10414--- busybox.old/archival/libipkg/pkg_dest.c     1970-01-01 01:00:00.000000000 +0100 
     10415+++ busybox.dev/archival/libipkg/pkg_dest.c     2007-01-22 13:41:03.000000000 +0100 
    1056910416@@ -0,0 +1,92 @@ 
    1057010417+/* pkg_dest.c - the itsy package management system 
     
    1066010507+    dest->root_dir = NULL; 
    1066110508+} 
    10662 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_dest.h busybox-1.3.1-911/archival/libipkg/pkg_dest.h 
    10663 --- busybox-1.3.1-orig/archival/libipkg/pkg_dest.h      1970-01-01 01:00:00.000000000 +0100 
    10664 +++ busybox-1.3.1-911/archival/libipkg/pkg_dest.h       2006-12-27 19:41:04.000000000 +0100 
     10509diff -urN busybox.old/archival/libipkg/pkg_dest.h busybox.dev/archival/libipkg/pkg_dest.h 
     10510--- busybox.old/archival/libipkg/pkg_dest.h     1970-01-01 01:00:00.000000000 +0100 
     10511+++ busybox.dev/archival/libipkg/pkg_dest.h     2007-01-22 13:41:03.000000000 +0100 
    1066510512@@ -0,0 +1,38 @@ 
    1066610513+/* pkg_dest.h - the itsy package management system 
     
    1070210549+#endif 
    1070310550+ 
    10704 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_dest_list.c busybox-1.3.1-911/archival/libipkg/pkg_dest_list.c 
    10705 --- busybox-1.3.1-orig/archival/libipkg/pkg_dest_list.c 1970-01-01 01:00:00.000000000 +0100 
    10706 +++ busybox-1.3.1-911/archival/libipkg/pkg_dest_list.c  2006-12-27 19:41:04.000000000 +0100 
     10551diff -urN busybox.old/archival/libipkg/pkg_dest_list.c busybox.dev/archival/libipkg/pkg_dest_list.c 
     10552--- busybox.old/archival/libipkg/pkg_dest_list.c        1970-01-01 01:00:00.000000000 +0100 
     10553+++ busybox.dev/archival/libipkg/pkg_dest_list.c        2007-01-22 13:41:03.000000000 +0100 
    1070710554@@ -0,0 +1,85 @@ 
    1070810555+/* pkg_dest_list.c - the itsy package management system 
     
    1079110638+    return (pkg_dest_list_elt_t *) void_list_pop((void_list_t *) list); 
    1079210639+} 
    10793 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_dest_list.h busybox-1.3.1-911/archival/libipkg/pkg_dest_list.h 
    10794 --- busybox-1.3.1-orig/archival/libipkg/pkg_dest_list.h 1970-01-01 01:00:00.000000000 +0100 
    10795 +++ busybox-1.3.1-911/archival/libipkg/pkg_dest_list.h  2006-12-27 19:41:04.000000000 +0100 
     10640diff -urN busybox.old/archival/libipkg/pkg_dest_list.h busybox.dev/archival/libipkg/pkg_dest_list.h 
     10641--- busybox.old/archival/libipkg/pkg_dest_list.h        1970-01-01 01:00:00.000000000 +0100 
     10642+++ busybox.dev/archival/libipkg/pkg_dest_list.h        2007-01-22 13:41:03.000000000 +0100 
    1079610643@@ -0,0 +1,50 @@ 
    1079710644+/* pkg_dest_list.h - the itsy package management system 
     
    1084510692+#endif 
    1084610693+ 
    10847 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_extract.c busybox-1.3.1-911/archival/libipkg/pkg_extract.c 
    10848 --- busybox-1.3.1-orig/archival/libipkg/pkg_extract.c   1970-01-01 01:00:00.000000000 +0100 
    10849 +++ busybox-1.3.1-911/archival/libipkg/pkg_extract.c    2006-12-28 02:28:27.000000000 +0100 
     10694diff -urN busybox.old/archival/libipkg/pkg_extract.c busybox.dev/archival/libipkg/pkg_extract.c 
     10695--- busybox.old/archival/libipkg/pkg_extract.c  1970-01-01 01:00:00.000000000 +0100 
     10696+++ busybox.dev/archival/libipkg/pkg_extract.c  2007-01-22 13:41:03.000000000 +0100 
    1085010697@@ -0,0 +1,224 @@ 
    1085110698+/* pkg_extract.c - the itsy package management system 
     
    1107310920+       return 0; 
    1107410921+} 
    11075 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_extract.h busybox-1.3.1-911/archival/libipkg/pkg_extract.h 
    11076 --- busybox-1.3.1-orig/archival/libipkg/pkg_extract.h   1970-01-01 01:00:00.000000000 +0100 
    11077 +++ busybox-1.3.1-911/archival/libipkg/pkg_extract.h    2006-12-27 19:41:04.000000000 +0100 
     10922diff -urN busybox.old/archival/libipkg/pkg_extract.h busybox.dev/archival/libipkg/pkg_extract.h 
     10923--- busybox.old/archival/libipkg/pkg_extract.h  1970-01-01 01:00:00.000000000 +0100 
     10924+++ busybox.dev/archival/libipkg/pkg_extract.h  2007-01-22 13:41:03.000000000 +0100 
    1107810925@@ -0,0 +1,32 @@ 
    1107910926+/* pkg_extract.c - the itsy package management system 
     
    1110910956+ 
    1111010957+#endif 
    11111 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg.h busybox-1.3.1-911/archival/libipkg/pkg.h 
    11112 --- busybox-1.3.1-orig/archival/libipkg/pkg.h   1970-01-01 01:00:00.000000000 +0100 
    11113 +++ busybox-1.3.1-911/archival/libipkg/pkg.h    2006-12-27 19:41:04.000000000 +0100 
     10958diff -urN busybox.old/archival/libipkg/pkg.h busybox.dev/archival/libipkg/pkg.h 
     10959--- busybox.old/archival/libipkg/pkg.h  1970-01-01 01:00:00.000000000 +0100 
     10960+++ busybox.dev/archival/libipkg/pkg.h  2007-01-22 13:41:06.000000000 +0100 
    1111410961@@ -0,0 +1,232 @@ 
    1111510962+/* pkg.h - the itsy package management system 
     
    1130911156+ 
    1131011157+int pkg_compare_versions(const pkg_t *pkg, const pkg_t *ref_pkg); 
    11311 +int pkg_name_version_and_architecture_compare(void *a, void *b); 
    11312 +int abstract_pkg_name_compare(void *a, void *b); 
     11158+int pkg_name_version_and_architecture_compare(pkg_t *a, pkg_t *b); 
     11159+int abstract_pkg_name_compare(abstract_pkg_t *a, abstract_pkg_t *b); 
    1131311160+ 
    1131411161+char * pkg_formatted_info(pkg_t *pkg ); 
     
    1134511192+ 
    1134611193+#endif 
    11347 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_hash.c busybox-1.3.1-911/archival/libipkg/pkg_hash.c 
    11348 --- busybox-1.3.1-orig/archival/libipkg/pkg_hash.c      1970-01-01 01:00:00.000000000 +0100 
    11349 +++ busybox-1.3.1-911/archival/libipkg/pkg_hash.c       2006-12-27 19:41:04.000000000 +0100 
    11350 @@ -0,0 +1,617 @@ 
     11194diff -urN busybox.old/archival/libipkg/pkg_hash.c busybox.dev/archival/libipkg/pkg_hash.c 
     11195--- busybox.old/archival/libipkg/pkg_hash.c     1970-01-01 01:00:00.000000000 +0100 
     11196+++ busybox.dev/archival/libipkg/pkg_hash.c     2007-01-22 13:41:06.000000000 +0100 
     11197@@ -0,0 +1,616 @@ 
    1135111198+/* ipkg_hash.c - the itsy package management system 
    1135211199+ 
     
    1149511342+                                                 int (*constraint_fcn)(pkg_t *pkg, void *cdata), void *cdata, int quiet) 
    1149611343+{ 
    11497 +     int i;  
     11344+     int i, j; 
    1149811345+     int nprovides = 0; 
    1149911346+     int nmatching = 0; 
     
    1156111408+         { 
    1156211409+              int max_count = 0; 
    11563 +              int i; 
    1156411410+ 
    1156511411+              /* count packages matching max arch priority and keep track of last one */ 
    11566 +              for (i = 0; i < vec->len; i++) { 
    11567 +                   pkg_t *maybe = vec->pkgs[i]; 
     11412+              for (j = 0; j < vec->len; j++) { 
     11413+                   pkg_t *maybe = vec->pkgs[j]; 
    1156811414+                   ipkg_message(conf, IPKG_DEBUG, "  %s arch=%s arch_priority=%d version=%s  \n", 
    1156911415+                                maybe->name, maybe->architecture, maybe->arch_priority, maybe->version); 
     
    1196711813+ 
    1196811814+ 
    11969 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_hash.h busybox-1.3.1-911/archival/libipkg/pkg_hash.h 
    11970 --- busybox-1.3.1-orig/archival/libipkg/pkg_hash.h      1970-01-01 01:00:00.000000000 +0100 
    11971 +++ busybox-1.3.1-911/archival/libipkg/pkg_hash.h       2006-12-27 19:41:04.000000000 +0100 
     11815diff -urN busybox.old/archival/libipkg/pkg_hash.h busybox.dev/archival/libipkg/pkg_hash.h 
     11816--- busybox.old/archival/libipkg/pkg_hash.h     1970-01-01 01:00:00.000000000 +0100 
     11817+++ busybox.dev/archival/libipkg/pkg_hash.h     2007-01-22 13:41:03.000000000 +0100 
    1197211818@@ -0,0 +1,61 @@ 
    1197311819+/* pkg_hash.h - the itsy package management system 
     
    1203211878+#endif 
    1203311879+ 
    12034 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_parse.c busybox-1.3.1-911/archival/libipkg/pkg_parse.c 
    12035 --- busybox-1.3.1-orig/archival/libipkg/pkg_parse.c     1970-01-01 01:00:00.000000000 +0100 
    12036 +++ busybox-1.3.1-911/archival/libipkg/pkg_parse.c      2006-12-27 19:41:04.000000000 +0100 
     11880diff -urN busybox.old/archival/libipkg/pkg_parse.c busybox.dev/archival/libipkg/pkg_parse.c 
     11881--- busybox.old/archival/libipkg/pkg_parse.c    1970-01-01 01:00:00.000000000 +0100 
     11882+++ busybox.dev/archival/libipkg/pkg_parse.c    2007-01-22 13:41:03.000000000 +0100 
    1203711883@@ -0,0 +1,366 @@ 
    1203811884+/* pkg_parse.c - the itsy package management system 
     
    1240212248+    return 0; 
    1240312249+} 
    12404 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_parse.h busybox-1.3.1-911/archival/libipkg/pkg_parse.h 
    12405 --- busybox-1.3.1-orig/archival/libipkg/pkg_parse.h     1970-01-01 01:00:00.000000000 +0100 
    12406 +++ busybox-1.3.1-911/archival/libipkg/pkg_parse.h      2006-12-27 19:41:04.000000000 +0100 
     12250diff -urN busybox.old/archival/libipkg/pkg_parse.h busybox.dev/archival/libipkg/pkg_parse.h 
     12251--- busybox.old/archival/libipkg/pkg_parse.h    1970-01-01 01:00:00.000000000 +0100 
     12252+++ busybox.dev/archival/libipkg/pkg_parse.h    2007-01-22 13:41:03.000000000 +0100 
    1240712253@@ -0,0 +1,31 @@ 
    1240812254+/* pkg_parse.h - the itsy package management system 
     
    1243712283+ 
    1243812284+#endif 
    12439 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_src.c busybox-1.3.1-911/archival/libipkg/pkg_src.c 
    12440 --- busybox-1.3.1-orig/archival/libipkg/pkg_src.c       1970-01-01 01:00:00.000000000 +0100 
    12441 +++ busybox-1.3.1-911/archival/libipkg/pkg_src.c        2006-12-27 19:41:04.000000000 +0100 
     12285diff -urN busybox.old/archival/libipkg/pkg_src.c busybox.dev/archival/libipkg/pkg_src.c 
     12286--- busybox.old/archival/libipkg/pkg_src.c      1970-01-01 01:00:00.000000000 +0100 
     12287+++ busybox.dev/archival/libipkg/pkg_src.c      2007-01-22 13:41:03.000000000 +0100 
    1244212288@@ -0,0 +1,43 @@ 
    1244312289+/* pkg_src.c - the itsy package management system 
     
    1248412330+ 
    1248512331+ 
    12486 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_src.h busybox-1.3.1-911/archival/libipkg/pkg_src.h 
    12487 --- busybox-1.3.1-orig/archival/libipkg/pkg_src.h       1970-01-01 01:00:00.000000000 +0100 
    12488 +++ busybox-1.3.1-911/archival/libipkg/pkg_src.h        2006-12-27 19:41:04.000000000 +0100 
     12332diff -urN busybox.old/archival/libipkg/pkg_src.h busybox.dev/archival/libipkg/pkg_src.h 
     12333--- busybox.old/archival/libipkg/pkg_src.h      1970-01-01 01:00:00.000000000 +0100 
     12334+++ busybox.dev/archival/libipkg/pkg_src.h      2007-01-22 13:41:03.000000000 +0100 
    1248912335@@ -0,0 +1,34 @@ 
    1249012336+/* pkg_src.h - the itsy package management system 
     
    1252212368+ 
    1252312369+#endif 
    12524 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_src_list.c busybox-1.3.1-911/archival/libipkg/pkg_src_list.c 
    12525 --- busybox-1.3.1-orig/archival/libipkg/pkg_src_list.c  1970-01-01 01:00:00.000000000 +0100 
    12526 +++ busybox-1.3.1-911/archival/libipkg/pkg_src_list.c   2006-12-27 19:41:04.000000000 +0100 
     12370diff -urN busybox.old/archival/libipkg/pkg_src_list.c busybox.dev/archival/libipkg/pkg_src_list.c 
     12371--- busybox.old/archival/libipkg/pkg_src_list.c 1970-01-01 01:00:00.000000000 +0100 
     12372+++ busybox.dev/archival/libipkg/pkg_src_list.c 2007-01-22 13:41:03.000000000 +0100 
    1252712373@@ -0,0 +1,75 @@ 
    1252812374+/* pkg_src_list.c - the itsy package management system 
     
    1260112447+    return (pkg_src_list_elt_t *) void_list_pop((void_list_t *) list); 
    1260212448+} 
    12603 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_src_list.h busybox-1.3.1-911/archival/libipkg/pkg_src_list.h 
    12604 --- busybox-1.3.1-orig/archival/libipkg/pkg_src_list.h  1970-01-01 01:00:00.000000000 +0100 
    12605 +++ busybox-1.3.1-911/archival/libipkg/pkg_src_list.h   2006-12-27 19:41:04.000000000 +0100 
     12449diff -urN busybox.old/archival/libipkg/pkg_src_list.h busybox.dev/archival/libipkg/pkg_src_list.h 
     12450--- busybox.old/archival/libipkg/pkg_src_list.h 1970-01-01 01:00:00.000000000 +0100 
     12451+++ busybox.dev/archival/libipkg/pkg_src_list.h 2007-01-22 13:41:03.000000000 +0100 
    1260612452@@ -0,0 +1,57 @@ 
    1260712453+/* pkg_src_list.h - the itsy package management system 
     
    1266212508+#endif 
    1266312509+ 
    12664 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_vec.c busybox-1.3.1-911/archival/libipkg/pkg_vec.c 
    12665 --- busybox-1.3.1-orig/archival/libipkg/pkg_vec.c       1970-01-01 01:00:00.000000000 +0100 
    12666 +++ busybox-1.3.1-911/archival/libipkg/pkg_vec.c        2006-12-27 19:41:04.000000000 +0100 
     12510diff -urN busybox.old/archival/libipkg/pkg_vec.c busybox.dev/archival/libipkg/pkg_vec.c 
     12511--- busybox.old/archival/libipkg/pkg_vec.c      1970-01-01 01:00:00.000000000 +0100 
     12512+++ busybox.dev/archival/libipkg/pkg_vec.c      2007-01-22 13:41:03.000000000 +0100 
    1266712513@@ -0,0 +1,230 @@ 
    1266812514+/* pkg_vec.c - the itsy package management system 
     
    1289612742+} 
    1289712743+ 
    12898 diff -ruN busybox-1.3.1-orig/archival/libipkg/pkg_vec.h busybox-1.3.1-911/archival/libipkg/pkg_vec.h 
    12899 --- busybox-1.3.1-orig/archival/libipkg/pkg_vec.h       1970-01-01 01:00:00.000000000 +0100 
    12900 +++ busybox-1.3.1-911/archival/libipkg/pkg_vec.h        2006-12-27 19:41:04.000000000 +0100 
    12901 @@ -0,0 +1,62 @@ 
     12744diff -urN busybox.old/archival/libipkg/pkg_vec.h busybox.dev/archival/libipkg/pkg_vec.h 
     12745--- busybox.old/archival/libipkg/pkg_vec.h      1970-01-01 01:00:00.000000000 +0100 
     12746+++ busybox.dev/archival/libipkg/pkg_vec.h      2007-01-22 13:41:06.000000000 +0100 
     12747@@ -0,0 +1,64 @@ 
    1290212748+/* pkg_vec.h - the itsy package management system 
    1290312749+ 
     
    1293712783+typedef struct abstract_pkg_vec abstract_pkg_vec_t; 
    1293812784+ 
     12785+typedef int (*pkg_compar_t)(pkg_t *, pkg_t *); 
     12786+typedef int (*abstract_pkg_compar_t)(abstract_pkg_t *, abstract_pkg_t *); 
    1293912787+ 
    1294012788+pkg_vec_t * pkg_vec_alloc(void); 
     
    1296212810+#endif 
    1296312811+ 
    12964 diff -ruN busybox-1.3.1-orig/archival/libipkg/sprintf_alloc.h busybox-1.3.1-911/archival/libipkg/sprintf_alloc.h 
    12965 --- busybox-1.3.1-orig/archival/libipkg/sprintf_alloc.h 1970-01-01 01:00:00.000000000 +0100 
    12966 +++ busybox-1.3.1-911/archival/libipkg/sprintf_alloc.h  2006-12-28 02:28:27.000000000 +0100 
     12812diff -urN busybox.old/archival/libipkg/sprintf_alloc.h busybox.dev/archival/libipkg/sprintf_alloc.h 
     12813--- busybox.old/archival/libipkg/sprintf_alloc.h        1970-01-01 01:00:00.000000000 +0100 
     12814+++ busybox.dev/archival/libipkg/sprintf_alloc.h        2007-01-22 13:41:03.000000000 +0100 
    1296712815@@ -0,0 +1,25 @@ 
    1296812816+/* sprintf_alloca.c -- like sprintf with memory allocation 
     
    1299112839+ 
    1299212840+#endif 
    12993 diff -ruN busybox-1.3.1-orig/archival/libipkg/str_list.c busybox-1.3.1-911/archival/libipkg/str_list.c 
    12994 --- busybox-1.3.1-orig/archival/libipkg/str_list.c      1970-01-01 01:00:00.000000000 +0100 
    12995 +++ busybox-1.3.1-911/archival/libipkg/str_list.c       2006-12-27 19:41:04.000000000 +0100 
     12841diff -urN busybox.old/archival/libipkg/str_list.c busybox.dev/archival/libipkg/str_list.c 
     12842--- busybox.old/archival/libipkg/str_list.c     1970-01-01 01:00:00.000000000 +0100 
     12843+++ busybox.dev/archival/libipkg/str_list.c     2007-01-22 13:41:03.000000000 +0100 
    1299612844@@ -0,0 +1,76 @@ 
    1299712845+/* str_list.c - the itsy package management system 
     
    1307112919+                                        (void_list_cmp_t)strcmp); 
    1307212920+} 
    13073 diff -ruN busybox-1.3.1-orig/archival/libipkg/str_list.h busybox-1.3.1-911/archival/libipkg/str_list.h 
    13074 --- busybox-1.3.1-orig/archival/libipkg/str_list.h      1970-01-01 01:00:00.000000000 +0100 
    13075 +++ busybox-1.3.1-911/archival/libipkg/str_list.h       2006-12-27 19:41:04.000000000 +0100 
     12921diff -urN busybox.old/archival/libipkg/str_list.h busybox.dev/archival/libipkg/str_list.h 
     12922--- busybox.old/archival/libipkg/str_list.h     1970-01-01 01:00:00.000000000 +0100 
     12923+++ busybox.dev/archival/libipkg/str_list.h     2007-01-22 13:41:03.000000000 +0100 
    1307612924@@ -0,0 +1,51 @@ 
    1307712925+/* str_list.h - the itsy package management system 
     
    1312612974+ 
    1312712975+#endif 
    13128 diff -ruN busybox-1.3.1-orig/archival/libipkg/str_util.c busybox-1.3.1-911/archival/libipkg/str_util.c 
    13129 --- busybox-1.3.1-orig/archival/libipkg/str_util.c      1970-01-01 01:00:00.000000000 +0100 
    13130 +++ busybox-1.3.1-911/archival/libipkg/str_util.c       2006-12-27 19:41:04.000000000 +0100 
     12976diff -urN busybox.old/archival/libipkg/str_util.c busybox.dev/archival/libipkg/str_util.c 
     12977--- busybox.old/archival/libipkg/str_util.c     1970-01-01 01:00:00.000000000 +0100 
     12978+++ busybox.dev/archival/libipkg/str_util.c     2007-01-22 13:41:03.000000000 +0100 
    1313112979@@ -0,0 +1,73 @@ 
    1313212980+/* str_utils.c - the itsy package management system 
     
    1320313051+} 
    1320413052+ 
    13205 diff -ruN busybox-1.3.1-orig/archival/libipkg/str_util.h busybox-1.3.1-911/archival/libipkg/str_util.h 
    13206 --- busybox-1.3.1-orig/archival/libipkg/str_util.h      1970-01-01 01:00:00.000000000 +0100 
    13207 +++ busybox-1.3.1-911/archival/libipkg/str_util.h       2006-12-27 19:41:04.000000000 +0100 
     13053diff -urN busybox.old/archival/libipkg/str_util.h busybox.dev/archival/libipkg/str_util.h 
     13054--- busybox.old/archival/libipkg/str_util.h     1970-01-01 01:00:00.000000000 +0100 
     13055+++ busybox.dev/archival/libipkg/str_util.h     2007-01-22 13:41:03.000000000 +0100 
    1320813056@@ -0,0 +1,28 @@ 
    1320913057+/* str_utils.h - the itsy package management system 
     
    1323513083+ 
    1323613084+#endif 
    13237 diff -ruN busybox-1.3.1-orig/archival/libipkg/user.c busybox-1.3.1-911/archival/libipkg/user.c 
    13238 --- busybox-1.3.1-orig/archival/libipkg/user.c  1970-01-01 01:00:00.000000000 +0100 
    13239 +++ busybox-1.3.1-911/archival/libipkg/user.c   2006-12-27 19:41:04.000000000 +0100 
     13085diff -urN busybox.old/archival/libipkg/user.c busybox.dev/archival/libipkg/user.c 
     13086--- busybox.old/archival/libipkg/user.c 1970-01-01 01:00:00.000000000 +0100 
     13087+++ busybox.dev/archival/libipkg/user.c 2007-01-22 13:41:03.000000000 +0100 
    1324013088@@ -0,0 +1,58 @@ 
    1324113089+/* user.c - the itsy package management system 
     
    1329713145+     return response; 
    1329813146+} 
    13299 diff -ruN busybox-1.3.1-orig/archival/libipkg/user.h busybox-1.3.1-911/archival/libipkg/user.h 
    13300 --- busybox-1.3.1-orig/archival/libipkg/user.h  1970-01-01 01:00:00.000000000 +0100 
    13301 +++ busybox-1.3.1-911/archival/libipkg/user.h   2006-12-27 19:41:04.000000000 +0100 
     13147diff -urN busybox.old/archival/libipkg/user.h busybox.dev/archival/libipkg/user.h 
     13148--- busybox.old/archival/libipkg/user.h 1970-01-01 01:00:00.000000000 +0100 
     13149+++ busybox.dev/archival/libipkg/user.h 2007-01-22 13:41:03.000000000 +0100 
    1330213150@@ -0,0 +1,23 @@ 
    1330313151+/* user.c - the itsy package management system 
     
    1332413172+char *get_user_response(const char *format, ...); 
    1332513173+ 
    13326 diff -ruN busybox-1.3.1-orig/archival/libipkg/void_list.c busybox-1.3.1-911/archival/libipkg/void_list.c 
    13327 --- busybox-1.3.1-orig/archival/libipkg/void_list.c     1970-01-01 01:00:00.000000000 +0100 
    13328 +++ busybox-1.3.1-911/archival/libipkg/void_list.c      2006-12-27 19:41:04.000000000 +0100 
     13174diff -urN busybox.old/archival/libipkg/void_list.c busybox.dev/archival/libipkg/void_list.c 
     13175--- busybox.old/archival/libipkg/void_list.c    1970-01-01 01:00:00.000000000 +0100 
     13176+++ busybox.dev/archival/libipkg/void_list.c    2007-01-22 13:41:03.000000000 +0100 
    1332913177@@ -0,0 +1,194 @@ 
    1333013178+/* void_list.c - the itsy package management system 
     
    1352213370+         return NULL; 
    1352313371+} 
    13524 diff -ruN busybox-1.3.1-orig/archival/libipkg/void_list.h busybox-1.3.1-911/archival/libipkg/void_list.h 
    13525 --- busybox-1.3.1-orig/archival/libipkg/void_list.h     1970-01-01 01:00:00.000000000 +0100 
    13526 +++ busybox-1.3.1-911/archival/libipkg/void_list.h      2006-12-27 19:41:04.000000000 +0100 
     13372diff -urN busybox.old/archival/libipkg/void_list.h busybox.dev/archival/libipkg/void_list.h 
     13373--- busybox.old/archival/libipkg/void_list.h    1970-01-01 01:00:00.000000000 +0100 
     13374+++ busybox.dev/archival/libipkg/void_list.h    2007-01-22 13:41:03.000000000 +0100 
    1352713375@@ -0,0 +1,59 @@ 
    1352813376+/* void_list.h - the itsy package management system 
     
    1358513433+ 
    1358613434+#endif 
    13587 diff -ruN busybox-1.3.1-orig/archival/libipkg/xsystem.c busybox-1.3.1-911/archival/libipkg/xsystem.c 
    13588 --- busybox-1.3.1-orig/archival/libipkg/xsystem.c       1970-01-01 01:00:00.000000000 +0100 
    13589 +++ busybox-1.3.1-911/archival/libipkg/xsystem.c        2006-12-27 19:41:04.000000000 +0100 
     13435diff -urN busybox.old/archival/libipkg/xsystem.c busybox.dev/archival/libipkg/xsystem.c 
     13436--- busybox.old/archival/libipkg/xsystem.c      1970-01-01 01:00:00.000000000 +0100 
     13437+++ busybox.dev/archival/libipkg/xsystem.c      2007-01-22 13:41:03.000000000 +0100 
    1359013438@@ -0,0 +1,64 @@ 
    1359113439+/* xsystem.c - system(3) with error messages 
     
    1365313501+} 
    1365413502+         
    13655 diff -ruN busybox-1.3.1-orig/archival/libipkg/xsystem.h busybox-1.3.1-911/archival/libipkg/xsystem.h 
    13656 --- busybox-1.3.1-orig/archival/libipkg/xsystem.h       1970-01-01 01:00:00.000000000 +0100 
    13657 +++ busybox-1.3.1-911/archival/libipkg/xsystem.h        2006-12-27 19:41:04.000000000 +0100 
     13503diff -urN busybox.old/archival/libipkg/xsystem.h busybox.dev/archival/libipkg/xsystem.h 
     13504--- busybox.old/archival/libipkg/xsystem.h      1970-01-01 01:00:00.000000000 +0100 
     13505+++ busybox.dev/archival/libipkg/xsystem.h      2007-01-22 13:41:03.000000000 +0100 
    1365813506@@ -0,0 +1,34 @@ 
    1365913507+/* xsystem.h - system(3) with error messages 
     
    1369113539+#endif 
    1369213540+         
    13693 diff -ruN busybox-1.3.1-orig/archival/libunarchive/data_extract_all.c busybox-1.3.1-911/archival/libunarchive/data_extract_all.c 
    13694 --- busybox-1.3.1-orig/archival/libunarchive/data_extract_all.c 2006-12-27 05:53:54.000000000 +0100 
    13695 +++ busybox-1.3.1-911/archival/libunarchive/data_extract_all.c  2006-12-27 19:41:04.000000000 +0100 
     13541diff -urN busybox.old/archival/libunarchive/data_extract_all.c busybox.dev/archival/libunarchive/data_extract_all.c 
     13542--- busybox.old/archival/libunarchive/data_extract_all.c        2007-01-19 22:23:02.000000000 +0100 
     13543+++ busybox.dev/archival/libunarchive/data_extract_all.c        2007-01-22 13:41:03.000000000 +0100 
    1369613544@@ -117,3 +117,17 @@ 
    1369713545                utime(file_header->name, &t); 
     
    1371213560+} 
    1371313561+ 
    13714 diff -ruN busybox-1.3.1-orig/archival/libunarchive/Kbuild busybox-1.3.1-911/archival/libunarchive/Kbuild 
    13715 --- busybox-1.3.1-orig/archival/libunarchive/Kbuild     2006-12-27 05:53:54.000000000 +0100 
    13716 +++ busybox-1.3.1-911/archival/libunarchive/Kbuild      2006-12-27 19:50:13.000000000 +0100 
     13562diff -urN busybox.old/archival/libunarchive/Kbuild busybox.dev/archival/libunarchive/Kbuild 
     13563--- busybox.old/archival/libunarchive/Kbuild    2007-01-19 22:23:02.000000000 +0100 
     13564+++ busybox.dev/archival/libunarchive/Kbuild    2007-01-22 13:41:03.000000000 +0100 
    1371713565@@ -47,6 +47,7 @@ 
    1371813566 lib-$(CONFIG_FEATURE_DEB_TAR_LZMA)     += decompress_unlzma.o get_header_tar_lzma.o 
     
    1372313571 lib-$(CONFIG_RPM)                      += $(GUNZIP_FILES) get_header_cpio.o 
    1372413572 lib-$(CONFIG_TAR)                      += get_header_tar.o 
    13725 diff -ruN busybox-1.3.1-orig/include/applets.h busybox-1.3.1-911/include/applets.h 
    13726 --- busybox-1.3.1-orig/include/applets.h        2006-12-27 05:56:18.000000000 +0100 
    13727 +++ busybox-1.3.1-911/include/applets.h 2006-12-27 19:41:59.000000000 +0100 
    13728 @@ -162,6 +162,7 @@ 
     13573diff -urN busybox.old/include/applets.h busybox.dev/include/applets.h 
     13574--- busybox.old/include/applets.h       2007-01-20 16:34:47.000000000 +0100 
     13575+++ busybox.dev/include/applets.h       2007-01-22 13:41:03.000000000 +0100 
     13576@@ -160,6 +160,7 @@ 
    1372913577 USE_IPCALC(APPLET(ipcalc, _BB_DIR_BIN, _BB_SUID_NEVER)) 
    1373013578 USE_IPCRM(APPLET(ipcrm, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)) 
     
    1373413582 USE_IPROUTE(APPLET(iproute, _BB_DIR_BIN, _BB_SUID_NEVER)) 
    1373513583 USE_IPRULE(APPLET(iprule, _BB_DIR_BIN, _BB_SUID_NEVER)) 
    13736 diff -ruN busybox-1.3.1-orig/include/unarchive.h busybox-1.3.1-911/include/unarchive.h 
    13737 --- busybox-1.3.1-orig/include/unarchive.h      2006-12-27 05:56:18.000000000 +0100 
    13738 +++ busybox-1.3.1-911/include/unarchive.h       2006-12-27 19:41:59.000000000 +0100 
    13739 @@ -75,6 +75,7 @@ 
     13584diff -urN busybox.old/include/unarchive.h busybox.dev/include/unarchive.h 
     13585--- busybox.old/include/unarchive.h     2007-01-19 22:23:10.000000000 +0100 
     13586+++ busybox.dev/include/unarchive.h     2007-01-22 13:41:03.000000000 +0100 
     13587@@ -76,6 +76,7 @@ 
    1374013588  
    1374113589 extern void data_skip(archive_handle_t *archive_handle); 
     
    1374513593 extern void data_extract_to_buffer(archive_handle_t *archive_handle); 
    1374613594  
    13747 diff -ruN busybox-1.3.1-orig/include/usage.h busybox-1.3.1-911/include/usage.h 
    13748 --- busybox-1.3.1-orig/include/usage.h  2006-12-27 05:56:18.000000000 +0100 
    13749 +++ busybox-1.3.1-911/include/usage.h   2006-12-27 19:41:59.000000000 +0100 
    13750 @@ -1101,6 +1101,82 @@ 
     13595diff -urN busybox.old/include/usage.h busybox.dev/include/usage.h 
     13596--- busybox.old/include/usage.h 2007-01-19 22:23:10.000000000 +0100 
     13597+++ busybox.dev/include/usage.h 2007-01-22 13:41:03.000000000 +0100 
     13598@@ -1133,6 +1133,82 @@ 
    1375113599        "$ ls -la /tmp/busybox*\n" \ 
    1375213600        "-rw-rw-r--    1 andersen andersen   554058 Apr 14 17:49 /tmp/busybox.tar.gz\n" 
     
    1383113679        "[-d<delay>] [-n<nosync>] [-f<force>]" 
    1383213680 #define halt_full_usage \ 
    13833 diff -ruN busybox-1.3.1-orig/Makefile busybox-1.3.1-911/Makefile 
    13834 --- busybox-1.3.1-orig/Makefile 2006-12-27 05:57:17.000000000 +0100 
    13835 +++ busybox-1.3.1-911/Makefile  2006-12-28 01:14:49.000000000 +0100 
     13681diff -urN busybox.old/Makefile busybox.dev/Makefile 
     13682--- busybox.old/Makefile        2007-01-20 21:21:39.000000000 +0100 
     13683+++ busybox.dev/Makefile        2007-01-22 13:41:03.000000000 +0100 
    1383613684@@ -423,6 +423,7 @@ 
    1383713685  
  • trunk/package/busybox/patches/913-libbb_hash.patch

    r5941 r6204  
    1 # Copyright (C) 2006 OpenWrt.org 
    2 # 
    3 # This is free software, licensed under the GNU General Public License v2. 
    4 # See /LICENSE for more information. 
    5 # 
    6 # expose (again) an hash_fd function (used in 911-ipkg.patch) 
    7 # 
    8 diff -ruN busybox-1.3.1-orig/coreutils/md5_sha1_sum.c busybox-1.3.1-913/coreutils/md5_sha1_sum.c 
    9 --- busybox-1.3.1-orig/coreutils/md5_sha1_sum.c 2006-12-27 05:54:50.000000000 +0100 
    10 +++ busybox-1.3.1-913/coreutils/md5_sha1_sum.c  2006-12-28 00:59:35.000000000 +0100 
    11 @@ -8,78 +8,10 @@ 
     1diff -ur busybox.old/coreutils/md5_sha1_sum.c busybox.dev/coreutils/md5_sha1_sum.c 
     2--- busybox.old/coreutils/md5_sha1_sum.c        2007-01-19 22:23:05.000000000 +0100 
     3+++ busybox.dev/coreutils/md5_sha1_sum.c        2007-01-22 13:24:51.000000000 +0100 
     4@@ -8,76 +8,10 @@ 
    125  
    136 #include "busybox.h" 
     
    2316-                               unsigned hash_length) 
    2417-{ 
    25 -       int len = 0; 
    26 -       char *hex_value = xmalloc((hash_length * 2) + 2); 
    27 -       while (hash_length--) { 
    28 -               len += sprintf(hex_value + len, "%02x", *hash_value++); 
    29 -       } 
     18-       /* xzalloc zero-terminates */ 
     19-       char *hex_value = xzalloc((hash_length * 2) + 1); 
     20-       bin2hex(hex_value, (char*)hash_value, hash_length); 
    3021-       return hex_value; 
    3122-} 
     
    4435- 
    4536-       src_fd = STDIN_FILENO; 
    46 -       if (filename[0] != '-' || filename[1]) { /* not "-" */ 
     37-       if (NOT_LONE_DASH(filename)) { 
    4738-               src_fd = open(filename, O_RDONLY); 
    4839-               if (src_fd < 0) { 
     
    8879 { 
    8980        int return_value = EXIT_SUCCESS; 
    90 diff -ruN busybox-1.3.1-orig/include/libbb.h busybox-1.3.1-913/include/libbb.h 
    91 --- busybox-1.3.1-orig/include/libbb.h  2006-12-27 05:56:18.000000000 +0100 
    92 +++ busybox-1.3.1-913/include/libbb.h   2006-12-27 23:25:52.000000000 +0100 
    93 @@ -528,6 +528,8 @@ 
     81diff -ur busybox.old/include/libbb.h busybox.dev/include/libbb.h 
     82--- busybox.old/include/libbb.h 2007-01-19 22:23:10.000000000 +0100 
     83+++ busybox.dev/include/libbb.h 2007-01-22 13:28:56.000000000 +0100 
     84@@ -637,6 +637,7 @@ 
    9485 extern const char bb_uuenc_tbl_std[]; 
    9586 void bb_uuencode(const unsigned char *s, char *store, const int length, const char *tbl); 
    9687  
    9788+typedef enum { HASH_SHA1, HASH_MD5 } hash_algo_t; 
    98 + 
    9989 typedef struct sha1_ctx_t { 
    10090        uint32_t count[2]; 
    10191        uint32_t hash[5]; 
    102 @@ -550,6 +552,10 @@ 
     92@@ -658,6 +659,8 @@ 
     93 void md5_begin(md5_ctx_t *ctx); 
    10394 void md5_hash(const void *data, size_t length, md5_ctx_t *ctx); 
    10495 void *md5_end(void *resbuf, md5_ctx_t *ctx); 
     96+unsigned char *hash_bin_to_hex(unsigned char *hash_value, unsigned hash_length); 
     97+uint8_t *hash_file(const char *filename, hash_algo_t hash_algo); 
    10598  
    106 +unsigned char *hash_bin_to_hex(unsigned char *hash_value, unsigned char hash_length); 
    107 +int hash_fd(int fd, hash_algo_t hash_algo, uint8_t *hash_value); 
    108 +uint8_t *hash_file(const char *filename, hash_algo_t hash_algo); 
    109 + 
    11099 uint32_t *crc32_filltable(int endian); 
    111100  
    112   
    113 diff -ruN busybox-1.3.1-orig/libbb/hash.c busybox-1.3.1-913/libbb/hash.c 
    114 --- busybox-1.3.1-orig/libbb/hash.c     1970-01-01 01:00:00.000000000 +0100 
    115 +++ busybox-1.3.1-913/libbb/hash.c      2006-12-28 00:48:52.000000000 +0100 
    116 @@ -0,0 +1,99 @@ 
     101diff -ur busybox.old/libbb/Kbuild busybox.dev/libbb/Kbuild 
     102--- busybox.old/libbb/Kbuild    2007-01-19 22:23:06.000000000 +0100 
     103+++ busybox.dev/libbb/Kbuild    2007-01-22 13:29:24.000000000 +0100 
     104@@ -37,6 +37,7 @@ 
     105 lib-y += get_last_path_component.o 
     106 lib-y += get_line_from_file.o 
     107 lib-y += getopt32.o 
     108+lib-y += hash.o 
     109 lib-y += herror_msg.o 
     110 lib-y += herror_msg_and_die.o 
     111 lib-y += human_readable.o 
     112--- busybox.old/libbb/hash.c    1970-01-01 01:00:00.000000000 +0100 
     113+++ busybox.dev/libbb/hash.c    2007-01-22 13:52:41.000000000 +0100 
     114@@ -0,0 +1,82 @@ 
    117115+/* 
    118116+ *  Copyright (C) 2003 Glenn L. McGrath 
     
    132130+#include "busybox.h" 
    133131+ 
    134 +unsigned char *hash_bin_to_hex(unsigned char *hash_value, unsigned char hash_length) 
     132+/* This might be useful elsewhere */ 
     133+unsigned char *hash_bin_to_hex(unsigned char *hash_value, 
     134+                               unsigned hash_length) 
    135135+{ 
    136 +       int len = 0; 
    137 +       char *hex_value = xmalloc((hash_length * 2) + 2); 
    138 +       while (hash_length--) { 
    139 +               len += sprintf(hex_value + len, "%02x", *hash_value++); 
    140 +       } 
     136+       /* xzalloc zero-terminates */ 
     137+       char *hex_value = xzalloc((hash_length * 2) + 1); 
     138+       bin2hex(hex_value, (char*)hash_value, hash_length); 
    141139+       return hex_value; 
    142140+} 
    143141+ 
    144 +int hash_fd(int fd, hash_algo_t hash_algo, uint8_t *hash_value) 
     142+uint8_t *hash_file(const char *filename, hash_algo_t hash_algo) 
    145143+{ 
    146 +       int count, result = 0; 
     144+       int src_fd, hash_len, count; 
    147145+       union _ctx_ { 
    148146+               sha1_ctx_t sha1; 
    149147+               md5_ctx_t md5; 
    150148+       } context; 
     149+       uint8_t *hash_value = NULL; 
    151150+       RESERVE_CONFIG_UBUFFER(in_buf, 4096); 
    152 +       void (*update)(const void*, size_t, void*) = NULL; 
    153 +       void (*final)(void*, void*) = NULL; 
    154 +        
    155 +       // figure specific hash algorithims 
    156 +       if (hash_algo==HASH_MD5) { 
    157 +               md5_begin(&context.md5); 
    158 +               update = (void (*)(const void*, size_t, void*))md5_hash; 
    159 +               final = (void (*)(void*, void*))md5_end; 
    160 +       } else if (hash_algo==HASH_SHA1) { 
    161 +               sha1_begin(&context.sha1); 
    162 +               update = (void (*)(const void*, size_t, void*))sha1_hash; 
    163 +               final = (void (*)(void*, void*))sha1_end; 
    164 +       } 
    165 + 
    166 + 
    167 +       while (0 < (count = safe_read(fd, in_buf, sizeof in_buf))) { 
    168 +               update(in_buf, count, &context); 
    169 +               result += count; 
    170 +       } 
    171 + 
    172 +       if (count == 0) { 
    173 +               final(hash_value, &context); 
    174 +       } 
    175 +        
    176 +       RELEASE_CONFIG_BUFFER(in_buf); 
    177 +        
    178 +       return result; 
    179 +} 
    180 + 
    181 +uint8_t *hash_file(const char *filename, hash_algo_t hash_algo) 
    182 +{ 
    183 +       int src_fd, hash_len; 
    184 +       RESERVE_CONFIG_UBUFFER(hash_buf, 20); 
    185 +       uint8_t *hash_value = NULL; 
    186 +        
    187 +       if (ENABLE_MD5SUM && hash_algo==HASH_MD5) { 
    188 +               hash_len = 16; 
    189 +       } else if (ENABLE_SHA1SUM && hash_algo==HASH_SHA1) { 
    190 +               hash_len = 20; 
    191 +       } else { 
    192 +               bb_error_msg_and_die("algotithm not supported"); 
    193 +       } 
     151+       void (*update)(const void*, size_t, void*); 
     152+       void (*final)(void*, void*); 
    194153+ 
    195154+       src_fd = STDIN_FILENO; 
    196 +       if (filename[0] != '-' || filename[1]) { /* not "-" */ 
     155+       if (NOT_LONE_DASH(filename)) { 
    197156+               src_fd = open(filename, O_RDONLY); 
    198157+               if (src_fd < 0) { 
     
    202161+       } 
    203162+ 
    204 +       if (hash_fd(src_fd, hash_algo, hash_buf) > 0) { 
    205 +               hash_value = hash_bin_to_hex(hash_buf, hash_len); 
     163+       /* figure specific hash algorithims */ 
     164+       if (hash_algo==HASH_MD5) { 
     165+               md5_begin(&context.md5); 
     166+               update = (void (*)(const void*, size_t, void*))md5_hash; 
     167+               final = (void (*)(void*, void*))md5_end; 
     168+               hash_len = 16; 
     169+       } else if (hash_algo==HASH_SHA1) { 
     170+               sha1_begin(&context.sha1); 
     171+               update = (void (*)(const void*, size_t, void*))sha1_hash; 
     172+               final = (void (*)(void*, void*))sha1_end; 
     173+               hash_len = 20; 
     174+       } else { 
     175+               bb_error_msg_and_die("algorithm not supported"); 
    206176+       } 
    207 +        
     177+ 
     178+       while (0 < (count = safe_read(src_fd, in_buf, 4096))) { 
     179+               update(in_buf, count, &context); 
     180+       } 
     181+ 
     182+       if (count == 0) { 
     183+               final(in_buf, &context); 
     184+               hash_value = hash_bin_to_hex(in_buf, hash_len); 
     185+       } 
     186+ 
     187+       RELEASE_CONFIG_BUFFER(in_buf); 
     188+ 
    208189+       if (src_fd != STDIN_FILENO) { 
    209190+               close(src_fd); 
    210191+       } 
    211 +        
    212 +       RELEASE_CONFIG_BUFFER(hash_buf); 
    213192+ 
    214193+       return hash_value; 
    215194+} 
    216 diff -ruN busybox-1.3.1-orig/libbb/Kbuild busybox-1.3.1-913/libbb/Kbuild 
    217 --- busybox-1.3.1-orig/libbb/Kbuild     2006-12-27 05:55:04.000000000 +0100 
    218 +++ busybox-1.3.1-913/libbb/Kbuild      2006-12-27 23:31:20.000000000 +0100 
    219 @@ -37,6 +37,7 @@ 
    220  lib-y += get_last_path_component.o 
    221  lib-y += get_line_from_file.o 
    222  lib-y += getopt32.o 
    223 +lib-y += hash.o 
    224  lib-y += herror_msg.o 
    225  lib-y += herror_msg_and_die.o 
    226  lib-y += human_readable.o 
     195+ 
     196+ 
Note: See TracChangeset for help on using the changeset viewer.