chore: sync with Terra 38 (#624)

* chore: sync with Terra 38

* chore(ci): improve autobuild

* fix ci?

Signed-off-by: madomado <wboy111@outlook.com>

* test ci

Signed-off-by: madomado <wboy111@outlook.com>

* Update autobuild.yml

* Update anda.tpl

Signed-off-by: madomado <wboy111@outlook.com>

* dnf moment mock configs

Signed-off-by: madomado <wboy111@outlook.com>

---------

Signed-off-by: madomado <wboy111@outlook.com>
This commit is contained in:
madomado
2023-07-02 18:41:56 +08:00
committed by GitHub
parent 3db9b3b298
commit d3a9865809
19 changed files with 165 additions and 99 deletions
+41 -47
View File
@@ -10,6 +10,9 @@ on:
pull_request:
branches:
- f37
merge_group:
branches:
- f37
workflow_dispatch:
workflow_call:
@@ -51,7 +54,17 @@ jobs:
- name: Set up git repository
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Build with Anda
- name: Cache buildroot
id: br-cache
uses: actions/cache@v3
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 anda/mock-configs/anda.tpl /etc/mock/templates/anda.tpl
- name: Build with Andaman
run: anda build ${{ matrix.pkg.pkg }} --package rpm -c anda-${{ matrix.version }}-${{ matrix.pkg.arch }}
- name: Generating artifact name
@@ -67,7 +80,7 @@ jobs:
path: anda-build/rpm/rpms/*
- name: Upload packages to subatomic
if: github.event_name != 'pull_request'
if: github.event_name == 'push'
run: |
subatomic-cli upload --prune \
--server https://subatomic.fyralabs.com \
@@ -75,34 +88,36 @@ jobs:
terra${{ matrix.version }} anda-build/rpm/rpms/*
- name: Notify Madoguchi (Success)
if: success() && github.event_name != 'pull_request'
if: success() && github.event_name == 'push'
run: ./.github/workflows/mg.sh true ${{matrix.pkg.pkg}} ${{matrix.version}} ${{matrix.pkg.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}}
- name: Notify Madoguchi (Failure)
if: ( cancelled() || failure() ) && github.event_name != 'pull_request'
if: ( cancelled() || failure() ) && github.event_name == 'push'
run: ./.github/workflows/mg.sh false ${{matrix.pkg.pkg}} ${{matrix.version}} ${{matrix.pkg.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}}
- name: Lint RPMs and SRPMs
id: lint
if: success()
run: |
echo 'err=false' >> $GITHUB_ENV
echo 'LINT_ERR=false' >> $GITHUB_ENV
rpmlint anda-build/ > rpmlint.txt || f=1
if [[ $f -eq 1 ]]; then
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "esc_lint_out<<$EOF" >> $GITHUB_ENV
cat rpmlint.txt | sed 's/`/\\`/g' >> $GITHUB_ENV
echo "ESC_LINT_OUT<<$EOF" >> $GITHUB_ENV
cat rpmlint.txt | sed 's/`/\\`/g' | sed 's/"/\"/g' >> $GITHUB_ENV
echo $EOF >> $GITHUB_ENV
echo "lint_out<<$EOF" >> $GITHUB_ENV
echo '```' >> $GITHUB_ENV
cat rpmlint.txt >> $GITHUB_ENV
echo '```' >> $GITHUB_ENV
echo $EOF >> $GITHUB_ENV
echo 'err=true' >> $GITHUB_ENV
echo 'LINT_ERR=true' >> $GITHUB_ENV
fi
- name: Try to install package
id: dnf
if: success()
run: |
echo 'INSTALL_ERR=false' >> $GITHUB_ENV
touch out
for f in anda-build/rpm/rpms/*.rpm; do
dnf in --downloadonly -y $f > $f.dnfout.txt 2>&1 || fail=1
@@ -112,50 +127,29 @@ jobs:
cat $f.dnfout.txt >> out
echo '```' >> out
echo >> out
echo 'err=true' >> $GITHUB_ENV
echo 'INSTALL_ERR=true' >> $GITHUB_ENV
fi
done
cat out
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "esc_dnf_out<<$EOF" >> $GITHUB_ENV
cat out | sed 's/`/\\`/g' >> $GITHUB_ENV
echo "ESC_DNF_OUT<<$EOF" >> $GITHUB_ENV
cat out | sed 's/`/\\`/g' | sed 's/"/\"/g' >> $GITHUB_ENV
echo $EOF >> $GITHUB_ENV
echo "dnf_out<<$EOF" >> $GITHUB_ENV
cat out >> $GITHUB_ENV
echo $EOF >> $GITHUB_ENV
- name: Comment RPMLint/DNF output (PR)
if: success() && github.event_name == 'pull_request'
uses: actions/github-script@v6
with:
script: |
let out = "";
if (`${{ env.esc_lint_out }}`.trim() != "") {
out += "## 🔨 Lint: [${{matrix.pkg.pkg}} (${{matrix.pkg.arch}})](https://github.com/terrapkg/packages/actions/runs/${{github.run_id}})\n";
out += `\`\`\`\n${{ env.esc_lint_out }}\n\`\`\`\n`;
}
if (`${{ env.esc_dnf_out }}`.trim() != "") {
out += "## ❌ DNF: [${{matrix.pkg.pkg}} (${{matrix.pkg.arch}})](https://github.com/terrapkg/packages/actions/runs/${{github.run_id}})\n";
out += `${{ env.esc_dnf_out }}`;
}
if (out != "") {
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: out,
});
}
- name: Create commit comment
if: success() && env.err == 'true'
uses: peter-evans/commit-comment@v2
with:
body: |
<sub>[run_id: ${{github.run_id}}](https://github.com/terrapkg/packages/actions/runs/${{github.run_id}})</sub>
# Built RPM: ${{matrix.pkg.pkg}} (${{matrix.pkg.arch}}.fc${{matrix.version}})
## Lint
If you see anything below, RPMLint returned with a non-zero exit code.
${{ env.lint_out }}
## DNF
Output of `dnf in --downloadonly ...`.
If you see anything below, DNF returned with a non-zero exit code.
${{ env.dnf_out }}
- name: Generate RPMLint/DNF summary
if: success()
run: |
# Remind me to make all of this not weird later ~ lleyton
if [[ $LINT_ERR == "true" ]]; then
echo -e "## Lint: [${{matrix.pkg.pkg}} (${{matrix.pkg.arch}})](https://github.com/terrapkg/packages/actions/runs/${{github.run_id}})\n" >> $GITHUB_STEP_SUMMARY
echo -e "```\n${{ env.ESC_LINT_OUT }}\n```\n" >> $GITHUB_STEP_SUMMARY
fi
if [[ $INSTALL_ERR == "true" ]]; then
echo -e "## ❌ DNF: [${{matrix.pkg.pkg}} (${{matrix.pkg.arch}})](https://github.com/terrapkg/packages/actions/runs/${{github.run_id}})\n" >> $GITHUB_STEP_SUMMARY
echo "${{ env.ESC_DNF_OUT }}" >> $GITHUB_STEP_SUMMARY
fi
+1 -1
View File
@@ -7,7 +7,7 @@ Summary: Gay sharks at your local terminal - lolcat-like CLI tool
License: BSD-2-Clause
URL: https://blahaj.queer.software
Source0: https://github.com/GeopJr/BLAHAJ/archive/refs/tags/v%version.tar.gz
BuildRequires: crystal gcc libyaml-devel pcre-devel
BuildRequires: crystal gcc libyaml-devel pcre-devel libgc-devel libevent-devel
ExclusiveArch: x86_64
%description
@@ -101,7 +101,7 @@ desktop-file-validate \
%{buildroot}/%{_datadir}/applications/%{appname}.desktop
appstream-util validate-relax --nonet \
%{buildroot}/%{_datadir}/metainfo/%{appname}.appdata.xml
%{buildroot}/%{_datadir}/metainfo/%{appname}.metainfo.xml
%post portal
@@ -127,7 +127,7 @@ appstream-util validate-relax --nonet \
%{_datadir}/dbus-1/services/%{appname}.service
%{_datadir}/dbus-1/services/%{appname}.Filemanager1.service
%{_datadir}/glib-2.0/schemas/%{appname}.gschema.xml
%{_datadir}/metainfo/%{appname}.appdata.xml
%{_datadir}/metainfo/%{appname}.metainfo.xml
%{_datadir}/polkit-1/actions/%{appname}.policy
%files portal
+2 -2
View File
@@ -92,7 +92,7 @@ desktop-file-validate \
%{buildroot}/%{_datadir}/applications/gala*.desktop
#appstream-util validate-relax --nonet \
# %%{buildroot}/%%{_datadir}/metainfo/%%{name}.appdata.xml
# %%{buildroot}/%%{_datadir}/metainfo/%%{name}.metainfo.xml
%files -f gala.lang
@@ -108,7 +108,7 @@ desktop-file-validate \
%{_datadir}/applications/gala*.desktop
%{_datadir}/glib-2.0/schemas/20_elementary.pantheon.wm.gschema.override
%{_datadir}/glib-2.0/schemas/org.pantheon.desktop.gala.gschema.xml
%{_datadir}/metainfo/%{name}.appdata.xml
%{_datadir}/metainfo/%{name}.metainfo.xml
%files libs
%doc AUTHORS README.md
@@ -25,7 +25,9 @@ BuildRequires: pkgconfig(flatpak) >= 1.1.2
BuildRequires: pkgconfig(glib-2.0) >= 2.34
BuildRequires: pkgconfig(granite)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(libhandy-1)
BuildRequires: pkgconfig(switchboard-2.0)
BuildRequires: pkgconfig(libhandy-1)
Requires: switchboard%{?_isa}
Supplements: switchboard%{?_isa}
@@ -47,15 +49,16 @@ that allows the user to manage application settings.
%install
%meson_install
%fdupes %buildroot%_datadir/locale/
mv %buildroot%_datadir/metainfo/%plug_rdnn.appdata.xml %buildroot%_datadir/metainfo/%plug_rdnn.metainfo.xml || true
%find_lang %{plug_name}-plug
# remove the specified stock icon from appdata (invalid in libappstream-glib)
sed -i '/icon type="stock"/d' %{buildroot}/%{_datadir}/metainfo/%{plug_rdnn}.appdata.xml
sed -i '/icon type="stock"/d' %{buildroot}%{_datadir}/metainfo/%{plug_rdnn}.metainfo.xml
%check
appstream-util validate-relax --nonet \
%{buildroot}/%{_datadir}/metainfo/%{plug_rdnn}.appdata.xml
%{buildroot}%{_datadir}/metainfo/%{plug_rdnn}.metainfo.xml
%files -f %{plug_name}-plug.lang
@@ -64,7 +67,8 @@ appstream-util validate-relax --nonet \
%{_libdir}/switchboard/%{plug_type}/lib%{plug_name}.so
%{_datadir}/metainfo/%{plug_rdnn}.appdata.xml
%{_datadir}/metainfo/%{plug_rdnn}.metainfo.xml
%{_datadir}/icons/hicolor/*/apps/io.elementary.settings.applications.svg
%changelog
@@ -52,7 +52,7 @@ them.
%check
appstream-util validate-relax --nonet \
%{buildroot}/%{_datadir}/metainfo/%{plug_rdnn}.appdata.xml
%{buildroot}/%{_datadir}/metainfo/%{plug_rdnn}.metainfo.xml
%files -f %{plug_name}-plug.lang
@@ -61,7 +61,7 @@ appstream-util validate-relax --nonet \
%{_libdir}/switchboard/%{plug_type}/lib%{plug_name}.so
%{_datadir}/metainfo/%{plug_rdnn}.appdata.xml
%{_datadir}/metainfo/%{plug_rdnn}.metainfo.xml
%changelog
@@ -53,19 +53,19 @@ Manage online accounts and connected applications.
%find_lang %{plug_name}-plug
# remove the specified stock icon from appdata (invalid in libappstream-glib)
sed -i '/icon type="stock"/d' %{buildroot}/%{_datadir}/metainfo/%{plug_rdnn}.appdata.xml
sed -i '/icon type="stock"/d' %{buildroot}/%{_datadir}/metainfo/%{plug_rdnn}.metainfo.xml
%check
appstream-util validate-relax --nonet \
%{buildroot}/%{_datadir}/metainfo/%{plug_rdnn}.appdata.xml
%{buildroot}/%{_datadir}/metainfo/%{plug_rdnn}.metainfo.xml
%files -f %{plug_name}-plug.lang
%license LICENSE
%doc README.md
%{_datadir}/metainfo/%{plug_rdnn}.appdata.xml
%{_datadir}/metainfo/%{plug_rdnn}.metainfo.xml
%{_libdir}/switchboard/%{plug_type}/lib%{plug_name}.so
@@ -48,13 +48,13 @@ A bluetooth indicator for wingpanel.
%fdupes %buildroot%_datadir/locale/
%find_lang bluetooth-indicator
# remove the specified stock icon from appdata (invalid in libappstream-glib)
sed -i '/icon type="stock"/d' %{buildroot}/%{_datadir}/metainfo/%{appname}.appdata.xml
# remove the specified stock icon from metainfo (invalid in libappstream-glib)
sed -i '/icon type="stock"/d' %{buildroot}/%{_datadir}/metainfo/%{appname}.metainfo.xml
%check
appstream-util validate-relax --nonet \
%{buildroot}/%{_datadir}/metainfo/%{appname}.appdata.xml
%{buildroot}/%{_datadir}/metainfo/%{appname}.metainfo.xml
%files -f bluetooth-indicator.lang
@@ -63,8 +63,11 @@ appstream-util validate-relax --nonet \
%{_libdir}/wingpanel/libbluetooth.so
%_bindir/io.elementary.bluetooth
%{_datadir}/glib-2.0/schemas/io.elementary.desktop.wingpanel.bluetooth.gschema.xml
%{_datadir}/metainfo/%{appname}.appdata.xml
%{_datadir}/applications/io.elementary.bluetooth.desktop
%{_datadir}/metainfo/%{appname}.metainfo.xml
%_sysconfdir/xdg/autostart/io.elementary.bluetooth-daemon.desktop
%changelog
@@ -52,7 +52,7 @@ A notifications indicator for wingpanel.
%check
appstream-util validate-relax --nonet \
%{buildroot}/%{_datadir}/metainfo/%{appname}.appdata.xml
%{buildroot}/%{_datadir}/metainfo/%{appname}.metainfo.xml
%files -f notifications-indicator.lang
@@ -61,7 +61,7 @@ appstream-util validate-relax --nonet \
%{_libdir}/wingpanel/libnotifications.so
%{_datadir}/metainfo/%{appname}.appdata.xml
%{_datadir}/metainfo/%{appname}.metainfo.xml
%changelog
+11 -14
View File
@@ -1,19 +1,20 @@
%global commit ffa0fdf363527c9993b8836cce48cd12bd2b81ba
Summary: A modernist sans serif font
Name: manrope-fonts
Version: 1
Release: 3%{?dist}
Version: 4.505
Release: 1%{?dist}
License: OFL-1.1
URL: https://manropefont.com/
URL: https://github.com/sharanda/manrope
Source0: https://manropefont.com/manrope.zip
Source1: README.md
Source0: %url/archive/%commit.tar.gz
BuildArch: noarch
%description
Manrope modern geometric sans-serif
%prep
yes A | %autosetup -c
%autosetup -n manrope-%commit
%build
@@ -23,24 +24,20 @@ install -pm 644 fonts/otf/*.otf %{buildroot}%{_datadir}/fonts/manrope
install -pm 644 fonts/ttf/*.ttf %{buildroot}%{_datadir}/fonts/manrope
install -pm 644 fonts/variable/Manrope* %{buildroot}%{_datadir}/fonts/manrope
install -pm 0644 %SOURCE1 README.md
# Install licenses
mkdir -p licenses
install -pm 0644 %SOURCE1 licenses/LICENSE
%files
%doc README.md
%doc documentation.html
%license licenses/LICENSE
%license OFL.txt
%{_datadir}/fonts/manrope/*
%changelog
* Thu Jun 22 2023 windowsboy111 <windowsboy111@fyralabs.com> - 4.505-1
- Bump version and fix sources
* Tue Jan 10 2023 Cappy Ishihara <cappy@cappuchino.xyz> - 1-3
- Ported from tauOS
* Sat May 14 2022 Jamie Murphy <jamie@fyralabs.com> - 1-1
- Fix specfile
+8
View File
@@ -0,0 +1,8 @@
let readme = get("https://raw.githubusercontent.com/sharanda/manrope/master/README.md");
let ver = find("## Changelog\n- v (.+?) \\/", readme, 1);
if ver != find("Version:\\s*([\\d.]+)\n" rpm.f, 1) {
let req = new_req("https://api.github.com/repos/sharanda/manrope/commits/HEAD");
let sha = req.get().json().sha;
rpm.global("commit", sha);
rpm.version(ver);
}
@@ -57,5 +57,5 @@ install -Dm644 %SOURCE3 %buildroot/%_datadir/doc/sarasa-gothic-super-fonts/
/%{_datadir}/fonts/sarasa-gothic-super/
%changelog
* Wed Apr 26 2023 windowsboy111 <windowsboy111@fyralabs.com> - 0.40.6
* Wed Apr 26 2023 windowsboy111 <windowsboy111@fyralabs.com> - 0.40.6-1
- Initial package
+1
View File
@@ -49,6 +49,7 @@ developing applications that use %{name}.
echo "#include <cstdint>" > a.h
cat src/libappimage/utils/hashlib.h >> a.h
mv a.h src/libappimage/utils/hashlib.h
rm docs/{make.bat,.gitignore}
%build
+36 -15
View File
@@ -5,12 +5,16 @@ config_opts['chroot_setup_cmd'] = 'install @buildsys-build'
config_opts['package_manager'] = 'dnf'
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
config_opts['mirrored'] = True
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'
# repos
config_opts['dnf.conf'] = """
dnf_conf = """
[main]
keepcache=1
debuglevel=2
debuglevel=2a
reposdir=/dev/null
logfile=/var/log/yum.log
retries=20
@@ -37,6 +41,9 @@ enabled=1
enabled_metadata=1
metadata_expire=4h
# RPMFusion
# We do not check GPG keys, because I can't find a direct link to the GPG key
[rpmfusion-free]
name=RPM Fusion for Fedora $releasever - Free
#baseurl=http://download1.rpmfusion.org/free/fedora/releases/$releasever/Everything/$basearch/os/
@@ -44,30 +51,40 @@ metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-$releasever&arc
enabled=1
metadata_expire=14d
type=rpm-md
gpgcheck=1
gpgcheck=0
repo_gpgcheck=0
[rpmfusion-free-updates]
name=RPM Fusion for Fedora $releasever - Free - Updates
#baseurl=http://download1.rpmfusion.org/free/fedora/updates/$releasever/$basearch/
metalink=https://mirrors.rpmfusion.org/metalink?repo=free-fedora-updates-released-$releasever&arch=$basearch
enabled=1
enabled_metadata=1
type=rpm-md
gpgcheck=0
repo_gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-$releasever
[rpmfusion-nonfree]
name=RPM Fusion for Fedora $releasever - Nonfree
#baseurl=http://download1.rpmfusion.org/nonfree/fedora/releases/$releasever/Everything/$basearch/os/
metalink=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-$releasever&arch=$basearch
enabled=0
enabled=1
enabled_metadata=1
metadata_expire=14d
type=rpm-md
gpgcheck=1
gpgcheck=0
repo_gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-$releasever
[rpmfusion-nonfree-updates]
name=RPM Fusion for Fedora $releasever - Nonfree - Updates
#baseurl=http://download1.rpmfusion.org/nonfree/fedora/updates/$releasever/$basearch/
metalink=https://mirrors.rpmfusion.org/metalink?repo=nonfree-fedora-updates-released-$releasever&arch=$basearch
enabled=1
enabled_metadata=1
type=rpm-md
gpgcheck=0
repo_gpgcheck=0
[local]
name=local
baseurl=https://lapis.ultramarine-linux.org/kojifiles/repos/um{{ releasever }}-build/latest/$basearch/
cost=2000
enabled={{ not mirrored }}
skip_if_unavailable=False
assumeyes=True
{% if mirrored %}
[fedora]
@@ -200,4 +217,8 @@ 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
+1 -1
View File
@@ -4,7 +4,7 @@
Name: click
Version: 0.5.0
Release: 2%?dist
Release: %autorelease
Summary: An app building method
License: LGPL-3.0
URL: https://gitlab.com/ubports/development/core/click
+5
View File
@@ -0,0 +1,5 @@
project pkg {
rpm {
spec = "uwufetch.spec"
}
}
+1
View File
@@ -0,0 +1 @@
rpm.version(gh("TheDarkBug/uwufetch"));
+33
View File
@@ -0,0 +1,33 @@
Name: uwufetch
Version: 2.1
Release: 1%?dist
Summary: A meme system info tool for Linux, based on nyan/uwu trend on r/linuxmasterrace.
License: GPL-3.0
URL: https://github.com/TheDarkBug/uwufetch
BuildRequires: make gcc git anda-srpm-macros
%description
A meme system info tool for (almost) all your Linux/Unix-based systems, based on the nyan/UwU trend on r/linuxmasterrace.
%prep
git clone https://github.com/TheDarkBug/uwufetch.git .
git checkout %{version}
%build
%make_build
%install
make install DESTDIR=%{?buildroot}%{_prefix}
mkdir %{?buildroot}%{_libdir}
mv %{?buildroot}%{_prefix}/lib/libfetch.so %{?buildroot}%{_libdir}/libfetch.so
rm -rf %{?buildroot}%{_includedir}
%files
%{_prefix}/lib/uwufetch/*
%{_libdir}/libfetch.so
%{_mandir}/man1/uwufetch.1.gz
%{_bindir}/uwufetch
%changelog
* Thu Jun 22 2023 Alyxia Sother <alyxia@riseup.net>
- Initial package.
+1 -2
View File
@@ -49,8 +49,7 @@ pushd crates/
%install
install -D -m 0755 target/release/youki %{buildroot}%{_bindir}/youki
%fdupes %buildroot/usr/share/doc/youki/docs
rm %buildroot/usr/share/doc/youki/docs/.gitignore
%fdupes docs/
%files
%license LICENSE