1b2a7cd90c
Right now, the `rpm-ostree cleanup` logic calls into a "public static" method of `RpmOstreeSysrootUpgrader`. That's because today, a lot of the high level "core server side" logic lived in that class. However, it's only for upgrades (well, really "generating pending deployments"). As I'm working on "livefs" which is really something different, I find it needs to interact with some of `SysrootUpgrader`'s logic. Let's introduce a "sysroot core" which is just a set of static functions taking an `OstreeSysroot*`, and then all 3 of cleanup, (upgrade|deploy) and livefs can use these. Closes: #708 Approved by: jlebon
116 lines
4.0 KiB
Plaintext
116 lines
4.0 KiB
Plaintext
dbus_built_sources = rpm-ostreed-generated.h rpm-ostreed-generated.c
|
|
|
|
# TODO: Add --c-generate-autocleanup=all once we depend on GLib 2.50+
|
|
# https://github.com/projectatomic/rpm-ostree/pull/705
|
|
rpm-ostreed-generated.h: rpm-ostreed-generated.c
|
|
rpm-ostreed-generated.c: Makefile $(top_srcdir)/src/daemon/org.projectatomic.rpmostree1.xml
|
|
$(AM_V_GEN) gdbus-codegen \
|
|
--interface-prefix org.projectatomic.rpmostree1 \
|
|
--c-namespace RPMOSTree \
|
|
--c-generate-object-manager \
|
|
--generate-c-code rpm-ostreed-generated \
|
|
--generate-docbook rpm-ostreed-generated \
|
|
$(top_srcdir)/src/daemon/org.projectatomic.rpmostree1.xml \
|
|
$(NULL)
|
|
BUILT_SOURCES += $(dbus_built_sources)
|
|
CLEANFILES += rpm-ostreed-generated-org.projectatomic.rpmostree1.OS.xml \
|
|
rpm-ostreed-generated-org.projectatomic.rpmostree1.OSExperimental.xml \
|
|
rpm-ostreed-generated-org.projectatomic.rpmostree1.Sysroot.xml \
|
|
rpm-ostreed-generated-org.projectatomic.rpmostree1.Transaction.xml \
|
|
$(NULL)
|
|
|
|
noinst_LTLIBRARIES += librpmostreed.la
|
|
nodist_librpmostreed_la_SOURCES = $(dbus_built_sources)
|
|
|
|
librpmostreed_la_SOURCES = \
|
|
src/daemon/rpmostreed-types.h \
|
|
src/daemon/rpmostreed-daemon.h \
|
|
src/daemon/rpmostreed-daemon.c \
|
|
src/daemon/rpmostreed-utils.h \
|
|
src/daemon/rpmostreed-utils.c \
|
|
src/daemon/rpmostreed-sysroot.h \
|
|
src/daemon/rpmostreed-sysroot.c \
|
|
src/daemon/rpmostree-sysroot-core.h \
|
|
src/daemon/rpmostree-sysroot-core.c \
|
|
src/daemon/rpmostree-sysroot-upgrader.h \
|
|
src/daemon/rpmostree-sysroot-upgrader.c \
|
|
src/daemon/rpmostreed-errors.h \
|
|
src/daemon/rpmostreed-errors.c \
|
|
src/daemon/rpmostreed-deployment-utils.h \
|
|
src/daemon/rpmostreed-deployment-utils.c \
|
|
src/daemon/rpmostreed-transaction.h \
|
|
src/daemon/rpmostreed-transaction.c \
|
|
src/daemon/rpmostreed-transaction-monitor.h \
|
|
src/daemon/rpmostreed-transaction-monitor.c \
|
|
src/daemon/rpmostreed-transaction-types.h \
|
|
src/daemon/rpmostreed-transaction-types.c \
|
|
src/daemon/rpmostree-package-variants.h \
|
|
src/daemon/rpmostree-package-variants.c \
|
|
src/daemon/rpmostreed-os.h \
|
|
src/daemon/rpmostreed-os.c \
|
|
src/daemon/rpmostreed-os-experimental.h \
|
|
src/daemon/rpmostreed-os-experimental.c \
|
|
$(NULL)
|
|
|
|
librpmostreed_la_CFLAGS = \
|
|
$(AM_CFLAGS) \
|
|
$(PKGDEP_RPMOSTREE_CFLAGS) \
|
|
-DG_LOG_DOMAIN=\"rpm-ostreed\" \
|
|
-I$(srcdir)/src/daemon \
|
|
-I$(srcdir)/src/lib \
|
|
-I$(srcdir)/src/libpriv \
|
|
-I$(libglnx_srcpath) \
|
|
$(NULL)
|
|
|
|
librpmostreed_la_LIBADD = \
|
|
$(PKGDEP_RPMOSTREE_LIBS) \
|
|
librpmostreepriv.la \
|
|
librpmostree-1.la \
|
|
$(CAP_LIBS)
|
|
$(NULL)
|
|
|
|
dbusconf_DATA = $(srcdir)/src/daemon/org.projectatomic.rpmostree1.conf
|
|
dbusconfdir = ${sysconfdir}/dbus-1/system.d
|
|
|
|
systemdunit_in_files = $(srcdir)/src/daemon/rpm-ostreed.service.in
|
|
systemdunit_DATA = $(systemdunit_in_files:.service.in=.service)
|
|
systemdunitdir = $(prefix)/lib/systemd/system/
|
|
if BUILDOPT_ASAN
|
|
daemon_asan_options = -e s,@SYSTEMD_ENVIRON\@,Environment=ASAN_OPTIONS=detect_leaks=false,
|
|
else
|
|
daemon_asan_options = -e /@SYSTEMD_ENVIRON\@/d
|
|
endif
|
|
$(systemdunit_DATA): Makefile
|
|
$(SED_SUBST) $(daemon_asan_options) $@.in > $@
|
|
|
|
# We keep this stub script around to have SELinux labeling work,
|
|
# plus some backwards compatibility.
|
|
libexec_SCRIPTS = rpm-ostreed
|
|
rpm-ostreed: $(srcdir)/src/daemon/rpm-ostreed-stub.sh.in Makefile
|
|
$(SED_SUBST) $< > $@.tmp && mv $@.tmp $@
|
|
|
|
install-daemon-altname-hook:
|
|
mv $(DESTDIR)$(systemdunitdir)/rpm-ostreed.service $(DESTDIR)$(systemdunitdir)/$(primaryname)d.service
|
|
ln -sf $(primaryname)d.service $(DESTDIR)$(systemdunitdir)/rpm-ostreed.service
|
|
if BUILDOPT_NEW_NAME
|
|
INSTALL_DATA_HOOKS += install-daemon-altname-hook
|
|
endif
|
|
|
|
# We don't yet rename the DBus related items
|
|
service_in_files = $(srcdir)/src/daemon/org.projectatomic.rpmostree1.service.in
|
|
service_DATA = $(service_in_files:.service.in=.service)
|
|
servicedir = $(dbusservicedir)
|
|
%.service: %.service.in Makefile
|
|
$(SED_SUBST) $@.in > $@.tmp && mv $@.tmp $@
|
|
|
|
EXTRA_DIST += \
|
|
$(dbusservice_DATA) \
|
|
$(service_in_files) \
|
|
$(systemdunit_in_files) \
|
|
$(NULL)
|
|
|
|
CLEANFILES += \
|
|
$(service_DATA) \
|
|
$(systemdunit_DATA) \
|
|
$(NULL)
|