interactively debugging os configuration

2021-05-17 Thread kevinbanjo
Hi everyone:

I think I might be on the verge of getting the guix system (or something
closely resembling it) running fairly simply under wsl 2 but this sample os
config file:

https://github.com/giuliano108/guix-packages/blob/master/systems/wsl-config.scm

is giving me the following error:

~ # guix system reconfigure --no-bootloader wsl-config.scm
(supplementary-groups '("wheel")))
   |guix system: error: failed to load 'wsl-config.scm':
   %base-user-accounts))
   |/root/wsl-config.scm:90:70: In procedure
profile-content: Wrong type argument: #< name: "

I know elisp and clojure fairly well but not so much scheme and especially
not guile so can anyone either point out to me what the error is or failing
that how I might bring this up in a repl so I can interactively debug it?

I have very limited capabilities of debugging it from the windows command
line tool running character based emacs which I installed in guix (and I'm
reluctant to go configuring guix too much more incase I break something and
have to just jettison it all and start over since I can't get the system
reconfigure going).

TIA,
-Kevin


Re: `guix pull` of an ssh channel fails

2021-05-17 Thread Bone Baboon
Phil writes:
> My theory here is that "git clone" is using your id_rsa file which is
> working, and for some reason the ssh-agent is failing for guix.

> Another cruder way to test this is to move your private key out of
> your .ssh directory so ssh doesn't find it by default.  Then manually
> add it to your agent.

Thank you I am now able to successfully pull from my channel.

You were correct that the ssh-agent was not aware of the private key.

I ran `SSH_AUTH_SOCK=/tmp/ssh-XXXkCtuv/agent.3548 ssh-add`.

Then this worked `SSH_AUTH_SOCK=/tmp/ssh-XXXkCtuv/agent.3548 guix
pull --disable-authentication`.



Re: Using bootstrap seeds write package definitions

2021-05-17 Thread c4droid


Julien Lepiller writes:

> Hi c4droid,
>
> Le Sun, 16 May 2021 10:50:36 +0800,
> "c4droid"  a écrit :
>
>> Hello guix!
>> I was using the Linux From Scratch for a while as my mainly linux
>> distro, use soft link as package management. when I heard guix, I
>> think I found solution for my LFS package management. I tried guix
>> and guix system few month, Is time for switch my LFS package manager
>> to guix.
>
> I've been using LFS (and my own LFS-based "distro") for some years, so
> I completely understand why you'd want to use guix. Actually I based my
> "distro" on what I understood from Guix and the package manager from
> Haiku. When I understood I implemented that badly, I switched to Guix
> and Guix System entirely, no more LFS :D.

I was use pkgtool from slackware and write some dirty shell script
emulate GNU Stow for my package management. It's so difficult for manage
soft link.

>
>> When I watched the manual talk about bootstrapping guix, I don't know
>> how to writing some package definitions with bootstrap-seeds, I was
>> searching on the google and ask questions on irc, because building
>> the LFS, want build the cross toolchain (stage 1) then build final
>> system (stage 2), last is kernel and initramfs (stage 3). after that
>> is build Beyond LFS (stage 4). I stuck with using bootstrap seeds
>> writing stage 1 package definitions. So I ask for help on community,
>> because the power of community is great. :)
>
> So Guix comes with a set of packages, which are just recipes to build
> them from source. There are two things you might want to do: you can
> either use the existing packages or create your own recipes for the
> whole system.

If I can, I want create my own recipes for the whole system with the
help of Guix power

