Blame SPECS/rh-mysql57.spec

3c6fd4
# Define SCL name
3c6fd4
%{!?scl_name_prefix: %global scl_name_prefix rh-}
3c6fd4
%{!?scl_name_base: %global scl_name_base mysql}
3c6fd4
%{!?version_major: %global version_major 5}
3c6fd4
%{!?version_minor: %global version_minor 7}
3c6fd4
%{!?scl_name_version: %global scl_name_version %{version_major}%{version_minor}}
3c6fd4
%{!?scl: %global scl %{scl_name_prefix}%{scl_name_base}%{scl_name_version}}
3c6fd4
3c6fd4
# Turn on new layout -- prefix for packages and location
3c6fd4
# for config and variable files
3c6fd4
# This must be before calling %%scl_package
3c6fd4
%{!?nfsmountable: %global nfsmountable 1}
3c6fd4
3c6fd4
# Define SCL macros
3c6fd4
%{?scl_package:%scl_package %scl}
3c6fd4
3c6fd4
# do not produce empty debuginfo package
3c6fd4
%global debug_package %{nil}
3c6fd4
3c6fd4
Summary: Package that installs %{scl}
3c6fd4
Name: %{scl}
3c6fd4
Version: 2.3
279dfb
Release: 4%{?dist}
3c6fd4
License: GPLv2+
3c6fd4
Group: Applications/File
3c6fd4
Source0: README
3c6fd4
Source1: LICENSE
3c6fd4
Requires: scl-utils
3c6fd4
Requires: %{?scl_prefix}mysql-server
3c6fd4
BuildRequires: scl-utils-build help2man
3c6fd4
3c6fd4
%description
3c6fd4
This is the main package for %{scl} Software Collection, which installs
3c6fd4
necessary packages to use MySQL %{version_major}.%{version_minor} server.
3c6fd4
Software Collections allow to install more versions of the same
3c6fd4
package by using alternative directory structure.
3c6fd4
Install this package if you want to use MySQL %{version_major}.%{version_minor}
3c6fd4
server on your system.
3c6fd4
3c6fd4
%package runtime
3c6fd4
Summary: Package that handles %{scl} Software Collection.
3c6fd4
Group: Applications/File
3c6fd4
Requires: scl-utils
3c6fd4
Requires(post): policycoreutils-python libselinux-utils
3c6fd4
3c6fd4
%description runtime
3c6fd4
Package shipping essential scripts to work with %{scl} Software Collection.
3c6fd4
3c6fd4
%package build
3c6fd4
Summary: Package shipping basic build configuration
3c6fd4
Group: Applications/File
3c6fd4
Requires: scl-utils-build
3c6fd4
3c6fd4
%description build
3c6fd4
Package shipping essential configuration macros to build %{scl} Software
3c6fd4
Collection or packages depending on %{scl} Software Collection.
3c6fd4
3c6fd4
%package scldevel
3c6fd4
Summary: Package shipping development files for %{scl}
3c6fd4
3c6fd4
%description scldevel
3c6fd4
Package shipping development files, especially usefull for development of
3c6fd4
packages depending on %{scl} Software Collection.
3c6fd4
3c6fd4
%prep
3c6fd4
%setup -c -T
3c6fd4
3c6fd4
# This section generates README file from a template and creates man page
3c6fd4
# from that file, expanding RPM macros in the template file.
3c6fd4
cat <<'EOF' | tee README
3c6fd4
%{expand:%(cat %{SOURCE0})}
3c6fd4
EOF
3c6fd4
3c6fd4
# copy the license file so %%files section sees it
3c6fd4
cp %{SOURCE1} .
3c6fd4
3c6fd4
%build
3c6fd4
# generate a helper script that will be used by help2man
3c6fd4
cat <<'EOF' | tee h2m_helper
3c6fd4
#!/bin/bash
3c6fd4
[ "$1" == "--version" ] && echo "%{?scl_name} %{version} Software Collection" || cat README
3c6fd4
EOF
3c6fd4
chmod a+x h2m_helper
3c6fd4
# generate the man page
3c6fd4
help2man -N --section 7 ./h2m_helper -o %{?scl_name}.7
3c6fd4
sed -i "s|'|\\\\N'39'|g" %{?scl_name}.7
3c6fd4
3c6fd4
%install
3c6fd4
%{?scl_install}
3c6fd4
3c6fd4
# create and own dirs not covered by %%scl_install and %%scl_files
3c6fd4
%if 0%{?rhel} >= 7 || 0%{?fedora} >= 15
3c6fd4
mkdir -p %{buildroot}%{_mandir}/man{1,7,8}
3c6fd4
%else
3c6fd4
mkdir -p %{buildroot}%{_datadir}/aclocal
3c6fd4
%endif
3c6fd4
3c6fd4
# create enable scriptlet that sets correct environment for collection
3c6fd4
cat << EOF | tee -a %{buildroot}%{?_scl_scripts}/enable
3c6fd4
# For binaries
3c6fd4
export PATH="%{_bindir}\${PATH:+:\${PATH}}"
3c6fd4
# For header files
3c6fd4
export CPATH="%{_includedir}\${CPATH:+:\${CPATH}}"
3c6fd4
# For libraries during build
3c6fd4
export LIBRARY_PATH="%{_libdir}\${LIBRARY_PATH:+:\${LIBRARY_PATH}}"
3c6fd4
# For libraries during linking
3c6fd4
export LD_LIBRARY_PATH="%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}"
3c6fd4
# For man pages; empty field makes man to consider also standard path
3c6fd4
export MANPATH="%{_mandir}:\${MANPATH}"
3c6fd4
# For Java Packages Tools to locate java.conf
3c6fd4
export JAVACONFDIRS="%{_sysconfdir}/java:\${JAVACONFDIRS:-/etc/java}"
3c6fd4
# For XMvn to locate its configuration file(s)
3c6fd4
export XDG_CONFIG_DIRS="%{_sysconfdir}/xdg:\${XDG_CONFIG_DIRS:-/etc/xdg}"
3c6fd4
# For systemtap
3c6fd4
export XDG_DATA_DIRS="%{_datadir}:\${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
3c6fd4
# For pkg-config
3c6fd4
export PKG_CONFIG_PATH="%{_libdir}/pkgconfig\${PKG_CONFIG_PATH:+:\${PKG_CONFIG_PATH}}"
3c6fd4
EOF
3c6fd4
3c6fd4
# generate rpm macros file for depended collections
3c6fd4
cat << EOF | tee -a %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
3c6fd4
%%scl_%{scl_name_base} %{scl}
3c6fd4
%%scl_prefix_%{scl_name_base} %{?scl_prefix}
3c6fd4
EOF
3c6fd4
3c6fd4
# install generated man page
3c6fd4
mkdir -p %{buildroot}%{_mandir}/man7/
3c6fd4
install -m 644 %{?scl_name}.7 %{buildroot}%{_mandir}/man7/%{?scl_name}.7
3c6fd4
3c6fd4
%post runtime
3c6fd4
# Simple copy of context from system root to SCL root.
3c6fd4
# In case new version needs some additional rules or context definition,
3c6fd4
# it needs to be solved in base system.
3c6fd4
# semanage does not have -e option in RHEL-5, so we would
3c6fd4
# have to have its own policy for collection.
3c6fd4
semanage fcontext -a -e / %{?_scl_root} >/dev/null 2>&1 || :
3c6fd4
semanage fcontext -a -e %{_root_sysconfdir} %{_sysconfdir} >/dev/null 2>&1 || :
3c6fd4
semanage fcontext -a -e %{_root_localstatedir} %{_localstatedir} >/dev/null 2>&1 || :
3c6fd4
selinuxenabled && load_policy || :
3c6fd4
restorecon -R %{?_scl_root} >/dev/null 2>&1 || :
3c6fd4
restorecon -R %{_sysconfdir} >/dev/null 2>&1 || :
3c6fd4
restorecon -R %{_localstatedir} >/dev/null 2>&1 || :
3c6fd4
3c6fd4
%files
3c6fd4
3c6fd4
%if 0%{?rhel} >= 7 || 0%{?fedora} >= 15
3c6fd4
%files runtime -f filesystem
3c6fd4
%else
3c6fd4
%files runtime
3c6fd4
%{_datadir}/aclocal
3c6fd4
%endif
3c6fd4
%doc README LICENSE
3c6fd4
%{?scl_files}
3c6fd4
%{_mandir}/man7/%{?scl_name}.*
3c6fd4
3c6fd4
%files build
3c6fd4
%doc LICENSE
3c6fd4
%{_root_sysconfdir}/rpm/macros.%{scl}-config
3c6fd4
3c6fd4
%files scldevel
3c6fd4
%doc LICENSE
3c6fd4
%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
3c6fd4
3c6fd4
%changelog
279dfb
* Wed Dec 13 2017 Honza Horak <hhorak@redhat.com> - 2.3-4
279dfb
- Release bump for rebuilding on new arches
279dfb
  Related: #1518842
