From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id EIkSHfXTWWZJ2wAAe85BDQ:P1 (envelope-from ) for ; Fri, 31 May 2024 15:43:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id EIkSHfXTWWZJ2wAAe85BDQ (envelope-from ) for ; Fri, 31 May 2024 15:43:17 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=ymail.com header.s=s2048 header.b=Tm19SYnW; 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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1717162997; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=P6L4FSmlumetNkzkORS6rnCRhLPrf/v80s4L559ZRbI=; b=Uw1A5UI6VngD/sKwQQPI3oJtVM/ixVZbl2yTX5whKp4NCmENQ1Lwnp5myFez60CbZ+ZxBo vg9M17crGIEDke/p2iY7FugPHB8Jicsu2HS0dCODkyeYSqqfjp/epdJMYnXsWMe4qBIr+t VLrsCYVAdTd4dXu7scAczOCvHvCq3KXWTdzR/TVnZ0d2occbniFJHDD1Wy/Ug6Y7M+hUq1 KIC1C5EwksiYQcTzEIhE0NhbnDYfP3ol02z81FHa4Q/VTxAwcwkdxD4IG6Mddk4EDfpTdK GWN71TsXrFd+sRcXftoKGLQ67Un5RgjRS48idsFcwetX7cHLw1i/Nwvf4hItfQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=ymail.com header.s=s2048 header.b=Tm19SYnW; 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=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717162997; a=rsa-sha256; cv=none; b=FbUPBnxhcUdj9bETeZm5kBoUPcJU2Cle+PiveEUSxeJS3NxBSZkY/RtfmafZcXAXrVUEyv eIqWdX/FV3qxM17KbYCRmp++ijVUL7zMKABO8v2EgPK0C5v0LtUkKT4vbMjcKPHmtfCbE1 3lKhvyYCtpwLox0BHAPd1YtDQ22pXdLmLq2VFnW28dC2vNqC5U85y5LG16GJnFyWtqnAGw jAmN3SEBtol4Uev/dZca0/4t8bPlew6H2zRVTFpa8M1GGKfAp3guuwvKAFJkzhgudkm/0m qvucXUDjKgQMPmWb+AbxmytU3ENmUWmmkpmuIjxZMHTgw0BDjKbRq0HAQUKeHw== 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 2C4D57384E for ; Fri, 31 May 2024 15:43:16 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sD2Wo-0000uS-Jp; Fri, 31 May 2024 09:42:42 -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 1sD2Wm-0000ti-Lu for help-guix@gnu.org; Fri, 31 May 2024 09:42:40 -0400 Received: from sonic309-24.consmr.mail.ir2.yahoo.com ([77.238.179.82]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sD2Wh-0006Gu-HO for help-guix@gnu.org; Fri, 31 May 2024 09:42:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s2048; t=1717162950; bh=IC07iHDL0sgu8dqNyLxvUOW6gyiH8O399UKTUnHCJYY=; h=Date:From:To:Subject:In-Reply-To:References:From:Subject:Reply-To; b=Tm19SYnWYqENK70gimBcINE+0YJtzA8Q5+tGn3LVWpHcifNvlI59sd/XhsBrDjhoZdxEBEVGWjDpQl7XLvGqcua3wnqBjdt5RaiP5j9EaaAU+2jR5eDuV4Vj2CXCSkSZLWEBa2R49Ktzhxer83Rijx17YlmjhLc4d3BATlA0/vjNND9YoQgRaSZh897VCu50aHSJ5Eyhhq6LLtBhokFSVdShHuZ1ORVC2w/dJkfAGDAdGXgt2dVAdbT3Po6YY32Neq2W3Amc7QyzxBx0zxXfapKbVgMHUC/yL0CzuTzcX9e/YON1XtmZuXJVetXBhHcP9R7K1j7ca8N71n7aZwC7aQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1717162950; bh=pwWBm0dOfSB3JI/dp93LkPeObRsZ7myG9Fx9+UJudgv=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=ouhJg8z8vXyHldOJ2C1eGjoV3WrpM1KwkuAm+gXYhqcIIa7FlB2+CqxpIZHs4L9gCF8BrNRFyESvCB+wvp/fXWLWfYTjsEwtqv1beX8kvj36xuwT7I+W73oYEQyG5wfu686EBjHFaUZmnGtwBD/SJDsNGylZpMVeUgkls01nhYwSHil5ULUYWUPNO1qx+bXwyoyGwcxZzMDGluekn4PnplBkGEl4I1KCrU3q0fPbhUKYBDiiP4TnWTi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8zwrj_41P.GGJrgvuq X5YfAgFclxnhpNcDDSTm4MXcI8Kf8twosNnGvkTpg8clYQFLG03RDy6lRe_gxQT5ZvGoUJJsJwvK .Oy_pyu.elN1uPP3WTJSdkYgVjBQsTVdClZpnrQkhoJ.ZktaNKlnwz8qVheZNZmvgVP0C6CXZ8Wl GuGFG2PADUVl5.VNFIrrShEY89cY4wXZPVpvuYcuAMuZHPUoA2LFZmCb9Ita2Oc4YAtO3rQIPrho GtJXOvsCsu1fQYFUYImhNZIqimJ9uuF.XN.j1UwsSHan3XJPy X-Sonic-MF: X-Sonic-ID: 6bfd3b56-046c-4286-82da-4429abce3002 Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.ir2.yahoo.com with HTTP; Fri, 31 May 2024 13:42:30 +0000 Received: by hermes--production-ir2-7b99fc9bb6-wsvcw (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 45ea5f4ad16876e78999a366e18e4152; Fri, 31 May 2024 13:42:29 +0000 (UTC) Date: Fri, 31 May 2024 15:42:17 +0200 To: help-guix@gnu.org Subject: Re: How to configure smartd and send notifications? In-Reply-To: References: <4D873504-6540-477A-A2DB-DE293395CAFC.ref@ymail.com> <4D873504-6540-477A-A2DB-DE293395CAFC@ymail.com> <87seycu3df.fsf@lease-up.com> <87msokttht.fsf@lease-up.com> <0525BF4D-96C2-4F58-BB27-19A88DD8403E@ymail.com> <87jzjot5it.fsf@lease-up.com> <79C29ABD-8FFC-4930-A8E0-798ABF4EEB11@ymail.com> Message-ID: <0E43910D-E50D-414B-8653-98D9A1036E25@ymail.com> MIME-Version: 1.0 X-Mailer: WebService/1.1.22407 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=77.238.179.82; envelope-from=blobbyjj@ymail.com; helo=sonic309-24.consmr.mail.ir2.yahoo.com 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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 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: , Reply-to: Tristan Kohl From: Tristan Kohl via Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -5.85 X-Migadu-Queue-Id: 2C4D57384E X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -5.85 X-TUID: rqNjwhOvzewa Thank you Thomas and Felix for your patience! @Thomas, this was the solution! Works like a charm now :) On 24 May 2024 12:19:39 CEST, Tomas Volf <~@wolfsden=2Ecz> wrote: >On 2024-05-23 21:25:08 +0200, Tristan Kohl via wrote: >> Well look at me=2E So focused in my old ways on constructing a shell sc= ript that I did not even think about using Guile as the executable :D >> >> Thank you Thomas an Felix for your pointers! >> >> I read up about G-Expressions and got it almost working=2E But I must m= iss something because when executing the build result it makes the request = successfully (checked return of http-get with pk and logs on the server) bu= t still fails with this error: >> >> Backtrace: >> 0 (primitive-load "/gnu/store/9gjnc0p=2E=2E=2E") >> >> ERROR: In procedure primitive-load: >> Wrong type to apply: # >> >> >> (use-module (gnu) (guix modules)) >> (use-package-modules tls) >> >> (define smartd-send-ntfy >> (program-file "smartd-send-ntfy" >> (with-extensions (list gnutls) >> (with-imported-modules >> (source-module-closure '((web client))) >> #~((use-modules (web client)) >> (http-get "https://example=2Ecom")))))) > >I think g-exp needs to be a single expression=2E In other words, add `be= gin' in >there=2E In your code you are basically trying to apply result of `(use-= modules >=2E=2E=2E)' to result of `(http-get =2E=2E=2E)'=2E Since use-modules do = not return anything, >you get the error above=2E You can test it using just plain guile and yo= u will >get the same error: > > guile -c '((use-modules (web client)) (http-get "https://example=2Eor= g"))' > >I think this should work: > > (define smartd-send-ntfy > (program-file "smartd-send-ntfy" > (with-extensions (list gnutls) > (with-imported-modules > (source-module-closure '((web client))) > #~(begin (use-modules (web client)) > (http-get "https://example=2Ecom")))))) > >Your original code: > > $ guix repl > Loading Guix REPL meta-commands=2E=2E=2E > Increasing build verbosity=2E=2E=2E > Disabling grafting=2E=2E=2E > GNU Guile 3=2E0=2E9 > Copyright (C) 1995-2023 Free Software Foundation, Inc=2E > > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'= =2E > This program is free software, and you are welcome to redistribute = it > under certain conditions; type `,show c' for details=2E > > Enter `,help' for help=2E > scheme@(guix-user)> ,use (guix) > scheme@(guix-user)> #~((use-modules (web client)) (http-get "https:= //example=2Ecom")) > $1 =3D # > scheme@(guix-user)> (program-file "test" $1) > $2 =3D #< name: "test" gexp: # guile: #f path= : ("/gnu/store/ff1cyww9qlra4849q6k0n30w7q67ziim-guix-module-union/share/gui= le/site/3=2E0" "/gnu/store/1gd9nsy4cps8fnrd1avkc9l01l7ywiai-guile-3=2E0=2E9= /share/guile/3=2E0" "/gnu/store/1gd9nsy4cps8fnrd1avkc9l01l7ywiai-guile-3=2E= 0=2E9/share/guile/3=2E0" "/gnu/store/1gd9nsy4cps8fnrd1avkc9l01l7ywiai-guile= -3=2E0=2E9/share/guile/site/3=2E0" "/gnu/store/1gd9nsy4cps8fnrd1avkc9l01l7y= wiai-guile-3=2E0=2E9/share/guile/site" "/gnu/store/1gd9nsy4cps8fnrd1avkc9l0= 1l7ywiai-guile-3=2E0=2E9/share/guile" "/home/wolf/=2Eguix-home/profile/shar= e/guile/site/3=2E0" "/run/current-system/profile/share/guile/site/3=2E0")> > scheme@(guix-user)> ,lower $2 > $3 =3D # /gnu/store/50m45lc93x7fayaq3y7kzi2zhjz7qwdz-test 7f6c35dd5d70> > scheme@(guix-user)> ,build $3 > building /gnu/store/x3rkbl47j83d5ps8r8a915blks6hfbin-test=2Edrv=2E= =2E=2E > successfully built /gnu/store/x3rkbl47j83d5ps8r8a915blks6hfbin-test= =2Edrv > $4 =3D "/gnu/store/50m45lc93x7fayaq3y7kzi2zhjz7qwdz-test" > scheme@(guix-user)> (system $4) > Backtrace: > 0 (primitive-load "/gnu/store/50m45lc93x7fayaq3y7kzi2zhj= z7qwdz-test") > > ERROR: In procedure primitive-load: > Wrong type to apply: # > $5 =3D 256 > >Now with the `begin': > > scheme@(guix-user)> #~(begin (use-modules (web client)) (http-get "= https://example=2Ecom")) > $6 =3D # > scheme@(guix-user)> (program-file "test" $6) > $7 =3D #< name: "test" gexp: # guile: #= f path: ("/gnu/store/ff1cyww9qlra4849q6k0n30w7q67ziim-guix-module-union/sha= re/guile/site/3=2E0" "/gnu/store/1gd9nsy4cps8fnrd1avkc9l01l7ywiai-guile-3= =2E0=2E9/share/guile/3=2E0" "/gnu/store/1gd9nsy4cps8fnrd1avkc9l01l7ywiai-gu= ile-3=2E0=2E9/share/guile/3=2E0" "/gnu/store/1gd9nsy4cps8fnrd1avkc9l01l7ywi= ai-guile-3=2E0=2E9/share/guile/site/3=2E0" "/gnu/store/1gd9nsy4cps8fnrd1avk= c9l01l7ywiai-guile-3=2E0=2E9/share/guile/site" "/gnu/store/1gd9nsy4cps8fnrd= 1avkc9l01l7ywiai-guile-3=2E0=2E9/share/guile" "/home/wolf/=2Eguix-home/prof= ile/share/guile/site/3=2E0" "/run/current-system/profile/share/guile/site/3= =2E0" "/gnu/store/s2cf4ibjw0g6npx0ia54x5xg6hzangn7-wolfsden/share/guile/sit= e/3=2E0" "/gnu/store/czkzwa77lr39ayj016vhqrbhf2da2isr-nonguix/share/guile/s= ite/3=2E0")> > scheme@(guix-user)> ,lower $7 > $8 =3D # /gnu/store/7ylpw11r0sbdc2z02sir5gcr552dqks6-test 7f6c3606cb40> > scheme@(guix-user)> ,build $8 > building /gnu/store/7xcnijz3cf4231sdg0df5hig259k38nf-test=2Edrv=2E= =2E=2E > successfully built /gnu/store/7xcnijz3cf4231sdg0df5hig259k38nf-test= =2Edrv > $9 =3D "/gnu/store/7ylpw11r0sbdc2z02sir5gcr552dqks6-test" > scheme@(guix-user)> (system $9) > $10 =3D 0 > >> >> >> On 21 May 2024 17:50:27 CEST, Tomas Volf <~@wolfsden=2Ecz> wrote: >> >On 2024-05-21 17:33:24 +0200, Tristan Kohl via wrote: >> >> Hello Felix, >> >> >> >> my last message was not to critizise your help but rather my frustra= tion with my own limited progress=2E I really appreciate the help! >> >> >> >> program-file at least results in a usable thing however since the sc= ript gets executed by smard I get the "command not found" in my logs=2E It = seems like curl is not in PATH for smartd=2E Do I need to import something = into the gexp? >> >> >> >> Also those env variables are defined by smartd during runtime depend= ing on which drive produced the error=2E Therefore I need shell expansion/e= nv variables and have to use system (without *) imho=2E >> >> >> >> This is the current state: >> >> >> >> (define-smartd-send-ntfy >> >> (program-file "send-ntfy" >> >> #~(system >> >> (string-append "curl " "-H \"Title: $SMARTD_SUBJECT\" " =2E=2E= =2E)))) >> > >> >Ignoring the obvious quoting issues here (what Felix does with `getenv= ' seems >> >much safer, and should produce the same result?), >> > >> >> >> >> Note: when using system* the error is: >> >> In execvp of curl: No such file or directory >> > >> >This should be solvable by using `file-append', so, basing on the syst= em* >> >variant, something like: >> > >> > #~(system* #$(file-append curl "/bin/curl") = ) >> > >> >Should invoke curl by absolute path=2E (You need import (gnu packages= curl) of >> >course=2E) >> > >> >Hope this helps, >> >Tomas >> > >> >-- >> >There are only two hard things in Computer Science: >> >cache invalidation, naming things and off-by-one errors=2E > >Have a nice day, >Tomas > >-- >There are only two hard things in Computer Science: >cache invalidation, naming things and off-by-one errors=2E