Blame SPECS/rh-mariadb101.spec

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