• Bug#912993: Debian bug 912993

    From Farblos@21:1/5 to All on Wed Mar 12 22:10:01 2025
    Hi Martin-Éric,

    I've seen your decision about becoming a DM in the recent changelog
    update. Congratulations and thanks for taking over the responsibility!


    However, I'd like to challenge your decision of closing this bug:

    On 2025-03-11 19:28, Martin-Éric Racine wrote:

    Since this is merely a question of preferred behavior that can be
    easily configured by changing the value for TitlePref, I'm closing
    this bug.

    since I'm quite confident that there *is* a bug if one wants to use TitlePref=0. Which I happen to do.


    As I mentioned already in my update #40 [1] (with different email
    address back then), the following block from cups-pdf.c

    ------------------------------ snip ------------------------------
    if (sscanf(buffer, "%%%%Title: %"TBUFSIZE"c", title)==1) {
    log_event(CPDEBUG, "found title in ps code: %s", title);
    is_title=1;
    }
    ------------------------------ snip ------------------------------

    is buggy since sscanf does not zero-terminate the string.

    I can provide a patch for that if you see any chances to get this
    incorporated.

    Thanks again

    Jens

    [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=912993#40

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Martin=2D=C3=89ric_Racine@21:1/5 to All on Thu Mar 13 06:30:01 2025
    ke 12.3.2025 klo 22.52 Farblos (farblos@vodafonemail.de) kirjoitti:
    On 2025-03-11 19:28, Martin-Éric Racine wrote:

    Since this is merely a question of preferred behavior that can be
    easily configured by changing the value for TitlePref, I'm closing
    this bug.

    since I'm quite confident that there *is* a bug if one wants to use TitlePref=0. Which I happen to do.


    As I mentioned already in my update #40 [1] (with different email
    address back then), the following block from cups-pdf.c

    ------------------------------ snip ------------------------------
    if (sscanf(buffer, "%%%%Title: %"TBUFSIZE"c", title)==1) {
    log_event(CPDEBUG, "found title in ps code: %s", title);
    is_title=1;
    }
    ------------------------------ snip ------------------------------

    is buggy since sscanf does not zero-terminate the string.

    I can provide a patch for that if you see any chances to get this incorporated.

    Patches are always welcome.

    Martin-Éric

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Farblos@21:1/5 to All on Mon Mar 17 23:30:01 2025
    On 2025-03-13 06:20, Martin-Éric Racine wrote:

    Patches are always welcome.

    Martin-Éric

    Sounds good, thanks for the offer.

    Two follow-up questions:

    - The upstream of cups-pdf seems to be inactive for quite some
    time already, correct? So fixing this issue directly in
    Debian is the best we could hope for, correct?

    - I haven't yet provided patches to a Debian project. Would
    the description found, for example, here:

    https://raphaelhertzog.com/2011/07/04/how-to-prepare-patches-for-debian-packages/

    be OK for you and cups-pdf? If you have a more recent or
    more appropriate description, please let me know.

    Thanks

    Jens

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Martin=2D=C3=89ric_Racine@21:1/5 to All on Tue Mar 18 08:00:01 2025
    ti 18.3.2025 klo 0.24 Farblos (farblos@vodafonemail.de) kirjoitti:

    On 2025-03-13 06:20, Martin-Éric Racine wrote:

    Patches are always welcome.

    Sounds good, thanks for the offer.

    Two follow-up questions:

    - The upstream of cups-pdf seems to be inactive for quite some
    time already, correct? So fixing this issue directly in
    Debian is the best we could hope for, correct?

    Upstream became a father a couple of years ago, and he has a busy job
    in a medical research lab. His time outside of that has become
    extremely limited.

    - I haven't yet provided patches to a Debian project. Would
    the description found, for example, here:

    https://raphaelhertzog.com/2011/07/04/how-to-prepare-patches-for-debian-packages/

    be OK for you and cups-pdf? If you have a more recent or
    more appropriate description, please let me know.

    Yes or just follow what dpkg-source says when it notifies you that you
    have modified the source and generates the patch template for you.

    Martin-Éric

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Farblos@21:1/5 to All on Fri Mar 21 22:20:01 2025
    This is a multi-part message in MIME format.
    On 2025-03-18 07:50, Martin-Éric Racine wrote:

    Yes or just follow what dpkg-source says when it notifies you that you
    have modified the source and generates the patch template for you.

    Here is my patch, then. Plus a small postscript test document with
    an extra short title to demonstrate the difference in file name without
    my patch (generating job 29):

    [~]$ aptitude show printer-driver-cups-pdf
    Package: printer-driver-cups-pdf
    Version: 3.0.1-20
    State: installed
    Automatically installed: no
    Priority: optional
    Section: graphics
    Maintainer: Debian CUPS Maintainers <debian-printing@lists.debian.org>
    Architecture: amd64
    [...]


    [~]$ ls -al ~/tmp/transfer/print/
    total 8
    drwxr-xr-x 2 farblos farblos 4096 Mar 21 21:45 .
    drwxr-xr-x 5 farblos farblos 4096 Mar 19 17:56 ..

    [~]$ lpr -o Title=0 ~/tmp/test.ps

    [~]$ ls -al ~/tmp/transfer/print/
    total 12
    drwxr-xr-x 2 farblos farblos 4096 Mar 21 21:45 .
    drwxr-xr-x 5 farblos farblos 4096 Mar 19 17:56 ..
    -rw------- 1 farblos farblos 1608 Mar 21 21:45 Y_ome_farblos_tmp_transfer_print-job_29.pdf

    And with my patch (generating job 30):

    [~]$ aptitude show printer-driver-cups-pdf
    Package: printer-driver-cups-pdf
    Version: 3.0.1-20.1
    State: installed
    Automatically installed: no
    Priority: optional
    Section: graphics
    Maintainer: Debian CUPS Maintainers <debian-printing@lists.debian.org>
    Architecture: amd64
    [...]


    [~]$ ls -al ~/tmp/transfer/print/
    total 12
    drwxr-xr-x 2 farblos farblos 4096 Mar 21 21:45 .
    drwxr-xr-x 5 farblos farblos 4096 Mar 19 17:56 ..
    -rw------- 1 farblos farblos 1608 Mar 21 21:45 Y_ome_farblos_tmp_transfer_print-job_29.pdf

    [~]$ lpr -o Title=0 ~/tmp/test.ps

    [~]$ ls -al ~/tmp/transfer/print/
    total 16
    drwxr-xr-x 2 farblos farblos 4096 Mar 21 21:48 .
    drwxr-xr-x 5 farblos farblos 4096 Mar 19 17:56 ..
    -rw------- 1 farblos farblos 1608 Mar 21 21:48 Y-job_30.pdf
    -rw------- 1 farblos farblos 1608 Mar 21 21:45 Y_ome_farblos_tmp_transfer_print-job_29.pdf

    Please let me know if that is OK for you.

    Thanks

    Jens

    %!PS-Adobe-3.0
    %%Title: Y

    % See https://en.wikipedia.org/wiki/PostScript#%22Hello_world%22

    /Courier % name the desired font
    20 selectfont % choose the size in points and establish
    % the font as the current one
    72 500 moveto % position the current point at
    % coordinates 72, 500 (the origin is at the
    % lower-left corner of the page)
    (Hello world!) show % stroke the text in parentheses
    showpage % print all on the page ZGlmZiAtTnJ1IGN1cHMtcGRmLTMuMC4xL2RlYmlhbi9jaGFuZ2Vsb2cgY3Vwcy1wZGYtMy4w LjEvZGViaWFuL2NoYW5nZWxvZwotLS0gY3Vwcy1wZGYtMy4wLjEvZGViaWFuL2NoYW5nZWxv ZwkyMDI1LTAzLTA4IDE1OjI1OjA1LjAwMDAwMDAwMCArMDEwMAorKysgY3Vwcy1wZGYtMy4w LjEvZGViaWFuL2NoYW5nZWxvZwkyMDI1LTAzLTIxIDIxOjI4OjU0LjAwMDAwMDAwMCArMDEw MApAQCAtMSwzICsxLDExIEBACitjdXBzLXBkZiAoMy4wLjEtMjAuMSkgVU5SRUxFQVNFRDsg dXJnZW5jeT1tZWRpdW0KKworICAqIE5vbi1tYWludGFpbmVyIHVwbG9hZC4KKyAgKiBGaXhl ZCBmaWxlIG5hbWUgZGVyaXZlZCBmcm9tIGluLVBvc3RTY3JpcHQgdGl0bGUgYmVpbmcgZ2Fy YmxlZCBiZWNhdXNlIG9mCisgIHNzY2FuZiBub3QgYWRkaW5nIGEgbnVsbCBieXRlIGZvciB0 aGUgJWMgZm9ybWF0IHNwZWNpZmllciAoQ2xvc2VzOiAjOTEyOTMzKS4KKworIC0tIEZhcmJs b3MgPGZhcmJsb3NAdm9kYWZvbmVtYWlsLmRlPiAgRnJpLCAyMSBNYXIgMjAyNSAyMToyODo1 NCArMDEwMAorCiBjdXBzLXBkZiAoMy4wLjEtMjApIHVuc3RhYmxlOyB1cmdlbmN5PW1lZGl1 bQogCiAgICogW2J1Zy1wcmVzdWJqXQpkaWZmIC1OcnUgY3Vwcy1wZGYtMy4wLjEvZGViaWFu L3BhdGNoZXMvMDNfZml4ZWQtZmlsZS1uYW1lLWJlaW5nLWdhcmJsZWQucGF0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AwMDAgKzAxMDAKQEAgLTEsMiArMSwzIEBACiAwMV9kZWJpYW5fY2hhbmdlc190b19jdXBz LXBkZl9jb25mLnBhdGNoCiAwMl9yZW1vdmUtZGVwcmVjYXRlZC1naG9zdHNjcmlwdC1zZXRw ZGZ3cml0ZS1vcGVyYXRvci5wYXRjaAorMDNfZml4ZWQtZmlsZS1uYW1lLWJlaW5nLWdhcmJs ZWQucGF0Y2gK

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Farblos@21:1/5 to All on Sat May 17 17:10:02 2025
    On 2025-03-22 06:50, Martin-Éric Racine wrote:

    Please let me know if that is OK for you.

    Thanks. I'm curious to see what upstream thinks of this first. I just
    pinged him.

    Any reaction on that ping of yours? It has been a while now.
    But OTOH there has has been even an upstream release just after
    your last reply to this bug, so there might still be hope!

    Thanks

    Jens

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Farblos@21:1/5 to All on Sat May 17 17:40:01 2025
    On 2025-05-17 17:12, Martin-Éric Racine wrote:

    None, other than a short e-mail informing me of that small release incorporating only the Ghostscript patch and telling me that he might
    find the time to address other pending issues later this year.

    Thanks. Will wait patiently, then.

    Jens

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)