On Sun, Jan 31, 2016 at 09:57:50PM +0100, Theo Buehler wrote:
> On Sun, Jan 31, 2016 at 11:23:40PM +0300, Andre S wrote:
> > Core dumped when used switch "set Password" (-p)
> >
> > 7z a -p test.7z test.txt
> >
> > Abort trap (core dumped)
> >
> is a missing pledge "tty" for readpassphrase(3), but it's probably
> easier for you to figure out where it should go and where it should be
> dropped.
>
> here's the backtrace
Thank you both! A patch follows.
This permits tty for both standard and self-extracting archives.
Index: Makefile
===================================================================
RCS file: /systems/cvs/ports/archivers/p7zip/Makefile,v
retrieving revision 1.29
diff -u -p -r1.29 Makefile
--- Makefile 27 Jan 2016 10:36:00 -0000 1.29
+++ Makefile 31 Jan 2016 22:02:08 -0000
@@ -6,7 +6,7 @@ COMMENT-main= file archiver with high co
COMMENT-rar= rar modules for p7zip
V= 15.09
-REVISION= 2
+REVISION= 3
DISTNAME= p7zip_${V}_src_all
PKGNAME= p7zip-${V}
PKGNAME-main= p7zip-${V}
Index: patches/patch-CPP_7zip_Bundles_SFXCon_SfxCon_cpp
===================================================================
RCS file:
/systems/cvs/ports/archivers/p7zip/patches/patch-CPP_7zip_Bundles_SFXCon_SfxCon_cpp,v
retrieving revision 1.1
diff -u -p -r1.1 patch-CPP_7zip_Bundles_SFXCon_SfxCon_cpp
--- patches/patch-CPP_7zip_Bundles_SFXCon_SfxCon_cpp 27 Jan 2016 10:36:00
-0000 1.1
+++ patches/patch-CPP_7zip_Bundles_SFXCon_SfxCon_cpp 31 Jan 2016 21:55:02
-0000
@@ -15,7 +15,7 @@ Pledge self-extracting archives
+ printf("pledge: 7za 7zr SFX\n");
+#endif //PLEDGE_DEBUG
+
-+ if (pledge("stdio rpath wpath cpath fattr", NULL) == -1) {
++ if (pledge("stdio rpath wpath cpath fattr tty", NULL) == -1) {
+ perror("pledge");
+ exit(2);
+ }
@@ -37,7 +37,7 @@ Pledge self-extracting archives
+ printf("pledge: 7z SFX\n");
+#endif //PLEDGE_DEBUG
+
-+ if (pledge("stdio rpath wpath cpath fattr", NULL) == -1) {
++ if (pledge("stdio rpath wpath cpath fattr tty", NULL) == -1) {
+ perror("pledge");
+ exit(2);
+ }
Index: patches/patch-CPP_7zip_UI_Console_Main_cpp
===================================================================
RCS file:
/systems/cvs/ports/archivers/p7zip/patches/patch-CPP_7zip_UI_Console_Main_cpp,v
retrieving revision 1.2
diff -u -p -r1.2 patch-CPP_7zip_UI_Console_Main_cpp
--- patches/patch-CPP_7zip_UI_Console_Main_cpp 27 Jan 2016 10:36:00 -0000
1.2
+++ patches/patch-CPP_7zip_UI_Console_Main_cpp 31 Jan 2016 21:54:38 -0000
@@ -15,7 +15,7 @@ Pledge archivers/p7zip main executables
+ printf("initial pledge: 7za 7zr\n");
+#endif
+
-+ if (pledge("stdio rpath wpath cpath fattr", NULL) == -1) {
++ if (pledge("stdio rpath wpath cpath fattr tty", NULL) == -1) {
+ perror("pledge");
+ exit(2);
+ }
@@ -35,7 +35,7 @@ Pledge archivers/p7zip main executables
+ printf("initial pledge: 7z\n");
+#endif
+
-+ if (pledge("stdio rpath wpath cpath fattr", NULL) == -1) {
++ if (pledge("stdio rpath wpath cpath fattr tty", NULL) == -1) {
+ perror("pledge");
+ exit(2);
+ }