Skip to content

docs: add instructions for install with package managers#288

Merged
vitonsky merged 23 commits intomasterfrom
287-publish-flatpak-repo
May 6, 2026
Merged

docs: add instructions for install with package managers#288
vitonsky merged 23 commits intomasterfrom
287-publish-flatpak-repo

Conversation

@vitonsky
Copy link
Copy Markdown
Member

@vitonsky vitonsky commented May 5, 2026

Closes #287, closes #286

TODO

Summary by CodeRabbit

  • New Features
    • Official Flathub support for Linux installs; added platform-specific download sections with Flatpak, Homebrew and native installers, plus copyable command/code snippets.
  • Chores
    • Improved build/release pipeline with linting, repo build/push steps and environment example for signing/repo config.
    • Added repository metadata and app developer/update contact for Flathub.

@vitonsky vitonsky linked an issue May 5, 2026 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

📝 Walkthrough

Walkthrough

Adds Flatpak repository publishing infrastructure (env template, Makefile targets, repo metadata, GPG signing/push), refactors Flatpak manifest/metainfo to use local build artefacts, and updates the website download page with new platform-specific components and code blocks.

Changes

Flatpak Repository Publishing Setup

Layer / File(s) Summary
Environment
packages/app/scripts/flathub/.env.example
Adds placeholders GPG_SIGN_ID= and REPO_REMOTE=S3:bucket-name/path.
Makefile / Build Targets
packages/app/scripts/flathub/Makefile
Includes .env, exports variables, adds lint, repo-update, repo-push targets; declarative rules for ${BUILD_DIR}, ${REPO_DIR}, and deepink.flatpak; repo-update builds repo with GPG signing and static deltas; repo-push syncs via rclone.
Manifest / Metadata
packages/app/scripts/flathub/app.deepink.Deepink.yaml, packages/app/scripts/flathub/app.deepink.Deepink.metainfo.xml
Moves only-arches: x86_64 to module level, removes --filesystem=home finish-arg, switches sources from git/src/monorepo/... to local file sources for deepink.sh and desktop/metainfo; adds <developer id="net.vitonsky"> and <update_contact>contact@deepink.app</update_contact> in metainfo.
Repo Publication Metadata / Verification
packages/site/public/deepink.flatpakrepo, packages/site/public/.well-known/org.flathub.VerifiedApps.txt
Adds deepink.flatpakrepo with title, URL (https://flatpak.deepink.app/), description, and GPGKey; removes one verification line referencing a Flathub PR.

Website Download UI

Layer / File(s) Summary
New UI Primitives
packages/site/src/features/Download/SimpleCodeBlock.tsx, packages/site/src/features/Download/PlatformDownloads.tsx
Adds SimpleCodeBlock (code block with copy control) and PlatformDownloads (platform-specific download block with analytics on link clicks).
Page Integration & Layout
packages/site/src/features/Download/index.tsx
Refactors downloads page to use new components, reorganizes link data shape (links / linkMap), reduces TheRock image width, and adds macOS Homebrew and Linux Flatpak instructions with SimpleCodeBlock examples.
Wordlist
words.txt
Adds token deepinkapp.

Sequence Diagram

sequenceDiagram
  participant Dev as Developer / CI
  participant Make as Makefile
  participant Builder as flatpak-builder
  participant GPG as GPG (signing)
  participant RepoCmd as flatpak build-update-repo
  participant Sync as rclone
  participant Remote as Remote storage (S3 / rclone target)

  Dev->>Make: run `make repo-update`
  Make->>Builder: build flatpak in `${BUILD_DIR}`
  Builder->>GPG: produce signed metadata (sign with `GPG_SIGN_ID`)
  GPG->>RepoCmd: provide key/signatures
  RepoCmd->>Make: export `${REPO_DIR}` and generate deltas
  Make->>Sync: `rclone sync ${REPO_DIR} ${REPO_REMOTE}`
  Sync->>Remote: upload repository files
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • DeepinkApp/deepink#285: Modifies Flathub packaging and build artifacts (Makefile, manifest, metainfo, scripts) and is directly related to the repository publishing changes.

Poem

🐰
I hopped and scratched a build so fine,
Signed keys and bundles, row by line,
Push with rclone, web links in place,
Downloads tidy, snug in their space,
A tiny repo—hop, celebrate! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'docs: add instructions for install with package managers' refers to documentation changes for installation instructions, but the actual changeset implements a complete Flatpak repository publishing infrastructure with build automation, manifests, and downloads page restructuring—not documentation updates. Update the title to accurately reflect the main objective, such as 'build: publish flatpak repo' or 'feat: add self-hosted flatpak repository with download integration' to match the actual implementation scope.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR successfully addresses issue #287 by implementing a self-hosted Flatpak repository with proper build infrastructure, configuration files, and download page updates.
Out of Scope Changes check ✅ Passed All changes are directly related to publishing a Flatpak repository: build scripts, metadata, manifest files, repo configuration, and download page integration. The addition to words.txt is a minor supporting change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 287-publish-flatpak-repo

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Cloudflare Pages Deployment

Event Name: pull_request
Environment: preview
Project: deepink
Built with commit: 7791435
Preview URL: https://35613d65.deepink.pages.dev
Branch Preview URL: https://287-publish-flatpak-repo.deepink.pages.dev

Wrangler Output

⛅️ wrangler 4.87.0
───────────────────
Uploading... (199/201)
Uploading... (200/201)
Uploading... (201/201)
✨ Success! Uploaded 2 files (199 already uploaded) (2.36 sec)

🌎 Deploying...
✨ Deployment complete! Take a peek over at https://35613d65.deepink.pages.dev
✨ Deployment alias URL: https://287-publish-flatpak-repo.deepink.pages.dev

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/app/scripts/flathub/Makefile`:
- Around line 22-24: The repo-update Makefile target currently signs the repo
with ${GPG_SIGN_ID} but leaves packages/site/public/deepink.flatpakrepo
hardcoded; update the repo-update flow (target: repo-update) to either
regenerate packages/site/public/deepink.flatpakrepo from the active signer
fingerprint/key derived from ${GPG_SIGN_ID} (export the signer's public
key/fingerprint and embed it into the .flatpakrepo) or perform a strict
fingerprint check before publishing and fail fast if the embedded key in
packages/site/public/deepink.flatpakrepo does not match the fingerprint of
${GPG_SIGN_ID}; touch the variables BUILD_DIR, APP_ID, REPO_DIR, and GPG_SIGN_ID
in the script to locate where to add the export-or-compare logic.
- Around line 22-27: Add guards and ordering: in the repo-update recipe check
that required env vars (GPG_SIGN_ID, REPO_DIR, APP_ID, BUILD_DIR) and publish
target (REPO_REMOTE) are non-empty and fail early with a clear error if any are
missing; ensure you do not pass an empty --gpg-sign value to flatpak commands.
Also make repo-push depend on repo-update (so repo-update runs first) and ensure
repo-update recreates a fresh repo by removing or reinitializing ${REPO_DIR}
before running flatpak build-update-repo so stale content cannot be pushed;
reference targets and vars: repo-update, repo-push, BUILD_DIR, APP_ID, REPO_DIR,
GPG_SIGN_ID, REPO_REMOTE.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1474afe6-5716-43a7-bdd2-9d460c8b8b76

📥 Commits

Reviewing files that changed from the base of the PR and between 597a9f9 and 768ff47.

📒 Files selected for processing (6)
  • packages/app/scripts/flathub/.env.example
  • packages/app/scripts/flathub/Makefile
  • packages/app/scripts/flathub/app.deepink.Deepink.metainfo.xml
  • packages/app/scripts/flathub/app.deepink.Deepink.yaml
  • packages/site/public/.well-known/org.flathub.VerifiedApps.txt
  • packages/site/public/deepink.flatpakrepo
💤 Files with no reviewable changes (1)
  • packages/site/public/.well-known/org.flathub.VerifiedApps.txt

Comment thread packages/app/scripts/flathub/Makefile
Comment thread packages/app/scripts/flathub/Makefile
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Cloudflare Pages Deployment

Event Name: pull_request
Environment: preview
Project: deepink
Built with commit: 9c4ffd8
Preview URL: https://a64e320f.deepink.pages.dev
Branch Preview URL: https://287-publish-flatpak-repo.deepink.pages.dev

Wrangler Output

⛅️ wrangler 4.87.0
───────────────────
Uploading... (110/201)
Uploading... (141/201)
Uploading... (171/201)
Uploading... (201/201)
✨ Success! Uploaded 91 files (110 already uploaded) (3.23 sec)

🌎 Deploying...
✨ Deployment complete! Take a peek over at https://a64e320f.deepink.pages.dev
✨ Deployment alias URL: https://287-publish-flatpak-repo.deepink.pages.dev

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/site/src/features/Download/index.tsx (1)

76-93: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Guard against empty versions before dereferencing versions[0].

Lines 77–93 assume versions[0] exists. If the release list is empty, this throws and breaks the downloads page.

Suggested fix
 	const { links, linkMap } = useMemo(() => {
+		const latest = versions[0];
+		if (!latest) {
+			return {
+				links: { windows: [], linux: [], mac: [] },
+				linkMap: { Windows: undefined, macOS: undefined, Linux: undefined },
+			};
+		}
-		const msi = versions[0].assets.find((version) =>
+		const msi = latest.assets.find((version) =>
 			version.name.endsWith('.msi'),
 		)?.url;
-		const mac = versions[0].assets.find((version) =>
+		const mac = latest.assets.find((version) =>
 			version.name.endsWith('.dmg'),
 		)?.url;
-		const appImage = versions[0].assets.find((version) =>
+		const appImage = latest.assets.find((version) =>
 			version.name.endsWith('.AppImage'),
 		)?.url;
-		const deb = versions[0].assets.find((version) =>
+		const deb = latest.assets.find((version) =>
 			version.name.endsWith('.deb'),
 		)?.url;
-		const rpm = versions[0].assets.find((version) =>
+		const rpm = latest.assets.find((version) =>
 			version.name.endsWith('.rpm'),
 		)?.url;

Also applies to: 121-125

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/site/src/features/Download/index.tsx` around lines 76 - 93, The code
in packages/site/src/features/Download/index.tsx dereferences versions[0] (used
to build msi, mac, appImage, deb, rpm and later code around linkMap/links)
without guarding against an empty versions array; modify the useMemo to first
check for versions && versions.length > 0 (or use const latest = versions?.[0];
if (!latest) return { links: [], linkMap: {} }) and then use latest.assets to
compute msi, mac, appImage, deb, rpm so the component safely returns empty
defaults when there are no releases; apply the same guard where versions[0] is
used around lines 121-125.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/site/src/features/Download/index.tsx`:
- Around line 187-257: The new download copy in Download/index.tsx is hardcoded
in Text, Heading and SimpleCodeBlock content (inside the PlatformDownloads calls
for macOS and Linux and the top paragraph) and must be moved into i18n resources
and rendered via the existing i18n helpers (useTranslation/t or <Trans>) instead
of literal English; locate the PlatformDownloads usages and replace the
hardcoded strings (the top Text "Deepink is widely available...", the macOS
block content around Homebrew and the install command, and the Linux block
content around Flatpak and its commands) with translation keys, add those keys
to the locale JSON files, and render any inline links/Code blocks using <Trans>
or t() with components/values so markup (links, <Code>, <SimpleCodeBlock>) is
preserved while making the text localizable.

In `@packages/site/src/features/Download/SimpleCodeBlock.tsx`:
- Around line 10-12: The IconButton wrapping the CodeBlock.CopyIndicator lacks
an accessible name; update the IconButton component (in SimpleCodeBlock.tsx) to
include an explicit accessible label (e.g., aria-label or aria-label={t('copy
code')} if using i18n) such as aria-label="Copy code" (or a localized
equivalent) so assistive technologies convey the button’s purpose; ensure the
prop is added to the IconButton component that wraps CodeBlock.CopyIndicator.

---

Outside diff comments:
In `@packages/site/src/features/Download/index.tsx`:
- Around line 76-93: The code in packages/site/src/features/Download/index.tsx
dereferences versions[0] (used to build msi, mac, appImage, deb, rpm and later
code around linkMap/links) without guarding against an empty versions array;
modify the useMemo to first check for versions && versions.length > 0 (or use
const latest = versions?.[0]; if (!latest) return { links: [], linkMap: {} })
and then use latest.assets to compute msi, mac, appImage, deb, rpm so the
component safely returns empty defaults when there are no releases; apply the
same guard where versions[0] is used around lines 121-125.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 47e41f66-3804-4420-a61e-a70fc653da8d

📥 Commits

Reviewing files that changed from the base of the PR and between 768ff47 and 07b0606.

📒 Files selected for processing (4)
  • packages/site/src/features/Download/PlatformDownloads.tsx
  • packages/site/src/features/Download/SimpleCodeBlock.tsx
  • packages/site/src/features/Download/index.tsx
  • words.txt
✅ Files skipped from review due to trivial changes (1)
  • words.txt

Comment thread packages/site/src/features/Download/index.tsx Outdated
Comment thread packages/site/src/features/Download/SimpleCodeBlock.tsx
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Cloudflare Pages Deployment

Event Name: pull_request
Environment: preview
Project: deepink
Built with commit: 1f786e7
Preview URL: https://14c25be3.deepink.pages.dev
Branch Preview URL: https://287-publish-flatpak-repo.deepink.pages.dev

Wrangler Output

⛅️ wrangler 4.88.0
───────────────────
Uploading... (109/201)
Uploading... (139/201)
Uploading... (170/201)
Uploading... (201/201)
✨ Success! Uploaded 92 files (109 already uploaded) (2.30 sec)

🌎 Deploying...
✨ Deployment complete! Take a peek over at https://14c25be3.deepink.pages.dev
✨ Deployment alias URL: https://287-publish-flatpak-repo.deepink.pages.dev

@vitonsky vitonsky changed the title build: publish flatpak repo docs: add instructions for install with package managers May 6, 2026
@vitonsky vitonsky merged commit c7d6aaf into master May 6, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish flatpak repo Mention the alternative install methods

1 participant