From owner-freebsd-ports@FreeBSD.ORG Wed Sep 3 09:23:37 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 DFF1A561; Wed, 3 Sep 2014 09:23:37 +0000 (UTC) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EB7F1953; Wed, 3 Sep 2014 09:23:37 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id l18so8048239wgh.34 for ; Wed, 03 Sep 2014 02:23:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=0PA5XENVTfNo+aNIFMQeOzhGt/6X0Y5FOjBIuUT5nNk=; b=gd6d8ficmlT9fz9UBqz0dlIzdBNOGikxFbyBVzgBaagY8walgQVf/lvXXX8/ANOSAU jRiPPtpMVA+a6mfzAb1MZUd87qC2NL3DwE72Na+VXH7AjUW3dayuOCXL9NgYV0Ynxv97 8shbY6JT9SR9vhFUC5i9NpVivMNLdyVkSNcf8gVXVXvc2dfXQl0lwLIHWfgwpXqBjbsI jlz3B/hr5XjoZuFClSg3n8eXa/AoGk9V2uF+sOkTHz10vg/xUtDv0G4VMPPEFx8e+nSf Fkco/JkmMSWhXL7nSK/apxXSFavmD6VmBnxiooOv6RnvTQodLnYXhKLf1lnnuJ7Dqg2r IF0Q== X-Received: by 10.195.17.170 with SMTP id gf10mr1662358wjd.111.1409736215292; Wed, 03 Sep 2014 02:23:35 -0700 (PDT) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id lu12sm3485106wic.4.2014.09.03.02.23.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Sep 2014 02:23:34 -0700 (PDT) Sender: Baptiste Daroussin Date: Wed, 3 Sep 2014 11:23:32 +0200 From: Baptiste Daroussin To: Matthew Seaman Subject: Re: [BRAINSTORMING] simplifying maintainer's life Message-ID: <20140903092332.GF63085@ivaldir.etoilebsd.net> References: <20140903082538.GE63085@ivaldir.etoilebsd.net> <5406DACD.3080601@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aZoGpuMECXJckB41" Content-Disposition: inline In-Reply-To: <5406DACD.3080601@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-ports@freebsd.org 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:23:38 -0000 --aZoGpuMECXJckB41 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 03, 2014 at 10:09:33AM +0100, Matthew Seaman wrote: > 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) >=20 > Presumably if you need an empty directory, just add it to the plist. Yup >=20 > > 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. >=20 > 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/ >=20 > For a real example of this consider eg. p5-DBD-Pg and p5-DBD-Sqlite. >=20 > 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. That is what I was trying to explain :) >=20 > 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. Right now we have no way to handle this in pkg(8) but that could be added l= ater >=20 > > 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) >=20 > 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. hier also defined /usr/local/etc/libmap.d or /usr/local/etc/rc.conf.d :) >=20 > > 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? >=20 > Having both mtree and the package manifest both providing very similar > functionality is somewhat redundant. The mtree will be not packaged at all anymore. regards, Bapt --aZoGpuMECXJckB41 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlQG3hQACgkQ8kTtMUmk6EzovQCdELYZ5B8JVe3jllql12/etjRE XpcAn14WzXNtiys23+DntZRYmC67tdDS =hmqj -----END PGP SIGNATURE----- --aZoGpuMECXJckB41--