279dfb
3c6fd4
* Tue Oct 25 2016 Jakub Dorňák <jdornak@redhat.com> - 2.3-3
3c6fd4
- Fixed default value of XDG_DATA_DIRS
3c6fd4
  Resolves: #1382689
3c6fd4
3c6fd4
* Wed Jul 20 2016 Honza Horak <hhorak@redhat.com> - 2.3-2
3c6fd4
- Rename the meta package spec file
3c6fd4
3c6fd4
* Fri Jul 15 2016 Honza Horak <hhorak@redhat.com> - 2.3-1
3c6fd4
- Initial creation of MySQL 5.7 meta package
3c6fd4
3c6fd4
* Tue Mar 17 2015 Honza Horak <hhorak@redhat.com> - 2.0-13
3c6fd4
- Add comment about running the test suite
3c6fd4
  Related: #1194759
3c6fd4
3c6fd4
* Mon Mar 09 2015 Honza Horak <hhorak@redhat.com> - 2.0-12
3c6fd4
- Rebuild due to 'scls' removal
3c6fd4
  Resolves: #1200052
3c6fd4
3c6fd4
* Wed Feb 18 2015 Honza Horak <hhorak@redhat.com> - 2.0-11
3c6fd4
- Remove NFS register feature for questionable usage for DBs
3c6fd4
3c6fd4
* Mon Jan 26 2015 Honza Horak <hhorak@redhat.com> - 2.0-10
3c6fd4
- Use cat for README expansion, rather than include macro
3c6fd4
3c6fd4
* Mon Jan 26 2015 Honza Horak <hhorak@redhat.com> - 2.0-9
3c6fd4
- Do not set selinux context  scl root during scl register
3c6fd4
3c6fd4
* Sat Jan 17 2015 Honza Horak <hhorak@redhat.com> - 2.0-8
3c6fd4
- Rework register implementation
3c6fd4
3c6fd4
* Fri Jan 16 2015 Honza Horak <hhorak@redhat.com> - 2.0-7
3c6fd4
- Move service-environment into mariadb package
3c6fd4
3c6fd4
* Tue Jan 13 2015 Honza Horak <hhorak@redhat.com> - 2.0-6
3c6fd4
- Re-work selinux rules setting and register layout
3c6fd4
3c6fd4
* Tue Jan 13 2015 Honza Horak <hhorak@redhat.com> - 2.0-5
3c6fd4
- Use prefix in service-environment variable
3c6fd4
3c6fd4
* Mon Jan 12 2015 Honza Horak <hhorak@redhat.com> - 2.0-4
3c6fd4
- Use scl macros more generally
3c6fd4
3c6fd4
* Fri Jan 09 2015 Honza Horak <hhorak@redhat.com> - 2.0-3
3c6fd4
- Change prefix handling
3c6fd4
3c6fd4
* Fri Dec 05 2014 Honza Horak <hhorak@redhat.com> - 2.0-2
3c6fd4
- Rework macros specification
3c6fd4
  Specify macros that can be used in other packages in the collection
