mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
eb506c759c
Add API to write a deployment state to `/run/ostree/staged-deployment`, along with a systemd service which runs at shutdown time. This is a big change to the ostree model for hosts, but it closes a longstanding set of bugs; many, many people have hit the "losing changes in /etc" problem. It also avoids the other problem of racing with programs that modify `/etc` such as LVM backups: https://bugzilla.redhat.com/show_bug.cgi?id=1365297 We need this in particular to go to a full-on model for automatically updated host systems where (like a dual-partition model) everything is fully prepared and the reboot can be taken asynchronously. Closes: https://github.com/ostreedev/ostree/issues/545 Closes: #1503 Approved by: jlebon
72 lines
2.6 KiB
Plaintext
72 lines
2.6 KiB
Plaintext
# Makefile for boot module
|
|
#
|
|
# Copyright (C) 2013 Colin Walters <walters@verbum.org>
|
|
#
|
|
# SPDX-License-Identifier: LGPL-2.0+
|
|
#
|
|
# This library is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
# License as published by the Free Software Foundation; either
|
|
# version 2 of the License, or (at your option) any later version.
|
|
#
|
|
# This library is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
# Lesser General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
# License along with this library; if not, write to the
|
|
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
# Boston, MA 02111-1307, USA.
|
|
|
|
if BUILDOPT_DRACUT
|
|
# Not using $(libdir) here is intentional, dracut modules go in prefix/lib
|
|
dracutmoddir = $(prefix)/lib/dracut/modules.d/98ostree
|
|
dracutmod_SCRIPTS = src/boot/dracut/module-setup.sh
|
|
endif
|
|
if BUILDOPT_DRACUT_CONF
|
|
dracutconfdir = $(sysconfdir)/dracut.conf.d
|
|
dracutconf_DATA = src/boot/dracut/ostree.conf
|
|
endif
|
|
|
|
if BUILDOPT_MKINITCPIO
|
|
mkinitcpioinstalldir = $(prefix)/lib/initcpio/install
|
|
mkinitcpioinstall_SCRIPTS = src/boot/mkinitcpio/ostree
|
|
|
|
mkinitcpioconfdir = $(sysconfdir)
|
|
mkinitcpioconf_DATA = src/boot/mkinitcpio/ostree-mkinitcpio.conf
|
|
endif
|
|
|
|
if BUILDOPT_SYSTEMD
|
|
systemdsystemunit_DATA = src/boot/ostree-prepare-root.service \
|
|
src/boot/ostree-remount.service src/boot/ostree-finalize-staged.service
|
|
systemdtmpfilesdir = $(prefix)/lib/tmpfiles.d
|
|
dist_systemdtmpfiles_DATA = src/boot/ostree-tmpfiles.conf
|
|
|
|
# Allow the distcheck install under $prefix test to pass
|
|
AM_DISTCHECK_CONFIGURE_FLAGS += --with-systemdsystemunitdir='$${libdir}/systemd/system'
|
|
endif
|
|
|
|
if !BUILDOPT_BUILTIN_GRUB2_MKCONFIG
|
|
# We're using the system grub2-mkconfig generator
|
|
pkglibexec_SCRIPTS += src/boot/grub2/grub2-15_ostree
|
|
install-grub2-config-hook:
|
|
mkdir -p $(DESTDIR)$(grub2configdir)
|
|
ln -sf $(pkglibexecdir)/grub2-15_ostree $(DESTDIR)$(grub2configdir)/15_ostree
|
|
grub2configdir = $(sysconfdir)/grub.d
|
|
INSTALL_DATA_HOOKS += install-grub2-config-hook
|
|
else
|
|
# We're using our internal generator
|
|
ostree_boot_SCRIPTS = src/boot/grub2/ostree-grub-generator
|
|
endif
|
|
|
|
EXTRA_DIST += src/boot/dracut/module-setup.sh \
|
|
src/boot/dracut/ostree.conf \
|
|
src/boot/mkinitcpio/ostree \
|
|
src/boot/ostree-prepare-root.service \
|
|
src/boot/ostree-remount.service \
|
|
src/boot/ostree-finalize-staged.service \
|
|
src/boot/grub2/grub2-15_ostree \
|
|
src/boot/grub2/ostree-grub-generator \
|
|
$(NULL)
|