Sophie

Sophie

distrib > Mageia > 9 > x86_64 > by-pkgid > 06357213afb4231f399917411fc61fc0 > files > 4

mock-core-configs-39.1-2.2.mga9.src.rpm

# mock group id allocate for Fedora
%global mockgid 135

Name:		mock-core-configs
Version:	39.1
%define subrel  2
Release:	%mkrel 2
Summary:	Mock core config files basic chroots
Group:          System/Packaging
License:	GPL-2.0-or-later
URL:		https://github.com/rpm-software-management/mock/
# Source is created by
# git clone https://github.com/rpm-software-management/mock.git
# cd mock/mock-core-configs
# git reset --hard %%{name}-%%{version}
# tito build --tgz
Source:		https://github.com/rpm-software-management/mock/releases/download/%{name}-%{version}-1/%{name}-%{version}.tar.gz
# https://github.com/rpm-software-management/mock/pull/1317
Patch0:         0001-A-new-repo_arch-option.patch
#
Patch1:		0001-configs-Replace-Mageia-10-and-Cauldron-i586-configs-.patch
BuildArch:	noarch

# The mock.rpm requires this.  Other packages may provide this if they tend to
# replace the mock-core-configs.rpm functionality.
Provides:	mock-configs

# specify minimal compatible version of mock
Requires:	mock >= 2.5

# distribution-gpg-keys contains GPG keys used by mock configs
Requires:	distribution-gpg-keys >= 1.85

Requires(pre):	mock-filesystem
Requires(post): coreutils
# to detect correct default.cfg
Requires(post):	system-release
Requires(post):	sed

%description
Mock configuration files which allow you to create chroots for Alma Linux,
Amazon Linux, CentOS, CentOS Stream, EuroLinux, Fedora, Fedora EPEL, Mageia,
Navy Linux, OpenMandriva Lx, openSUSE, Oracle Linux, Red Hat Enterprise Linux,
Rocky Linux and various other specific or combined chroots.

%prep
%autosetup -p2


%build
# Nothing to do


