Re: No sound on laptop after linux-libre 5.15

2021-12-08 Thread Leo Famulari
On Wed, Dec 08, 2021 at 11:34:24PM -0300, Thiago Jung Bauermann wrote:
> Em quarta-feira, 8 de dezembro de 2021, às 01:55:13 -03, Paxton Evans 
> escreveu:
> > Rolling back to linux-libre 5.14.21 (guix
> > ea7233befb9570cce47e5ca71725b285a580cd22) totally fixes this issue.
> > 
> > Troubleshooting sound issues on GNU/Linux is such a nightmare that I'm
> > hoping this list can help me, as I don't really know much about how
> > sound on our favorite OS really works, and don't have enough information
> > to file a bug. Can anyone give me pointers on where to start looking?
> > dmesg on 5.15.6 didn't seem to report anything strange.

Thanks for your report. Everything Thiago said is important, and it
would also help if you told us what you had tried to do. That is, what
are you using to make sound?

My basic sound test is to use mpg123 to play an MP3 file. You can use
the --output option to choose which output to play through, to be sure.
And you can use --list-modules to see what's available.

On Guix System, we aim to make applications use Pulseaudio by default,
so you can use `mpg123 --output pulse file.mp3` to test that. You can
also use `mpg123 --output alsa file.mp3` if you'd rather test ALSA.

Unfortunately I currently cannot test sound on Guix System with
linux-libre. However, it does work for me on a computer using Guix
System with a custom kernel.



Re: No sound on laptop after linux-libre 5.15

2021-12-08 Thread Thiago Jung Bauermann
Hello Paxton,

Em quarta-feira, 8 de dezembro de 2021, às 01:55:13 -03, Paxton Evans 
escreveu:
> Rolling back to linux-libre 5.14.21 (guix
> ea7233befb9570cce47e5ca71725b285a580cd22) totally fixes this issue.
> 
> Troubleshooting sound issues on GNU/Linux is such a nightmare that I'm
> hoping this list can help me, as I don't really know much about how
> sound on our favorite OS really works, and don't have enough information
> to file a bug. Can anyone give me pointers on where to start looking?
> dmesg on 5.15.6 didn't seem to report anything strange.

I’m not particularly familiar with the moving parts that make sound work 
either, so I’ll focus on the kernel side of things. My first idea would be 
trying to boot with the “debug” kernel command line option, which increases 
the verbosity of kernel messages. Perhaps something helpful will show up in 
dmesg that way?

If not, and if the only change in the working setup vs the non-working 
setup is the kernel version, then it’s a regression in the kernel. If you 
are willing to run the upstream Linux kernel on your machine (i.e., the 
non-libre kernel), the first step would be to run Linux v5.15.6 and see if 
sound works.

If it does, then it’s a bug in linux-libre itself and you should report the 
problem to them. If it doesn’t, it’s a bug in Linux itself and the most 
straightforward (but tedious and time-intensive) way to find the kernel 
commit that caused the bug is to use “git bisect”:

https://wiki.gentoo.org/wiki/Kernel_git-bisect

That is, assuming that you are comfortable building kernels.
You need to use v5.14 as your known-good version not v5.14.21 because your 
range should be a “straight line” in the version history, and v5.14.x 
versions branch off from mainline and thus aren’t ancestors of v5.15.x.

Also, since you’d be running random kernel commits, it’s important to be 
aware that there’s a small but non-zero risk of running a bad kernel 
version which could corrupt something on your system. E.g., not long ago 
during the v5.12 development cycle there was a filesystem corruption bug: 

https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.12-Corruption-Fixed

You wouldn’t be at risk of hitting that particular bug since your range 
starts at v5.14, but it’s not inconceivable that there could be something 
bad in your range (though I’m not aware of anything). The safest way to 
address that is to run the bisect kernels in a temporary Linux installation 
on your machine, such as in a USB flash drive rather than on your main Linux 
installation.

-- 
Thanks,
Thiago






Re: Run .deb or .rpm packages

2021-12-08 Thread Remco
2021/12/08 20:10, André A. Gomes:

> From a freedom perspective, what are my options?  Running a virtual
> machine with ubuntu/fedora for this sole purpose?

I've had some success running debian packages from a chroot environment
on my guix installation.  There's a debootstrap package which allows you
to create a chroot environment.

Something like:

  guix shell debootstrap -- debootstrap --arch=amd64 bullseye 
my-bullseye-install

and then:

  mount -t proc proc my-bullseye-install/proc
  mount -t devpts devpts my-bullseye-install/dev/pts
  chroot my-bullseye-install /bin/bash --login

You'll probably need to run all these as root.

Remco



Re: Run .deb or .rpm packages

2021-12-08 Thread André A . Gomes
Julien Lepiller  writes:

> I don't think it's a good idea to use a .deb or .rpm with guix, as
> they contain precompiled software. Even considering free software,
> they are compiled with a giver system (probably ubuntu and fedora,
> respectively) that make them incompatible with guix. Even if you
> successfuly installed them, I'm afraid you'd get a confusing "file not
> found" anyway.
>
> You should ask your government for the source code, and compile it for
> the guix system. Sorry that this is my best answer, it's probably not
> what you wanted to hear :/

I totally agree with you.  I actually made that request, but I was told
that I have no right to access the sources :)

I was wondering if it was technically possible, though.  But I
understand your comment that I'd get a "file not found" anyway.

>From a freedom perspective, what are my options?  Running a virtual
machine with ubuntu/fedora for this sole purpose?  Thank you Julien.


-- 
André A. Gomes
"Free Thought, Free World"



Re: Run .deb or .rpm packages

2021-12-08 Thread Julien Lepiller
I don't think it's a good idea to use a .deb or .rpm with guix, as they contain 
precompiled software. Even considering free software, they are compiled with a 
giver system (probably ubuntu and fedora, respectively) that make them 
incompatible with guix. Even if you successfuly installed them, I'm afraid 
you'd get a confusing "file not found" anyway.

You should ask your government for the source code, and compile it for the guix 
system. Sorry that this is my best answer, it's probably not what you wanted to 
hear :/ 

Le 8 décembre 2021 14:46:24 GMT-05:00, "André A. Gomes" 
 a écrit :
>Gary Johnson  writes:
>
>> André A. Gomes  writes:
>>
>>> Hi Guix,
>>>
>>> I'm wondering if it's possible to install .deb or .rpm packages on the
>>> Guix system.
>>>
>>> For context, my government only provides me these solutions to install a
>>> authentication plugin that I use with my ID (smart) card.
>>>
>>> Thanks.
>>
>> Hi André,
>>
>> You can install the `dpkg` package with `guix package -i dpkg`. Hope
>> that helps.
>
>Indeed.  I should have said that I did that, and then encountered the
>following issue:
>
>--8<---cut here---start->8---
>$ sudo dpkg -i foo-package.deb 
>dpkg: error: unable to access the dpkg database directory 
>/gnu/store/902w5i1j38r33l6p871dyhng19zj1phk-dpkg-1.20.9/var/lib/dpkg: 
>Read-only file system
>--8<---cut here---end--->8---
>
>Any ideas?  I don't know much about .deb or .rpm.
>
>Thank you Gary.
>
>
>-- 
>André A. Gomes
>"Free Thought, Free World"
>


Re: Run .deb or .rpm packages

2021-12-08 Thread André A . Gomes
Gary Johnson  writes:

> André A. Gomes  writes:
>
>> Hi Guix,
>>
>> I'm wondering if it's possible to install .deb or .rpm packages on the
>> Guix system.
>>
>> For context, my government only provides me these solutions to install a
>> authentication plugin that I use with my ID (smart) card.
>>
>> Thanks.
>
> Hi André,
>
> You can install the `dpkg` package with `guix package -i dpkg`. Hope
> that helps.

Indeed.  I should have said that I did that, and then encountered the
following issue:

--8<---cut here---start->8---
$ sudo dpkg -i foo-package.deb 
dpkg: error: unable to access the dpkg database directory 
/gnu/store/902w5i1j38r33l6p871dyhng19zj1phk-dpkg-1.20.9/var/lib/dpkg: Read-only 
file system
--8<---cut here---end--->8---

Any ideas?  I don't know much about .deb or .rpm.

Thank you Gary.


-- 
André A. Gomes
"Free Thought, Free World"



Re: Run .deb or .rpm packages

2021-12-08 Thread Gary Johnson
André A. Gomes  writes:

> Hi Guix,
>
> I'm wondering if it's possible to install .deb or .rpm packages on the
> Guix system.
>
> For context, my government only provides me these solutions to install a
> authentication plugin that I use with my ID (smart) card.
>
> Thanks.

Hi André,

You can install the `dpkg` package with `guix package -i dpkg`. Hope
that helps.

Good luck,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: How to put a file in /gnu/store and set its permissions

2021-12-08 Thread Gary Johnson
> Nathan Dehnel  writes:
>
> Thanks. I guess then I need to know how to put a file in /etc/ssh
> without putting it in the store.