3c6fd4
3c6fd4
* Fri Nov 28 2014 Honza Horak <hhorak@redhat.com> - 2.0-1
3c6fd4
- Adjust for MariaDB 10.0
3c6fd4
3c6fd4
* Tue Nov 25 2014 Honza Horak <hhorak@redhat.com> - 1.1-19
3c6fd4
- Remove unncessary comment and buildroot cleanup
3c6fd4
3c6fd4
* Wed Oct 01 2014 Honza Horak <hhorak@redhat.com> - 1.1-18
3c6fd4
- Make spec readable without scl-utils-build installed
3c6fd4
3c6fd4
* Fri Mar 28 2014 Honza Horak <hhorak@redhat.com> - 1.1-17
3c6fd4
- Include LICENSE also in -build package
3c6fd4
  Related: #1072482
3c6fd4
3c6fd4
* Thu Mar 27 2014 Honza Horak <hhorak@redhat.com> - 1.1-16
3c6fd4
- Own all dirs properly
3c6fd4
  Resolves: #1079913
3c6fd4
3c6fd4
* Wed Mar 26 2014 Jan Stanek <jstanek@redhat.com> - 1.1-15
3c6fd4
- Wrong macro in README
3c6fd4
  Related: #1072482
3c6fd4
3c6fd4
* Wed Mar 26 2014 Jan Stanek <jstanek@redhat.com> - 1.1-14
3c6fd4
- Fixed incorrect serveice name and unexpanded macro in README
3c6fd4
  Resolves: #1079973 #1072482
