ports/51456: adding new port: opencm
Billy Thompson
billy at idiom.com
Sun Apr 27 09:20:05 UTC 2003
>Number: 51456
>Category: ports
>Synopsis: adding new port: opencm
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sun Apr 27 02:20:03 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: wjt
>Release: FreeBSD 4.8-STABLE i386
>Organization:
KLOC
>Environment:
System: FreeBSD strange.wjt.us 4.8-STABLE FreeBSD 4.8-STABLE #11: Sat Apr 12 11:09:23 PDT 2003 root at strange.wjt.us:/usr/obj/usr/src/sys/KERNEL i386
>Description:
new port (opencm): a secure, high-integrity replacement for CVS
>How-To-Repeat:
>Fix:
--- opencm.shar begins here ---
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# opencm
# opencm/Makefile
# opencm/distinfo
# opencm/pkg-descr
# opencm/pkg-install
# opencm/pkg-plist
# opencm/files
# opencm/files/opencm.sh
# opencm/files/patch-aa
# opencm/scripts
# opencm/scripts/create_repository.sh
#
echo c - opencm
mkdir -p opencm > /dev/null 2>&1
echo x - opencm/Makefile
sed 's/^X//' >opencm/Makefile << 'END-of-opencm/Makefile'
X# New ports collection makefile for: OpenCM, a configuration management tool
X# Date created: Sept 23, 2001
X# Whom: billy at idiom.com
X#
X# $FreeBSD$
X#
X
XPORTNAME= opencm
XPORTVERSION= 0.1.2alpha5pl2
XCATEGORIES= devel
XMASTER_SITES= http://www.opencm.org/releases/
XDISTNAME= $(PORTNAME)-$(PORTVERSION)-1-src
XEXTRACT_SUFX= .tgz
X
X# Please prefix Subject: with [opencm]
XMAINTAINER= billy at idiom.com
XCOMMENT= OpenCM is designed as a secure, high-integrity replacement for CVS
X
XBUILD_DEPENDS= $(LOCALBASE)/bin/texi2dvi:$(PORTSDIR)/print/teTeX:install \
X $(LOCALBASE)/bin/autoconf:$(PORTSDIR)/devel/autoconf213:install
X
XUSE_GMAKE= yes
XGNU_CONFIGURE= yes
XIS_INTERACTIVE= yes
X
XWRKSRC= $(WRKDIR)/$(PORTNAME)-$(PORTVERSION)/base
X
XNOTIFY?= opencm at 127.0.0.1
XREPOSITORY?= /var/repository
XLOGDIR?= /var/log/opencm
X
Xpre-fetch:
X @echo "NOTIFY = email for opencm; currently '$(NOTIFY)'"
X @echo "LOGDIR = directory of opencm logs; currently '$(LOGDIR)'"
X @echo "REPOSITORY = path to repository; currently '$(REPOSITORY)'"
X
Xpre-configure:
X cd $(WRKSRC) && autoconf
X
Xpre-install:
X PKG_PREFIX=$(PREFIX) $(SH) pkg-install $(PKGNAME) PRE-INSTALL
X
X# Too lazy to take bother with updating pkg-plist by hand So, I
X# install into a FAKEROOT and then figure out the packing list by
X# traversing FAKEROOT
Xpost-install:
X @rm -rf $(PREFIX)/etc/rc.d/init.d
X @$(SED) -e "s=%%PREFIX%%=$(PREFIX)=g" $(FILESDIR)/opencm.sh > \
X $(PREFIX)/etc/rc.d/opencm.sh
X @$(CHMOD) 755 $(PREFIX)/etc/rc.d/opencm.sh
X @$(MKDIR) $(PREFIX)/etc/opencm $(LOGDIR)
X @$(RM) -f $(PREFIX)/etc/opencm.conf
X @$(ECHO) "OPENCM_NOTIFY=$(NOTIFY)" > $(PREFIX)/etc/opencm/opencm.conf
X @$(ECHO) "OPENCM_LOGDIR=$(LOGDIR)" >> $(PREFIX)/etc/opencm/opencm.conf
X @$(ECHO) "OPENCM_REPOSITORY=file:$(REPOSITORY)" >> \
X $(PREFIX)/etc/opencm/opencm.conf
X @$(ECHO) "export OPENCM_NOTIFY" >> $(PREFIX)/etc/opencm/opencm.conf
X @$(ECHO) "export OPENCM_LOGDIR" >> $(PREFIX)/etc/opencm/opencm.conf
X @$(ECHO) "export OPENCM_REPOSITORY" >> $(PREFIX)/etc/opencm/opencm.conf
X @( pw usershow opencm || pw useradd opencm -u 533 ) > /dev/null 2>&1
X @$(CHOWN) -R opencm $(PREFIX)/etc/opencm $(LOGDIR)
X @env PREFIX=$(PREFIX) REPOSITORY=$(REPOSITORY) \
X $(SH) $(SCRIPTDIR)/create_repository.sh
X
X.include <bsd.port.mk>
END-of-opencm/Makefile
echo x - opencm/distinfo
sed 's/^X//' >opencm/distinfo << 'END-of-opencm/distinfo'
XMD5 (opencm-0.1.2alpha5pl2-1-src.tgz) = 3e8917d8cdbd78414d1045e9ad65c08b
END-of-opencm/distinfo
echo x - opencm/pkg-descr
sed 's/^X//' >opencm/pkg-descr << 'END-of-opencm/pkg-descr'
XWWW: http://opencm.org/
X
XOpenCM Feature Set
X
XHere is a quick list of key features of OpenCM.
X - For real configurations! It's just amazing what CVS doesn't know.
X - Ability to rename files without losing their history
X - Access controls on lines of development (branches).
X - Cryptographic authentication. This provides the ability to give
X developers accounts on the OpenCM repository without giving them
X an account on the underlying machine (OS), and makes
X multi-organization collaborations possible.
X - End-to-end integrity controls. If a server has a bad file, or a
X replicating server actively attempts to replace the proper content,
X the end user can detect the error or substitution.
X
XIn future releases (coming soon), OpenCM will provide:
X - Repository replication
X - Disconnected commits (ever screwed up a code base on an airplane or
X a vacation and wished you could back out?
X - Advisory access controls at the file level.
END-of-opencm/pkg-descr
echo x - opencm/pkg-install
sed 's/^X//' >opencm/pkg-install << 'END-of-opencm/pkg-install'
X#!/bin/sh
X#
X
Xif [ "$2" != "PRE-INSTALL" ]; then
X exit 0
Xfi
X
XUSER=opencm
XGROUP=${USER}
XUID=`pw nextuser | cut -f1 -d:`
XGID=`pw nextuser | cut -f2 -d:`
X
Xif ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
X if pw groupadd ${GROUP} -g ${GID}; then
X echo "Added group \"${GROUP}\"."
X else
X echo "Adding group \"${GROUP}\" failed..."
X exit 1
X fi
Xfi
X
Xif ! pw usershow "${USER}" 2>/dev/null 1>&2; then
X if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
X -s "/sbin/nologin" -d "/nonexistent" \
X -c "OpenCM Administrator"; \
X then
X echo "Added user \"${USER}\"."
X else
X echo "Adding user \"${USER}\" failed..."
X exit 1
X fi
Xfi
Xexit 0
END-of-opencm/pkg-install
echo x - opencm/pkg-plist
sed 's/^X//' >opencm/pkg-plist << 'END-of-opencm/pkg-plist'
X./info/opencm.info.gz
X./bin/cm
X./etc/rc.d/opencm.sh
X./share/opencm/help/add.help
X./share/opencm/help/adduser.help
X./share/opencm/help/bind.help
X./share/opencm/help/checkout.help
X./share/opencm/help/commit.help
X./share/opencm/help/create-branch.help
X./share/opencm/help/create-group.help
X./share/opencm/help/create-project.help
X./share/opencm/help/create-repository.help
X./share/opencm/help/create-user.help
X./share/opencm/help/diff.help
X./share/opencm/help/gadd.help
X./share/opencm/help/gremove.help
X./share/opencm/help/import.help
X./share/opencm/help/log.help
X./share/opencm/help/logmail.help
X./share/opencm/help/ls.help
X./share/opencm/help/merge.help
X./share/opencm/help/mkdir.help
X./share/opencm/help/mv.help
X./share/opencm/help/note.help
X./share/opencm/help/rm.help
X./share/opencm/help/notes.help
X./share/opencm/help/opt-basic.help
X./share/opencm/help/opt-debugging.help
X./share/opencm/help/opt-obscure.help
X./share/opencm/help/opt-server.help
X./share/opencm/help/rebind.help
X./share/opencm/help/revert.help
X./share/opencm/help/revoke.help
X./share/opencm/help/server.help
X./share/opencm/help/set-description.help
X./share/opencm/help/set-group.help
X./share/opencm/help/set-name.help
X./share/opencm/help/set-user.help
X./share/opencm/help/set-userkey.help
X./share/opencm/help/set-ws-repos.help
X./share/opencm/help/set-ws-user.help
X./share/opencm/help/show-ws-repos.help
X./share/opencm/help/show-ws-user.help
X./share/opencm/help/status.help
X./share/opencm/help/tag.help
X./share/opencm/help/unbind.help
X./share/opencm/help/update.help
X./share/opencm/help/upgrade.help
X./share/opencm/help/version.help
X./share/opencm/help/whoami.help
X./share/opencm/tools/cvsconvert.py
X./share/opencm/tools/rcsparse.py
X at dirrm ./share/opencm/help
X at dirrm ./share/opencm/tools
X at dirrm ./share/opencm/
END-of-opencm/pkg-plist
echo c - opencm/files
mkdir -p opencm/files > /dev/null 2>&1
echo x - opencm/files/opencm.sh
sed 's/^X//' >opencm/files/opencm.sh << 'END-of-opencm/files/opencm.sh'
X#!/bin/sh
X
XHOME=/usr/local/etc/opencm; export HOME;
XPREFIX=%%PREFIX%%
X. ${PREFIX}/etc/opencm/opencm.conf
X
Xcase "$1" in
Xstart)
X [ -x ${PREFIX}/bin/cm ] && \
X su -m opencm -c "${PREFIX}/bin/cm --logdir '${OPENCM_LOGDIR}' --notify '${OPENCM_NOTIFY}' server '${OPENCM_REPOSITORY}'" > /dev/null && echo -n ' opencm'
X ;;
Xstop)
X su -m opencm -c "kill -TERM -1" > /dev/null && echo -n ' opencm'
X ;;
X*)
X echo "Usage: `basename $0` {start|stop}" >&2
X ;;
Xesac
X
Xexit 0
END-of-opencm/files/opencm.sh
echo x - opencm/files/patch-aa
sed 's/^X//' >opencm/files/patch-aa << 'END-of-opencm/files/patch-aa'
X--- aclocal.m4 Tue Apr 22 06:59:16 2003
X+++ aclocal.m4 Sat Apr 26 18:17:34 2003
X@@ -119,6 +119,4 @@
X AC_DEFINE(HAVE_KERBEROS, 1,
X [Define if you have the Kerberos libraries])
X- else
X- AC_MSG_ERROR([You must have Kerberos installed to use OpenCM])
X fi
X ])dnl
END-of-opencm/files/patch-aa
echo c - opencm/scripts
mkdir -p opencm/scripts > /dev/null 2>&1
echo x - opencm/scripts/create_repository.sh
sed 's/^X//' >opencm/scripts/create_repository.sh << 'END-of-opencm/scripts/create_repository.sh'
X#!/bin/sh
X
XHOME=${PREFIX}/etc/opencm; export HOME;
X
Xif [ ! -e ${PREFIX}/etc/opencm/.opencm/users/admin.pem ]; then
X su -m opencm -c "cd ${PREFIX}/etc/opencm && cm create user admin"
Xfi
X
Xif [ ! -d ${REPOSITORY} ]; then
X mkdir ${REPOSITORY} && \
X chown opencm ${REPOSITORY} && \
X su -m opencm -c "cm create repository ${REPOSITORY} gzfs ${PREFIX}/etc/opencm/.opencm/users/admin.pem"
Xfi
END-of-opencm/scripts/create_repository.sh
exit
--- opencm.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list