*.o
*.so
*.d
-*.test.tcl
+test-load.tcl
+debian-substvars
*+tcmdif.[ch]
debian/files
debian/libtcl-chiark-1
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:
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);
base+tcmdif.h: $(BASE_TCT) $(TCMDIFGEN)
$(TCMDIFGEN) -wh -o$@ $<
+debian-substvars: all
+
include shlib.make
include final.make
%+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
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");
-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 <ijackson@chiark.greenend.org.uk> 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 <ijackson@chiark.greenend.org.uk> 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 <ijackson@chiark.greenend.org.uk> 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 <ijackson@chiark.greenend.org.uk> 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 <ijackson@chiark.greenend.org.uk> 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 <ijackson@chiark.greenend.org.uk> Sun, 19 Aug 2018 00:21:18 +0100
chiark-tcl (1.2.1) unstable; urgency=high
--- /dev/null
+#!/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
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)
$(checkdir)
dh_testroot
+debian/tests/control: debian/regenerate-autopkgtests debian/rules
+ $(MAKE) debian-substvars
+ $< $(tcl_versions)
+
.PHONY: binary binary-arch binary-indep clean checkroot
--- /dev/null
+#!/usr/bin/tclsh8.5
+load chiark_tcl_adns-1.so
+set t {adns/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.6
+load chiark_tcl_adns-1.so
+set t {adns/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.7
+load chiark_tcl_adns-1.so
+set t {adns/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh
+load chiark_tcl_adns-1.so
+set t {adns/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.5
+load chiark_tcl_cdb-1.so
+set t {cdb/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.6
+load chiark_tcl_cdb-1.so
+set t {cdb/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.7
+load chiark_tcl_cdb-1.so
+set t {cdb/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh
+load chiark_tcl_cdb-1.so
+set t {cdb/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+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
+
--- /dev/null
+#!/usr/bin/tclsh8.5
+load chiark_tcl_crypto-1.so
+set t {crypto/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.6
+load chiark_tcl_crypto-1.so
+set t {crypto/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.7
+load chiark_tcl_crypto-1.so
+set t {crypto/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh
+load chiark_tcl_crypto-1.so
+set t {crypto/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.5
+load chiark_tcl_dgram-1.so
+set t {dgram/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.6
+load chiark_tcl_dgram-1.so
+set t {dgram/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.7
+load chiark_tcl_dgram-1.so
+set t {dgram/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh
+load chiark_tcl_dgram-1.so
+set t {dgram/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.5
+load chiark_tcl_hbytes-1.so
+set t {hbytes/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.6
+load chiark_tcl_hbytes-1.so
+set t {hbytes/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.7
+load chiark_tcl_hbytes-1.so
+set t {hbytes/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh
+load chiark_tcl_hbytes-1.so
+set t {hbytes/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.5
+load chiark_tcl_tuntap-1.so
+set t {tuntap/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.6
+load chiark_tcl_tuntap-1.so
+set t {tuntap/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh8.7
+load chiark_tcl_tuntap-1.so
+set t {tuntap/runtest.tcl}
+if {[file exists $t]} { source $t }
--- /dev/null
+#!/usr/bin/tclsh
+load chiark_tcl_tuntap-1.so
+set t {tuntap/runtest.tcl}
+if {[file exists $t]} { source $t }
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;
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
--- /dev/null
+set d [dgram-socket create *,*]
+dgram-socket sockname $d
/* from ulong.c */
-Tcl_ObjType cht_ulong_type;
+extern Tcl_ObjType cht_ulong_type;
/* useful macros */