From owner-svn-ports-all@FreeBSD.ORG Tue Feb 4 00:53:00 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49726C9D; Tue, 4 Feb 2014 00:53:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 351451A5B; Tue, 4 Feb 2014 00:53:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s140r0hE075613; Tue, 4 Feb 2014 00:53:00 GMT (envelope-from amdmi3@svn.freebsd.org) Received: (from amdmi3@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s140qwj7075600; Tue, 4 Feb 2014 00:52:58 GMT (envelope-from amdmi3@svn.freebsd.org) Message-Id: <201402040052.s140qwj7075600@svn.freebsd.org> From: Dmitry Marakasov Date: Tue, 4 Feb 2014 00:52:58 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r342481 - in head: . sysutils/cbsd sysutils/cbsd/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Feb 2014 00:53:00 -0000 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 (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 +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="" +# +# 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