diff -Nru nyancat-1.4.4/debian/changelog nyancat-1.5.1/debian/changelog --- nyancat-1.4.4/debian/changelog 2014-07-17 01:30:08.000000000 +0000 +++ nyancat-1.5.1/debian/changelog 2016-02-13 18:44:55.000000000 +0000 @@ -1,3 +1,16 @@ +nyancat (1.5.1-1) unstable; urgency=medium + + * New upstream release + * reconf-inetd is going to be removed from the archive; migrate + nyancat-server to use systemd socket activation. Mark package as linux-any + accordingly. kFreeBSD/Hurd users will have to manually configure their + inetd server. (Closes: #733866) + * Bump Standards-Version to 3.9.6 + - No changes required + * d/rules: set DEB_BUILD_MAINT_OPTIONS=hardening=+all + + -- Jonathan McCrohan Sat, 13 Feb 2016 18:44:55 +0000 + nyancat (1.4.4-1) unstable; urgency=medium * The 'MOAR NYANCAT' release diff -Nru nyancat-1.4.4/debian/control nyancat-1.5.1/debian/control --- nyancat-1.4.4/debian/control 2014-07-17 01:17:46.000000000 +0000 +++ nyancat-1.5.1/debian/control 2016-02-13 18:23:41.000000000 +0000 @@ -2,8 +2,8 @@ Section: misc Priority: extra Maintainer: Jonathan McCrohan -Build-Depends: debhelper (>= 9) -Standards-Version: 3.9.5 +Build-Depends: debhelper (>= 9), dh-systemd +Standards-Version: 3.9.6 Homepage: https://github.com/klange/nyancat Package: nyancat @@ -17,7 +17,7 @@ Package: nyancat-server Architecture: all -Depends: nyancat (>= ${source:Version}), openbsd-inetd | inet-superserver, reconf-inetd, ${misc:Depends} +Depends: nyancat (>= ${source:Version}), ${misc:Depends} Conflicts: telnetd Description: Animated terminal Nyancat server configurations nyancat-server contains the configurations required to quickly set up a nyancat diff -Nru nyancat-1.4.4/debian/nyancat-server.install nyancat-1.5.1/debian/nyancat-server.install --- nyancat-1.4.4/debian/nyancat-server.install 2014-07-17 01:17:46.000000000 +0000 +++ nyancat-1.5.1/debian/nyancat-server.install 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -debian/reconf-inetd/nyancat-server.tcp usr/share/reconf-inetd/ -debian/reconf-inetd/nyancat-server.tcp6 usr/share/reconf-inetd/ diff -Nru nyancat-1.4.4/debian/nyancat-server.postinst nyancat-1.5.1/debian/nyancat-server.postinst --- nyancat-1.4.4/debian/nyancat-server.postinst 2014-07-17 01:17:46.000000000 +0000 +++ nyancat-1.5.1/debian/nyancat-server.postinst 2016-02-13 18:19:38.000000000 +0000 @@ -2,27 +2,7 @@ set -e -OLD_NYANCAT_ENTRY="telnet stream tcp nowait nobody /usr/bin/nyancat nyancat -t" -RELEASE="1.0+git20120523.99dc310-1" - -case "$1" in - configure) - # if upgrading from previous non reconf-inetd version - if dpkg --compare-versions "$2" lt-nl "$RELEASE"; then - # remove previous update-inetd entry if unmodified - if fgrep -qx "## $OLD_NYANCAT_ENTRY" /etc/inetd.conf || \ - fgrep -qx "$OLD_NYANCAT_ENTRY" /etc/inetd.conf; then - if [ -x /usr/sbin/update-inetd ]; then - # remove nyancat reconf-inetd entries - update-inetd --multi --pattern nyancat --remove telnet || true - if [ -x /usr/sbin/reconf-inetd ]; then - # add the nyancat-server entries back again - reconf-inetd || true - fi - fi - fi - fi - ;; -esac +# Run reconf-inetd one last time to remove entries from /etc/inetd.conf +reconf-inetd || true #DEBHELPER# diff -Nru nyancat-1.4.4/debian/nyancat-server@.service nyancat-1.5.1/debian/nyancat-server@.service --- nyancat-1.4.4/debian/nyancat-server@.service 1970-01-01 00:00:00.000000000 +0000 +++ nyancat-1.5.1/debian/nyancat-server@.service 2016-02-13 18:19:38.000000000 +0000 @@ -0,0 +1,12 @@ +[Unit] +Description=nyancat-server +Documentation=man:nyancat-server(1) + +[Service] +User=nobody +ExecStart=-/usr/bin/nyancat-server -t +StandardInput=socket +StandardOutput=socket + +[Install] +WantedBy=multi-user.target diff -Nru nyancat-1.4.4/debian/nyancat-server.socket nyancat-1.5.1/debian/nyancat-server.socket --- nyancat-1.4.4/debian/nyancat-server.socket 1970-01-01 00:00:00.000000000 +0000 +++ nyancat-1.5.1/debian/nyancat-server.socket 2016-02-13 18:19:38.000000000 +0000 @@ -0,0 +1,9 @@ +[Unit] +Description=nyancat-server socket + +[Socket] +ListenStream=23 +Accept=true + +[Install] +WantedBy=sockets.target diff -Nru nyancat-1.4.4/debian/reconf-inetd/nyancat-server.tcp nyancat-1.5.1/debian/reconf-inetd/nyancat-server.tcp --- nyancat-1.4.4/debian/reconf-inetd/nyancat-server.tcp 2014-07-17 01:17:46.000000000 +0000 +++ nyancat-1.5.1/debian/reconf-inetd/nyancat-server.tcp 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -service telnet -{ - socket_type = stream - protocol = tcp - wait = no - user = nobody - server = /usr/bin/nyancat-server - server_args = nyancat -t -} diff -Nru nyancat-1.4.4/debian/reconf-inetd/nyancat-server.tcp6 nyancat-1.5.1/debian/reconf-inetd/nyancat-server.tcp6 --- nyancat-1.4.4/debian/reconf-inetd/nyancat-server.tcp6 2014-07-17 01:17:46.000000000 +0000 +++ nyancat-1.5.1/debian/reconf-inetd/nyancat-server.tcp6 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -service telnet -{ - socket_type = stream - protocol = tcp6 - wait = no - user = nobody - server = /usr/bin/nyancat-server - server_args = nyancat -t -} diff -Nru nyancat-1.4.4/debian/rules nyancat-1.5.1/debian/rules --- nyancat-1.4.4/debian/rules 2014-07-17 01:17:46.000000000 +0000 +++ nyancat-1.5.1/debian/rules 2016-02-13 18:28:12.000000000 +0000 @@ -4,8 +4,10 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + get-orig-source: debian/get-git-source.sh %: - dh $@ + dh $@ --with systemd diff -Nru nyancat-1.4.4/Makefile nyancat-1.5.1/Makefile --- nyancat-1.4.4/Makefile 2014-05-01 18:14:53.000000000 +0000 +++ nyancat-1.5.1/Makefile 2015-11-24 05:05:00.000000000 +0000 @@ -1,5 +1,5 @@ package = nyancat -version = 1.4.4 +version = 1.5.1 tarname = $(package) distdir = $(tarname)-$(version) diff -Nru nyancat-1.4.4/README.md nyancat-1.5.1/README.md --- nyancat-1.4.4/README.md 2014-05-01 18:14:53.000000000 +0000 +++ nyancat-1.5.1/README.md 2015-11-24 05:05:00.000000000 +0000 @@ -14,6 +14,11 @@ - [Mandriva](http://sophie.zarb.org/rpms/928724d4aea0efdbdeda1c80cb59a7d3) - [Ubuntu](https://launchpad.net/ubuntu/+source/nyancat) +And also on some BSD systems: + +- [FreeBSD](http://www.freshports.org/net/nyancat/) +- [OpenBSD](http://openports.se/misc/nyancat) + ## Setup First build the C application: diff -Nru nyancat-1.4.4/src/nyancat.c nyancat-1.5.1/src/nyancat.c --- nyancat-1.4.4/src/nyancat.c 2014-05-01 18:14:53.000000000 +0000 +++ nyancat-1.5.1/src/nyancat.c 2015-11-24 05:05:00.000000000 +0000 @@ -50,6 +50,9 @@ */ #define _XOPEN_SOURCE 500 +#define _DARWIN_C_SOURCE 1 +#define _BSD_SOURCE +#define __BSD_VISIBLE 1 #include #include #include @@ -350,7 +353,7 @@ int ttype; uint32_t option = 0, done = 0, sb_mode = 0; /* Various pieces for the telnet communication */ - char sb[1024] = {0}; + unsigned char sb[1024] = {0}; unsigned short sb_len = 0; /* Whether or not to show the MOTD intro */ @@ -482,7 +485,7 @@ /* This was a response to the TTYPE command, meaning * that this should be a terminal type */ alarm(2); - strcpy(term, &sb[2]); + strcpy(term, (char *)&sb[2]); done++; } else if (sb[0] == NAWS) { @@ -591,6 +594,8 @@ ttype = 6; /* No color support */ } else if (strstr(term, "fallback")) { ttype = 4; /* Unicode fallback */ + } else if (strstr(term, "rxvt-256color")) { + ttype = 1; /* xterm 256-color compatible */ } else if (strstr(term, "rxvt")) { ttype = 3; /* Accepts LINUX mode */ } else if (strstr(term, "vt100") && terminal_width == 40) {