# HG changeset patch # User Pascal Bellard # Date 1374579769 0 # Node ID 9968fba578c342c115826bdb8b44f7abe323260f # Parent ef5d866ad0a77ad2427ba8c75b883cc7143750ab busybox: add lpd diff -r ef5d866ad0a7 -r 9968fba578c3 busybox/receipt --- a/busybox/receipt Tue Jul 23 09:36:13 2013 +0000 +++ b/busybox/receipt Tue Jul 23 11:42:49 2013 +0000 @@ -119,38 +119,38 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - cp -a $src/_install/* $fs - rm -f $fs/bin/bbconfig $fs/usr/bin/ar - mkdir -p $fs/etc/init.d $fs/var/spool/cron/crontabs + cp -a $src/_install/* $fs + rm -f $fs/bin/bbconfig $fs/usr/bin/ar + mkdir -p $fs/etc/init.d $fs/var/spool/cron/crontabs $fs/var/spool/lpd - # Busybox config files. - for f in busybox.conf dnsd.conf udhcpd.conf inetd.conf httpd.conf \ - syslog.conf zcip.script - do + # Busybox config files. + for f in busybox.conf dnsd.conf udhcpd.conf inetd.conf httpd.conf \ + syslog.conf zcip.script + do cp $stuff/$f $fs/etc - done - chown -R 0.0 $fs/etc - chmod 600 $fs/etc/busybox.conf - touch $fs/etc/resolv.conf + done + chown -R 0.0 $fs/etc + chmod 600 $fs/etc/busybox.conf + touch $fs/etc/resolv.conf - # Daemon scripts. - cp $stuff/daemon $fs/etc/init.d - DAEMON="crond dnsd ftpd httpd inetd klogd ntpd syslogd telnetd tftpd udhcpd zcip" - for i in $DAEMON; do + # Daemon scripts. + cp $stuff/daemon $fs/etc/init.d + DAEMON="crond dnsd ftpd httpd inetd lpd klogd ntpd syslogd telnetd tftpd udhcpd zcip" + for i in $DAEMON; do grep -qi config_$i=y $stuff/$PACKAGE-${VERSION%.*}.config && ln -s daemon $fs/etc/init.d/$i - done - rm $fs/linuxrc - mkdir -p $fs/etc/modprobe.d + done + rm $fs/linuxrc + mkdir -p $fs/etc/modprobe.d - # Udhcpc stuff. - mkdir -p $fs/usr/share/udhcpc - cp $stuff/udhcp.script $fs/usr/share/udhcpc/default.script - chmod +x $fs/usr/share/udhcpc/default.script + # Udhcpc stuff. + mkdir -p $fs/usr/share/udhcpc + cp $stuff/udhcp.script $fs/usr/share/udhcpc/default.script + chmod +x $fs/usr/share/udhcpc/default.script - # Httpd stuff. - ln -s /usr/lib/slitaz/httphelper.sh $fs/usr/bin/httpd_helper.sh - cp -a $stuff/www $fs/var + # Httpd stuff. + ln -s /usr/lib/slitaz/httphelper.sh $fs/usr/bin/httpd_helper.sh + cp -a $stuff/www $fs/var } # GNU utils stuff. @@ -200,11 +200,6 @@ echo 'TFTPD_OPTIONS="-r /boot"' >> $root/etc/daemons.conf echo '' >> $root/etc/daemons.conf fi - if ! grep -q ^HTTPD_OPTIONS $root/etc/daemons.conf; then - echo '# Busybox HTTP web server options.' >> $root/etc/daemons.conf - echo 'HTTPD_OPTIONS="-u www"' >> $root/etc/daemons.conf - echo '' >> $root/etc/daemons.conf - fi } pre_remove() diff -r ef5d866ad0a7 -r 9968fba578c3 busybox/stuff/busybox-1.21-xz.u --- a/busybox/stuff/busybox-1.21-xz.u Tue Jul 23 09:36:13 2013 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ ---- busybox-1.21.0/archival/libarchive/decompress_unxz.c -+++ busybox-1.21.0/archival/libarchive/decompress_unxz.c -@@ -40,6 +40,7 @@ static uint32_t xz_crc32(const uint8_t * - IF_DESKTOP(long long) int FAST_FUNC - unpack_xz_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd) - { -+ enum xz_ret xz_result; - struct xz_buf iobuf; - struct xz_dec *state; - unsigned char *membuf; -@@ -63,9 +64,8 @@ unpack_xz_stream(transformer_aux_data_t - /* Limit memory usage to about 64 MiB. */ - state = xz_dec_init(XZ_DYNALLOC, 64*1024*1024); - -+ xz_result = X_OK; - while (1) { -- enum xz_ret r; -- - if (iobuf.in_pos == iobuf.in_size) { - int rd = safe_read(src_fd, membuf, BUFSIZ); - if (rd < 0) { -@@ -73,28 +73,57 @@ unpack_xz_stream(transformer_aux_data_t - total = -1; - break; - } -+ if (rd == 0 && xz_result == XZ_STREAM_END) -+ break; - iobuf.in_size = rd; - iobuf.in_pos = 0; - } -+ if (xz_result == XZ_STREAM_END) { -+ /* -+ * Try to start decoding next concatenated stream. -+ * Stream padding must always be a multiple of four -+ * bytes to preserve four-byte alignment. To keep the -+ * code slightly smaller, we aren't as strict here as -+ * the .xz spec requires. We just skip all zero-bytes -+ * without checking the alignment and thus can accept -+ * files that aren't valid, e.g. the XZ utils test -+ * files bad-0pad-empty.xz and bad-0catpad-empty.xz. -+ */ -+ do { -+ if (membuf[iobuf.in_pos] != 0) { -+ xz_dec_reset(state); -+ goto do_run; -+ } -+ iobuf.in_pos++; -+ } while (iobuf.in_pos < iobuf.in_size); -+ } -+ do_run: - // bb_error_msg(">in pos:%d size:%d out pos:%d size:%d", - // iobuf.in_pos, iobuf.in_size, iobuf.out_pos, iobuf.out_size); -- r = xz_dec_run(state, &iobuf); -+ xz_result = xz_dec_run(state, &iobuf); - // bb_error_msg("