diff --git a/.spellcheck-en-custom.txt b/.spellcheck-en-custom.txt index 64b9268..ae1a77c 100644 --- a/.spellcheck-en-custom.txt +++ b/.spellcheck-en-custom.txt @@ -14,7 +14,6 @@ json osbuild qcow UEFI -datadir copr SBOM SBOMs @@ -36,3 +35,4 @@ hyperscalers weldr libc url +dir diff --git a/README.md b/README.md index 377e937..563134b 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,7 @@ to the installed image but are not used at build time to install third-party packages. To change repositories during image build time the command line options -`--datadir`, `--extra-repo` and `--force-repo` can be used. The repositories +`--data-dir`, `--extra-repo` and `--force-repo` can be used. The repositories there will only added during build time and will not be available in the installed system (use the above blueprint options if that the goal). @@ -207,9 +207,9 @@ Note that both options are targeting advanced users/use-cases and when used wrongly can result in failing image builds or non-booting systems. -## Using the datadir switch +## Using the data-dir switch -When using the `--datadir` flag `image-builder` will look into +When using the `--data-dir` flag `image-builder` will look into the /repositories directory for a file called .json that contains the repositories for the . @@ -246,9 +246,9 @@ A: The osbuild binary is used to actually build the images but beyond that Q: Can I have custom repository files? A: Sure! The repositories are encoded in json in "-.json", - files, e.g. "fedora-41.json". See these [examples](https://github.com/osbuild/images/tree/main/data/repositories). Use the "--datadir" switch and + files, e.g. "fedora-41.json". See these [examples](https://github.com/osbuild/images/tree/main/data/repositories). Use the "--data-dir" switch and place them under "repositories/name-version.json", e.g. for: - "--datadir ~/my-project --distro foo-1" a json file must be put under + "--data-dir ~/my-project --distro foo-1" a json file must be put under "~/my-project/repositories/foo-1.json. Q: What is the relation to [bootc-image-builder](https://github.com/osbuild/bootc-image-builder)? diff --git a/cmd/image-builder/main.go b/cmd/image-builder/main.go index 00c84b3..c53f420 100644 --- a/cmd/image-builder/main.go +++ b/cmd/image-builder/main.go @@ -41,7 +41,7 @@ func cmdListImages(cmd *cobra.Command, args []string) error { if err != nil { return err } - dataDir, err := cmd.Flags().GetString("datadir") + dataDir, err := cmd.Flags().GetString("data-dir") if err != nil { return err } @@ -79,7 +79,7 @@ func ostreeImageOptions(cmd *cobra.Command) (*ostree.ImageOptions, error) { } func cmdManifestWrapper(pbar progress.ProgressBar, cmd *cobra.Command, args []string, w io.Writer, archChecker func(string) error) (*imagefilter.Result, error) { - dataDir, err := cmd.Flags().GetString("datadir") + dataDir, err := cmd.Flags().GetString("data-dir") if err != nil { return nil, err } @@ -284,7 +284,7 @@ func cmdBuild(cmd *cobra.Command, args []string) error { func cmdDescribeImg(cmd *cobra.Command, args []string) error { // XXX: boilderplate identical to cmdManifest() above - dataDir, err := cmd.Flags().GetString("datadir") + dataDir, err := cmd.Flags().GetString("data-dir") if err != nil { return err } @@ -327,7 +327,7 @@ Image-builder builds operating system images for a range of predefined operating systems like Fedora, CentOS and RHEL with easy customizations support.`, SilenceErrors: true, } - rootCmd.PersistentFlags().String("datadir", "", `Override the default data directory for e.g. custom repositories/*.json data`) + rootCmd.PersistentFlags().String("data-dir", "", `Override the default data directory for e.g. custom repositories/*.json data`) rootCmd.PersistentFlags().StringArray("extra-repo", nil, `Add an extra repository during build (will *not* be gpg checked and not be part of the final image)`) rootCmd.PersistentFlags().StringArray("force-repo", nil, `Override the base repositories during build (these will not be part of the final image)`) rootCmd.PersistentFlags().String("output-dir", "", `Put output into the specified directory`)