Re: London Guix meetup

2023-06-28 Thread Arun Isaac


Hi all,

We had a good turnout with 8 attendees. Thank you all for coming! We may
have another meetup in a month or so. Looking forward to seeing you all
again and hope to see new faces too!

Regards,
Arun



Re: London Guix meetup

2023-06-28 Thread Arun Isaac


Hi Etienne,

> Oops. I missed that! Is this a regular thing?
> Is there a UK community of sort, e.g. online platform, mailing list and so
> forth?

Nope, this was just the first meetup. There may be another meetup in a
month or so. We don't have any separate online presence yet.

Regards,
Arun



Re: London Guix meetup

2023-06-28 Thread Philip Beadling

>We had a good turnout with 8 attendees. Thank you all for coming! We may
>have another meetup in a month or so. Looking forward to seeing you all
>again and hope to see new faces too!

Thanks for organising Arun, was lovely to meet everyone and look forward to the 
next time,

Phil.






Re: London Guix meetup

2023-06-28 Thread Etienne B. Roesch
Oops. I missed that! Is this a regular thing?
Is there a UK community of sort, e.g. online platform, mailing list and so
forth?

Etienne

On Wed, Jun 28, 2023 at 11:15 AM Arun Isaac 
wrote:

>
> Hi all,
>
> We had a good turnout with 8 attendees. Thank you all for coming! We may
> have another meetup in a month or so. Looking forward to seeing you all
> again and hope to see new faces too!
>
> Regards,
> Arun
>
>


Re: distributed substitutes: file slicing

2023-06-28 Thread Florian Klink

On 23-06-21 00:44:06, Csepp wrote:

I have a question / suggestion about the distributed substitutes
project: would downloads be split into uniformly sized chunks or could
the sizes vary?
Specifically, in an extreme case where an update introduced a single
extra byte at the beginning of a file, would that result in completely
new chunks?

An alternative I've been thinking about is this:
find the store references in a file and split it along these references,
optionally apply further chunking to the non-reference blobs.

It's probably best to do this at the NAR level??

Storing reference offsets is already something that we should be doing to
speed other operations up, so this could tie in nicely with that.


A bit late to the party, but I've been toying around with a different
model to represent contents inside store paths - see [tvix-store-docs]
for more details.

Essentially, tvix-store internally uses a model similar to git trees,
but with Blake3 as a digest for blobs (regular file contents).
Even with all that, you can still put on a NAR lens, and get back a
byte-by-byte identical NAR representation of a store path.

Because blake3 enables [verified streaming][bao], there's no need to
make granular chunking part of the information to encode - it can be a
transport concern only. It also allows easy "seeking" into different
parts of a store path, and due to content-adressability, easy partial
fetching.

I've been playing around with using a blob storage implementation
storing these blobs with content-defined chunking (and eventually
exposing more granular chunking data to clients).
Due to the "decomposition" of the NAR (storing blobs separately from the
"surrounding skeleton"), we always look at file contents separately.

I didn't yet run any benchmarks on whether it makes sense to "blank out"
store paths before ingesting, and dynamically applying these references
on top, but would be interested in some discussion around some
experiments.


flokli

--

[tvix-store-docs]: https://cs.tvl.fyi/depot/-/tree/tvix/store/docs
[bao]: https://github.com/oconnor663/bao



Stable endpoint to fetch guix binary

2023-06-28 Thread André A . Gomes
Hello Guix,

The latest Guix binaries can be fetched via

https://ci.guix.gnu.org/search/latest/archive?query=spec:tarball+status:success+system:x86_64-linux+guix-binary.tar.xz

However, this doesn't always work.  For instance, as of now, it returns
error 502.

Is there a more reliable way to get it?  Thanks!


-- 
André A. Gomes
Atlas Engineer - https://atlas.engineer/



shepherd service, unexplained permission errors

2023-06-28 Thread Attila Lendvai
dear Guix,

i have a daemon that i (try to) run/start through Shepherd's fork+exec-command, 
with a specific user and group. i can start it up using su or sudo, both work:

$ sudo --user zigbee2mqtt bash -c "guix shell node gcc-toolchain make python 
libuv -- bash -c 'cd /srv/zigbee2mqtt && npm start'"

# su zigbee2mqtt --command "guix shell node gcc-toolchain make python libuv -- 
bash -c 'cd /srv/zigbee2mqtt && npm start'"

but through Shepherd the daemon fails while starting up due to a permission 
denied error:

