Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Feb 2018 09:35:49 +0000 (UTC)
From:      Emanuel Haupt <ehaupt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r461370 - in head: . net-p2p/xmrig net-p2p/xmrig/files
Message-ID:  <201802100935.w1A9Zn7l071122@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ehaupt
Date: Sat Feb 10 09:35:49 2018
New Revision: 461370
URL: https://svnweb.freebsd.org/changeset/ports/461370

Log:
  - Update to 2.4.4
  
  [1] - Add rc.d startup script
      - Move config.json to ETCDIR and install it with @sample
      - Add pkg-message
      - Add  user "xmrig" to UIDs
  
  PR:		224822 [1]
  Submitted by:	joshruehlig@gmail.com [1]

Added:
  head/net-p2p/xmrig/files/
  head/net-p2p/xmrig/files/pkg-message.in   (contents, props changed)
  head/net-p2p/xmrig/files/xmrig.in   (contents, props changed)
  head/net-p2p/xmrig/pkg-plist   (contents, props changed)
Modified:
  head/UIDs
  head/net-p2p/xmrig/Makefile
  head/net-p2p/xmrig/distinfo   (contents, props changed)

Modified: head/UIDs
==============================================================================
--- head/UIDs	Sat Feb 10 09:18:10 2018	(r461369)
+++ head/UIDs	Sat Feb 10 09:35:49 2018	(r461370)
@@ -101,7 +101,7 @@ pop3vscan:*:151:6::0:0:POP3VScan Daemon:/var/spool/pop
 iog:*:152:80::0:0:iog Monitoring Owner:/usr/local/iog:/usr/sbin/nologin
 rbldns:*:153:153::0:0:rbldnsd pseudo-user:/nonexistent:/usr/sbin/nologin
 trircd:*:154:154::0:0:& user:/usr/local/etc/tr-ircd:/usr/sbin/nologin
-# free: 155
+xmrig:*:155:65534::0:0:XMRig:/nonexistent:/usr/sbin/nologin
 monetdb:*:156:156::0:0:MonetDB user:/usr/local/monetdb5:/bin/sh
 barman:*:157:157::0:0:Barman user:/var/barman:/bin/sh
 pootle:*:158:158::0:0:Pootle User:/var/db/pootle:/usr/sbin/nologin

Modified: head/net-p2p/xmrig/Makefile
==============================================================================
--- head/net-p2p/xmrig/Makefile	Sat Feb 10 09:18:10 2018	(r461369)
+++ head/net-p2p/xmrig/Makefile	Sat Feb 10 09:35:49 2018	(r461370)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	xmrig
-PORTVERSION=	2.4.3
+PORTVERSION=	2.4.4
 DISTVERSIONPREFIX=	v
 CATEGORIES=	net-p2p
 
@@ -18,11 +18,14 @@ LIB_DEPENDS=	libmicrohttpd.so:www/libmicrohttpd \
 USES=		cmake:outsource
 USE_GITHUB=	yes
 
-PLIST_FILES=	bin/xmrig %%DATADIR%%/config.json
+USE_RC_SUBR=	${PORTNAME}
+SUB_FILES=	pkg-message
+SUB_LIST=	PORTNAME=${PORTNAME} USERS=${USERS}
+USERS=		xmrig
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKDIR}/.build/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
-	@${MKDIR} ${STAGEDIR}${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/src//config.json ${STAGEDIR}${DATADIR}
+	@${MKDIR} ${STAGEDIR}${ETCDIR}
+	${INSTALL_DATA} ${WRKSRC}/src/config.json ${STAGEDIR}${ETCDIR}/config.json.sample
 
 .include <bsd.port.mk>

Modified: head/net-p2p/xmrig/distinfo
==============================================================================
--- head/net-p2p/xmrig/distinfo	Sat Feb 10 09:18:10 2018	(r461369)
+++ head/net-p2p/xmrig/distinfo	Sat Feb 10 09:35:49 2018	(r461370)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1514015779
-SHA256 (xmrig-xmrig-v2.4.3_GH0.tar.gz) = 56a4eb05e0b310b044ae30203dfb63664cdfb520c9c28dac29fa1886ca59cbc2
-SIZE (xmrig-xmrig-v2.4.3_GH0.tar.gz) = 267601
+TIMESTAMP = 1518252865
+SHA256 (xmrig-xmrig-v2.4.4_GH0.tar.gz) = 4ad514db6bbe214a9d4b9a01d1e4e5252a09554fa28c153dbdfa49a001090142
+SIZE (xmrig-xmrig-v2.4.4_GH0.tar.gz) = 267782

Added: head/net-p2p/xmrig/files/pkg-message.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/xmrig/files/pkg-message.in	Sat Feb 10 09:35:49 2018	(r461370)
@@ -0,0 +1,8 @@
+XMRig configuration file available at:
+%%ETCDIR%%/config.json
+
+To automatically start XMRig at boot time:
+# sysrc xmrig_enable="YES"
+
+To then manually start XMRig without rebooting:
+# service xmrig start

Added: head/net-p2p/xmrig/files/xmrig.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/xmrig/files/xmrig.in	Sat Feb 10 09:35:49 2018	(r461370)
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: xmrig
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# xmrig_enable (bool):	Set to NO by default.
+#			Set it to YES to enable it.
+# xmrig_user:		The user account the XMRig daemon runs as.
+#			It uses '%%USERS%%' user by default.
+#			Do not sets it as empty or it will run as root.
+# xmrig_conf:		The configuration file XMRig uses.    
+#			Default: %%ETCDIR%%/config.json
+
+. /etc/rc.subr
+name="%%PORTNAME%%"
+rcvar="${name}_enable"
+load_rc_config ${name}
+
+: ${xmrig_enable:="NO"}
+: ${xmrig_user:="%%USERS%%"}
+: ${xmrig_conf:="%%ETCDIR%%/config.json"}
+
+command="/usr/sbin/daemon"
+procname="%%PREFIX%%/bin/xmrig"
+command_args="-f ${procname} --config=${xmrig_conf}"
+
+run_rc_command "$1"

Added: head/net-p2p/xmrig/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/xmrig/pkg-plist	Sat Feb 10 09:35:49 2018	(r461370)
@@ -0,0 +1,2 @@
+bin/xmrig
+@sample %%ETCDIR%%/config.json.sample



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802100935.w1A9Zn7l071122>