Skip to content

Butane merge v2 - #2235

Merged
prestist merged 1322 commits into
coreos:mainfrom
prestist:butane-merge-v2
Aug 10, 2026
Merged

prestist merged 1322 commits into
coreos:mainfrom
prestist:butane-merge-v2

Conversation

@prestist

@prestist prestist commented Jun 11, 2026 •

Copy link
Copy Markdown
Collaborator

The implementation is broken into six commits; reproducible via a shell script (https://gist.github.com/prestist/c3bfc2f3e2050b2d63a2ebb0f64bd066):

  1. History-preserving merge: Butane files are first moved into a butane/ subdirectory in a prep branch, then merged into Ignition via git merge --allow-unrelated-histories. This preserves full git history so git blame and git log --follow work correctly for all butane/ files.
  2. Cleanup: Butane's repo-level files are removed (go.mod, go.sum, vendor/, .github/, .copr/, linter configs) since these are now handled by Ignition's equivalents.
  3. Import path rewrite: All Go imports across ~150 files are rewritten from github.com/coreos/butane/ to github.com/coreos/ignition/v2/butane/ to work under Ignition's single Go module. Butane's unique dependencies (clarketm/json, go-systemd v22.7.0) are added to go.mod. A license header typo in Butane files is also fixed.
  4. Re-vendor: A single unified vendor/ directory replaces the two separate ones.
  5. config.Parse() integration: Ignition's config.Parse() function -- the single entry point used by all 30+ cloud providers, ignition-validate, ignition-apply, and referenced/merged configs -- is modified to try Ignition JSON first, then fall back to Butane YAML transpilation via butane/config.TranslateBytes(). On both failures, the original Ignition error is returned for backward compatibility. Unit tests cover JSON parsing, Butane YAML parsing (with and without content), invalid input, and source: local failure. The deprecated unit.Deserialize call is updated to unit.DeserializeOptions for the go-systemd v22.7.0 bump.
  6. Build and CI updates: The top-level ./build script sources butane/build to produce the butane binary and restores CGO_ENABLED=1 afterward (Butane sets it to 0, but Ignition requires cgo for libblkid). butane/build is updated to use the new module path. The ./test script adds butane/ to license header checks. The Makefile installs the butane binary. Eight errcheck lint issues in Butane code are fixed. Butane's TMT tests are removed to avoid conflicts with Ignition's TMT plan discovery.

coreosbot and others added 30 commits November 14, 2024 13:17
- Use "layout" in the context path for errors related to the layout
  entry in the boot_device  configuration.
- Add tests for those error cases.
- Refactor mirror boot_device check for s390x.

Fixes: coreos/butane#484
For fcos 1.6.0-exp & openshift 4.18.0-exp specs, expected to be based on
stable 3.5.0 spec.

See: coreos#1693
See: coreos/fedora-coreos-tracker#1708
add: Support LUKS encryption using IBM CEX secure keys on s390x
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Stablize fcos v1_6,  base v0_6, and bump all other exp to latest
prestist added 7 commits July 28, 2026 16:13
Rewrite all internal Butane import paths from github.com/coreos/butane/
to github.com/coreos/ignition/v2/butane/ so that Butane's code is part
of the single Ignition Go module. Add github.com/clarketm/json as a
new dependency required by Butane, and bump go-systemd to v22.7.0.
Also fix stray ')' in license headers across Butane files.
Teach Ignition's config parser to accept Butane YAML configs in
addition to Ignition JSON. Parse() now tries Ignition JSON first and,
on failure, attempts to transpile the input as a Butane config using
the integrated butane/ library. This allows users to provide Butane
configs directly to instances without a separate transpilation step.

Key design decisions:
- JSON is tried first for zero behavioral change on existing configs
- On both failures, the original Ignition error is returned
- source: local properly errors since FilesDir is unavailable at boot
- OpenShift variant configs produce MachineConfig YAML which fails
  Ignition parsing, as those configs go through MCO

Related: coreos/fedora-coreos-tracker#2006
- build: Source butane/build to produce butane binary, restore CGO_ENABLED=1
- butane/build: Use module path, accept VERSION from parent
- test: Add butane/ to license header check paths
- Makefile: Install butane binary to /usr/bin
- config: Add unit tests for Butane YAML parsing
- config: Use DeserializeOptions (go-systemd v22.7.0)
- butane: Fix errcheck lint issues
- butane: Remove TMT tests (conflict with ignition TMT discovery)
Remove Butane test cases that reference ErrZeroesWithShouldNotExist,
a validation that was deliberately removed from Ignition in commit
76f869a (stages/disks: Allow deleting a partition while creating
number 0). The validation was originally present in Ignition but was
removed because partition numbers are now resolved to their final
values, making the check unnecessary.

Butane's vendored copy of Ignition still had this validation, but
after merging into Ignition proper, the test cases reference the
real errors package which no longer defines this constant.
Adapt the build script to match the subcommand format introduced in
coreos#2239. The butane build is now a subcommand (./build butane) instead
of being sourced from butane/build. Add butane and butane-cross
targets to the Makefile, and add butane to the install target.

Also fix the binary-size CI workflow to use make for both PR and
base builds, since ./build now requires a subcommand argument.
Comment thread docs/release-notes.md

### Changes

- Merge Butane config transpiler into the Ignition repository; the `butane` CLI is now built from the Ignition source tree ([#2235](https://github.com/coreos/ignition/pull/2235))

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

CI is not seeing this change, overriding it for this PR. I think its not able to handle this many commits.

@prestist prestist added the skip-notes This PR does not need release notes label Jul 29, 2026
@prestist
prestist marked this pull request as ready for review July 29, 2026 17:36
@PeaceRebel

Copy link
Copy Markdown
Contributor

LGTM

@Rolv-Apneseth

Copy link
Copy Markdown
Member

Do we still need butane/build or should that file be deleted?

Otherwise it LGTM. I don't love the "On both failures, the original Ignition error is returned", but I should have brought that up for discussion during the change proposal.

Remove butane/build since the butane binary is now built via
the top-level ./build butane subcommand. Having two build paths
for the same binary is confusing and the standalone script is
no longer referenced by any CI, Makefile, or build pipeline.
@prestist

Copy link
Copy Markdown
Collaborator Author

Ah yes dead code, good catch @Rolv-Apneseth (removed). I think regarding the original ignition error being returned we can revisit that later. This is not frozen code if it becomes and issue.

@Rolv-Apneseth Rolv-Apneseth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@prestist
prestist merged commit cb94422 into coreos:main Aug 10, 2026
12 checks passed
prestist added a commit to prestist/repo-templates that referenced this pull request Aug 11, 2026
The butane repository has been archived and merged into ignition
(coreos/ignition#2235). Remove butane from all template metadata
files so the sync workflow no longer attempts to open PRs against
the archived repo.
prestist added a commit to prestist/repo-templates that referenced this pull request Aug 11, 2026
The butane repository has been archived and merged into ignition
(coreos/ignition#2235). Remove butane from all template metadata
files so the sync workflow no longer attempts to open PRs against
the archived repo.
prestist added a commit to coreos/repo-templates that referenced this pull request Aug 12, 2026
…ase scripts

Butane has been merged into the Ignition repository (coreos/ignition#2235).
Update the signing-ticket template to support multiple signing targets so
the ignition signing ticket handles both ignition-validate and butane
redistributable RPMs in a single ticket.

Remove butane from signing-ticket.yaml and tag_release.yaml since butane
releases are now part of the ignition release process.

Closes coreos/ignition#2254
@ruuda

ruuda commented Sep 3, 2026

Copy link
Copy Markdown

In https://github.com/coreos/ignition/blob/958b26570b0d54f463f87c7cf5ed8751eda7f703/butane/README.md, it now says “This repository has been archived”. That’s appropriate for the original location, but I suppose now that everything has been merged here, the readme needs to be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

override-size-check Suppress binary size check when growth is unavoidable skip-notes This PR does not need release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.