Re: Guix on other distros: Gentoo. [You run Gentoo? Please help testing.]

2016-09-24 Thread ng0
Hi,

I don't like to leave questions open. What if someone else finds this in
the future and wonders how we solved it? Find the answer below.

Efraim Flashner  writes:

> On Fri, Aug 05, 2016 at 07:02:14PM +, ng0 wrote:
>> 
>> The disfunctional thing currently is:
>> 
>> guixbuilder01 ... guixbuilder10 get created and added to guixbuild
>> group.
>> 
>> Post-setup I let root authorize hydra's pubkey, then I run
>> `rc-service start guix' which sadly makes the terminal unusable if you
>> don't append "&".
>> 
>> running guix pull then as root downloads happen, but as soon as builder
>> should start, it fails:
>> 
>> shikahr ~ # guix pull
>> 
>> Starting download of /tmp/guix-file.RpedfI
>> From http://git.savannah.gnu.org/cgit/guix.git/snapshot/master.tar.gz...
>>  ….tar.gz   1.1MiB/s 00:10 | 10.3MiB
>>  transferred
>>  unpacking
>>  '/gnu/store/h33fva5hvrw7z99vrn3ivnh07mgg55qc-guix-latest.tar.gz'...
>>  substitute: updating list of substitutes from
>>  'https://mirror.hydra.gnu.org'... 100.0%
>>  The following derivations will be built:
>> /gnu/store/yw3dzq3nlngki5bd8z5yp1aslvzsjh1n-guix-latest.drv
>> /gnu/store/2gyrssyswj0p2z6yr7938kln20piy4w6-module-import.drv
>> /gnu/store/jb6ir2q5j8lwmdcqlhs7c4vdkgllcjga-module-import-compiled.drv
>>   building path(s)
>>`/gnu/store/35xw5kccyq76v8zgkdrnx1z9w8s6ll7m-module-import'
>> guix pull: error: build failed: the build users group
>>   `guixbuild' has no members
>>   shikahr ~ # id -nG guixbuilder01
>>   guixbuild
>>   shikahr ~ # id -nG guixbuilder1
>>   id: guixbuilder1: no such user
>>   
>> 
>> I know the openrc service is total crap because if you don't kill every
>> instance of guix-daemon before shutdown/reboot, you have almost 30
>> minutes delay.
>> OpenRC services are not my favorit thing to write, but it should just
>> work.
>> 
>> Also strange enough a sequence from 1 - 10 in ebuild creates users 01 -
>> 10.
>> 
> one thing you could try as a work around is to only make 9 builders, or
> to number the builders from 10 to 19.

This is how lynX worked around it for my ebuild:

pkg_setup() {
enewgroup guixbuild
g=0
for i in `seq -w 0 9`;
do
enewuser guixbld$i -1 -1 /var/empty guixbuild;
if [ $g == 0 ]; then
g="guixbld$i"
else
g="$g,guixbld$i"
fi
done
# For some strange reason all of the generated
# user ids need to be listed in /etc/group even though
# they were created with the correct group. This is a
# command that patches the /etc/group file accordingly,
# but it expects perl to be installed. If you don't have
# perl installed, you have to do this manually. Adding a
# dependency for this is inappropriate.
perl -pi~ -e 's/^(guixbuild:\w+:\d+):$/\1:'$g'/' /etc/group
}

With the current version I was able to build+install "hello". What's now
missing is fixing the service, otherwise you can safely run Guix on
Gentoo.

> -- 
> Efraim Flashner  אפרים פלשנר
> GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
> Confidentiality cannot be guaranteed on emails sent or received unencrypted
>
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
  ng0



Re: Guix on other distros: Gentoo. [You run Gentoo? Please help testing.]

2016-08-20 Thread Efraim Flashner
On Fri, Aug 05, 2016 at 07:02:14PM +, ng0 wrote:
> 
> The disfunctional thing currently is:
> 
> guixbuilder01 ... guixbuilder10 get created and added to guixbuild
> group.
> 
> Post-setup I let root authorize hydra's pubkey, then I run
> `rc-service start guix' which sadly makes the terminal unusable if you
> don't append "&".
> 
> running guix pull then as root downloads happen, but as soon as builder
> should start, it fails:
> 
> shikahr ~ # guix pull
> 
> Starting download of /tmp/guix-file.RpedfI
> From http://git.savannah.gnu.org/cgit/guix.git/snapshot/master.tar.gz...
>  ….tar.gz   1.1MiB/s 00:10 | 10.3MiB
>  transferred
>  unpacking
>  '/gnu/store/h33fva5hvrw7z99vrn3ivnh07mgg55qc-guix-latest.tar.gz'...
>  substitute: updating list of substitutes from
>  'https://mirror.hydra.gnu.org'... 100.0%
>  The following derivations will be built:
> /gnu/store/yw3dzq3nlngki5bd8z5yp1aslvzsjh1n-guix-latest.drv
> /gnu/store/2gyrssyswj0p2z6yr7938kln20piy4w6-module-import.drv
> /gnu/store/jb6ir2q5j8lwmdcqlhs7c4vdkgllcjga-module-import-compiled.drv
>   building path(s)
>`/gnu/store/35xw5kccyq76v8zgkdrnx1z9w8s6ll7m-module-import'
> guix pull: error: build failed: the build users group
>   `guixbuild' has no members
>   shikahr ~ # id -nG guixbuilder01
>   guixbuild
>   shikahr ~ # id -nG guixbuilder1
>   id: guixbuilder1: no such user
>   
> 
> I know the openrc service is total crap because if you don't kill every
> instance of guix-daemon before shutdown/reboot, you have almost 30
> minutes delay.
> OpenRC services are not my favorit thing to write, but it should just
> work.
> 
> Also strange enough a sequence from 1 - 10 in ebuild creates users 01 -
> 10.
> 
> -- 
> ♥Ⓐ  ng0
> Current Keys: https://we.make.ritual.n0.is/ng0.txt
> For non-prism friendly talk find me on http://www.psyced.org
> 

