diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 75098fb844..ffcb38fea4 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -51,20 +51,27 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + + - name: Checkout latest Mock configs + uses: actions/checkout@v4 + with: + repository: terrapkg/mock-configs + path: mock-configs + - 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 + cp -v 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 mock-configs/terra-${{ matrix.version }}-${{ matrix.pkg.arch }}.cfg + - 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 + matrix.pkg.arch == 'x86_64' && matrix.pkg.labels['multilib'] + run: anda build ${{ matrix.pkg.pkg }} --package rpm -c mock-configs/terra-${{ matrix.version }}-i386.cfg - name: Generating artifact name id: art diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba1951f984..dae34b5390 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,18 +56,22 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + + - name: Checkout latest Mock configs + uses: actions/checkout@v4 + with: + repository: terrapkg/mock-configs + path: mock-configs + - name: Set up git repository run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - name: Cache buildroot - id: br-cache - uses: actions/cache@v4 - with: - path: /var/cache - key: ${{ runner.os }}-br-${{ matrix.version }}-${{ matrix.arch }}-${{ matrix.pkg }} + - name: Include custom build template instead of package default + run: | + cp -v mock-configs/terra.tpl /etc/mock/templates/terra.tpl - 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 mock-configs/terra-${{ matrix.version }}-${{ matrix.arch }}.pkg - name: Generating artifact name id: art diff --git a/.github/workflows/json-build.yml b/.github/workflows/json-build.yml index 1eb08fd47c..e3d54695ca 100644 --- a/.github/workflows/json-build.yml +++ b/.github/workflows/json-build.yml @@ -22,18 +22,22 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + + - name: Checkout latest Mock configs + uses: actions/checkout@v4 + with: + repository: terrapkg/mock-configs + path: mock-configs + - name: Set up git repository run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - name: Cache buildroot - id: br-cache - uses: actions/cache@v4 - with: - path: /var/cache - key: ${{ runner.os }}-br-${{ matrix.version }}-${{ matrix.pkg.arch }}-${{ matrix.pkg.pkg }} + - name: Include custom build template instead of package default + run: | + cp -v 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 mock-configs/terra-${{ matrix.version }}-${{ matrix.pkg.arch }}.pkg - name: Generating artifact name id: art diff --git a/anda/terra/mock-configs/terra-39-aarch64.cfg b/anda/terra/mock-configs/terra-39-aarch64.cfg deleted file mode 100644 index 4136783d27..0000000000 --- a/anda/terra/mock-configs/terra-39-aarch64.cfg +++ /dev/null @@ -1,5 +0,0 @@ -config_opts['releasever'] = '39' -config_opts['target_arch'] = 'aarch64' -config_opts['legal_host_arches'] = ('aarch64',) - -include('templates/terra.tpl') diff --git a/anda/terra/mock-configs/terra-39-i386.cfg b/anda/terra/mock-configs/terra-39-i386.cfg deleted file mode 100644 index 7b57433f26..0000000000 --- a/anda/terra/mock-configs/terra-39-i386.cfg +++ /dev/null @@ -1,5 +0,0 @@ -config_opts['releasever'] = '39' -config_opts['target_arch'] = 'i686' -config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64') - -include('templates/terra.tpl') diff --git a/anda/terra/mock-configs/terra-39-x86_64.cfg b/anda/terra/mock-configs/terra-39-x86_64.cfg deleted file mode 100644 index c4cff70d68..0000000000 --- a/anda/terra/mock-configs/terra-39-x86_64.cfg +++ /dev/null @@ -1,5 +0,0 @@ -config_opts['releasever'] = '39' -config_opts['target_arch'] = 'x86_64' -config_opts['legal_host_arches'] = ('x86_64',) - -include('templates/terra.tpl') diff --git a/anda/terra/mock-configs/terra-40-aarch64.cfg b/anda/terra/mock-configs/terra-40-aarch64.cfg deleted file mode 100644 index b5e1e14f5f..0000000000 --- a/anda/terra/mock-configs/terra-40-aarch64.cfg +++ /dev/null @@ -1,5 +0,0 @@ -config_opts['releasever'] = '40' -config_opts['target_arch'] = 'aarch64' -config_opts['legal_host_arches'] = ('aarch64',) - -include('templates/terra.tpl') diff --git a/anda/terra/mock-configs/terra-40-i386.cfg b/anda/terra/mock-configs/terra-40-i386.cfg deleted file mode 100644 index 6e2647df9a..0000000000 --- a/anda/terra/mock-configs/terra-40-i386.cfg +++ /dev/null @@ -1,5 +0,0 @@ -config_opts['releasever'] = '40' -config_opts['target_arch'] = 'i686' -config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64') - -include('templates/terra.tpl') diff --git a/anda/terra/mock-configs/terra-40-x86_64.cfg b/anda/terra/mock-configs/terra-40-x86_64.cfg deleted file mode 100644 index b3cc8cafc4..0000000000 --- a/anda/terra/mock-configs/terra-40-x86_64.cfg +++ /dev/null @@ -1,5 +0,0 @@ -config_opts['releasever'] = '40' -config_opts['target_arch'] = 'x86_64' -config_opts['legal_host_arches'] = ('x86_64',) - -include('templates/terra.tpl') diff --git a/anda/terra/mock-configs/terra-mock-configs.spec b/anda/terra/mock-configs/terra-mock-configs.spec index 55fa7c75e1..8e311b7eb3 100644 --- a/anda/terra/mock-configs/terra-mock-configs.spec +++ b/anda/terra/mock-configs/terra-mock-configs.spec @@ -1,51 +1,34 @@ Name: terra-mock-configs -Version: 11 -Release: 2%{?dist} +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 @@ -53,8 +36,10 @@ cp -v %{SOURCE11} %{buildroot}%{_sysconfdir}/mock/ %config %{_sysconfdir}/mock/terra-*-aarch64.cfg %config %{_sysconfdir}/mock/terra-*-i386.cfg - %changelog +* Mon Jul 22 2024 Lleyton Gray - 1:1.0.0-1 +- Migrate to pulling configs from an external repository + * Thu Jul 18 2024 Cappy Ishihara - 11-1 - Include multilib mock files for x86-based systems (backwards compatibility) diff --git a/anda/terra/mock-configs/terra-rawhide-aarch64.cfg b/anda/terra/mock-configs/terra-rawhide-aarch64.cfg deleted file mode 100644 index 659d4c4c38..0000000000 --- a/anda/terra/mock-configs/terra-rawhide-aarch64.cfg +++ /dev/null @@ -1,5 +0,0 @@ -config_opts['releasever'] = 'rawhide' -config_opts['target_arch'] = 'aarch64' -config_opts['legal_host_arches'] = ('aarch64',) - -include('templates/terra.tpl') diff --git a/anda/terra/mock-configs/terra-rawhide-i386.cfg b/anda/terra/mock-configs/terra-rawhide-i386.cfg deleted file mode 100644 index 518184ea6d..0000000000 --- a/anda/terra/mock-configs/terra-rawhide-i386.cfg +++ /dev/null @@ -1,5 +0,0 @@ -config_opts['releasever'] = 'rawhide' -config_opts['target_arch'] = 'i686' -config_opts['legal_host_arches'] = ('i386', 'i586', 'i686', 'x86_64') - -include('templates/terra.tpl') diff --git a/anda/terra/mock-configs/terra-rawhide-x86_64.cfg b/anda/terra/mock-configs/terra-rawhide-x86_64.cfg deleted file mode 100644 index 3402689dac..0000000000 --- a/anda/terra/mock-configs/terra-rawhide-x86_64.cfg +++ /dev/null @@ -1,5 +0,0 @@ -config_opts['releasever'] = 'rawhide' -config_opts['target_arch'] = 'x86_64' -config_opts['legal_host_arches'] = ('x86_64',) - -include('templates/terra.tpl') diff --git a/anda/terra/mock-configs/terra.tpl b/anda/terra/mock-configs/terra.tpl deleted file mode 100644 index f459f3df1f..0000000000 --- a/anda/terra/mock-configs/terra.tpl +++ /dev/null @@ -1,202 +0,0 @@ -config_opts['root'] = 'terra-{{ releasever }}-{{ target_arch }}' -config_opts['dist'] = 'fc{{ releasever }}' # only useful for --resultdir variable subst -config_opts['macros']['%dist'] = '.fc{{ releasever }}' -config_opts['package_manager'] = 'dnf5' -config_opts['extra_chroot_dirs'] = [ '/run/lock', ] -config_opts['bootstrap_image'] = 'registry.fedoraproject.org/fedora:{{ releasever }}' -config_opts['mirrored'] = config_opts['target_arch'] != 'i686' -config_opts['chroot_setup_cmd'] = 'install @{% if mirrored %}buildsys-{% endif %}build' -config_opts['plugin_conf']['root_cache_enable'] = True -config_opts['plugin_conf']['yum_cache_enable'] = True -config_opts['plugin_conf']['ccache_enable'] = True -config_opts['plugin_conf']['ccache_opts']['compress'] = 'on' -config_opts['plugin_conf']['ccache_opts']['max_cache_size'] = '10G' -# repos -dnf_conf = """ - -[main] -keepcache=1 -debuglevel=2a -reposdir=/dev/null -logfile=/var/log/yum.log -retries=20 -obsoletes=1 -gpgcheck=0 -assumeyes=1 -syslog_ident=mock -syslog_device= -install_weak_deps=0 -metadata_expire=0 -best=1 -module_platform_id=platform:fc{{ releasever }} -protected_packages= - -[terra] -name=Terra $releasever -baseurl=https://repos.fyralabs.com/terra$releasever -type=rpm -skip_if_unavailable=True -gpgcheck=1 -repo_gpgcheck=1 -gpgkey=https://repos.fyralabs.com/terra$releasever/key.asc -enabled=1 -enabled_metadata=1 -metadata_expire=4h - -# Only used for multilib builds, pulls straight from fedora koji -# Use /rawhide/latest instead of /f{{ releasever }}-build/latest for rawhide -[local-f{{ releasever }}-build] -name=local -baseurl=https://kojipkgs.fedoraproject.org/repos/f{{ releasever }}-build/latest/$basearch/ -cost=2000 -# enabled only if not mirrored, and not rawhide -enabled={% if not mirrored and releasever != 'rawhide' %}1{% else %}0{% endif %} -skip_if_unavailable=False - -[local-rawhide-build] -name=local-rawhide -baseurl=https://kojipkgs.fedoraproject.org/repos/rawhide/latest/$basearch/ -cost=2000 -# enabled only if not mirrored, and rawhide -enabled={% if not mirrored and releasever == 'rawhide' %}1{% else %}0{% endif %} -skip_if_unavailable=False - - - - -{% if mirrored %} -[fedora] -name=fedora -metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch -gpgkey=file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-{{ releasever }}-primary -gpgcheck=1 -skip_if_unavailable=False -exclude=fedora-release* - -[updates] -name=updates -metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch -gpgkey=file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-{{ releasever }}-primary -gpgcheck=1 -skip_if_unavailable=False - -[updates-testing] -name=updates-testing -metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f$releasever&arch=$basearch -enabled=0 -gpgkey=file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-{{ releasever }}-primary -gpgcheck=1 -skip_if_unavailable=False - -[fedora-debuginfo] -name=fedora-debuginfo -metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch -enabled=0 -gpgkey=file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-{{ releasever }}-primary -gpgcheck=1 -skip_if_unavailable=False - -[updates-debuginfo] -name=updates-debuginfo -metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-debug-f$releasever&arch=$basearch -enabled=0 -gpgkey=file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-{{ releasever }}-primary -gpgcheck=1 -skip_if_unavailable=False - -[updates-testing-debuginfo] -name=updates-testing-debuginfo -metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-debug-f$releasever&arch=$basearch -enabled=0 -gpgkey=file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-{{ releasever }}-primary -gpgcheck=1 -skip_if_unavailable=False - -[fedora-source] -name=fedora-source -metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch -gpgkey=file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-{{ releasever }}-primary -gpgcheck=1 -enabled=0 -skip_if_unavailable=False - -[updates-source] -name=updates-source -metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f$releasever&arch=$basearch -gpgkey=file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-{{ releasever }}-primary -gpgcheck=1 -enabled=0 -skip_if_unavailable=False - -# modular - -[fedora-modular] -name=Fedora Modular $releasever - $basearch -metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-$releasever&arch=$basearch -# if you want to enable it, you should set best=0 -# see https://bugzilla.redhat.com/show_bug.cgi?id=1673851 -enabled=0 -repo_gpgcheck=0 -type=rpm -gpgcheck=1 -gpgkey=file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-$releasever-primary -skip_if_unavailable=False - -[fedora-modular-debuginfo] -name=Fedora Modular $releasever - $basearch - Debug -metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-debug-$releasever&arch=$basearch -enabled=0 -repo_gpgcheck=0 -type=rpm -gpgcheck=1 -gpgkey=file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-$releasever-primary -skip_if_unavailable=False - -[fedora-modular-source] -name=Fedora Modular $releasever - Source -metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-source-$releasever&arch=$basearch -enabled=0 -repo_gpgcheck=0 -type=rpm -gpgcheck=1 -gpgkey=file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-$releasever-primary -skip_if_unavailable=False - -[updates-modular] -name=Fedora Modular $releasever - $basearch - Updates -#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/Modular/$basearch/ -metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-modular-f$releasever&arch=$basearch -enabled=0 -repo_gpgcheck=0 -type=rpm -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch -skip_if_unavailable=False - -[updates-modular-debuginfo] -name=Fedora Modular $releasever - $basearch - Updates - Debug -#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/Modular/$basearch/debug/ -metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-modular-debug-f$releasever&arch=$basearch -enabled=0 -repo_gpgcheck=0 -type=rpm -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch -skip_if_unavailable=False - -[updates-modular-source] -name=Fedora Modular $releasever - Updates Source -#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/Modular/SRPMS/ -metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-modular-source-f$releasever&arch=$basearch -enabled=0 -repo_gpgcheck=0 -type=rpm -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch -skip_if_unavailable=False -{% endif %} -""" - - -config_opts['dnf.conf'] = dnf_conf -config_opts['dnf5.conf'] = dnf_conf diff --git a/anda/terra/mock-configs/update.rhai b/anda/terra/mock-configs/update.rhai new file mode 100644 index 0000000000..2bcb94eb78 --- /dev/null +++ b/anda/terra/mock-configs/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("terrapkg/mock-configs"));