From owner-freebsd-pkg@freebsd.org Wed Oct 14 21:56:20 2015 Return-Path: Delivered-To: freebsd-pkg@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CB83A1226C for ; Wed, 14 Oct 2015 21:56:20 +0000 (UTC) (envelope-from isoa@kapsi.fi) Received: from mail.kapsi.fi (mx1.kapsi.fi [IPv6:2001:1bc8:1004::1:25]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5CBBCB; Wed, 14 Oct 2015 21:56:19 +0000 (UTC) (envelope-from isoa@kapsi.fi) Received: from karviainen.kapsi.fi ([217.30.184.182] helo=roundcube.kapsi.fi) by mail.kapsi.fi with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ZmU1u-0006RE-Se; Thu, 15 Oct 2015 00:56:16 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 15 Oct 2015 00:56:14 +0300 From: Arto Pekkanen To: Baptiste Daroussin Cc: vmunix.old@gmail.com, freebsd-pkg@freebsd.org In-Reply-To: <20151014184449.GM55137@ivaldir.etoilebsd.net> References: <20151014184449.GM55137@ivaldir.etoilebsd.net> Message-ID: <6448fb53ff5e03747dfee109a67770f8@kapsi.fi> X-Sender: isoa@kapsi.fi User-Agent: RoundCube Webmail/0.9.4 X-SA-Exim-Connect-IP: 217.30.184.182 X-SA-Exim-Mail-From: isoa@kapsi.fi X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 Subject: Re: locked packages got upgraded anyway X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mail.kapsi.fi) X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 21:56:20 -0000 In my opinion the best solution would be to write a separate program that would enable one to create a local repository so that only those ports that have custom options will be built, other packages would be included verbatim from base repository. However, such a program would require some way of knowing the revision number or date of revision of the ports tree used to create the base repository. One could try parsing the "start time" tags from http://pkg-status.freebsd.org, that would kind of work (not perfectly though). Parsing start of build timestamp is kinda ugly, and there is no guarantee that the start time of a repository build is exactly the same as the date of revision the ports tree from which the repository was created. Other solution would be to create a plugin for pkg. It would detect if a user has set custom port options for the package currently being installed, and would instead call "make package" on the port and install the built package. However, this might be tricky, since pkg must resolve dependencies before any package will be installed. Thus hooking the installation event for a node would not work. One would have to be able to hook the actual dependency caching event for a node, decide whether to install from repo or install from ports, and dispatch the dependencies of the node back to the resolver. I have some ideas on how to create a repository mixer, as described as the first solution. I was going to create such a software for my own use, but I never finished because of irl stuff. Baptiste Daroussin kirjoitti 14.10.2015 21:44: > On Wed, Oct 14, 2015 at 08:24:01PM +0200, vmunix.old@gmail.com wrote: >> * Mark Felder wrote: >> > >> > >> > On Tue, Oct 13, 2015, at 17:42, Rainer Duffner wrote: >> >> >> >> > Am 14.10.2015 um 00:31 schrieb Benjamin Connelly : >> >> > >> >> > We have a few ports we compile with different compile time options than the FreeBSD binary repo, so we keep them locked. Last night when doing some patching, we saw those locked packages get updated anyhow. For example, pkg said all of these things on one system: >> >> > >> >> >> >> >> >> IMO, you either compile all of the packages you use yourself - or none. >> >> >> >> Until FreeBSD gets a sort of „stable“ ports-tree that lives for longer >> >> than three months, running your own repo is almost a must for anything >> >> even semi mission-critical. >> >> >> > >> > He has a valid use case and I don't know why it was upgraded. Sounds >> > like a bug. Perhaps because it was a dependency? Hmm... >> > >> > A planned* feature is for a user to be permitted to have packages with >> > custom build options and "pkg upgrade" will handle fetching the required >> > parts of the ports tree and building the updated package so you don't >> > have to play this "lock your package, manually upgrade it later" game. >> > Not everyone should be forced to run poudriere just so they can change >> > one option on one package... >> > >> > * Planned as in "bapt or someone said we should do this when we have >> > time" >> >> Are there any plans to introduce sub-packages or "flavors"? Because >> that >> would solve the issue of having to fiddle with Poudriere in order to >> build >> packages with more options enabled once and for all for probably 99% >> of >> all users. > > Yes there are plan for all of this but it takes a lot of time and we > have very > little manpower. > > Best regards, > Bapt -- Arto Pekkanen