Bug 12251 - [AnolisOS8] 软件包 cups-client 在AnolisOS8中的行为异常
Summary: [AnolisOS8] 软件包 cups-client 在AnolisOS8中的行为异常
Status: NEW
Alias: None
Product: Anolis OS 8
Classification: Anolis OS
Component: BaseOS Packages (show other bugs) BaseOS Packages
Version: ---
Hardware: x86_64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Jacob
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-05 23:47 UTC by young_estt
Modified: 2025-01-15 21:06 UTC (History)
1 user (show)

See Also:


Attachments
cups-client的指令lpstat -t的差异报告 (16.96 KB, application/pdf)
2024-12-05 23:47 UTC, young_estt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description young_estt 2024-12-05 23:47:18 UTC
Created attachment 1245 [details]
cups-client的指令lpstat -t的差异报告

Description of problem:
软件包 cups-client 在AnolisOS8和AnolisOS23中出现行为差异
指令:lpstat -t

Version-Release number of selected component (if applicable):


How reproducible:
进入AnolisOS8的docker容器执行以下指令

Steps to Reproduce:
1.yum install -y cups-client
2.lpstat -t
3.

Actual results:
returncode: 1
stdout: scheduler is not running
no system default destination

stderr: lpstat: Bad file descriptor
lpstat: Bad file descriptor
lpstat: Bad file descriptor
lpstat: Bad file descriptor
lpstat: Bad file descriptor

Expected results:
returncode: 0

Additional info:
在AnolisOS23中的returncode为0,无标准错误输出,标准输出scheduler is not running
Comment 1 wangzhe 2025-01-15 21:06:46 UTC
(In reply to young_estt from comment #0)
> Created attachment 1245 [details]
> cups-client的指令lpstat -t的差异报告
> 
> Description of problem:
> 软件包 cups-client 在AnolisOS8和AnolisOS23中出现行为差异
> 指令:lpstat -t
> 
> Version-Release number of selected component (if applicable):
> 
> 
> How reproducible:
> 进入AnolisOS8的docker容器执行以下指令
> 
> Steps to Reproduce:
> 1.yum install -y cups-client
> 2.lpstat -t
> 3.
> 
> Actual results:
> returncode: 1
> stdout: scheduler is not running
> no system default destination
> 
> stderr: lpstat: Bad file descriptor
> lpstat: Bad file descriptor
> lpstat: Bad file descriptor
> lpstat: Bad file descriptor
> lpstat: Bad file descriptor
> 
> Expected results:
> returncode: 0
> 
> Additional info:
> 在AnolisOS23中的returncode为0,无标准错误输出,标准输出scheduler is not running




[root@test ~]# systemctl start cups 
[root@test ~]# systemctl status cups
● cups.service - CUPS Scheduler
   Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2025-01-15 20:33:54 CST; 27s ago
     Docs: man:cupsd(8)
 Main PID: 66110 (cupsd)
   Status: "Scheduler is running..."
    Tasks: 1 (limit: 22575)
   Memory: 1.4M
   CGroup: /system.slice/cups.service
           └─66110 /usr/sbin/cupsd -l

Jan 15 20:33:54 test systemd[1]: cups.service: Succeeded.
Jan 15 20:33:54 test systemd[1]: Stopped CUPS Scheduler.
Jan 15 20:33:54 test systemd[1]: Starting CUPS Scheduler...
Jan 15 20:33:54 test systemd[1]: Started CUPS Scheduler.
[root@test ~]# 
[root@test ~]# lpstat -t
scheduler is running
no system default destination
lpstat: No destinations added.
lpstat: No destinations added.
lpstat: No destinations added.
lpstat: No destinations added.
[root@test ~]# echo $?
1
[root@test ~]#

在 anolis8 上,当前使用 2.2.6 版本的 cups 
使用 lpstat -t 显示打印系统的全面状态信息,结果如上:当系统中没有添加任何默认打印机时返回值非0,此行为上游 cups 2.2.6 版本默认行为。对比其他同样集成 2.2.6 版本 cups 的操作系统系统,行为一致,所以非 anolis8 缺陷,是上游默认设计。
在 anolis23 上,当前使用 2.4.10 版本的 cups,使用上游 2.4.10 版本源码编译测试后,返回值为0,此为上游默认设计。
[root@test cups-2.4.10]# /root/cups-2.4.10/systemv/lpstat -t
scheduler is not running
[root@test cups-2.4.10]# echo $?
0
[root@test cups-2.4.10]# 

所以anolis8和anolis23上此差异源于上游差异,
具体版本差异请参考上游变化
https://github.com/OpenPrinting/cups/compare/v2.2.6...v2.4.10