From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 2PXAL8RwRmQBrgAASxT56A (envelope-from ) for ; Mon, 24 Apr 2023 14:06:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qJV+L8RwRmR65gAAauVa8A (envelope-from ) for ; Mon, 24 Apr 2023 14:06:28 +0200 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 55D0216C55 for ; Mon, 24 Apr 2023 14:06:28 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pquxH-0003h0-0O; Mon, 24 Apr 2023 08:06:03 -0400 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 1pquxE-0003gs-8u for help-guix@gnu.org; Mon, 24 Apr 2023 08:06:00 -0400 Received: from koszko.org ([93.95.227.159]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pquxB-0007S7-Qk for help-guix@gnu.org; Mon, 24 Apr 2023 08:06:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=koszko.org; s=mail; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=UeQrh7FuJ6590P/sfSCgqIPp+YnVKttcQQQhhw3oh6k=; b=bdRKfvcZrUH8lfner8S75jLwMY VLoqxApXSkmAHUsTODzGFZtDLv8XYGnRnG5RhamMD6MALy24juKl2362nEvYb7LmtdfHvuW80IsTb 9vGiciHCT08X/cll7ojh8fN4Re/OVkq5otzbFST052gO3Y1DLIq2juRZ6c+dHaxC8Bof1nSQ4L37U Nuk6bh2cq6v3hTXe/uxss50hK2Yy3aEJ3auPTp8kGsLQaYmMLl3Hcvg1ezmGfKcdZvly+TZtAJkIS RiOG4SXfY9FFO8KAICHoZ8cyIhauqnHM4jjDPQFrz/nybXVZICL1sywEhuxxAq3AvHAN8CYSJCCjz T/C8ul359dZeZUKmgYowjZZ2cvx37U/7470SV1fbLgspOkEhRZ9ULr3C1hbQEwdvnlI2vEcb8+A5u 1d/esmcrHhwY7vcDkuhsfwp4vRLMTLgiFCvqxJjZwSWNSX8ZVCe5LvzU8BCnkreLEjYtpQhGrea8V nWF1xFdkkWRic3gO+7SfShKTdiWfdTWyneU1t9uN80oQKQK1ri/1AwncZCAADWs9d0PS1y4p29PT8 KmKdqQCCDs/7nyPOGG+O6hiZg4OfCiocztvRX6dAmSpZGxKA/BSZZuNdnamBw/rKWegQ+ApirrPMy KmfJtzluQ67dwgG7O6x+y5D50s1pYlO5qRHjB7iOo=; Received: from [77.252.47.194] (helo=koszkonutek-tmp.pl.eu.org) by koszko.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pqux4-00034R-ND; Mon, 24 Apr 2023 14:05:50 +0200 Date: Mon, 24 Apr 2023 14:05:48 +0200 To: Gottfried Cc: Gary Johnson , help-guix@gnu.org Subject: Re: update-profiles.sh Message-ID: <20230424140548.41fb9f7b.koszko@koszko.org> In-Reply-To: References: X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/lit5eK/eyRRbr8OHd1OD7=c"; protocol="application/pgp-signature"; micalg=pgp-sha256 Received-SPF: pass client-ip=93.95.227.159; envelope-from=koszko@koszko.org; helo=koszko.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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 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: , Reply-to: Wojtek Kosior From: Wojtek Kosior via 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682337988; a=rsa-sha256; cv=none; b=hc+RabZGslkwoxmkJRdgplGPCIpQZLbcEvPtkwHzjngKd6AWMfho85GouIl5TeO/WPOvyF xwhSkxiRN9wE1uL+KLgvmqwafTXmZoCDbNj0cRuKi8ksOLa5STapunExj61QpfaY/SpeLx wEipRRh/y3cMOM5T28gPf9kw1VJ5Fzo45b5KEt6pCD/4cHBQSw6WP0J4kSV5/oFqXfNsAy g1xiSULat/sHHOjB+QAdJWU81KzSSuZeYKb/f3nj3c5N0VDHdlLwlnV0HtCgCy5qTEqZkc JPiS36H32T53aeek4dFh/1ukiuV0gbXX2jgrxzD2F91Ea8OSAMz+exr08+ONZA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=bdRKfvcZ; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682337988; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=UeQrh7FuJ6590P/sfSCgqIPp+YnVKttcQQQhhw3oh6k=; b=qVslNIrOvWfu0IYVdYoc0jnDtcpLzQbrkBiryAEJ2uwXu/NAESG2gDTP5rfsicO+mulKjf r6YYIU4qH/LpM/Wc4ey2g1NGLyfUllca5BtakTh2c2JePSdjG0K7tlUBmDD9aWDEF3ac2H o5Rkzo4m3yIu2SjCAa4o22gjHnr+x81NyabnxmGp4rpHeGvgjsQ9QKUzu/5QpALu3xKH3T 4lpQBwt6/bcAjbZXBdR0J9dmdMzsi/dUet5H4hsb9GeJsZmFrNHWAo7jXKtPAJACV3LIi9 JHe+wqiRc4EddcltOMvHp9KnsOL0NR01hmtijT0UaScAxQ8cR1xq3ZIGSQrSIw== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=bdRKfvcZ; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -5.61 X-Spam-Score: -5.61 X-Migadu-Queue-Id: 55D0216C55 X-TUID: OwRKy0mj2VI2 --Sig_/lit5eK/eyRRbr8OHd1OD7=c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Gottfried, I see several problems with `update-profiles.sh`. - You wrote `GUIX_PROFILES=3Dhome/gfp/Projekte`, without leading slash. This makes the shell treat this path as a relative one. You need to use either `/home/gfp/Projekte` or just '$HOME/Projekte'. - This script assumes manifests to be stored in a completely different place than they really are in your case. - There's no need to `unset` the loop variables at every iteration. At least as long as this script is executed and not sourced. I'm mentioning this although a few extraneous `unset`s are not going to cause problems. Don't worry too much about this. I edited the script. Try with this version ``` #!/bin/sh GUIX_PROFILES=3D$HOME/Projekte for dir in $GUIX_PROFILES/* do name=3D$(basename "$dir" | tr '[:upper:]' '[:lower:]') manifest=3D"$dir"/$name.scm profile=3D$dir/$name if [ -r $manifest ] then guix package --manifest=3D"$manifest" --profile=3D"$profile" fi done ``` -- (sig_start) website: https://koszko.org/koszko.html PGP: https://koszko.org/key.gpg fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A =E2=99=A5 R29kIGlzIHRoZXJlIGFuZCBsb3ZlcyBtZQ=3D=3D | =C3=B7 c2luIHNlcGFyYXR= lZCBtZSBmcm9tIEhpbQ=3D=3D =E2=9C=9D YnV0IEplc3VzIGRpZWQgdG8gc2F2ZSBtZQ=3D=3D | ? U2hhbGwgSSBiZWNvbWUg= SGlzIGZyaWVuZD8=3D -- (sig_end) On Mon, 24 Apr 2023 11:22:46 +0000 Gottfried wrote: > Hi, >=20 > Sorry, > you provided me already with a script for activating all profiles at logi= n, > I don=E2=80=99t know at the moment, why I have mixed it up with other thi= ngs > and I didn=E2=80=99t use it. > ------------------------------------------------------------ > in the meantime all packages are available at login > through the help of Martin > ------------------------------------------------------------ >=20 > so I tried to use your "update-profiles.sh" > I placed it in my home directory: ~/gfp > and changed one sentence, my the place of the profiles: >=20 > update-profiles.sh >=20 > #!/bin/sh >=20 > GUIX_MANIFESTS=3D$HOME/sys/guix/manifests > GUIX_PROFILES=3Dhome/gfp/Projekte >=20 > for dir in $GUIX_PROFILES/* > do > name=3D$(basename "$dir") > manifest=3D$GUIX_MANIFESTS/$name.scm > profile=3D$dir/$name > if [ -r $manifest ] > then > guix package --manifest=3D"$manifest" --profile=3D"$profile" > fi > unset profile > unset manifest > unset name > done >=20 > ------------------------------------------------- >=20 > but running it, it seems not doing anything. >=20 > sometimes it=E2=80=99s difficult for me, to know so little, not knowing w= hat I=20 > have to do, not knowing the basics ... >=20 > Is it connected with the other script to activate the profiles at login? > so that it doesn=E2=80=99t work? > I guess both scripts are independent. >=20 > or is the path to it wrong? > I have the directory > ~/gfp/Projekte >=20 > and in it many directories/which are the different profiles, e.g:=20 > Musescore, Musik, Emacs, Calibre, Gnucash, Icecat, Libreoffice,=20 > Photoflare, Lilypond >=20 > and in each of these directories a scm.file with the same name but in=20 > small letters like: musescore.scm, musik.scm, emacs.scm ... >=20 >=20 >=20 > Kind regards >=20 > Gottfried >=20 > > I believe I already provided you with the code for updating profiles and > > activating them, but here it is again for reference: > >=20 > > ```update-profiles.sh > > #!/bin/sh > >=20 > > GUIX_MANIFESTS=3D$HOME/sys/guix/manifests > > GUIX_PROFILES=3D$HOME/sys/guix/profiles > >=20 > > for dir in $GUIX_PROFILES/* > > do > > name=3D$(basename "$dir") > > manifest=3D$GUIX_MANIFESTS/$name.scm > > profile=3D$dir/$name > > if [ -r $manifest ] > > then > > guix package --manifest=3D"$manifest" --profile=3D"$profile" > > fi > > unset profile > > unset manifest > > unset name > > done > > ``` > >=20 > > ```activate-profiles.sh > > #!/bin/sh > >=20 > > GUIX_PROFILES=3D$HOME/sys/guix/profiles > >=20 > > for dir in $GUIX_PROFILES/* > > do > > name=3D$(basename "$dir") > > profile=3D$dir/$name > > if [ -f "$profile"/etc/profile ] > > then > > GUIX_PROFILE=3D"$profile" > > . "$GUIX_PROFILE"/etc/profile > > export MANPATH=3D"$GUIX_PROFILE/share/man${MANPATH:+:}$MANPATH" > > export INFOPATH=3D"$GUIX_PROFILE/share/info${INFOPATH:+:}$INFOP= ATH" > > fi > > unset profile > > unset name > > done > > ``` > >=20 > > These scripts both loop over my manifests or profiles directories, > > running the upgrade or activate commands on each one. If you want to > > exclude a profile from being upgraded with this script, you can just > > take away its manifest's read permissons like so: > >=20 > > ``` > > chmod -r $HOME/sys/guix/manifests/my-excluded-manifest.scm > > ``` > >=20 > > Good luck, > > Gary =20 >=20 >=20 --Sig_/lit5eK/eyRRbr8OHd1OD7=c Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTpcnBg48VjfIpPS0JLxSIcWnn9GgUCZEZwnAAKCRBLxSIcWnn9 GjZVAQD3SXhcLN2JgkDgG1lT3ASsyi6IrwnboGG9/Mtlv0vNBwEA/5eyrzdaxnwC uURyO9ycWyugyH4B0NqLHqwvlqYpjwI= =wFgY -----END PGP SIGNATURE----- --Sig_/lit5eK/eyRRbr8OHd1OD7=c--