3c6fd4
3c6fd4
* Thu Feb 13 2014 Honza Horak <hhorak@redhat.com> - 1.1-13
3c6fd4
- Define context for RHEL-7 log file location
3c6fd4
  Related: #1007861
3c6fd4
3c6fd4
* Wed Feb 12 2014 Honza Horak <hhorak@redhat.com> - 1.1-12
3c6fd4
- Fix some grammar mistakes in README
3c6fd4
  Related: #1061444
3c6fd4
3c6fd4
* Tue Feb 11 2014 Honza Horak <hhorak@redhat.com> - 1.1-11
3c6fd4
- Add LICENSE, README and mariadb55.7 man page
3c6fd4
  Resolves: #1061444
3c6fd4
- Add -scldevel subpackage
3c6fd4
  Resolves: #1063352
3c6fd4
- Add scl-utils-build requirement to -build package
3c6fd4
  Resolves: #1058612
3c6fd4
3c6fd4
* Wed Jan 15 2014 Honza Horak <hhorak@redhat.com> - 1-11
3c6fd4
- Require policycoreutils-python for semanage
3c6fd4
  Resolves: #1053393
3c6fd4
3c6fd4
* Fri Nov 22 2013 Honza Horak <hhorak@redhat.com> 1-10
3c6fd4
- Reload SELinux policy after setting it
3c6fd4
3c6fd4
* Tue Oct 15 2013 Honza Horak <hhorak@redhat.com> 1-9
3c6fd4
- Simplify environment variable name for enabled collections
3c6fd4
3c6fd4
* Thu Oct 10 2013 Honza Horak <hhorak@redhat.com> 1-8
3c6fd4
- Release bump for RHSCL-1.1
3c6fd4
3c6fd4
* Mon Jun 10 2013 Honza Horak <hhorak@redhat.com> 1-7
3c6fd4
- Add CPATH variable to enable script
3c6fd4
  Resolves: #971808
3c6fd4
- Define and restore SELinux context of log file
3c6fd4
  Resolves: #971380
3c6fd4
3c6fd4
* Wed May 22 2013 Honza Horak <hhorak@redhat.com> 1-6
3c6fd4
- Run semanage on whole root, BZ#956981 is fixed now
3c6fd4
- Require semanage utility to be installed for -runtime package
3c6fd4
- Fix MANPATH definition, colon in the end is correct (it means default)
3c6fd4
  Resolves: BZ#966384
3c6fd4
3c6fd4
* Fri May  3 2013 Honza Horak <hhorak@redhat.com> 1-5
3c6fd4
- Run semanage for all directories separately, since it has
3c6fd4
  problems with definition for whole root
3c6fd4
3c6fd4
* Thu May  2 2013 Honza Horak <hhorak@redhat.com> 1-4
3c6fd4
- Handle context of the init script
3c6fd4
- Add better descriptions for packages
3c6fd4
3c6fd4
* Fri Apr 26 2013 Honza Horak <hhorak@redhat.com> 1-3
3c6fd4
- fix escaping in PATH variable definition
3c6fd4
3c6fd4
* Mon Apr  8 2013 Honza Horak <hhorak@redhat.com> 1-2
3c6fd4
- Don't require policycoreutils-python in RHEL-5 or older
3c6fd4
- Require mariadb-server from the collection as main package
3c6fd4
- Build separately on all arches
3c6fd4
- Fix Environment variables definition
3c6fd4
3c6fd4
* Thu Mar 21 2013 Honza Horak <hhorak@redhat.com> 1-1
3c6fd4
- initial packaging
3c6fd4