-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We now fork storage-init as a systemd unit. early systemd-udev responsibility is now back under the control of systemd. early switch-root is now back under the control of systemd. logging is now back under the control of systemd. Signed-off-by: Eric Curtin <[email protected]>
- Loading branch information
1 parent
29ff844
commit 7b4d3e0
Showing
10 changed files
with
100 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,9 @@ URL: https://github.com/containers/initoverlayfs | |
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz | ||
|
||
BuildRequires: gcc | ||
Recommends: erofs-utils | ||
Recommends: lz4 | ||
Recommends: gzip | ||
Requires: erofs-utils | ||
Requires: dracut | ||
|
||
%global debug_package %{nil} | ||
|
@@ -26,16 +26,22 @@ gcc ${RPM_OPT_FLAGS} storage-init.c -o storage-init | |
|
||
%install | ||
install -D -m755 bin/initoverlayfs-install ${RPM_BUILD_ROOT}/%{_bindir}/initoverlayfs-install | ||
install -D -m755 storage-init ${RPM_BUILD_ROOT}/%{_prefix}/sbin/storage-init | ||
install -D -m755 lib/dracut/modules.d/81initoverlayfs/module-setup.sh $RPM_BUILD_ROOT/%{_prefix}/lib/dracut/modules.d/81initoverlayfs/module-setup.sh | ||
install -D -m755 storage-init ${RPM_BUILD_ROOT}/%{_sbindir}/storage-init | ||
install -D -m755 lib/dracut/modules.d/81initoverlayfs/module-setup.sh ${RPM_BUILD_ROOT}/%{_prefix}/lib/dracut/modules.d/81initoverlayfs/module-setup.sh | ||
install -D -m644 lib/systemd/system/pre-initoverlayfs.target ${RPM_BUILD_ROOT}/%{_prefix}/lib/systemd/system/pre-initoverlayfs.target | ||
install -D -m644 lib/systemd/system/pre-initoverlayfs.service ${RPM_BUILD_ROOT}/%{_prefix}/lib/systemd/system/pre-initoverlayfs.service | ||
install -D -m644 lib/systemd/system/pre-initoverlayfs-switch-root.service ${RPM_BUILD_ROOT}/%{_prefix}/lib/systemd/system/pre-initoverlayfs-switch-root.service | ||
|
||
%files | ||
%license LICENSE | ||
%doc README.md | ||
%attr(0755,root,root) | ||
%{_bindir}/initoverlayfs-install | ||
%{_prefix}/sbin/storage-init | ||
%{_sbindir}/storage-init | ||
%{_prefix}/lib/dracut/modules.d/81initoverlayfs/ | ||
%{_prefix}/lib/systemd/system/pre-initoverlayfs.target | ||
%{_prefix}/lib/systemd/system/pre-initoverlayfs.service | ||
%{_prefix}/lib/systemd/system/pre-initoverlayfs-switch-root.service | ||
|
||
%changelog | ||
* Thu Dec 14 2023 Stephen Smoogen <[email protected]> - 0.99-1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[Unit] | ||
Description=Switch Root pre-initoverlayfs | ||
AssertPathExists=/etc/initrd-release | ||
DefaultDependencies=no | ||
ConditionPathExists=/etc/initrd-release | ||
AllowIsolate=yes | ||
OnFailure=emergency.target | ||
OnFailureJobMode=replace-irreversibly | ||
Before=sysinit.target pre-initoverlayfs.target | ||
After=systemd-journald.service pre-initoverlayfs.service | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=systemctl --no-block switch-root /initoverlayfs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[Unit] | ||
Description=pre-initoverlayfs initialization | ||
AssertPathExists=/etc/initrd-release | ||
DefaultDependencies=no | ||
ConditionPathExists=/etc/initrd-release | ||
OnFailure=emergency.target | ||
OnFailureJobMode=replace-irreversibly | ||
Before=sysinit.target pre-initoverlayfs.target | ||
After=systemd-journald.service | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/sbin/storage-init | ||
StandardInput=null | ||
StandardOutput=journal+console | ||
StandardError=journal+console | ||
RemainAfterExit=yes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=pre-initoverlayfs Default Target | ||
OnFailure=emergency.target | ||
OnFailureJobMode=replace-irreversibly | ||
AssertPathExists=/etc/initrd-release | ||
Requires=basic.target | ||
After=pre-initoverlayfs.service rescue.target | ||
AllowIsolate=yes | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
REL="$(git tag | tail -1)" | ||
mkdir -p "$HOME/rpmbuild/SOURCES/" | ||
git archive -o "$HOME/rpmbuild/SOURCES/initoverlayfs-$REL.tar.gz" --prefix "initoverlayfs-$REL/" HEAD | ||
./build-scripts/create-spec.sh | ||
rpmbuild_output=$(rpmbuild -bb initoverlayfs.spec 2>&1) | ||
rpm_to_install=$(echo "$rpmbuild_output" | grep "Wrote:" | awk '{print $2}') | ||
if rpm -Uvh "$rpm_to_install"; then | ||
echo "$rpmbuild_output" | ||
fi | ||
|
||
initoverlayfs-install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters