From 2196c9a1b8b26c2c7e7b01d0abbe64c2ec15d05b Mon Sep 17 00:00:00 2001 From: Josh Grosse Date: Sun, 1 May 2016 07:18:58 -0400 Subject: [PATCH] Pledged sysutils/shunt --- sysutils/shunt/Makefile | 27 +++++++++++++++++++ sysutils/shunt/TODO | 1 + sysutils/shunt/UPDATE | 1 + sysutils/shunt/distinfo | 2 ++ sysutils/shunt/patches/patch-src_Macros_mk | 27 +++++++++++++++++++ .../shunt/patches/patch-src_exactly_main_c | 14 ++++++++++ .../shunt/patches/patch-src_flyisofs_main_c | 14 ++++++++++ sysutils/shunt/patches/patch-src_shunt_main_c | 14 ++++++++++ sysutils/shunt/pkg/DESCR | 5 ++++ sysutils/shunt/pkg/PLIST | 6 +++++ 10 files changed, 111 insertions(+) create mode 100644 sysutils/shunt/Makefile create mode 100644 sysutils/shunt/TODO create mode 100644 sysutils/shunt/UPDATE create mode 100644 sysutils/shunt/distinfo create mode 100644 sysutils/shunt/patches/patch-src_Macros_mk create mode 100644 sysutils/shunt/patches/patch-src_exactly_main_c create mode 100644 sysutils/shunt/patches/patch-src_flyisofs_main_c create mode 100644 sysutils/shunt/patches/patch-src_shunt_main_c create mode 100644 sysutils/shunt/pkg/DESCR create mode 100644 sysutils/shunt/pkg/PLIST diff --git a/sysutils/shunt/Makefile b/sysutils/shunt/Makefile new file mode 100644 index 0000000000..537acfb13e --- /dev/null +++ b/sysutils/shunt/Makefile @@ -0,0 +1,27 @@ +# $OpenBSD: Makefile,v 1.6 2013/05/30 10:51:23 sthen Exp $ + +COMMENT= tools to extend pipe capabilities + +DISTNAME= shunt-1.7.3 +REVISION= 0 +CATEGORIES= sysutils + +HOMEPAGE= http://www.serice.net/shunt/ + +MAINTAINER= Josh Grosse + +# BSD +PERMIT_PACKAGE_CDROM= Yes + +MASTER_SITES= ${HOMEPAGE} + +WANTLIB= c + +USE_GMAKE= Yes + +do-install: + ${INSTALL_PROGRAM} ${WRKBUILD}/bin/* /${PREFIX}/bin + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/shunt + ${INSTALL_DATA} ${WRKSRC}/README.TXT ${PREFIX}/share/doc/shunt + +.include diff --git a/sysutils/shunt/TODO b/sysutils/shunt/TODO new file mode 100644 index 0000000000..4b188438bd --- /dev/null +++ b/sysutils/shunt/TODO @@ -0,0 +1 @@ +posted, awaiting commit diff --git a/sysutils/shunt/UPDATE b/sysutils/shunt/UPDATE new file mode 100644 index 0000000000..b2353c4263 --- /dev/null +++ b/sysutils/shunt/UPDATE @@ -0,0 +1 @@ +pledge added diff --git a/sysutils/shunt/distinfo b/sysutils/shunt/distinfo new file mode 100644 index 0000000000..ae3f1d03e3 --- /dev/null +++ b/sysutils/shunt/distinfo @@ -0,0 +1,2 @@ +SHA256 (shunt-1.7.3.tar.gz) = ZfQ0ZVJDeWQtEhMvVhfYUP6P8PAcGqAYqxt2EVx9y/U= +SIZE (shunt-1.7.3.tar.gz) = 25315 diff --git a/sysutils/shunt/patches/patch-src_Macros_mk b/sysutils/shunt/patches/patch-src_Macros_mk new file mode 100644 index 0000000000..3e07f8478b --- /dev/null +++ b/sysutils/shunt/patches/patch-src_Macros_mk @@ -0,0 +1,27 @@ +$OpenBSD: patch-src_Macros_mk,v 1.1.1.1 2007/09/14 18:54:20 steven Exp $ +--- src/Macros.mk.orig Fri Sep 14 18:17:05 2007 ++++ src/Macros.mk Fri Sep 14 18:17:25 2007 +@@ -4,12 +4,12 @@ + + LIBRARY = ../../lib/libshunt.a + +-CC = gcc ++#CC = gcc + + ifdef DEBUG + DCFLAGS += -g + else +- DCFLAGS += -O2 -DNDEBUG ++ DCFLAGS += -DNDEBUG + endif + + ifdef PROFILE +@@ -17,7 +17,7 @@ ifdef PROFILE + endif + + CPPFLAGS += -MMD +-CFLAGS = $(DCFLAGS) -Wall $(PROFILE_FLAGS) ++CFLAGS += $(DCFLAGS) -Wall $(PROFILE_FLAGS) + + #STATIC += -static + LDFLAGS += $(STATIC) $(PROFILE_FLAGS) diff --git a/sysutils/shunt/patches/patch-src_exactly_main_c b/sysutils/shunt/patches/patch-src_exactly_main_c new file mode 100644 index 0000000000..110cd0fd91 --- /dev/null +++ b/sysutils/shunt/patches/patch-src_exactly_main_c @@ -0,0 +1,14 @@ +$OpenBSD$ +--- src/exactly/main.c.orig Wed Apr 27 19:08:28 2016 ++++ src/exactly/main.c Wed Apr 27 19:10:31 2016 +@@ -142,6 +142,10 @@ decipher_command_line(int argc, char** argv) + + int main(int argc, char* argv[]) + { ++ if (pledge("stdio", NULL) == -1) { ++ perror("pledge"); ++ exit(2); ++ } + char* block = NULL; + unsigned long int i = 0; + unsigned long int rcount = 0; diff --git a/sysutils/shunt/patches/patch-src_flyisofs_main_c b/sysutils/shunt/patches/patch-src_flyisofs_main_c new file mode 100644 index 0000000000..4e5a34c5e7 --- /dev/null +++ b/sysutils/shunt/patches/patch-src_flyisofs_main_c @@ -0,0 +1,14 @@ +$OpenBSD$ +--- src/flyisofs/main.c.orig Wed Apr 27 19:20:22 2016 ++++ src/flyisofs/main.c Wed Apr 27 19:23:33 2016 +@@ -879,6 +879,10 @@ write_padding(void) + + int main(int argc, char* argv[]) + { ++ if (pledge("stdio", NULL) == -1) { ++ perror("pledge"); ++ exit(2); ++ } + int rv = 0; + unsigned long int i = 0; + unsigned long int max_files_needed = 0; diff --git a/sysutils/shunt/patches/patch-src_shunt_main_c b/sysutils/shunt/patches/patch-src_shunt_main_c new file mode 100644 index 0000000000..52f7d9e50b --- /dev/null +++ b/sysutils/shunt/patches/patch-src_shunt_main_c @@ -0,0 +1,14 @@ +$OpenBSD$ +--- src/shunt/main.c.orig Tue Apr 19 22:53:34 2011 ++++ src/shunt/main.c Wed Apr 27 19:48:00 2016 +@@ -693,6 +693,10 @@ is_child_running() + int + main(int argc, char* argv[]) + { ++ if (pledge("stdio proc exec", NULL) == -1) { ++ perror("pledge"); ++ exit(2); ++ } + int rv = 0; + + znum_initialize(); diff --git a/sysutils/shunt/pkg/DESCR b/sysutils/shunt/pkg/DESCR new file mode 100644 index 0000000000..b9718e1fe0 --- /dev/null +++ b/sysutils/shunt/pkg/DESCR @@ -0,0 +1,5 @@ +The shunt utilities: shunt, exactly, and flyisofs, were originally +written for burning multi-set CDROM backups using mkiosfs and cdrecord. + +The key utility -- shunt -- manages recursive access to piped I/O, so that +programs may be re-run without causing a pipe to close. diff --git a/sysutils/shunt/pkg/PLIST b/sysutils/shunt/pkg/PLIST new file mode 100644 index 0000000000..95d8e67cf6 --- /dev/null +++ b/sysutils/shunt/pkg/PLIST @@ -0,0 +1,6 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2007/09/14 18:54:20 steven Exp $ +@bin bin/exactly +@bin bin/flyisofs +@bin bin/shunt +share/doc/shunt/ +share/doc/shunt/README.TXT