Skip to content

Commit deb4e87

Browse files
Prepare Fedora 43 release automation
1 parent 202b10b commit deb4e87

81 files changed

Lines changed: 3222 additions & 5053 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.copr/Makefile

Lines changed: 93 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,102 @@ outdir ?= $(CURDIR)
66
srpm:
77
@test -f "$(spec)" || { echo "Spec file not found: $(spec)"; exit 1; }
88
@mkdir -p "$(outdir)"
9-
@name=$$(sed -n 's/^Name:[[:space:]]*//p' "$(spec)" | head -n1); \
10-
version=$$(sed -n 's/^Version:[[:space:]]*//p' "$(spec)" | head -n1); \
9+
@name=$$(rpmspec -q --srpm --qf '%{name}\n' "$(spec)" 2>/dev/null | head -n1 || true); \
10+
version=$$(rpmspec -q --srpm --qf '%{version}\n' "$(spec)" 2>/dev/null | head -n1 || true); \
11+
if [ -z "$$name" ] || echo "$$name" | grep -q '%'; then \
12+
name=$$(sed -n 's/^Name:[[:space:]]*//p' "$(spec)" | head -n1); \
13+
fi; \
14+
if [ -z "$$version" ] || echo "$$version" | grep -q '%'; then \
15+
pub_version=$$(awk '/^version:/ {print $$2; exit}' pubspec.yaml); \
16+
version=$${pub_version%%+*}; \
17+
fi; \
1118
test -n "$$name" && test -n "$$version" || { echo "Unable to parse Name/Version from $(spec)"; exit 1; }; \
1219
tarball="$(outdir)/$$name-$$version.tar.gz"; \
1320
staging="$(outdir)/.copr-srpm-tmp"; \
14-
rm -rf "$$staging"; \
15-
mkdir -p "$$staging/$$name-$$version"; \
16-
echo "Generating $$tarball from checked out sources"; \
17-
cp -a . "$$staging/$$name-$$version/"; \
18-
rm -rf "$$staging/$$name-$$version/.git" \
19-
"$$staging/$$name-$$version/dist" \
20-
"$$staging/$$name-$$version/build" \
21-
"$$staging/$$name-$$version/outputs" \
22-
"$$staging/$$name-$$version/linux/__pycache__"; \
23-
tar -C "$$staging" -czf "$$tarball" "$$name-$$version"; \
24-
rm -rf "$$staging"; \
25-
echo "Building SRPM into $(outdir)"; \
21+
rm -rf "$$staging"; \
22+
echo "Generating $$tarball from checked out sources"; \
23+
if git rev-parse --is-inside-work-tree >/dev/null 2>&1 && git rev-parse --verify HEAD >/dev/null 2>&1; then \
24+
git archive --worktree-attributes --format=tar --prefix="$$name-$$version/" HEAD | gzip -cn > "$$tarball"; \
25+
else \
26+
mkdir -p "$$staging/$$name-$$version"; \
27+
rsync -a --delete \
28+
--exclude ".git" \
29+
--exclude ".git/" \
30+
--exclude ".idea" \
31+
--exclude ".idea/" \
32+
--exclude ".codex" \
33+
--exclude ".codex/" \
34+
--exclude ".agents" \
35+
--exclude ".agents/" \
36+
--exclude ".dart_tool" \
37+
--exclude ".dart_tool/" \
38+
--exclude ".pub-cache" \
39+
--exclude ".pub-cache/" \
40+
--exclude ".pub" \
41+
--exclude ".pub/" \
42+
--exclude "build" \
43+
--exclude "build/" \
44+
--exclude "coverage" \
45+
--exclude "coverage/" \
46+
--exclude "COPR.md" \
47+
--exclude "docs/old" \
48+
--exclude "docs/old/" \
49+
--exclude "docs/road.md" \
50+
--exclude "docs/road-plan.md" \
51+
--exclude "docs/git-yukleme-notu.md" \
52+
--exclude "docs/grafik-driver-politikasi.md" \
53+
--exclude "docs/profesyonel-installer-ana-plani.md" \
54+
--exclude "docs/ro-apps-packaging-notu.md" \
55+
--exclude "docs/siyah-ekran-kernel-notlari.md" \
56+
--exclude "docs/sonraki-adim-notu.md" \
57+
--exclude "docs/yeni-makine-qemu-rehberi.md" \
58+
--exclude "durum.md" \
59+
--exclude "eksikler.md" \
60+
--exclude "gerçeksistemdenloglar" \
61+
--exclude "gerçeksistemdenloglar/" \
62+
--exclude "implementation_plan.md" \
63+
--exclude "kernel-black-screen-diagnostics.md" \
64+
--exclude "optimizasyon.md" \
65+
--exclude "plan.md" \
66+
--exclude "test.md" \
67+
--exclude "outputs" \
68+
--exclude "outputs/" \
69+
--exclude "rpm-outputs" \
70+
--exclude "rpm-outputs/" \
71+
--exclude "iso-release" \
72+
--exclude "iso-release/" \
73+
--exclude "iso-realese" \
74+
--exclude "iso-realese/" \
75+
--exclude "linux/flutter/ephemeral" \
76+
--exclude "linux/flutter/ephemeral/" \
77+
--exclude "__pycache__" \
78+
--exclude "__pycache__/" \
79+
--exclude ".copr-srpm-tmp" \
80+
--exclude ".copr-srpm-tmp/" \
81+
--exclude "*.iso" \
82+
--exclude "*.qcow2" \
83+
--exclude "*.fd" \
84+
--exclude "*.rpm" \
85+
--exclude "*.src.rpm" \
86+
--exclude "*.tar.gz" \
87+
--exclude "*.pyc" \
88+
--exclude "*.log" \
89+
--exclude ".git.broken-*" \
90+
--exclude ".git.broken-*/" \
91+
--exclude "stitch_velvet_nebula_installer_redesign" \
92+
--exclude "stitch_velvet_nebula_installer_redesign/" \
93+
./ "$$staging/$$name-$$version/"; \
94+
tar --sort=name --mtime='UTC 1970-01-01' --owner=0 --group=0 --numeric-owner -C "$$staging" -czf "$$tarball" "$$name-$$version"; \
95+
rm -rf "$$staging"; \
96+
fi; \
97+
bad=$$(tar -tzf "$$tarball" | grep -E '(^|/)(\.git|\.idea|\.codex|\.agents|\.dart_tool|build|coverage|docs/old|gerçeksistemdenloglar|outputs|rpm-outputs|iso-release|iso-realese|linux/flutter/ephemeral|__pycache__)(/|$$)|(^|/)(COPR|durum|eksikler|implementation_plan|kernel-black-screen-diagnostics|optimizasyon|plan|test)\.md$$|(^|/)docs/(road|road-plan|git-yukleme-notu|grafik-driver-politikasi|profesyonel-installer-ana-plani|ro-apps-packaging-notu|siyah-ekran-kernel-notlari|sonraki-adim-notu|yeni-makine-qemu-rehberi)\.md$$|\.(iso|qcow2|fd|rpm|src\.rpm|tar\.gz|pyc|log)$$' | head -n 50 || true); \
98+
if [ -n "$$bad" ]; then \
99+
echo "Source tarball contains forbidden files:"; \
100+
echo "$$bad"; \
101+
exit 1; \
102+
fi; \
103+
sha256sum "$$tarball" > "$$tarball.sha256"; \
104+
echo "Building SRPM into $(outdir)"; \
26105
rpmbuild -bs "$(spec)" \
27106
--define "_sourcedir $(outdir)" \
28107
--define "_srcrpmdir $(outdir)"

