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

[WiP] Drop /home folders and files with systemd #1098

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
d /var/backups 0755 - - -
d /var/lib/misc 0755 - - -
d /var/local 0755 - - -
d ROOTHOME 0700 root root -
5 changes: 5 additions & 0 deletions meta-lmp-base/recipes-core/base-files/base-files_%.bbappend
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ SRC_URI += "file://tmpfiles.conf"
do_install:append () {
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
install -D -m 0644 ${WORKDIR}/tmpfiles.conf ${D}${nonarch_libdir}/tmpfiles.d/${PN}.conf
sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${nonarch_libdir}/tmpfiles.d/${PN}.conf
(
# Remove /var stuff
cd ${D}${localstatedir};
Expand All @@ -16,6 +17,10 @@ do_install:append () {
rmdir -v ${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log;
# symlinks
rm -v run lock;
# Remove /home stuff
cd ${D}
roothomedir=$(echo ${ROOT_HOME} | sed 's#^/##')
rmdir -v --parents ${roothomedir};
)
fi
}
Expand Down