> On Sun, Dec 5, 2021 at 8:44 PM Gary Johnson  wrote:
>
> To programmatically add a file to /etc, you can extend the
> etc-service-type in your operating-system's services field like so:
>
> ```
> (use-modules
>  ((gnu services) #:select (simple-service etc-service-type))
>  ((gnu services desktop) #:select (%desktop-services))
>  ((gnu system)   #:select (operating-system))
>  ((guix gexp)#:select (local-file)))
>
> (define guixrig_host_rsa_key
>   (local-file "ssh/guixrig_host_rsa_key" #:recursive? #t))
>
> (operating-system
>  ...
>  (services (cons* (simple-service 'my-secret-service etc-service-type
>   `(("ssh/guixrig_host_rsa_key" 
> ,guixrig_host_rsa_key)))
>   %desktop-services)))
> ```
>
> Have fun and happy hacking!
>   ~Gary

> Nathan Dehnel  writes:
>
> Thanks. Though that code causes "guix system: error: symlink: File
> exists: "/etc/ssh"" when I use it, and by the looks of it, would still
> be putting the key in the store, which is insecure.

Bummer. It works as expected when I run that code on my system with:

```
sudo guix system reconfigure config.scm
```

Maybe you manually created /etc/ssh already, which could be causing the
error on your end? Either way, your file does end up in the store and is
owned by root:root with permissions 444.

I'm not aware of a way to add files to /etc or any other guix-managed
directory without placing a copy in the store. However, once your file
lands in /etc/ssh/guixrig_host_rsa_key, isn't it owned by root:root and
readable as well?

Perhaps one of the other Guix wizards on this mailing list would have
some ideas on how to control the permissions on these auto-generated
files.

Good luck,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Run .deb or .rpm packages

2021-12-08 Thread André A . Gomes
Hi Guix,

I'm wondering if it's possible to install .deb or .rpm packages on the
Guix system.

For context, my government only provides me these solutions to install a
authentication plugin that I use with my ID (smart) card.

Thanks.


-- 
André A. Gomes
"Free Thought, Free World"



Re: getting crazy with arm build

2021-12-08 Thread Ricardo Wurmus


Andreas Bauer  writes:

> 1. arm substitutes should be available via bordeaux substitute server
> (since bordeaux has arm build farm I thought that this should be happening).

https://ci.guix.gnu.org also has two aarch64 build machines, “grunewald” and
“pankow”.

-- 
Ricardo



Re: getting crazy with arm build

2021-12-08 Thread pelzflorian (Florian Pelz)
On Mon, Dec 06, 2021 at 11:53:45PM +0100, Andreas Bauer wrote:
> Hi Everyone!
> 
> I am having a hard time getting guix os running on a rock-pro (arm) board.

For other readers, this thread is very similar to
.


> So this is what I dont understand:
> 
> Using cross compilation with  "--target=aarch64-linux-gnu" the build fails,
> as soon as I add anythign as simple as an ssh server.

Maybe also pass --system=aarch64-linux for QEMU emulation?  I see that
the Guix repo’s gnu/platforms/arm.scm does both
--target=aarch64-linux-gnu and --system=aarch64-linux.  No idea if it
helps.  Eventually Guix should not require --system though, I think.


> Normlally it fails because of "meson build system" or "perl modules". I
> read that meson-build is cross-compilation compatible, so
> thats the first thing that I dont understand.

In the core-updates-frozen branch, there is Meson cross-compilation
support since July 14  commit
8456581375cf03c46005d00907f8fdd1f5615f1e.  Either wait until it lands
in Guix proper (somewhat soon), or try the core-updates-frozen branch.
However, for me that failed at cross-compiling dosfstools (with
--target only, no --system).


> With qemu compilation, "--system=aarch64-linux" it is cmpiling forever. I
> had to stop after 2 days trying to build my system.

Yes, I think it takes that long.


> What I dont understand here is this:
> 
> 1. arm substitutes should be available via bordeaux substitute server
> (since bordeaux has arm build farm I thought that this should be happening).
> It seems that I do not get any substitutes this way. I understand that
> certain exotic packages have to be build on my machine, but something as
> basic as the kernel? How can this be?

Is bordeaux enabled?  See:

https://guix.gnu.org/blog/2021/substitutes-now-also-available-from-bordeauxguixgnuorg/


> 2. qemu builds only on one core. I have set  "--cores=6", but this seems
> not to matter.

Which package specifically?

This is when you run `guix build --system=aarch64-linux …`?



> 3. It see multiple different kernel versions getting compiled. This is very
> confusing. I didnt add any extra packages in this regard.
> 
> The cookbook mentions a way to build an installer image for arm; but
> building the installer image has a lot of packages, so since my small
> images dont build in days, I dont think the installer would build in a
> week.I know that I saw arm binaries for download at some point on the
> guix website. So I wonder why they are no longer there. A binary download
> for an installer to me seems to be quite important. But I dont
> find anyone asking for it. Am I missing something here?

There are PinebookPro images:

https://guix.gnu.org/en/download/latest/

But I don’t know if there are rockpro64 images; probably not, since
there is no image in the guix repo nor cookbook.


> 4. I finally was successful in building an image to get started, and it
> would only work when I did add zero packages to the os-image,
> and when I have removed all the services except for a shell login. This
> image is runnign now, and what I dont understand is, that
> this image has to have the kernel inside, otherwise how would it run. It
> all came via the cross-compilation. So the substitutes for the kernel
> have to be available then! mWhy dont they appear in the qemu build then?
> 
> 5. The way I am now setting up my rock-pro board is first, I get an image
> that only allows me to boot, and login to the shell. Then I add
> some bootstrap files to it via etc-service-type with (local-file ...)..
> Essentially I add a manifest and an extended os image definiition to it,
> and then start building that
> on the rock-pro board.

Yes, this is faster.



> Now it would be perfect to add an entire directory
> of scripts and batch files to a folder into the image. But the local-file
> only allows me
> to add one file per line. Is there any option where I could add an entire
> folder to the image that gets build? This would help a lot in my
> bootstrapping process.

There is (local-file "…" #:recursive #t) and similar for other kinds
of file.

Cannot answer the rest.

Regards,
Florian Pelz