pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Add fuse-cryfs
Module Name: pkgsrc-wip
Committed By: coypu <coypu%sdf.org@localhost>
Pushed By: coypu
Date: Thu Jul 20 19:21:08 2017 +0300
Changeset: 7b6d60323cd12e2481f45641da2a36a4563ddf9c
Added Files:
fuse-cryfs/DESCR
fuse-cryfs/Makefile
fuse-cryfs/PLIST
fuse-cryfs/TODO
fuse-cryfs/distinfo
fuse-cryfs/patches/patch-src_cpp-utils_system_get__total__memory.cpp
fuse-cryfs/patches/patch-src_cryfs-cli_Cli.cpp
fuse-cryfs/patches/patch-src_fspp_CMakeLists.txt
fuse-cryfs/patches/patch-src_fspp_fuse_params.h
fuse-cryfs/patches/patch-vendor_spdlog_spdlog_details_os.h
Log Message:
Add fuse-cryfs
CryFS encrypts your files, so you can safely store them anywhere.
It works well together with cloud services like Dropbox, iCloud, OneDrive
and others.
Doesn't work on netbsd yet
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=7b6d60323cd12e2481f45641da2a36a4563ddf9c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
fuse-cryfs/DESCR | 3 ++
fuse-cryfs/Makefile | 40 ++++++++++++++++++++++
fuse-cryfs/PLIST | 2 ++
fuse-cryfs/TODO | 1 +
fuse-cryfs/distinfo | 11 ++++++
...tch-src_cpp-utils_system_get__total__memory.cpp | 38 ++++++++++++++++++++
fuse-cryfs/patches/patch-src_cryfs-cli_Cli.cpp | 14 ++++++++
fuse-cryfs/patches/patch-src_fspp_CMakeLists.txt | 20 +++++++++++
fuse-cryfs/patches/patch-src_fspp_fuse_params.h | 20 +++++++++++
.../patch-vendor_spdlog_spdlog_details_os.h | 25 ++++++++++++++
10 files changed, 174 insertions(+)
diffs:
diff --git a/fuse-cryfs/DESCR b/fuse-cryfs/DESCR
new file mode 100644
index 0000000000..07b039cca6
--- /dev/null
+++ b/fuse-cryfs/DESCR
@@ -0,0 +1,3 @@
+CryFS encrypts your files, so you can safely store them anywhere.
+It works well together with cloud services like Dropbox, iCloud, OneDrive
+and others.
diff --git a/fuse-cryfs/Makefile b/fuse-cryfs/Makefile
new file mode 100644
index 0000000000..efeb74df23
--- /dev/null
+++ b/fuse-cryfs/Makefile
@@ -0,0 +1,40 @@
+# $NetBSD: Makefile,v 1.13 2017/06/19 18:41:39 maya Exp $
+#
+
+DISTNAME= cryfs-0.9.7
+PKGNAME= fuse-${DISTNAME}
+CATEGORIES= filesystems
+MASTER_SITES= ${MASTER_SITE_GITHUB:=cryfs/}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= https://www.cryfs.org/
+COMMENT= FUSE Encrypted Filesystem
+LICENSE= gnu-lgpl-v3
+EXTRACT_USING= bsdtar
+
+GITHUB_PROJECT= cryfs
+
+USE_TOOLS+= autoconf cmake pkg-config
+USE_CMAKE= yes
+USE_LANGUAGES= c c++
+
+CONFIGURE_DIRS= ${WRKDIR}/build
+CMAKE_ARG_PATH= ${WRKSRC}
+
+#TEST_TARGET= test
+
+REPLACE_PYTHON= src/gitversion/*.py
+
+post-extract:
+ ${RUN} mkdir -p ${WRKDIR}/build
+
+CFLAGS+= -g -ggdb3 -fno-omit-frame-pointer
+INSTALL_UNSTRIPPED= yes
+
+.include "../../security/crypto++/buildlink3.mk"
+.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../devel/boost-headers/buildlink3.mk"
+.include "../../devel/libexecinfo/buildlink3.mk"
+.include "../../www/curl/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/fuse-cryfs/PLIST b/fuse-cryfs/PLIST
new file mode 100644
index 0000000000..976c4036b7
--- /dev/null
+++ b/fuse-cryfs/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD$
+bin/cryfs
diff --git a/fuse-cryfs/TODO b/fuse-cryfs/TODO
new file mode 100644
index 0000000000..0c56ca702a
--- /dev/null
+++ b/fuse-cryfs/TODO
@@ -0,0 +1 @@
+Fails to run on netbsd
diff --git a/fuse-cryfs/distinfo b/fuse-cryfs/distinfo
new file mode 100644
index 0000000000..aff6ec035d
--- /dev/null
+++ b/fuse-cryfs/distinfo
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.6 2017/06/19 18:41:39 maya Exp $
+
+SHA1 (cryfs-0.9.7.tar.gz) = e7f048aa39e5f4f10d5bac7b5af91ed4a7350afd
+RMD160 (cryfs-0.9.7.tar.gz) = 0a6e55586a331509caa13c095c7871a0ef63f77f
+SHA512 (cryfs-0.9.7.tar.gz) = f3d2550665bd93d83f1368654193c81cc1a2a533c9a9fb7466a893756b43c288124a33d7f469a49185019274029f0f9aece737b14bfb415c5cd979facf075573
+Size (cryfs-0.9.7.tar.gz) = 1719493 bytes
+SHA1 (patch-src_cpp-utils_system_get__total__memory.cpp) = 7ab8f87cb957fa53f5d6b7329c00fca8a1fc3fba
+SHA1 (patch-src_cryfs-cli_Cli.cpp) = 2ee0781118b3c9dcac7b1371f229841774b08eda
+SHA1 (patch-src_fspp_CMakeLists.txt) = 53858c661bab14f7fe2e8187a700e4735b78fc62
+SHA1 (patch-src_fspp_fuse_params.h) = a204161a7810f90502820d3889bec9e1ebb0cc5f
+SHA1 (patch-vendor_spdlog_spdlog_details_os.h) = a904982dd2f6cb59dcdd1e5908239feb02a86310
diff --git a/fuse-cryfs/patches/patch-src_cpp-utils_system_get__total__memory.cpp b/fuse-cryfs/patches/patch-src_cpp-utils_system_get__total__memory.cpp
new file mode 100644
index 0000000000..a6bbc33689
--- /dev/null
+++ b/fuse-cryfs/patches/patch-src_cpp-utils_system_get__total__memory.cpp
@@ -0,0 +1,38 @@
+$NetBSD$
+
+Find total memory via sysctl for FreeBSD too. Add NetBSD case.
+clean up a bit.
+
+Linux case seems wrong.
+
+--- src/cpp-utils/system/get_total_memory.cpp.orig 2017-02-11 12:34:50.000000000 +0000
++++ src/cpp-utils/system/get_total_memory.cpp
+@@ -4,17 +4,25 @@
+ #include <unistd.h>
+ #include <stdexcept>
+
++#ifdef __APPLE__
++#define SYSCTL_MEMSIZE "hw.memsize"
++#elif __FreeBSD__
++#define SYSCTL_MEMSIZE "hw.physmem"
++#elif __NetBSD__
++#define SYSCTL_MEMSIZE "hw.physmem64"
++#endif
++
+ namespace cpputils{
+ namespace system {
+ uint64_t get_total_memory() {
+ uint64_t mem;
+-#ifdef __APPLE__
++#ifdef SYSCTL_MEMSIZE
+ size_t size = sizeof(mem);
+- int result = sysctlbyname("hw.memsize", &mem, &size, nullptr, 0);
++ int result = sysctlbyname(SYSCTL_MEMSIZE, &mem, &size, nullptr, 0);
+ if (0 != result) {
+ throw std::runtime_error("sysctlbyname syscall failed");
+ }
+-#elif __linux__ || __FreeBSD__
++#elif __linux__
+ long numRAMPages = sysconf(_SC_PHYS_PAGES);
+ long pageSize = sysconf(_SC_PAGESIZE);
+ mem = numRAMPages * pageSize;
diff --git a/fuse-cryfs/patches/patch-src_cryfs-cli_Cli.cpp b/fuse-cryfs/patches/patch-src_cryfs-cli_Cli.cpp
new file mode 100644
index 0000000000..9ddad3a8f5
--- /dev/null
+++ b/fuse-cryfs/patches/patch-src_cryfs-cli_Cli.cpp
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Awful hack to workaround the need to register_t type
+
+--- src/cryfs-cli/Cli.cpp.orig 2017-02-11 12:34:50.000000000 +0000
++++ src/cryfs-cli/Cli.cpp
+@@ -1,3 +1,7 @@
++#ifdef __NetBSD__ /* XXX awful hack */
++#define _KMEMUSER 1
++#endif
++
+ #include "Cli.h"
+
+ #include <blockstore/implementations/ondisk/OnDiskBlockStore.h>
diff --git a/fuse-cryfs/patches/patch-src_fspp_CMakeLists.txt b/fuse-cryfs/patches/patch-src_fspp_CMakeLists.txt
new file mode 100644
index 0000000000..931a3dd506
--- /dev/null
+++ b/fuse-cryfs/patches/patch-src_fspp_CMakeLists.txt
@@ -0,0 +1,20 @@
+$NetBSD$
+
+Recognise netbsd librefuse
+
+--- src/fspp/CMakeLists.txt.orig 2017-02-11 12:34:50.000000000 +0000
++++ src/fspp/CMakeLists.txt
+@@ -18,9 +18,11 @@ target_activate_cpp14(${PROJECT_NAME})
+ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set(CMAKE_FIND_FRAMEWORK LAST)
+ set(FUSE_LIB_NAME "osxfuse")
+-else(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
++elseif(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
++ set(FUSE_LIB_NAME "refuse")
++else()
+ set(FUSE_LIB_NAME "fuse")
+-endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
++endif()
+
+ find_library_with_path(FUSE ${FUSE_LIB_NAME} FUSE_LIB_PATH)
+ target_link_libraries(${PROJECT_NAME} PUBLIC ${FUSE})
diff --git a/fuse-cryfs/patches/patch-src_fspp_fuse_params.h b/fuse-cryfs/patches/patch-src_fspp_fuse_params.h
new file mode 100644
index 0000000000..76e39b070b
--- /dev/null
+++ b/fuse-cryfs/patches/patch-src_fspp_fuse_params.h
@@ -0,0 +1,20 @@
+$NetBSD$
+
+NetBSD provides fuse.h for compat.
+
+--- src/fspp/fuse/params.h.orig 2017-02-11 12:34:50.000000000 +0000
++++ src/fspp/fuse/params.h
+@@ -3,7 +3,12 @@
+ #define MESSMER_FSPP_FUSE_PARAMS_H_
+
+ #define FUSE_USE_VERSION 26
+-#ifdef __linux__
++
++#ifdef __NetBSD__
++#define _KMEMUSER 1
++#endif
++
++#if defined(__linux__) || defined(__NetBSD__)
+ #include <fuse.h>
+ #elif __APPLE__
+ #include <osxfuse/fuse.h>
diff --git a/fuse-cryfs/patches/patch-vendor_spdlog_spdlog_details_os.h b/fuse-cryfs/patches/patch-vendor_spdlog_spdlog_details_os.h
new file mode 100644
index 0000000000..694897e72e
--- /dev/null
+++ b/fuse-cryfs/patches/patch-vendor_spdlog_spdlog_details_os.h
@@ -0,0 +1,25 @@
+$NetBSD$
+
+NetBSD is POSIXy.
+NetBSD has no need for 64 suffix to structs and functions.
+
+--- vendor/spdlog/spdlog/details/os.h.orig 2017-02-11 12:34:50.000000000 +0000
++++ vendor/spdlog/spdlog/details/os.h
+@@ -212,7 +212,7 @@ inline size_t filesize(FILE *f)
+ #else // unix
+ int fd = fileno(f);
+ //64 bits(but not in osx, where fstat64 is deprecated)
+-#if !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__))
++#if !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__APPLE__) && (defined(__x86_64__) || defined(__ppc64__))
+ struct stat64 st;
+ if (fstat64(fd, &st) == 0)
+ return st.st_size;
+@@ -343,7 +343,7 @@ inline std::string errno_str(int err_num
+ return "Unkown error";
+
+ #elif defined(__FreeBSD__) || defined(__APPLE__) || defined(ANDROID) || \
+- ((_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE) // posix version
++ defined(__NetBSD__) || ((_POSIX_C_SOURCE >= 200112L) && ! _GNU_SOURCE) // posix version
+
+ if (strerror_r(err_num, buf, buf_size) == 0)
+ return std::string(buf);
Home |
Main Index |
Thread Index |
Old Index