Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd: Drop unit files #586

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = ["Colin Walters <[email protected]>"]
edition = "2021"
rust-version = "1.70.0"

include = ["src", "LICENSE", "Makefile", "systemd"]
include = ["src", "LICENSE", "Makefile"]

# See https://github.com/coreos/cargo-vendor-filterer
[package.metadata.vendor-filter]
Expand Down
12 changes: 2 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ ifeq ($(CONTAINER_RUNTIME), podman)
IMAGE_PREFIX = localhost/
endif

units = $(addprefix systemd/, bootupd.service bootupd.socket)

.PHONY: all
all: $(units)
all:
cargo build ${CARGO_ARGS}
ln -f target/${PROFILE}/bootupd target/${PROFILE}/bootupctl

Expand All @@ -33,17 +31,11 @@ create-build-container:
build-in-container: create-build-container
${CONTAINER_RUNTIME} run -ti --rm -v .:/srv/bootupd:z ${IMAGE_PREFIX}${IMAGE_NAME} make

.PHONY: install-units
install-units: $(units)
for unit in $(units); do install -D -m 644 --target-directory=$(DESTDIR)$(PREFIX)/lib/systemd/system/ $$unit; done

.PHONY: install
install: install-units
install:
mkdir -p "${DESTDIR}$(PREFIX)/bin" "${DESTDIR}$(LIBEXECDIR)"
install -D -t "${DESTDIR}$(LIBEXECDIR)" target/${PROFILE}/bootupd
ln -f ${DESTDIR}$(LIBEXECDIR)/bootupd ${DESTDIR}$(PREFIX)/bin/bootupctl
install -d "${DESTDIR}$(PREFIX)/lib/systemd/system/multi-user.target.wants"
ln -s ../bootupd.socket "${DESTDIR}$(PREFIX)/lib/systemd/system/multi-user.target.wants"

install-grub-static:
install -m 644 -D -t ${DESTDIR}$(PREFIX)/lib/bootupd/grub2-static src/grub2/*.cfg
Expand Down
13 changes: 1 addition & 12 deletions contrib/packaging/bootupd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ BuildRequires: cargo
# For autosetup -Sgit
BuildRequires: git
BuildRequires: openssl-devel
BuildRequires: systemd-devel

%description
%{summary}
Expand All @@ -30,7 +29,6 @@ BuildRequires: systemd-devel
%doc README.md
%{_bindir}/bootupctl
%{_libexecdir}/bootupd
%{_unitdir}/*
%{_prefix}/lib/bootupd/grub2-static/

%prep
Expand All @@ -52,15 +50,6 @@ cargo build --release
%make_install INSTALL="install -p -c"
make install-grub-static DESTDIR=%{?buildroot} INSTALL="%{__install} -p"

%post -n %{crate}
%systemd_post bootupd.service bootupd.socket

%preun -n %{crate}
%systemd_preun bootupd.service bootupd.socket

%postun -n %{crate}
%systemd_postun bootupd.service bootupd.socket

%changelog
* Tue Oct 18 2022 Colin Walters <[email protected]> - 0.2.8-3
- Dummy changelog
- Dummy changelog
26 changes: 0 additions & 26 deletions systemd/bootupd.service

This file was deleted.

6 changes: 0 additions & 6 deletions systemd/bootupd.socket

This file was deleted.

1 change: 0 additions & 1 deletion tests/e2e-update/e2e-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ if test -z "${COSA_DIR:-}"; then
fi
# Validate source directory
bootupd_git=$(cd ${dn} && git rev-parse --show-toplevel)
test -f ${bootupd_git}/systemd/bootupd.service

testtmp=$(mktemp -d -p /var/tmp bootupd-e2e.XXXXXXX)
export test_tmpdir=${testtmp}
Expand Down