%install
mkdir -p %{buildroot}%{_sysconfdir}/mock/eol/templates
mkdir -p %{buildroot}%{_sysconfdir}/mock/templates
cp -a etc/mock/*.cfg %{buildroot}%{_sysconfdir}/mock
cp -a etc/mock/templates/*.tpl %{buildroot}%{_sysconfdir}/mock/templates
cp -a etc/mock/eol/*cfg %{buildroot}%{_sysconfdir}/mock/eol
cp -a etc/mock/eol/templates/*.tpl %{buildroot}%{_sysconfdir}/mock/eol/templates

# generate files section with config - there is many of them
echo "%defattr(0644, root, mock)" > %{name}.cfgs
find %{buildroot}%{_sysconfdir}/mock -name "*.cfg" -o -name '*.tpl' \
    | grep -v chroot-aliases \
    | sed -e "s|^%{buildroot}|%%config(noreplace) |" >> %{name}.cfgs
echo "%%config %{_sysconfdir}/mock/chroot-aliases.cfg" >> %{name}.cfgs

# just for %%ghosting purposes
ln -s mageia-cauldron-x86_64.cfg %{buildroot}%{_sysconfdir}/mock/default.cfg
# bash-completion
if [ -d %{buildroot}%{_datadir}/bash-completion ]; then
    echo %{_datadir}/bash-completion/completions/mock >> %{name}.cfgs
    echo %{_datadir}/bash-completion/completions/mockchain >> %{name}.cfgs
elif [ -d %{buildroot}%{_sysconfdir}/bash_completion.d ]; then
    echo %{_sysconfdir}/bash_completion.d/mock >> %{name}.cfgs
fi

# reference valid mock.rpm's docdir with example site-defaults.cfg
mock_docs=%{_pkgdocdir}
mock_docs=${mock_docs//mock-core-configs/mock}
mock_docs=${mock_docs//-%{version}/-*}
sed -i "s~@MOCK_DOCS@~$mock_docs~" %{buildroot}%{_sysconfdir}/mock/site-defaults.cfg


%post
if [ -s /etc/os-release ]; then
    if [ -s /etc/mageia-release ]; then
        if grep -Fiq Cauldron /etc/mageia-release; then
           ver=cauldron
        else
           ver=$(source /etc/os-release && echo \\$VERSION_ID | cut -d. -f1 | grep -o '[0-9]\+')
        fi
    else
        ver=$(source /etc/os-release && echo \\$VERSION_ID | cut -d. -f1 | grep -o '[0-9]\+')
    fi
else
    # something obsure, use buildtime version
    ver=%{?mageia}
fi

mock_arch=$(sed -n '/^$/!{$ s/.* \(\w*\)$/\1/p}' /etc/mageia-release)

cfg=mageia-${ver}-${mock_arch}.cfg
if [ -e %{_sysconfdir}/mock/$cfg ]; then
    if [ "$(readlink %{_sysconfdir}/mock/default.cfg)" != "$cfg" ]; then
        ln -s $cfg %{_sysconfdir}/mock/default.cfg 2>/dev/null || ln -s -f $cfg %{_sysconfdir}/mock/default.cfg.rpmnew
    fi
else
    echo "Warning: file %{_sysconfdir}/mock/$cfg does not exist."
    echo "         unable to update %{_sysconfdir}/mock/default.cfg"
fi
:


%files -f %{name}.cfgs
%license COPYING
%ghost %config(noreplace,missingok) %{_sysconfdir}/mock/default.cfg


%changelog
* Sat May 04 2024 wally <wally> 39.1-2.2.mga9
+ Revision: 2062049
- add patch to support cauldron i686

* Fri Feb 09 2024 wally <wally> 39.1-2.1.mga9
+ Revision: 2040008
- add patch from upstream pull request to use new {{ repo_arch }} variable for Mageia templates to fix bootstrap build for cross-arch (mga#32620) (mga#32816)
- remove 'build Mageia bootstrap chroots with target arch' patch

* Thu Feb 08 2024 philippedidier <philippedidier> 39.1-2.mga9
+ Revision: 2039003
- patch added to allow build on arm arches bug 32620
+ daviddavid <daviddavid>
- new version: 39.1 (fixes mga#32230)

* Thu Apr 27 2023 luigiwalser <luigiwalser> 38.4-1.mga9
+ Revision: 1955146
- 38.4

* Tue Mar 28 2023 luigiwalser <luigiwalser> 38.3-1.mga9
+ Revision: 1950534
- 38.3

* Wed Feb 22 2023 luigiwalser <luigiwalser> 38.2-1.mga9
+ Revision: 1944742
- 38.2

* Fri Feb 03 2023 luigiwalser <luigiwalser> 38.1-1.mga9
+ Revision: 1937827
- 38.1

* Tue Jan 10 2023 luigiwalser <luigiwalser> 37.9-1.mga9
+ Revision: 1932114
- 37.9

* Sat Oct 01 2022 luigiwalser <luigiwalser> 37.8-1.mga9
+ Revision: 1893639
- 37.8

* Mon Aug 15 2022 luigiwalser <luigiwalser> 37.7-1.mga9
+ Revision: 1877661
- 37.7

* Wed Jul 27 2022 luigiwalser <luigiwalser> 37.5-1.mga9
+ Revision: 1872489
- 37.5

* Wed May 25 2022 luigiwalser <luigiwalser> 37.4-1.mga9
+ Revision: 1860120
- 37.4

* Fri Apr 15 2022 luigiwalser <luigiwalser> 37.3-1.mga9
+ Revision: 1850426
- 37.3
- update description (from fedora)

* Mon Mar 21 2022 umeabot <umeabot> 37.2-2.mga9
+ Revision: 1816562
- Mageia 9 Mass Rebuild

* Sat Mar 05 2022 luigiwalser <luigiwalser> 37.2-1.mga9
+ Revision: 1789125
- 37.2

* Sun Feb 13 2022 luigiwalser <luigiwalser> 37.1-1.mga9
+ Revision: 1774102
- 37.1

* Sun Feb 06 2022 wally <wally> 36.3-2.mga9
+ Revision: 1772352
- rebuild for python3.10

* Sat Oct 30 2021 luigiwalser <luigiwalser> 36.3-1.mga9
+ Revision: 1753367
- 36.3

* Sat Oct 09 2021 luigiwalser <luigiwalser> 36.1-1.mga9
+ Revision: 1750329
- 36.1

* Sun Sep 26 2021 luigiwalser <luigiwalser> 36-1.mga9
+ Revision: 1746473
- 36

* Tue Aug 17 2021 luigiwalser <luigiwalser> 35-1.mga9
+ Revision: 1741793
- 35

* Sun Aug 08 2021 luigiwalser <luigiwalser> 34.6-1.mga9
+ Revision: 1740732
- 34.6

* Sat Feb 13 2021 ngompa <ngompa> 34.1-1.mga8
+ Revision: 1675259
- Update to 34.1

* Tue Feb 02 2021 ngompa <ngompa> 33.6-1.mga8
+ Revision: 1674531
- Update to 33.6

* Sun Dec 06 2020 ngompa <ngompa> 33.3-1.mga8
+ Revision: 1653940
- Rebase to version 33.3

* Fri Jul 24 2020 wally <wally> 30.2-5.mga8
+ Revision: 1608712
- fix post scriptlet to detect distro version (mga#26997)

* Sat Feb 15 2020 umeabot <umeabot> 30.2-4.mga8
+ Revision: 1526257
- Mageia 8 Mass Rebuild

* Sun May 05 2019 ngompa <ngompa> 30.2-3.mga7
+ Revision: 1396370
- Add patch to allow AArch64 hosts to build 32-bit ARM packages natively

* Sun Apr 28 2019 ngompa <ngompa> 30.2-2.mga7
+ Revision: 1395818
- Backport fix for setting the openSUSE Tumbleweed DistTag definition
- Fix post scriptlet to correctly source from os-release(5)

* Mon Mar 04 2019 ngompa <ngompa> 30.2-1.mga7
+ Revision: 1371328
- Update to 30.2

* Thu Feb 21 2019 ngompa <ngompa> 30.1-1.mga7
+ Revision: 1369198
- Update to 30.1
- Add patches to add new Mageia and openSUSE configs

* Mon Jan 21 2019 ngompa <ngompa> 29.4-1.mga7
+ Revision: 1358702
- Rebase to v29.4

* Thu Sep 20 2018 umeabot <umeabot> 28.4-3.mga7
+ Revision: 1279943
- Mageia 7 Mass Rebuild

* Sat Jun 30 2018 ngompa <ngompa> 28.4-2.mga7
+ Revision: 1240955
- Backport patch to swap cauldron armv5tl for aarch64

* Sat Jun 30 2018 ngompa <ngompa> 28.4-1.mga7
+ Revision: 1240943
- Update to 28.4

* Mon Feb 26 2018 ngompa <ngompa> 28.2-1.mga7
+ Revision: 1205186
- Upgrade to v28.2

* Sun Dec 10 2017 ngompa <ngompa> 27.4-2.mga7
+ Revision: 1181883
- Adapt for Mageia
- imported package mock-core-configs


* Mon Oct 09 2017 Miroslav Suchý <msuchy@redhat.com> 27.4-1
- Fix mock & mock-core-config specs to support Mageia (ngompa13@gmail.com)
- Ensure mock-core-configs will select the right default on Mageia
  (ngompa13@gmail.com)

* Wed Sep 27 2017 Miroslav Suchý <msuchy@redhat.com> 27.3-1
- use primary key for F-27+ on s390x (dan@danny.cz)

* Tue Sep 12 2017 Miroslav Suchý <msuchy@redhat.com> 27.2-1
- add source url
- grammar fix

* Thu Sep 07 2017 Miroslav Suchý <msuchy@redhat.com> 27.1-1
- Split from Mock package.