debian/0000775000000000000000000000000012055716161007174 5ustar debian/copyright0000664000000000000000000000417112055713425011132 0ustar This package was debianized by Bart Martens on Thu, 19 Jul 2007 20:49:02 +0200. It was downloaded from http://empty.sourceforge.net/ Copyright and license: /* empty - run processes under pseudo-terminal sessions * * Copyright (C) 2005-2012 Mikhail E. Zakharov * empty was written by Mikhail E. Zakharov. This software was based on the * basic idea of pty version 4.0 Copyright (c) 1992, Daniel J. Bernstein, but * no code was ported from pty4. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice immediately at the beginning of the file, without modification, * this list of conditions, and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ The Debian packaging is Copyright (C) 2007-2012, Bart Martens and is licensed under the GPL version 2, see `/usr/share/common-licenses/GPL-2'. debian/examples0000664000000000000000000000001312055712140010720 0ustar examples/* debian/manpages0000664000000000000000000000001012055712140010672 0ustar empty.1 debian/control0000664000000000000000000000170212055713425010577 0ustar Source: empty-expect Section: interpreters Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Bart Martens Build-Depends: debhelper (>= 9) Standards-Version: 3.9.4 Homepage: http://empty.sourceforge.net/ Package: empty-expect Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Run processes and applications under pseudo-terminal empty is a utility that provides an interface to execute and/or interact with processes under pseudo-terminal sessions (PTYs). This tool is useful in programming of shell scripts designed to communicate with interactive programs like telnet, ssh, ftp, etc. In some cases empty can be the simplest replacement for Tcl/expect or other similar programming tools because empty can be easily invoked directly from shell prompt or script, and does not use Tcl, Perl, PHP, Python or anything else as an underlying language. debian/compat0000664000000000000000000000000212055713425010372 0ustar 9 debian/watch0000664000000000000000000000053512055712140010221 0ustar version=3 opts="uversionmangle=s/(\d)[\-_]?(rc\d+|pre-rc\d+|pre\d+a?)$/$1~$2/;s/[\-\.](source|Source|src|orig|unix)$//;s/-(bin|osx)$/~$1/;s/^v(\d)/$1/;" \ http://sf.net/empty/empty[\-_](v?[\d\.]+(?:rc|rc\d+|pre-rc\d+|-unix|-source|-Source|-src|\.src|\.orig|[a-z]|b\d+|beta\d+-src|beta\d+)?)\.(?:tar\.gz|tgz|tar\.bz2|zip|pm\.gz|jar|shar\.gz|shar\.Z) debian/install0000664000000000000000000000001712055712140010554 0ustar empty usr/bin/ debian/source/0000775000000000000000000000000012055716161010474 5ustar debian/source/format0000664000000000000000000000001412055712140011673 0ustar 3.0 (quilt) debian/patches/0000775000000000000000000000000012055716161010623 5ustar debian/patches/04_bufsiz.diff0000664000000000000000000000104012055712140013246 0ustar diff -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/empty-expect-0.6.18b/empty.c ./empty.c --- ../orig/empty-expect-0.6.18b/empty.c 2009-07-27 17:26:42.000000000 +0000 +++ ./empty.c 2011-08-28 10:59:46.000000000 +0000 @@ -686,7 +686,7 @@ while ((dent = readdir(dir)) != NULL) { if (!strncmp(fmask, dent->d_name, len)) { strncpy(fname, dent->d_name, sizeof(fname) - 1); - fname[sizeof(buf) - 1] = '\0'; + fname[sizeof(fname) - 1] = '\0'; strtok(fname, sep); /* empty */ strtok(NULL, sep); /* PPID */ debian/patches/03_makefile.diff0000664000000000000000000000157412055712140013534 0ustar Index: empty-expect-0.6.18b/Makefile =================================================================== --- empty-expect-0.6.18b.orig/Makefile 2009-04-23 07:50:44.000000000 -0400 +++ empty-expect-0.6.18b/Makefile 2011-09-13 17:30:27.000000000 -0400 @@ -14,9 +14,10 @@ LIBS = -lutil PREFIX = /usr/local +PREFIX = $(DESTDIR)/usr all: - ${CC} ${CFLAGS} -Wall ${LIBS} -o empty empty.c + ${CC} ${CFLAGS} -Wall -o empty empty.c ${LIBS} FreeBSD: all NetBSD: all @@ -40,6 +41,8 @@ gcc ${CFLAGS} -Wall -o empty empty.c install: + +installnot: [ -f `which strip` ] && strip empty [ -d ${PREFIX}/bin ] && cp empty ${PREFIX}/bin || mkdir -p ${PREFIX}/bin && cp empty ${PREFIX}/bin [ -d ${PREFIX}/man/man1 ] && cp empty.1 ${PREFIX}/man/man1 || mkdir -p ${PREFIX}/man/man1 && cp empty.1 ${PREFIX}/man/man1 @@ -49,4 +52,4 @@ uninstall: deinstall clean: - rm empty + rm -f empty debian/patches/05_ldflags.diff0000664000000000000000000000045112055713425013375 0ustar --- ./Makefile.orig 2012-10-28 19:45:57.000000000 +0000 +++ ./Makefile 2012-10-28 19:46:27.000000000 +0000 @@ -17,7 +17,7 @@ PREFIX = $(DESTDIR)/usr all: - ${CC} ${CFLAGS} -Wall -o empty empty.c ${LIBS} + ${CC} ${CFLAGS} ${LDFLAGS} -Wall -o empty empty.c ${LIBS} FreeBSD: all NetBSD: all debian/patches/02_typos.diff0000664000000000000000000000152012055712140013123 0ustar Patch by "A. Costa" , thanks. Closes: #521656 'man empty' typos: "interfase" and "specitied" --- empty.1.orig 2008-12-31 15:00:48.000000000 -0500 +++ ./empty.1 2009-03-29 05:08:30.000000000 -0400 @@ -54,7 +54,7 @@ .B EXAMPLES section for the details. To simplify this operations, .B empty -offers an interfase to just +offers an interface to just .B send any data (use .B \-s @@ -100,7 +100,7 @@ with its job control algorithm will create them under /tmp directory using this templates: empty.PPID.PID.in and empty.PPID.PID.out, here PPID is usually your shell system process ID and PID is system process ID of empty-daemon. .TP \-s -send data (request) to the forked process. If fifo file was not specitied with +send data (request) to the forked process. If fifo file was not specified with .B \-o key, .B empty debian/patches/series0000664000000000000000000000011612055713425012036 0ustar 01_logfile.diff 02_typos.diff 03_makefile.diff 04_bufsiz.diff 05_ldflags.diff debian/patches/01_logfile.diff0000664000000000000000000000376212055712140013377 0ustar empty.1, empty.c: Changed default mode of the log file from 0700 to 0600, and added option "--logfile-mode=mode". Closes: #443448. diff -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/empty-0.6.16b/empty.1 ./empty.1 --- ../orig/empty-0.6.16b/empty.1 2008-11-24 10:04:45.000000000 +0100 +++ ./empty.1 2009-04-19 21:01:15.000000000 +0200 @@ -175,6 +175,10 @@ .B empty session to a file. Marks >>> and <<< show the directions of data flow. .TP +\-\-logfile-mode=mode +This option allows to choose the mode of the log file created with the -L option. +The default mode is 0600. +.TP \-p file.pid Save PID of empty daemon process to a file .TP diff -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/empty-0.6.16b/empty.c ./empty.c --- ../orig/empty-0.6.16b/empty.c 2008-11-21 10:41:02.000000000 +0100 +++ ./empty.c 2009-04-19 20:54:01.000000000 +0200 @@ -38,6 +38,9 @@ #endif +#define _GNU_SOURCE +#include + #include #include @@ -206,12 +209,28 @@ int pgrp; #endif + unsigned int logfile_mode = S_IRUSR | S_IWUSR; // was: S_IRWXU; + + static struct option long_options[] = + { + { "logfile-mode", 1, 0, 0 }, + { NULL, 0, 0, 0 } + }; + + int option_index = -1; + #ifndef __linux__ while ((ch = getopt(argc, argv, "Scvhfrb:kwslp:i:o:t:L:")) != -1) #else - while ((ch = getopt(argc, argv, "+Scvhfrb:kwslp:i:o:t:L:")) != -1) + while ((ch = getopt_long(argc, argv, "+Scvhfrb:kwslp:i:o:t:L:", long_options, &option_index)) != -1) #endif switch (ch) { + case 0: + if( option_index >= 0 + && strcmp( long_options[option_index].name, "logfile-mode" ) == 0 + && optarg ) + sscanf( optarg, "%o", &logfile_mode ); + break; case 'f': fflg = 1; break; @@ -481,7 +500,7 @@ } if (Lflg) - if ((lfd = open(sl, O_CREAT|O_WRONLY|O_APPEND, S_IRWXU)) == -1) + if ((lfd = open(sl, O_CREAT|O_WRONLY|O_APPEND, logfile_mode)) == -1) (void)syslog(LOG_NOTICE, "Warning: Can't open %s for session-log %m", sl); debian/changelog0000664000000000000000000000620312055713425011047 0ustar empty-expect (0.6.19b-1ubuntu1) raring; urgency=low * Merge from Debian Remaining changes: - Update 03_makefile.diff to place libs in the correct place. Fixes FTBFS. (LP: #770753) * debian/patches/05_ldflags.diff: Updated. Place libs in the correct place. Fixes quilt push -a failure. -- Oussama Bounaim Mon, 26 Nov 2012 18:18:45 +0100 empty-expect (0.6.19b-1) unstable; urgency=low * New upstream release. * debian/control, debian/compat: Standards-Version 3.9.4, debhelper 9. * debian/rules: Use dpkg-buildflags for hardening, remove -O2 for #611912. * debian/patches/05_ldflags.diff: Added. Fixes hardening-no-relro. -- Bart Martens Sun, 28 Oct 2012 17:11:10 +0000 empty-expect (0.6.18b-3ubuntu1) oneiric; urgency=low * Update 03_makefile.diff to place libs in the correct place. Fixes FTBFS. (LP: #770753) -- Daniel T Chen Tue, 13 Sep 2011 17:31:25 -0400 empty-expect (0.6.18b-3) unstable; urgency=low * Switch to dpkg-source 3.0 (quilt) format. * debian/rules: Added CFLAGS=-g to avoid -O2. Closes: #611912. * debian/patches/03_makefile.diff: Set PREFIX to $(DESTDIR)/usr, don't use the "install" rule, and fix the clean rule (rm -f ...). * debian/patches/04_bufsiz.diff: Added. Fixes "warning: array subscript is above array bounds". -- Bart Martens Sun, 28 Aug 2011 06:42:07 +0000 empty-expect (0.6.18b-2) unstable; urgency=low * debian/patches/01_logfile.diff: Moved existing change to a patch file. * debian/patches/02_typos.diff: Added. Fixes typos. Closes: #521656. -- Bart Martens Thu, 29 Oct 2009 17:29:34 +0100 empty-expect (0.6.18b-1) unstable; urgency=low * New upstream release. -- Bart Martens Thu, 06 Aug 2009 21:37:34 +0200 empty-expect (0.6.17b-1) unstable; urgency=low * New upstream release. -- Bart Martens Sat, 02 May 2009 17:41:07 +0200 empty-expect (0.6.16b-1) unstable; urgency=low * New upstream release. -- Bart Martens Wed, 31 Dec 2008 20:26:47 +0100 empty-expect (0.6.15b-1) unstable; urgency=low * New upstream release. -- Bart Martens Sat, 02 Feb 2008 08:34:02 +0100 empty-expect (0.6.14b-1) unstable; urgency=low * New upstream release. -- Bart Martens Wed, 05 Dec 2007 22:35:28 +0100 empty-expect (0.6.12b-1) unstable; urgency=low * New upstream release. -- Bart Martens Sun, 04 Nov 2007 18:47:14 +0100 empty-expect (0.6.11b-3) unstable; urgency=low * empty.1, empty.c: Changed default mode of the log file from 0700 to 0600, and added option "--logfile-mode=mode". Closes: #443448. -- Bart Martens Sun, 23 Sep 2007 08:54:08 +0200 empty-expect (0.6.11b-2) unstable; urgency=low * debian/changelog, debian/control: Source and binary package renamed as requested by ftpmaster. -- Bart Martens Thu, 02 Aug 2007 19:11:25 +0200 empty (0.6.11b-1) unstable; urgency=low * Initial release. Closes: #433844. -- Bart Martens Thu, 19 Jul 2007 20:49:02 +0200 debian/rules0000775000000000000000000000022712055713425010255 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 # see #611912, no -O2 export CFLAGS := $(shell dpkg-buildflags --get CFLAGS | sed -e "s/-O2 //") %: dh $@