Commit graph

333 commits

Author SHA1 Message Date
Simon de Vlieger
a31440a39d specfile: absolute Source0
Use a Source0 that works directly instead of having to go through
automation to build.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-28 11:11:49 +00:00
Simon de Vlieger
128509da2e specfile: prune unused buildrequires
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-28 11:11:49 +00:00
Simon de Vlieger
e7b6a0eee1 specfile: drop excludearch armv7hl
This architecture was retired in Fedora 37.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-28 11:11:49 +00:00
Simon de Vlieger
de9ec9d912 specfile: remove unused conditions
These are leftovers and not currently used in the specfile.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-28 11:11:49 +00:00
Michael Vogt
279fa163d6 README: add FAQ about relation between bib and ibcli
This commit adds a small FAQ entry to explain the relation between
`bib` and `ibcli`.

Thanks to Jonathan Lebon for the suggesiton.

Closes: https://github.com/osbuild/image-builder-cli/issues/89
2025-01-28 11:03:16 +00:00
Michael Vogt
98e4bebcfa image-builder: drop internal manifestgen in favor of images
This commit drops the internal `manifestgen` package in favor
of using the version in `images` now that
https://github.com/osbuild/images/pull/1153 is merged.
2025-01-27 10:14:53 +00:00
dependabot[bot]
cf890c7297 build(deps): bump github.com/osbuild/images in the go-deps group
Bumps the go-deps group with 1 update: [github.com/osbuild/images](https://github.com/osbuild/images).


Updates `github.com/osbuild/images` from 0.111.1-0.20250124075826-58bc61d3c5d9 to 0.112.0
- [Release notes](https://github.com/osbuild/images/releases)
- [Commits](https://github.com/osbuild/images/commits/v0.112.0)

---
updated-dependencies:
- dependency-name: github.com/osbuild/images
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-27 08:51:34 +00:00
Ondřej Budai
5d1be8bbb1 cmd/image-builder: fix typos in cobra descs 2025-01-27 08:46:32 +00:00
Simon de Vlieger
cfe8f7c289 test: switch to platform.machine
For some reason on a bunch of my systems `platform.processor()` always
returns an empty string. `platform.machine()` consistently works on
those systems.

This closes #95.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-27 08:32:33 +00:00
Michael Vogt
222d42dc1c test: consolidate the build argument tests into a single table
This commit puts the build argument tests into a single table to
cosolidate them a bit.
2025-01-25 11:08:01 +00:00
Michael Vogt
a9bd51338e github: run tests inside a fedora container
Running the tests inside fedora means we get much more meaningful
results as we will have all the required packaes and there will
be no need to skip tests.
2025-01-25 11:05:05 +00:00
Florian Schüller
b4815631a3 cmd/image-builder/main: fix typo in --filter help 2025-01-24 14:05:17 +00:00
Florian Schüller
3f881601fc cmd/image-builder/main: improve wording of --blueprint help
When reading `--blueprint string`, I briefly thought it might
also be possible to put a whole blueprint content as string
into image-builder-cli argument.
This wording should avoid misunderstandings.
2025-01-24 14:00:54 +00:00
Simon de Vlieger
c1572905fe deps: update images
Update images to understand the `main` of `osbuild` that we integration
test against.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-24 10:00:07 +00:00
schutzbot
8364c5e745 Post release version bump
[skip ci]
2025-01-22 08:18:19 +00:00
Florian Schüller
f10766506d README: document required dependency
As a dependency of `images` we also need `gpgme-devel` here,
if we compile without `containers_image_openpgp`.
2025-01-21 14:20:18 +00:00
schutzbot
54d9ab47d3 Post release version bump
[skip ci]
2025-01-21 10:45:07 +00:00
Simon de Vlieger
ffb3ca0b76 packit: explicitly enable the GOPROXY
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-21 10:38:20 +00:00
Simon de Vlieger
c009b8ad92 spec: use go-vendor-tools to generate license
Use go-vendor-tools to generate the license identifiers for our vendored
code. This initial commit does not yet apply the rest of go-vendor-tools
abilities to manage the vendoring itself.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-21 10:38:20 +00:00
schutzbot
3b21375460 Post release version bump
[skip ci]
2025-01-20 20:39:17 +00:00
Florian Schüller
878cc5cacf Makefile: Enhance and improve help
Enhance help for undocumented targets and
improve developer usability by leveraging
inline comments, like in the other repos.
2025-01-20 18:22:44 +00:00
Simon de Vlieger
c136684426 README: mention sbom/manifest
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-20 15:42:21 +00:00
Simon de Vlieger
ebba957fad test: add combi test sbom/manifest
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-20 15:42:21 +00:00
Simon de Vlieger
613f56e7d2 image-builder: slight cleanup
Remove all slice operations.

Co-authored-by: Michael Vogt <michael.vogt@gmail.com>
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-20 15:42:21 +00:00
Simon de Vlieger
d1fe1f9df7 test: update container test args
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-20 15:42:21 +00:00
Simon de Vlieger
585d349d0f image-builder: --extra-artifacts split
Split out `--extra-artifacts` into `--with-sbom` and `--with-manifest`.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-20 15:42:21 +00:00
Simon de Vlieger
ee38c45122 image-builder: rename --store to --cache
Closes #77.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-20 15:42:21 +00:00
Michael Vogt
0580eb1106 main: add --extra-artifacts=manifest
This commit adds support for `--extra-artifacts=manifest`. If
that is given as part of the build an extra artifacts called
`<img-name>.osbuild-manifest.json` will be created in the
output directory.

Closes: https://github.com/osbuild/image-builder-cli/issues/42
2025-01-20 14:12:30 +00:00
Michael Vogt
c4357b3bfa build: introduce buildOptions 2025-01-20 14:12:30 +00:00
Simon de Vlieger
94afe7b150 test: use image-builder-test as a name
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-20 13:32:25 +00:00
Simon de Vlieger
c7b8ee9af0 HACKING: drop -cli
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-20 13:32:25 +00:00
Simon de Vlieger
efe3aeba45 spec: update descriptions
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-20 13:32:25 +00:00
Simon de Vlieger
94f7a6fc1f makefile: use -cli archive names
The Go macros have a bunch of expectations about package names and
archive names. Let's keep the archive names with `-cli` in them to
appease them.

These can only be dropped after we change repositories around and thus
change the `goipath`; after which these can drop their `-cli`.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-20 13:32:25 +00:00
Simon de Vlieger
37791d3c76 readme: refer to new COPR
Refer to a COPR by the new `image-builder` name.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-20 13:32:25 +00:00
Simon de Vlieger
6061960689 spec: rename to image-builder
`image-builder` will be the main entrypoint into the Image Builder
stack. We will rename the repositories later on; but let's start
referring to it in its new official name.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-20 13:32:25 +00:00
Simon de Vlieger
0eb6c5e262 image-builder: newline in error message
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-20 06:55:24 +00:00
Michael Vogt
ca0c9e63bd README: document the new --extra-artifacts=sbom option
Small commit that tweaks the README to include this new option.
2025-01-19 21:57:14 +00:00
Michael Vogt
cc2d1ac692 main: add --output-dir option
This commit adds a new `--output-dir` option to override the
default output directory for the generated artifacts.

Note that this can also be used together with `manifest` when
extra artifacts (like the sbom) is requested.
2025-01-19 21:57:14 +00:00
Michael Vogt
d485bc3a44 ibcli: add new --extra-artifacts option with sbom support
This commit adds an option --extra-artifacts that can be
used to generate extra artifacts during the build or manifest
generation. Initially supported is `sbom` (but `manifest` is
planned too).

To use it run `--extra-artifacts=sbom` and it will generate
files like `centos-9-qcow2-x86_64.image-os.spdx.json` in
the output directory next to the generate runable artifact.

Closes: https://github.com/osbuild/image-builder-cli/issues/46
2025-01-19 21:57:14 +00:00
Michael Vogt
db7cad2239 main: tweak TestBuildIntegrationErrors
We do not need to pass a blueprint in this test.
2025-01-19 21:57:14 +00:00
Michael Vogt
bdb32554ff test: add new test_container_builds_image_librepo test
This commit adds a (smoke) integration test for librepo based
manifests. It needs a flanking test that also ensures that
--use-librepo really generates librepo sources.
2025-01-17 13:29:01 +00:00
Michael Vogt
687f69bb76 main: make "--use-librepo" the default
This commit switches the default to librepo. We do not have many
users yet so this is a great place to test the new librepo
functionality. It also is much more stable for fedora/centos
systems that often have flaky mirrors.

This also bumps the minimum required version of osbuild.
2025-01-17 13:29:01 +00:00
Michael Vogt
d75bb4fa0a manifestgen: make depsolve return the full dnfjson.DepsolveResult
This commit changes the signature of depsolve in `manifestgen`
to return the full `dnfjson.DepsolveResult`. This gives us
access to the sbom and also is a preparation for images PR#1142
where we will need this anyway.
2025-01-17 13:29:01 +00:00
Michael Vogt
44f27108b9 ibcli: introduce/use manifestOptions struct
This commit adds a new manifestOptions struct that is passed
to generateManifest. to cleanup the signature of generateManifest().

This can then also be used to carry a new e.g. `--rpmmd/--cachedir`
option.
2025-01-17 13:29:01 +00:00
Michael Vogt
f8ffa8a258 main: add experimental --use-librepo to support librepo downloads
This commit switches to the librepo enabled `images` library via:
```
go mod -replace github.com/osbuild/iamges=github.com/mvo5/images@librepo-sources-osbuild1974
```
which in turn needs osbuild PR#1974.

With that it then adds a new `--use-librepo` switch that will
enable librepo based downloading so that people can play with
the new backend.
2025-01-17 13:29:01 +00:00
Michael Vogt
78f62e21e2 go.mod: move to latest snapshot 2025-01-17 13:29:01 +00:00
Simon de Vlieger
2f13ed2ec7 spec: min osbuild version
Depend on a minimum osbuild version.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-17 08:58:07 +00:00
Simon de Vlieger
d36e7ba0aa spec: require osbuild extras
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-17 08:58:07 +00:00
Simon de Vlieger
d6c4bba36d spec: require osbuild-depsolve-dnf
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-17 08:58:07 +00:00
Simon de Vlieger
5b2581f15e spec: require osbuild
We can't build images without having osbuild installed.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
2025-01-17 08:58:07 +00:00