|
|
d87135 |
%{!?scl_name_base: %global scl_name_base mysql}
|
|
|
d87135 |
%{!?scl_name_version: %global scl_name_version 55}
|
|
|
d87135 |
%{!?scl:%global scl %{scl_name_base}%{scl_name_version}}
|
|
|
d87135 |
%scl_package %scl
|
|
|
d87135 |
|
|
|
d87135 |
# do not produce empty debuginfo package
|
|
|
d87135 |
%global debug_package %{nil}
|
|
|
d87135 |
|
|
|
d87135 |
Summary: Package that installs %scl
|
|
|
d87135 |
Name: %scl_name
|
|
|
d87135 |
Version: 1.1
|
|
|
d87135 |
Release: 23%{?dist}
|
|
|
d87135 |
License: GPLv2+
|
|
|
d87135 |
Group: Applications/File
|
|
|
d87135 |
Source0: README
|
|
|
d87135 |
Source1: LICENSE
|
|
|
d87135 |
Requires: scl-utils
|
|
|
d87135 |
Requires: %{scl_prefix}mysql-server
|
|
|
d87135 |
BuildRequires: scl-utils-build help2man
|
|
|
d87135 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
d87135 |
|
|
|
d87135 |
%description
|
|
|
d87135 |
This is the main package for %scl Software Collection, which installs
|
|
|
d87135 |
necessary packages to use MySQL 5.5 server. Software Collections allow
|
|
|
d87135 |
to install more versions of the same package by using alternative
|
|
|
d87135 |
directory structure.
|
|
|
d87135 |
Install this package if you want to use MySQL 5.5 server on your system.
|
|
|
d87135 |
|
|
|
d87135 |
%package runtime
|
|
|
d87135 |
Summary: Package that handles %scl Software Collection.
|
|
|
d87135 |
Group: Applications/File
|
|
|
d87135 |
Requires: scl-utils
|
|
|
d87135 |
Requires(post): policycoreutils-python libselinux-utils
|
|
|
d87135 |
|
|
|
d87135 |
%description runtime
|
|
|
d87135 |
Package shipping essential scripts to work with %scl Software Collection.
|
|
|
d87135 |
|
|
|
d87135 |
%package build
|
|
|
d87135 |
Summary: Package shipping basic build configuration
|
|
|
d87135 |
Group: Applications/File
|
|
|
d87135 |
Requires: scl-utils-build
|
|
|
d87135 |
|
|
|
d87135 |
%description build
|
|
|
d87135 |
Package shipping essential configuration macros to build %scl Software
|
|
|
d87135 |
Collection or packages depending on %scl Software Collection.
|
|
|
d87135 |
|
|
|
d87135 |
%package scldevel
|
|
|
d87135 |
Summary: Package shipping development files for %scl
|
|
|
d87135 |
|
|
|
d87135 |
%description scldevel
|
|
|
d87135 |
Package shipping development files, especially usefull for development of
|
|
|
d87135 |
packages depending on %scl Software Collection.
|
|
|
d87135 |
|
|
|
d87135 |
%prep
|
|
|
d87135 |
%setup -c -T
|
|
|
d87135 |
|
|
|
d87135 |
# This section generates README file from a template and creates man page
|
|
|
d87135 |
# from that file, expanding RPM macros in the template file.
|
|
|
d87135 |
cat >README <<'EOF'
|
|
|
d87135 |
%{expand:%(cat %{SOURCE0})}
|
|
|
d87135 |
EOF
|
|
|
d87135 |
|
|
|
d87135 |
# copy the license file so %%files section sees it
|
|
|
d87135 |
cp %{SOURCE1} .
|
|
|
d87135 |
|
|
|
d87135 |
%build
|
|
|
d87135 |
# generate a helper script that will be used by help2man
|
|
|
d87135 |
cat >h2m_helper <<'EOF'
|
|
|
d87135 |
#!/bin/bash
|
|
|
d87135 |
[ "$1" == "--version" ] && echo "%{scl_name} %{version} Software Collection" || cat README
|
|
|
d87135 |
EOF
|
|
|
d87135 |
chmod a+x h2m_helper
|
|
|
d87135 |
|
|
|
d87135 |
# generate the man page
|
|
|
d87135 |
help2man -N --section 7 ./h2m_helper -o %{scl_name}.7
|
|
|
d87135 |
|
|
|
d87135 |
%install
|
|
|
d87135 |
rm -rf %{buildroot}
|
|
|
d87135 |
|
|
|
d87135 |
%scl_install
|
|
|
d87135 |
|
|
|
d87135 |
# create and own dirs not covered by %%scl_install and %%scl_files
|
|
|
d87135 |
%if 0%{?rhel} <= 6
|
|
|
d87135 |
mkdir -p %{buildroot}%{_datadir}/aclocal
|
|
|
d87135 |
%else
|
|
|
d87135 |
mkdir -p %{buildroot}%{_mandir}/man{1,7,8}
|
|
|
d87135 |
%endif
|
|
|
d87135 |
|
|
|
d87135 |
# During the build of this package, we don't know which architecture it is
|
|
|
d87135 |
# going to be used on, so if we build on 64-bit system and use it on 32-bit,
|
|
|
d87135 |
# the %{_libdir} would stay expanded to '.../lib64'. This way we determine
|
|
|
d87135 |
# architecture everytime the 'scl enable ...' is run and set the
|
|
|
d87135 |
# LD_LIBRARY_PATH accordingly
|
|
|
d87135 |
cat >> %{buildroot}%{_scl_scripts}/enable << EOF
|
|
|
d87135 |
export PATH=%{_bindir}\${PATH:+:\${PATH}}
|
|
|
d87135 |
export LIBRARY_PATH=%{_libdir}\${LIBRARY_PATH:+:\${LIBRARY_PATH}}
|
|
|
d87135 |
export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}
|
|
|
d87135 |
export MANPATH=%{_mandir}:\${MANPATH}
|
|
|
d87135 |
export CPATH=%{_includedir}\${CPATH:+:\${CPATH}}
|
|
|
d87135 |
EOF
|
|
|
d87135 |
|
|
|
d87135 |
# generate rpm macros file for depended collections
|
|
|
d87135 |
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel << EOF
|
|
|
d87135 |
%%scl_%{scl_name_base} %{scl}
|
|
|
d87135 |
%%scl_prefix_%{scl_name_base} %{scl_prefix}
|
|
|
d87135 |
EOF
|
|
|
d87135 |
|
|
|
d87135 |
# generate a configuration file for daemon
|
|
|
d87135 |
cat >> %{buildroot}%{_scl_scripts}/service-environment << EOF
|
|
|
d87135 |
# Services are started in a fresh environment without any influence of user's
|
|
|
d87135 |
# environment (like environment variable values). As a consequence,
|
|
|
d87135 |
# information of all enabled collections will be lost during service start up.
|
|
|
d87135 |
# If user needs to run a service under any software collection enabled, this
|
|
|
d87135 |
# collection has to be written into MYSQL55_SCLS_ENABLED variable in
|
|
|
d87135 |
# /opt/rh/sclname/service-environment.
|
|
|
d87135 |
MYSQL55_SCLS_ENABLED="%{scl}"
|
|
|
d87135 |
EOF
|
|
|
d87135 |
|
|
|
d87135 |
# install generated man page
|
|
|
d87135 |
mkdir -p %{buildroot}%{_mandir}/man7/
|
|
|
d87135 |
install -m 644 %{scl_name}.7 %{buildroot}%{_mandir}/man7/%{scl_name}.7
|
|
|
d87135 |
|
|
|
d87135 |
%post runtime
|
|
|
d87135 |
# Simple copy of context from system root to DSC root.
|
|
|
d87135 |
# In case new version needs some additional rules or context definition,
|
|
|
d87135 |
# it needs to be solved.
|
|
|
d87135 |
semanage fcontext -a -e / %{_scl_root} >/dev/null 2>&1 || :
|
|
|
d87135 |
semanage fcontext -a -e /etc/rc.d/init.d/mysqld /etc/rc.d/init.d/%{scl_prefix}mysqld >/dev/null 2>&1 || :
|
|
|
d87135 |
restorecon -R %{_scl_root} >/dev/null 2>&1 || :
|
|
|
d87135 |
restorecon /etc/rc.d/init.d/%{scl_prefix}mysqld >/dev/null 2>&1 || :
|
|
|
d87135 |
selinuxenabled && load_policy || :
|
|
|
d87135 |
|
|
|
d87135 |
%files
|
|
|
d87135 |
|
|
|
d87135 |
%files runtime
|
|
|
d87135 |
%doc README LICENSE
|
|
|
d87135 |
%scl_files
|
|
|
d87135 |
%if 0%{?rhel} <= 6
|
|
|
d87135 |
%{_datadir}/aclocal
|
|
|
d87135 |
%else
|
|
|
d87135 |
%{_mandir}/man*
|
|
|
d87135 |
%endif
|
|
|
d87135 |
%config(noreplace) %{_scl_scripts}/service-environment
|
|
|
d87135 |
%{_mandir}/man7/%{scl_name}.*
|
|
|
d87135 |
|
|
|
d87135 |
%files build
|
|
|
d87135 |
%doc LICENSE
|
|
|
d87135 |
%{_root_sysconfdir}/rpm/macros.%{scl}-config
|
|
|
d87135 |
|
|
|
d87135 |
%files scldevel
|
|
|
d87135 |
%{_root_sysconfdir}/rpm/macros.%{scl_name_base}-scldevel
|
|
|
d87135 |
|
|
|
d87135 |
%changelog
|
|
|
d87135 |
* Fri Mar 28 2014 Honza Horak <hhorak@redhat.com> - 1.1-23
|
|
|
d87135 |
- Include LICENSE also in -build package
|
|
|
d87135 |
Related: #1072480
|
|
|
d87135 |
|
|
|
d87135 |
* Thu Mar 27 2014 Honza Horak <hhorak@redhat.com> - 1.1-22
|
|
|
d87135 |
- Own all dirs properly
|
|
|
d87135 |
Resolves: #1079919
|
|
|
d87135 |
|
|
|
d87135 |
* Wed Mar 26 2014 Jan Stanek <jstanek@redhat.com> - 1.1-20
|
|
|
d87135 |
- Fix wrong macros in README
|
|
|
d87135 |
Resolves: #1072480
|
|
|
d87135 |
|
|
|
d87135 |
* Wed Feb 12 2014 Honza Horak <hhorak@redhat.com> - 1.1-19
|
|
|
d87135 |
- Fix some grammar mistakes in README
|
|
|
d87135 |
Related: #1061450
|
|
|
d87135 |
|
|
|
d87135 |
* Tue Feb 11 2014 Honza Horak <hhorak@redhat.com> - 1.1-18
|
|
|
d87135 |
- Add LICENSE, README and mysql55.7 man page
|
|
|
d87135 |
Resolves: #1061450
|
|
|
d87135 |
- Add -scldevel subpackage
|
|
|
d87135 |
Resolves: #1063355
|
|
|
d87135 |
- Add scl-utils-build requirement to -build package
|
|
|
d87135 |
Resolves: #1058610
|
|
|
d87135 |
- Use policycoreutils-python in meta package
|
|
|
d87135 |
Resolves: #1053457
|
|
|
d87135 |
|
|
|
d87135 |
* Fri Nov 22 2013 Honza Horak <hhorak@redhat.com> 1-18
|
|
|
d87135 |
- Remove unnecessary init.d SELinux definition
|
|
|
d87135 |
- Rename environment variable
|
|
|
d87135 |
|
|
|
d87135 |
* Fri Nov 22 2013 Honza Horak <hhorak@redhat.com> 1-16
|
|
|
d87135 |
- Reload SELinux policy after setting it
|
|
|
d87135 |
|
|
|
d87135 |
* Thu Oct 10 2013 Honza Horak <hhorak@redhat.com> 1-15
|
|
|
d87135 |
- Release bump for RHSCL-1.1
|
|
|
d87135 |
|
|
|
d87135 |
* Mon Jun 17 2013 Honza Horak <hhorak@redhat.com> 1-14
|
|
|
d87135 |
- Add CPATH definition into enable script
|
|
|
d87135 |
Resolves: #967951
|
|
|
d87135 |
|
|
|
d87135 |
* Wed May 22 2013 Honza Horak <hhorak@redhat.com> 1-13
|
|
|
d87135 |
- Run semanage on whole root, BZ#956981 is fixed now
|
|
|
d87135 |
- Require semanage utility to be installed for -runtime package
|
|
|
d87135 |
- Fix MANPATH definition, colon in the end is correct (it means default)
|
|
|
d87135 |
Resolves: BZ#966383
|
|
|
d87135 |
|
|
|
d87135 |
* Fri May 3 2013 Honza Horak <hhorak@redhat.com> 1-11
|
|
|
d87135 |
- Remove RHEL-5 stuff
|
|
|
d87135 |
- Run semanage for all directories separately, since it has
|
|
|
d87135 |
problems with definition for whole root
|
|
|
d87135 |
|
|
|
d87135 |
* Thu May 2 2013 Honza Horak <hhorak@redhat.com> 1-9
|
|
|
d87135 |
- Handle context of the init script
|
|
|
d87135 |
- Change context on whole root directory (libselinux is fixed now #953947)
|
|
|
d87135 |
- Add better descriptions for packages
|
|
|
d87135 |
- Create SELinux context rules also for RHEL-5
|
|
|
d87135 |
|
|
|
d87135 |
* Fri Apr 26 2013 Honza Horak <hhorak@redhat.com> 1-8
|
|
|
d87135 |
- fix escaping in PATH variable definition
|
|
|
d87135 |
- change context on all directories separately
|
|
|
d87135 |
|
|
|
d87135 |
* Mon Apr 8 2013 Honza Horak <hhorak@redhat.com> 1-7
|
|
|
d87135 |
- Don't require policycoreutils-python in RHEL-5 or older
|
|
|
d87135 |
- Require mysql-server from the collection as main package
|
|
|
d87135 |
- Build separately on all arches
|
|
|
d87135 |
- Fix Environment variables definition
|
|
|
d87135 |
|
|
|
d87135 |
* Wed Feb 20 2013 Honza Horak <hhorak@redhat.com> 1-6
|
|
|
d87135 |
- Use %%setup macro to create safer build environment
|
|
|
d87135 |
|
|
|
d87135 |
* Thu Nov 08 2012 Honza Horak <hhorak@redhat.com> 1-5
|
|
|
d87135 |
- Mark service-environment as a config file
|
|
|
d87135 |
|
|
|
d87135 |
* Thu Oct 25 2012 Honza Horak <hhorak@redhat.com> 1-4
|
|
|
d87135 |
- create service-environment file to hold information about all collections,
|
|
|
d87135 |
that should be enabled when service is starting
|
|
|
d87135 |
- fixed environment variable name
|
|
|
d87135 |
- rename spec file-name to correspond with package name
|
|
|
d87135 |
|
|
|
d87135 |
* Wed Oct 17 2012 Honza Horak <hhorak@redhat.com> 1-3
|
|
|
d87135 |
- copy SELinux context from core mysql files
|
|
|
d87135 |
|
|
|
d87135 |
* Thu Oct 04 2012 Honza Horak <hhorak@redhat.com> 1-2
|
|
|
d87135 |
- rename collection to mysql55
|
|
|
d87135 |
|
|
|
d87135 |
* Tue Mar 20 2012 Honza Horak <hhorak@redhat.com> 1-1
|
|
|
d87135 |
- initial packaging
|
|
|
d87135 |
|