pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/fdtools



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Tue Oct  3 00:43:22 UTC 2017

Added Files:
        pkgsrc/sysutils/fdtools: DESCR Makefile PLIST distinfo
        pkgsrc/sysutils/fdtools/patches:
            patch-conf-compile_defaults_host__compile.sh
            patch-conf-compile_defaults_host__link.sh patch-src_recvfd.c
            patch-src_sigsched.c

Log Message:
Initial import of fdtools, to manipulate file descriptors from shell scripts.

fdtools is a set of utilities for working with file descriptors. With
these tools, you can examine and manipulate file descriptor properties
from shell scripts, where without them you might have resorted to a
different language. These tools can rewind file descriptors, switch them
between blocking and nonblocking mode, and examine their inode
information. On some systems (currently only Linux, as far as I know)
they can also allocate, lock, and switch virtual consoles.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/fdtools/DESCR \
    pkgsrc/sysutils/fdtools/Makefile pkgsrc/sysutils/fdtools/PLIST \
    pkgsrc/sysutils/fdtools/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/sysutils/fdtools/patches/patch-conf-compile_defaults_host__compile.sh \
    pkgsrc/sysutils/fdtools/patches/patch-conf-compile_defaults_host__link.sh \
    pkgsrc/sysutils/fdtools/patches/patch-src_recvfd.c \
    pkgsrc/sysutils/fdtools/patches/patch-src_sigsched.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/sysutils/fdtools/DESCR
diff -u /dev/null pkgsrc/sysutils/fdtools/DESCR:1.1
--- /dev/null   Tue Oct  3 00:43:22 2017
+++ pkgsrc/sysutils/fdtools/DESCR       Tue Oct  3 00:43:22 2017
@@ -0,0 +1,7 @@
+fdtools is a set of utilities for working with file descriptors. With
+these tools, you can examine and manipulate file descriptor properties
+from shell scripts, where without them you might have resorted to a
+different language. These tools can rewind file descriptors, switch them
+between blocking and nonblocking mode, and examine their inode
+information. On some systems (currently only Linux, as far as I know)
+they can also allocate, lock, and switch virtual consoles.
Index: pkgsrc/sysutils/fdtools/Makefile
diff -u /dev/null pkgsrc/sysutils/fdtools/Makefile:1.1
--- /dev/null   Tue Oct  3 00:43:22 2017
+++ pkgsrc/sysutils/fdtools/Makefile    Tue Oct  3 00:43:22 2017
@@ -0,0 +1,32 @@
+# $NetBSD: Makefile,v 1.1 2017/10/03 00:43:22 schmonz Exp $
+
+DISTNAME=              fdtools-2015.03.28
+CATEGORIES=            sysutils
+MASTER_SITES=          http://code.dogmap.org/fdtools/releases/
+EXTRACT_SUFX=          .tar.bz2
+
+MAINTAINER=            schmonz%NetBSD.org@localhost
+HOMEPAGE=              http://code.dogmap.org/fdtools/
+COMMENT=               Manipulate file descriptor properties from shell scripts
+LICENSE=               gnu-gpl-v2
+
+DJB_RESTRICTED=                no
+
+WRKSRC=                        ${WRKDIR}/misc/${PKGNAME_NOREV}
+DJB_SLASHPACKAGE=      YES
+
+INSTALLATION_DIRS+=    bin
+
+do-configure:
+       ${ECHO} ${PREFIX} > ${WRKSRC}/conf-compile/defaults/package_home
+       ${ECHO} ${PREFIX}/lib/skalibs/sysdeps > ${WRKSRC}/conf-compile/defaults/depend_skalibs_sysdeps
+
+do-install:
+       cd ${WRKSRC}/command; \
+       for i in *; do \
+         ${INSTALL_PROGRAM} $${i} ${DESTDIR}${PREFIX}/bin; \
+       done
+
+.include "../../devel/skalibs/buildlink3.mk"
+.include "../../mk/djbware.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/sysutils/fdtools/PLIST
diff -u /dev/null pkgsrc/sysutils/fdtools/PLIST:1.1
--- /dev/null   Tue Oct  3 00:43:22 2017
+++ pkgsrc/sysutils/fdtools/PLIST       Tue Oct  3 00:43:22 2017
@@ -0,0 +1,12 @@
+@comment $NetBSD: PLIST,v 1.1 2017/10/03 00:43:22 schmonz Exp $
+bin/grabconsole
+bin/multitee
+bin/pipecycle
+bin/recvfd
+bin/seek0
+bin/sendfd
+bin/setblock
+bin/statfile
+bin/vc-get
+bin/vc-lock
+bin/vc-switch
Index: pkgsrc/sysutils/fdtools/distinfo
diff -u /dev/null pkgsrc/sysutils/fdtools/distinfo:1.1
--- /dev/null   Tue Oct  3 00:43:22 2017
+++ pkgsrc/sysutils/fdtools/distinfo    Tue Oct  3 00:43:22 2017
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1 2017/10/03 00:43:22 schmonz Exp $
+
+SHA1 (fdtools-2015.03.28.tar.bz2) = 7bd1c9e067df8297e1f4bc430c33903899585aee
+RMD160 (fdtools-2015.03.28.tar.bz2) = d1bfed8c1718b5ec178cc763416f677f4cc26f0d
+SHA512 (fdtools-2015.03.28.tar.bz2) = e6b5665869538758edd90876c1696d753aa5859e9dc2ceffbcac98ea682e730424ea972126d20d90945d554a833278059558d85ce5290c09b3f339d0191f565c
+Size (fdtools-2015.03.28.tar.bz2) = 40057 bytes
+SHA1 (patch-conf-compile_defaults_host__compile.sh) = 07d7dcb943e664f838c7b1a72f8bb92d4ad994a0
+SHA1 (patch-conf-compile_defaults_host__link.sh) = d7e2ba5574885e4f09158678681f58e457a14732
+SHA1 (patch-src_recvfd.c) = 4fe086cae8fa9623e29954cb03ee5a63a72d25af
+SHA1 (patch-src_sigsched.c) = ed4cf2111ab65fb80f5cbcfd6aa0c49db12a845a

