Skip to content

Commit

Permalink
feat: seperate mock configs
Browse files Browse the repository at this point in the history
  • Loading branch information
lleyton committed Jul 23, 2024
1 parent c092c78 commit 96d3915
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 281 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,13 @@ jobs:
- name: Set up git repository
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Include custom build template instead of package default
run: |
cp -v anda/terra/mock-configs/terra.tpl /etc/mock/templates/terra.tpl
- name: Build with Andaman
run: anda build ${{ matrix.pkg.pkg }} --package rpm -c anda/terra/mock-configs/terra-${{ matrix.version }}-${{ matrix.pkg.arch }}.cfg
run: anda build ${{ matrix.pkg.pkg }} --package rpm -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }}

- name: Build with Andaman (alternate arch)
if: |
matrix.pkg.arch == 'x86_64' && matrix.pkg.labels['multilib']
run: anda build ${{ matrix.pkg.pkg }} --package rpm -c anda/terra/mock-configs/terra-${{ matrix.version }}-i386.cfg
run: anda build ${{ matrix.pkg.pkg }} --package rpm -c terra-${{ matrix.version }}-i386

- name: Generating artifact name
id: art
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
key: ${{ runner.os }}-br-${{ matrix.version }}-${{ matrix.arch }}-${{ matrix.pkg }}

- name: Build with Andaman
run: anda build anda/${{ matrix.pkg }}pkg --package rpm -c anda/terra/mock-configs/terra-${{ matrix.version }}-${{ matrix.arch }}.cfg
run: anda build anda/${{ matrix.pkg }}pkg --package rpm -c terra-${{ matrix.version }}-${{ matrix.arch }}

- name: Generating artifact name
id: art
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/json-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
key: ${{ runner.os }}-br-${{ matrix.version }}-${{ matrix.pkg.arch }}-${{ matrix.pkg.pkg }}

- name: Build with Andaman
run: anda build ${{ matrix.pkg.pkg }} --package rpm -c anda/terra/mock-configs/terra-${{ matrix.version }}-${{ matrix.pkg.arch }}.cfg
run: anda build ${{ matrix.pkg.pkg }} --package rpm -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }}

- name: Generating artifact name
id: art
Expand Down
5 changes: 0 additions & 5 deletions anda/terra/mock-configs/terra-39-aarch64.cfg

This file was deleted.

5 changes: 0 additions & 5 deletions anda/terra/mock-configs/terra-39-i386.cfg

This file was deleted.

5 changes: 0 additions & 5 deletions anda/terra/mock-configs/terra-39-x86_64.cfg

This file was deleted.

5 changes: 0 additions & 5 deletions anda/terra/mock-configs/terra-40-aarch64.cfg

This file was deleted.

5 changes: 0 additions & 5 deletions anda/terra/mock-configs/terra-40-i386.cfg

This file was deleted.

5 changes: 0 additions & 5 deletions anda/terra/mock-configs/terra-40-x86_64.cfg

This file was deleted.

37 changes: 11 additions & 26 deletions anda/terra/mock-configs/terra-mock-configs.spec
Original file line number Diff line number Diff line change
@@ -1,60 +1,45 @@
Name: terra-mock-configs
Version: 11
Version: 1.0.0
Release: 1%{?dist}
Epoch: 1
Summary: Mock configs for Terra repos

License: MIT
URL: https://terra.fyralabs.com
Source0: terra.tpl
Source3: terra-39-x86_64.cfg
Source4: terra-39-aarch64.cfg
Source5: terra-40-x86_64.cfg
Source6: terra-40-aarch64.cfg
Source7: terra-40-i386.cfg
Source8: terra-39-i386.cfg
Source9: terra-rawhide-x86_64.cfg
Source10: terra-rawhide-aarch64.cfg
Source11: terra-rawhide-i386.cfg
URL: https://github.com/terrapkg/mock-configs
Source0: %url/archive/refs/tags/v%version.tar.gz

BuildRequires: mock-core-configs
Requires: mock-core-configs
BuildArch: noarch

Provides: anda-mock-configs = %{version}-%{release}
Provides: anda-mock-configs = %{epoch}:%{version}-%{release}
Obsoletes: anda-mock-configs < 3-2%{?dist}

%description
%{summary}

%prep
%autosetup -n mock-configs-%version

%build


%install
mkdir -p %{buildroot}%{_sysusersdir}
mkdir -p %{buildroot}%{_sysconfdir}/mock/templates

cp -v %{SOURCE0} %{buildroot}%{_sysconfdir}/mock/templates/
cp -v %{SOURCE3} %{buildroot}%{_sysconfdir}/mock/
cp -v %{SOURCE4} %{buildroot}%{_sysconfdir}/mock/
cp -v %{SOURCE5} %{buildroot}%{_sysconfdir}/mock/
cp -v %{SOURCE6} %{buildroot}%{_sysconfdir}/mock/
cp -v %{SOURCE7} %{buildroot}%{_sysconfdir}/mock/
cp -v %{SOURCE8} %{buildroot}%{_sysconfdir}/mock/
cp -v %{SOURCE9} %{buildroot}%{_sysconfdir}/mock/
cp -v %{SOURCE10} %{buildroot}%{_sysconfdir}/mock/
cp -v %{SOURCE11} %{buildroot}%{_sysconfdir}/mock/

cp -v terra.tpl %{buildroot}%{_sysconfdir}/mock/templates/
cp -v *.cfg %{buildroot}%{_sysconfdir}/mock/

%files
%config %{_sysconfdir}/mock/templates/terra.tpl
%config %{_sysconfdir}/mock/terra-*-x86_64.cfg
%config %{_sysconfdir}/mock/terra-*-aarch64.cfg
%config %{_sysconfdir}/mock/terra-*-i386.cfg


%changelog
* Mon Jul 22 2024 Cappy Ishihara <[email protected]> - 1:1.0.0-1
- Migrate to pulling configs from an external repository

* Thu Jul 18 2024 Cappy Ishihara <[email protected]> - 11-1
- Include multilib mock files for x86-based systems (backwards compatibility)

Expand Down
5 changes: 0 additions & 5 deletions anda/terra/mock-configs/terra-rawhide-aarch64.cfg

This file was deleted.

5 changes: 0 additions & 5 deletions anda/terra/mock-configs/terra-rawhide-i386.cfg

This file was deleted.

5 changes: 0 additions & 5 deletions anda/terra/mock-configs/terra-rawhide-x86_64.cfg

This file was deleted.

202 changes: 0 additions & 202 deletions anda/terra/mock-configs/terra.tpl

This file was deleted.

1 change: 1 addition & 0 deletions anda/terra/mock-configs/update.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rpm.version(gh("terrapkg/mock-configs"));

0 comments on commit 96d3915

Please sign in to comment.