Navigation

Project: wok

Clone project: hg clone http://hg.slitaz.org/wok

  • Download tarball:
  • bz2
  • gz

Search

wok changeset 14872:9968fba578c3

busybox: add lpd
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Jul 23 11:42:49 2013 +0000 (14 months ago ago)
parents ef5d866ad0a7
children 01b0687cb2a7
files busybox/receipt busybox/stuff/busybox-1.21-xz.u busybox/stuff/busybox-1.21.config busybox/stuff/inetd.conf
line diff
     1.1 --- a/busybox/receipt	Tue Jul 23 09:36:13 2013 +0000
     1.2 +++ b/busybox/receipt	Tue Jul 23 11:42:49 2013 +0000
     1.3 @@ -119,38 +119,38 @@
     1.4  # Rules to gen a SliTaz package suitable for Tazpkg.
     1.5  genpkg_rules()
     1.6  {
     1.7 -    cp -a $src/_install/* $fs
     1.8 -    rm -f $fs/bin/bbconfig $fs/usr/bin/ar
     1.9 -    mkdir -p $fs/etc/init.d $fs/var/spool/cron/crontabs
    1.10 +	cp -a $src/_install/* $fs
    1.11 +	rm -f $fs/bin/bbconfig $fs/usr/bin/ar
    1.12 +	mkdir -p $fs/etc/init.d $fs/var/spool/cron/crontabs $fs/var/spool/lpd
    1.13  
    1.14 -    # Busybox config files.
    1.15 -    for f in busybox.conf dnsd.conf udhcpd.conf inetd.conf httpd.conf \
    1.16 -    	     syslog.conf zcip.script
    1.17 -    do
    1.18 +	# Busybox config files.
    1.19 +	for f in busybox.conf dnsd.conf udhcpd.conf inetd.conf httpd.conf \
    1.20 +		syslog.conf zcip.script
    1.21 +	do
    1.22  		cp $stuff/$f $fs/etc
    1.23 -    done
    1.24 -    chown -R 0.0 $fs/etc
    1.25 -    chmod 600 $fs/etc/busybox.conf
    1.26 -    touch $fs/etc/resolv.conf
    1.27 +	done
    1.28 +	chown -R 0.0 $fs/etc
    1.29 +	chmod 600 $fs/etc/busybox.conf
    1.30 +	touch $fs/etc/resolv.conf
    1.31  
    1.32 -    # Daemon scripts.
    1.33 -    cp $stuff/daemon $fs/etc/init.d
    1.34 -    DAEMON="crond dnsd ftpd httpd inetd klogd ntpd syslogd telnetd tftpd udhcpd zcip"
    1.35 -    for i in $DAEMON; do
    1.36 +	# Daemon scripts.
    1.37 +	cp $stuff/daemon $fs/etc/init.d
    1.38 +	DAEMON="crond dnsd ftpd httpd inetd lpd klogd ntpd syslogd telnetd tftpd udhcpd zcip"
    1.39 +	for i in $DAEMON; do
    1.40  		grep -qi config_$i=y $stuff/$PACKAGE-${VERSION%.*}.config &&
    1.41  		ln -s daemon $fs/etc/init.d/$i
    1.42 -    done
    1.43 -    rm $fs/linuxrc
    1.44 -    mkdir -p $fs/etc/modprobe.d
    1.45 +	done
    1.46 +	rm $fs/linuxrc
    1.47 +	mkdir -p $fs/etc/modprobe.d
    1.48  
    1.49 -    # Udhcpc stuff.
    1.50 -    mkdir -p $fs/usr/share/udhcpc
    1.51 -    cp $stuff/udhcp.script $fs/usr/share/udhcpc/default.script
    1.52 -    chmod +x $fs/usr/share/udhcpc/default.script
    1.53 +	# Udhcpc stuff.
    1.54 +	mkdir -p $fs/usr/share/udhcpc
    1.55 +	cp $stuff/udhcp.script $fs/usr/share/udhcpc/default.script
    1.56 +	chmod +x $fs/usr/share/udhcpc/default.script
    1.57  
    1.58 -    # Httpd stuff.
    1.59 -    ln -s /usr/lib/slitaz/httphelper.sh $fs/usr/bin/httpd_helper.sh
    1.60 -    cp -a $stuff/www $fs/var
    1.61 +	# Httpd stuff.
    1.62 +	ln -s /usr/lib/slitaz/httphelper.sh $fs/usr/bin/httpd_helper.sh
    1.63 +	cp -a $stuff/www $fs/var
    1.64  }
    1.65  
    1.66  # GNU utils stuff.
    1.67 @@ -200,11 +200,6 @@
    1.68  		echo 'TFTPD_OPTIONS="-r /boot"' >> $root/etc/daemons.conf
    1.69  		echo '' >> $root/etc/daemons.conf
    1.70  	fi
    1.71 -	if ! grep -q ^HTTPD_OPTIONS $root/etc/daemons.conf; then
    1.72 -		echo '# Busybox HTTP web server options.' >> $root/etc/daemons.conf
    1.73 -		echo 'HTTPD_OPTIONS="-u www"' >> $root/etc/daemons.conf
    1.74 -		echo '' >> $root/etc/daemons.conf
    1.75 -	fi
    1.76  }
    1.77  
    1.78  pre_remove()
     2.1 --- a/busybox/stuff/busybox-1.21-xz.u	Tue Jul 23 09:36:13 2013 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,84 +0,0 @@
     2.4 ---- busybox-1.21.0/archival/libarchive/decompress_unxz.c
     2.5 -+++ busybox-1.21.0/archival/libarchive/decompress_unxz.c
     2.6 -@@ -40,6 +40,7 @@ static uint32_t xz_crc32(const uint8_t *
     2.7 - IF_DESKTOP(long long) int FAST_FUNC
     2.8 - unpack_xz_stream(transformer_aux_data_t *aux, int src_fd, int dst_fd)
     2.9 - {
    2.10 -+	enum xz_ret xz_result;
    2.11 - 	struct xz_buf iobuf;
    2.12 - 	struct xz_dec *state;
    2.13 - 	unsigned char *membuf;
    2.14 -@@ -63,9 +64,8 @@ unpack_xz_stream(transformer_aux_data_t
    2.15 - 	/* Limit memory usage to about 64 MiB. */
    2.16 - 	state = xz_dec_init(XZ_DYNALLOC, 64*1024*1024);
    2.17 - 
    2.18 -+	xz_result = X_OK;
    2.19 - 	while (1) {
    2.20 --		enum xz_ret r;
    2.21 --
    2.22 - 		if (iobuf.in_pos == iobuf.in_size) {
    2.23 - 			int rd = safe_read(src_fd, membuf, BUFSIZ);
    2.24 - 			if (rd < 0) {
    2.25 -@@ -73,28 +73,57 @@ unpack_xz_stream(transformer_aux_data_t
    2.26 - 				total = -1;
    2.27 - 				break;
    2.28 - 			}
    2.29 -+			if (rd == 0 && xz_result == XZ_STREAM_END)
    2.30 -+				break;
    2.31 - 			iobuf.in_size = rd;
    2.32 - 			iobuf.in_pos = 0;
    2.33 - 		}
    2.34 -+		if (xz_result == XZ_STREAM_END) {
    2.35 -+			/*
    2.36 -+			 * Try to start decoding next concatenated stream.
    2.37 -+			 * Stream padding must always be a multiple of four
    2.38 -+			 * bytes to preserve four-byte alignment. To keep the
    2.39 -+			 * code slightly smaller, we aren't as strict here as
    2.40 -+			 * the .xz spec requires. We just skip all zero-bytes
    2.41 -+			 * without checking the alignment and thus can accept
    2.42 -+			 * files that aren't valid, e.g. the XZ utils test
    2.43 -+			 * files bad-0pad-empty.xz and bad-0catpad-empty.xz.
    2.44 -+			 */
    2.45 -+			do {
    2.46 -+				if (membuf[iobuf.in_pos] != 0) {
    2.47 -+					xz_dec_reset(state);
    2.48 -+					goto do_run;
    2.49 -+				}
    2.50 -+				iobuf.in_pos++;
    2.51 -+			} while (iobuf.in_pos < iobuf.in_size);
    2.52 -+		}
    2.53 -+ do_run:
    2.54 - //		bb_error_msg(">in pos:%d size:%d out pos:%d size:%d",
    2.55 - //				iobuf.in_pos, iobuf.in_size, iobuf.out_pos, iobuf.out_size);
    2.56 --		r = xz_dec_run(state, &iobuf);
    2.57 -+		xz_result = xz_dec_run(state, &iobuf);
    2.58 - //		bb_error_msg("<in pos:%d size:%d out pos:%d size:%d r:%d",
    2.59 --//				iobuf.in_pos, iobuf.in_size, iobuf.out_pos, iobuf.out_size, r);
    2.60 -+//				iobuf.in_pos, iobuf.in_size, iobuf.out_pos, iobuf.out_size, xz_result);
    2.61 - 		if (iobuf.out_pos) {
    2.62 - 			xwrite(dst_fd, iobuf.out, iobuf.out_pos);
    2.63 - 			IF_DESKTOP(total += iobuf.out_pos;)
    2.64 - 			iobuf.out_pos = 0;
    2.65 - 		}
    2.66 --		if (r == XZ_STREAM_END) {
    2.67 --			break;
    2.68 -+		if (xz_result == XZ_STREAM_END) {
    2.69 -+			/*
    2.70 -+			 * Can just "break;" here, if not for concatenated
    2.71 -+			 * .xz streams.
    2.72 -+			 * Checking for padding may require buffer
    2.73 -+			 * replenishment. Can't do it here.
    2.74 -+			 */
    2.75 -+			continue;
    2.76 - 		}
    2.77 --		if (r != XZ_OK && r != XZ_UNSUPPORTED_CHECK) {
    2.78 -+		if (xz_result != XZ_OK && xz_result != XZ_UNSUPPORTED_CHECK) {
    2.79 - 			bb_error_msg("corrupted data");
    2.80 - 			total = -1;
    2.81 - 			break;
    2.82 - 		}
    2.83 - 	}
    2.84 -+
    2.85 - 	xz_dec_end(state);
    2.86 - 	free(membuf);
    2.87 - 
     3.1 --- a/busybox/stuff/busybox-1.21.config	Tue Jul 23 09:36:13 2013 +0000
     3.2 +++ b/busybox/stuff/busybox-1.21.config	Tue Jul 23 11:42:49 2013 +0000
     3.3 @@ -873,9 +873,9 @@
     3.4  #
     3.5  # Print Utilities
     3.6  #
     3.7 -# CONFIG_LPD is not set
     3.8 +CONFIG_LPD=y
     3.9  CONFIG_LPR=y
    3.10 -# CONFIG_LPQ is not set
    3.11 +CONFIG_LPQ=y
    3.12  
    3.13  #
    3.14  # Mail Utilities
     4.1 --- a/busybox/stuff/inetd.conf	Tue Jul 23 09:36:13 2013 +0000
     4.2 +++ b/busybox/stuff/inetd.conf	Tue Jul 23 11:42:49 2013 +0000
     4.3 @@ -29,3 +29,6 @@
     4.4  tftp	dgram	udp	wait	root	/usr/sbin/tftpd	/usr/sbin/tftpd -r /boot
     4.5  #systat	stream	tcp	nowait	nobody	/bin/ps
     4.6  #netstat	stream	tcp	nowait	root	/bin/netstat	/bin/netstat	-a
     4.7 +#http	stream	tcp	nowait	root	/usr/sbin/httpd	/usr/sbin/httpd	-i -u 80:80
     4.8 +#ftp	stream	tcp	nowait	root	/usr/sbin/ftpd	/usr/sbin/ftpd	-w /home/ftp
     4.9 +#printer	stream	tcp	nowait	root	/usr/sbin/lpd	/usr/sbin/lpd	/var/spool/lpd