Bug 431415 - pam build fails when no audit or selinux available
pam build fails when no audit or selinux available
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: pam (Show other bugs)
8
All Linux
low Severity medium
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-04 06:19 EST by JW
Modified: 2008-05-21 03:53 EDT (History)
0 users

See Also:
Fixed In Version: Fediora 9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-21 03:53:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description JW 2008-02-04 06:19:08 EST
Description of problem:
pam cannot be build if configured for no audit or no selinux

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

How reproducible:
Always

Steps to Reproduce:
1. Add %WITH_SELINUX 0 (and/or %WITH_AUDIT 0) to /etc/rpm/macros
2. rpm -v -ba pam.spec
3.
  
Actual results:
Still contains selinux module, and still wants to link with libaudit

Expected results:
Should be configurable as required - without selinux and/or without audit

Additional info:
It is so simple to do it right!

Start with:
  %if %{?WITH_SELINUX:0}%{!?WITH_SELINUX:1}
  %define WITH_SELINUX 1
  %endif
  %if %{?WITH_AUDIT:0}%{!?WITH_AUDIT:1}
  %define WITH_AUDIT 1
 %endif

Make sure there is:
  %if %{WITH_SELINUX}
  BuildRequires: libselinux-devel >= 1.33.2
  Requires: libselinux >= 1.33.2
  %endif

Make sure second config has:
  %if ! %{WITH_SELINUX}
        --disable-selinux \
  %endif
  %if ! %{WITH_AUDIT}
        --disable-audit \
  %endif
And modify the kludge:
  for dir in modules/pam_* ; do
  %if ! %{WITH_SELINUX}
      [ ${dir} = "modules/pam_selinux" ] && continue
  %endif
  ...
Comment 1 Tomas Mraz 2008-05-21 03:53:29 EDT
Fixed in Fedora 9 pam package.

Note You need to log in before you can comment on or make changes to this bug.