>From 7a055699869d503f26517483c6e20456cadacade Mon Sep 17 00:00:00 2001 From: Shawn Wells Date: Tue, 5 Feb 2013 13:03:31 -0500 Subject: [PATCH] [bugfix] Updated .spec to reflect $RPM_BUILD_ROOT for chcon'ing manpage $ make all ... + mkdir -p /var/www/html/scap-security-guide/rpmbuild/rpm-buildroot/usr/share/xml/scap/ssg/ + mkdir -p /var/www/html/scap-security-guide/rpmbuild/rpm-buildroot/usr/share/man/en/man8/ + cp -r RHEL6/dist/content RHEL6/dist/guide RHEL6/dist/policytables /var/www/html/scap-security-guide/rpmbuild/rpm-buildroot/usr/share/xml/scap/ssg/ + gzip -c RHEL6/input/auxiliary/ssg.8 + makewhatis cp: cannot create regular file `/var/cache/man/whatis': Permission denied /usr/sbin/makewhatis: line 446: /var/cache/man/whatis: Permission denied tr: write error: Broken pipe tr: write error chmod: changing permissions of `/var/cache/man/whatis': Operation not permitted + chcon -u system_u /var/www/html/scap-security-guide/rpmbuild/rpm-buildroot/usr/share/man/en/man8/ssg.8.gz .... Preparing... ########################################### [100%] 1:scap-security-guide ########################################### [100%] (works) Unless someone has other ideas, the "whatis: permission denied" errors can be ignored. makewhatis needs to be ran to install the man pages, however you must be root to do it. It'll fail during RPM build (ran as nonpriv user) and succeed during real installation (e.g. rpm -ivh as root) --- scap-security-guide.spec | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scap-security-guide.spec b/scap-security-guide.spec index d55d898..f23d392 100644 --- a/scap-security-guide.spec +++ b/scap-security-guide.spec @@ -41,7 +41,7 @@ cp -r RHEL6/dist/* $RPM_BUILD_ROOT/usr/share/xml/scap/ssg/ # Add in manpage gzip -c RHEL6/input/auxiliary/ssg.8 > $RPM_BUILD_ROOT/usr/share/man/en/man8/ssg.8.gz makewhatis -chcon -u system_u /usr/share/man/en/man8/ssg.8.gz +chcon -u system_u $RPM_BUILD_ROOT/usr/share/man/en/man8/ssg.8.gz %clean rm -rf $RPM_BUILD_ROOT -- 1.7.1