Bug 2308285 - Consider switching to Wolfgang Friebel’s lesspipe.sh
Summary: Consider switching to Wolfgang Friebel’s lesspipe.sh
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: less
Version: 42
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-08-28 04:22 UTC by Petasus Ruber
Modified: 2025-11-24 21:08 UTC (History)
10 users (show)

Fixed In Version: less-685-6.fc44
Clone Of:
Environment:
Last Closed: 2025-11-24 21:08:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-2141 0 None None None 2025-09-03 10:06:30 UTC

Description Petasus Ruber 2024-08-28 04:22:11 UTC
Wolfgang Friebel’s `lesspipe.sh` (https://github.com/wofr06/lesspipe) has integration with a wide range of popular highlighting programs (_eg_ `bat` in EPEL), can read a wider variety of files, and has a test suite that goes a long way towards helping downstream maintainers get the correct dependencies in spec.

Reproducible: Always

Comment 1 Aoife Moloney 2025-02-26 13:11:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 2 Joel Capitao 2025-11-13 16:09:33 UTC
Could we put the lesspipe scripts into a dedicated subpackage please ? I can propose a PR if you're ok with the proposal.
Since https://src.fedoraproject.org/rpms/less/c/7063e7b7725595fb7269d8d477ac246ac4d0453b?branch=rawhide, one who wants 'less' only has to pull the whole perl dependency list.
CoreOS is hitting an issue since this commit c.f https://github.com/coreos/fedora-coreos-tracker/issues/2059

Comment 3 Adam Williamson 2025-11-13 16:28:02 UTC
yeah, this will actually break build of all the atomic desktops, because they both want to include less and exclude perl, see openQA failure: https://openqa.fedoraproject.org/tests/3960601#step/_ostree_build/45

https://pagure.io/workstation-ostree-config/blob/main/f/common.yaml#_164 - exclusion of perl
https://pagure.io/workstation-ostree-config/blob/main/f/packages/common.yaml#_94 - inclusion of less

CC travier.

Comment 4 Adam Williamson 2025-11-13 16:31:38 UTC
Also why did you add `make test ||:` to run the tests but ignore the result? A ton of tests fail, but the build goes through. What's the point?

Comment 5 Adam Williamson 2025-11-13 16:33:57 UTC
Also you left Source4 (lesspipe.sh.1) in the spec file but it is no longer used for anything. And you left lesspipe.sh in the dist-git repo even though the spec no longer uses it.

Comment 6 Timothée Ravier 2025-11-13 16:37:14 UTC
So this adding a lot of code parsing a lot of file formats in a very low level, frequently used command line tool. This should really be a different package and the current less one should be kept as is.

Comment 7 Adam Williamson 2025-11-14 16:20:35 UTC
Breaking all atomic desktop builds isn't really acceptable, so since there's been no response from the maintainer here, I will use provenpackagers power to revert the change. I won't try to implement the subpackaging, I'll leave that up to the maintainer when they do get around to this.

Comment 8 Michal Hlavinka 2025-11-16 19:22:04 UTC
Sorry for late response, I was ill. 

I did not know that perl requirement is i no-no. I will rework this.

Will adding perl (and some other optional dependencies) as "Recommends:" subpackage work or will it still pull it into compose? I'm not sure how Recommends works for composes.


(In reply to Adam Williamson from comment #4)
> Also why did you add `make test ||:` to run the tests but ignore the result?
> A ton of tests fail, but the build goes through. What's the point?

Successful tests requires way too many dependencies to pass. It's purpose is to see what is working with current set of requirements. So purpose is debug output, not gating test.


(In reply to Timothée Ravier from comment #6)
> So this adding a lot of code parsing a lot of file formats in a very low
> level, frequently used command line tool. This should really be a different
> package and the current less one should be kept as is.

Fedora was (is) the only distro with so barebone less. Lesspipe filter is made that it will work with what it has available so it should not be the issue in itself. Putting those dependencies in correct (sub)packages should make everyone happy, I hope.

---
Changing status to Assigned, as it better reflects current state

Comment 9 Adam Williamson 2025-11-17 08:01:03 UTC
> Will adding perl (and some other optional dependencies) as "Recommends:" subpackage work or will it still pull it into compose? I'm not sure how Recommends works for composes.

There's no single answer, it depends on the build tool used each image and the configuration of that image. Some images do include soft deps, so this might potentially include perl on some where it previously was not included. Making it a recommends would avoid breaking the atomic desktops, though, I'm fairly sure.

> Fedora was (is) the only distro with so barebone less. Lesspipe filter is made that it will work with what it has available so it should not be the issue in itself. Putting those dependencies in correct (sub)packages should make everyone happy, I hope.

Did you notice Yaakov submitted https://src.fedoraproject.org/rpms/less/pull-request/13 ?

Comment 10 Timothée Ravier 2025-11-17 17:37:19 UTC
For both Fedora CoreOS & Fedora Atomic Desktops (at least), we can not have core tools depend on Perl as we exclude it from the image.

It's OK if it's in a recommended package as it will be automatically excluded during the compose.

Comment 11 Dusty Mabe 2025-11-24 15:44:30 UTC
Regarding the perl dep there was a commit (and RPM build) to unwind it in https://src.fedoraproject.org/rpms/less/c/d54f2ef570e0a50af22448705bd006e5d762b015?branch=rawhide

Comment 12 Adam Williamson 2025-11-24 17:11:54 UTC
Yeah, that was just me doing a minimal 'fix' (really just a revert) to get ostrees building again. I'm leaving the bug open intentionally as I assumed the packager would want to do something different going forward, like Yaakov's PR or something.

Comment 13 Michal Hlavinka 2025-11-24 20:46:46 UTC
I've decided to go with just separating colorizers (perl deps) into separate boolean recommended subpackage as is done in Yaakov's PR. I hope this will work for everyone without issues.


Note You need to log in before you can comment on or make changes to this bug.