Bug 186344 - sysutils/cbsd update to 10.0.2
Summary: sysutils/cbsd update to 10.0.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dmitry Marakasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-01 14:30 UTC by Oleg Ginzburg
Modified: 2014-02-04 01:00 UTC (History)
0 users

See Also:


Attachments
file.diff (4.80 KB, patch)
2014-02-01 14:30 UTC, Oleg Ginzburg
no flags Details | Diff
GIDs.txt (217 bytes, text/plain; charset="ISO-8859-1")
2014-02-01 14:32 UTC, Oleg Ginzburg
no flags Details
UIDs.txt (623 bytes, text/plain; charset="ISO-8859-1")
2014-02-01 14:32 UTC, Oleg Ginzburg
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Ginzburg 2014-02-01 14:30:00 UTC
- update to 10.0.2
- use ports framework to create cbsd account
- add rc.d scripts
- add pkg-deinstall instructions for complete uninstall

Fix: Patch attached with submission follows:
Comment 1 Oleg Ginzburg 2014-02-01 14:32:40 UTC
patch for adding cbsd users into UIDs/GIDs
Comment 2 Dmitry Marakasov freebsd_committer freebsd_triage 2014-02-04 00:49:52 UTC
Responsible Changed
From-To: freebsd-ports-bugs->amdmi3

11
Comment 3 dfilter service freebsd_committer freebsd_triage 2014-02-04 00:53:08 UTC
Author: amdmi3
Date: Tue Feb  4 00:52:58 2014
New Revision: 342481
URL: http://svnweb.freebsd.org/changeset/ports/342481
QAT: https://qat.redports.org/buildarchive/r342481/

Log:
  - update to 10.0.2
  - use ports framework to create cbsd user/group
  - add rc.d scripts
  - add pkg-deinstall instructions for complete uninstall
  
  PR:		186344
  Submitted by:	Oleg Ginzburg <olevole@olevole.ru> (maintainer)

Added:
  head/sysutils/cbsd/files/cbsdd.in   (contents, props changed)
  head/sysutils/cbsd/files/cbsdrsyncd.in   (contents, props changed)
  head/sysutils/cbsd/pkg-deinstall   (contents, props changed)
Modified:
  head/GIDs
  head/UIDs
  head/sysutils/cbsd/Makefile
  head/sysutils/cbsd/distinfo

Modified: head/GIDs
==============================================================================
--- head/GIDs	Mon Feb  3 23:34:26 2014	(r342480)
+++ head/GIDs	Tue Feb  4 00:52:58 2014	(r342481)
@@ -84,6 +84,7 @@ ventrilo:*:146:
 kdm:*:147:
 ipv6mon:*:148:
 avenger:*:149:
+cbsd:*:150:
 rbldns:*:153:
 trircd:*:154:
 sfs:*:171:

Modified: head/UIDs
==============================================================================
--- head/UIDs	Mon Feb  3 23:34:26 2014	(r342480)
+++ head/UIDs	Tue Feb  4 00:52:58 2014	(r342481)
@@ -91,6 +91,7 @@ ventrilo:*:146:146::0:0:& server:/usr/lo
 kdm:*:147:147::0:0:KDE Display Manager:/nonexistent:/usr/sbin/nologin
 ipv6mon:*:148:148::0:0:IPv6 Address Monitoring Daemon:/nonexistent:/usr/sbin/nologin
 avenger:*:149:149::0:0:Mail Avenger:/var/spool/avenger:/usr/sbin/nologin
+cbsd:*:150:150::0:0:Cbsd user:/nonexistent:/bin/sh
 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
 sfs:*:171:171::0:0:Self-Certifying File System:/nonexistent:/usr/sbin/nologin

Modified: head/sysutils/cbsd/Makefile
==============================================================================
--- head/sysutils/cbsd/Makefile	Mon Feb  3 23:34:26 2014	(r342480)
+++ head/sysutils/cbsd/Makefile	Tue Feb  4 00:52:58 2014	(r342481)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=	cbsd
-PORTVERSION=	10.0.1
+PORTVERSION=	10.0.2
 CATEGORIES=	sysutils
 MASTER_SITES=	http://www.bsdstore.ru/downloads/ \
 		GH
@@ -16,12 +16,12 @@ RUN_DEPENDS=	rsync:${PORTSDIR}/net/rsync
 		sqlite3:${PORTSDIR}/databases/sqlite3
 LIB_DEPENDS=	libssh2.so:${PORTSDIR}/security/libssh2
 
-IGNORE=		Fails to work properly
-
 USE_GITHUB=	yes
 GH_ACCOUNT=	olevole
 GH_PROJECT=	cbsd
-GH_COMMIT=	ff6e7ea
+GH_COMMIT=	6e05bd1
+
+USE_RC_SUBR=	cbsdd cbsdrsyncd
 
 SUB_FILES=	pkg-message
 PLIST_FILES+=	man/man8/cbsd.8.gz
@@ -30,6 +30,9 @@ CBSD_HOME?=	${PREFIX}/cbsd
 
 .include <bsd.port.pre.mk>
 
+USERS=	${PORTNAME}
+GROUPS=	${PORTNAME}
+
 .if ${OSVERSION} < 901000
 IGNORE=	does not work on FreeBSD < 9.1
 .endif

