%global nfsmountable 1 %global _scl_prefix /opt/isc %global scl_name_prefix isc- %global scl_name_base bind %global scl %{scl_name_prefix}%{scl_name_base} %scl_package %scl Summary: Package that installs %scl Name: %scl_name Epoch: 1 Version: 2 Release: 2%{?dist} License: MPL 2.0 Requires: %{scl_prefix}bind Requires: %{scl_prefix}bind-utils %if 0%{?rhel} >= 8 Requires: policycoreutils-python-utils %else Requires: policycoreutils-python %endif BuildRequires: scl-utils-build %description This is the main package for %scl Software Collection. %package runtime Summary: Package that handles %scl Software Collection. Requires: scl-utils %description runtime Package shipping essential scripts to work with %scl Software Collection. %package build Summary: Package shipping basic build configuration Requires: scl-utils-build %description build Package shipping essential configuration macros to build %scl Software Collection. %prep %setup -c -T %install %scl_install cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config < %{buildroot}%{_scl_scripts}/enable < "${TEMPFILE}" <<-EOF This update of the BIND Software Collection changes the directory layout of the previously installed BIND packages so that it complies with the Filesystem Hierarchy Standard (FHS). The post-installation scriptlet for this update attempted to move the following directories: %{_scl_root}/etc -> %{_sysconfdir} %{_scl_root}/var -> %{_localstatedir} Your original named.conf file was modified to reflect the above change, with a backup of the original file saved as named.conf.rpmsave in the same directory. Please check whether the result of these automatic modifications matches your expectations by examining the contents of: %{_sysconfdir}/named.conf You might also need to manually update configuration files included by the above file (if any) as they are not updated automatically. Please note that since file paths changed, you might also need to update resources (scripts, automation recipes, etc.) external to BIND. This is a one-time event - there are no plans for similar changes to be required upon future updates to the BIND Software Collection. Any "No such file or directory" warnings logged by the package manager during this update are safe to ignore. EOF echo "warning: BIND directory layout changed; please read ${TEMPFILE} for more information" > /dev/stderr fi semanage fcontext -a -e / %{_scl_root} 2>/dev/null || : semanage fcontext -a -e /etc %{_sysconfdir} 2>/dev/null || : semanage fcontext -a -e /var %{_localstatedir} 2>/dev/null || : restorecon -R %{_scl_root} %{_sysconfdir} %{_localstatedir} || : selinuxenabled && load_policy || : %postun if [ "$1" -eq 0 ]; then # Package removal, not upgrade semanage fcontext -d -e / %{_scl_root} 2>/dev/null || : semanage fcontext -d -e /etc %{_sysconfdir} 2>/dev/null || : semanage fcontext -d -e /var %{_localstatedir} 2>/dev/null || : fi