From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:700:3204::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id iLBrEDnelGW6iQAAkFu2QA (envelope-from ) for ; Wed, 03 Jan 2024 05:10:33 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id uNBBCDnelGUFDQEAe85BDQ (envelope-from ) for ; Wed, 03 Jan 2024 05:10:33 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=riseup.net header.s=squak header.b=m+n8mwO+; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704255032; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=puqDDNz53jtFTPGJRaLxkrmVxvuDOTXdQhPuDE8W4m8=; b=nRFKhjpYvtcVLsHxaSF09nWoJC60lzmfDzdqHaRwjMnfsnu+an7+IJ7ZoJjVOJu77SVGpY 0eiu5GAjw21Wh5SRGNaXuoFRjaBF34+KrIWc+Nfxh2m2BZp7KPKVRgFsZ5lyGyMnKPXiMo CAtL7u53YIN4x/WbWv1rT23jXywHhW+krn08Rm4/3Vk7zi+2zJXBfYrH6rKnT+L4qD9s9U +C5WDv4yU/L6Ep8BEYZAcEKFzCF3eFUVaWKFi1y92oV+jB8AJ22UemCPEx8Z6NOilq1ES9 cFY/SLcgbgnUzEIZGiwYXEtUjNNJgMVizo2amlhdr11ppuvKfdoARS2lhsuF6g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704255032; a=rsa-sha256; cv=none; b=kx3RM6GAHVwGRADaFSxZB9LubzRF8T5pZbcREE2csM7ts7LAmuwJ9Y+U6hnUMCcZmyFUGE driGJ6CS36DmFR2ZoTx11fJTZRuc86SzP7AfWZfbnXZi+qUMJbAgol5HWC75RMSdp7C5fz 4G5Df7iIf/JwgVoLcgj0sr3BXk95QZzZpCzS8gGWM7xw+OmkcBfDyqgK5RPAqwbn5xQF0p sS0ozRpudQm5YD3gghnz1AcXfcZB28T3ei7nE6OrGNbRHDhZ16pGK75wmVyP5A7q0Ltou/ LN4/Gf9gULO6pDx3sgIMlOh+wqF+QmVzXWKkA8ZMrZ/JzpgESBy/4eKNAelxzA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=riseup.net header.s=squak header.b=m+n8mwO+; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 889E3158E9 for ; Wed, 3 Jan 2024 05:10:32 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKsaH-0002wv-Jw; Tue, 02 Jan 2024 23:10:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rKsaG-0002wi-0v for help-guix@gnu.org; Tue, 02 Jan 2024 23:10:24 -0500 Received: from mx1.riseup.net ([198.252.153.129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rKsaB-0000ID-Jh for help-guix@gnu.org; Tue, 02 Jan 2024 23:10:23 -0500 Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4T4bpx2l40zDqCy; Wed, 3 Jan 2024 04:10:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1704255017; bh=C+m0d+lBdn1jjSqZSavzNAMHuFIBdYrbnYI+KAmMALs=; h=From:To:Cc:Subject:Date:References:In-reply-to:From; b=m+n8mwO+iD0TO6UY+pJ48rAs3Aic2ikTi9RQwRF/gMiZ5HMeo/dobVUsdran3RC/S py9sTx3TCgIR2G9760sodv/dZTfw+sYh3QWlqXGnWtUEZK4ZIvl3zAcBTmyUUZVceN mWA46K/qtGq3pehBT4Elx7U5FiY4NKv0wK2ctdLY= X-Riseup-User-ID: C63DC778827F7BDE93A2A62FAB18B68EB9470BA5B0F9119CBC5E3A759C731FA3 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4T4bpw4fFTzJn9h; Wed, 3 Jan 2024 04:10:16 +0000 (UTC) From: Csepp To: Steve George Cc: help-guix@gnu.org Subject: Re: Setting package name/version using package transformations Date: Wed, 03 Jan 2024 04:57:56 +0100 References: In-reply-to: Message-ID: <86jzorf464.fsf@riseup.net> MIME-Version: 1.0 Received-SPF: pass client-ip=198.252.153.129; envelope-from=raingloom@riseup.net; helo=mx1.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.26 X-Spam-Score: -5.26 X-Migadu-Queue-Id: 889E3158E9 X-Migadu-Scanner: mx11.migadu.com X-TUID: kkQzBhLLHUnj Steve George writes: > Hi, > > I=E2=80=99m exploring creating =E2=80=99package variants=E2=80=99 through= the =E2=80=99package transformation=E2=80=99 options to guix build [0] > > I can=E2=80=99t figure out how to build a package variant and give it a d= ifferent name > > The most common sort of =E2=80=99package variant=E2=80=99 I can imagine i= s where the user wants a different (later) version of the source than is av= ailable in Guix. An example is Calcurse where Guix=E2=80=99s archive has 4.= 5.1 and upstream has 4.8.1. I can use the =E2=80=93with-source package tran= sformation to build the later version from the upstream source location: > > $ guix shell =E2=80=93container =E2=80=93nesting =E2=80=93network =E2= =80=93development calcurse =E2=80=93no-grafts nss-certs > [env]$ guix build calcurse =E2=80=93with-source=3D =E2=80=93no-substitutes =E2=80=93no-grafts > > This will create a calcurse package which I can install and it contains c= alcurse 4.8.1 > > $ guix package =E2=80=93list-installed > calcurse 4.8.1 out /gnu/store/af4nwvbcd8rbix4vcvamblmbf3= ns9wsz-calcurse-4.8.1 > > Maybe it=E2=80=99s due to my previous Linux experiences, but the next thi= ng I wanted to do was give the package a different name and/or different ve= rsion number so I would know it was a local build. In Debian/Ubuntu I would= have named the package -futurile and probably given it a differe= nt version number so I could control when it was upgraded. I cannot figure = out how to do either of these using a package transformation, rather than d= efining my own package file etc. > > 1. Can a package be given a different name with a transformation? Not as far as I know. > Manual says =E2=80=93with-source=3Dpackage=3Dsource, I tried: > > # nope - unknown package calcurse-futurile > guix build calcurse-futurile =E2=80=93with-source=3Dcalcurse=3D =E2=80=93no-substitutes =E2=80= =93no-grafts > > # kinda works > guix build calcurse =E2=80=93with-source=3Dcalcurse-futurile=3D =E2=80=93no-substitutes =E2=80= =93no-grafts > > The second builds the =E2=80=99calcurse=E2=80=99 package, but it no longe= r uses the updated source (so I get v4.5.1). I can guess that this is becau= se it has to be a valid package name from the archive and calcurse-futurile= isn=E2=80=99t one. That=E2=80=99s correct. The transformation can act on packages other than = the build target, which is why you need to name what package (and optionall= y what version of that package) you are attempting to transform. For example I might want to run: guix build =E2=80=93with-latest=3Dffmpeg vlc That would build VLC with the latest ffmpeg everywhere in the dependency tr= ee. > 2. Can a package be given a different version number with a transformatio= n? > I can give a package a different version number, but the field is constra= ined. There=E2=80=99s no way to use characters other than hypen and dot, so= you can=E2=80=99t use tilde or full colon for example. > > # this works > guix build calcurse =E2=80=93with-source=3Dcalcurse@5.4.8.1=3D =E2=80=93no-substitutes =E2=80= =93no-grafts > > # not allowed colons or tilde in the field so no =E2=80=99epoch=E2=80= =99 ala Debian > # it breaks the if you have anything other than .xx.xxx > guix build calcurse =E2=80=93with-source=3Dcalcurse@5:4.8.1 > guix build calcurse =E2=80=93with-source=3Dcalcurse@4.8.1~futurile > > I eventually found a way to to change the package name, byt giving a name= as part of the version: > > # this seems to change the package name? > guix build calcurse =E2=80=93with-source=3Dcalcurse@futurile-0.1=3D =E2=80=93no-substitutes = =E2=80=93no-grafts > > guix package =E2=80=93list-installed > calcurse-futurile 0.1 out /gnu/store/40bprd6gvwf94x42fx= dlf739y55p7xip-calcurse-futurile-0.1 > > This seems to take the first part of the name after the @, up to a hyphen= and make it part of the package name. I=E2=80=99m a bit confused about why= this works. The manual says =E2=80=93with-source=3Dpackage@version=3Dsourc= e, but this seems to be package@custom_name-version=3Dsource - I guess I do= n=E2=80=99t understand the formats of the =E2=80=93with-source field? > > Maybe I have a misunderstanding of the scope of usage for =E2=80=99packag= e transformations=E2=80=99 in the cli - am I twisting it to do something th= at it shouldn=E2=80=99t be? > > Thanks, > > Futurile > > [0] I think you are only changing the version field in this case I=E2=80=99m not sure if what you are trying to accomplis is actually needed= . If you are worried about accidentally upgrading the transformed package,= take a look at the output of guix package =E2=80=93export-manifest.