|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
%global mockgid 135
|
|
|
|
|
|
|
|
|
|
Name: mock-core-configs
|
|
|
|
|
Version: 31.1
|
|
|
|
|
Version: 31.2
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Summary: Mock core config files basic chroots
|
|
|
|
|
|
|
|
|
@ -20,9 +20,6 @@ BuildArch: noarch
|
|
|
|
|
Requires: distribution-gpg-keys >= 1.29
|
|
|
|
|
|
|
|
|
|
Requires(post): coreutils
|
|
|
|
|
%if 0%{?fedora} > 29 || 0%{?rhel} > 8
|
|
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
|
%endif
|
|
|
|
|
%if 0%{?fedora} || 0%{?mageia} || 0%{?rhel} > 7
|
|
|
|
|
# to detect correct default.cfg
|
|
|
|
|
Requires(post): python3-dnf
|
|
|
|
@ -31,8 +28,8 @@ Requires(post): system-release
|
|
|
|
|
Requires(post): python3
|
|
|
|
|
Requires(post): sed
|
|
|
|
|
%endif
|
|
|
|
|
%if 0%{?rhel} && 0%{?rhel} <= 7
|
|
|
|
|
Requires(pre): shadow-utils
|
|
|
|
|
%if 0%{?rhel} && 0%{?rhel} <= 7
|
|
|
|
|
# to detect correct default.cfg
|
|
|
|
|
Requires(post): python
|
|
|
|
|
Requires(post): yum
|
|
|
|
@ -57,17 +54,15 @@ Config files which allow you to create chroots for:
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{_sysusersdir}
|
|
|
|
|
%if 0%{?fedora} > 29 || 0%{?rhel} > 8
|
|
|
|
|
cp -a mock.conf %{buildroot}%{_sysusersdir}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/mock/eol
|
|
|
|
|
cp -a etc/mock/*.cfg %{buildroot}%{_sysconfdir}/mock
|
|
|
|
|
cp -a etc/mock/*.tpl %{buildroot}%{_sysconfdir}/mock
|
|
|
|
|
cp -a etc/mock/eol/*cfg %{buildroot}%{_sysconfdir}/mock/eol
|
|
|
|
|
|
|
|
|
|
# generate files section with config - there is many of them
|
|
|
|
|
echo "%defattr(0644, root, mock)" > %{name}.cfgs
|
|
|
|
|
find %{buildroot}%{_sysconfdir}/mock -name "*.cfg" \
|
|
|
|
|
find %{buildroot}%{_sysconfdir}/mock -name "*.cfg" -o -name '*.tpl' \
|
|
|
|
|
| sed -e "s|^%{buildroot}|%%config(noreplace) |" >> %{name}.cfgs
|
|
|
|
|
# just for %%ghosting purposes
|
|
|
|
|
ln -s fedora-rawhide-x86_64.cfg %{buildroot}%{_sysconfdir}/mock/default.cfg
|
|
|
|
@ -81,13 +76,9 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%pre
|
|
|
|
|
%if 0%{?fedora} > 29 || 0%{?rhel} > 8
|
|
|
|
|
%sysusers_create_package mock mock.conf
|
|
|
|
|
%else
|
|
|
|
|
# check for existence of mock group, create it if not found
|
|
|
|
|
getent group mock > /dev/null || groupadd -f -g %mockgid -r mock
|
|
|
|
|
exit 0
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
if [ -s /etc/os-release ]; then
|
|
|
|
@ -129,14 +120,16 @@ fi
|
|
|
|
|
|
|
|
|
|
%files -f %{name}.cfgs
|
|
|
|
|
%license COPYING
|
|
|
|
|
%if 0%{?fedora} > 29 || 0%{?rhel} > 8
|
|
|
|
|
%{_sysusersdir}/mock.conf
|
|
|
|
|
%endif
|
|
|
|
|
%dir %{_sysconfdir}/mock
|
|
|
|
|
%dir %{_sysconfdir}/mock/eol
|
|
|
|
|
%ghost %config(noreplace,missingok) %{_sysconfdir}/mock/default.cfg
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Aug 26 2019 Miroslav Suchý <msuchy@redhat.com> 31.2-1
|
|
|
|
|
- revert sysusers setting [RHBZ#1740545]
|
|
|
|
|
- add rhelepel-8 configs (praiskup@redhat.com)
|
|
|
|
|
- add RHEL 7/8 (praiskup@redhat.com)
|
|
|
|
|
|
|
|
|
|
* Mon Aug 19 2019 Miroslav Suchý <msuchy@redhat.com> 31.1-1
|
|
|
|
|
- add fedora 31 configs and rawhide is now 32
|
|
|
|
|
- Add local-source repo definition to Fedora Rawhide (miro@hroncok.cz)
|
|
|
|
|