one thing you could try as a work around is to only make 9 builders, or
to number the builders from 10 to 19.

-- 
Efraim Flashner  אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Re: Guix on other distros: Gentoo. [You run Gentoo? Please help testing.]

2016-08-05 Thread ng0
Leo Famulari  writes:

> On Thu, Aug 04, 2016 at 10:01:39PM +, ng0 wrote:
>> TL;DR: Guix on Gentoo, need testers with moar isolated Gentoo
>> VMs/systems. Don't blame me when it breaks your precious system, I said
>> I needed testers.
>> 
>> 
>> Hi,
>> 
>> Since Gentoo upstream decided to finally solve their very old #355355
>> bug on ~20:00 UTC today, I take this opportunity to clean our Gentoo
>> overlay from ebuilds we needed for guix so far and ask for potential
>> testers.
>> 
>> For people interested in debugging and participation:
>> 
>> Guix is now available from within Gentoo for a while already, as a
>> development (request for debugging help) package. With the inclusion of
>> our collaborative overlay in Gentoo's in/official list of overlays,
>> Guix on Gentoo is only 2 commands away in Gentoo and Gentoo
>> based systems:
>>   layman -a youbroketheinternet
>>   emerge --ask sys-apps/guix
>> 
>> When you torsocks/torify this or all your connections go through tor,
>> it should pick up one of 2 onionland instances this is available on,
>> else it falls back to .is and .org
>> 
>> 
>> It's not 100% finished yet (openrc service is not fully functional),
>> please read the included TODO.org file in the overlay.
>> 
>> The overlay is also accessible from direct git checkouts, read the page
>> on wiki.gentoo.org keyword search for Overlay youbroketheinternet or
>> visit http://youbroketheinternet.org/#overlay or
>> http://we.make.ritual.n0.is [section: CODE].
>
> Thanks for leading this work! I don't have Gentoo experience, so I can't
> offer much help, but I'm glad to see this being done.

I probably should've asked for help here earlier, the first commit of
guix in the overlay was probably some time back in january, but only now
you do no longer require the workarounds for outdated guile on gentoo we
had, so less annoyance if you don't run many test VMs.

The disfunctional thing currently is:

guixbuilder01 ... guixbuilder10 get created and added to guixbuild
group.

Post-setup I let root authorize hydra's pubkey, then I run
`rc-service start guix' which sadly makes the terminal unusable if you
don't append "&".

running guix pull then as root downloads happen, but as soon as builder
should start, it fails:

shikahr ~ # guix pull

Starting download of /tmp/guix-file.RpedfI
>From http://git.savannah.gnu.org/cgit/guix.git/snapshot/master.tar.gz...
 ….tar.gz   1.1MiB/s 00:10 | 10.3MiB
 transferred
 unpacking
 '/gnu/store/h33fva5hvrw7z99vrn3ivnh07mgg55qc-guix-latest.tar.gz'...
 substitute: updating list of substitutes from
 'https://mirror.hydra.gnu.org'... 100.0%
 The following derivations will be built:
/gnu/store/yw3dzq3nlngki5bd8z5yp1aslvzsjh1n-guix-latest.drv
/gnu/store/2gyrssyswj0p2z6yr7938kln20piy4w6-module-import.drv
/gnu/store/jb6ir2q5j8lwmdcqlhs7c4vdkgllcjga-module-import-compiled.drv
  building path(s)
   `/gnu/store/35xw5kccyq76v8zgkdrnx1z9w8s6ll7m-module-import'
