From owner-freebsd-questions@FreeBSD.ORG Wed Mar 14 11:24:39 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9A12106564A for ; Wed, 14 Mar 2012 11:24:39 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 502148FC0A for ; Wed, 14 Mar 2012 11:24:39 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [IPv6:2001:8b0:151:1:fa1e:dfff:feda:c0bb]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q2EBOZrt058167 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Wed, 14 Mar 2012 11:24:35 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: OpenDKIM Filter v2.5.0 smtp.infracaninophile.co.uk q2EBOZrt058167 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1331724275; bh=gFpkIjLXV2UZ3CfrK5Rs+RKpWtjtRyDkpwjakEnqSJ8=; h=Date:From:To:Subject:References:In-Reply-To:Cc:Content-Type: Message-ID:Mime-Version; b=njTiNbE7Y+n/EXXqBIuLMn/I8/afCU+3YbBkiyu5oVZopgFgJw3i8GNr+7deKc9UO 3obE7kZ5AhJJOI1isyzJOa4pC1WVqkxjkzJLaOduz481zB1/L36F6DfkaBfA8uEbTF 1bMh1X1CZTchCJyl06G5w81lResJZ0pWW5kqpgmI= Message-ID: <4F607FF3.30309@infracaninophile.co.uk> Date: Wed, 14 Mar 2012 11:24:35 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20120313 Thunderbird/11.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <4F605307.8070907@infracaninophile.co.uk> <4F607327.7010209@herveybayaustralia.com.au> In-Reply-To: <4F607327.7010209@herveybayaustralia.com.au> X-Enigmail-Version: 1.4 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigEC88C0AF562E5794F166447A" X-Virus-Scanned: clamav-milter 0.97.3 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_ADSP_ALL,DKIM_SIGNED,T_DKIM_INVALID autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Subject: Re: start at boot, run as non-root X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2012 11:24:39 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigEC88C0AF562E5794F166447A Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 14/03/2012 10:29, Da Rock wrote: > On 03/14/12 18:12, Matthew Seaman wrote: >> On 14/03/2012 07:30, n dhert wrote: >>> I have FreeBSD8.2. >>> Sedna, an XML database server, had no port in th FreeBSD ports >>> collection >>> but has a binary compiled for FreeBSD8 on www.sedna.org. >>> I installed that. >>> To start it at boot I created a script /usr/local/etc/rc.d/sedna : >>> ----------------------------------------------- >>> #!/bin/sh >>> # >>> # PROVIDE: sedna >>> # REQUIRE: DAEMON >>> # KEYWORD: shutdown >>> # >>> . /etc/rc.subr >>> >>> name=3D"sedna" >>> rcvar=3D${name}_enable >>> command=3D/home/opt/sedna/bin/se_gov >>> >>> load_rc_config $name >>> >>> : ${sedna_enable=3D"NO"} >>> >>> run_rc_command "$1" >>> -------------------------------------------- >>> and added sedna_enable=3D"YES" at the end of my /etc/rc.conf >>> >>> This way it starts at boot: >>> $ ps -jaxww | grep se_ >>> root 7064 1 7064 7064 0 Is ?? 0:00.00 >>> /home/opt/sedna/bin/se_gov -background-mode off -listen-address >>> localhost >>> -port-number 5050 -ping-port-number 5151 -el-level 3 -alive-timeout 0= >>> -stack-depth 4000 >>> The deamon runs as root. I want it run by a non-root user, e.g. a use= r >>> 'sedna'' >>> >>> How can I do that? >>> >>> The sedna server binary se_gov has no option in its man-page to start= >>> the >>> program run as a different user .. >> Add a variable: >> >> ${name}_user=3Dsedna >> >> to the init script. The rc(8) system will use su(1) to start up the >> sedna process using your selected username. There's also ${name}_grou= p >> but that works a bit differently. >> >> I'm intrigued that this software should be supported on FreeBSD >> upstream, but not appear in ports. Are there some onerous license ter= ms >> or other obstacles[*]? If not, would you consider submitting your wor= k >> as a port? >> >> Cheers, >> >> Matthew >> >> [*] Seems it uses Apache licensing according to http://www.sedna.org/,= >> which is exceedingly FreeBSD compatible, so I don't think licensing >> would be an obstacle. > That would not be the problem, as the ports system can handle more > licenses than simply bsd compatible; Its merely recommended. To > illustrate, there are eval and commercial products in the ports tree. > You have to register and pay the organisation when you install and star= t > using (like komodo, others). The port is to ease installation on FreeBS= D > an app that would be widely used. Well, quite. Let me rephrase the question before everyone gets sidetracked into an interminable discussion of the horrible license terms they've been forced to endure. Is there any reason why sedna should not be added to the ports collection= ? I'm pretty certain the answer is "no" but having confirmation from someone who actually uses this software and knows a bit about it would be good. Having poked a bit at the sources, this looks like a pretty straightforward application to port -- it uses cmake(1) and there's plenty of both support for that and prior art to copy in the ports already. Would be a nice projectette for someone that wanted to get into porting. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enigEC88C0AF562E5794F166447A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk9gf/MACgkQ8Mjk52CukIyR7ACfWUFfrFPgt/A82drX9x3U9rma BuoAnilXgGog/UPG91KlwAeLG5tFlkvN =lBS5 -----END PGP SIGNATURE----- --------------enigEC88C0AF562E5794F166447A--