Mageia Bugzilla – Attachment 14342 Details for
Bug 32620
mock can't work to build rpms for arm arches (armv7hl or aarch64)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
spec file for an update correcting this bug for Mageia9
mock-core-configs.spec (text/plain), 3.91 KB, created by
Philippe Didier
on 2024-02-07 13:00:02 CET
(
hide
)
Description:
spec file for an update correcting this bug for Mageia9
Filename:
MIME Type:
Creator:
Philippe Didier
Created:
2024-02-07 13:00:02 CET
Size:
3.91 KB
patch
obsolete
># mock group id allocate for Fedora >%global mockgid 135 > >Name: mock-core-configs >Version: 39.1 >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 >Patch0: 0001-configs-Build-Mageia-bootstrap-chroots-with-target-a.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
# mock group id allocate for Fedora %global mockgid 135 Name: mock-core-configs Version: 39.1 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 Patch0: 0001-configs-Build-Mageia-bootstrap-chroots-with-target-a.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
View Attachment As Raw
Actions:
View
Attachments on
bug 32620
:
14210
|
14211
|
14212
|
14317
| 14342 |
14343