aboutsummaryrefslogtreecommitdiff
path: root/sysutils/moosefs-master
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2014-07-12 10:16:57 +0000
committerJohn Marino <marino@FreeBSD.org>2014-07-12 10:16:57 +0000
commit2dc13b68e9d516d4382fb1068c4ab20c50497687 (patch)
tree4e84ca469dde8ef113d20d4b727ba10e40b2a587 /sysutils/moosefs-master
parent79c08ab7c54152025d78974d8c962d0e7a2217df (diff)
downloadports-2dc13b68e9d516d4382fb1068c4ab20c50497687.tar.gz
ports-2dc13b68e9d516d4382fb1068c4ab20c50497687.zip
Notes
Diffstat (limited to 'sysutils/moosefs-master')
-rw-r--r--sysutils/moosefs-master/Makefile79
-rw-r--r--sysutils/moosefs-master/bsd.port.moosefs.mk14
-rw-r--r--sysutils/moosefs-master/distinfo4
-rw-r--r--sysutils/moosefs-master/files/mfscgiserv.in21
-rw-r--r--sysutils/moosefs-master/files/mfsmaster.in26
-rw-r--r--sysutils/moosefs-master/files/mfsmetalogger.in31
-rw-r--r--sysutils/moosefs-master/files/patch-mfsdata_Makefile.in36
-rw-r--r--sysutils/moosefs-master/files/pkg-deinstall.in14
-rw-r--r--sysutils/moosefs-master/files/pkg-install.in37
-rw-r--r--sysutils/moosefs-master/pkg-plist48
10 files changed, 139 insertions, 171 deletions
diff --git a/sysutils/moosefs-master/Makefile b/sysutils/moosefs-master/Makefile
index 6bf3d99f6d59..6ef67248ace5 100644
--- a/sysutils/moosefs-master/Makefile
+++ b/sysutils/moosefs-master/Makefile
@@ -1,51 +1,42 @@
# Created by: Chifeng Qu <chifeng@gmail.com>
# $FreeBSD$
-PORTNAME= moosefs
-PORTVERSION= #set via include
-CATEGORIES= sysutils
-PKGNAMESUFFIX= -master
-NO_STAGE= yes
-.include "bsd.port.moosefs.mk"
-
-MAINTAINER= chifeng@gmail.com
-COMMENT= Managing the whole filesystem and storing metadata
-
-USE_PYTHON= yes
-
-USE_RC_SUBR= mfsmaster mfsmetalogger mfscgiserv
-MFS_CGIDIR= ${PREFIX}/share/mfscgi
-SUB_FILES+= pkg-install pkg-message pkg-deinstall
-SUB_LIST+= MFS_WORKDIR="${MFS_WORKDIR}"
-
-CONFIGURE_ARGS+= --localstatedir=${MFS_WORKDIR} \
+PORTNAME= moosefs
+DISTVERSION= 1.6.27-5
+CATEGORIES= sysutils
+MASTER_SITES= http://www.moosefs.org/tl_files/mfscode/ \
+ http://ports.quxingwen.com/dist/mfs/
+PKGNAMESUFFIX= -master
+DISTNAME= mfs-${DISTVERSION}
+
+MAINTAINER= chifeng@gmail.com
+COMMENT= Managing the whole filesystem and storing metadata
+
+LICENSE= GPLv3
+
+WRKSRC= ${WRKDIR}/mfs-1.6.27
+USERS= mfs
+GROUPS= mfs
+GNU_CONFIGURE= yes
+USE_PYTHON= yes
+
+USE_RC_SUBR= mfsmaster mfsmetalogger mfscgiserv
+SUB_FILES= pkg-message
+SUB_LIST= PYTHON_CMD=${PYTHON_CMD}
+
+CONFIGURE_ARGS+= --localstatedir=/var \
--enable-mfsmaster \
- --with-mfscgiserv-dir=${PREFIX}/sbin \
--enable-mfscgiserv \
--enable-mfscgi \
- --with-mfscgi-dir=${MFS_CGIDIR} \
--disable-mfschunkserver \
- --disable-mfsmount
-
-MAN5= mfsmaster.cfg.5 mfsexports.cfg.5 mfsmetalogger.cfg.5 mfstopology.cfg.5
-MAN7= moosefs.7 mfs.7
-MAN8= mfscgiserv.8 mfsmaster.8 mfsmetarestore.8 mfsmetalogger.8
-
-.include <bsd.port.pre.mk>
-
-pre-install:
- ${MKDIR} ${MFS_CGIDIR}
-
-post-install:
-.for FILE in mfsmaster mfsexports mfsmetalogger mfstopology
- @if [ ! -f ${PREFIX}/etc/mfs/${FILE}.cfg ]; then \
- ${CP} ${PREFIX}/etc/mfs/${FILE}.cfg.dist ${PREFIX}/etc/mfs/${FILE}.cfg ; \
- fi
-.endfor
- @if [ ! -f ${MFS_WORDIR}/mfs/metadata.mfs ]; then \
- ${CP} ${MFS_WORKDIR}/mfs/metadata.mfs.empty ${MFS_WORKDIR}/mfs/metadata.mfs ; \
- fi
- PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
- @${CAT} ${PKGMESSAGE}
-
-.include <bsd.port.post.mk>
+ --disable-mfsmount \
+ --with-default-user=mfs \
+ --with-default-group=mfs \
+ --with-mfscgiserv-dir=${PREFIX}/sbin \
+ --with-mfscgi-dir=${PREFIX}/share/mfscgi
+
+post-patch:
+ ${REINPLACE_CMD} -e 's|#\!/usr/bin/env python|#\!${PYTHON_CMD}|' \
+ ${WRKSRC}/mfscgi/cgiserv.py.in
+
+.include <bsd.port.mk>
diff --git a/sysutils/moosefs-master/bsd.port.moosefs.mk b/sysutils/moosefs-master/bsd.port.moosefs.mk
deleted file mode 100644
index 969194ef339d..000000000000
--- a/sysutils/moosefs-master/bsd.port.moosefs.mk
+++ /dev/null
@@ -1,14 +0,0 @@
-PORTVERSION= 1.6.27
-PORTREVISION?= 1
-MASTER_SITES= http://www.moosefs.org/tl_files/mfscode/ \
- http://ports.quxingwen.com/dist/mfs/
-
-DISTNAME= mfs-${PORTVERSION}-1
-WRKSRC= ${WRKDIR}/mfs-${PORTVERSION}
-
-LICENSE= GPLv3
-
-USERS= mfs
-GROUPS= mfs
-GNU_CONFIGURE= yes
-MFS_WORKDIR= /var
diff --git a/sysutils/moosefs-master/distinfo b/sysutils/moosefs-master/distinfo
index 6e6286eab5c6..68d592bc4795 100644
--- a/sysutils/moosefs-master/distinfo
+++ b/sysutils/moosefs-master/distinfo
@@ -1,2 +1,2 @@
-SHA256 (mfs-1.6.27-1.tar.gz) = dfe682f0b184ed13e602274825148cd9a7ddfe4f0894e1ab9c1823f66208cb28
-SIZE (mfs-1.6.27-1.tar.gz) = 771983
+SHA256 (mfs-1.6.27-5.tar.gz) = 5e6d7dd5dfe181ffb6beee44fd2be51b3faf56a71b90b460b2dc717462ff1eeb
+SIZE (mfs-1.6.27-5.tar.gz) = 784507
diff --git a/sysutils/moosefs-master/files/mfscgiserv.in b/sysutils/moosefs-master/files/mfscgiserv.in
index c447e358ae85..93899cccf59d 100644
--- a/sysutils/moosefs-master/files/mfscgiserv.in
+++ b/sysutils/moosefs-master/files/mfscgiserv.in
@@ -10,7 +10,10 @@
#
# Add the following lines to /etc/rc.conf or /etc/rc.conf.local to enable mfscgiserv:
#
-# mfscgiserv_enable="YES"
+# mfscgiserv_enable (bool): Set to NO by default.
+# Set it to YES to enable mfscgiserv.
+# mfscgiserv_flags (str): Set to "" by default.
+# Extra flags passed to mfscgiserv.
#
. /etc/rc.subr
@@ -18,18 +21,12 @@
name=mfscgiserv
rcvar=mfscgiserv_enable
-command=%%PREFIX%%/sbin/mfscgiserv
-
-stop_postcmd=stop_postcmd
+load_rc_config $name
+: ${mfscgiserv_enable=NO}
-stop_postcmd()
-{
- rm -f $pidfile
-}
+mfscgiserv_user=mfs
-# set defaults
-mfscgiserv_enable=${mfscgiserv_enable:-"NO"}
-procname="python"
+command_interpreter=%%PYTHON_CMD%%
+command=%%PREFIX%%/sbin/mfscgiserv
-load_rc_config $name
run_rc_command "$1"
diff --git a/sysutils/moosefs-master/files/mfsmaster.in b/sysutils/moosefs-master/files/mfsmaster.in
index fd1f47057cbf..61b95cdc61a6 100644
--- a/sysutils/moosefs-master/files/mfsmaster.in
+++ b/sysutils/moosefs-master/files/mfsmaster.in
@@ -8,9 +8,14 @@
# KEYWORD: shutdown
#
-# Add the following lines to /etc/rc.conf to enable mfsmaster:
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to enable mfsmaster:
#
-# mfsmaster_enable="YES"
+# mfsmaster_enable (bool): Set to NO by default.
+# Set it to YES to enable mfsmaster.
+# mfsmaster_config (path): Set to %%PREFIX%%/etc/mfs/mfsmaster.cfg
+# by default.
+# mfsmaster_flags (str): Set to "" by default.
+# Extra flags passed to mfsmaster.
#
. /etc/rc.subr
@@ -18,18 +23,13 @@
name=mfsmaster
rcvar=mfsmaster_enable
-command=%%PREFIX%%/sbin/${name}
-
-stop_postcmd=stop_postcmd
+load_rc_config $name
-stop_postcmd()
-{
- rm -f $pidfile
-}
+: ${mfsmaster_enable=NO}
+: ${mfsmaster_config=%%PREFIX%%/etc/mfs/mfsmaster.cfg}
-# set defaults
-mfsmaster_enable=${mfsmaster_enable:-"NO"}
-mfsmaster_flags=${mfsmaster_flags:-"-c %%PREFIX%%/etc/mfsmaster.cfg"}
+extra_commands=reload
+command=%%PREFIX%%/sbin/${name}
+command_args="-c ${mfsmaster_config}"
-load_rc_config $name
run_rc_command "$1"
diff --git a/sysutils/moosefs-master/files/mfsmetalogger.in b/sysutils/moosefs-master/files/mfsmetalogger.in
index 71607d754664..ec25c8b294fb 100644
--- a/sysutils/moosefs-master/files/mfsmetalogger.in
+++ b/sysutils/moosefs-master/files/mfsmetalogger.in
@@ -1,36 +1,35 @@
#!/bin/sh
-
+#
# $FreeBSD$
#
+
# PROVIDE: mfsmetalogger
# REQUIRE: LOGIN
# KEYWORD: shutdown
+
#
-# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
-# to enable this service:
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to enable mfsmetalogger:
#
# mfsmetalogger_enable (bool): Set to NO by default.
-# Set it to YES to enable doormand.
-# mfsmetalogger_config (path): Set to %%PREFIX%%/etc/mfsmetalogger.cfg
-# by default.
+# Set it to YES to enable mfsmetalogger.
+# mfsmetalogger_config (path): Set to %%PREFIX%%/etc/mfs/mfsmetalogger.cfg
+# by default.
+# mfsmetalogger_flags (str): Set to "" by default.
+# Extra flags passed to mfsmetalogger.
#
. /etc/rc.subr
-name="mfsmetalogger"
+name=mfsmetalogger
rcvar=mfsmetalogger_enable
-command=%%PREFIX%%/sbin/${name}
-#pidfile=/var/run/${name}.pid
-config_file=%%PREFIX%%/etc/${name}.cfg
-
load_rc_config $name
-: ${mfsmetalogger_enable="NO"}
-: ${mfsmetalogger_config="%%PREFIX%%/etcaster"}
+: ${mfsmetalogger_enable=NO}
+: ${mfsmetalogger_config=%%PREFIX%%/etc/mfs/mfsmetalogger.cfg}
-#command_args="-p $pidfile -f $doormand_config"
-command_args="-c $config_file"
+extra_commands=reload
+command=%%PREFIX%%/sbin/${name}
+command_args="-c ${mfsmetalogger_config}"
run_rc_command "$1"
-
diff --git a/sysutils/moosefs-master/files/patch-mfsdata_Makefile.in b/sysutils/moosefs-master/files/patch-mfsdata_Makefile.in
new file mode 100644
index 000000000000..9517c06c1d39
--- /dev/null
+++ b/sysutils/moosefs-master/files/patch-mfsdata_Makefile.in
@@ -0,0 +1,36 @@
+--- mfsdata/Makefile.in.orig 2013-11-26 11:22:48.000000000 +0000
++++ mfsdata/Makefile.in
+@@ -470,26 +470,20 @@ install-data-hook:
+ if [ ! -d $(DESTDIR)$(sysconfdir)"/mfs" ]; then \
+ $(MKDIR_P) $(DESTDIR)$(sysconfdir)"/mfs" ; \
+ fi
+-@BUILD_CHUNKSERVER_TRUE@ $(INSTALL_DATA) $(builddir)/mfschunkserver.cfg $(DESTDIR)$(sysconfdir)/mfs/mfschunkserver.cfg.dist
+-@BUILD_CHUNKSERVER_TRUE@ $(INSTALL_DATA) $(srcdir)/mfshdd.cfg $(DESTDIR)$(sysconfdir)/mfs/mfshdd.cfg.dist
++@BUILD_CHUNKSERVER_TRUE@ $(INSTALL_DATA) $(builddir)/mfschunkserver.cfg $(DESTDIR)$(sysconfdir)/mfs/mfschunkserver.cfg.sample
++@BUILD_CHUNKSERVER_TRUE@ $(INSTALL_DATA) $(srcdir)/mfshdd.cfg $(DESTDIR)$(sysconfdir)/mfs/mfshdd.cfg.sample
+ @BUILD_CHUNKSERVER_TRUE@ if [ ! -d $(DESTDIR)$(DATA_PATH) ]; then \
+ @BUILD_CHUNKSERVER_TRUE@ $(MKDIR_P) $(DESTDIR)$(DATA_PATH) ; \
+-@BUILD_CHUNKSERVER_TRUE@ if [ "`id -u`" = "0" ]; then \
+-@BUILD_CHUNKSERVER_TRUE@ chown $(DEFAULT_USER):$(DEFAULT_GROUP) $(DESTDIR)$(DATA_PATH) ; \
+-@BUILD_CHUNKSERVER_TRUE@ fi ; \
+ @BUILD_CHUNKSERVER_TRUE@ fi
+-@BUILD_MASTER_TRUE@ $(INSTALL_DATA) $(builddir)/mfsmetalogger.cfg $(DESTDIR)$(sysconfdir)/mfs/mfsmetalogger.cfg.dist
+-@BUILD_MASTER_TRUE@ $(INSTALL_DATA) $(builddir)/mfsmaster.cfg $(DESTDIR)$(sysconfdir)/mfs/mfsmaster.cfg.dist
+-@BUILD_MASTER_TRUE@ $(INSTALL_DATA) $(builddir)/mfsexports.cfg $(DESTDIR)$(sysconfdir)/mfs/mfsexports.cfg.dist
+-@BUILD_MASTER_TRUE@ $(INSTALL_DATA) $(builddir)/mfstopology.cfg $(DESTDIR)$(sysconfdir)/mfs/mfstopology.cfg.dist
++@BUILD_MASTER_TRUE@ $(INSTALL_DATA) $(builddir)/mfsmetalogger.cfg $(DESTDIR)$(sysconfdir)/mfs/mfsmetalogger.cfg.sample
++@BUILD_MASTER_TRUE@ $(INSTALL_DATA) $(builddir)/mfsmaster.cfg $(DESTDIR)$(sysconfdir)/mfs/mfsmaster.cfg.sample
++@BUILD_MASTER_TRUE@ $(INSTALL_DATA) $(builddir)/mfsexports.cfg $(DESTDIR)$(sysconfdir)/mfs/mfsexports.cfg.sample
++@BUILD_MASTER_TRUE@ $(INSTALL_DATA) $(builddir)/mfstopology.cfg $(DESTDIR)$(sysconfdir)/mfs/mfstopology.cfg.sample
+ @BUILD_MASTER_TRUE@ if [ ! -d $(DESTDIR)$(DATA_PATH) ]; then \
+ @BUILD_MASTER_TRUE@ $(MKDIR_P) $(DESTDIR)$(DATA_PATH) ; \
+-@BUILD_MASTER_TRUE@ if [ "`id -u`" = "0" ]; then \
+-@BUILD_MASTER_TRUE@ chown $(DEFAULT_USER):$(DEFAULT_GROUP) $(DESTDIR)$(DATA_PATH) ; \
+-@BUILD_MASTER_TRUE@ fi ; \
+ @BUILD_MASTER_TRUE@ fi
+ @BUILD_MASTER_TRUE@ $(INSTALL_DATA) $(srcdir)/metadata.mfs $(DESTDIR)$(DATA_PATH)/metadata.mfs.empty
+-@BUILD_MOUNT_TRUE@ $(INSTALL_DATA) $(builddir)/mfsmount.cfg $(DESTDIR)$(sysconfdir)/mfs/mfsmount.cfg.dist
++@BUILD_MOUNT_TRUE@ $(INSTALL_DATA) $(builddir)/mfsmount.cfg $(DESTDIR)$(sysconfdir)/mfs/mfsmount.cfg.sample
+
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/sysutils/moosefs-master/files/pkg-deinstall.in b/sysutils/moosefs-master/files/pkg-deinstall.in
deleted file mode 100644
index edced14d2337..000000000000
--- a/sysutils/moosefs-master/files/pkg-deinstall.in
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-PATH="/bin:/sbin:/usr/bin:/usr/sbin"
-
-WORKFILE=%%MFS_WORKDIR%%/mfs/metadata.mfs.empty
-WORKDIR=%%MFS_WORKDIR%%/mfs
-
-if [ "$2" = "POST-DEINSTALL" ]; then
- echo "=> Deleting ${WORKFILE} if empty..."
- rm -f ${WORKFILE} 2>/dev/null || true
- echo "=> Deleting ${WORKDIR} if empty..."
- rm -d ${WORKDIR} 2>/dev/null || true
-fi
diff --git a/sysutils/moosefs-master/files/pkg-install.in b/sysutils/moosefs-master/files/pkg-install.in
deleted file mode 100644
index 99a254a25607..000000000000
--- a/sysutils/moosefs-master/files/pkg-install.in
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-
-PATH=/bin:/usr/sbin
-
-if [ "$2" != "PRE-INSTALL" ]; then
- exit 0
-fi
-
- USER=mfs
- GROUP=${USER}
- UID=925
- GID=${UID}
-
- if pw group show "${GROUP}" 2>/dev/null; then
- echo "You already have a group \"${GROUP}\", so I will use it."
- else
- if pw groupadd ${GROUP} -g ${GID}; then
- echo "Added group \"${GROUP}\"."
- else
- echo "Adding group \"${GROUP}\" failed..."
- exit 1
- fi
- fi
-
- if pw user show "${USER}" 2>/dev/null; then
- echo "You already have a user \"${USER}\", so I will use it."
- else
- if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
- -d /nonexistent -s /sbin/nologin -c "MySQL Daemon"
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
- fi
-exit 0
diff --git a/sysutils/moosefs-master/pkg-plist b/sysutils/moosefs-master/pkg-plist
index 54c35df9cf1a..d4afe34a36ed 100644
--- a/sysutils/moosefs-master/pkg-plist
+++ b/sysutils/moosefs-master/pkg-plist
@@ -1,26 +1,36 @@
-@exec if [ ! -f %D/etc/mfsmaster.cfg ]; then /bin/cp %D/%F %D/etc/mfsmaster.cfg; fi
-@exec if [ ! -f %D/etc/mfsexports.cfg ]; then /bin/cp %D/%F %D/etc/mfsexports.cfg; fi
-@exec if [ ! -f %D/etc/mfsmetalogger.cfg ]; then /bin/cp %D/%F %D/etc/mfsmetalogger.cfg; fi
-@exec if [ ! -f %D/etc/mfstopology.cfg ]; then /bin/cp %D/%F %D/etc/mfstopology.cfg; fi
-@unexec if cmp -s %D/etc/mfs/mfsmaster.cfg.dist %D/etc/mfsmaster.cfg; then rm -f %D/etc/mfsmaster.cfg; fi
-@unexec if cmp -s %D/etc/mfs/mfsexports.cfg.dist %D/etc/mfsexports.cfg; then rm -f %D/etc/mfsexports.cfg; fi
-@unexec if cmp -s %D/etc/mfs/mfsmetalogger.cfg.dist %D/etc/mfsmetalogger.cfg; then rm -f %D/etc/mfsmetalogger.cfg; fi
-@unexec if cmp -s %D/etc/mfs/mfstopology.cfg.dist %D/etc/mfstopology.cfg; then rm -f %D/etc/mfstopology.cfg; fi
-etc/mfs/mfsmaster.cfg.dist
-etc/mfs/mfsexports.cfg.dist
-etc/mfs/mfsmetalogger.cfg.dist
-etc/mfs/mfstopology.cfg.dist
+@owner mfs
+@group mfs
+@sample etc/mfs/mfsexports.cfg.sample
+@sample etc/mfs/mfsmaster.cfg.sample
+@sample etc/mfs/mfsmetalogger.cfg.sample
+@sample etc/mfs/mfstopology.cfg.sample
+@owner
+@group
+man/man5/mfsexports.cfg.5.gz
+man/man5/mfsmaster.cfg.5.gz
+man/man5/mfsmetalogger.cfg.5.gz
+man/man5/mfstopology.cfg.5.gz
+man/man7/mfs.7.gz
+man/man7/moosefs.7.gz
+man/man8/mfscgiserv.8.gz
+man/man8/mfsmaster.8.gz
+man/man8/mfsmetalogger.8.gz
+man/man8/mfsmetarestore.8.gz
sbin/mfscgiserv
sbin/mfsmaster
-sbin/mfsmetarestore
sbin/mfsmetadump
sbin/mfsmetalogger
-share/mfscgi/mfs.cgi
-share/mfscgi/mfs.css
-share/mfscgi/logomini.png
-share/mfscgi/index.html
-share/mfscgi/err.gif
+sbin/mfsmetarestore
share/mfscgi/chart.cgi
+share/mfscgi/err.gif
share/mfscgi/favicon.ico
-@dirrm etc/mfs
+share/mfscgi/index.html
+share/mfscgi/logomini.png
+share/mfscgi/mfs.cgi
+share/mfscgi/mfs.css
+@dirrmtry etc/mfs
@dirrm share/mfscgi
+@owner mfs
+@group mfs
+/var/mfs/metadata.mfs.empty
+@unexec rmdir "/var/mfs" >/dev/null 2>&1 || :