.gitattributes

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/build/ export-ignore
2+
/coverage/ export-ignore
3+
/outputs/ export-ignore
4+
/rpm-outputs/ export-ignore
5+
/iso-release/ export-ignore
6+
/iso-realese/ export-ignore
7+
/docs/road.md export-ignore
8+
/docs/road-plan.md export-ignore
9+
/docs/old/ export-ignore
10+
/COPR.md export-ignore
11+
/durum.md export-ignore
12+
/eksikler.md export-ignore
13+
/implementation_plan.md export-ignore
14+
/kernel-black-screen-diagnostics.md export-ignore
15+
/optimizasyon.md export-ignore
16+
/plan.md export-ignore
17+
/test.md export-ignore
18+
/docs/git-yukleme-notu.md export-ignore
19+
/docs/grafik-driver-politikasi.md export-ignore
20+
/docs/profesyonel-installer-ana-plani.md export-ignore
21+
/docs/ro-apps-packaging-notu.md export-ignore
22+
/docs/siyah-ekran-kernel-notlari.md export-ignore
23+
/docs/sonraki-adim-notu.md export-ignore
24+
/docs/yeni-makine-qemu-rehberi.md export-ignore
25+
/gerçeksistemdenloglar/ export-ignore
26+
/linux/flutter/ephemeral/ export-ignore
27+
/.codex/ export-ignore
28+
/.agents/ export-ignore
29+
/.dart_tool/ export-ignore
30+
/.idea/ export-ignore
31+
/.copr-srpm-tmp/ export-ignore
32+
/stitch_velvet_nebula_installer_redesign/ export-ignore
33+
*.iso export-ignore
34+
*.qcow2 export-ignore
35+
*.fd export-ignore
36+
*.rpm export-ignore
37+
*.src.rpm export-ignore
38+
*.tar.gz export-ignore
39+
*.pyc export-ignore
40+
*.log export-ignore

