Skip to content

build: Add DISABLE_DOCS to skip man pages - #2582

Merged
Johan-Liebert1 merged 1 commit into
bootc-dev:mainfrom
fcuny:disable-docs
Oct 23, 2026
Merged

Johan-Liebert1 merged 1 commit into
bootc-dev:mainfrom
fcuny:disable-docs

Conversation

@fcuny

@fcuny fcuny commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

When bootc is built from source and its make install tree is copied into a minimized image, the man pages end up in an image that excludes documentation everywhere else: Fedora container images set tsflags=nodocs for dnf, Ubuntu minimized images exclude /usr/share/man for dpkg. A distro package goes through that filter, a source build doesn't, so the Makefile is where that choice has to be made.

Setting DISABLE_DOCS=1 skips generating and installing the man pages:

make install DISABLE_DOCS=1 DESTDIR=...

This also skips the extra docgen-featured build of bootc, and the dependency on go-md2man. The name and check follow skopeo's Makefile, which has the same switch. The default is unchanged, so bootc.spec and distro packaging aren't affected. Files under /usr/share/doc/bootc are still installed: they're base image configuration, not documentation.

While there, this adds the missing section 7 to the man page directories listed in the packaging docs.

Moving the man pages to a separate install target was considered and discarded: the man pages have to be built before the binary, so that the production build overwrites the docgen one in target/release (see e747216).

Testing

In a Fedora 44 (aarch64) VM with GNU Make 4.4.1, from a clean target/:

  • make install DISABLE_DOCS=1 DESTDIR=... with go-md2man uninstalled: succeeds, no target/man is created, 27 files installed.
  • make install DESTDIR=... with go-md2man reinstalled: 102 files installed. The difference is exactly the 75 man pages under share/man/man{5,7,8}.
  • The installed bootc binaries are byte-identical between the two, so the production build still ends up last in target/release when the man pages are built.

Assisted-by: AI. I reviewed the change and the commit message, and ran the test above.

When bootc is built from source and its `make install` tree is copied
into a minimized image, the man pages end up in an image that excludes
documentation everywhere else: Fedora container images set
`tsflags=nodocs` for dnf, Ubuntu minimized images exclude
/usr/share/man for dpkg. A distro package goes through that filter, a
source build doesn't, so the Makefile is where that choice has to be
made.

Setting DISABLE_DOCS=1 skips generating and installing the man pages.
This also skips the extra docgen-featured build of bootc, and the
dependency on go-md2man. The name and check follow skopeo's Makefile,
which has the same switch. The default is unchanged, so packaging
isn't affected. Files under /usr/share/doc/bootc are still installed:
they're base image configuration, not documentation.

While there, add the missing section 7 to the man page directories
listed in the packaging docs.

Moving the man pages to a separate install target was considered and
discarded: the man pages have to be built before the binary, so that
the production build overwrites the docgen one in target/release (see
e747216, "cli: Fix rhsm feature propagation and manpage build order").

Assisted-by: AI
Signed-off-by: Franck Cuny <franck@fcuny.net>
@github-actions github-actions Bot added the area/documentation Updates to the documentation label Oct 20, 2026
@bootc-bot
bootc-bot Bot requested a review from henrywang October 20, 2026 02:06
Comment thread Makefile
@Johan-Liebert1
Johan-Liebert1 merged commit 298b404 into bootc-dev:main Oct 23, 2026
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Updates to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants