aboutsummaryrefslogtreecommitdiff
path: root/sysutils
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
parent79c08ab7c54152025d78974d8c962d0e7a2217df (diff)
downloadports-2dc13b68e9d516d4382fb1068c4ab20c50497687.tar.gz
ports-2dc13b68e9d516d4382fb1068c4ab20c50497687.zip
Notes
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/moosefs-chunkserver/Makefile52
-rw-r--r--sysutils/moosefs-chunkserver/distinfo2
-rw-r--r--sysutils/moosefs-chunkserver/files/mfschunkserver.in26
-rw-r--r--sysutils/moosefs-chunkserver/files/patch-mfsdata_Makefile.in36
-rw-r--r--sysutils/moosefs-chunkserver/files/pkg-deinstall.in10
-rw-r--r--sysutils/moosefs-chunkserver/pkg-plist20
-rw-r--r--sysutils/moosefs-client/Makefile35
-rw-r--r--sysutils/moosefs-client/distinfo2
-rw-r--r--sysutils/moosefs-client/files/patch-mfsdata_Makefile.in36
-rw-r--r--sysutils/moosefs-client/pkg-plist39
-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
20 files changed, 303 insertions, 265 deletions
diff --git a/sysutils/moosefs-chunkserver/Makefile b/sysutils/moosefs-chunkserver/Makefile
index da07847fc385..3abc2b99cbae 100644
--- a/sysutils/moosefs-chunkserver/Makefile
+++ b/sysutils/moosefs-chunkserver/Makefile
@@ -2,46 +2,38 @@
# $FreeBSD$
PORTNAME= moosefs
-PORTVERSION= #
+DISTVERSION= 1.6.27-5
CATEGORIES= sysutils
+MASTER_SITES= http://www.moosefs.org/tl_files/mfscode/ \
+ http://ports.quxingwen.com/dist/mfs/
PKGNAMESUFFIX= -chunkserver
-NO_STAGE= yes
-.include "${.CURDIR}/../moosefs-master/bsd.port.moosefs.mk"
+DISTNAME= mfs-${DISTVERSION}
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Storing files data and synchronizing it among themselves
+MAINTAINER= chifeng@gmail.com
+COMMENT= Storing file data and synchronizing it among themselves
-DISTINFO_FILE= ${.CURDIR}/../moosefs-master/distinfo
-USE_RC_SUBR= mfschunkserver
+LICENSE= GPLv3
-MAN5= mfschunkserver.cfg.5 mfshdd.cfg.5
-MAN8= mfschunkserver.8
+WRKSRC= ${WRKDIR}/mfs-1.6.27
+USERS= mfs
+GROUPS= mfs
+GNU_CONFIGURE= yes
-SUB_FILES+= pkg-message pkg-deinstall
-SUB_LIST+= MFS_WORKDIR="${MFS_WORKDIR}"
+USE_RC_SUBR= mfschunkserver
+SUB_FILES= pkg-message
-CONFIGURE_ARGS= --localstatedir=${MFS_WORKDIR} \
- --bindir=${PREFIX}/sbin \
- --with-default-user=${MFSUSER} \
- --with-default-group=${MFSGROUP} \
+CONFIGURE_ARGS= --localstatedir=/var \
+ --enable-mfschunkserver \
--disable-mfsmaster \
--disable-mfsmount \
--disable-mfscgi \
--disable-mfscgiserv \
- --enable-mfschunkserver
-
-.include <bsd.port.pre.mk>
+ --bindir=${PREFIX}/sbin \
+ --with-default-user=mfs \
+ --with-default-group=mfs
post-patch:
- ${REINPLACE_CMD} -e 's;^general_mans;#general_mans;g' ${WRKSRC}/doc/Makefile.am \
- ${WRKSRC}/doc/Makefile.in
-
-post-install:
-.for FILE in mfschunkserver mfshdd
- @if [ ! -f ${PREFIX}/etc/${i}.cfg ]; then \
- ${CP} ${PREFIX}/etc/mfs/${FILE}.cfg.dist ${PREFIX}/etc/${FILE}.cfg ; \
- fi
-.endfor
- @${CAT} ${PKGMESSAGE}
-
-.include <bsd.port.post.mk>
+ ${REINPLACE_CMD} -e 's;^general_mans;#general_mans;g' \
+ ${WRKSRC}/doc/Makefile.am ${WRKSRC}/doc/Makefile.in
+
+.include <bsd.port.mk>
diff --git a/sysutils/moosefs-chunkserver/distinfo b/sysutils/moosefs-chunkserver/distinfo
new file mode 100644
index 000000000000..68d592bc4795
--- /dev/null
+++ b/sysutils/moosefs-chunkserver/distinfo
@@ -0,0 +1,2 @@
+SHA256 (mfs-1.6.27-5.tar.gz) = 5e6d7dd5dfe181ffb6beee44fd2be51b3faf56a71b90b460b2dc717462ff1eeb
+SIZE (mfs-1.6.27-5.tar.gz) = 784507
diff --git a/sysutils/moosefs-chunkserver/files/mfschunkserver.in b/sysutils/moosefs-chunkserver/files/mfschunkserver.in
index c28d9f4770a9..4db272e2d939 100644
--- a/sysutils/moosefs-chunkserver/files/mfschunkserver.in
+++ b/sysutils/moosefs-chunkserver/files/mfschunkserver.in
@@ -8,9 +8,14 @@
# KEYWORD: shutdown
#
-# Add the following lines to /etc/rc.conf or or /etc/rc.conf to enable mfschunkserver:
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to enable mfschunkserver:
#
-# mfschunkserver_enable="YES"
+# mfschunkserver_enable (bool): Set to NO by default.
+# Set it to YES to enable mfschunkserver.
+# mfschunkserver_config (path): Set to %%PREFIX%%/etc/mfs/mfschunkserver.cfg
+# by default.
+# mfschunkserver_flags (str): Set to "" by default.
+# Extra flags passed to mfschunkserver.
#
. /etc/rc.subr
@@ -18,18 +23,13 @@
name=mfschunkserver
rcvar=mfschunkserver_enable
-command=%%PREFIX%%/sbin/${name}
-
-stop_postcmd=stop_postcmd
+load_rc_config $name
-stop_postcmd()
-{
- rm -f $pidfile
-}
+: ${mfschunkserver_enable=NO}
+: ${mfschunkserver_config=%%PREFIX%%/etc/mfs/mfschunkserver.cfg}
-# set defaults
-mfschunkserver_enable=${mfschunkserver_enable:-"NO"}
-mfschunkserver_flags=${mfschunkserver_flags:-"-c %%PREFIX%%/etc/mfschunkserver.cfg"}
+extra_commands=reload
+command=%%PREFIX%%/sbin/${name}
+command_args="-c ${mfschunkserver_config}"
-load_rc_config $name
run_rc_command "$1"
diff --git a/sysutils/moosefs-chunkserver/files/patch-mfsdata_Makefile.in b/sysutils/moosefs-chunkserver/files/patch-mfsdata_Makefile.in
new file mode 100644
index 000000000000..9517c06c1d39
--- /dev/null
+++ b/sysutils/moosefs-chunkserver/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-chunkserver/files/pkg-deinstall.in b/sysutils/moosefs-chunkserver/files/pkg-deinstall.in
deleted file mode 100644
index 6e79b6e8d304..000000000000
--- a/sysutils/moosefs-chunkserver/files/pkg-deinstall.in
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-PATH="/bin:/sbin:/usr/bin:/usr/sbin"
-
-WORKDIR=%%MFS_WORKDIR%%/mfs
-
-if [ "$2" = "POST-DEINSTALL" ]; then
- echo "=> Deleting ${WORKDIR} if empty..."
- rm -d ${WORKDIR} 2>/dev/null || true
-fi
diff --git a/sysutils/moosefs-chunkserver/pkg-plist b/sysutils/moosefs-chunkserver/pkg-plist
index 1558f07045fe..0ae0d7a24de9 100644
--- a/sysutils/moosefs-chunkserver/pkg-plist
+++ b/sysutils/moosefs-chunkserver/pkg-plist
@@ -1,8 +1,14 @@
-@exec if [ ! -f %D/etc/mfshdd.cfg ]; then /bin/cp %D/%F %D/etc/mfshdd.cfg; fi
-@exec if [ ! -f %D/etc/mfschunkserver.cfg ]; then /bin/cp %D/%F %D/etc/mfschunkserver.cfg; fi
-@unexec if cmp -s %D/etc/mfs/mfshdd.cfg.dist %D/etc/mfshdd.cfg; then rm -f %D/etc/mfshdd.cfg; fi
-@unexec if cmp -s %D/etc/mfs/mfschunkserver.cfg.dist %D/etc/mfschunkserver.cfg; then rm -f %D/etc/mfschunkserver.cfg; fi
-etc/mfs/mfschunkserver.cfg.dist
-etc/mfs/mfshdd.cfg.dist
+@owner mfs
+@group mfs
+@sample etc/mfs/mfschunkserver.cfg.sample
+@sample etc/mfs/mfshdd.cfg.sample
+@owner
+@group
+man/man5/mfschunkserver.cfg.5.gz
+man/man5/mfshdd.cfg.5.gz
+man/man8/mfschunkserver.8.gz
sbin/mfschunkserver
-@dirrm etc/mfs
+@dirrmtry etc/mfs
+@owner mfs
+@group mfs
+@unexec rmdir "/var/mfs" >/dev/null 2>&1 || :
diff --git a/sysutils/moosefs-client/Makefile b/sysutils/moosefs-client/Makefile
index 37c1b79d332d..0b317527485a 100644
--- a/sysutils/moosefs-client/Makefile
+++ b/sysutils/moosefs-client/Makefile
@@ -2,42 +2,31 @@
# $FreeBSD$
PORTNAME= moosefs
-PORTVERSION= #set via include
+DISTVERSION= 1.6.27-5
CATEGORIES= sysutils
+MASTER_SITES= http://www.moosefs.org/tl_files/mfscode/ \
+ http://ports.quxingwen.com/dist/mfs/
PKGNAMESUFFIX= -client
-NO_STAGE= yes
-.include "${.CURDIR}/../moosefs-master/bsd.port.moosefs.mk"
+DISTNAME= mfs-${DISTVERSION}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= chifeng@gmail.com
COMMENT= Moosefs client tools
-DISTINFO_FILE= ${.CURDIR}/../moosefs-master/distinfo
+LICENSE= GPLv3
+
+WRKSRC= ${WRKDIR}/mfs-1.6.27
+GNU_CONFIGURE= yes
USES= fuse pkgconfig
-MAN1= mfstools.1 mfscheckfile.1 mfsdirinfo.1 mfsfileinfo.1 \
- mfsfilerepair.1 mfsgetgoal.1 mfsgettrashtime.1 \
- mfsrgetgoal.1 mfsrgettrashtime.1 mfsrsetgoal.1 \
- mfsrsettrashtime.1 mfssetgoal.1 mfssettrashtime.1 \
- mfsgeteattr.1 mfsseteattr.1 mfsdeleattr.1 \
- mfsappendchunks.1 mfsmakesnapshot.1
-MAN8= mfsmount.8
-
-CONFIGURE_ARGS= --with-default-user=${MFSUSER} \
- --with-default-group=${MFSGROUP} \
- --disable-mfsmaster \
+CONFIGURE_ARGS= --disable-mfsmaster \
--disable-mfschunkserver \
--disable-mfscgi \
--disable-mfscgiserv \
--enable-mfsmount
post-patch:
- ${REINPLACE_CMD} -e 's;^general_mans;#general_mans;g' ${WRKSRC}/doc/Makefile.am \
- ${WRKSRC}/doc/Makefile.in
-
-post-install:
- @if [ ! -f ${PREFIX}/etc/mfsmount.cfg ]; then \
- ${CP} ${PREFIX}/etc/mfs/mfsmount.cfg.dist ${PREFIX}/etc/mfsmount.cfg ; \
- fi
+ ${REINPLACE_CMD} -e 's;^general_mans;#general_mans;g' \
+ ${WRKSRC}/doc/Makefile.am ${WRKSRC}/doc/Makefile.in
.include <bsd.port.mk>
diff --git a/sysutils/moosefs-client/distinfo b/sysutils/moosefs-client/distinfo
new file mode 100644
index 000000000000..68d592bc4795
--- /dev/null
+++ b/sysutils/moosefs-client/distinfo
@@ -0,0 +1,2 @@
+SHA256 (mfs-1.6.27-5.tar.gz) = 5e6d7dd5dfe181ffb6beee44fd2be51b3faf56a71b90b460b2dc717462ff1eeb
+SIZE (mfs-1.6.27-5.tar.gz) = 784507
diff --git a/sysutils/moosefs-client/files/patch-mfsdata_Makefile.in b/sysutils/moosefs-client/files/patch-mfsdata_Makefile.in
new file mode 100644
index 000000000000..9517c06c1d39
--- /dev/null
+++ b/sysutils/moosefs-client/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-client/pkg-plist b/sysutils/moosefs-client/pkg-plist
index faeaa5a6f13b..d80079e99d68 100644
--- a/sysutils/moosefs-client/pkg-plist
+++ b/sysutils/moosefs-client/pkg-plist
@@ -1,24 +1,41 @@
-bin/mfsmakesnapshot
+bin/mfsappendchunks
bin/mfscheckfile
+bin/mfsdeleattr
bin/mfsdirinfo
bin/mfsfileinfo
bin/mfsfilerepair
+bin/mfsgeteattr
bin/mfsgetgoal
bin/mfsgettrashtime
+bin/mfsmakesnapshot
+bin/mfsmount
bin/mfsrgetgoal
bin/mfsrgettrashtime
bin/mfsrsetgoal
bin/mfsrsettrashtime
+bin/mfsseteattr
bin/mfssetgoal
bin/mfssettrashtime
-bin/mfsgeteattr
-bin/mfsseteattr
-bin/mfsdeleattr
-bin/mfsappendchunks
-bin/mfsmount
-bin/mfstools
bin/mfssnapshot
-@unexec if cmp -s %D/etc/mfs/mfsmount.cfg.dist %D/etc/mfsmount.cfg; then rm -f %D/etc/mfsmount.cfg; fi
-etc/mfs/mfsmount.cfg.dist
-@exec if [ ! -f %D/etc/mfsmount.cfg ]; then /bin/cp %D/%F %D/etc/mfsmount.cfg; fi
-@dirrm etc/mfs
+bin/mfstools
+@sample etc/mfs/mfsmount.cfg.sample
+man/man1/mfsappendchunks.1.gz
+man/man1/mfscheckfile.1.gz
+man/man1/mfsdeleattr.1.gz
+man/man1/mfsdirinfo.1.gz
+man/man1/mfsfileinfo.1.gz
+man/man1/mfsfilerepair.1.gz
+man/man1/mfsgeteattr.1.gz
+man/man1/mfsgetgoal.1.gz
+man/man1/mfsgettrashtime.1.gz
+man/man1/mfsmakesnapshot.1.gz
+man/man1/mfsrgetgoal.1.gz
+man/man1/mfsrgettrashtime.1.gz
+man/man1/mfsrsetgoal.1.gz
+man/man1/mfsrsettrashtime.1.gz
+man/man1/mfsseteattr.1.gz
+man/man1/mfssetgoal.1.gz
+man/man1/mfssettrashtime.1.gz
+man/man1/mfstools.1.gz
+man/man8/mfsmount.8.gz
+@dirrmtry etc/mfs
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 || :