Re: clamav freshclam - how to provide /etc config in general

2024-01-31 Thread Carlo Zancanaro
Hi Christopher,

On Tue, Jan 30 2024, Christopher Chmielewski wrote:
> So my question is more general. How do you provide config files for
> software that expects it to be located in /etc? Is there a best
> practice?

On a Guix system, you can do this by extending etc-service-type, which
writes files to /etc.

If you add the following to your operating-system's services then it
should create a file in /etc/clamav/freshclam.conf with the contents
"config goes here".

(simple-service 'freshclam-config etc-service-type
  `(("clamav/freshclam.conf" ,(plain-file "freshclam.conf" "config goes 
here"

If you already have a file that you'd like to use as the config file,
you could instead use local-file with an appropriate path:

(simple-service 'freshclam-config etc-service-type
  `(("clamav/freshclam.conf" ,(local-file "path/to/freshclam.conf"

These things are also documented in the manual, if you'd like to read
more. See "(guix) Service Reference" for etc-service-type and
simple-service, and "(guix) G-Expressions" for local-file and
plain-file.

The above is for defining this sort of configuration in an "ad-hoc" way:
directly managing the files in /etc. A "better" approach is to define a
Guix system service to manage the configuration. This is more involved,
though, so I wouldn't recommend it to solve your immediate problem. You
can read more about this in the manual under "(guix) Defining Services".

I hope that helps,

Carlo



Re: How to determine the supported file systems for (uuid ...)?

2024-01-31 Thread Felix Lechner via
Hi Rodrigo,

On Fri, Jan 19 2024, Rodrigo Morales wrote:

> when EXT2 is supported, then it is highly likely that EXT3 and EXT4 is
> also supported?

Yes, that's because ext3 and ext4 only add better journaling and other
features to what essentially remains ext2 metadata. [1]

Kind regards
Felix

[1] See "backward compatibility,"
https://en.wikipedia.org/wiki/Ext4#Features



Re: Unable to boot installer (i686)

2024-01-31 Thread Felix Lechner via
Hi Kete,

On Sun, Jan 28 2024, Kete Foy via wrote:

> error: you need to load the kernel first.

I believe your BIOS enumerated your drives differently than the
installer. Either way, I would load grub.cfg manually and make any
needed edits manually before booting, with 'e' in the menu.

In preparation, I might copy guix.scm from its Guix store location to
the more accessible root folder using a rescue USB stick (or the
installer USB itself).

If you have trouble getting into GRUB from your hard drive alone, you
can also boot from the installer USB and load grub.cfg from there.

You seem to know GRUB, so I keep more basic comments to myself. Please
just remember that loading modules via 'insmod' will enhance GRUB's
capabilities as you go, especially 'insmod normal'.

Kind regards
Felix



clamav freshclam - how to provide /etc config in general

2024-01-31 Thread Christopher Chmielewski

Hello Guix Hackers :)

I'm new to Guix and I ran into the following error running the freshclam 
command:


ERROR: Can't open/parse the config file /etc/clamav/freshclam.conf

Now I understand that the error is that the config file is not present 
in /etc. However I figure that there is a "guix-way" of providing this 
config file instead of just creating it in /etc (which would be lost on 
reboot).


So my question is more general. How do you provide config files for 
software that expects it to be located in /etc? Is there a best practice?


Thanks,

Chris



Unable to boot installer (i686)

2024-01-31 Thread Kete Foy via
Hi,
I am trying to use my old 32-bit netbook, but here is what the installer says:

Booting `GNU Guix installation 1.4.0'

error: USB Mass Storage stalled.
error: you need to load the kernel first.

Press any key to continue...

Failed to boot both default and fallback entries.

Then, the grub screen reloads, and when I try to boot, I get an additional 
error message, "error: no such device: 1970-01-01-19-33-31-83."

I tried to set a prefix, but I couldn't get anywhere. Tabbing suggested 
something like achi0, but grub said there was no something there with something 
like msdos0. Sorry, it's late, and I've shut down the computer.

-- Sent with https://mailfence.com  Secure and private email


Re: Network error when cargo-build-system fetches dependency from external repository specified in Cargo.toml

2024-01-31 Thread Ignas Lapėnas
Hi Airi,

All rust builds are isolated from the network. In order to build a package,
usually you must provide packages from guix crates-io.scm


Using guix edit and a rust package would also open a current version of guix

for example `guix edit rust-async-recursion` would open crates-io.scm and point
to the package.

┌
│ (define-public rust-async-recursion-1
│   (package
│ (name "rust-async-recursion")
│ (version "1.0.4")
│ (source (origin
│   (method url-fetch)
│   (uri (crate-uri "async-recursion" version))
│   (file-name (string-append name "-" version ".tar.gz"))
│   (sha256
│(base32
│ "1fhwz7jqgsakbjsr2nrsvgs245l1m5dkzir6f9fxw4ngwrywx5qf"
│ (build-system cargo-build-system)
│ (arguments
│  `(#:tests? #f  ; TODO: Tests unexpectedly pass.
│#:cargo-inputs
│(("rust-proc-macro2" ,rust-proc-macro2-1)
│ ("rust-quote" ,rust-quote-1)
│ ("rust-syn" ,rust-syn-2))
│#:cargo-development-inputs
│(("rust-futures-executor" ,rust-futures-executor-0.3)
│ ("rust-trybuild" ,rust-trybuild-1
│ (home-page "https://github.com/dcchut/async-recursion;)
│ (synopsis "Recursion for async functions")
│ (description "This package provides recursion for async functions in 
Rust.")
│ (license (list license:expat license:asl2.0
└

The same file contains a lot of example rust packages you can check how
dependencies are “injected”

Also if there are packages that are missing `guix import crate 
@`
command is a godsend. Typing it all out would be insane.

Hope it helps.

– 
Best Regards,
Ignas Lapėnas