Index: pkgsrc/sysutils/fdtools/patches/patch-conf-compile_defaults_host__compile.sh
diff -u /dev/null pkgsrc/sysutils/fdtools/patches/patch-conf-compile_defaults_host__compile.sh:1.1
--- /dev/null   Tue Oct  3 00:43:22 2017
+++ pkgsrc/sysutils/fdtools/patches/patch-conf-compile_defaults_host__compile.sh        Tue Oct  3 00:43:22 2017
@@ -0,0 +1,13 @@
+$NetBSD: patch-conf-compile_defaults_host__compile.sh,v 1.1 2017/10/03 00:43:22 schmonz Exp $
+
+Find skalibs.
+
+--- conf-compile/defaults/host_compile.sh.orig 2015-03-28 22:14:58.000000000 +0000
++++ conf-compile/defaults/host_compile.sh
+@@ -4,5 +4,5 @@
+ # create, respectively.  The arguments are -I search directives; make sure to
+ # include them in the compilation command.
+ 
+-gcc -O2 ${1+"$@"} -c "${input?}" -o "${output?}" \
++gcc -O2 -I ${PREFIX}/include ${1+"$@"} -c "${input?}" -o "${output?}" \
+   -Wall -W -Wpointer-arith -Wcast-align -Wwrite-strings
Index: pkgsrc/sysutils/fdtools/patches/patch-conf-compile_defaults_host__link.sh
diff -u /dev/null pkgsrc/sysutils/fdtools/patches/patch-conf-compile_defaults_host__link.sh:1.1
--- /dev/null   Tue Oct  3 00:43:22 2017
+++ pkgsrc/sysutils/fdtools/patches/patch-conf-compile_defaults_host__link.sh   Tue Oct  3 00:43:22 2017
@@ -0,0 +1,12 @@
+$NetBSD: patch-conf-compile_defaults_host__link.sh,v 1.1 2017/10/03 00:43:22 schmonz Exp $
+
+Find skalibs.
+
+--- conf-compile/defaults/host_link.sh.orig    2015-03-28 22:14:58.000000000 +0000
++++ conf-compile/defaults/host_link.sh
+@@ -3,4 +3,4 @@
+ # variable $output names the library file to create.  The arguments are -L
+ # search directives and the input object files and libraries.
+ 
+-gcc -o "${output?}" -s ${1+"$@"}
++gcc -o "${output?}" -s -L ${PREFIX}/lib/skalibs ${1+"$@"}
Index: pkgsrc/sysutils/fdtools/patches/patch-src_recvfd.c
diff -u /dev/null pkgsrc/sysutils/fdtools/patches/patch-src_recvfd.c:1.1
--- /dev/null   Tue Oct  3 00:43:22 2017
+++ pkgsrc/sysutils/fdtools/patches/patch-src_recvfd.c  Tue Oct  3 00:43:22 2017
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_recvfd.c,v 1.1 2017/10/03 00:43:22 schmonz Exp $
+
+Avoid "invalid operands to binary expression" with clang.
+
+--- src/recvfd.c.orig  2015-03-16 06:02:40.000000000 +0000
++++ src/recvfd.c
+@@ -65,7 +65,8 @@ int main(int argc, char** argv) {
+     if (named_fd<10) {
+       type_fd duped=fcntl(named_fd, F_DUPFD, 10);
+       if (duped<0) DIE0(dup);
+-      if (fd_close(named_fd)!=0) DIE1(close, "descriptor");
++      //if (fd_close(named_fd)!=0) DIE1(close, "descriptor");
++      fd_close(named_fd);
+       named_fd=duped;
+     }
+     buf[int_fmt(buf, named_fd)]='\0';
Index: pkgsrc/sysutils/fdtools/patches/patch-src_sigsched.c
diff -u /dev/null pkgsrc/sysutils/fdtools/patches/patch-src_sigsched.c:1.1
--- /dev/null   Tue Oct  3 00:43:22 2017
+++ pkgsrc/sysutils/fdtools/patches/patch-src_sigsched.c        Tue Oct  3 00:43:22 2017
@@ -0,0 +1,21 @@
+$NetBSD: patch-src_sigsched.c,v 1.1 2017/10/03 00:43:22 schmonz Exp $
+
+Provide a default definition, needed on at least OS X.
+
+--- src/sigsched.c.orig        2015-03-16 03:55:56.000000000 +0000
++++ src/sigsched.c
+@@ -36,11 +36,9 @@ XXX: how well do we clean up upon ss_exe
+ #define sigc_block(x) (sigblock(*(x)))
+ */
+ 
+-/*
+-//#ifndef NSIG
+-//#define NSIG 64 / * it's not as if any sane system has more than 32 * /
+-//#endif
+-*/
++#ifndef NSIG
++#define NSIG 64 /* it's not as if any sane system has more than 32 */
++#endif
+ 
+ #define NUMSIGS NSIG
+ 



Home | Main Index | Thread Index | Old Index