From owner-freebsd-ports@FreeBSD.ORG Thu Dec 15 21:06:05 2011 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AD8D1065675 for ; Thu, 15 Dec 2011 21:06:05 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 070918FC08; Thu, 15 Dec 2011 21:06:05 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pBFL64un098249; Thu, 15 Dec 2011 21:06:04 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pBFL643F098248; Thu, 15 Dec 2011 21:06:04 GMT (envelope-from bapt@FreeBSD.org) X-Authentication-Warning: freefall.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f Date: Thu, 15 Dec 2011 22:06:01 +0100 From: Baptiste Daroussin To: Mehmet Erol Sanliturk Message-ID: <20111215210600.GA61709@azathoth.lan> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: FreeBSD Ports List Subject: Re: Global and User package database X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2011 21:06:05 -0000 --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 15, 2011 at 02:10:57PM -0500, Mehmet Erol Sanliturk wrote: > Dear All , >=20 >=20 > In the new PkgNG : >=20 > https://github.com/pkgng/pkgng/blob/master/pkg/add.c >=20 >=20 > the following statement is written : >=20 > if (geteuid() !=3D 0) { > warnx("adding packages can only be done as root"); > return (EX_NOPERM); > } >=20 >=20 > Instead of the above statement , is it possible to use a statement > as follows ( which it may be defined as a function to be called from all > the related > functions / programs ) : >=20 >=20 >=20 > if (geteuid() =3D=3D 0) { >=20 > package_db_path =3D ... global path name ... , etc. ; >=20 >=20 > PKGDB_PLACE =3D PKGDB_DEFAULT ... etc. >=20 >=20 > } else > { >=20 >=20 > package_db_path =3D ... local path name , ie. > in $HOME about user path name ... , etc. ; >=20 > PKGDB_PLACE =3D PKGDB_USER ... etc. >=20 > } >=20 > if (pkgdb_open(&db, PKGDB_PLACE) !=3D EPKG_OK) { > return (EX_IOERR); > } >=20 >=20 > ( Replace PKGDB_PLACE by a suitable name ... ) >=20 >=20 > In that way , it will be possible to install packages into user home > directory , > instead of global package directory . >=20 > For security concerns , user-installed packages will not be usable global= ly > , or > convenient only for the user . >=20 >=20 >=20 > Thank you very much . >=20 > Mehmet Erol Sanliturk This is an interesting idea, but it deserves more thinking about it, becaus= e it could have more impacts. Could you please fill an issue on the github so that we won't forget the id= ea and will be able to discuss it. I don't think we will propose that feature for 1.0 but maybe it could be discussed for 2.0 :) regards, Bapt --/04w6evG8XlLl3ft Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk7qYTgACgkQ8kTtMUmk6EyoZwCgufXfYB5wg564BcjVzAlm+E0S rCMAn1IluFDQ0I6HJDJlbL9pWDwE8lDk =ECbh -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft--