From 7c3d0702d5f480da76f7f950fe565a4486e7c1fe Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Mon, 20 May 2013 15:44:22 -0500 Subject: bcfg2-selinux.spec: Fail silently when missing prerequisites Previously, we were failing hard if build dependencies were not met. /bin/sed: can't read /usr/share/selinux/devel/policyhelp: No such file or directory This commit allows rpmbuild to fall through so that we can see the real problem. error: Failed build dependencies: /usr/share/selinux/devel/policyhelp is needed by bcfg2-selinux-1.3.1-1.noarch Signed-off-by: Sol Jerome --- misc/bcfg2-selinux.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'misc') diff --git a/misc/bcfg2-selinux.spec b/misc/bcfg2-selinux.spec index 4c05f4959..9c5262dfd 100644 --- a/misc/bcfg2-selinux.spec +++ b/misc/bcfg2-selinux.spec @@ -3,7 +3,7 @@ %global pythonversion %{py_ver} %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?_initrddir: %global _initrddir %{_sysconfdir}/rc.d/init.d} -%global selinux_policyver %(%{__sed} -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp || echo 0.0.0) +%global selinux_policyver %(%{__sed} -e 's,.*selinux-policy-\\([^/]*\\)/.*,\\1,' /usr/share/selinux/devel/policyhelp 2>/dev/null || echo 0.0.0) %global selinux_types %(%{__awk} '/^#[[:space:]]*SELINUXTYPE=/,/^[^#]/ { if ($3 == "-") printf "%s ", $2 }' /etc/selinux/config 2>/dev/null) %global selinux_variants %([ -z "%{selinux_types}" ] && echo mls strict targeted || echo %{selinux_types}) -- cgit v1.2.3-1-g7c22