Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,15 @@ bin: manpages
manpages:
cargo run --release --package xtask -- manpages

.PHONY: completion
completion:
mkdir -p target/completion
for shell in bash elvish fish powershell zsh; do \
Copy link
Collaborator

Choose a reason for hiding this comment

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

This list...

target/release/bootc completion $$shell > target/completion/bootc.$$shell; \
done

STORAGE_RELATIVE_PATH ?= $(shell realpath -m -s --relative-to="$(prefix)/lib/bootc/storage" /sysroot/ostree/bootc/storage)
install:
install: completion
install -D -m 0755 -t $(DESTDIR)$(prefix)/bin target/release/bootc
install -D -m 0755 -t $(DESTDIR)$(prefix)/bin target/release/system-reinstall-bootc
install -d -m 0755 $(DESTDIR)$(prefix)/lib/bootc/bound-images.d
Expand All @@ -54,6 +61,11 @@ install:
install -d $(DESTDIR)$(prefix)/lib/bootc/install
install -D -m 0644 -t $(DESTDIR)$(prefix)/share/man/man5 target/man/*.5; \
install -D -m 0644 -t $(DESTDIR)$(prefix)/share/man/man8 target/man/*.8; \
install -D -m 0644 target/completion/bootc.bash $(DESTDIR)$(prefix)/share/bash-completion/completions/bootc
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is not consistent with this list.

Copy link
Author

Choose a reason for hiding this comment

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

fixed with: eaf920e. I would rather not package elvish and powershell completions in the rpm due to lack of docs and ecosystem around it. I also never used them. I hope that's okay.

install -D -m 0644 target/completion/bootc.elvish $(DESTDIR)$(prefix)/share/elvish/lib/bootc.elv
install -D -m 0644 target/completion/bootc.fish $(DESTDIR)$(prefix)/share/fish/vendor_completions.d/bootc.fish
install -D -m 0644 target/completion/bootc.powershell $(DESTDIR)$(prefix)/share/powershell/Modules/Bootc/Bootc.psm1
install -D -m 0644 target/completion/bootc.zsh $(DESTDIR)$(prefix)/share/zsh/site-functions/_bootc
install -D -m 0644 -t $(DESTDIR)/$(prefix)/lib/systemd/system systemd/*.service systemd/*.timer systemd/*.path systemd/*.target
install -D -m 0644 -t $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/usr/lib/ostree/ baseimage/base/usr/lib/ostree/prepare-root.conf
install -d -m 755 $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/sysroot
Expand Down
12 changes: 12 additions & 0 deletions contrib/packaging/bootc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ chmod +x %{?buildroot}/%{system_reinstall_bootc_install_podman_path}
touch %{?buildroot}/%{_docdir}/bootc/baseimage/base/sysroot/.keepdir
find %{?buildroot}/%{_docdir} ! -type d -printf '%{_docdir}/%%P\n' | sort > bootcdoclist.txt

rm -f %{buildroot}/%{_prefix}/share/elvish/lib/bootc.elv
rm -f %{buildroot}/%{_prefix}/share/powershell/Modules/Bootc/Bootc.psm1

%if %{with check}
%check
if grep -qEe 'Seccomp:.*0$' /proc/self/status; then
Expand All @@ -190,6 +193,15 @@ fi
%endif
%{_unitdir}/*
%{_mandir}/man*/*bootc*
%if 0%{?rhel} >= 9
%{_datadir}/bash-completion/completions/bootc
%{_datadir}/zsh/site-functions/_bootc
%{_datadir}/fish/vendor_completions.d/bootc.fish
%else
%{bash_completions_dir}/bootc
%{zsh_completions_dir}/_bootc
%{fish_completions_dir}/bootc.fish
%endif

%files -n system-reinstall-bootc
%{_bindir}/system-reinstall-bootc
Expand Down
Loading