Skip to content

Flatten repo + fix Makefile/CI for clean packaging#1

Merged
mstrofnone merged 4 commits into
mainfrom
fix/flatten-and-package-readiness
May 6, 2026
Merged

Flatten repo + fix Makefile/CI for clean packaging#1
mstrofnone merged 4 commits into
mainfrom
fix/flatten-and-package-readiness

Conversation

@mstrofnone

Copy link
Copy Markdown
Owner

Summary

Audit pass that gets the repo to a state where git clone && make produces a valid namecoind.s9pk and CI builds it deterministically.

Changes

1. Flatten directory structure

Moved every package file from the nested namecoin-core-startos/ directory up to the repo root. This matches the convention used by every other *-startos wrapper repo (bitcoin-core-startos, albyhub-startos, synapse-startos, etc.) and removes the need for defaults.run.working-directory: workarounds in CI. Removed the duplicate inner LICENSE and inner .github/workflows/ (both identical to the top-level copies).

2. Fix Makefile

  • make now actually builds the s9pk. Previously the default target was verify, which depended on a file ($(S9PK_PATH)) computed via find at parse time — meaning git clone && make always failed because the file didn't exist yet.
  • Replaced the broken S9PK_PATH lookup with a deterministic S9PK := $(PKG_ID).s9pk.
  • Made asset and script dependencies explicit so changes invalidate the build properly.
  • Tightened clean to remove the s9pk by name.

3. Fix CI workflow (.github/workflows/build-s9pk.yml)

Replaced the ad-hoc StartOS ISO-mining + silent echo \"start-sdk not available, skipping pack step\" fallback with a clean three-stage pipeline:

  1. build-sdk — builds the existing Dockerfile.sdk image once and uploads it as an artifact.
  2. build (matrix x86_64 / aarch64) — runs make x86 and make arm so CI and local builds use the same path. aarch64 builds via QEMU.
  3. pack — loads both arch tarballs and the SDK image, runs start-sdk pack and start-sdk verify inside the SDK container, then attaches the s9pk to GitHub releases on tag push.

Also passes actionlint cleanly.

4. Add .dockerignore

Prevents docker-images/, .git, README.md, etc. from being baked into the build context.

5. README updates

  • Calls out that this targets StartOS v0.3.5.x specifically; v0.4.0 is a rewrite (TypeScript SDK + LXC) that would require a separate branch/port.
  • Fixes the clone URL placeholder to the real repo.

Verification

  • manifest.yaml has all required v0.3.5.x fields ✅
  • make -n cleanly resolves the dependency chain ✅
  • actionlint .github/workflows/build-s9pk.yml is clean ✅
  • Two architecture story is consistent (Makefile, CI matrix, README) ✅

Out of scope

Local end-to-end build wasn't run (Docker daemon not running on this box and a full Namecoin Core compile takes 15-30 min). Recommend triggering the workflow on this branch via workflow_dispatch to confirm the CI side, then tagging v30.2.0.2 to test the release-attach path.

mstrofnone added 3 commits May 6, 2026 08:12
Every Start9 service-wrapper repo (bitcoin-core-startos, albyhub-startos,
synapse-startos, etc.) places package files at the repo root. The previous
nested namecoin-core-startos/ directory broke that convention and forced
the CI workflow to work-around with 'working-directory:'.

Removed the duplicate inner LICENSE and inner .github/workflows/ that
were identical to the top-level copies. Kept the inner LICENSE's more
project-style copyright line.
Makefile:
- Make 'all' the default and have it actually build the s9pk
  (previously 'verify' was default and depended on a file produced
  only by a prior successful build, so 'git clone && make' failed)
- Drop the broken $(S9PK_PATH) shell-find at parse time and use a
  simple PKG_ID-based path; verify now runs against the actual file
- Spell out asset and script dependencies explicitly so changing
  one of them invalidates the build
- Tighten 'clean' to remove the s9pk by name

CI workflow (.github/workflows/build-s9pk.yml):
- Replace ad-hoc ISO-mining and silent 'skip pack' fallback with a
  three-stage pipeline:
    1) build-sdk: build start-sdk image from existing Dockerfile.sdk
    2) build (matrix x86_64/aarch64): build per-arch Docker tarballs
       via 'make x86' / 'make arm' so CI and local builds use the
       same path; aarch64 uses QEMU
    3) pack: load both arch tarballs + SDK image, run 'start-sdk
       pack' inside the SDK container, then 'start-sdk verify'
- Drop 'defaults.run.working-directory' (no longer needed after
  flatten)
- Run 'docker load' + smoke test on the x86_64 image
- Attach the s9pk to GitHub releases automatically on tag push
- Pass actionlint cleanly

.dockerignore:
- Add to prevent baking docker-images/, .git, README/etc. into the
  build context

.gitignore:
- Add sdk.tar.gz and *.tar.gz from the new SDK artifact pipeline

README.md:
- Note that this targets StartOS v0.3.5.x specifically; v0.4.0 is a
  rewrite and would require a separate branch
- Fix the clone URL placeholder to the real repo
- Document that CI uses Dockerfile.sdk to extract start-sdk
start-sdk shells out to 'git' to compute a content hash for the s9pk.
When the workspace is bind-mounted into the SDK container the file
ownership doesn't match the container user, so git refuses with
'detected dubious ownership' and start-sdk fails with 'Could not get
hash'. Mark /workspace as a safe.directory before invoking start-sdk
in both the pack and verify steps.
@mstrofnone mstrofnone merged commit 61987d0 into main May 6, 2026
1 check passed
mstrofnone pushed a commit that referenced this pull request May 27, 2026
Port to StartOS 0.4 (TypeScript SDK, start-sdk 1.5.3)
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.

1 participant