Skip to content

Commit

Permalink
Pledged sysutils/shunt
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Grosse committed May 1, 2016
1 parent f678d77 commit 2196c9a
Show file tree
Hide file tree
Showing 10 changed files with 111 additions and 0 deletions.
27 changes: 27 additions & 0 deletions 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 <josh@jggimi.homeip.net>

# 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 <bsd.port.mk>
1 change: 1 addition & 0 deletions sysutils/shunt/TODO
@@ -0,0 +1 @@
posted, awaiting commit
1 change: 1 addition & 0 deletions sysutils/shunt/UPDATE
@@ -0,0 +1 @@
pledge added
2 changes: 2 additions & 0 deletions sysutils/shunt/distinfo
@@ -0,0 +1,2 @@
SHA256 (shunt-1.7.3.tar.gz) = ZfQ0ZVJDeWQtEhMvVhfYUP6P8PAcGqAYqxt2EVx9y/U=
SIZE (shunt-1.7.3.tar.gz) = 25315
27 changes: 27 additions & 0 deletions 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)
14 changes: 14 additions & 0 deletions 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;
14 changes: 14 additions & 0 deletions 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;
14 changes: 14 additions & 0 deletions 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();
5 changes: 5 additions & 0 deletions 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.
6 changes: 6 additions & 0 deletions 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

0 comments on commit 2196c9a

Please sign in to comment.