.github/workflows/rpm-fedora43.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: RPM Fedora 43
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
tags:
10+
- 'v*'
11+
release:
12+
types:
13+
- published
14+
15+
permissions:
16+
contents: write
17+
18+
concurrency:
19+
group: rpm-fedora43-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
build-rpm:
24+
name: Build ro-installer RPM on Fedora 43
25+
runs-on: ubuntu-latest
26+
container:
27+
image: fedora:43
28+
29+
steps:
30+
- name: Install Fedora 43 build dependencies
31+
run: |
32+
dnf -y --setopt=install_weak_deps=False install \
33+
git \
34+
rpm-build \
35+
rsync \
36+
tar \
37+
gzip \
38+
findutils \
39+
coreutils \
40+
gawk \
41+
sed \
42+
grep \
43+
flutter \
44+
clang \
45+
cmake \
46+
ninja-build \
47+
gtk3-devel \
48+
pkgconf-pkg-config \
49+
python3 \
50+
ripgrep
51+
52+
- name: Check out repository
53+
uses: actions/checkout@v4
54+
with:
55+
fetch-depth: 0
56+
57+
- name: Mark workspace as safe for git
58+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
59+
60+
- name: Build RPM
61+
run: scripts/01-build-rpm.sh --no-chain --source-mode git --require-clean-git
62+
63+
- name: Show build manifest
64+
if: always()
65+
run: |
66+
if [ -f rpm-outputs/latest-rpm-manifest.txt ]; then
67+
cat "$(cat rpm-outputs/latest-rpm-manifest.txt)"
68+
fi
69+
70+
- name: Upload RPM artifacts
71+
if: always()
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: ro-installer-rpm-fedora43
75+
if-no-files-found: error
76+
path: |
77+
rpm-outputs/*.rpm
78+
rpm-outputs/*.sha256
79+
rpm-outputs/*.build-manifest.txt
80+
rpm-outputs/*.source-files.txt
81+
rpm-outputs/latest-rpm-path.txt
82+
rpm-outputs/latest-rpm-manifest.txt
83+
outputs/logs/01-build-rpm-*.log
84+
85+
- name: Attach RPM to GitHub Release
86+
if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/')
87+
uses: softprops/action-gh-release@v2
88+
with:
89+
tag_name: ${{ github.event.release.tag_name || github.ref_name }}
90+
files: |
91+
rpm-outputs/*.rpm
92+
rpm-outputs/*.sha256
93+
rpm-outputs/*.build-manifest.txt
94+
rpm-outputs/*.source-files.txt
95+
rpm-outputs/latest-rpm-path.txt
96+
rpm-outputs/latest-rpm-manifest.txt
97+
outputs/logs/01-build-rpm-*.log

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,40 @@ app.*.map.json
5252

5353
# Local VM test artifacts
5454
/outputs/
55+
/iso-release/
5556
/iso-realese/
5657
/rpm-outputs/
5758
*.iso
5859
*.rpm
5960
*.src.rpm
61+
/*.tar.gz
62+
/*.tar.gz.sha256
63+
/.copr-srpm-tmp/
6064
/*.qcow2
6165
/*.fd
6266

6367
# Local hardware/debug captures
6468
/gerçeksistemdenloglar/*.txt
6569

70+
# Local planning and historical notes
71+
/docs/road.md
72+
/docs/road-plan.md
73+
/docs/old/
74+
/COPR.md
75+
/durum.md
76+
/eksikler.md
77+
/implementation_plan.md
78+
/kernel-black-screen-diagnostics.md
79+
/optimizasyon.md
80+
/plan.md
81+
/test.md
82+
/docs/git-yukleme-notu.md
83+
/docs/grafik-driver-politikasi.md
84+
/docs/profesyonel-installer-ana-plani.md
85+
/docs/ro-apps-packaging-notu.md
86+
/docs/siyah-ekran-kernel-notlari.md
87+
/docs/sonraki-adim-notu.md
88+
/docs/yeni-makine-qemu-rehberi.md
89+
6690
# Generated design prototype exports kept locally for reference
6791
/stitch_velvet_nebula_installer_redesign/

0 commit comments

Comments
 (0)