Bug 2221279

Summary: cups source rpm doesn't actually build lspp support
Product: Red Hat Enterprise Linux 9 Reporter: Carlos Santos <casantos>
Component: cupsAssignee: Zdenek Dohnal <zdohnal>
Status: NEW --- QA Contact: Petr Dancak <pdancak>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.2Keywords: Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Carlos Santos 2023-07-07 18:09:32 UTC
Description of problem:

Building cups from the source RPM does not build the lspp support

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

RHEL 9.2
cups-2.3.3op2-16.el9.src.rpm

How reproducible:

Always

Steps to Reproduce:

$ sudo yum install yum-utils rpmdevtools gcc gcc-c++ make automake autoconf rpm-build
$ sudo yumdownloader --downloaddir /tmp --source cups
$ rpmdev-setuptree
$ mkdir cups-2.3.3op2
$ cd ~/rpmbuild/SOURCES/
$ rpm2cpio /tmp/cups-2.3.3op2-16.el9.src.rpm | cpio -idm
$ sudo yum install $(sed -n -e 's/^BuildRequires://p' cups.spec)
$ rpmbuild -ba cups.spec
$ grep WITH_LSPP ../BUILD/cups-2.3.3op2/config.h

Actual results:

cups is notconfigured with lspp support and config.h contains

    /* #undef WITH_LSPP */

Expected results:

cups should be configured with lspp support and config.h should contain

    #define WITH_LSPP 1

Additional info:

The problem happens because cups-lspp.patch adds this to the configure script:

    if test x"$enable_lspp" != xno; then
        case "$uname" in
            Linux)

Since the "uname" environment variable is not set, the test always fails.

The problem can be circumvented by building with

    $ env uname=Linux rpmbuild -ba cups.spe

However, it seems like the provided cups-lspp.patch has not been updated to
the RHEL9 baseline. Errors include the following:

ipp.c:39:10: fatal error: selinux/flask.h: No such file or directory
   39 | #include <selinux/flask.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.