IRC channel logs

2014-12-14.log

back to list of logs

<nkar>are there any guides on configuring the system (X, audio, etc.), which cover guix-specific things?
<davexunit>do we have a regexp for matching nix hashes? there must be, but I haven't found it yet.
<davexunit>just wrote my own for now.
*davexunit hacks on 'guix publish'
***kmic is now known as kmicu
<davexunit>good morning #guix
<davexunit>trying to figure out how to generate a narinfo file for a given hash. hydra can generate them for outputs of a derivation, but I can't figure out how.
<davexunit>time to dive into the source...
<mark_weaver>davexunit: I think "guix authenticate" is part of it, but I'm not sure. I'll find out by looking on hydra.
<davexunit>mark_weaver: from my search, it looks like I need to write a wrapper for an RPC
<davexunit>once I have the store path, it seems that I can use the query-path-info operation to get the details needed to build the narinfo
<davexunit>that seemed to do the trick.
<davexunit>now i can associate an output with the derivation it came from.
<mark_weaver>On hydra, I see perl code to generate the narinfo file, or at least most of it. hydra is written in perl.
<mark_weaver>it's fairly simple though.
<davexunit>yeah, that's the code I was reading.
<davexunit>generating the narinfo text is easy, the confusing part for me is taking any arbitrary hash and generating the correct narinfo.
<davexunit>the logic seems different depending upon if the hash corresponds to a derivation file or a derivation output.
<mark_weaver>what are you working on?
<davexunit>guix publish.
<mark_weaver>nice!
<davexunit>I have the basics working
<davexunit>hmm, adding that new store operation causes all following operations to fail after the first time it is called...
<tadni>Would ncurses be a decent thing to ship with %base-packages, since it has clear included with it? That seems like a pretty expected command for most people to have right out of the gate.
<tadni>
<tadni>Should*
<tadni>Actually, I guess would works there. :^P (Just woke up).
<davexunit>sounds reasonable to me.
*tadni has been playing around with the idea of his own spin of the-aptly-named "GNUish Kinda Distro" to get more familar with the innerworking of Guix, and has been noticing a few small things here and there like this.
<davexunit>yeah there's lot of little things like that hanging around.
<davexunit>adding ncurses to %base-packages is an easy one to patch :)
<tadni>If we ever get that ncurses based installer for packages too, it makes sense to ship anyways.
<mark_weaver>I'm not sure that %base-packages should be the set of packages that users typically expect in a real system. that's a very slippery slope.
<mark_weaver>maybe we should have some other variables for things like this, or just recommended sample os-config files.
<davexunit>yeah, that's a good point.
<davexunit>I think ncurses is a pretty low-level thing, though.
<jmd>I've often wondered if clear really belongs in ncurses.
<tadni>mark_weaver: I mean, I think just about every even causual tty user expects clear. Too, again, if we do have aspirations to make that ncurse's based installer -- it'd be included eventually, no?
<davexunit>well, ncurses would be included with an install image that used said interface
<davexunit>but there's no reason it needs to be on a system that was created without it.
<davexunit>to go all the way down the slippery slope, xfce would be a bad thing to include in %base-packages
<mark_weaver>I also have mixed feelings about civodul recently adding man-db and sudo to %base-packages.
<mark_weaver>if people want %base-packages to mean this, then maybe the thing is to have another variable that has less stuff in it, like %minimal-base-packages or something.
<tadni>davexunit: Eh, it's relatively light in comparision shipping guix.el for Emacs -- to just have guix-ncurses shipping in some way or another. :^P
<davexunit>yeah but emacs isn't in %base-packages.
<tadni>Other distros ship ncurses-based frontends and people don't care.
<tadni>davexunit: Emacs isn't expected for day-to-day Unix use.
<tadni>Clear, I think is.
<davexunit>but %base-packages isn't about what is expected for day-to-day use.
<tadni>Can we establish a clear definiton of what %base-packages is.
<davexunit>I'm personally fine with adding ncurses, but mark_weaver is correct to point out that it is a slippery slope. we should use other variables to make collections of useful things and let users concatenate and filter and add what they want.
<tadni>I'd be fine with another environment variable, and we could move mandb, sudo, ncurses, etc to it -- if it really doesn't fit.
<davexunit>personally, I just install all that stuff under my user profile.
<davexunit>I don't want the system profile to have much of anything.
<mark_weaver>tadni: "environment variable" means something else. these aren't environment variables.
<mark_weaver>they are just variables
<tadni>mark_weaver: Ah yeah, didn't even think of them meshing with the standard definiton of such. I just meant, within the context of guix -- variables that define the environment via default packages.
<mark_weaver>but yeah, I don't care what the variables are called, and it may be reasonable to use %base-packages in this way. I guess I just think that we should have a more minimal one also.
<mark_weaver>personally, I never use sudo, because I think it's a bad idea.
<mark_weaver>but I suppose I'm in the minority there, heh.
<tadni>In any case, I think there is value in having a %unix-extra-packages or whatever -- but again, I don't know what %base-packages, finitely is. Is there an explination in the manual.
<tadni>?
<mark_weaver>so now I'll have to delete it from %base-packages in my os-config, which I find annoying.
<mark_weaver>tadni: you can search the manual as well as we can. in section 6.2.1 it says: "The %BASE-PACKAGES variable provides all the
<mark_weaver>tools one would expect for basic user and administrator tasks—including
<mark_weaver>the GNU Core Utilities, the GNU Networking Utilities, the GNU Zile
<mark_weaver>lightweight text editor, ‘find’, ‘grep’, etc."
<mark_weaver>so I guess the decision has already been made to include things in it that not everyone wants. fair enough. I guess I'm looking for a more minimal variable with a different name, then.
<mark_weaver>nevermind me :)
<davexunit>I think that would be a good idea.
<tadni>mark_weaver: Evidently I can't search as well as you can, seeing I was looking and unable to find it. :^P
<mark_weaver>tadni: if you load the info manual in emacs, you can just type 's' (regexp-search), and then base-packages RET
<mark_weaver>I guess I'm being cranky again. Sorry about that.
<tadni>mark_weaver: I mean, would it not be trivial to prune %base-packages and put this desried collection in a %small-base-system. Problem is, even a small/minimal collection of packages is going to be subjective to most people.
<mark_weaver>tadni: good point
<mark_weaver>it's possible that there's really no compelling need for what I was thinking of. if you want a more minimal system, you can just specify the full set of packages you want, and avoid the use of any canned variable.
<tadni>Also, does zile not use ncurses? That's a bit shocking.
<mark_weaver>it probably does, but that doesn't imply it ends up in the profile.
<mark_weaver>so it's in the store somewhere, but not in /run/current-system/profile/bin
<tadni>Ah, okay.
<mark_weaver>anyway, I withdraw my objection to adding ncurses to %base-packages.
<mark_weaver>another way to search the manual, that doesn't involve emacs, is to load up the "all in one page" version of the manual on gnu.org: https://www.gnu.org/software/guix/manual/guix.html
<mark_weaver>good morning, civodul!
<mark_weaver>well, it's morning here anyway, just barely :)
<tadni>mark_weaver: Ah, I was using the multi-paged manual and digging through that. I wish that had a search bar, you'd think that would be trivial to implement. :^P
<tadni>Might be a fun project.
<tadni>mark_weaver: I forgot, are you in MA?
<tadni>We still have about 1:30 till noon, in the Midwest.
<civodul>Hello Guix!
<tadni>civodul: Yo, civ!
*civodul pushed a better nscd config
<amirouche>I went crazy yesterday (and the day before), I installed guix on my main machine ^^
<amirouche>I got nouveau drivers working, I mean it's reported by xorg to be working, did do 3d tests yet
<amirouche>maybe a mail might be better... but this sound terribly "ugly"
<tadni>amirouche: I haven't gone the "main machine route" and technologically such a thing might not be possible due to issues with such a box's UEFI ... but I have a fully working guix-gen-distro on this box I am at currently. :^)
<tadni>It would be a real shame, if I really couldn't get guix-gen-distro on my main box -- but I'm thinking there's probably about a 50/50 on that. I'm just packaging Stumpwm and Mypaint away, from being software wise, where I'd want to be in-order to use guix-gen-distro for day to day use.
<tadni>Is 50/50 the right phrasing ... that'd mean 1, which means 100%.
<DusXMT>tadni: It's meant to mean 1 to 1, as in, there's equal chance of it working and not working. And, as it turns out, 1/1, the same as 50/50, evaluates to 1
<tadni>So 1:1?
<DusXMT>Yup
<amirouche>tadni: my bios has a simple "hdd" entry and uefi, that works without trouble
<tadni>amirouche: Mine does too, but it's very hit and miss. Trisquel doesn't work at all on it, aed Parabola requires the CD to be in the slot at boot.
<tadni>USB drive boot, doesn't work at all.
<tadni>Only discs.
*tadni will probably do some freelance or something next year, and try to grab a Librem or Novena by 2016. :^P
<amirouche>tadni: or glug glug thinkpad
<amirouche>it's boots very very quickly
<amirouche>it has grub2 as bios
<tadni>amirouche: My concern is not speed or even computational power, mine is mostly battery.
<tadni>I want something that can last my whole class day, without dimming the screen to almost nil.
<tadni>school day*
<amirouche>sorry I don't know about the battery more than 5 hours probably
<tadni>amirouche: The Librem boasts, I think 8? If I could get a little over 6, that'd probably be good. Worst case scenario, I set up my schedule in such a way that gives me an hour or two to recharge. :^P
<amirouche>kind of painful. that said I never when to shool with a laptop
<amirouche>s/when/went
<tadni>amirouche: I mean, to be fair, 1/3 of my classes with be maths ... so yeah, probably don't need it there.
<tadni>So maybe 5 hours is fine.
<tadni>will be*
<tadni>In any case, I plan to have /some/ Libre box as my main box, for GNUish Kindaish Distro, by the end of next year. :^)
*davexunit has a half-working 'guix publish' server
<davexunit>/nix-cache-info and /<hash>.narinfo resources implemented, now to /nar/<hash>.nar
<civodul>yay!
<Sleep_Walker>nice
<davexunit>or rather nar/<store-path>
<davexunit>to follow hydra's convention
<davexunit>even though guile is missing some high level web libraries that would make things more convenient, writing web apps in guile is great.
<civodul>use 'export-paths' from (guix store) for nar/*
<davexunit>civodul: yup, that's what I'm doing now :)
<civodul>cool!
<civodul>exciting stuff :-)
<davexunit>I need to figure out how to sign the narinfo and nar files
<davexunit>I left that part out for now
<civodul>ok, it's a good idea to start like that
<civodul>there's a cheat code to test unsigned archives
<civodul>it's $GUIX_ALLOW_UNAUTHENTICATED_SUBSTITUTES
<davexunit>once I'm reasonably sure that this works, I'm going to publish my laptop's store and test that desktop can fetch substitutes from it.
<davexunit>awesome
<davexunit>civodul: does the exporter currently use any compression?
<civodul>yes, Hydra uses bzip2
<civodul>but you can set it to "none"
<civodul>in the narinfo
<davexunit>hmm, I'm a bit confused.
<davexunit>does export-paths use any compression>
<davexunit>?*
<davexunit>or do I want to compress the result of that?
<civodul>ah no, export-paths doesn't use any compression
<civodul>you would need to compress its output, yes
<civodul>but as a first step, you can leave it uncompressed
<davexunit>okay, so for now I'll test with no compression
<civodul>yeah
<davexunit>there can be a --compression option
<civodul>yes
<davexunit>I haven't yet made any options, I'll work on configurability once I know it works.
<davexunit>which I'm about ready to test. :)
<davexunit>what's the name for the part of a store path that is after the store directory? /gnu/store/<this-thing>
<civodul>"hash part"
<davexunit>okay
<davexunit>thanks
<civodul>there's store-path-hash-part to extract it
<civodul>someday we should change "store path" to "store item" everywhere
<davexunit>sounds good
<davexunit>it's a lot of fun to hack on a web server with the repl server.
<civodul>heh :-)
<davexunit>just over a hundred lines for this so far, not bad. it will grow a bit once I add in signing and command line arg processing, but it's pretty neat how little code it took.
<davexunit>now, how to add a substitute machine without a key...
<civodul>run "GUIX_ALLOW_UNAUTHENTICATED_SUBSTITUTES=yes guix-daemon --substitute-urls="http://localhost/..."
<civodul>you're fast!
<davexunit>awesome, thanks.
<davexunit>well, I cut some corners :P
<davexunit>all the polish will come after if this works...
<civodul>makes sense
<civodul>you may have to "rm -rf /var/guix/substitute-binary/cache" to make sure you're the server is really accessed
<davexunit>civodul: okay, I plan to test with a custom package that is only available for substituting via my laptop's cache
<civodul>alternately, you could try running 'guix substitute-binary' by hand
<davexunit>oh cool, I can try that.
<civodul>see the examples in tests/substitute-binary.scm
<davexunit>will do
<civodul>things like: echo "have /gnu/store/foo | guix substitute-binary --query"
<civodul>err, misplaced quotes
<davexunit>neat
<civodul>we don't have an 'eject' command, so here goes: http://paste.lisp.org/+33NB
<davexunit>cool!
<civodul>doing that from Scheme is fun :-)
<davexunit>does guix build not honor GUIX_PACKAGE_PATH ?
<civodul>it honors it
<civodul>but mark_weaver reported a bug about patches not being searched there
<civodul>(i haven't looked yet)
<davexunit>hmmm, okay.
<davexunit>I'll have to investigate the weird behavior I experienced.
<Sleep_Walker>ERROR: In procedure system*:
<Sleep_Walker>ERROR: Wrong type (expecting string): (string-append "-DCMAKE_CXX_FLAGS=" (or (getenv "CXXFLAGS") "") " -fPIC")
<Sleep_Walker>(I'm trying another approach after David's review)
<Sleep_Walker>(string? ) on the above returns #t, why does it rants it is not string?
<civodul>Sleep_Walker: 'system*' takes one or more arguments, all of which must be strings
<civodul>like (system* "ls" "-l" "-a")
<civodul>apparently above there's an extra quote before (string-append ...)
<davexunit>I did a 'guix pull' on my desktop to make sure that I had the latest packages such that my laptop could provide substitutes, yet it isn't working.
<Sleep_Walker>I changed '((string-append ...)) to (list (string-append ...)) and it worked
<civodul>cool
<civodul>davexunit: did you try running 'guix substitute-binary --query'?
<davexunit>civodul: I didn't run that specifically, but I know the hashes my desktop guix was trying to fetch
<davexunit>and they aren't in my laptop's store
<civodul>and was there any connection to the guix publish server?
<davexunit>yeah
<davexunit>at the time it was throwing 500 errors (oops), but I fixed that.
<civodul>could you check /var/guix/substitute-binary/cache/XXX, where XXX is that hash that was queried?
<civodul>that'll show you how the narinfo was interpreted
<davexunit>okay
<davexunit>civodul: (narinfo (version 1) (cache-uri "http://192.168.1.157:8080") (date 1418578344) (value #f))
<civodul>good!
<civodul>(value #f) means that it got 404 or something like that
<civodul>is that expected?
<davexunit>500 in this case
<civodul>ah right, 500 :-)
<civodul>so you can remove that /var/guix/substitute-binary/cache/xxx, and then try again
<civodul>assuming you fixed the 500 ;-)
<davexunit>I fixed the 500, it should have been 404
<davexunit>I might just clear the cache and try again
<civodul>ah well, from substitute-binary's viewpoint, anything other than 200 is bad
<davexunit>yeah
<davexunit>that hash wasn't in my store
<davexunit>so nothing to return but 404
<civodul>ok, so everything is working as expected so far
<davexunit>I'm just confused why it wasn't in the store...
<davexunit>I just built the same package that I'm trying to install on the other machine.
<civodul>dunno, but try with an item that you're sure is in the store
<civodul>one thing at a time ;-)
<davexunit>okay
<davexunit>hmmm, I have a path part for which a derivation is not found...
<davexunit>I can't figure out how this happened.
<davexunit>or how to fix it...