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 ...
Fixed in Fedora 9 pam package.