diff --git a/sysutils/truncate/Makefile b/sysutils/truncate/Makefile index c3a9224a7bf..2297a6b6926 100644 --- a/sysutils/truncate/Makefile +++ b/sysutils/truncate/Makefile @@ -1,6 +1,7 @@ COMMENT = truncate or extend the length of files DISTNAME = truncate-5.2.1 CATEGORIES = sysutils +REVISION = 0 HOMEPAGE = https://www.dragonflybsd.org/ MAINTAINER = Brian Callahan @@ -8,6 +9,7 @@ MAINTAINER = Brian Callahan # BSD PERMIT_PACKAGE = Yes +# uses pledge() WANTLIB += c SITES = https://mirrors.nycbug.org/pub/distfiles/ diff --git a/sysutils/truncate/patches/patch-truncate_c b/sysutils/truncate/patches/patch-truncate_c new file mode 100644 index 00000000000..3713259195f --- /dev/null +++ b/sysutils/truncate/patches/patch-truncate_c @@ -0,0 +1,16 @@ +Drop "cpath" under -c (no file creation) + +Index: truncate.c +--- truncate.c.orig ++++ truncate.c +@@ -84,6 +84,10 @@ main(int argc, char **argv) + argv += optind; + argc -= optind; + ++ if (no_create) ++ if (pledge("stdio rpath wpath", NULL) == -1) ++ err(1, "pledge"); ++ + /* + * Exactly one of do_refer or got_size must be specified. Since + * do_relative implies got_size, do_relative and do_refer are