Could someone give this a try? I have no idea whether I'm hitting
a nasty runtime failure or a pebkac case. Note that the version we have
in tree doesn't build with /usr/bin/g++ (now that clang is used to build
boost?).
Index: Makefile
===================================================================
RCS file: /d/cvs/ports/security/encfs/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile 9 Aug 2017 17:57:27 -0000 1.12
+++ Makefile 21 Aug 2017 11:03:29 -0000
@@ -1,40 +1,32 @@
# $OpenBSD: Makefile,v 1.12 2017/08/09 17:57:27 jca Exp $
-BROKEN-hppa = configure: error: Could not link against boost_serialization-boost_serialization
-BROKEN-sparc64 = configure: error: Could not link against boost_serialization-boost_serialization
-
COMMENT = fuse-based cryptographic filesystem
-DISTNAME = encfs-1.7.4
-REVISION = 2
-
-SHARED_LIBS = encfs 0.0 # 6.1
+V = 1.9.2
+DISTNAME = encfs-$V
CATEGORIES = security
HOMEPAGE = http://www.arg0.net/encfs
-# GPLv3
+# GPLv3+
PERMIT_PACKAGE_CDROM = Yes
-WANTLIB = boost_filesystem boost_serialization boost_system c \
- crypto fuse m pthread rlog ssl ${COMPILER_LIBCXX}
+WANTLIB += ${COMPILER_LIBCXX} c crypto fuse intl m ssl tinyxml2
+
+MASTER_SITES = https://github.com/vgough/encfs/releases/download/v$V/
+
+COMPILER = clang gcc
-MASTER_SITES = ${MASTER_SITE_GOOGLECODE:=encfs/}
-EXTRACT_SUFX = .tgz
+MODULES = devel/cmake
+BUILD_DEPENDS = devel/gettext-tools
+LIB_DEPENDS = devel/gettext \
+ textproc/tinyxml2
-MODULES = devel/gettext
-LIB_DEPENDS = devel/boost \
- devel/rlog
-
-CONFIGURE_STYLE = gnu
-CONFIGURE_ARGS += --with-boost-serialization=boost_serialization \
- --with-boost-filesystem=boost_filesystem \
- --with-boost-system=boost_system
-# TODO convert code to use utimensat() instead of lutimes()
-CONFIGURE_ENV += CPPFLAGS="-Dlutimes=utimes -D_DIRENT_HAVE_D_TYPE"
+CONFIGURE_ARGS = -DUSE_INTERNAL_TINYXML:Bool=Off
+CONFIGURE_ENV = CXXFLAGS="-DHAVE_UTIMENSAT -D_DIRENT_HAVE_D_TYPE"
-do-test:
- ${WRKSRC}/encfs/test
+post-extract:
+ sed -i 's,\./build/,${WRKBUILD}/,g' ${WRKSRC}/tests/*.pl
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /d/cvs/ports/security/encfs/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo 17 Jan 2014 10:10:58 -0000 1.1.1.1
+++ distinfo 21 Aug 2017 11:03:29 -0000
@@ -1,2 +1,2 @@
-SHA256 (encfs-1.7.4.tgz) = KC7w8E8t17o1J7RWIfq0hbfMUQws7uEWYA0DSNwhcKg=
-SIZE (encfs-1.7.4.tgz) = 931048
+SHA256 (encfs-1.9.2.tar.gz) = zZ6XLNlWXNwmRzyG0sd8mN4x/G9gT6fRSd1dbjXUbqo=
+SIZE (encfs-1.9.2.tar.gz) = 11043181
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: patches/patch-CMakeLists_txt
diff -N patches/patch-CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-CMakeLists_txt 21 Aug 2017 11:03:29 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -244,7 +244,7 @@ if (POD2MAN)
+ ${CMAKE_CURRENT_LIST_DIR}/encfs/encfsctl.pod encfsctl.1)
+
+ install (FILES ${CMAKE_BINARY_DIR}/encfs.1 ${CMAKE_BINARY_DIR}/encfsctl.1
+- DESTINATION share/man/man1)
++ DESTINATION man/man1)
+ endif (POD2MAN)
+
+ # Tests
Index: patches/patch-encfs_SSL_Compat_h
===================================================================
RCS file: patches/patch-encfs_SSL_Compat_h
diff -N patches/patch-encfs_SSL_Compat_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-encfs_SSL_Compat_h 21 Aug 2017 11:03:29 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: encfs/SSL_Compat.h
+--- encfs/SSL_Compat.h.orig
++++ encfs/SSL_Compat.h
+@@ -22,7 +22,7 @@
+ #define _SSL_Compat_incl_
+
+ // OpenSSL < 1.1.0
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+
+ // Equivalent methods
+ #define EVP_MD_CTX_new EVP_MD_CTX_create
Index: patches/patch-encfs_encfssh
===================================================================
RCS file: patches/patch-encfs_encfssh
diff -N patches/patch-encfs_encfssh
--- patches/patch-encfs_encfssh 9 May 2015 12:18:58 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$OpenBSD: patch-encfs_encfssh,v 1.1 2015/05/09 12:18:58 jca Exp $
-
-- no fusermount(1) on OpenBSD, umount(8) is enough
-
---- encfs/encfssh.orig Sun Nov 29 23:04:12 2009
-+++ encfs/encfssh Thu May 7 19:58:09 2015
-@@ -63,5 +63,5 @@ orig_dir=$(pwd)
- cd $unenc_dir
-
- # Set the shell up
--exec /bin/sh -c "$SHELL ; cd $orig_dir ; fusermount -u $unenc_dir ; if ! $unenc_dir_given; then rmdir $unenc_dir; fi"
-+exec /bin/sh -c "$SHELL ; cd $orig_dir ; umount $unenc_dir ; if ! $unenc_dir_given; then rmdir $unenc_dir; fi"
-
Index: patches/patch-encfs_main_cpp
===================================================================
RCS file: patches/patch-encfs_main_cpp
diff -N patches/patch-encfs_main_cpp
--- patches/patch-encfs_main_cpp 9 May 2015 12:18:24 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
-$OpenBSD: patch-encfs_main_cpp,v 1.3 2015/05/09 12:18:24 jca Exp $
---- encfs/main.cpp.orig Sun Nov 29 23:04:12 2009
-+++ encfs/main.cpp Thu May 7 19:19:29 2015
-@@ -28,6 +28,8 @@
- #include <cstdio>
- #include <unistd.h>
- #include <sys/time.h>
-+#include <sys/param.h>
-+#include <sys/mount.h>
- #include <cerrno>
- #include <cstring>
-
-@@ -51,11 +53,6 @@
-
- #include "openssl.h"
-
--// Fuse version >= 26 requires another argument to fuse_unmount, which we
--// don't have. So use the backward compatible call instead..
--extern "C" void fuse_unmount_compat22(const char *mountpoint);
--# define fuse_unmount fuse_unmount_compat22
--
- #include <locale.h>
-
- #include "i18n.h"
-@@ -756,7 +753,11 @@ static bool unmountFS(EncFS_Context *ctx)
- // xgroup(diag)
- rWarning(_("Unmounting filesystem %s due to inactivity"),
- arg->mountPoint.c_str());
-- fuse_unmount( arg->mountPoint.c_str() );
-+ if (unmount( arg->mountPoint.c_str(), MNT_FORCE ) != 0)
-+ {
-+ rWarning(_("Unmounting filesystem %s failed: %s"),
-+ arg->mountPoint.c_str(), strerror(errno) );
-+ }
- return true;
- }
- }
Index: patches/patch-encfs_openssl_cpp
===================================================================
RCS file: patches/patch-encfs_openssl_cpp
diff -N patches/patch-encfs_openssl_cpp
--- patches/patch-encfs_openssl_cpp 17 Jan 2014 10:10:58 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-encfs_openssl_cpp,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
---- encfs/openssl.cpp.orig Sun Nov 29 23:04:12 2009
-+++ encfs/openssl.cpp Thu Jan 16 14:13:07 2014
-@@ -78,8 +78,10 @@ void openssl_init(bool threaded)
- SSL_library_init();
-
- unsigned int randSeed = 0;
-- RAND_bytes( (unsigned char*)&randSeed, sizeof(randSeed) );
-- srand( randSeed );
-+ if (RAND_bytes( (unsigned char*)&randSeed, sizeof(randSeed)) == 1)
-+ srand( randSeed );
-+ else
-+ srand( arc4random() );
-
- #ifndef OPENSSL_NO_ENGINE
- /* Load all bundled ENGINEs into memory and make them visible */
Index: patches/patch-encfs_test_cpp
===================================================================
RCS file: patches/patch-encfs_test_cpp
diff -N patches/patch-encfs_test_cpp
--- patches/patch-encfs_test_cpp 17 Jan 2014 10:10:58 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-encfs_test_cpp,v 1.1.1.1 2014/01/17 10:10:58 stsp Exp $
---- encfs/test.cpp.orig Thu Jan 16 14:11:17 2014
-+++ encfs/test.cpp Thu Jan 16 14:11:44 2014
-@@ -65,7 +65,7 @@ int checkErrorPropogation( const shared_ptr<Cipher> &c
-
- for(int i=0; i<size; ++i)
- {
-- unsigned char tmp = rand();
-+ unsigned char tmp = arc4random();
- orig.data[i] = tmp;
- data.data[i] = tmp;
- }
-@@ -81,7 +81,7 @@ int checkErrorPropogation( const shared_ptr<Cipher> &c
- unsigned char previousValue = data.data[byteToChange];
- do
- {
-- data.data[byteToChange] = rand();
-+ data.data[byteToChange] = arc4random();
- } while(data.data[byteToChange] == previousValue);
- }
-
Index: patches/patch-internal_easylogging++_h
===================================================================
RCS file: patches/patch-internal_easylogging++_h
diff -N patches/patch-internal_easylogging++_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-internal_easylogging++_h 21 Aug 2017 11:03:29 -0000
@@ -0,0 +1,38 @@
+$OpenBSD$
+
+Index: internal/easylogging++.h
+--- internal/easylogging++.h.orig
++++ internal/easylogging++.h
+@@ -98,13 +98,18 @@
+ #else
+ # define ELPP_OS_FREEBSD 0
+
No comments:
Post a Comment