diff mbox series

[bug#57375] gnu: fix cups 'install-cups-filters-symlinks phase

Message ID 99c00ae2-d938-1b56-ef67-2bbfb4d38797@gmail.com
State New
Headers show
Series [bug#57375] gnu: fix cups 'install-cups-filters-symlinks phase | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Grigory Shepelev Aug. 24, 2022, 7:46 a.m. UTC
I am working on cups and cups-filter package to extend them to install 
additional printers drivers (filters and ppds).

I guess that current cups package has incorrect piece in 
'install-cups-filters-symlinks phase because of that all filters 
provided are installed in a wrong way, as they are not installed in 
/lib/cups/filter directory but having "filter" prepended to their 
filename (see 'tree' output below) and ppds provided by manufacturers 
expects filters to be exactly in /lib/cups/filter directory.

That's my first patch file send over email to collaborate on. I hope 
I've done it right,

shegeley@zone51 
/gnu/store/qnmc8r56xrw76f62b2cb9s262qn0h6w3-cups-2.3.3op2/lib/cups$ tree .
.
├── backend
│   ├── dnssd
│   ├── http -> ipp
│   ├── https -> ipp
│   ├── ipp
│   ├── ipps -> ipp
│   ├── lpd
│   ├── parallel -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/backend/parallel
│   ├── serial -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/backend/serial
│   ├── snmp
│   ├── socket
│   └── usb
├── cgi-bin
│   ├── admin.cgi
│   ├── classes.cgi
│   ├── help.cgi
│   ├── jobs.cgi
│   └── printers.cgi
├── command
│   ├── ippevepcl
│   └── ippeveps
├── daemon
│   ├── cups-deviced
│   ├── cups-driverd
│   ├── cups-exec
│   └── cups-lpd
├── driver
├── filter
│   ├── commandtops
│   ├── gziptoany
│   ├── pstops
│   ├── rastertoepson
│   ├── rastertohp
│   ├── rastertolabel
│   └── rastertopwg
├── filterbannertopdf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/bannertopdf
├── filter.bannertopdf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.bannertopdf-real
├── filterbrftoembosser -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/brftoembosser
├── filter.brftoembosser-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.brftoembosser-real
├── filterbrftopagedbrf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/brftopagedbrf
├── filter.brftopagedbrf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.brftopagedbrf-real
├── filtercgmtopdf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/cgmtopdf
├── filter.cgmtopdf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.cgmtopdf-real
├── filtercmxtopdf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/cmxtopdf
├── filter.cmxtopdf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.cmxtopdf-real
├── filtercommandtoescpx -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/commandtoescpx
├── filter.commandtoescpx-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.commandtoescpx-real
├── filtercommandtopclx -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/commandtopclx
├── filter.commandtopclx-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.commandtopclx-real
├── filteremftopdf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/emftopdf
├── filter.emftopdf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.emftopdf-real
├── filterfoomatic-rip -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/foomatic-rip
├── filter.foomatic-rip-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.foomatic-rip-real
├── filtergstopdf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/gstopdf
├── filter.gstopdf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.gstopdf-real
├── filtergstopxl -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/gstopxl
├── filter.gstopxl-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.gstopxl-real
├── filtergstoraster -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/gstoraster
├── filter.gstoraster-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.gstoraster-real
├── filterimagetobrf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/imagetobrf
├── filter.imagetobrf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.imagetobrf-real
├── filterimagetopdf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/imagetopdf
├── filter.imagetopdf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.imagetopdf-real
├── filterimagetops -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/imagetops
├── filter.imagetops-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.imagetops-real
├── filterimagetoraster -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/imagetoraster
├── filter.imagetoraster-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.imagetoraster-real
├── filterimagetoubrl -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/imagetoubrl
├── filter.imagetoubrl-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.imagetoubrl-real
├── filterimageubrltoindexv3 -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/imageubrltoindexv3
├── filter.imageubrltoindexv3-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.imageubrltoindexv3-real
├── filterimageubrltoindexv4 -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/imageubrltoindexv4
├── filter.imageubrltoindexv4-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.imageubrltoindexv4-real
├── filtermusicxmltobrf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/musicxmltobrf
├── filter.musicxmltobrf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.musicxmltobrf-real
├── filterpdftopdf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/pdftopdf
├── filter.pdftopdf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.pdftopdf-real
├── filterpdftops -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/pdftops
├── filter.pdftops-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.pdftops-real
├── filterpdftoraster -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/pdftoraster
├── filter.pdftoraster-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.pdftoraster-real
├── filterpstosecps -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/pstosecps
├── filter.pstosecps-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.pstosecps-real
├── filterrastertoescpx -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/rastertoescpx
├── filter.rastertoescpx-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.rastertoescpx-real
├── filterrastertopclm -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/rastertopclm
├── filter.rastertopclm-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.rastertopclm-real
├── filterrastertopclx -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/rastertopclx
├── filter.rastertopclx-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.rastertopclx-real
├── filterrastertopdf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/rastertopdf
├── filter.rastertopdf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.rastertopdf-real
├── filterrastertops -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/rastertops
├── filter.rastertops-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.rastertops-real
├── filterrastertospl -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/rastertospl
├── filter.rastertospl-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.rastertospl-real
├── filtersvgtopdf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/svgtopdf
├── filter.svgtopdf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.svgtopdf-real
├── filtersys5ippprinter -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/sys5ippprinter
├── filter.sys5ippprinter-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.sys5ippprinter-real
├── filtertextbrftoindexv3 -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/textbrftoindexv3
├── filter.textbrftoindexv3-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.textbrftoindexv3-real
├── filtertextbrftoindexv4 -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/textbrftoindexv4
├── filter.textbrftoindexv4-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.textbrftoindexv4-real
├── filtertexttobrf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/texttobrf
├── filter.texttobrf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.texttobrf-real
├── filtertexttopdf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/texttopdf
├── filter.texttopdf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.texttopdf-real
├── filtertexttops -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/texttops
├── filter.texttops-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.texttops-real
├── filtertexttotext -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/texttotext
├── filter.texttotext-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.texttotext-real
├── filtervectortobrf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/vectortobrf
├── filter.vectortobrf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.vectortobrf-real
├── filtervectortopdf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/vectortopdf
├── filter.vectortopdf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.vectortopdf-real
├── filtervectortoubrl -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/vectortoubrl
├── filter.vectortoubrl-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.vectortoubrl-real
├── filterwmftopdf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/wmftopdf
├── filter.wmftopdf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.wmftopdf-real
├── filterxfigtopdf -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/xfigtopdf
├── filter.xfigtopdf-real -> 
/gnu/store/41nvbi1ygfd8332r5qhmnsp81m1v57kn-cups-filters-1.28.9/lib/cups/filter/.xfigtopdf-real
├── monitor
│   ├── bcp
│   └── tbcp
└── notifier
     ├── mailto
     └── rss

Comments

Mathieu Othacehe Aug. 26, 2022, 2:07 p.m. UTC | #1
Hey Grigory,

>                      (symlink f
> -                             (string-append out "/lib/cups/filter"
> +                             (string-append out "/lib/cups/filter/"
>                                              (basename f))))
>                    (find-files (string-append cups-filters "/lib/cups/filter")))

Thanks for this first contribution! This fix looks fine.

However, the cups package has a lot of dependants (as shown by guix
refresh -l cups). This patch should target core-updates. On that branch,
the package definition has been a bit reworked. Do you think you could
rebase your patch on top of that branch and check that it still works
fine?

Another point, you should write a commit message using the ChangeLog
format. You can find more information here:
https://guix.gnu.org/manual/en/html_node/Submitting-Patches.html.

You should also use the "git format-patch" command to preserve the
commit data such as author, commit message and so on.

Don't hesitate to ask for help if needed.

Mathieu
Maxim Cournoyer Jan. 3, 2023, 10:21 p.m. UTC | #2
Hi Grigory,

Mathieu Othacehe <othacehe@gnu.org> writes:

> Hey Grigory,
>
>>                      (symlink f
>> -                             (string-append out "/lib/cups/filter"
>> +                             (string-append out "/lib/cups/filter/"
>>                                              (basename f))))
>>                    (find-files (string-append cups-filters "/lib/cups/filter")))
>
> Thanks for this first contribution! This fix looks fine.
>
> However, the cups package has a lot of dependants (as shown by guix
> refresh -l cups). This patch should target core-updates. On that branch,
> the package definition has been a bit reworked. Do you think you could
> rebase your patch on top of that branch and check that it still works
> fine?
>
> Another point, you should write a commit message using the ChangeLog
> format. You can find more information here:
> https://guix.gnu.org/manual/en/html_node/Submitting-Patches.html.
>
> You should also use the "git format-patch" command to preserve the
> commit data such as author, commit message and so on.
>
> Don't hesitate to ask for help if needed.

Friendly ping :-)
diff mbox series

Patch

diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index 3de9ddbf22..7afcceda25 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -433,7 +433,7 @@  (define-public cups
                  (for-each
                   (lambda (f)
                     (symlink f
-                             (string-append out "/lib/cups/filter"
+                             (string-append out "/lib/cups/filter/"
                                             (basename f))))
                   (find-files (string-append cups-filters "/lib/cups/filter")))