645bb5b
Summary:        Fedora package repositories
645bb5b
Name:           fedora-repos
645bb5b
Version:        21
8224030
Release:        3
645bb5b
License:        MIT
645bb5b
Group:          System Environment/Base
645bb5b
URL:            https://git.fedorahosted.org/cgit/fedora-repos.git/
645bb5b
# tarball is created by running make archive in the git checkout
645bb5b
Source:         %{name}-%{version}.tar.bz2
645bb5b
Provides:       fedora-repos(%{version})
645bb5b
Requires:       system-release(%{version})
df9ed0a
Obsoletes:      fedora-repos-anaconda < 21-1
378245e
Obsoletes:      fedora-repos-rawhide < 21-0.4
378245e
Obsoletes:      fedora-release-rawhide <= 21-0.7
645bb5b
BuildArch:      noarch
645bb5b
645bb5b
%description
645bb5b
Fedora package repository files for yum and dnf along with gpg public keys
645bb5b
645bb5b
%package rawhide
645bb5b
Summary:        Rawhide repo definitions
645bb5b
Requires:       fedora-repos = %{version}-%{release}
645bb5b
Obsoletes:      fedora-release-rawhide <= 21-0.7
645bb5b
645bb5b
%description rawhide
645bb5b
This package provides the rawhide repo definitions.
645bb5b
645bb5b
%prep
645bb5b
%setup -q
645bb5b
645bb5b
%build
645bb5b
645bb5b
%install
645bb5b
# Install the keys
645bb5b
install -d -m 755 $RPM_BUILD_ROOT/etc/pki/rpm-gpg
645bb5b
install -m 644 RPM-GPG-KEY* $RPM_BUILD_ROOT/etc/pki/rpm-gpg/
645bb5b
645bb5b
# Link the primary/secondary keys to arch files, according to archmap.
645bb5b
# Ex: if there's a key named RPM-GPG-KEY-fedora-19-primary, and archmap
645bb5b
#     says "fedora-19-primary: i386 x86_64",
645bb5b
#     RPM-GPG-KEY-fedora-19-{i386,x86_64} will be symlinked to that key.
645bb5b
pushd $RPM_BUILD_ROOT/etc/pki/rpm-gpg/
645bb5b
for keyfile in RPM-GPG-KEY*; do
645bb5b
    key=${keyfile#RPM-GPG-KEY-} # e.g. 'fedora-20-primary'
645bb5b
    arches=$(sed -ne "s/^${key}://p" $RPM_BUILD_DIR/%{name}-%{version}/archmap) \
645bb5b
        || echo "WARNING: no archmap entry for $key"
645bb5b
    for arch in $arches; do
645bb5b
        # replace last part with $arch (fedora-20-primary -> fedora-20-$arch)
645bb5b
        ln -s $keyfile ${keyfile%%-*}-$arch # NOTE: RPM replaces %% with %
645bb5b
    done
645bb5b
done
645bb5b
# and add symlink for compat generic location
645bb5b
ln -s RPM-GPG-KEY-fedora-%{version}-primary RPM-GPG-KEY-%{version}-fedora
645bb5b
popd
645bb5b
645bb5b
install -d -m 755 $RPM_BUILD_ROOT/etc/yum.repos.d
645bb5b
for file in fedora*repo ; do
645bb5b
  install -m 644 $file $RPM_BUILD_ROOT/etc/yum.repos.d
645bb5b
done
645bb5b
645bb5b
645bb5b
%files
645bb5b
%defattr(-,root,root,-)
645bb5b
%dir /etc/yum.repos.d
645bb5b
%config(noreplace) /etc/yum.repos.d/fedora.repo
645bb5b
%config(noreplace) /etc/yum.repos.d/fedora-updates*.repo
645bb5b
%dir /etc/pki/rpm-gpg
645bb5b
/etc/pki/rpm-gpg/*
645bb5b
645bb5b
%files rawhide
645bb5b
%defattr(-,root,root,-)
645bb5b
%config(noreplace) /etc/yum.repos.d/fedora-rawhide.repo
645bb5b
645bb5b
%changelog
8224030
* Sat Sep 12 2015 Dennis Gilmore <dennis@ausil.us> 21-3
8224030
- update the archmap so the f23 key gets installed correctly
8224030
df9ed0a
* Sat Nov 22 2014 Dennis Gilmore <dennis@ausil.us> 21-2
df9ed0a
- Obsolete fedora-repos-anaconda < 21-1
df9ed0a
- due to initial confusion over it some people got it installed
df9ed0a
58afe40
* Tue Nov 18 2014 Dennis Gilmore <dennis@ausil.us> 21-1
58afe40
- drop no longer needed fedora-repos-anaconda sup-package
58afe40
- disable updates-testing
58afe40
- turn on 7 day metadata expire for the fedora repo
58afe40
d493c62
* Mon Sep 15 2014 Dennis Gilmore <dennis@ausil.us> 21-0.7
d493c62
- enable the product repos so anaconda will use them
d493c62
a6426b9
* Wed Sep 10 2014 Dennis Gilmore <dennis@ausil.us> 21-0.6
a6426b9
- add repo files for the products
a6426b9
378245e
* Tue Jul 08 2014 Dennis Gilmore <dennis@ausil.us> 21-0.5
378245e
- setup for f21 being branched
378245e
378245e
* Tue Jul 08 2014 Dennis Gilmore <dennis@ausil.us> 21-0.4
378245e
- Require fedora-repos-rawhide from main package
378245e
- have fedora-repos-rawhide obsolete fedora-release-rawhide
378245e
645bb5b
* Tue Jul 08 2014 Dennis Gilmore <dennis@ausil.us> 21-0.3
645bb5b
- remove %%clean and rm in %%install
645bb5b
- Provides:       fedora-repos(%%{version})
645bb5b
- Requires:       system-release(%%{version})
645bb5b
- change url to git repo
645bb5b
- add note on how to make a tarball
645bb5b
645bb5b
* Tue Jul 08 2014 Dennis Gilmore <dennis@ausil.us> 21-0.2
645bb5b
- use %%{version} not %%{dist_version} in symlink command
645bb5b
645bb5b
* Tue Jul 08 2014 Dennis Gilmore <dennis@ausil.us> 21-0.1
645bb5b
- Initial setup for fedora-repos