Modified: head/sysutils/cbsd/distinfo
==============================================================================
--- head/sysutils/cbsd/distinfo	Mon Feb  3 23:34:26 2014	(r342480)
+++ head/sysutils/cbsd/distinfo	Tue Feb  4 00:52:58 2014	(r342481)
@@ -1,2 +1,2 @@
-SHA256 (cbsd-10.0.1.tar.gz) = a4475238ecf1f05752ddccfd514afe9dcd151c580ddba29dfee467c80193050f
-SIZE (cbsd-10.0.1.tar.gz) = 1752119
+SHA256 (cbsd-10.0.2.tar.gz) = 3cce46368bcd0e9e5c4f8aec8219059fcc71b0709155d5dfb029d7b9a1ed4547
+SIZE (cbsd-10.0.2.tar.gz) = 325560

Added: head/sysutils/cbsd/files/cbsdd.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/cbsd/files/cbsdd.in	Tue Feb  4 00:52:58 2014	(r342481)
@@ -0,0 +1,60 @@
+#!/bin/sh
+#
+# PROVIDE: cbsdd
+# REQUIRE: LOGIN FILESYSTEMS sshd
+# KEYWORD: shutdown
+#
+# cbsdd_enable="YES"
+#
+
+. /etc/rc.subr
+
+name=cbsdd
+rcvar=cbsdd_enable
+load_rc_config $name
+
+: ${cbsdd_enable="NO"}
+
+export workdir="${cbsd_workdir}"
+globalconf=${cbsd_globalconf:-"${workdir}/cbsd.conf"}
+
+if [ ! -f ${globalconf} ]; then
+    echo "cbsd: no such ${globalconf}";
+    exit 1
+fi
+
+. ${globalconf}
+. ${inventory}
+. ${mdtools}
+. ${subr}
+
+if [ ! -f ${localcbsdconf} ]; then
+    echo "cbsd: no such ${localcbsdconf}";
+    exit 1
+fi
+
+. ${localcbsdconf}
+
+start_precmd=${name}_prestart
+stop_precmd=${name}_prestop
+
+command="${sbindir}/cbsdd"
+pidfile="/var/run/$name.pid"
+
+cbsdd_prestart() {
+    find ${ftmpdir} -depth 1 -maxdepth 1 -type f -exec rm -f {} \;
+    %%PREFIX%%/bin/cbsd sysinv mode=update
+
+    . ${inventory}
+
+    [ -n "$nat_enable" ] && %%PREFIX%%/bin/cbsd naton
+    /usr/sbin/daemon ${rcddir}/jails-astart start
+}
+
+cbsdd_prestop()
+{
+    ${rcddir}/jails-astart stop
+    [ -n "${nat_enable}" ] && %%PREFIX%%/bin/cbsd natoff
+}
+
+run_rc_command "$1"

Added: head/sysutils/cbsd/files/cbsdrsyncd.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/cbsd/files/cbsdrsyncd.in	Tue Feb  4 00:52:58 2014	(r342481)
@@ -0,0 +1,27 @@
+#!/bin/sh
+# PROVIDE: cbsdrsyncd
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+# cbsdrsyncd_enable="YES"
+# cbsdrsyncd_flags="<set as needed>"
+#
+# See rsync(1) for cbsdrsyncd_flags
+#
+
+. /etc/rc.subr
+. /etc/rc.conf
+
+name="cbsdrsyncd"
+rcvar=cbsdrsyncd_enable
+
+command="%%PREFIX%%/bin/rsync"
+command_args="--daemon"
+pidfile="/var/run/$name.pid"
+required_files="${cbsd_workdir}/etc/$name.conf"
+
+# read configuration and set defaults
+load_rc_config "$name"
+: ${cbsdrsyncd_enable="NO"}
+
+run_rc_command "$1"

Added: head/sysutils/cbsd/pkg-deinstall
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/cbsd/pkg-deinstall	Tue Feb  4 00:52:58 2014	(r342481)
@@ -0,0 +1,31 @@
+#!/bin/sh
+case $2 in
+POST-DEINSTALL)
+    echo
+    echo "The cbsd package has been deleted."
+    echo "If you're *not* upgrading and won't be using it any longer, you may want to"
+    echo "check some files in the system which could modify by cbsd and remove this"
+    echo "changes for complete deinstall. Specifically:"
+    echo
+    echo "1) follow records in the /var/cron/tabs/root file:"
+    echo "* * * * * /usr/bin/lockf -s -t0 \$workdir/ftmp/periodic_minutes \\"
+    echo "/usr/sbin/periodic minutes > /dev/null 2>&1"
+    echo "0 * * * * /usr/bin/lockf -s -t0 \$workdir/ftmp/periodic_hourly \\"
+    echo "/usr/sbin/periodic hourly > /dev/null 2>&1"
+    echo
+    echo "2) follow record in the /etc/periodic.conf file:"
+    echo "local_periodic=\"/usr/local/etc/periodic \$workdir/etc/periodic\""
+    echo
+    echo "3) follow records in the /etc/rc.conf file:"
+    echo "cbsdrsyncd_enable=\"YES\""
+    echo "cbsdrsyncd_flags=\"--config=\$workdir/etc/rsyncd.conf\""
+    echo "cbsdd_enable=\"YES\""
+    echo "devfs_load_rulesets=\"YES\""
+    echo "cbsd_workdir=\"\$workdir\""
+    echo "rcshutdown_timeout=\"900\""
+    echo "sshd_flags=\"-oPort=22222\""
+    echo
+    echo "4) /usr/local/etc/sudoers.d/cbsd_sudoers file"
+    echo
+  ;;
+esac
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Dmitry Marakasov freebsd_committer freebsd_triage 2014-02-04 00:53:39 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!