summaryrefslogtreecommitdiff
path: root/filesystems/lizardfs
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2024-09-27 12:48:46 +0200
committerRobert Clausecker <fuz@FreeBSD.org>2024-11-06 16:17:35 +0100
commit6e2da9672f79f44048d597f0f61e4646cdeade9d (patch)
treec92e4b3158e3419e8cec38e00227d08dcdaab3e9 /filesystems/lizardfs
parentmath/sdpa: speed up build (diff)
filesystems: add new category for file systems and related utilities
The filesystems category houses file systems and file system utilities. It is added mainly to turn the sysutils/fusefs-* pseudo-category into a proper one, but is also useful for the sundry of other file systems related ports found in the tree. Ports that seem like they belong there are moved to the new category. Two ports, sysutils/fusefs-funionfs and sysutils/fusefs-fusepak are not moved as they currently don't fetch and don't have TIMESTAMP set in their distinfo, but that is required to be able to push a rename of the port by the pre-receive hook. Approved by: portmgr (rene) Reviewed by: mat Pull Request: https://github.com/freebsd/freebsd-ports/pull/302 PR: 281988
Diffstat (limited to 'filesystems/lizardfs')
-rw-r--r--filesystems/lizardfs/Makefile57
-rw-r--r--filesystems/lizardfs/distinfo3
-rw-r--r--filesystems/lizardfs/files/mfscgiserv.in29
-rw-r--r--filesystems/lizardfs/files/mfschunkserver.in30
-rw-r--r--filesystems/lizardfs/files/mfsmaster.in30
-rw-r--r--filesystems/lizardfs/files/mfsmetalogger.in30
-rw-r--r--filesystems/lizardfs/files/mfspingserv.in29
-rw-r--r--filesystems/lizardfs/files/patch-CMakeLists.txt37
-rw-r--r--filesystems/lizardfs/files/patch-cmake_CheckIncludes.cmake13
-rw-r--r--filesystems/lizardfs/files/patch-cmake__Libraries.cmake14
-rw-r--r--filesystems/lizardfs/files/patch-src_common_slogger.cc11
-rw-r--r--filesystems/lizardfs/files/patch-src_common_slogger.h12
-rw-r--r--filesystems/lizardfs/pkg-descr3
-rw-r--r--filesystems/lizardfs/pkg-plist119
14 files changed, 417 insertions, 0 deletions
diff --git a/filesystems/lizardfs/Makefile b/filesystems/lizardfs/Makefile
new file mode 100644
index 000000000000..f99fb0532899
--- /dev/null
+++ b/filesystems/lizardfs/Makefile
@@ -0,0 +1,57 @@
+PORTNAME= lizardfs
+PORTVERSION= 3.12.0
+DISTVERSIONPREFIX= v
+PORTREVISION= 22
+CATEGORIES= filesystems sysutils
+
+MAINTAINER= jhixson@FreeBSD.org
+COMMENT= Open Source Distributed Filesystem
+WWW= https://lizardfs.org/
+
+LICENSE= GPLv3+
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+BUILD_DEPENDS= a2x:textproc/asciidoc \
+ spdlog>=1.4.2:devel/spdlog
+LIB_DEPENDS= libboost_system.so:devel/boost-libs \
+ libfmt.so:devel/libfmt
+
+USES= cmake compiler:c11 fuse python shebangfix
+USE_RC_SUBR= mfscgiserv \
+ mfschunkserver \
+ mfsmaster \
+ mfsmetalogger \
+ mfspingserv
+
+USERS= mfs
+GROUPS= mfs
+
+SHEBANG_FILES= src/cgi/cgiserv.py.in \
+ src/cgi/lizardfs-cgiserver.py.in \
+ src/cgi/mfs.cgi.in \
+ src/cgi/chart.cgi.in
+
+USE_GITHUB= yes
+USE_LDCONFIG= yes
+
+CFLAGS+= -DSPDLOG_FMT_EXTERNAL=1
+LDFLAGS+= -L${LOCALBASE}/lib -lfmt
+CMAKE_BUILD_TYPE= Release
+CMAKE_ARGS= \
+ -DENABLE_WERROR=OFF \
+ -DENABLE_LIGHTMFS=ON \
+ -DENABLE_DEBIAN_PATHS=OFF \
+ -DENABLE_UTILS=ON \
+ -DENABLE_TESTS=OFF \
+ -DENABLE_DOCS=ON \
+ -DENABLE_VERBOSE_ASCIIDOC=ON \
+ -DENABLE_TCMALLOC=OFF \
+ -DENABLE_POLONAISE=OFF \
+ -DENABLE_CLIENT_LIB=ON \
+ -DENABLE_URAFT=ON \
+ -DENABLE_TRACES=OFF \
+ -DENABLE_CRC=ON \
+ -DENABLE_REQUEST_LOG=OFF \
+ -DENABLE_NFS_GANESHA=OFF
+
+.include <bsd.port.mk>
diff --git a/filesystems/lizardfs/distinfo b/filesystems/lizardfs/distinfo
new file mode 100644
index 000000000000..ffb58e32e777
--- /dev/null
+++ b/filesystems/lizardfs/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1548551617
+SHA256 (lizardfs-lizardfs-v3.12.0_GH0.tar.gz) = d21220dc7542539b48d5bff7abe047a8c6bdbab19cb03579f88f146dee3ec5f6
+SIZE (lizardfs-lizardfs-v3.12.0_GH0.tar.gz) = 2973894
diff --git a/filesystems/lizardfs/files/mfscgiserv.in b/filesystems/lizardfs/files/mfscgiserv.in
new file mode 100644
index 000000000000..0876470c2221
--- /dev/null
+++ b/filesystems/lizardfs/files/mfscgiserv.in
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# PROVIDE: mfscgiserv
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable mfscgiserv:
+#
+# mfscgiserv_enable="YES"
+#
+
+. /etc/rc.subr
+
+name=mfscgiserv
+rcvar=mfscgiserv_enable
+
+command=%%PREFIX%%/sbin/${name}
+pid_file=/var/mfs/.${name}.lock
+procname="python"
+
+stop_cmd="$command stop"
+status_cmd="$command test"
+
+load_rc_config $name
+
+# set defaults
+: ${mfscgiserv_enable="NO"}
+
+run_rc_command "$1"
diff --git a/filesystems/lizardfs/files/mfschunkserver.in b/filesystems/lizardfs/files/mfschunkserver.in
new file mode 100644
index 000000000000..b4dbe0baae4a
--- /dev/null
+++ b/filesystems/lizardfs/files/mfschunkserver.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# PROVIDE: mfschunkserver
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to enable mfschunkserver:
+#
+# mfschunkserver_enable="YES"
+#
+
+. /etc/rc.subr
+
+name=mfschunkserver
+rcvar=mfschunkserver_enable
+
+config_file=%%PREFIX%%/etc/mfs/${name}.cfg
+
+required_files=${config_file}
+
+command=%%PREFIX%%/sbin/${name}
+pid_file=/var/mfs/.${name}.lock
+command_args="-c $config_file"
+
+load_rc_config $name
+
+# set defaults
+: ${mfschunkserver_enable="NO"}
+
+run_rc_command "$1"
diff --git a/filesystems/lizardfs/files/mfsmaster.in b/filesystems/lizardfs/files/mfsmaster.in
new file mode 100644
index 000000000000..3a3bc49bdefd
--- /dev/null
+++ b/filesystems/lizardfs/files/mfsmaster.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# PROVIDE: mfsmaster
+# REQUIRE: DAEMON
+# KEYWORD: nostart shutdown
+#
+# Add the following lines to /etc/rc.conf to enable mfsmaster:
+#
+# mfsmaster_enable="YES"
+#
+
+. /etc/rc.subr
+
+name=mfsmaster
+rcvar=mfsmaster_enable
+
+config_file=%%PREFIX%%/etc/mfs/${name}.cfg
+
+required_files=${config_file}
+
+command=%%PREFIX%%/sbin/${name}
+pid_file=/var/mfs/.${name}.lock
+command_args="-c $config_file"
+
+load_rc_config $name
+
+# set defaults
+: ${mfsmaster_enable="NO"}
+
+run_rc_command "$1"
diff --git a/filesystems/lizardfs/files/mfsmetalogger.in b/filesystems/lizardfs/files/mfsmetalogger.in
new file mode 100644
index 000000000000..e1fae34ddb88
--- /dev/null
+++ b/filesystems/lizardfs/files/mfsmetalogger.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# PROVIDE: mfsmetalogger
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf to enable mfsmetalogger:
+#
+# mfsmetalogger_enable="YES"
+#
+
+. /etc/rc.subr
+
+name=mfsmetalogger
+rcvar=mfsmetalogger_enable
+
+config_file=%%PREFIX%%/etc/mfs/${name}.cfg
+
+required_files=${config_file}
+
+command=%%PREFIX%%/sbin/${name}
+pid_file=/var/mfs/.${name}.lock
+command_args="-c $config_file"
+
+load_rc_config $name
+
+# set defaults
+: ${mfsmetalogger_enable="NO"}
+
+run_rc_command "$1"
diff --git a/filesystems/lizardfs/files/mfspingserv.in b/filesystems/lizardfs/files/mfspingserv.in
new file mode 100644
index 000000000000..625628e37fd6
--- /dev/null
+++ b/filesystems/lizardfs/files/mfspingserv.in
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# PROVIDE: mfspingserv
+# REQUIRE: DAEMON
+# KEYWORD: nostart shutdown
+#
+# Add the following lines to /etc/rc.conf to enable mfspingserv:
+#
+# mfspingserv_enable="YES"
+#
+# mfspingserv_port=""
+#
+
+. /etc/rc.subr
+
+name=mfspingserv
+rcvar=mfspingserv_enable
+
+command=%%PREFIX%%/sbin/${name}
+pid_file=/var/mfs/.${name}.lock
+command_args="${mfspingserv_port}"
+
+load_rc_config $name
+
+# set defaults
+: ${mfspingserv_enable="NO"}
+: ${mfspingserv_port="19042"}
+
+run_rc_command "$1"
diff --git a/filesystems/lizardfs/files/patch-CMakeLists.txt b/filesystems/lizardfs/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..fd2d4079393b
--- /dev/null
+++ b/filesystems/lizardfs/files/patch-CMakeLists.txt
@@ -0,0 +1,37 @@
+--- CMakeLists.txt.orig 2017-12-20 09:59:37 UTC
++++ CMakeLists.txt
+@@ -167,13 +167,7 @@ endif()
+ message(STATUS "THROW_INSTEAD_OF_ABORT: ${THROW_INSTEAD_OF_ABORT}")
+ endif()
+
+-get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
+-if (LIB64)
+- set(LIBSUFFIX "64")
+-else()
+- set(LIBSUFFIX "")
+-endif()
+-message(STATUS "LIB64: ${LIB64}")
++set(LIBSUFFIX "")
+
+ if(ENABLE_DEBIAN_PATHS)
+ if (NOT CMAKE_INSTALL_PREFIX STREQUAL "/")
+@@ -193,8 +187,8 @@ else()
+ set(SBIN_SUBDIR "sbin")
+ set(LIB_SUBDIR "lib${LIBSUFFIX}")
+ set(ETC_SUBDIR "etc/mfs")
+- set(RUN_SUBDIR "var/run/mfs")
+- set(DATA_SUBDIR "var/lib/mfs")
++ set(RUN_SUBDIR "/var/run/mfs")
++ set(DATA_SUBDIR "/var/mfs")
+ set(MAN_SUBDIR "share/man")
+ set(CGI_SUBDIR "share/mfscgi")
+ set(INCL_SUBDIR "include/lizardfs")
+@@ -205,8 +199,6 @@ set(ETC_PATH ${INSTALL_PREFIX_NO_SLASH}/${ETC_SUBDIR
+ set(SBIN_PATH ${INSTALL_PREFIX_NO_SLASH}/${SBIN_SUBDIR})
+ set(LIB_PATH ${INSTALL_PREFIX_NO_SLASH}/${LIB_SUBDIR})
+ set(ETC_PATH ${INSTALL_PREFIX_NO_SLASH}/${ETC_SUBDIR})
+-set(RUN_PATH ${INSTALL_PREFIX_NO_SLASH}/${RUN_SUBDIR})
+-set(DATA_PATH ${INSTALL_PREFIX_NO_SLASH}/${DATA_SUBDIR})
+ set(MAN_PATH ${INSTALL_PREFIX_NO_SLASH}/${MAN_SUBDIR})
+ set(CGI_PATH ${INSTALL_PREFIX_NO_SLASH}/${CGI_SUBDIR})
+ set(INCL_PATH ${INSTALL_PREFIX_NO_SLASH}/${INCL_SUBDIR})
diff --git a/filesystems/lizardfs/files/patch-cmake_CheckIncludes.cmake b/filesystems/lizardfs/files/patch-cmake_CheckIncludes.cmake
new file mode 100644
index 000000000000..0dfe41ad59fb
--- /dev/null
+++ b/filesystems/lizardfs/files/patch-cmake_CheckIncludes.cmake
@@ -0,0 +1,13 @@
+--- cmake/CheckIncludes.cmake.orig 2022-12-24 21:43:32 UTC
++++ cmake/CheckIncludes.cmake
+@@ -3,7 +3,9 @@ include(CheckIncludeFiles)
+ function(check_includes INCLUDES)
+ set(INCLUDE_MISSING FALSE)
+ foreach(INCLUDE_FILE ${INCLUDES})
+- check_include_files(${INCLUDE_FILE} ${INCLUDE_FILE}_FOUND)
++ string(MAKE_C_IDENTIFIER "${INCLUDE_FILE}" c_include)
++ check_include_files(${INCLUDE_FILE} ${c_include}_FOUND)
++ set(${INCLUDE_FILE}_FOUND ${${c_include}_FOUND})
+ if(NOT ${INCLUDE_FILE}_FOUND)
+ set(INCLUDE_MISSING TRUE)
+ set(MISSING_INCLUDES ${MISSING_INCLUDES} ${INCLUDE_FILE})
diff --git a/filesystems/lizardfs/files/patch-cmake__Libraries.cmake b/filesystems/lizardfs/files/patch-cmake__Libraries.cmake
new file mode 100644
index 000000000000..95dbb0c4a80a
--- /dev/null
+++ b/filesystems/lizardfs/files/patch-cmake__Libraries.cmake
@@ -0,0 +1,14 @@
+--- cmake/Libraries.cmake.orig 2017-12-20 09:59:37 UTC
++++ cmake/Libraries.cmake
+@@ -7,11 +7,6 @@ if(ENABLE_TESTS)
+ "ef5e700c8a0f3ee123e2e0209b8b4961")
+ endif()
+
+-download_external(SPDLOG "spdlog-0.14.0"
+- "https://github.com/gabime/spdlog/archive/v0.14.0.zip"
+- "f213d83c466aa7044a132e2488d71b11"
+- "spdlog-1")
+-
+ # Find standard libraries
+ find_package(Socket REQUIRED)
+ find_package(Threads REQUIRED)
diff --git a/filesystems/lizardfs/files/patch-src_common_slogger.cc b/filesystems/lizardfs/files/patch-src_common_slogger.cc
new file mode 100644
index 000000000000..02566193f6ea
--- /dev/null
+++ b/filesystems/lizardfs/files/patch-src_common_slogger.cc
@@ -0,0 +1,11 @@
+--- src/common/slogger.cc.orig 2019-01-28 19:24:32 UTC
++++ src/common/slogger.cc
+@@ -86,7 +86,7 @@ void lzfs::drop_all_logs() {
+ bool lzfs::add_log_syslog() {
+ #ifndef _WIN32
+ try {
+- spdlog::syslog_logger("syslog");
++ spdlog::syslog_logger_mt("syslog");
+ return true;
+ } catch (const spdlog::spdlog_ex &e) {
+ lzfs_pretty_syslog(LOG_ERR, "Adding syslog log failed: %s", e.what());
diff --git a/filesystems/lizardfs/files/patch-src_common_slogger.h b/filesystems/lizardfs/files/patch-src_common_slogger.h
new file mode 100644
index 000000000000..2d5a7367b467
--- /dev/null
+++ b/filesystems/lizardfs/files/patch-src_common_slogger.h
@@ -0,0 +1,12 @@
+--- src/common/slogger.h.orig 2017-12-20 09:59:37 UTC
++++ src/common/slogger.h
+@@ -27,6 +27,9 @@
+ #endif
+ #include "common/small_vector.h"
+ #include "spdlog/spdlog.h"
++#include "spdlog/sinks/syslog_sink.h"
++#include "spdlog/sinks/stdout_color_sinks.h"
++#include "spdlog/sinks/rotating_file_sink.h"
+
+ typedef std::shared_ptr<spdlog::logger> LoggerPtr;
+
diff --git a/filesystems/lizardfs/pkg-descr b/filesystems/lizardfs/pkg-descr
new file mode 100644
index 000000000000..e80d3740401b
--- /dev/null
+++ b/filesystems/lizardfs/pkg-descr
@@ -0,0 +1,3 @@
+LizardFS is a highly reliable, scalable and efficient distributed file
+system. It spreads data over a number of physical servers, making it
+visible to an end user as a single file system.
diff --git a/filesystems/lizardfs/pkg-plist b/filesystems/lizardfs/pkg-plist
new file mode 100644
index 000000000000..d9d585a1e3cd
--- /dev/null
+++ b/filesystems/lizardfs/pkg-plist
@@ -0,0 +1,119 @@
+bin/chunk_converter
+bin/cpp-interpreter.sh
+bin/crc_converter
+bin/file-generate
+bin/file-overwrite
+bin/file-validate
+bin/flockcmd
+bin/lizardfs
+bin/lizardfs-admin
+bin/lizardfs-probe
+bin/lzfs_ping_pong
+bin/mfsappendchunks
+bin/mfscheckfile
+bin/mfsdeleattr
+bin/mfsdirinfo
+bin/mfsfileinfo
+bin/mfsfilerepair
+bin/mfsgeteattr
+bin/mfsgetgoal
+bin/mfsgettrashtime
+bin/mfsmakesnapshot
+bin/mfsmount
+bin/mfsping
+bin/mfspingserv
+bin/mfsrepquota
+bin/mfsrgetgoal
+bin/mfsrgettrashtime
+bin/mfsrsetgoal
+bin/mfsrsettrashtime
+bin/mfsseteattr
+bin/mfssetgoal
+bin/mfssetquota
+bin/mfssettrashtime
+bin/mfstools.sh
+bin/posixlockcmd
+etc/bash_completion.d/lizardfs
+etc/mfs/globaliolimits.cfg.dist
+etc/mfs/iolimits.cfg.dist
+etc/mfs/mfschunkserver.cfg.dist
+etc/mfs/mfsexports.cfg.dist
+etc/mfs/mfsgoals.cfg.dist
+etc/mfs/mfshdd.cfg.dist
+etc/mfs/mfsmaster.cfg.dist
+etc/mfs/mfsmetalogger.cfg.dist
+etc/mfs/mfsmount.cfg.dist
+etc/mfs/mfstopology.cfg.dist
+include/lizardfs/lizardfs_c_api.h
+include/lizardfs/lizardfs_error_codes.h
+lib/libchunk_operations_eio.so
+lib/liblizardfs-client-cpp.a
+lib/liblizardfs-client-cpp_pic.a
+lib/liblizardfs-client.a
+lib/liblizardfs-client.so
+lib/liblizardfs-client_pic.a
+lib/liblizardfsmount_shared.so
+lib/libredirect_bind.so
+lib/libslow_chunk_scan.so
+sbin/lizardfs-cgiserver
+sbin/mfscgiserv
+sbin/mfschunkserver
+sbin/mfsmaster
+sbin/mfsmetadump
+sbin/mfsmetalogger
+sbin/mfsmetarestore
+sbin/mfsrestoremaster
+share/man/man1/lizardfs-appendchunks.1.gz
+share/man/man1/lizardfs-checkfile.1.gz
+share/man/man1/lizardfs-deleattr.1.gz
+share/man/man1/lizardfs-dirinfo.1.gz
+share/man/man1/lizardfs-fileinfo.1.gz
+share/man/man1/lizardfs-filerepair.1.gz
+share/man/man1/lizardfs-geteattr.1.gz
+share/man/man1/lizardfs-getgoal.1.gz
+share/man/man1/lizardfs-gettrashtime.1.gz
+share/man/man1/lizardfs-makesnapshot.1.gz
+share/man/man1/lizardfs-repquota.1.gz
+share/man/man1/lizardfs-rgetgoal.1.gz
+share/man/man1/lizardfs-rgettrashtime.1.gz
+share/man/man1/lizardfs-rremove.1.gz
+share/man/man1/lizardfs-rsetgoal.1.gz
+share/man/man1/lizardfs-rsettrashtime.1.gz
+share/man/man1/lizardfs-seteattr.1.gz
+share/man/man1/lizardfs-setgoal.1.gz
+share/man/man1/lizardfs-setquota.1.gz
+share/man/man1/lizardfs-settrashtime.1.gz
+share/man/man1/lizardfs.1.gz
+share/man/man1/mfsmount.1.gz
+share/man/man5/globaliolimits.cfg.5.gz
+share/man/man5/iolimits.cfg.5.gz
+share/man/man5/mfschunkserver.cfg.5.gz
+share/man/man5/mfsexports.cfg.5.gz
+share/man/man5/mfsgoals.cfg.5.gz
+share/man/man5/mfshdd.cfg.5.gz
+share/man/man5/mfsmaster.cfg.5.gz
+share/man/man5/mfsmetalogger.cfg.5.gz
+share/man/man5/mfsmount.cfg.5.gz
+share/man/man5/mfstopology.cfg.5.gz
+share/man/man7/lizardfs.7.gz
+share/man/man7/mfs.7.gz
+share/man/man7/moosefs.7.gz
+share/man/man8/lizardfs-admin.8.gz
+share/man/man8/lizardfs-cgiserver.8.gz
+share/man/man8/lizardfs-probe.8.gz
+share/man/man8/mfscgiserv.8.gz
+share/man/man8/mfschunkserver.8.gz
+share/man/man8/mfsmaster.8.gz
+share/man/man8/mfsmetadump.8.gz
+share/man/man8/mfsmetalogger.8.gz
+share/man/man8/mfsmetarestore.8.gz
+share/man/man8/mfsrestoremaster.8.gz
+share/mfscgi/chart.cgi
+share/mfscgi/err.gif
+share/mfscgi/favicon.ico
+share/mfscgi/index.html
+share/mfscgi/logomini.png
+share/mfscgi/mfs.cgi
+share/mfscgi/mfs.css
+/var/mfs/metadata.mfs.empty
+@dir /var/mfs