>
> If you choose to use our packages, then there are again two options.
> You can use the existing binary bootstrap (the only thing you wouldn't
> build yourself), or build it yourself and replace the binaries used in
> Guix by your own. Note that the bootstrap binaries are different from
> the binaries built for the first chroot of LFS (the cross-compiler). We
> do not use a binary GCC, but we instead start from mescc, a small C
> compiler, and use it to build tcc, then gcc, with the goal of reducing
> that down to stage0, which is only a few hundred bytes of binary, plus
> sources of other packages.
>
> # Using our recipes and bootstrap binaries
>
> If you want to use our bootstrap binaries, there is nothing to do,
> because Guix itself will be able to get the binary bootstrap and build
> everything from it. Do not enable substitutes if you want to build
> everything yourself.
>
> # Providing your own bootstrap binaries
>
> If you prefer to provide your own bootstrap, you'll have to build and
> provide binaries for the bootstrap seeds we currently have in Guix,
> that you see in the manual.
>

I want to build my own bootstrap binaries, hope get more help with
create my own bootstraps

> # Building your own packages
>
> If you decide not to use our recipes, you must write your own. The set
> of packages is rooted in the bootstrap seeds, as you noticed. However,
> if you want to provide your own recipes, you are basically free to
> provide any bootstrap and further packages you want. What you could do
> is to build stage1 (cross toolchain), use that as your binary seed, and
> build the other stages as guix packages. Note that for that, you'll
> need to have guix already installed on the host system.
>
> If you have never used Guix, or never written a package definition, you
> might want to have a look at our short packaging tutorial at
> https://guix.gnu.org/en/cookbook/en/html_node/Packaging-Tutorial.html#Packaging-Tutorial
> (French and German are also available if you prefer one of these
> languages).
>
> There is some code in gnu/packages/bootstrap.scm that you might be
> interested in. It has some interesting bits: first there are a few
> binary seeds with hashes: they are statically linked binaries that are
> needed to decompress other seeds. Then, we define a few special
> procedures that replace the normal packaging procedures
> (bootstrap-origin, package-from-tarball). You probably want to use them
> or get inspiration from them to create your own bootstrap recipes
> (packages that simply decompress a tarball containing a prebuilt
> binary). The rest of the file lists these packages.
>
> Then gnu/packages/commencement.scm is the very beginning of the package
> graph. These packages use the binary seeds to build up to gcc, that we
> later use in the gnu-build-system, etc. You will be interested in the
> comments in this file too :)
>

If I can, I think use the mescc to build stage0 then build stage1, stage2,
stage3 is the best option.

I'll watch gnu/packages/commencement.scm comments later for get some
inspiration

I'm currently use a Guix System VM for my build machine, and I have a ci
for build continously

> # My own experience with my package manager (not gu

Re: interactively debugging os configuration

2021-05-17 Thread c4droid
Hi, Kevin.

kevinbanjo writes:

> Hi everyone:
>
> I think I might be on the verge of getting the guix system (or something
> closely resembling it) running fairly simply under wsl 2 but this sample os
> config file:
>
> https://github.com/giuliano108/guix-packages/blob/master/systems/wsl-config.scm
>
> is giving me the following error:
>
> ~ # guix system reconfigure --no-bootloader wsl-config.scm
> (supplementary-groups '("wheel")))
>|guix system: error: failed to load 'wsl-config.scm':
>%base-user-accounts))
>|/root/wsl-config.scm:90:70: In procedure
> profile-content: Wrong type argument: #< name: "
>
> I know elisp and clojure fairly well but not so much scheme and especially
> not guile so can anyone either point out to me what the error is or failing
> that how I might bring this up in a repl so I can interactively debug it?
>

You can load your configuration file with guix repl, using the repl
command ,l to load your configuration file (e.g. ,l 
ABSOLUTE_PATH/wsl-config.asm)

> I have very limited capabilities of debugging it from the windows command
> line tool running character based emacs which I installed in guix (and I'm
> reluctant to go configuring guix too much more incase I break something and
> have to just jettison it all and start over since I can't get the system
> reconfigure going).
>
> TIA,
> -Kevin

--

Best reguards
c4droid



Error while 'guix upgrade' probably with nss-certs package

2021-05-17 Thread Abhiseck Paira
Hi,
I run Guix package manager on top Parabola GNU/Linux. Recently when I
ran 'guix pull' followed by 'guix upgrade', during the upgrade process I
got this error message:

