wok-6.x rev 19008

busybox/fbvnc: wheelmouse support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 28 18:04:41 2016 +0200 (2016-03-28)
parents 48c1bca1b618
children 5ee246cee8a9
files busybox/stuff/busybox-1.23-fbvnc.u djmount/receipt miniupnpc/receipt miniupnpd/receipt mysql/stuff/reset-password.sh syslinux/stuff/iso2exe/iso2exe.sh syslinux/stuff/iso2exe/taziso unbound/receipt
line diff
     1.1 --- a/busybox/stuff/busybox-1.23-fbvnc.u	Sat Mar 26 15:57:36 2016 +0200
     1.2 +++ b/busybox/stuff/busybox-1.23-fbvnc.u	Mon Mar 28 18:04:41 2016 +0200
     1.3 @@ -2,7 +2,7 @@
     1.4     3118       0       0    3118     c2e util-linux/fbvnc.o
     1.5  --- /dev/null
     1.6  +++ busybox/util-linux/fbvnc.c
     1.7 -@@ -0,0 +1,551 @@
     1.8 +@@ -0,0 +1,562 @@
     1.9  +/* vi: set sw=4 ts=4: */
    1.10  +/*
    1.11  + * A small linux framebuffer VNC viewer
    1.12 @@ -31,6 +31,7 @@
    1.13  +//usage:#define fbvnc_full_usage "\n\n"
    1.14  +//usage:     "A linux framebuffer VNC viewer."
    1.15  +//usage:     "\nTo exit, move mouse to upper left corner and press ESC."
    1.16 ++//usage:     "\nor press any mouse button and press ESC or press ESC ^C."
    1.17  +
    1.18  +#include "libbb.h"
    1.19  +#include "vnc.h"
    1.20 @@ -400,9 +401,10 @@
    1.21  +	return status;
    1.22  +}
    1.23  +
    1.24 ++static char rat_buttons;
    1.25  +static void rat_event(void)
    1.26  +{
    1.27 -+	signed char ie[3];
    1.28 ++	signed char ie[4];
    1.29  +	struct vnc_client_ratevent me = {VNC_CLIENT_RATEVENT};
    1.30  +	int mask = 0;
    1.31  +	int refresh;
    1.32 @@ -411,12 +413,17 @@
    1.33  +	G.mc += ie[1];
    1.34  +	G.mr -= ie[2];
    1.35  +	refresh = 2 - update_scroll(&G.scroll[0]) - update_scroll(&G.scroll[1]);
    1.36 ++	rat_buttons = ie[0] & 7;
    1.37  +	if (ie[0] & 0x01)
    1.38  +		mask |= VNC_BUTTON1_MASK;
    1.39  +	if (ie[0] & 0x04)
    1.40  +		mask |= VNC_BUTTON2_MASK;
    1.41  +	if (ie[0] & 0x02)
    1.42  +		mask |= VNC_BUTTON3_MASK;
    1.43 ++	if (ie[3] > 0)		/* wheel up */
    1.44 ++		mask |= VNC_BUTTON4_MASK;
    1.45 ++	if (ie[3] < 0)		/* wheel down */
    1.46 ++		mask |= VNC_BUTTON5_MASK;
    1.47  +	me.y = htons(G.mr);
    1.48  +	me.x = htons(G.mc);
    1.49  +	me.mask = mask;
    1.50 @@ -453,7 +460,7 @@
    1.51  +			k = 0xff09;
    1.52  +			break;
    1.53  +		case 0x1b:
    1.54 -+			if (G.oc + G.mc + G.or + G.mr == 0)
    1.55 ++			if (G.oc + G.mc + G.or + G.mr == 0 || rat_buttons)
    1.56  +				killed(0);
    1.57  +			if (i + 2 < nr && key[i + 1] == '[') {
    1.58  +				if (key[i + 2] == 'A')
    1.59 @@ -475,6 +482,8 @@
    1.60  +			if (i + 1 < nr) {
    1.61  +				mod[nmod++] = 0xffe9;
    1.62  +				k = key[++i];
    1.63 ++				if (k == 0x03) /* esc-^C quit */
    1.64 ++					killed(0);
    1.65  +			}
    1.66  +			break;
    1.67  +		case 0x0d:
    1.68 @@ -527,7 +536,9 @@
    1.69  +	port = bb_lookup_port((argc >= 3) ?  argv[2] : "vnc", "tcp", 5900);
    1.70  +	G.vnc_fd = create_and_connect_stream_or_die(host, port);
    1.71  +	vnc_init();
    1.72 -+	G.rat_fd = open("/dev/input/mice", O_RDONLY);
    1.73 ++	G.rat_fd = open("/dev/input/mice", O_RDWR);
    1.74 ++	write(rat_fd, "\xf3\xc8\xf3\x64\xf3\x50", 6);	/* for using mouse wheel */
    1.75 ++	read(rat_fd, buf, 1);
    1.76  +	term_setup();
    1.77  +	atexit(cleanup);
    1.78  +	bb_signals(BB_FATAL_SIGS, killed);
    1.79 @@ -556,7 +567,7 @@
    1.80  +}
    1.81  --- /dev/null
    1.82  +++ busybox/util-linux/vnc.h
    1.83 -@@ -0,0 +1,122 @@
    1.84 +@@ -0,0 +1,124 @@
    1.85  +#define VNC_CONN_FAILED		0
    1.86  +#define VNC_CONN_NOAUTH		1
    1.87  +#define VNC_CONN_AUTH		2
    1.88 @@ -584,9 +595,11 @@
    1.89  +#define VNC_ENC_CORRE		4
    1.90  +#define VNC_ENC_HEXTILE		5
    1.91  +
    1.92 -+#define VNC_BUTTON1_MASK	0x1
    1.93 -+#define VNC_BUTTON2_MASK	0x2
    1.94 -+#define VNC_BUTTON3_MASK	0x4
    1.95 ++#define VNC_BUTTON1_MASK	0x01
    1.96 ++#define VNC_BUTTON2_MASK	0x02
    1.97 ++#define VNC_BUTTON3_MASK	0x04
    1.98 ++#define VNC_BUTTON4_MASK	0x10
    1.99 ++#define VNC_BUTTON5_MASK	0x08
   1.100  +
   1.101  +typedef unsigned char u8;
   1.102  +typedef unsigned short u16;
     2.1 --- a/djmount/receipt	Sat Mar 26 15:57:36 2016 +0200
     2.2 +++ b/djmount/receipt	Mon Mar 28 18:04:41 2016 +0200
     2.3 @@ -9,6 +9,7 @@
     2.4  TARBALL="$PACKAGE-$VERSION.tar.gz"
     2.5  WEB_SITE="http://djmount.sourceforge.net"
     2.6  WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
     2.7 +TAGS="upnp"
     2.8  
     2.9  DEPENDS="fuse readline"
    2.10  BUILD_DEPENDS="fuse-dev readline-dev libupnp libupnp-dev"
     3.1 --- a/miniupnpc/receipt	Sat Mar 26 15:57:36 2016 +0200
     3.2 +++ b/miniupnpc/receipt	Mon Mar 28 18:04:41 2016 +0200
     3.3 @@ -9,6 +9,7 @@
     3.4  TARBALL="$PACKAGE-$VERSION.tar.gz"
     3.5  WEB_SITE="http://miniupnp.tuxfamily.org/"
     3.6  WGET_URL="$WEB_SITE/files/$TARBALL"
     3.7 +TAGS="upnp"
     3.8  
     3.9  DEPENDS=""
    3.10  BUILD_DEPENDS=""
     4.1 --- a/miniupnpd/receipt	Sat Mar 26 15:57:36 2016 +0200
     4.2 +++ b/miniupnpd/receipt	Mon Mar 28 18:04:41 2016 +0200
     4.3 @@ -9,6 +9,7 @@
     4.4  TARBALL="$PACKAGE-$VERSION.tar.gz"
     4.5  WEB_SITE="http://miniupnp.tuxfamily.org/"
     4.6  WGET_URL="$WEB_SITE/files/$TARBALL"
     4.7 +TAGS="upnp"
     4.8  
     4.9  DEPENDS="iptables"
    4.10  BUILD_DEPENDS="iptables-dev libnfnetlink-dev"
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/mysql/stuff/reset-password.sh	Mon Mar 28 18:04:41 2016 +0200
     5.3 @@ -0,0 +1,12 @@
     5.4 +#!/bin/sh
     5.5 +
     5.6 +[ -z "$1" ] && echo "Usage: $0 <newpassword>" && exit 1
     5.7 +
     5.8 +/etc/init.d/mysql stop
     5.9 +/usr/bin/mysqld_safe --skip-grant-tables &
    5.10 +mysql <<EOT
    5.11 +UPDATE `mysql`.`user` SET `Password` = password('$1') WHERE `User` = "root" AND Host = "localhost";
    5.12 +quit
    5.13 +EOT
    5.14 +mysqladmin shutdown
    5.15 +/etc/init.d/mysql start
     6.1 --- a/syslinux/stuff/iso2exe/iso2exe.sh	Sat Mar 26 15:57:36 2016 +0200
     6.2 +++ b/syslinux/stuff/iso2exe/iso2exe.sh	Mon Mar 28 18:04:41 2016 +0200
     6.3 @@ -21,6 +21,8 @@
     6.4  compress()
     6.5  {
     6.6  	if [ "$1" ]; then
     6.7 +		[ "$(which zopfli 2> /dev/null)" ] &&
     6.8 +		zopfli --i100 -c /dev/stdin > $1 ||
     6.9  		gzip -9 > $1
    6.10  		[ "$(which advdef 2> /dev/null)" ] &&
    6.11  		advdef -z4 $1 > /dev/null
    6.12 @@ -79,9 +81,7 @@
    6.13  {
    6.14  	HOLE=$OFS
    6.15  	[ $(get 0 $2) -eq 35615 ] || return
    6.16 -	zcat $2 | gzip -9 > /tmp/rezipped$$.gz
    6.17 -	[ "$(which advdef 2> /dev/null)" ] &&
    6.18 -	advdef -z4 /tmp/rezipped$$.gz > /dev/null
    6.19 +	zcat $2 | compress /tmp/rezipped$$.gz
    6.20  	n=$(stat -c %s /tmp/rezipped$$.gz)
    6.21  	printf "Moving tazlito data record at %04X ($n bytes) ...\n" $OFS
    6.22  	ddq if=/tmp/rezipped$$.gz bs=1 of=$1 seek=$OFS conv=notrunc
     7.1 --- a/syslinux/stuff/iso2exe/taziso	Sat Mar 26 15:57:36 2016 +0200
     7.2 +++ b/syslinux/stuff/iso2exe/taziso	Mon Mar 28 18:04:41 2016 +0200
     7.3 @@ -1284,6 +1284,23 @@
     7.4  	${1:-exit}
     7.5  }
     7.6  
     7.7 +infoiso()
     7.8 +{
     7.9 +	isoinfo -d -i "$ISO" > /tmp/isoinfo$$
    7.10 +	if [ -x "$(which iso2exe)" ]; then
    7.11 +		echo "----"
    7.12 +		iso2exe -l "$ISO"
    7.13 +	fi >> /tmp/isoinfo$$
    7.14 +	if [ "$1" ]; then
    7.15 +		cat /tmp/isoinfo$$
    7.16 +	else
    7.17 +		$DIALOG --clear \
    7.18 +			--title " Info ISO " \
    7.19 +			--textbox /tmp/isoinfo$$ 0 0
    7.20 +	fi
    7.21 +	rm -f /tmp/isoinfo$$
    7.22 +}
    7.23 +
    7.24  isotitle()
    7.25  {
    7.26  	echo "$(blkid "$ISO" | sed 's/.*LABEL="\([^"]*\).*/\1/')  $(stat \
    7.27 @@ -1326,6 +1343,7 @@
    7.28  $(gotisomd5		"isomd5"	"Check the ISO image") \
    7.29  $(cdfile 'md5sum*'	"md5"		"Check the ISO files") \
    7.30  $(cdfile 'sha*sum*'	"sha"		"Check the ISO files") \
    7.31 +$(xfile isoinfo		"infoiso"	"ISO image info") \
    7.32  $(cdfilex boot/bzImage	"bootiso"	"Boot the ISO image") \
    7.33  $(burnable		"burniso"	"Burn the ISO image") \
    7.34  $(blankable		"blankcd"	"Blank the CD/DVD") \
     8.1 --- a/unbound/receipt	Sat Mar 26 15:57:36 2016 +0200
     8.2 +++ b/unbound/receipt	Mon Mar 28 18:04:41 2016 +0200
     8.3 @@ -28,8 +28,16 @@
     8.4  # Rules to gen a SliTaz package suitable for Tazpkg.
     8.5  genpkg_rules()
     8.6  {
     8.7 -	mkdir -p $fs/usr/lib
     8.8 +	mkdir -p $fs/usr/lib $fs/var/lib/unbound
     8.9  	cp -a $install/etc $fs
    8.10  	cp -a $install/usr/lib/*.so* $fs/usr/lib
    8.11  	cp -a $install/usr/sbin $fs/usr
    8.12  }
    8.13 +
    8.14 +# Post message when installing.
    8.15 +post_install()
    8.16 +{
    8.17 +	chroot "$1/" adduser -S -H -h /var/lib/unbound -D unbound
    8.18 +	chroot "$1/" chown unbound /var/lib/unbound
    8.19 +	chroot "$1/" unbound-anchor -a /var/lib/unbound/root.key
    8.20 +}