IRC channel logs


back to list of logs

<oriansj>is it yet possible with guix to change the number of build jobs relative to the language being built?
<oriansj>as it is possible in gentoo with something like: in /etc/portage/bashrc
***renken_ is now known as renken
<florhizome[m]>oriansj afaik no, you can change the max number of jobs and of cores, and guix will allocate them.
<florhizome[m]>for some languages that’s also an reproducibility issue afaik…
<florhizome[m]>but maybe it’s something guix can kinda implement, if you want to do it^^
<oriansj>florhizome[m]: well I ask as it allows for more aggressive building of low memory languages and more conservative building of memory hungry languages on a machine with finite memory (such as 1-4GB)
<oriansj>as builds significantly slow down if they aggressively go into the swap
<oriansj>so for example doing a rust build with 1 job on a 4GB machine ends up taking 1/5th the time of the same machine doing the build with 2 jobs
<oriansj>but that same machine could easily do 4K parallel builds of a more memory efficient language such as M2
<florhizome[m]>Sounds reasonable! Implementing stuff that helps machines with less memory is on the todo list I think.
<oriansj>even if it isn't in the default feature set (like with gentoo) but something we could script would be useful
<florhizome[m]>people are getting pinephones etc and this is a major hurdle. I would commend you to take to the mailing list though to make sth happen.
<florhizome[m]>maybe you could have a set of predefined memory profiles. After all it will be an option you pass to the build daemon config. Or optionally really just an array or list…idk
<florhizome[m]>nckx could be someone having fun helping with this afaik he is kind of a swapspert :p what I have heard so far is people blaming guix memory usage on guile more though then on this.
<oriansj>florhizome[m]: well guix in my worst cases only uses 256MB of RAM
<oriansj>which if you only have 512MB is a serious problem
<oriansj>and the MB/s on microSD cards is terrible if you are lucky (some only average in the KB/s)
<florhizome[m]>I think atm the talk is that you better have 8 gb so if we can move that down to 4 or 2 that’s a lot more devices. 512 is a bit far fetched from this perspective probably
<oriansj>florhizome[m]: the second you do a Rust build with 2 jobs you need 24GB of RAM if you want it to be done in a single day but if you only have 8GB + 16GB of SD swap, it'll talke a week and half
<oriansj>and that is after you already fully bootstrapped rust; as it turns out you usally have to bootstrap it every freaking time you build some rust programs.
<florhizome[m]>well I am not an expert on this but I am getting a planet computers phone and I hope guix will be helpful on it some day so if you have concrete advice more power to you from my perspective :d
<oriansj>florhizome[m]: my concrete advice on low memory systems: substitutes
<florhizome[m]>oriansj I think this is something that the „antioxidant“ project is trying to help with perspectives
<oriansj>unless you have the patience of a saint or are a hardcore bootstrapper
<florhizome[m]>yes i thought so. No I’m not. I run a intel 11th gen laptop now with 4C/8T and when substitutes are failing and I’m building webkit or Linux I’m skipping :D
<florhizome[m]>But I really am going to go to sleep now. As inlaid, i think this would need to land in the mailing list to be discussed productively
<florhizome[m]>* i said
<oriansj>florhizome[m]: most substitute build failures are memory exhustion and for things like webkit I suggest a very big swap
<oriansj>(I'm using a 64GB SD card on my libre-x200)
<oriansj>but setting up a substitute server of your own, seems to be easier than ever these days.
<florhizome[m]>hm i have 24 gb of DDR4 ram rn what kind of zram/swap config would you suggest?
<oriansj>12GB per rust build job; you stated you have 4C/8T so I am guessing you are set to 8 jobs so =>96GB
<oriansj>(of swap)
<florhizome[m]>I don’t really have a dedicated server rn. What would be nice is using the one one laptop that I’m not on (my previous x230 will stay around some longer) for substitutes automatically.
<oriansj>yeah, it doesn't generally take much to do builds
<florhizome[m]>No rn I am set to 3/3 cores/build jobs
<oriansj>just a handful of things are insanely wasteful and eat most of the build time
<oriansj>florhizome[m]: so 36GB of swap for 3 build jobs
<florhizome[m]>I experienced that my gnome UI will freeze during expensive builds so I am trying to keep some capacity left sort of,
<oriansj>florhizome[m]: did you look at disk I/O?
<florhizome[m]>do you prefer normal swap or zswap? you don’t really seem to be taking zram into consideration?
<florhizome[m]>not really
<oriansj>florhizome[m]: I don't leverage zswap as I prefer worst case behavior to be the default as I want to have a feel for builds not running on Linux
<oriansj>as one can't bootstrap linux from zero while running on Linux
<florhizome[m]>well that really seems to be a gentoo mindset to me :D
<florhizome[m]>but cool
<oriansj>live-bootstrap actually
<florhizome[m]>well I don’t really expect to do that but to have expensive builds here and there
<oriansj>and builder-hex0:
<oriansj>fair, I am one of the #bootstrappable crazies ^_^
<oriansj>improving Guix's root of trust
<florhizome[m]>ah i see :))
<florhizome[m]>you are the hex0 person ?
<florhizome[m]>very cool work :)
<oriansj>with lots of great people having a fun time ^_^
<florhizome[m]>as i said i need to sleep and I am not the right person to help implement the things you suggested but I hope it can stick :)
***jesopo is now known as jess
<trevdev[m]>I have packaged an extension for stumpwm that depends on sbcl-ironclad. Ironclad is throwing an error because it can't load what appears to be a built-in function called sb-rotate-byte. There are other packages that depend on sbcl-ironclad that don't seem to patch anything. Does anyone know what the deal is?
<trevdev[m]>If I look at ironclad's code rotate-byte seems to be referenced like this:
<Declan>Hey guys, I've been playing around with Guix for a few weeks on Arch and just made the switch to guix as a system. This stuff is so unique and awesome, just wanted to say thanks, so THANKS! :) I'm sure I'll be back soon, I'm playing around with packaging some of my own software and want to try to grow Guix's repositories. Happy hacking!
<vagrantc>sneek: later tell Declan glad to hear you're enjoying guix, welcome to the community!
<sneek>Got it.
<vagrantc>sneek: botsnack
*vagrantc waves
<apteryx>mbakke: sure! :-)
<AwesomeAdam54321>Should I put a #:use-module at the top of the file or just (@ (gnu packages ...)) when it comes to native-inputs?
<vivien>It’s the same, except that with #:use-module you import everything, and circular inclusions are easier to debug if you use #:use-module
<vivien>(don’t underestimate the nuisance of circular inclusions in guile)
*** sets mode: +o ChanServ
*** sets mode: +o ChanServ
<podiki[m]>sneek: later tell trevdev just a wild guess, but maybe when running you may need to set SBCL_HOME (I do that when I run stumpwm for what I think are similar errors)
<sneek>Will do.
<vivien>Wow there are a lot of guix in this channel
***lukedashjr is now known as luke-jr
<jpoiret>some packages on master had their build cancelled on CI mid august, and so no substitutes for them
<jpoiret>i see at least monero-gui
<jpoiret>would it be possible to eg restart them
<jpoiret>qpdfview and flameshot are also affected
<antipode>I am not aware of a convenient interface to only restart cancelled builds, but there's an option 'Restart all builds':
<antipode>I _think_ only builds that didn't successfully complete would be restarted, but I'm not 100% sure
<ulfvonbelow>fun fact: ~/.config/marblerc can embed store paths. These will persist even after an upgrade and a gc.
<ulfvonbelow>also the 'legend' menu isn't working for me in marble-qt, only the icons show up, but no description of them
<ulfvonbelow>when I click-and-drag the icons to select and then right click and press "copy", then press "paste" in some other program, the labels do appear to show up though
<Luk6655>Does anyone know why guix is downloading stuff(substitutes) when deleting generations?
<ulfvonbelow>is it deleting system generations by any chance?
<ulfvonbelow>could be getting grub to update the boot menu to reflect what system generations are actually available, for example
<Luk6655>yes, I was deleting system generations, it downloaded quite a few things, but only when I deleted the first one
<Luk6655>unfortunately I can't show a paste because my scroll buffer is too small
<Luk6655>there were various system libraries, perhaps indeed those were grub dependencies
<Luk6655>then I deleted 14 more, and this went pretty quick
<vivien>Unfortunately, guix gc is very aggressive
<vivien>It will delete all those dependencies for grub-install, although it’s obvious you will need them again
<Luk6655>oh, no, I run gc later, this was when I run guix system delete-generations
<Luk6655>I was surprised by downloads, because I was expecting things to be deleted only
<vivien>Maybe you ran guix gc a long time ago
<Luk6655>yes, it was 20 generations ago at least
<vivien>If you guix pull, the grub dependencies might have changed too
<vivien>Without you having run any guix gc
<Luk6655>yes, that is likely, then when it had to rebuild grub to reinstall it it lacked those new dependencies so it had to download them
<Luk6655>thats a good explanation
<muradm>hello guix
<nckx>The GRUB background image alone (and *in se* this is a good thing, it's just surprising) is built from source… using Inkscape. Just in case you're seeing wayland scroll by and wonder why GRUB would need that.
<nckx>Also, hi Guix.
<vivien>Wow, is there librsvg involved in the grub background image?
<jpoiret>apparently yes vivien
<vivien>Rust is slowly becoming a meme at this point
<efraim>nckx: I think I made cuirass fall over
<nckx>That's mean, you know cow-stores can't get back up.
<nckx>I'm stuck in an airport killing time, not really prime debugging surroundings I'm afraid.
*nckx only went on-line in the first place to look up ‘flight cancellation hotel reimbursement’ so you know things are going grrreat.
<nckx>efraim: ...I think I fixed it, but maybe we were both logged in frantically typing stuff CSI-style.
<nckx>Bye Guix o/
<Luk6655>I'm looking for an example of a simple one-shot type service to use as a template when writing my own. Does anyone know any good candidates?
<vivien>What’s “one-shot”?
<Luk6655>a "service" that starts by running an executable that exits immediately
<Luk6655>it doesn't persist
<vivien>I don’t know any service like that, sorry
***Luk6655_ is now known as Luk6655
<Luk6655>Does anyone happen to know what does "#~" mean in this line: "(start #~(let ((spawn (make-forkexec-constructor" ?
<jpoiret>It introduces a g-exp
<jpoiret>#~ is the ` for g-exps, while #$ is , and #$@ (iirc) is ,@
<jpoiret>There's an introduction to g-exps in the info manual
<Luk6655>I saw the term mentioned in the guix manual in the shepherd services section, however, examples shown there are probably out of date
<Luk6655>for example here: it mentions a constructor named make-system-constructor, I believe it is called make-systemd-constructor (but that's probably just a typo). Wouild you say the info manual is the most up to date and correct one?
<jpoiret>it isn't named make-systemd-constructor
<Luk6655>is it make-system-constructor?
<jpoiret>systemd is an init system that's unrelated to Guix/Shepherd (we don't use it nor package it, just provide a service file for people running on foreign distributions)
<jpoiret>i believe it should be make-system-constructor
<jpoiret>most services use make-forkexec-constructor though
<Luk6655>now I'm confused. I did a grep -r on the guix repo and it came blank for make-system-constructor, but it does come back with a definition in gnu/services/base.scm for make-systemd-constructor
<Luk6655>perhaps it is something else that does something unrelated though
<Luk6655>but at least it is defined
<Luk6655>so I'm not sure
<Luk6655>I need a constructor that will run my service executable and stop until the executable exits.
<Luk6655>In the info manual both names are mentioned. Searching for make-systemd-constructor brings up a snippet about starting guix daemon. There make-systemd-constructor is a hyperlink to a Shepherd manual part about make-system-constructor....
***Dynom_ is now known as Guest399
<jpoiret>Luk6655: my bad, both are defined in shepherd
<jpoiret>it's further down on the same manual page
<Luk6655>I see, ok :-)
<unmatched-paren>why do we even need to build the grub background from source anyway? an image can't execute arbitrary code (i hope?) so there's no trusting trust issue
<parallelepiped[m>Good point
<florhizome[m]><florhizome[m]> "is anyone else experiencing a..." <- 👀
<florhizome[m]><jpoiret> "i believe it should be make-..." <- I think this procedure exists like that (like the system* procedure) but shepherd introduced too new socket types , one of which is actually named after systemd, and one after inetd, right? and so should be their constructors. Haven’t seen them used in guix but I’m curious for it.
<muradm>sneek: later tell apteryx, hi, in (gnu services security) you added generate-doc, how do you call it without *-fields symbols exported?
<sneek>Will do.
<Luk6655>jpoiret: it is indeed make-system, this works in repl
<antipode>unmatched-paren: The artwork repository does not contain pre-compiled images.
<nckx>unmatched-paren: We build everything possible from source.
<nckx>Better to ask: why should images be an exception?
<nckx>I don't see how trusting trust is related.
<Kabouik>Can pip be used on Guix? I'm looking into installing the dependencies for (namely pyinput)
<antipode>Kabouik: How about "guix import pypi pyinput" (and maybe "guix shell -m manifest.scm", depending on what you're doing exactly?)
<antipode>Wait, I think neither pip nor Guix can help you, as pyinput is Windows-only.
<antipode>Maybe you are looking for pynput (!= pyinput) instead?
<Kabouik>I tried `pip install pyinput` before your answer and got issues with it indeed, and anyway just realized the script is not supposed to work with Wayland
<Kabouik>Oh right
<jpoiret>you're definitely not supposed to use pip install on guix
<Kabouik>What would be the benefit of using guix import pypi pynput over pip install pynput? I'm not familiar with the workflow
<jpoiret>it can work, but warranty's off
<Kabouik>I see
<Kabouik>That was the reason I was asking in the first place indeed
<jpoiret>`guix import pypi pynput` would produce a guix package definition to build pynput through guix, while `pip install pynput` will bypass guix and let pip do whatever shenanigans it's supposed to do to install a package
<jpoiret>package installed via pip lose all the advantages of guix
<jpoiret>and they might interfere in bad ways too
<Luk6655>what about using pip inside guix shell? (or maybe pip inside venv inside guix shell)?
<Kabouik>If I install something with the scheme file I get with guix import, should I add the .scm file to a channel and keep track of it, or can it just be a one shot file I put in /tmp and then install with guix build -f?
<jpoiret>Kabouik: you can do both
<jpoiret>in the long run, if it is free software and you use it you should consider contributing it to guix itself
<jpoiret>Luk6655: `guix shell` or `guix shell --container` ?
<jpoiret>the former doesn't isolate anything, so pip will still do whatever it wants and mess with your filesystem
<jpoiret>also, you don't really need venvs with guix shell, right?
<antipode>The pypi distribution model (and cargo's and npm's and go's ...) has problems such as typosquatting attacks, sometimes upstream going rogue and adding malware ...
<pkill9>i wanna configure swaywm in guile
<jpoiret>guix shell is a superset of venv
<Kabouik>I want to, I have a patch pending for some software already (I need to finish fixiing my submission), but am not comfortable yet to submit all the things I might use because I never know if I am doing the right thing.
<jpoiret>pkill9: you could consider adding a home service for sway then
<Luk6655>I would need to read about the --container (is it just chroot, or does it use docker etc)
<pkill9>adn I want to be able to create ad-hoc scripts
<jpoiret>Kabouik: that's up to reviewers to tell you that
<pkill9>within the configuration file
<pkill9>whichw ould work well as it could generate the script in the store and point to it
<jpoiret>as long as you take into account what reviewers tell you about your patches, you should feel confortable sharing your work
<antipode>sneek: later tell samplet: #57573 (disarchive bug report, with reproducer!)
<pkill9>specifically for keybindings to those scripts for a little more complicated behaviour
<jpoiret>it might seem daunting at first but everyone is way more welcoming than in other projects you might be used to
<antipode>sneek: botsnack
<muradm>sneek: later tell apteryx, nevermind, figured it out, thanks
<sneek>Will do.
<muradm>cool number :) #57575
<muradm>sneek: later tell apteryx, could you please have a look at 57575
<two[m]>hi, can i repost my question?
<vivien>two[m], if you don’t get an answer, they may be a lot of reasons: noone that can help you saw it, maybe if you repost it you increase your chances, but it’s the weekend so maybe you won’t. If you don’t get a response, you may also want to ask the help-guix list:
<Luk6655>Is there some way in guix/guile to search for things defined in modules? For example, just now I got an error "error: define-record-type*: unbound variable" no doubt due to lack of use-module, but which module to "use"?
<Kabouik>Understood jpoiret, I'll probably submit more patches when I can use Guix as my main machine, as there are probably multiple packaes I'll want for my own use anyway. I am not going to dive into the pynput thing though, as I see the autoscroll script it is necessary for is only working for Xorg anyway, and I'm switching to Wayland at the same time as I'm switching to Guix.
<Kabouik>Now before I can make this my main machine, I need to fix audio. Pulseaudio only sees a dummy output.
<two[m]><Luk6655> "Is there some way in guix/..." <- i use `grep -Rr defined-thing $GUIX_PROFILE/share/guile/ | grep define`
<Luk6655_>Yes, this should do :-) thanks
<pkill9>Luk6655: `grep -Rr 'define.*thing-yourelookingfor'
<rekado>I would like to get some more documentation of the build systems and assorted Guile modules into the manual.
<rekado>or perhaps to spin out some of these modules as separate packages
<pkill9>I use rg -L 'define.*asdgasd' actually
<pkill9>rg -L 'define.*store-path-package-name' ~/.config/guix/current/share/guile
<rekado>M-x ag
<Luk6655>regarding guix import pypi, is there any way to specify --extra-index-url ? Or to point it to a local whl file?
<cyber-chris[m]>Question about Docker support: would the docker image loaded from a `guix pack -f docker ...` tarball have multiple layers (to gain the benefits of layer sharing)?
<Luk6655>regarding guix import pypi, judging from the --help prompt the answer is no, so one has to still use pip :-(
<Luk6655>it appears urls are all defined in guix/guix/import/pypi.scm around line 551. Perhaps additional ones can be added as a workaround
<rekado>cyber-chris[m]: no, it doesn’t build separate layers.
<rekado>it is not entirely obvious how to separate the package graph into layers *and* keep the number of layers low enough for Docker.
<rekado>not impossible to do, but apparently nobody felt strongly enough about it to work on it.
<iska>hii, is there an easy way to go back many commits (> 1 year old)? there's some software failing to build with latest
<rekado>iska: you can provide the package transformation “--with-commit” to build a package from a different commit.
<rekado>but there’s a good chance that today’s package dependencies won’t work with code from a long time ago
<pkill9>zhas anyone got this error tryign to run wireguard? Unable to modify interface: Operation not supported
<cyber-chris[m]>rekado: I see, and I presume there isn't a way for a user to 'hint' or manually define how to separate a specific package graph into layers?
<iska>rekado: I just need a way to get a 2 year old commit
<Luk6655>Could someone perhaps have a look why this: (line 36) fails with this: , please?
<vivien>Luk6655, I guess that’s a problem with your lists
<Luk6655>I suspect I may need to convert a list to string
<Luk6655>Unfortunately the guile manual in its list/string conversion has two methods how to convert strings to lists, but none the other way :-/
<vivien>I don’t know make-system-constructor
<Luk6655>it is expecting a string, I'm giving it a list, I think that's why
<vivien>It’s very rare that guix expects you to pass a command-line as one string
<Luk6655>hmm, that's my best guess... so far
<Numerobis>Hi #guix! For some reason my guix store weighs more more than 30Gb after a complete guix gc, although I have only a few packages and servers installed. Is there any way to reduce the size of the store?
<Luk6655>it seems it tries to pass the list to string-append internally, but it fails for some reason (one of the items not being a string? but they all print as strings)
<vivien>Where is make-system-constructor defined?
<Luk6655>or, it is my string-append that fails.... Is there a toString method/function in guile, to convert whatever type into string?
<Luk6655>vivien: I have absolutely no idea, I assume in shepherd
<vivien>It’s very very unlikely that guix expects you to string-append your command-line arguments
<Luk6655>ok, so let's take this, and if we assume it as a fact, than it must be my string-append that fails
<vivien>How did you learn about the existence of this function?
<Luk6655>from the manual
<Luk6655>allegedly it takes a string (or a list it concatenates) and it executes it
<Luk6655>I think we could resolve it by ensuring everything I pass to it is indeed a string
<Luk6655>is there a "to string" conversion in guile?
<vivien>That would be a terrible security hole
<Luk6655>what would be?
<Luk6655>it is a system service
<vivien>That you have to string-append your arguments without escaping them
<pkill9>nevermind, I got my system wrokign with wireguard using the wg-quick tool instead of wg
<Luk6655>the error may come from string-append in line 36 "(string-append #$libldm "/bin/ldmtool")"
<vivien>Maybe try using #~(apply make-system-constructor (cons #$(file-append libdlm "/bin/ldmtool") #$@action) and have action be a list
<vivien>Like '("create" "all")
<vivien>sorry I forgot a closing ')'
<Luk6655>what does apply do?
<vivien>It applies the function :)
<vivien>to a list of things
<vivien>You might want to have the package be a configuration option too, so that user might use another package (or the package with a different version, or with patches)
<Luk6655>I would prefer to be as simple as possible
<vivien>In the shepherd manual, you have: procedure: make-system-constructor command…
<vivien>the … means that there can be many arguments
<Luk6655>I'm trying to locate the bit in the manual that defines shepherd-service to fiond out how "apply" will work instead of "start"
<vivien>So each argument should be a string, and you do that by applying the function to the list of arguments.
<vivien>apply is a standard scheme function
<Luk6655>ok, I thought it goes instead of start
<vivien>Since make-system-constructor expects many arguments instead of a list, you have to use it
<vivien>(start #~(apply make-system-constructor <list>))
<vivien>It will unpack the list and call make-system-constructor with as many arguments as there are items in the list.
<Luk6655>okm that makes sense, why file-append instead of my previous string-append
<pkill9>so glad wireguard is working
<vivien>I think it’s more used because it is more semantically precise
<pkill9>i wanna make a light interface for easy configuring
<vivien>You can use string-append too if you like
<Luk6655>viven: like this ? #~(apply make-system-constructor (cons (string-append #$libldm "/bin/ldmtool")
<Luk6655> #$action)
<vivien>Oops I wrote #$@action earlier but it’s really #$action
<vivien>(or '(#$@action) if gexps act up)
<Luk6655>np, I'm trying my version first
<Luk6655>I would like to find out if it is failing due to my string-append or make-system-constructor not wanting a list
<Luk6655>it is a bit strange, because the manual says this constructor can take additional arguments and that it will just concatenate them
<vivien>I guess that’s the lie
<pkill9>now I wanna host a wireguard server on my desktop
<Luk6655>it might be
<Luk6655>jeez.... this time: "guix system: warning: exception caught while executing 'eval' on service 'root':
<Luk6655>In procedure apply: Apply to non-list: ("/gnu/store/ihkg01hr3r22c75hn9sw4spsql5chcqn-libldm-0.2.5/bin/ldmtool" . "create all")
<vivien>Oh it’s not a lie
<vivien>It literally just string-appends them
<vivien>That’s a bummer
<vivien>Yeah, the action should be a list
<vivien>Like '("create" "all")
<Luk6655>so how does one convert to a string in guile?
<vivien>Well, pass it as a list :)
<Luk6655>it doesn't like a list, it had a list last time
<Luk6655>oh, you mean to pass a list to apply, right?
<vivien>Instead of (default "create all"), do (default '("create" "all"))
<Luk6655>is that it?, do I need to change this: (cons (string-append #$libldm "/bin/ldmtool") too?
<vivien>Having (default '("create" "all")) and #~(apply make-system-constructor (cons (string-append #$libldm "/bin/ldmtool") #$action) should work
<Luk6655>ok, I hope it does plug a space between create and all
<Luk6655>or pass it as separate arguments
<vivien>Hmm in fact you may want to add a space right
<vivien>I realize that there’s a bit of a problem here
<vivien>The shepherd implementation is obviously incorrect
<Luk6655>two spaces? one before create and one before all?
<vivien>shepherd needs to be fixed to do the correct thing
<Luk6655>no, it still complains about apply to non list
<Luk6655>this is the current version
<vivien>Until then you have to revert to #~(make-system-constructor (string-append (string-append #$libldm "/bin/ldmtool") " " (string-join #$action " ")))
<Luk6655>yes, I was thinking about something like this
<Luk6655>thanks, lets try it
<vivien>If one day shepherd gets a fix to use system* instead of system, you will have to do the apply thing
<vivien>Until then, be aware that you need to quote all the damn arguments in the action field
<vivien>if they contain spaces that is
<Luk6655>quote? if they are passed as a variable?
<vivien>Quote as in bash quote
<vivien>make-system-constructor does something like sh -c "… its argument… "
<vivien>So we did string-append, but if one of the action items is multi-word, it might do incredible things
<Luk6655>ok, I'll have to try it first to see what it runs
<unmatched-paren>antipode: I believe Go's model isn't vulnerable to typosquatting or malware
<Luk6655>by quote, do you mean, rather than use a variable like this "create all" use "'create all'" ?
<Luk6655>if there aer spaces?
<unmatched-paren>because it's locked to a commit or tag (though the build system itself doesn't seem to enforce it)
<vivien>Heh, I just realized that there’s also make-forkexec-constructor
<Luk6655>yes, I can;t use it
<unmatched-paren>and the package system is decentralized
<Luk6655>I need something that will wait until ldmtool exits before proceeding
<vivien>It does the correct thing and use a fork+exec model, like system*, contrary to make-system-constructor, which invokes system
<vivien>Everything was given in the name
<Luk6655>if it is run in the background, there is no guarantee ldmtool will be done by the time it tries to mount filesystems etc (that's a separate worry too)
<vivien>Then my understanding of the problem fades away
<Luk6655>which, problem?
<vivien>I guess using system in make-system-constructor instead of system* is really undesirable in shepherd then.
<vivien>But hey, for now everything should work :)
<Luk6655>why is it undesirable?
<vivien>Because you have to shell-quote the arguments
<Luk6655>I guess there are issues with implementation, but perhaps someone fixes it one day....
<Luk6655>can you make forkexec not fork?
<Luk6655_>All I really need is for this "service" to run an executable as root and wait for it to exit.
<Luk6655_>Perhaps there is a better way?
<vivien>There’s a way though! Do #~(make-system-constructor #$(program-file "ldmtool-action" (with-imported-module (source-module-closure '((guix build utils))) #~(invoke (string-append #$libldm "/bin/ldmtool") #$@action)))
<vivien>I have to test it first
<two[m]>$ LANG=C herd reload root
<two[m]>herd: exception caught while executing 'reload' on service 'root':
<two[m]>Wrong number of arguments to #<procedure 7fbd410dba00 at shepherd/service.scm:2039:6 (running file-name)>
<two[m]>hi, why does it?
<two[m]>my user init file is the default
<vivien>That’s a bit convoluted but what it does is create a script that invokes ldmtool with the appropriate command-line options (they don’t need escaping) and run that script
<vivien>Since the script name does not contain spaces, then you’re fine
<Luk6655>do I need to add anything to use-module imports?
<vivien>(guix modules)
<vivien>Other than that I think it’s good
<Luk6655>it's already there, ok, I'll try it next
<vivien>Oh wait
<pkill9>what's a good lightweight GUI toolkit?
<Luk6655>btw, last version did run, but who knows what it executed, definitely not what I wanted
<vivien>#~(make-system-constructor #$(program-file "ldmtool-action" (with-imported-modules (source-module-closure '((guix build utils))) #~(begin (use-modules (guix build utils)) (invoke (string-append #$libldm "/bin/ldmtool") #$@action)))))
<vivien>It should be better if you indent it :)
<Luk6655>will do :-)
<ytc>hello. i'm using guix system on librebooted x200. when i do "loginctl hibernate" it runs successfully but when i boot my computer again guix doesn't resume. instead, it starts like i haven't hibernated before and i have to run swapon to activate swap partition again. could you please help me? this problem doesn't occur on other distros.
<vivien>Now all shepherd does is invoke sh -c "/gnu/store/…-ldmtool-action", and that script will invoke ldmtool with one argument for each item in the action list, so they don’t need any escaping :)
<Luk6655>ok, I'm running it, we'll see, I hope it works, but at the same time I would prefer some code that is simple...
<Luk6655>it is just running an executable at startup in the end...
<vivien>Correct code trumps simple code every time!
<vivien>You should see in the console output that guix builds something called /gnu/store/…-ldmtool-action.drv
<vivien>If you copy it and run guix build ….drv, it will respond with the name of the file that shepherd runs
<Luk6655>perhaps I have a typo: "error: source-module-closure: unbound variable"
<vivien>It’s in (guix modules)
<Luk6655>ah, I thought I had it, but I didn't, thats fine
<muradm>sneel: botsnack
<muradm>sneek: botsnack
<Luk6655>I did hear disks click, but it must have run it with wrong command line
<Luk6655>because the /dev/mapper entries were not crated
<vivien>Did you spot the /gnu/store/…-ldmtool-action.drv?
<vivien>If you run guix build ….drv it should give you a file
<vivien>That file should be an executable
<vivien>and it should contain towards the end of it (invoke (string-append "/gnu/store/…-libldm" "/bin/ldmtool") "create" "all")
<Luk6655>indeed it does, but I might need to split "create all" into a list again
<Luk6655>I suspect it passes it as one argument
<vivien>One argument per list item
<Luk6655>that's the problem then
<vivien>So I guess you have (default '("create all")) in the configuration record?
<Luk6655>yes, I want back to it
<vivien>If you set it to (default '("create" "all")) it will work :)
<Luk6655>yes, I'm changing it now
<Luk6655>btw, I'm thinking now, there isn't really any way of telling when during the boot process this service is run...
<Luk6655>so probably mounting those volumes created in /dev/mapper in the system config will not work anyway
<Luk6655>therefore I could've probebly use make-forkexec
<Luk6655>with no detriment
<Luk6655>but I'll leave it as is if it works
<vivien>When you define a shepherd-service, you can configure the requirement but shepherd is in no way as competent as systemd if you want to fine-grain that
<Luk6655>it still doesn't run properly, this time I didn't even hear disks click as if it didn;t even scan
<antipode>unmatched-paren: Malware can be written in any language, including Go.
<Luk6655>this is the content of the action file
<antipode>unmatched-paren: I don't see how Go is better than PyPi in typosquatting protection.
<Luk6655>I think I'll just swap to forkexec, there are plenty of working examples to choose from
<vivien>It’s important that the code contains #$@action and not #$action
<antipode>GitHub (or GitLab or whatever) usernames appearing in package names and repository URLs seem typo-squattable to me.
<Luk6655>vivien: I though this was an earlier typo
<Luk6655>that might be the reason, ok, let try with this change
<vivien>It depends on the situation, #$@action means to remove the parenthesis around ("create" "all") and do just "create" "all" in the generated srcript
<muradm>so small docs on mcron
<Luk6655>yes, it works now
<muradm>rottlog attempts to send notification mails, and fails with, how to set from/to/mail-cmd for mcron/rottlog?
<Luk6655>thanks for the help :-)
<Luk6655>btw, another thing is that man pages seem broken for me (I'm not sure if all or just most)
<Luk6655>they seem to have lots of .HP .SS entries and go to the right of the terminal
<Luk6655>Is this some known problem with man on guix?
<jpoiret>Yes, that's an issue with a manpage generator that is broken iirc
<jpoiret>and since it is used as a dependency of many packages, it won't be fixed until the next big core-updates merge iirc
<Luk6655>ok, at least I know it is not my os problem
<Luk6655>Is there some sort of automounter in guix one could configure to mount filesystems when they become available?
<rekado>Numerobis: check your profile generations (personal an system). As long as there’s a reference to an item in the store it cannot be removed.
<rekado>Numerobis: try “guix package --list-profiles” and see what it says
<GNUtoo>apteryx: thanks I'll update and look
<sneek>GNUtoo, you have 1 message!
<sneek>GNUtoo, kaelyn says: thank you for taking a look at the patches! I've actually not done much with mingw & I updated it as part of an attempt to get newer versions of dxvk building (I'd hit an error that was fixed in 9.0.0)
<podiki[m]>Luk6655: take a look at the usual ones, like udiskie
<podiki[m]>(nothing particular to guix there)
<Luk6655>podiki[m]: thanks, I'll try it, I never cared about those things on other distros because I could just have a boot script launched by systemd/systemv etc
<Luk6655>here, this is different
<podiki[m]>I think it depends more on doing a desktop environment/window manager set up, no different than others I think
<podiki[m]>otherwise, if you mean just general setting up mounts for permanent hardware, that is your system config, yes
<Luk6655>not if those permanent mounts require a service to run to create /dev/mapper nodes....
<Luk6655>perhaps there is a way to wait for them?
<Luk6655>the manual mentions there is luks-device-mapping and lvm-device-mapping and raid-device-mapping, perhaps another one can be added to wait for a generic device?
<podiki[m]>sorry, not sure, but someone else may know (or ask on the help mailing list since it seems like something others would want too)
<Luk6655>Maybe there is a way, it seems there are dependencies that can be set including to a mapped device. I might send an email to the list about it if I can;t figure it out
<pkill9>why is `guix size zenity` 1gb, yet `guix size webkitgtk` is 1.3gb even though webkitgtk is a dependency for zenity?
<pkill9>ah, it's due to native inputs
<pkill9>then again idk
<reza>Hi, is there any way to findout which packages require a specific package?
<rekado>reza: guix refresh -l foo
<reza>rekado Great! Thank you, I also found the
<rekado>you can also do custom queries with fold-packages from (gnu packages)
<fnstudio_>hi, i installed network-manager via guix on top of a host system; is it possible to use it as a daemon that way? or is it better that i install it from the host system directly?
<fnstudio_>(i'd be keen to have it only installed via guix if that's possible)
<Luk6655>vivien: If you;re still here, I wanted to see if I can swap this service to gforkexec constructor and it seems to fail for the exact same reason system constructor did
<sneek>wb vagrantc
<Luk6655>I can;t see what is the difference between "#~(make-forkexec-constructor
<Luk6655> (append
<Luk6655> (list (string-append #$libldm "/bin/ldmtool"))
<Luk6655> '("create" "all")))" and this "#~(make-forkexec-constructor
<Luk6655> (append
<Luk6655> (list (string-append #$libldm "/bin/ldmtool"))
<Luk6655> #$action))"
<Luk6655>when #$action contains '("create" "all"), the top one seems to work, the bottom doesn't
<vivien>The difference is the apostrophe
<vivien>I think
<vivien>The second one gives you (list (string-append…) ("create" "all")) and it tries to call the "create" function (but it’s not a function, it’s a string)
<vivien>You can do '(#$@action) to get '("create" "all")
<vivien>Or (quote #$action) but sometimes this fails and I don’t understand why
<Luk6655>ok, I'll try that, I don't quite understand why append would try to eval the contents of a variable, but there are lots of things that go 100% against my intuition in guile so perhaps this too
<Luk6655>does it try to eval everything that's not quoted? (if that makes any sense in this context)
<vivien>It’s not append, it’s just that when you write (a b), scheme considers that a is a function and tries to call it with b as its argument. If a is a literal string, it cannot work of course.
<vivien>And yes, scheme evaluates everything that’s not quoted :)
<Luk6655>that's where I went wrong :-)
<vivien>The confusing thing is that there are different things that get evaluated at different times with guix, and different ways to quote them.
<vivien>So there is standard scheme quote, quasiquote and unquote, and guix quasiquote (#~) and unquote (#$)
<Luk6655>yes, I searched for those in the manual, some are described, some not
<vivien>You can do very complex things by quoting and unquoting code for guix or guile, but there are corner case interactions that I don’t fully understand
<vivien>Like, #~'
<Luk6655>imagine if someone made a system lijke guix, but in a "simple" scripting language like python :-P
<vivien>Well, the power of guix comes from the gexp level of quoting, that you cannot have in python.
<vivien>(that’s not all of guix, but that’s a big selling point)
<Luk6655>I don't know enough about gexp to comment really, all I know is that it executes guile code in context of the build system.... probably that's a massive oversimplification
<vivien>That’s pretty much it, but you can mix and match bits that are in another context
<Luk6655>your answer to the "what's the difference" question was correct, it does work with the forkexec constructor with the action quoted
<jpoiret>vivien: #~' is just #~(quote ...)
<Luk6655>I think I like this version a lot more than the one that creates a script
<vivien>jpoiret, is there #~` as well?
<jpoiret>Those aren't special
<Luk6655>I'll be sending this service as a patch to guix, no doubt there will be some feedback then as well
<jpoiret>Basically, anything after #~ is read by guile's read procedure
<jpoiret>Remember though that macros are expanded at read time :)
<Luk6655>I have to pop out, thanks again
<chris314>@bdju: I wrote earlier that I bought a T500: I don't know where I got that from but it's a t440p... sorry. The wifi card (with bluetooth) is not free according to RYF but I can change it.
<bdju>chris314: oh, okay. that sounds right. I got a replacement card for mine, but need to install coreboot to remove the hardware whitelist. for now I just left the slot empty.
<chris314>On my t440p, I already have osboot (libreboot) installed, so I think that installing the new card will not be a problem.
<jab>chris314: how did you install osboot? It looks like it has to be built, and I can't figure out how to build it.
<ux_man>hi all! How can I enable cupsd?
<podiki[m]>you probably want the cups service:
<podiki[m]>(see also manual about services in general if you haven't used one before)
<ux_man>podiki[m]: thx! where do I put the operating system definition?
<podiki[m]>if you used the installer, probably it put it at /etc/config.scm but you can have the file anywhere (sudo guix system reconfigure /path/to/your/config)
<podiki[m]>see the manual about system configuration if you haven't used it before
<ux_man>podiki[m]: I did use the installer! So I suppose I need to be root to edit that file /etc/config.scm
<ux_man>podiki[m]: ok
<vivien>It was not enabled by default in the installer last time I checked
<podiki[m]>you can just copy the file
<podiki[m]>doesn't matter where it is or who owns it, but the actual system reconfigure command needs to be run with sudo
<ux_man>I have to get used to all this :)
<podiki[m]>vivien: you mean cups? probably depends on which template you start with? (haven't checked)
<unmatched-paren>antipode: fair enough about typosquatting; though since the Go pkg installer seems to lock versions to a single ref (unlike rust's semver thing), so i don't think you can unexpectedly pull in a new (possibly malicious) version
<unmatched-paren>antipode: that said, i'm not too familiar with go, so "locked to a ref" may be incorrect
<unmatched-paren>Oh yes, there's also no equivalent afaics
<ux_man>did I do this right?
<ux_man>maybe too many bracelets
<ux_man>no, that was fine
<ux_man>but I get this error
<podiki[m]>probably what the manual says about including the module for the cups package "you need to use the (gnu packages cups) module"
<Andronikos>Is it possible to install older Python versions like 3.5?
<pkill9>Andronikos: yeah, simplest way is to use guix time-machine to build it from a previius guix commit
<pkill9>you could also create a package for an older version
<mbakke>Andronikos: you can reach it with 'guix time-machine', i.e. 'guix time-machine --commit=1c055d72585bd075e20ad0b41942d501d0b38656' -- build python
<mbakke>there is also a 'guix-past' channel with old versions of software using the current toolchain, but they don't seem to have Python 3.5 yet:
<pkill9>nice to see many different guix channels for different things
<mbakke>oh, the polkit update on 'staging' does not work very well
<ux_man>podiki[m]: I dont get it :(
<ux_man>thats how my /etc/config.scm looks now
<jpoiret>ux_man: you want (gnu services cups)
<jpoiret>you can use `guix system search cups`
<Andronikos>mbakke: If I do "guix time-machine --commit=1c055d72585bd075e20ad0b41942d501d0b38656 -- build python" I get: error: %guix-register-program: unbound variable
<ux_man>jpoiret: thank you very much
<mbakke>Andronikos: oh, apparently python 3.5 precedes the invention of the time machine, sorry about that :/
<ux_man>jpoiret: could you just take a quick look if the formating of my /etc/config.scm is fine like that?
<Andronikos>Ah okay. It is still helpful to me. Thanks for the help.
<mbakke>Andronikos: it may still be possible the "old fashioned" way of checking out that commit with git and running "./configure --localstatedir=/var --sysconfdir=/etc && make -j $(nproc) && ./pre-inst-env guix build python", if you are really determined :-)
<Andronikos>ux_man: There is "guix style --whole-file" for this purpose.
<jpoiret>looks ok to me
<ux_man>jpoiret: thx again
<jpoiret>mbakke: you're missing ./bootstrap iirc
<mbakke>right, that should be the very first step
<Kabouik>I am trying to update i3status-rust but the hash I am getting with guix hash -r /path/to/file/v0.22.0.tar.gz does not match the actual hash when I try to compile the package
<Kabouik>Any obvious trap I might have fallen into?
<Kabouik>I also tried cloning the git repo and checking out to the target tag (version in the .scm file) and then guix hash -r on that, but that's not it either.
<Kabouik>Oh, extracting the tarball and guix hash on that was the solution.
<msh3000>did you try 'guix download url_to_code'? That spits out a sha256 that has been converted to base32 at the end
<Kabouik>Thanks anyway. The build spit other errors later though, I thought it would just be a matter of changing the hash and version to update the package (it's more than 1 year old and the current config examples they provide don't work with our current Guix package), but there must be new dependencies.
<pashencija[m]><Kabouik> "I also tried cloning the git..." <- guix hash -rx
<pashencija[m]>* guix hash -rx .
<pashencija[m]>Inside the repo
<pashencija[m]>Without x, it will fail you
<Kabouik>That gives the same hash indeed, thanks, will now it for next time