HP Printer setup with Cups & hplip

2024-10-23 Thread Development of GNU Guix and the GNU System distribution.
Hello,

I’m trying to get my HP LaserJet P1108 to work with Guix. It previously worked 
well with hplip and some some plugin I believe. Currently there’s several 
issues, when I do `lsusb' I get P1102, not P1108. I don’t know how that is 
happening. Next, when I print something by selecting the printer, mind you, 
when selecting the printer from system printing dialog, I see P1108. After 
selecting and clicking print, I see my printer’s LED blink once and then 
nothing happens. The desired thing is that the LED keeps blinking and then the 
printer takes the paper in.

In my operating system’s services list, I have this s-expression:

;;;
(service cups-service-type
(cups-configuration
 (web-interface? #t)
 (extensions
  (list cups-filters hplip-minimal
;

and I have hplip and hplip-minimal as packages in the system profile. Cups 
works as expected, when I go to localhost:631 I see my printer and the jobs 
that have been queued. I’ve tried the hp-setup to setup the printer again, 
nothing changes. I’ve tried other hp scripts like hp-check, hp-doctor, 
hp-diagnose_plugin etc. they don’t work either.

Regards,
-- 
Divya Ranjan,
Philosophy, Mathematics, Libre Software.




Re: Reconfigure fails after merge of core-updates

2024-10-23 Thread Ludovic Courtès
Hi,

Felix Lechner  skribis:

> Why do failures tend to occur in the same packages over time?

Sometimes there are non-deterministic test failures.  Commit
b5303183ef865a243f7746a7c19c1a98ad0fa242 fixed one in Guix’s
‘tests/print.scm’ recently.

Ludo’.



Re: emacs-guix

2024-10-23 Thread Ludovic Courtès
Hi Christopher,

Alex Kost wrote in the past that they no longer want to be involved.

As you know, the “official” repo is now at
.  If you would
like to give a hand or take over maintenance, you’ve very much welcome
to do so: it’s a great piece of software and it’s sad to see it bitrot.

For now, you can send patches to guix-patc...@gnu.org with “Emacs-Guix”
in the subject and I and other committers would be happy to apply them.

Thanks for offering to help!

Ludo’.



Re: HP Printer setup with Cups & hplip

2024-10-23 Thread Kaelyn
Hi,

On Wednesday, October 23rd, 2024 at 4:13 AM, Divya Ranjan via "Development of 
GNU Guix and the GNU System distribution."  wrote:

> 
> 
> Hello,
> 
> I’m trying to get my HP LaserJet P1108 to work with Guix. It previously 
> worked well with hplip and some some plugin I believe. Currently there’s 
> several issues, when I do `lsusb' I get P1102, not P1108. I don’t know how 
> that is happening. Next, when I print something by selecting the printer, 
> mind you, when selecting the printer from system printing dialog, I see 
> P1108. After selecting and clicking print, I see my printer’s LED blink once 
> and then nothing happens. The desired thing is that the LED keeps blinking 
> and then the printer takes the paper in.
> 
> In my operating system’s services list, I have this s-expression:
> 
> ;;;
> (service cups-service-type
> (cups-configuration
> (web-interface? #t)
> (extensions
> (list cups-filters hplip-minimal
> ;
> 
> and I have hplip and hplip-minimal as packages in the system profile. Cups 
> works as expected, when I go to localhost:631 I see my printer and the jobs 
> that have been queued. I’ve tried the hp-setup to setup the printer again, 
> nothing changes. I’ve tried other hp scripts like hp-check, hp-doctor, 
> hp-diagnose_plugin etc. they don’t work either.

I've not really used the hp-* scripts, but I have gotten an HP network printer 
working with my systems using the following service config:

(service cups-service-type
 (cups-configuration
  (web-interface? #t)
  (extensions
   (list cups-filters foomatic-filters hplip

I'm not sure of foomatic-filters is necessary, but I also didn't do any 
fine-tuning once I got my printer working through CUPS because of how finicky 
they are to set up. HTH!

Cheers,
Kaelyn

> 
> Regards,
> --
> Divya Ranjan,
> Philosophy, Mathematics, Libre Software.



Re: HP Printer setup with Cups & hplip

2024-10-23 Thread Development of GNU Guix and the GNU System distribution.
Hi Divya,

On Wed, Oct 23 2024, Divya Ranjan via "Development of GNU Guix and the GNU 
System distribution." wrote:

> I’ve tried the hp-setup to setup the printer again, nothing
> changes. I’ve tried other hp scripts like hp-check, hp-doctor,
> hp-diagnose_plugin etc. they don’t work either.

I've never had much luck with hplip.  Can you install the PPD for your
printer [1] manually into CUPS and use it directly?

Kind regards
Felix

[1] 
https://sources.debian.org/src/hplip/3.16.11%2Brepack0-3/ppd/hpcups/hp-laserjet_professional_p1108.ppd/



Limiting resource usage on ci.guix.gnu.org

2024-10-23 Thread Ludovic Courtès
Hello Guix,

Lately ci.guix has regularly been bubbling around 100,000 pending
builds, which cannot be absorbed in a timely fashion:

  https://ci.guix.gnu.org/metrics

Currently there are several jobsets producing many builds:
‘mesa-updates’, ‘meson-parallel-tests’, ‘rust-team’, ‘python-team’.
That’s fine, it’s the whole point of the platform, but I think we should
follow some rules to keep things under control:

  1. Until it’s “your turn” to merge according to the requests to merge
 listed at , please restrict builds to
 x86_64-linux, unless portability is a significant aspect of the
 branch.  This is necessary due to limited resources for aarch64
 and, to a lesser extent, powerpc64le.

  2. When rebasing on top of ‘master’, please cancel pending builds from
 previous evaluations that have become irrelevant.

If you don’t have a certificate for ci.guix or SSH access to berlin to
perform these tasks, you can ask on IRC or on guix-sysad...@gnu.org.

Thanks,
Ludo’.



emacs-elpher upgrade request

2024-10-23 Thread Christopher Howard
Hi, I was just wondering if somebody is able to bump emacs-elpher package to 
3.6.4, which was just released. It fixes a bug I reported.

We have been stuck at 3.6.0 because for some reason the last few releases were 
not tagged in the repo. But the developer has now fixed this and pushed out the 
tags.

-- 
📛 Christopher Howard
🚀 gemini://gem.librehacker.com
🌐 http://gem.librehacker.com

בראשית ברא אלהים את השמים ואת הארץ



Re: [PATCH v1] shepherd: add support for kexec

2024-10-23 Thread Ludovic Courtès
Hi Jakob,

Jakob Kirsch  skribis:

> This patch adds preliminary support for rebooting into kexec using `reboot 
> -k` or `reboot --do-kexec`.

Nice!  That sounds useful.

Some comments inline below.  In the future, could you send patches to
guix-patc...@gnu.org, with “Shepherd” in the subject?

> --- a/configure.ac
> +++ b/configure.ac
> @@ -104,6 +104,7 @@ case "$host_os" in
>  AC_COMPUTE_INT([RB_DISABLE_CAD], [RB_DISABLE_CAD], [#include 
> ])
>  AC_COMPUTE_INT([RB_POWER_OFF], [RB_POWER_OFF], [#include ])
>  AC_COMPUTE_INT([RB_SW_SUSPEND], [RB_SW_SUSPEND], [#include 
> ])
> +AC_COMPUTE_INT([RB_KEXEC], [RB_KEXEC], [#include ])
>  ;;
>gnu*)
>  # On GNU/Hurd, the Mach-derived reboot.h uses different names, and

Please also handle the Hurd case, similar to how ‘RB_DISABLE_CAD’ is
handled.

> +++ b/modules/shepherd/scripts/reboot.scm
> @@ -30,6 +30,8 @@
>  (define (main . args)
>(initialize-cli)
>
> +  (define reboot-action 'stop)

Or just ‘action’?

> +  #:action (lambda () (set! reboot-action 'reboot-kexec))

… and just ‘kexec’?

> + (reboot-kexec
> +   "Reboot the system and run kexec."

Likewise, I’d call it just ‘kexec’.

Could you expand the docstring a bit to give an overview of what “kexec”
does for users not familiar with it?

> +(define (reboot-kexec)
> +  "Execute kernel loaded with 'kexec -l' now.  Return #f on failure."

“Execute the Linux kernel previously loaded with 'kexec -l'.  Throw an
exception on failure.”

> +  (%libc-reboot RB_KEXEC))

Please address the case where RB_KEXEC is #f by doing something like:

  (throw 'system-error 'kexec  "~A" (list (strerror ENOSYS))
 (list ENOSYS))

Could you also update ‘doc/shepherd.texi’, specifically the reference of
the ‘reboot’ command and the list of actions of the ‘root’ service?

Thanks for this work!

Ludo’.



Re: HP Printer setup with Cups & hplip

2024-10-23 Thread Tobias Geerinckx-Rice
Hi,

On 23 October 2024 11:13:36 UTC, "Divya Ranjan via Development of GNU Guix and 
the GNU System distribution."  wrote:
> Currently there’s several issues, when I do `lsusb' I get P1102, not P1108. I 
> don’t know how that is happening. 

Devices and/or databases sometimes lie^Wcontain errors.  Have you seen ‘P1108’ 
on other GNU/Linux distributions?  Could be harmless.

As for printing: it's… unclear whether your printer supports Guix?  I think it 
should: here's a report¹ of people using your printer on Debian using only 
CUPS+HPLIP.

Still, HP claims² ‘Yes’ to requiring additional proprietary software (their 
‘plugin’) to even print at all. 

At least, as I read the footnote, if printing were possible, it would be 
‘Optional’.  That plugin is not part of HPLIP and not available in Guix, nor 
are we going to support it.

Does your /var/log/cups/error_log mention anything interesting?  In particular, 
does it mention a plugin?  You can attach a compressed copy if you like.

What is the status of your printer in the CUPS Web interface?

Have you tried removing + adding the printer using said Web interface, avoiding 
the HP GUIs entirely?  I've never needed to use them myself.  These Python 
scripts are lightly tested & maintained on Guix—if at all.


Kind regards,

T G-R

[1]: https://forums.debian.net/viewtopic.php?t=158614
[2]: 
https://developers.hp.com/hp-linux-imaging-and-printing/supported_devices/index

Sent on the go.  Excuse or enjoy my brevity.



Re: Upgrading NumPy and friends

2024-10-23 Thread jgart
Hi,

I like the idea of audio/video confs for the Python team.

My availability is limited these days but I can participate in an hour 
discussion if we can coordinate it around my work schedule and if the branches 
can be kept small and topic-oriented in order to not let them go 
stale/long-lived. I think that this will help to decrease maintenance time of a 
branch and to focus our efforts.

random question:

Is our goal still to eventually move all python packages to 
pyproject-build-system and zap the python-build-system?

all best,

jgart

P.S.

Python code that depends on Rust might increase maintenance time...



Re: Language-specific guides for using "guix shell"

2024-10-23 Thread Ludovic Courtès
Hi,

Suhail Singh  skribis:

> "jgart"  writes:
>
>> what do people think of having language specific guides for using
>> `guix shell` with particular programming languages?
>>
>> not unlike this Nix guide that shows how to use Python in a `nix
>> shell` to develop on a flask application:
>>
>> https://nix.dev/guides/recipes/python-environment.html
>
> I believe such guides would be quite helpful.  Perhaps Guix Cookbook
> would be the appropriate place for it?

I agree it’d be useful, and I think the Cookbook is indeed a good place
for that.

Ludo’.



Re: shepherd: failing test: should `herd stop` stop a respawning process?

2024-10-23 Thread Ludovic Courtès
Hi,

Attila Lendvai  skribis:

> i have a daemon process that quits soon after it starts (when it has some 
> issue with its configurations).
>
> then i usually fix the config, and do a guix system reconfigure. but i have 
> noticed from the logs that this process often remains in a resawn loop, even 
> if i herd stop and herd disable it after the reconfigure (i.e. a shepherd 
> service upgrade).

If it’s in a respawn loop, the problem is that ‘herd stop’ may or may
not happen at the right moment, because the service oscillates between
the stopped/starting/running/stopping statuses.

However, ‘herd disable’ should prevent it from being respawned.
(Respawning calls ‘start-service’, which cannot start a service marked
as disabled.)

But I don’t know, there could be a bug.  Could you come up with a
reduced test case (I looked at the one attached but I’m not sure which
part to focus on), or do you have logs of the problem?

Thanks,
Ludo’.



Re: Upgrading NumPy and friends

2024-10-23 Thread Ludovic Courtès
Hello,

Sharlatan Hellseher  skribis:

> I would like to open a conversation on upgrading NumPy, Pandas, Numba
> and SciPY.

Cc’ing members of the Python team, to make sure the right people are in
the loop.

> It would be reasonable to refresh that core scientific packages for
> Python after merging python-team which is nearly finished building.

[...]

> I've started noticing that more and more projects require a fresh
> version of NumPy during Astro upgrade monthly, sometimes it's captured
> on sanity check phase, but most of the time the package is just not work
> especially when it depends on python-astropy which heavily depends on
> NumPy.
>
> Does anyone work on that packages or would be interested in taking the
> flag?

I’m not a Python person, but I know it’s important work, and often
difficult.

Perhaps it would make sense for interested people, in particular in the
‘python’ team, to work closely together on that and maybe have IRC or
audioconf meetings to coordinate?

My 2¢,
Ludo’.



Re: Question regarding gexp->script and program-file.

2024-10-23 Thread Ludovic Courtès
Hi,

Arnaud Daby-Seesaram  skribis:

> I have just one quick question regarding `gexp->script' and
> `program-file' procedures: why is the `--no-auto-compile' flag added to
> the shebangs of produced files?

That’s primarily because auto-compilation would print messages the first
time you run these programs, or even every time if there’s no place to
write .go files to.

The idea is also that ‘program-file’ & co. are meant for small programs,
where compilation doesn’t matter much.

Ludo’.



Re: guix shell: error: symlink: File exists: "/bin/cc"

2024-10-23 Thread Ludovic Courtès
Hi,

Marco Fortina  skribis:

> I have this issue when with guix time-machine shell when using --emulate-fhs 
> option and having gcc-toolset and clang-toolset in my manifest.scm.

I tried, and for those reading along, the problem is:

--8<---cut here---start->8---
$ guix shell -CF gcc-toolchain clang-toolchain
guix shell: error: symlink: File exists: "/bin/cc"
--8<---cut here---end--->8---

> --- a/gnu/packages/llvm.scm
> +++ b/gnu/packages/llvm.scm
> @@ -512,8 +512,10 @@ (define-public (make-clang-toolchain clang libomp)
>   ;; Create 'cc' and 'c++' so that one can use it as a
>   ;; drop-in replacement for the default tool chain and
>   ;; have configure scripts find the compiler.
> - (symlink "clang" (string-append out "/bin/cc"))
> - (symlink "clang++" (string-append out "/bin/c++"))
> + (unless (file-exists? "/bin/cc")
> + (symlink "clang" (string-append out "/bin/cc")))
> + (unless (file-exists? "/bin/c++")
> + (symlink "clang++" (string-append out "/bin/c++")))

This part has no effect (there’s no /bin/cc in the build environment.)

> +++ b/guix/scripts/environment.scm
> @@ -465,7 +465,8 @@ (define* (link-contents dir #:key (exclude '()))
>;; bin directories will link to /bin.
>(let ((gcc-path (string-append profile "/bin/gcc")))
>  (if (file-exists? gcc-path)
> -(symlink gcc-path "/bin/cc")))
> +(unless (file-exists? "/bin/cc")
> +(symlink gcc-path "/bin/cc"

Good catch!  I’m proposing a slightly modified variant of this change:

diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index a219b2ac89..fc7fa84be7 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -464,8 +464,15 @@ (define (setup-fhs profile)
   ;; /bin since that already has the sh symlink and the other (optional) FHS
   ;; bin directories will link to /bin.
   (let ((gcc-path (string-append profile "/bin/gcc")))
-(if (file-exists? gcc-path)
-(symlink gcc-path "/bin/cc")))
+(when (file-exists? gcc-path)
+  (catch 'system-error
+(lambda ()
+  (symlink gcc-path "/bin/cc"))
+(lambda args
+  ;; If /bin/cc already exists because it was provided by another
+  ;; package in PROFILE, such as 'clang-toolchain', leave it.
+  (unless (= EEXIST (system-error-errno args))
+(apply throw args))
 
   ;; Guix's ldconfig doesn't search in FHS default locations, so provide a
   ;; minimal ld.so.conf.

I’ll push it soon if there are no objections.

Thanks for reporting the problem!

Ludo’.


Re: CI idle for aarch64?

2024-10-23 Thread Ludovic Courtès
Hi,

"Brennan Vincent"  skribis:

> While trying to understand why I can't build Skia on aarch64 (see
> https://issues.guix.gnu.org/issue/73659) , I tried looking at the logs
> in CI. The Skia build is listed as "Scheduled":
> http://ci.guix.gnu.org/build/5915482/details . But nothing is being
> built on any of the aarch64 currently. So why has the build not started?

Unfortunately, build machines can be reported as idle even though
they’re building things.

The reason for this is a design issue in Cuirass, which knows about
“builds” assigned to build machines, but not about derivations actually
being built (“builds” here are the things you explicitly asked Cuirass
to build; on , that includes
most packages, but not all.)

Often, before they can perform the “build” they were given, build
machines must build other derivations that the given build depends on.
Those are currently not shown at .
It’s really a bug that should be fixed.

There can also be other reasons why a build machine appears to be idle:
because it’s (re)trying to substitute a derivation it was asked to
build, because it’s running out of disk space, etc.  Those should be
less frequent though.

Ludo’.



Re: Limiting resource usage on ci.guix.gnu.org

2024-10-23 Thread Greg Hogan
On Wed, Oct 23, 2024 at 12:14 PM Ludovic Courtès  wrote:
>
> Hello Guix,

[...]

>   2. When rebasing on top of ‘master’, please cancel pending builds from
>  previous evaluations that have become irrelevant.

How is this issue limited to rebasing to 'master'? For example, if the
rust team pushes a patch increasing the base-rust (causing a rebuild
of all rust packages) would not the previous (when pending) evaluation
need to be cancelled? Why do we not cancel old evaluations
automatically? Any unchanged derivations would be built under the new
evaluation.



Re: emacs-guix

2024-10-23 Thread Christopher Howard
Ludovic Courtès  writes:

> For now, you can send patches to guix-patc...@gnu.org with “Emacs-Guix”
> in the subject and I and other committers would be happy to apply them.
>

Thank you. I have now cloned the repository. My spare time is very limited in 
this stage of my life, but I am hoping over the winter that I will be able to 
work on learning the code and patching a few bugs. (It is winter now in 
Alaska.) Lately I have been busy trying to finish my EmacsConf talks.

Could somebody explain the best approach to running/testing modified emacs-guix 
source from a Guix system? I see emacs-guix is loaded from the site-start.el 
file in the profile, and then this loads guix-emacs-autoload-packages, which is 
critical for running Emacs on a Guix system. So, it is not obvious to me the 
most sensible approach for iterative building and testing.

-- 
Christopher Howard



Re: `map-derivation' is too slow for meaningful usage

2024-10-23 Thread Ludovic Courtès
Hi,

Sergio Pastor Pérez  skribis:

> On 06-09-2024 12:17, Ludovic Courtès wrote:
>> Perhaps we could try and address those performance issues, and then see
>> if we could come up maybe with a “derivation transformation” framework
>> to make it more approachable?
>
> That sound good to me. Do you have any idea on what could be the bottleneck?

No idea, but the implementation is likely naïve: I wrote once, tested it
on simple cases, but it never got any use beyond that.

I would start by profiling it with (statprof), and then also look at
caching issues (see the ‘GUIX_PROFILING’ environment variable).

HTH!

Ludo’.



Re: Seemingly unintentional near-world rebuild

2024-10-23 Thread Ludovic Courtès
Hello,

Andreas Enge  skribis:

> Am Sat, Oct 19, 2024 at 09:53:06AM -0700 schrieb Ian Eure:
>> > When my Cuirass pulled commit 5794926bed6fad4598bb565fb7f49be4205b11a1
>> > this morning, it started rebuilding every package in my channel. This
>> > includes a package with zero inputs other than what cmake-build-system
>> > needs[1].
>> > 
>> > ci.guix has been evaluating this commit for 90 minutes[2] at the time
>> > of this writing, but hasn’t started any builds (it’s also 504ing
>> > around half the times I try to load it).  I think it’s going to do a
>> > world rebuild, or very close to it.
>> > 
>> > Was this expected?  Should anything be done about it?
>
> difficult to do anything now, there are a bunch of commits that would need
> to be reverted.
>
> Normally the world rebuild has been done on bayfront for the fonts split
> branch. I have just rebased it on master. So indeed what is new on master
> since October 7 may need rebuilding. But I tried with my home profile, and
> all of the packages were available.

Indeed.  Likewise, ci.guix had been building the ‘fonts-split-outputs’
branch for a while already and was around 90% for x86_64-linux (it’s
still catching up for aarch64-linux though, but as Andreas mentioned,
bordeaux.guix was up-to-speed).

  https://issues.guix.gnu.org/72959#9

Ludo’.