Guix' SWH code hates me

2021-05-02 Thread Leo Prikler
I'm currently trying to update the package recipe for guile-wisp to the
newest version, but can't get it to download.  Inside a `guix
environment guix`, using `./pre-inst-env guix build`, I get the
following.

building /gnu/store/001p94i7q8kks3pngjah0b2v4fzl3npr-module-import-
compiled.drv...
[ 1/26] Loading './guix/base16.scm'...
[ 2/26] Loading './guix/base64.scm'...
[ 3/26] Loading './guix/build/download-nar.scm'...
[ 4/26] Loading './guix/build/download.scm'...
[ 5/26] Loading './guix/build/hg.scm'...
[ 6/26] Loading './guix/build/syscalls.scm'...
[ 7/26] Loading './guix/build/utils.scm'...
[ 8/26] Loading './guix/combinators.scm'...
[ 9/26] Loading './guix/ftp-client.scm'...
[10/26] Loading './guix/progress.scm'...
[11/26] Loading './guix/records.scm'...
[12/26] Loading './guix/serialization.scm'...
[13/26] Loading './guix/swh.scm'...
;;; Failed to autoload swh-download-directory in (guix swh):
;;; no code for module (json)

I know that Guix proper would have access to guile-json, but the pre-
inst-env one doesn't.  How do I make it so it does?




Re: Anyone running Guix on the pinephone?

2021-05-02 Thread Joshua Branson
Christopher Lemmer Webber  writes:

> I see the cookbook now mentions the possibility of running Guix on a
> pinephone... is anyone actually doing it?  Mind posting your experiences
> and setup?
>
> (Doesn't have to be as a phone necessarily... I'm more interested in
> using it as a lightweight portable computer.  But a phone would be nice
> too.)

Is a pine phone good enough for a portable and personal computer?
Doesn't it only have 2GB?  I was starting to run into RAM issues with
4GB when I was using Gnome.  Now I have 8GB and I am running sway.  No
RAM issues anymore.

Just out of curiosity, how would you deal with RAM issues/slow CPU
issues on a pinephone?  Using a lightweight window manager and only run
Emacs?  :)

--
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: What processor features does Guix support on i686?

2021-05-02 Thread Joshua Branson


This email list was posted on guix-devel, I'm asking this question on
help-guix, because it's a help guix question and not a guix devel
question...

Mark H Weaver  writes:

> Hi Leo,
>
> Thanks for asking about this, and for ably taking care of our
> Linux-libre packages.  I'm grateful for your work on this.
>
> Leo Famulari  writes:
>
>> I noticed that Linux 5.12 has a new config option regarding "Processor
>> family". The default choice, Pentium-Pro (M686), is highlighted in this
>> quote:
>>
>> --
>> Processor family
>>   1. 486SX (M486SX) (NEW)
>>   2. 486DX (M486) (NEW)
>>   3. 586/K5/5x86/6x86/6x86MX (M586) (NEW)
>>   4. Pentium-Classic (M586TSC) (NEW)
>>   5. Pentium-MMX (M586MMX) (NEW)
>>> 6. Pentium-Pro (M686) (NEW)
>>   7. Pentium-II/Celeron(pre-Coppermine) (MPENTIUMII) (NEW)
>>   8. Pentium-III/Celeron(Coppermine)/Pentium-III Xeon (MPENTIUMIII) (NEW)
>>   9. Pentium M (MPENTIUMM) (NEW)
>>   10. Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon (MPENTIUM4) (NEW)
>>   11. K6/K6-II/K6-III (MK6) (NEW)
>>   12. Athlon/Duron/K7 (MK7) (NEW)
>>   13. Opteron/Athlon64/Hammer/K8 (MK8)
>>   14. Crusoe (MCRUSOE) (NEW)
>>   15. Efficeon (MEFFICEON) (NEW)
>>   16. Winchip-C6 (MWINCHIPC6) (NEW)
>>   17. Winchip-2/Winchip-2A/Winchip-3 (MWINCHIP3D) (NEW)
>>   18. AMD Elan (MELAN) (NEW)
>>   19. GeodeGX1 (MGEODEGX1) (NEW)
>>   20. Geode GX/LX (MGEODE_LX) (NEW)
>>   21. CyrixIII/VIA-C3 (MCYRIXIII) (NEW)
>>   22. VIA C3-2 (Nehemiah) (MVIAC3_2) (NEW)
>>   23. VIA C7 (MVIAC7) (NEW)
>>   24. Core 2/newer Xeon (MCORE2)
>>   25. Intel Atom (MATOM)
>> --

I'm kind of curious, if I were to compile my own linux kernel, and I
could someone select a newer processor family, would that make my kernel
a little more faster?  Or would it just make my kernel image a little
smaller?  Also my laptop is a Lenovo T400.So it doesn't exactly have
NEW features.  :)

>>
>> info: https://cateee.net/lkddb/web-lkddb/M686.html
>>
>> I know that, in the past, we have been careful to not require certain
>> processor features on i686, such as SSE [0].
>>
>> I would appreciate some guidance, both about this kernel configuration
>> option, and what we have historically considered to be the "minimum
>> requirements" for i686 hardware. I will put that information the manual
>> so that it doesn't get lost.
> [...]
>> [0] https://lists.gnu.org/archive/html/guix-devel/2016-07/msg01534.html
>
> It's been a long while since I looked at this, and of course we may wish
> to revisit the issue, but for now, I think that the right choice above
> is the default one, namely: "6. Pentium-Pro (M686) (NEW)"
>
>Thanks again,
>Mark

--
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: Any way to boot Guix with root partition elsewhere?

2021-05-02 Thread Vladilen Kozin
Well, I went ahead and asked the help-g...@gnu.org but I'm thinking it
maybe difficult or impossible to solve. There may actually be the
"Guix" way to solve this. Here are my current thoughts.

Problem (not specific to Guix):
- we install Guix onto NVMe SSD drive that's plugged via PCIe adaptor,
- BIOS doesn't make those available to boot,
- so you can't boot directly off of that SSD,
- but worse, Grub on any visible drive e.g. USB won't find that SSD either.

IIUC what "solutions" I've seen, they amount to booting off e.g. USB
stick where you have your /boot/grub with grub.cfg BUT with actual
kernel and initrd you want to boot copied over from that SSD drive AND
with whatever kernel parameters your installation suggested. So, I
think roughly this amounts to copying your Guix system's current
kernel and initrd over to USB stick as well as its /boot/grub/grub.cfg
and maybe tweaking it a bit to point to this copied kernel. Or smth
like that.

This obviously defeats the main value proposition of Guix, cause
suddenly no "boot into another system instance", no "roll back".

IMO good solution would be to have Grub load just enough of whatever
kernel is doing to find that drive and make its contents available. I
doubt one can do that, but maybe one can boot into some kernel and
initrd and then "chain" load the Grub on that SSD? I've no clue how to
do that, but I'm sure its possible: kernel is code running in memory,
surely it can "load" and "pass control" over to Grub or smth. If
anyone knows, do tell.

Guix way of solving this could be by coding the above step explicitly
into your config.scm, so that your `guix system reconfigure` having
built everything, copies new kernel and initrd over to USB drive in
addition to earlier kernels etc along with appropriate grub.cfg
(essentially mirroring that bit of your OS on the SSD). Brittle, but
at least you have your earlier systems etc etc.

The whole "boot" business is at the edge of my understanding of how
systems bootstrap and OMG this whole territory is full of arcane
sacred knowledge spread all over the interwebs and most of what you
find is nonsense. Once people who actually know how the sausage is
made retire or die, our civilization is doomed :(

On Sat, 1 May 2021 at 04:07, Joshua Branson  wrote:
>
> Vladilen Kozin  writes:
>
> > Hello guix.
> >
> > Is there a way out of this predicament? I can see two options.
> > (1) can some Linux distro/bootloader do the FreeBSD trick: start on
> > USB but then chain-boot Guix off that SSD? IIUC grub's chain-boot is
> > of no help here, cause it simply won't even see that drive;
> > (2) install and run Guix off USB but somehow ensure that "IO heavy"
> > bits are mounted from that SSD. There's gotta be some (file-systems
> > ...) combined with the way I `guix system init config.scm /mnt` (or
> > rather what else I mount under /mnt where) that would achieve this?
>
> Hmm. I'm way out of my depth here...
>
> I think number 1 is your "best" bet.  I've no idea how to do that.
>
> Number 2 is probably your "easiest" option.  /boot/ should be put on the
> usb, and I suppose that the / should be on the SSD...You would install
> this way.  That's probably how I'd do it.  Or rather that is how I would
> try to do it.  :)
>
>
> This is probably a silly idea...would linuxboot.org help?  You use linux
> to boot?
>
>
> Another silly idea...could you embed linux in your flashrom?  I think
> that osboot.org is planning on embedding linux in the flashrom...That
> would be pretty awesome.  My flashrom is only 8MB though...
>
>
> Best of luck!
>
> Joshua
>
> --
> 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



-- 
Best regards
Vlad Kozin



Re: What processor features does Guix support on i686?

2021-05-02 Thread Leo Famulari
On Sun, May 02, 2021 at 12:56:45PM -0400, Joshua Branson wrote:
> I'm kind of curious, if I were to compile my own linux kernel, and I
> could someone select a newer processor family, would that make my kernel
> a little more faster?  Or would it just make my kernel image a little
> smaller?  Also my laptop is a Lenovo T400.So it doesn't exactly have
> NEW features.  :)

Just to clarify, these kernel configuration options are for when one
builds the kernel for "i686-linux" (Guix parlance) or "i386" (Linux
parlance). This means 32-bit Intel-compatible.

The T400 has a Core 2 Duo 64-bit procesor, so these options won't apply
for you. That's "x86_64-linux" or "amd64", respectively.

However, yes, you can build a custom kernel to eke out some performance
improvements.



support split /boot partition

2021-05-02 Thread Vagrant Cascadian
On 2021-04-30, Joshua Branson wrote:
> Vladilen Kozin  writes:
>> Is there a way out of this predicament? I can see two options.
>> (1) can some Linux distro/bootloader do the FreeBSD trick: start on
>> USB but then chain-boot Guix off that SSD? IIUC grub's chain-boot is
>> of no help here, cause it simply won't even see that drive;
>> (2) install and run Guix off USB but somehow ensure that "IO heavy"
>> bits are mounted from that SSD. There's gotta be some (file-systems
>> ...) combined with the way I `guix system init config.scm /mnt` (or
>> rather what else I mount under /mnt where) that would achieve this?
...
> I think number 1 is your "best" bet.  I've no idea how to do that.
>
> Number 2 is probably your "easiest" option.  /boot/ should be put on the
> usb, and I suppose that the / should be on the SSD...You would install
> this way.  That's probably how I'd do it.  Or rather that is how I would
> try to do it.  :)

Unfortunately, guix doesn't currently support booting off of a separate
/boot partition, since the kernel and initrd are in /gnu/store; your
bootloader needs to be able to mount the partition that /gnu/store is
located on.

The workaround would be to manually copy all files mentioned in grub.cfg
(kernel, initrd, possibly others) into a partition somewhere on boot
media, and tweak the grub.cfg appropriately...


There are several cases where this sort of thing would be desireable:

* The above scenario; the system does not expose an NVMe drive from EFI
  or BIOS.

* Using u-boot and you want root on lvm, raid, encryption, etc. which
  u-boot does not support


I've been meaning to file a bug on this for ages; I have BCCed bug-guix
now which will hopefully work. :)


Another more complicated option would be to use kexec; where you boot
one kernel and maybe a minimal rootfs, and load a new kernel and initrd
into ram, which uses the kernel drivers and then runs "kexec" to switch
to the newly loaded kernel... not sure how reliable that is, but it is
possible.


live well,
  vagrant


signature.asc
Description: PGP signature


Re: support split /boot partition

2021-05-02 Thread Vincent Legoll
Hello,

On Sun, May 2, 2021 at 11:17 PM Vagrant Cascadian  wrote:
> Another more complicated option would be to use kexec; where you boot
> one kernel and maybe a minimal rootfs, and load a new kernel and initrd
> into ram, which uses the kernel drivers and then runs "kexec" to switch
> to the newly loaded kernel... not sure how reliable that is, but it is
> possible.

This is actually usable and used, see petitboot or linuxboot.

https://github.com/open-power/petitboot
https://www.linuxboot.org

-- 
Vincent Legoll



Re: What processor features does Guix support on i686?

2021-05-02 Thread Joshua Branson
Leo Famulari  writes:

> On Sun, May 02, 2021 at 12:56:45PM -0400, Joshua Branson wrote:
>> I'm kind of curious, if I were to compile my own linux kernel, and I
>> could someone select a newer processor family, would that make my kernel
>> a little more faster?  Or would it just make my kernel image a little
>> smaller?  Also my laptop is a Lenovo T400.So it doesn't exactly have
>> NEW features.  :)
>
> Just to clarify, these kernel configuration options are for when one
> builds the kernel for "i686-linux" (Guix parlance) or "i386" (Linux
> parlance). This means 32-bit Intel-compatible.
>
> The T400 has a Core 2 Duo 64-bit procesor, so these options won't apply
> for you. That's "x86_64-linux" or "amd64", respectively.
>
> However, yes, you can build a custom kernel to eke out some performance
> improvements.

Thanks for the response!  I'm not quite so interested in building a
custom kernel yet.  But I think it would be cool to do one day!


-- 
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: Any way to boot Guix with root partition elsewhere?

2021-05-02 Thread Joshua Branson
Vladilen Kozin  writes:

> IMO good solution would be to have Grub load just enough of whatever
> kernel is doing to find that drive and make its contents available. I
> doubt one can do that, but maybe one can boot into some kernel and
> initrd and then "chain" load the Grub on that SSD? I've no clue how to
> do that, but I'm sure its possible: kernel is code running in memory,
> surely it can "load" and "pass control" over to Grub or smth. If
> anyone knows, do tell.

I think you just don't want to use the "slow" hard drive right?  I
personally use a hard drive, and I am content with the performance.  I
just prefer to use the old lenovo T400.  I think it cost me $300 USD to
assemble it.  Not to shabby.  :)

-- 
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
  



guix pack and flatpak

2021-05-02 Thread Andy Tai
a question hopefully not too wild:   Guix can generate Docker image via

guix pack

Only knowing flatpak in brief terms, can guix software bundle
mechanisms be used to create flatpak?



-- 
Andy Tai, a...@atai.org
Year 2021 民國110年
自動的精神力是信仰與覺悟
自動的行為力是勞動與技能


Re: Anyone running Guix on the pinephone?

2021-05-02 Thread Christopher Lemmer Webber
Joshua Branson writes:

> Christopher Lemmer Webber  writes:
>
>> I see the cookbook now mentions the possibility of running Guix on a
>> pinephone... is anyone actually doing it?  Mind posting your experiences
>> and setup?
>>
>> (Doesn't have to be as a phone necessarily... I'm more interested in
>> using it as a lightweight portable computer.  But a phone would be nice
>> too.)
>
> Is a pine phone good enough for a portable and personal computer?
> Doesn't it only have 2GB?  I was starting to run into RAM issues with
> 4GB when I was using Gnome.  Now I have 8GB and I am running sway.  No
> RAM issues anymore.
>
> Just out of curiosity, how would you deal with RAM issues/slow CPU
> issues on a pinephone?  Using a lightweight window manager and only run
> Emacs?  :)

Sure, why not? ;)

It wasn't actually too long ago that my main computer only had 2GB of
ram...



Re: Anyone running Guix on the pinephone?

2021-05-02 Thread Vagrant Cascadian
On 2021-05-02, Christopher Lemmer Webber wrote:
> Joshua Branson writes:
>> Christopher Lemmer Webber  writes:
>>
>>> I see the cookbook now mentions the possibility of running Guix on a
>>> pinephone... is anyone actually doing it?  Mind posting your experiences
>>> and setup?
>>>
>>> (Doesn't have to be as a phone necessarily... I'm more interested in
>>> using it as a lightweight portable computer.  But a phone would be nice
>>> too.)
>>
>> Is a pine phone good enough for a portable and personal computer?
>> Doesn't it only have 2GB?  I was starting to run into RAM issues with
>> 4GB when I was using Gnome.  Now I have 8GB and I am running sway.  No
>> RAM issues anymore.
>>
>> Just out of curiosity, how would you deal with RAM issues/slow CPU
>> issues on a pinephone?  Using a lightweight window manager and only run
>> Emacs?  :)
>
> Sure, why not? ;)
>
> It wasn't actually too long ago that my main computer only had 2GB of
> ram...

Some pinephones have 3GB of ram, too, which gives a little breathing
room.

It's very similar specifications to the (older) pinebook, which runs
guix system ok (considering, of course, it is slow), but you'll need to
significantly patch the kernel and bootloader until support lands
upstream...

You could surely run guix on one of the foreign distro images.

One of the main problems will be screen resolution and size issues; many
applications do not render well on a phone-sized screen. There is a list
of applications and rough ratings for their usability on the pinephone
with mobian:

  https://wiki.mobian-project.org/doku.php?id=apps

Incorporating some of those into guix wouldn't probably be terribly
hard.

The main user interface for mobian is phosh, which is a gnome-shell
alternative targeted at mobile devices; runs well on the pinephone
despite the low hardware specs. I presume it would be plausible to get
that and related software into guix, though I don't know what gnome
versions it depends on.

Getting a decent on-screen keyboard will also be essential; squeekboard
is pretty configurable, though it's written in rust, and rust's long
bootstrap chain may make it impractical on aarch64, if it works at all.

I suspect it would be feasible to create a mobian-like experience with
guix; it's *just* a matter of packaging the right software and finding
the time to do it! :)

Count me interested, if cautious at taking on too many side
projects... :)


Before I tackle that, I think I'll try to get some decent aarch64 build
machines available and running locally, and make guix publish results
available somehow to the world at large... doing anything on aarch64 is
a bit painful until substitute availability is more workable.


live well,
  vagrant


signature.asc
Description: PGP signature