Bug 1224770

Summary: a2ps completely b0rken due to a2ps-lpr-wrapper requiring a file name
Product: [openSUSE] openSUSE Tumbleweed Reporter: Bodo Eggert <7eggert>
Component: OtherAssignee: Dr. Werner Fink <werner>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: junguo.wang
Version: Current   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: Community User Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Bodo Eggert 2024-05-20 19:37:43 UTC
a2ps depends on `lpr -P foo` to print from stdin when no file name is given.
The wrapper prevents this from happening, it requires a file name. It cannot work.

$ rpm -q a2ps
a2ps-4.15.5-2.2.x86_64

$ strace -feexecve  a2ps -P test /dev/null
execve("/usr/bin/a2ps", ["a2ps", "-P", "test", "/dev/null"], 0x7ffdc7a2adc0 /* 108 vars */) = 0
strace: Process 8185 attached
[pid  8185] execve("/bin/sh", ["sh", "-c", "--", "/usr/bin/file -L '/dev/null'"], 0x7ffd14eca980 /* 108 vars */) = 0
[pid  8185] execve("/usr/bin/file", ["/usr/bin/file", "-L", "/dev/null"], 0x558f5f7cb300 /* 107 vars */) = 0
[pid  8185] +++ exited with 0 +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8185, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
[/dev/null (plain): 0 pages on 0 sheets]
strace: Process 8186 attached
[pid  8186] execve("/bin/sh", ["sh", "-c", "--", "a2ps-lpr-wrapper  -d test"], 0x7ffd14eca980 /* 108 vars */) = 0
[pid  8186] execve("/usr/bin/a2ps-lpr-wrapper", ["a2ps-lpr-wrapper", "-d", "test"], 0x5602eecde300 /* 107 vars */) = 0
strace: Process 8187 attached
[pid  8187] execve("/usr/bin/basename", ["basename", "/usr/bin/a2ps-lpr-wrapper"], 0x55eb9db21600 /* 107 vars */) = 0
[pid  8187] +++ exited with 0 +++
[pid  8186] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8187, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
Usage: a2ps-lpr-wrapper [-d printer] FILE...
[pid  8186] +++ exited with 1 +++
--- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=8184, si_uid=1000} ---
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8186, si_uid=1000, si_status=1, si_utime=0, si_stime=0} ---
a2ps: received SIGPIPE
+++ exited with 1 +++
Comment 1 Johannes Meixner 2024-05-21 06:55:40 UTC
Because
https://build.opensuse.org/projects/openSUSE:Factory/packages/a2ps/files/a2ps.spec?expand=1
shows
------------------------------------------------------------
%files
...
%{_bindir}/a2ps-lpr-wrapper
------------------------------------------------------------
also a2ps-lpr-wrapper belongs to the package 'a2ps'
so I re-assing this issue to the 'a2ps' maintainer, see
https://build.opensuse.org/package/users/Publishing/a2ps

'a2ps' belongs to the openSUSE Build Service development
project "Publishing", see "Developed at Publishing" in
https://build.opensuse.org/package/show/openSUSE:Factory/a2ps
so I also change the Bugzilla component
from "Printing" to "Other".
Comment 2 Dr. Werner Fink 2024-05-21 07:54:48 UTC
Ah .. yep update without testing functionality

Mon Sep 18 03:41:10 UTC 2023 - jun wang <junguo.wang@suse.com>
- Updated to 4.15.5
 * Noteworthy changes in release 4.15.5 (2023-06-22) [stable]
 * Bug fixes:
   - Fix psnup delegation. It was incorrectly changed in 4.14.90.
   - Fix to read configured paper size correctly with libpaper 1.x.
   - Fix fixps to use GhostScript’s ps2write device instead of defunct
     pswrite.
   - Fix old crash when using --stdin="".
   - Use “grep -F” rather than obsolete fgrep.
   - Fix broken a2ps-lpr-wrapper script, and translate to sh for
     portability.
 * Build:
   - Fix a problem building PDF version of manual.
   - Make configure stop if libpaper is not found.
   - Enable building the manual for gnu.org.
 * Build system:
   - Fix tests when building with libpaper 1.x.
   - Require gperf for bootstrapping, and use it correctly in build system.
   - Require a new-enough version of texinfo.
 * Documentation:
   - Various minor documentation improvements.
   - Minor tweaks.
Comment 3 Dr. Werner Fink 2024-05-21 07:55:56 UTC
I'll try 4.15.6 and if this is also not working then this takes a while
Comment 4 Dr. Werner Fink 2024-05-21 08:06:11 UTC
a2ps-4.15.6 works

 > a2ps -P FC_1 /etc/hosts
 [/etc/hosts (plain): 1 page on 1 sheet]
 request id is FC_1-1 (0 file(s))
 [Total: 1 page on 1 sheet] sent to the printer `FC_1'
Comment 5 Dr. Werner Fink 2024-05-21 08:09:09 UTC
SR#1175467
Comment 6 OBSbugzilla Bot 2024-05-21 08:45:03 UTC
This is an autogenerated message for OBS integration:
This bug (1224770) was mentioned in
https://build.opensuse.org/request/show/1175467 Factory / a2ps
Comment 7 Bodo Eggert 2024-05-21 15:12:22 UTC
You should have a page where I can paste the package name and get the component.

Thanks for the effort and the quick fix.
Comment 8 Dr. Werner Fink 2024-05-22 06:15:09 UTC
(In reply to Bodo Eggert from comment #7)
> You should have a page where I can paste the package name and get the
> component.
> 
> Thanks for the effort and the quick fix.

https://download.opensuse.org/repositories/Publishing/openSUSE_Tumbleweed/