Name: percona-release Version: 1.0 Release: 27%{?dist} Summary: Package to install Percona GPG key and YUM repo License: GPL-3.0+ Group: System Environment/Base BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%{_arch} Requires: findutils curl grep Source0: PERCONA-PACKAGING-KEY Source1: percona-release.sh Source2: RPM-GPG-KEY-Percona %description %{name} package contains Percona GPG public keys and Percona repository configuration for YUM %clean %{__rm} -rf %{buildroot} %prep %build %{__cp} -f %{SOURCE0} %{_builddir} %{__cp} -f %{SOURCE1} %{_builddir} %{__cp} -f %{SOURCE2} %{_builddir} %install %{__rm} -rf %{buildroot} %{__install} -D -m 0644 %{SOURCE0} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/PERCONA-PACKAGING-KEY %{__install} -D -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/percona-release %{__install} -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-Percona %files %defattr(-, root, root, 0644) %{_sysconfdir}/pki/rpm-gpg/PERCONA-PACKAGING-KEY %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-Percona %attr(755, root, root) %{_bindir}/percona-release %doc PERCONA-PACKAGING-KEY %pubkey PERCONA-PACKAGING-KEY %post # OS=$(cat /etc/system-release | tr -dc '0-9.'|awk -F'.' {'print $1'}) if [ "x${OS}" != "x8" ]; then rpm --import %{_sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-Percona fi # %{_bindir}/percona-release enable original release %{_bindir}/percona-release enable prel release # cat << EOF The percona-release package now contains a percona-release script that can enable additional repositories for our newer products. For example, to enable the Percona Server 8.0 repository use: percona-release setup ps80 Note: To avoid conflicts with older product versions, the percona-release setup command may disable our original repository for some products. For more information, please visit: https://www.percona.com/doc/percona-repo-config/percona-release.html EOF %preun # if [ $1 -eq 0 ]; then %{_bindir}/percona-release disable all mv /etc/yum.repos.d/percona-prel-release.repo /etc/yum.repos.d/percona-prel-release.repo.bak fi # %changelog * Wed Oct 24 2018 Alexey Bychko - 0.1-8 - Changed rpm keys, added new paths for repositories - Added percona-release shell utility * Wed Sep 06 2017 Alexey Bychko - 0.1-5 - Changed description and email for keys, rpm refreshed * Thu Jun 30 2016 Alexey Bychko - 0.1-4 - Added new gpg key (SHA512) * Tue Sep 23 2014 Alexey Bychko - 0.1-3 - Disabled source repo by default * Thu Sep 18 2014 Alexey Bychko - 0.1-2 - Fixed bug #1371003 (removed /usr/bin/gpg dependency) * Thu Sep 04 2014 Alexey Bychko - 0.1-1 - Reworked old rpm from Alexander Kuzminsky