guix pull: error: build failed: the build users group
  `guixbuild' has no members
  shikahr ~ # id -nG guixbuilder01
  guixbuild
  shikahr ~ # id -nG guixbuilder1
  id: guixbuilder1: no such user
  

I know the openrc service is total crap because if you don't kill every
instance of guix-daemon before shutdown/reboot, you have almost 30
minutes delay.
OpenRC services are not my favorit thing to write, but it should just
work.

Also strange enough a sequence from 1 - 10 in ebuild creates users 01 -
10.


#!/sbin/openrc-run
# Copyright 2016 the youbroketheinternet-overlay team
# Distributed under the terms of the GNU General Public License v2 or later

PIDFILE=/var/run/guix/guix-daemon.pid
#GRACEFUL_TIMEOUT=${GRACEFUL_TIMEOUT:-60}
#extra_commands="checkconfig"
description="The GNU Guix Daemon"

depend() {
need net
}

#SUID_ROOT_HELPERS="guix guix-daemon"
#
#chmodown_execbin() {
#   if [ -x $1 ]; then
#   if [ "$3" ]; then
#   chown $3 $1 2>/dev/null && chmod $2 $1
#   else
#   chmod $2 $1
#   fi
#   fi
#}
#
#checkconfig() {
#   for helper in $SUID_ROOT_HELPERS; do
#   chmodown_execbin ${libexec}

start() {
checkpath -d -m 0755 -o :guixbuild /var/run/guix
ebegin "Starting Guix"
start-stop-daemon --start --pidfile "${PIDFILE}" --quiet --exec 
/usr/bin/guix-daemon -- --build-users-group=guixbuild 
--listen=/var/lib/guix/daemon-socket/socket > /dev/null 2>&1
eend $?
}

#start() {
#   local piddir=$(dirname ${PIDFILE})
#   if [ ! -d ${piddir} ] ; then
#   ebegin "Making ${piddir}"
#   eend $?
#   ebegin "Changing permissions of ${piddir}"
#   chown :guixbuild ${piddir}
#   eend $?
#   fi
#
#   ebegin "Starting ${SVCNAME}"
#   start-stop-daemon --start --name guix-daemon --pidfile ${PIDFILE} \
#   --exec /usr/bin/g

Re: Guix on other distros: Gentoo. [You run Gentoo? Please help testing.]

2016-08-05 Thread Leo Famulari
On Thu, Aug 04, 2016 at 10:01:39PM +, ng0 wrote:
> TL;DR: Guix on Gentoo, need testers with moar isolated Gentoo
> VMs/systems. Don't blame me when it breaks your precious system, I said
> I needed testers.
> 
> 
> Hi,
> 
> Since Gentoo upstream decided to finally solve their very old #355355
> bug on ~20:00 UTC today, I take this opportunity to clean our Gentoo
> overlay from ebuilds we needed for guix so far and ask for potential
> testers.
> 
> For people interested in debugging and participation:
> 
> Guix is now available from within Gentoo for a while already, as a
> development (request for debugging help) package. With the inclusion of
> our collaborative overlay in Gentoo's in/official list of overlays,
> Guix on Gentoo is only 2 commands away in Gentoo and Gentoo
> based systems:
>   layman -a youbroketheinternet
>   emerge --ask sys-apps/guix
> 
> When you torsocks/torify this or all your connections go through tor,
> it should pick up one of 2 onionland instances this is available on,
> else it falls back to .is and .org
> 
> 
> It's not 100% finished yet (openrc service is not fully functional),
> please read the included TODO.org file in the overlay.
> 
> The overlay is also accessible from direct git checkouts, read the page
> on wiki.gentoo.org keyword search for Overlay youbroketheinternet or
> visit http://youbroketheinternet.org/#overlay or
> http://we.make.ritual.n0.is [section: CODE].

Thanks for leading this work! I don't have Gentoo experience, so I can't
offer much help, but I'm glad to see this being done.


signature.asc
Description: PGP signature


Guix on other distros: Gentoo. [You run Gentoo? Please help testing.]

2016-08-04 Thread ng0
TL;DR: Guix on Gentoo, need testers with moar isolated Gentoo
VMs/systems. Don't blame me when it breaks your precious system, I said
I needed testers.


Hi,

Since Gentoo upstream decided to finally solve their very old #355355
bug on ~20:00 UTC today, I take this opportunity to clean our Gentoo
overlay from ebuilds we needed for guix so far and ask for potential
testers.

For people interested in debugging and participation:

Guix is now available from within Gentoo for a while already, as a
development (request for debugging help) package. With the inclusion of
our collaborative overlay in Gentoo's in/official list of overlays,
Guix on Gentoo is only 2 commands away in Gentoo and Gentoo
based systems:
  layman -a youbroketheinternet
  emerge --ask sys-apps/guix

When you torsocks/torify this or all your connections go through tor,
it should pick up one of 2 onionland instances this is available on,
else it falls back to .is and .org


It's not 100% finished yet (openrc service is not fully functional),
please read the included TODO.org file in the overlay.

The overlay is also accessible from direct git checkouts, read the page
on wiki.gentoo.org keyword search for Overlay youbroketheinternet or
visit http://youbroketheinternet.org/#overlay or
http://we.make.ritual.n0.is [section: CODE].
-- 
♥Ⓐ  ng0
Current Keys: https://we.make.ritual.n0.is/ng0.txt
For non-prism friendly talk find me on http://www.psyced.org


signature.asc
Description: PGP signature