From owner-freebsd-ports@FreeBSD.ORG Wed Sep 3 09:09:48 2014 Return-Path: Delivered-To: freebsd-ports@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 748AD1CE for ; Wed, 3 Sep 2014 09:09:48 +0000 (UTC) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "ca.infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F3D1D179D for ; Wed, 3 Sep 2014 09:09:47 +0000 (UTC) Received: from ox-dell39.ox.adestra.com (no-reverse-dns.metronet-uk.com [85.199.232.226] (may be forged)) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.9/8.14.9) with ESMTP id s8399fEr056869 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Wed, 3 Sep 2014 10:09:41 +0100 (BST) (envelope-from matthew@freebsd.org) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=freebsd.org DKIM-Filter: OpenDKIM Filter v2.9.2 smtp.infracaninophile.co.uk s8399fEr056869 Authentication-Results: smtp.infracaninophile.co.uk/s8399fEr056869; dkim=none reason="no signature"; dkim-adsp=none; dkim-atps=neutral X-Authentication-Warning: lucid-nonsense.infracaninophile.co.uk: Host no-reverse-dns.metronet-uk.com [85.199.232.226] (may be forged) claimed to be ox-dell39.ox.adestra.com Message-ID: <5406DACD.3080601@freebsd.org> Date: Wed, 03 Sep 2014 10:09:33 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: freebsd-ports@freebsd.org Subject: Re: [BRAINSTORMING] simplifying maintainer's life References: <20140903082538.GE63085@ivaldir.etoilebsd.net> In-Reply-To: <20140903082538.GE63085@ivaldir.etoilebsd.net> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Cjk6hWHkK1feCjuXj8ibNRAKtxQTaDpac" X-Virus-Scanned: clamav-milter 0.98.4 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,RDNS_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 09:09:48 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Cjk6hWHkK1feCjuXj8ibNRAKtxQTaDpac Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/03/14 09:25, Baptiste Daroussin wrote: > Hi all, >=20 > On of the most borring thing IMHO in the plist maintainance is all the > directories. >=20 > I have been working on some evolutions I want to share and discuss befo= re making > them official. >=20 > First you have to know that since pkg 1.3 @dirrm and @dirrmtry are equi= valent. >=20 > Evolutions: > 1/ stop prepending directories in plist with @dir*: let pkg discover th= e path > correspond to a directory and handle it as such (easy) Presumably if you need an empty directory, just add it to the plist. > 2/ make pkg automatically remove directories under PREFIX without the n= eed of > adding them in plist, such as only empty directories and directories no= t under > PREFIX will have to be listed. Of course pkg will not try to remove dir= ectories > owned by another package. There should be some concept of shared use directories, so eg. if package foo installs /usr/local/foobar/foo and then later package bar installs /usr/local/foobar/bar. Should you then delete package foo, package bar should inherit ownership of /usr/local/foobar/ For a real example of this consider eg. p5-DBD-Pg and p5-DBD-Sqlite. Probably we can just say directory /usr/local/foobar belongs to both packages foo and bar, and it only gets deleted when the last owner is removed and if it is empty. Needs more thought though. What happens if two packages disagree about ownership and permissions on a common directory? I guess that should just be treated like a conflicting file, and block installation of the second package. > To achieve the point 2 that will mean we will stop using the mtree insi= de > packages and create a "hier" package that will have the default hierarc= hy and > every package but pkg will depend on this hier package (except if PREFI= X !=3D > LOCALBASE) And if you follow the shared ownership idea to its logical conclusion, /usr/local/bin, /usr/local/man and /usr/local/share end up with shared ownership by almost every package you have installed. Would you actually need to have a hier package at all? Although having one would still be a good idea IMHO. > 2 bonus of this approach: > - it will speed up pkg operation by avoiding to have to extract the mtr= ee for > each package installation > - it will simplify a lot check-plist >=20 > Any opinion here? Having both mtree and the package manifest both providing very similar functionality is somewhat redundant. Cheers, Matthew --Cjk6hWHkK1feCjuXj8ibNRAKtxQTaDpac Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJUBtrVXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxOUYxNTRFQ0JGMTEyRTUwNTQ0RTNGMzAw MDUxM0YxMEUwQTlFNEU3AAoJEABRPxDgqeTnmVoP/07JVzg4OXReQWoahEMZcPwf uI3uNtRr84hQplxKtMdSgdrXB0BfCazlb3gJPVwWRqoCqgNUqFngs6WIbikyQDH8 xZl0F6RqybC5/B2iwCo42voZaSJmzA8OyL9ziiHVt3o0bTfYxI6rV4ZsXsJ0oM8P wKu7cJ33V0TL2kuvI/6QnNYy3psrQtXccWbB4ec8lOPZXyBY0476/oEah7RAg5M+ fBdME/kB0k910jshwFhouwri5ejDyKGOjHILv1lAiDM/KumMzU09AsvQZLfTtU1B n+1CqyasMNZmaXMYaqI6lG1NKSrDF9BnH74hisqooUSJ9mKwYZo5mS0yGQTHfFJQ KDFReHL5g1O4oX0y4tz9v8svUmj/UyS1hV28jhXebRQ8v0+VAF3tv0MUAtXMPenE b13NgUiwRZ21UfYX/FotKmzXmwkbIpDAYfclty0WCPai2TAmqM8McrxcwuLo3bKK R1VNtYk4rYAIxX/uYUjpfOoFy8NzdV1xuMVLHMxghVUdLytOPjX15DBpWgcrKdxl q1Jmu2zOO0KlaQ2V5ws6KVMQf+3O9eBDCiSMJjQiqGG1XZVpN3HHLU35u8+/FumU SdywGOLf8TuZhLq15UCAQMRVmJcYOQK9Q0fI/SoKlxeKi9924WdYnklhlCBPk3AH ez7GN9fODX4JHgKVxgyL =NKDQ -----END PGP SIGNATURE----- --Cjk6hWHkK1feCjuXj8ibNRAKtxQTaDpac--