From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: Making local development easy Date: Wed, 25 May 2016 12:13:42 -0400 Message-ID: <20160525161342.GA19331@jasmine> References: <57449CA9.3040502@cbaines.net> <87h9dmtukn.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5bRR-0002MC-QU for guix-devel@gnu.org; Wed, 25 May 2016 12:13:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5bRN-0005FZ-Gm for guix-devel@gnu.org; Wed, 25 May 2016 12:13:52 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:43415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5bRN-0005F3-AH for guix-devel@gnu.org; Wed, 25 May 2016 12:13:49 -0400 Content-Disposition: inline In-Reply-To: <87h9dmtukn.fsf@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Alex Sassmannshausen Cc: guix-devel@gnu.org On Wed, May 25, 2016 at 10:23:20AM +0200, Alex Sassmannshausen wrote: > Christopher Baines writes: > > The first, is that the hash is required, which I only had to compute > > once, but if I wanted to change the package, I would have to update > > this, which is prohibitive to local development. As an improvement to > > this, could the hash be optional, and if it does not exist, be > > calculated when the build is performed? > > From my perspective, I think silently calculating a hash on the fly if > it is not provided would be problematic: it might lead to laziness in > completing the hash, which would undermine the security model of Guix > (if I understand correctly). > > But maybe an explicit flag setting the declaration to "dev-mode", might > be useful? Perhaps I'm too paranoid, but I'd rather not see this implemented in Guix. It would create the necessary elements for a "downgrade attack" [0], where an attacker exploits some bug to enable the "dev-mode" when the user doesn't intend it. Why not write an external script that will recalculate the hash and rewrite the package definition for you?