...
476.8 MB will be downloaded
 nss-certs-3.59  130KiB 
6.3MiB/s 00:00 [  ]  49.1%Backtrace:
In guix/ui.scm:
  2165:12 19 (run-guix-command _ . _)
In ice-9/boot-9.scm:
  1752:10 18 (with-exception-handler _ _ #:unwind? _ # _)
  1752:10 17 (with-exception-handler _ _ #:unwind? _ # _)
  1747:15 16 (with-exception-handler # ?)
In guix/scripts/substitute.scm:
   765:15 15 (_)
538:9 14 (process-substitution # _ "/gnu/store/?" ?)
In guix/serialization.scm:
424:4 13 (fold-archive _ _ _ _)
   468:33 12 (read "/gnu/store/2f032p23rgga56kkn91q7hl0vzqyr7k5-nss?" ?)
   468:33 11 (read "/gnu/store/2f032p23rgga56kkn91q7hl0vzqyr7k5-nss?" ?)
   468:33 10 (read "/gnu/store/2f032p23rgga56kkn91q7hl0vzqyr7k5-nss?" ?)
   468:33  9 (read "/gnu/store/2f032p23rgga56kkn91q7hl0vzqyr7k5-nss?" ?)
   451:26  8 (read "/gnu/store/2f032p23rgga56kkn91q7hl0vzqyr7k5-nss?" ?)
   520:21  7 (_ "/gnu/store/2f032p23rgga56kkn91q7hl0vzqyr7k5-nss-ce?" ?)
In ice-9/boot-9.scm:
  1747:15  6 (with-exception-handler # ?)
In unknown file:
   5 (symlink "NetLock_Arany_=Class_Gold=_F?tan?s?tv?ny:2.6?" ?)
In ice-9/boot-9.scm:
  1685:16  4 (raise-exception _ #:continuable? _)
  1685:16  3 (raise-exception _ #:continuable? _)
  1780:13  2 (_ #<&compound-exception components: (#<&error> #<&orig?>)
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Throw to key `encoding-error' with args `("scm_to_stringn" "cannot convert wide 
string to output locale" 84 #f #f)'.
substitution of /gnu/store/2f032p23rgga56kkn91q7hl0vzqyr7k5-nss-certs-3.59 
failed
guix upgrade: error: corrupt input while restoring archive from socket
-
I am relatively new to guix, I'd appreciate any guidance on how to fix
this issue.

-- 
Abhisek Paira
West Bengal, India.


signature.asc
Description: PGP signature


Re: interactively debugging os configuration

2021-05-17 Thread c4droid


c4droid writes:

> Hi, Kevin.
>
> kevinbanjo writes:
>
>> Hi everyone:
>>
>> I think I might be on the verge of getting the guix system (or something
>> closely resembling it) running fairly simply under wsl 2 but this sample os
>> config file:
>>
>> https://github.com/giuliano108/guix-packages/blob/master/systems/wsl-config.scm
>>
>> is giving me the following error:
>>
>> ~ # guix system reconfigure --no-bootloader wsl-config.scm
>> (supplementary-groups '("wheel")))
>>|guix system: error: failed to load 'wsl-config.scm':
>>%base-user-accounts))
>>|/root/wsl-config.scm:90:70: In procedure
>> profile-content: Wrong type argument: #< name: "
>>
>> I know elisp and clojure fairly well but not so much scheme and especially
>> not guile so can anyone either point out to me what the error is or failing
>> that how I might bring this up in a repl so I can interactively debug it?
>>
>
> You can load your configuration file with guix repl, using the repl
> command ,l to load your configuration file (e.g. ,l 
> ABSOLUTE_PATH/wsl-config.asm)

Sorry for my typo, is wsl-conffig.scm :P

>
>> I have very limited capabilities of debugging it from the windows command
>> line tool running character based emacs which I installed in guix (and I'm
>> reluctant to go configuring guix too much more incase I break something and
>> have to just jettison it all and start over since I can't get the system
>> reconfigure going).
>>
>> TIA,
>> -Kevin
>
> --
>
> Best reguards
> c4droid




Re: interactively debugging os configuration

2021-05-17 Thread kevinbanjo
On Mon, May 17, 2021 at 1:28 AM c4droid  wrote:

>
> c4droid writes:
> 



> > You can load your configuration file with guix repl, using the repl
> > command ,l to load your configuration file (e.g. ,l
> ABSOLUTE_PATH/wsl-config.asm)
>
> Sorry for my typo, is wsl-conffig.scm :P
>
> haha, yes, well, that should be quite helpful, thanks!

-Kevin


Re: How to repair/reinstall guix on foreign distro

2021-05-17 Thread Joshua Branson
Thorsten Wilms  writes:

> Hi! It seems every few weeks i’m thrown into a initramfs prompt, as
> root got mounted read-only. The way out is always running fsck, which
> reports errors and offers fixes that I either can’t map to anything, or
> that refer to paths that belong to guix. Usually only below /gnu/store,
> but this time also var/guix.

Is ubuntu causing this issue?  Why are you seeing an initramfs prompt
every few weeks?  If you are running guix on ubuntu...that seems like
it's ubuntu's fault.  Though I'm probably way wrong.

>
> Now `guix pull` fails with:
> ```
> ;;; WARNING: loading compiled
> file 
> /gnu/store/8bsnz1fk330qbn1p8k18i0j11vld4jxd-guix-module-union/lib/guile/3.0/site-ccache/guix/build-system/gnu.go
> failed: ;;; In procedure load-thunk-from-memory: not an ELF file
> Updating channel 'guix' from Git repository at
> 'https://git.savannah.gnu.org/git/guix.git'... guix pull: error: Git
> error: invalid data in index - incorrect header signature
> ```

Man...I've no idea.  I'm honestly responding just so you get a
response.  Why do you suppose you are getting into an initramfs...As in
you always have to run fsck?  What hardware are you using?

> At first, I focused on the warning (sorry, leoprikler) ... the same git
> error happens when using an older guix.
>
> Now a fix for that would be great, but independent of that, I have to
> wonder how one should go about reinstalling guix on a foreign distro. I
> cannot umount or remount and remove /gnu/store!
>
> Even after `sudo systemctl stop gnu-store.mount`, /gnu/store is busy.
> `fuser -kim /gnu/store/` will throw me out of the session, even though
> I would think everything that belongs to it is part of the host (Ubuntu
> Unity 20.10). No sudo umount or remount or rm -rf allowed, /gnu/store
> remains ro and busy. Short of booting another system (say an USB
> stick), is there a way to clear /gnu/store? Or to safely replace its
> content?

--
Joshua Branson (joshuaBPMan in #guix)
Sent from Emacs and Gnus
  https://gnucode.me
  https://video.hardlimit.com/accounts/joshua_branson/video-channels
  https://propernaming.org
  "You can have whatever you want, as long as you help
enough other people get what they want." - Zig Ziglar



Re: interactively debugging os configuration

2021-05-17 Thread Joshua Branson
kevinbanjo  writes:

> Hi everyone:
>
> I think I might be on the verge of getting the guix system (or something
> closely resembling it) running fairly simply under wsl 2 but this sample os
> config file:
>
> https://github.com/giuliano108/guix-packages/blob/master/systems/wsl-config.scm

If you get a good simple guix configuration, you may consider writing
that config in the guix cookbook.  It would be nice if people could grab
a simple guix config that would work well on wsl.  

I personally use guix system, but maybe guix on wsl would encourage more
people to move to guix system.

-- 
Joshua Branson (joshuaBPMan in #guix)
Sent from Emacs and Gnus
  https://gnucode.me
  https://video.hardlimit.com/accounts/joshua_branson/video-channels
  https://propernaming.org
  "You can have whatever you want, as long as you help
enough other people get what they want." - Zig Ziglar