From: Ian Jackson Date: Thu, 23 Dec 2021 13:27:05 +0000 (+0000) Subject: changelog: finalise 1.3.5 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;ds=sidebyside;h=HEAD;hp=e73ac85c1317bde14832ba640f32caee05d90faa;p=chiark-tcl.git changelog: finalise 1.3.5 Signed-off-by: Ian Jackson --- diff --git a/.gitignore b/.gitignore index 29e8596..99ee608 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,8 @@ *.o *.so *.d -*.test.tcl +test-load.tcl +debian-substvars *+tcmdif.[ch] debian/files debian/libtcl-chiark-1 diff --git a/Makefile b/Makefile index 74fc544..77e9e48 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ endif default: all -clean all: +clean all debian-substvars: set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done # To find undefined symbols when implementing, for example: diff --git a/adns/adns.c b/adns/adns.c index 7dde69c..d0ee295 100644 --- a/adns/adns.c +++ b/adns/adns.c @@ -494,7 +494,7 @@ static int query_submit(Tcl_Interp *ip, if (op.reverseany || (op.sflags & oisf_reverse)) { const int *af; - for (af=aftry; af < af + sizeof(af)/sizeof(*af); af++) { + for (af=aftry; af < af + sizeof(aftry)/sizeof(*aftry); af++) { memset(&sa,0,sizeof(sa)); sa.sa_family= *af; r= inet_pton(*af,domain,&sa); diff --git a/base/Makefile b/base/Makefile index 1bbfd21..30c4f8f 100644 --- a/base/Makefile +++ b/base/Makefile @@ -28,5 +28,7 @@ SHLIB = $(BASE_SHLIB) base+tcmdif.h: $(BASE_TCT) $(TCMDIFGEN) $(TCMDIFGEN) -wh -o$@ $< +debian-substvars: all + include shlib.make include final.make diff --git a/base/extension.make b/base/extension.make index 0d63e4f..8023992 100644 --- a/base/extension.make +++ b/base/extension.make @@ -41,18 +41,22 @@ TCMDIFARGS ?= -p$(FAMILY)_$(EXTBASE) -o$@ $(BASE_TCT) $(OTHER_TCTS) $< %+tcmdif.h: %.tct $(BASE_TCT) $(OTHER_TCTS) $(TCMDIFGEN) $(TCMDIFGEN) -wh $(TCMDIFARGS) -OTHER_DIRS += ../base/ +OTHER_DIRS += $(BASE_DIR) OTHER_DIRS += $(addprefix ../,$(dir $(OTHER_EXTS))) OTHER_DIRS += . null := space := $(null) # -$(SHLIB).test.tcl: +test-load.tcl: echo >$@ "load $(SHLIB).so" -test-load: $(SHLIB).so $(SHLIB).test.tcl +test-load: $(SHLIB).so test-load.tcl @set -x; LD_LIBRARY_PATH=$(subst $(space),:,$(strip $(OTHER_DIRS)))$${LD_LIBRARY_PATH+:}$${LD_LIBRARY_PATH} \ - tclsh$(TCL_VERSION) $(SHLIB).test.tcl + tclsh$(TCL_VERSION) test-load.tcl + +debian-substvars: all + set -e; d=`pwd`; cd ..; \ + dpkg-shlibdeps -T"$$d"/$@ "$$d"/$(SHLIB).so include $(BASE_DIR)/final.make diff --git a/crypto/crypto.c b/crypto/crypto.c index aee2556..6efea24 100644 --- a/crypto/crypto.c +++ b/crypto/crypto.c @@ -252,6 +252,14 @@ static int blockcipher_prep(Tcl_Interp *ip, Tcl_Obj *key_obj, int rc; CiphKeyValue *key; + /* placate gcc, see Debian #968734 */ + *key_r= 0; + *sched_r= 0; + *iv_r= 0; + *iv_lenbytes_r= 0; + *buffers_r= 0; + *nblocks_r= 0; + if (data_len % alg->blocksize) return cht_staticerr(ip, "block cipher input not whole number of blocks", "HBYTES BLOCKCIPHER LENGTH"); diff --git a/debian/changelog b/debian/changelog index 4dff38a..70097b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,57 @@ -chiark-tcl (1.2.2~) unstable; urgency=medium +chiark-tcl (1.3.5) unstable; urgency=medium + + * blockcipher_prep: Initialise parameters to placate gcc. Closes:#968734. + * debhelper: bump compat to 12. Closes:#965452. + + -- Ian Jackson Thu, 23 Dec 2021 13:26:53 +0000 + +chiark-tcl (1.3.4) unstable; urgency=medium + + * debian/tests/control: Update to libnettle8. Fixes DEP-8 failure. + (Reran debian/rules debian/tests/control.) + + -- Ian Jackson Mon, 17 Aug 2020 18:09:07 +0100 + +chiark-tcl (1.3.3) unstable; urgency=medium + + * hbytes.h: Add a missing `extern' on a data declaration. + Fixes GCC-10 FTBFS. Closes:957087. + + -- Ian Jackson Mon, 17 Aug 2020 14:03:47 +0100 + +chiark-tcl (1.3.2) unstable; urgency=medium + + * changelog: start 1.3.2 + * testing: Add skip-not-installable restriction to vsn-specific tests + * testing: Add tcl 8.7 to list of versions for testing + + -- Ian Jackson Sun, 14 Oct 2018 01:33:49 +0100 + +chiark-tcl (1.3.1) unstable; urgency=medium + + * autopkgtests: Drop tcl8.7 which is only in experimental now. + + -- Ian Jackson Sun, 19 Aug 2018 12:16:24 +0100 + +chiark-tcl (1.3.0) unstable; urgency=medium + + adns: + * Fix IPv6 PTR (reverse) lookups, and compilation with GCC-8. + Closes:#891544. + + dgram: + * Provide `dgram-socket sockname S'. Closes:#865451. tcmdifgen: * Turn on warnings and `use strict' and fix everything. * Replace deprecated `use IO;' with `use IO::File'. - -- + Makefiles and build system: + * Provide autopkgtests. + * Refer to $(BASE_DIR) rather than ../base/, making out-of-tree + extentions a bit easier. + + -- Ian Jackson Sun, 19 Aug 2018 00:21:18 +0100 chiark-tcl (1.2.1) unstable; urgency=high diff --git a/debian/compat b/debian/compat index 7ed6ff8..48082f7 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -5 +12 diff --git a/debian/regenerate-autopkgtests b/debian/regenerate-autopkgtests new file mode 100755 index 0000000..dc465c3 --- /dev/null +++ b/debian/regenerate-autopkgtests @@ -0,0 +1,37 @@ +#!/bin/bash +set -e + +dt=debian/tests + +rm -rf $dt +mkdir -p $dt + +exec 4>$dt/control.new + +for sv in */debian-substvars; do + d=${sv%/*} + if ! test -e "$sv"; then continue; fi + make -C "$d" test-load.tcl + printf "%s..." $d + for v in '' "$@"; do + vv=${v:-def} + t=$d--$vv + printf " %s" $vv + exec 3>$dt/$t + echo >&3 "#!/usr/bin/tclsh$v" + cat >&3 "$d"/test-load.tcl + echo >&3 'set t {'"$d"'/runtest.tcl}' + echo >&3 'if {[file exists $t]} { source $t }' + chmod +x $dt/$t + echo >&4 "Tests: $t" + sed "s/^shlibs:Depends=/Depends: tcl$v, /" >&4 $sv + case $v in + '') ;; + ?*) echo >&4 'Restrictions: skip-not-installable' ;; + esac + echo >&4 + done + echo +done + +mv $dt/control.new $dt/control diff --git a/debian/rules b/debian/rules index 3675728..f065f68 100755 --- a/debian/rules +++ b/debian/rules @@ -26,6 +26,8 @@ docdir=usr/share/doc/$(docpackage) tclh:=$(firstword $(wildcard /usr/include/tcl8.*/tcl.h)) tclversion:=$(patsubst /usr/include/tcl%/tcl.h,%,$(tclh)) +tcl_versions= 8.5 8.6 8.7 + march := $(shell dpkg-architecture -q DEB_HOST_MULTIARCH) libsubdir = /$(march) @@ -104,4 +106,8 @@ checkroot: $(checkdir) dh_testroot +debian/tests/control: debian/regenerate-autopkgtests debian/rules + $(MAKE) debian-substvars + $< $(tcl_versions) + .PHONY: binary binary-arch binary-indep clean checkroot diff --git a/debian/tests/adns--8.5 b/debian/tests/adns--8.5 new file mode 100755 index 0000000..5dd2b82 --- /dev/null +++ b/debian/tests/adns--8.5 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.5 +load chiark_tcl_adns-1.so +set t {adns/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/adns--8.6 b/debian/tests/adns--8.6 new file mode 100755 index 0000000..773e4bd --- /dev/null +++ b/debian/tests/adns--8.6 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.6 +load chiark_tcl_adns-1.so +set t {adns/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/adns--8.7 b/debian/tests/adns--8.7 new file mode 100755 index 0000000..b830354 --- /dev/null +++ b/debian/tests/adns--8.7 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.7 +load chiark_tcl_adns-1.so +set t {adns/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/adns--def b/debian/tests/adns--def new file mode 100755 index 0000000..c18bb01 --- /dev/null +++ b/debian/tests/adns--def @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh +load chiark_tcl_adns-1.so +set t {adns/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/cdb--8.5 b/debian/tests/cdb--8.5 new file mode 100755 index 0000000..1cc0b8c --- /dev/null +++ b/debian/tests/cdb--8.5 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.5 +load chiark_tcl_cdb-1.so +set t {cdb/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/cdb--8.6 b/debian/tests/cdb--8.6 new file mode 100755 index 0000000..44c52aa --- /dev/null +++ b/debian/tests/cdb--8.6 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.6 +load chiark_tcl_cdb-1.so +set t {cdb/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/cdb--8.7 b/debian/tests/cdb--8.7 new file mode 100755 index 0000000..7ea7195 --- /dev/null +++ b/debian/tests/cdb--8.7 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.7 +load chiark_tcl_cdb-1.so +set t {cdb/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/cdb--def b/debian/tests/cdb--def new file mode 100755 index 0000000..46fb5e8 --- /dev/null +++ b/debian/tests/cdb--def @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh +load chiark_tcl_cdb-1.so +set t {cdb/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..a075529 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,90 @@ +Tests: adns--def +Depends: tcl, libadns1 (>= 1.5.0~), libc6 (>= 2.2.5), libtcl-chiark-1 + +Tests: adns--8.5 +Depends: tcl8.5, libadns1 (>= 1.5.0~), libc6 (>= 2.2.5), libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: adns--8.6 +Depends: tcl8.6, libadns1 (>= 1.5.0~), libc6 (>= 2.2.5), libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: adns--8.7 +Depends: tcl8.7, libadns1 (>= 1.5.0~), libc6 (>= 2.2.5), libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: cdb--def +Depends: tcl, libc6 (>= 2.14), libcdb1, libtcl-chiark-1 + +Tests: cdb--8.5 +Depends: tcl8.5, libc6 (>= 2.14), libcdb1, libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: cdb--8.6 +Depends: tcl8.6, libc6 (>= 2.14), libcdb1, libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: cdb--8.7 +Depends: tcl8.7, libc6 (>= 2.14), libcdb1, libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: crypto--def +Depends: tcl, libc6 (>= 2.14), libnettle8, libtcl-chiark-1 + +Tests: crypto--8.5 +Depends: tcl8.5, libc6 (>= 2.14), libnettle8, libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: crypto--8.6 +Depends: tcl8.6, libc6 (>= 2.14), libnettle8, libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: crypto--8.7 +Depends: tcl8.7, libc6 (>= 2.14), libnettle8, libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: dgram--def +Depends: tcl, libc6 (>= 2.14), libtcl-chiark-1 + +Tests: dgram--8.5 +Depends: tcl8.5, libc6 (>= 2.14), libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: dgram--8.6 +Depends: tcl8.6, libc6 (>= 2.14), libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: dgram--8.7 +Depends: tcl8.7, libc6 (>= 2.14), libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: hbytes--def +Depends: tcl, libc6 (>= 2.14), libtcl-chiark-1 + +Tests: hbytes--8.5 +Depends: tcl8.5, libc6 (>= 2.14), libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: hbytes--8.6 +Depends: tcl8.6, libc6 (>= 2.14), libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: hbytes--8.7 +Depends: tcl8.7, libc6 (>= 2.14), libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: tuntap--def +Depends: tcl, libc6 (>= 2.2.5), libtcl-chiark-1 + +Tests: tuntap--8.5 +Depends: tcl8.5, libc6 (>= 2.2.5), libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: tuntap--8.6 +Depends: tcl8.6, libc6 (>= 2.2.5), libtcl-chiark-1 +Restrictions: skip-not-installable + +Tests: tuntap--8.7 +Depends: tcl8.7, libc6 (>= 2.2.5), libtcl-chiark-1 +Restrictions: skip-not-installable + diff --git a/debian/tests/crypto--8.5 b/debian/tests/crypto--8.5 new file mode 100755 index 0000000..0289eb6 --- /dev/null +++ b/debian/tests/crypto--8.5 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.5 +load chiark_tcl_crypto-1.so +set t {crypto/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/crypto--8.6 b/debian/tests/crypto--8.6 new file mode 100755 index 0000000..860089a --- /dev/null +++ b/debian/tests/crypto--8.6 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.6 +load chiark_tcl_crypto-1.so +set t {crypto/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/crypto--8.7 b/debian/tests/crypto--8.7 new file mode 100755 index 0000000..a9ed1f8 --- /dev/null +++ b/debian/tests/crypto--8.7 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.7 +load chiark_tcl_crypto-1.so +set t {crypto/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/crypto--def b/debian/tests/crypto--def new file mode 100755 index 0000000..1b14b4f --- /dev/null +++ b/debian/tests/crypto--def @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh +load chiark_tcl_crypto-1.so +set t {crypto/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/dgram--8.5 b/debian/tests/dgram--8.5 new file mode 100755 index 0000000..ab23044 --- /dev/null +++ b/debian/tests/dgram--8.5 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.5 +load chiark_tcl_dgram-1.so +set t {dgram/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/dgram--8.6 b/debian/tests/dgram--8.6 new file mode 100755 index 0000000..cf3f9f8 --- /dev/null +++ b/debian/tests/dgram--8.6 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.6 +load chiark_tcl_dgram-1.so +set t {dgram/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/dgram--8.7 b/debian/tests/dgram--8.7 new file mode 100755 index 0000000..4f1d375 --- /dev/null +++ b/debian/tests/dgram--8.7 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.7 +load chiark_tcl_dgram-1.so +set t {dgram/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/dgram--def b/debian/tests/dgram--def new file mode 100755 index 0000000..874cfd2 --- /dev/null +++ b/debian/tests/dgram--def @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh +load chiark_tcl_dgram-1.so +set t {dgram/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/hbytes--8.5 b/debian/tests/hbytes--8.5 new file mode 100755 index 0000000..e512858 --- /dev/null +++ b/debian/tests/hbytes--8.5 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.5 +load chiark_tcl_hbytes-1.so +set t {hbytes/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/hbytes--8.6 b/debian/tests/hbytes--8.6 new file mode 100755 index 0000000..5e737e5 --- /dev/null +++ b/debian/tests/hbytes--8.6 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.6 +load chiark_tcl_hbytes-1.so +set t {hbytes/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/hbytes--8.7 b/debian/tests/hbytes--8.7 new file mode 100755 index 0000000..95e5d19 --- /dev/null +++ b/debian/tests/hbytes--8.7 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.7 +load chiark_tcl_hbytes-1.so +set t {hbytes/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/hbytes--def b/debian/tests/hbytes--def new file mode 100755 index 0000000..c437940 --- /dev/null +++ b/debian/tests/hbytes--def @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh +load chiark_tcl_hbytes-1.so +set t {hbytes/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/tuntap--8.5 b/debian/tests/tuntap--8.5 new file mode 100755 index 0000000..2f03f9c --- /dev/null +++ b/debian/tests/tuntap--8.5 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.5 +load chiark_tcl_tuntap-1.so +set t {tuntap/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/tuntap--8.6 b/debian/tests/tuntap--8.6 new file mode 100755 index 0000000..b1493c1 --- /dev/null +++ b/debian/tests/tuntap--8.6 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.6 +load chiark_tcl_tuntap-1.so +set t {tuntap/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/tuntap--8.7 b/debian/tests/tuntap--8.7 new file mode 100755 index 0000000..1f58f36 --- /dev/null +++ b/debian/tests/tuntap--8.7 @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh8.7 +load chiark_tcl_tuntap-1.so +set t {tuntap/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/debian/tests/tuntap--def b/debian/tests/tuntap--def new file mode 100755 index 0000000..58c5244 --- /dev/null +++ b/debian/tests/tuntap--def @@ -0,0 +1,4 @@ +#!/usr/bin/tclsh +load chiark_tcl_tuntap-1.so +set t {tuntap/runtest.tcl} +if {[file exists $t]} { source $t } diff --git a/dgram/dgram.c b/dgram/dgram.c index 24c5446..5ffe91f 100644 --- a/dgram/dgram.c +++ b/dgram/dgram.c @@ -134,6 +134,18 @@ x_rc: Tcl_BackgroundError(ip); } +int cht_do_dgramsocket_sockname(ClientData cd, Tcl_Interp *ip, + void *sock_v, SockAddr_Value *result) { + DgramSocket *sock= sock_v; + int r; + + socklen_t salen = sock->addr_buflen; + r= getsockname(sock->fd, sock->addr_buf, &salen); + if (r) return cht_posixerr(ip,errno,"getsockname"); + cht_sockaddr_create(result, sock->addr_buf, salen); + return TCL_OK; +} + int cht_do_dgramsocket_on_receive(ClientData cd, Tcl_Interp *ip, void *sock_v, Tcl_Obj *newscript) { DgramSocket *sock= sock_v; diff --git a/dgram/dgram.tct b/dgram/dgram.tct index 119e354..938d0a3 100644 --- a/dgram/dgram.tct +++ b/dgram/dgram.tct @@ -32,6 +32,9 @@ Table dgramsocket DgramSocket_SubCommand sock iddata(&cht_dgram_socks) data hb remote sockaddr + sockname + sock iddata(&cht_dgram_socks) + => sockaddr on-receive sock iddata(&cht_dgram_socks) ?script obj diff --git a/dgram/runtest.tcl b/dgram/runtest.tcl new file mode 100644 index 0000000..9488d96 --- /dev/null +++ b/dgram/runtest.tcl @@ -0,0 +1,2 @@ +set d [dgram-socket create *,*] +dgram-socket sockname $d diff --git a/hbytes/hbytes.h b/hbytes/hbytes.h index 0ed871c..2e5d658 100644 --- a/hbytes/hbytes.h +++ b/hbytes/hbytes.h @@ -248,7 +248,7 @@ extern Tcl_ObjType cht_addrmap_type; /* from ulong.c */ -Tcl_ObjType cht_ulong_type; +extern Tcl_ObjType cht_ulong_type; /* useful macros */