"Error: Permission denied, cannot open /dev/ttyUSB0"

$ ls -l /dev/ttyUSB0 
crw-rw 1 root dialout 188, 0 Jun 28 21:04 /dev/ttyUSB0

i created a user for that daemon, and added dialout as a supplementary group:

(user-account
 (name "zigbee2mqtt")
 (comment "zigbee2mqtt service")
 (group "homeaut")
 (supplementary-groups '("dialout"))
 (system? #true))

(user-group
 (name "homeaut")
 (system? #true))

i start the service like this:

(simple-service
  'zigbee2mqtt
  shepherd-root-service-type
  (list
   (shepherd-service
(requirement '(...))
(provision '(...))
(documentation "")
(start
 #~(lambda _
 (let* ((cmd (list
  "guix" "shell"
  "node" "gcc-toolchain" "make" "python" "libuv"
  "--"
  "bash" "-c" "cd /srv/zigbee2mqtt && npm start")))
   (fork+exec-command
cmd
#:log-file "/var/log/zigbee2mqtt.log"
#:user "zigbee2mqtt"
#:group "homeaut")))

so, my question boils down to this:

what is different in the two environments? what am i missing?

PS: i have another daemon where i have a very similar issue, so it's probably 
not a daemon-specific issue.

PS2: i know that i should package zigbee2mqtt, but i'm taking this shortcut 
because life is short.

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“The trouble is, you think you have time.”
— Siddhartha Gutama, aka Buddha (c. 5th century BC)




Re: shepherd service, unexplained permission errors

2023-06-28 Thread Development of GNU Guix and the GNU System distribution.
Hi Attila,

On Wed, Jun 28, 2023 at 1:27 PM Attila Lendvai  wrote:
>
> but through Shepherd the daemon fails while starting up due to a permission 
> denied error:
>
> i created a user for that daemon, and added dialout as a supplementary group:
>
>  (supplementary-groups '("dialout"))
>
>(fork+exec-command
> cmd
> #:log-file "/var/log/zigbee2mqtt.log"
> #:user "zigbee2mqtt"
> #:group "homeaut")))

The declaration of Shepherd's fork+exec-command has another optional
parameter for "supplementary-groups" [1] which is passed straight to
exec-command. [2]

With a double negation, the language in the manual is a bit hard to
parse, but the explicit argument may be required in order for the
supplementary group to work the way you expect:

"Likewise, command will be run under the current group, unless the
group keyword argument is present and not false, and
supplementary-groups is not '(). " [3]

Kind regards
Felix

[1] 
https://git.savannah.gnu.org/cgit/shepherd.git/tree/modules/shepherd/service.scm#n1569
[2] 
https://git.savannah.gnu.org/cgit/shepherd.git/tree/modules/shepherd/service.scm#n1610
[3] 
https://www.gnu.org/software/shepherd/manual/shepherd.html#index-exec_002dcommand



Re: modifying (rather than fully replacing) a build phases

2023-06-28 Thread Csepp


John Kehayias  writes:

> My question remains, but I've updated the patch in question to use
> #:make-flags (thanks to mirai for the idea), separating out these
> parameters from the build command and making this a much easier
> change.
>
> Still, we have examples of just copying some phase by hand to make
> adjustments, is there anything better we can/should do?
>
> On Tue, Jun 27, 2023 at 12:29 PM, John Kehayias wrote:
>
>> Hi Guixers,
>>
>> A question that is either relatively simple or else getting into the
>> weeds a bit, that I came across in my proposed patch
>>  The general question is: how can I
>> modify a build phase without replacing it completely? More
>> specifically (as seen in the proposed patch) there is a build phase
>> consisting of just an "apply invoke" call where I want to remove one
>> of the arguments given. Is there a simple way to do this rather than
>> just manually copying and deleting that string?
>>
>> I would assume so, but I wasn't sure how to do it and couldn't quite
>> grep any examples. Some light exploring in the guix repl shows me that
>> package-arguments is a keyword list (not sure the proper terminology
>> in Guile) with #:phases a big gexp. Essentially I want to modify that
>> to remove a string. I suppose it is a question of manipulating a gexp
>> directly. (I'm sure macros can do all this but there doesn't seem to
>> be a need for that at this level, right?)
>>
>> Thanks in advance!
>> John

I think I've used assoc-ref to find the build phase I wanted and then
called it from something else.  It's not super pretty, but it works.