2013-12-22 04:41:30 +04:00
# Copyright (C) 2013 Colin Walters <walters@verbum.org>
#
# 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.
2014-01-29 23:37:44 +04:00
bin_PROGRAMS += rpm-ostree
2013-12-22 04:41:30 +04:00
2015-04-07 03:18:50 +03:00
rpm_ostree_SOURCES = src/app/main.c \
2015-04-28 04:22:58 +03:00
rpm-ostreed-generated.h \
rpm-ostreed-generated.c \
2015-04-07 03:18:50 +03:00
src/app/rpmostree-builtins.h \
src/app/rpmostree-db-builtins.h \
src/app/rpmostree-compose-builtins.h \
src/app/rpmostree-builtin-upgrade.c \
src/app/rpmostree-builtin-rollback.c \
2015-10-21 16:50:26 +03:00
src/app/rpmostree-builtin-deploy.c \
2016-08-06 16:07:56 +03:00
src/app/rpmostree-builtin-reload.c \
2015-04-07 03:18:50 +03:00
src/app/rpmostree-builtin-rebase.c \
2017-12-06 01:14:18 +03:00
src/app/rpmostree-builtin-cancel.c \
2017-02-09 01:38:49 +03:00
src/app/rpmostree-builtin-cleanup.c \
2017-02-10 20:33:08 +03:00
src/app/rpmostree-builtin-initramfs.c \
Introduce `ex livefs`
There are a few different use cases here. First, for layering new packages,
there's no good reason for us to force a reboot. Second, we want some support
for cherry-picking security updates and allowing admins to restart services. Finally,
at some point we should offer support for entirely replacing the running tree
if that's what the user wants.
Until now we've been very conservative, but there's a spectrum here. In
particular, this patch changes things so we push a rollback before we start
doing anything live. I think in practice, many use cases would be totally fine
with doing most changes live, and falling back to the rollback if something went
wrong.
This initial code drop *only* supports live layering of new packages. However,
a lot of the base infrastructure is laid for future work.
For now, this will be classified as an experimental feature, hence `ex livefs`.
Part of: https://github.com/projectatomic/rpm-ostree/issues/639
Closes: #652
Approved by: jlebon
2017-03-01 01:16:48 +03:00
src/app/rpmostree-builtin-livefs.c \
2018-02-06 22:44:48 +03:00
src/app/rpmostree-builtin-usroverlay.c \
2017-06-05 19:37:56 +03:00
src/app/rpmostree-builtin-override.c \
2017-10-04 18:20:16 +03:00
src/app/rpmostree-builtin-refresh-md.c \
2018-06-26 17:30:32 +03:00
src/app/rpmostree-builtin-reset.c \
2016-06-23 04:14:27 +03:00
src/app/rpmostree-pkg-builtins.c \
2015-04-07 03:18:50 +03:00
src/app/rpmostree-builtin-status.c \
2017-03-16 04:05:14 +03:00
src/app/rpmostree-builtin-ex.c \
2016-01-26 22:40:51 +03:00
src/app/rpmostree-builtin-container.c \
2018-02-27 23:16:28 +03:00
src/app/rpmostree-ex-builtin-commit2rojig.c \
2018-02-27 23:23:59 +03:00
src/app/rpmostree-ex-builtin-rojig2commit.c \
2015-04-07 03:18:50 +03:00
src/app/rpmostree-builtin-db.c \
2017-02-10 20:33:08 +03:00
src/app/rpmostree-builtin-start-daemon.c \
2015-04-07 03:18:50 +03:00
src/app/rpmostree-db-builtin-diff.c \
src/app/rpmostree-db-builtin-list.c \
src/app/rpmostree-db-builtin-version.c \
2015-06-13 03:19:16 +03:00
src/app/rpmostree-dbus-helpers.c \
src/app/rpmostree-dbus-helpers.h \
2016-01-26 22:40:51 +03:00
src/app/rpmostree-container-builtins.h \
src/app/rpmostree-container-builtins.c \
2017-06-05 19:37:56 +03:00
src/app/rpmostree-override-builtins.h \
src/app/rpmostree-override-builtins.c \
2015-04-19 16:36:53 +03:00
src/app/rpmostree-libbuiltin.c \
src/app/rpmostree-libbuiltin.h \
2017-07-25 19:59:56 +03:00
src/app/rpmostree-polkit-agent.c \
src/app/rpmostree-polkit-agent.h \
2017-09-25 19:05:24 +03:00
src/app/rpmostree-builtin-kargs.c \
2014-09-17 05:45:30 +04:00
$(NULL)
if BUILDOPT_COMPOSE_TOOLING
rpm_ostree_SOURCES += \
2015-04-07 03:18:50 +03:00
src/app/rpmostree-compose-builtin-tree.c \
src/app/rpmostree-builtin-compose.c \
2014-01-29 23:37:44 +04:00
$(NULL)
2014-09-17 05:45:30 +04:00
endif
2016-05-27 21:46:46 +03:00
rpm_ostree_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/app -I$(srcdir)/src/daemon \
-I$(srcdir)/src/lib -I$(srcdir)/src/libpriv -I$(libglnx_srcpath) \
2018-03-28 17:08:16 +03:00
-fvisibility=hidden -DPKGLIBDIR=\"$(pkglibdir)\" $(PKGDEP_RPMOSTREE_CFLAGS)
2016-05-27 21:46:46 +03:00
rpm_ostree_LDADD = $(PKGDEP_RPMOSTREE_LIBS) librpmostreepriv.la librpmostree-1.la librpmostreed.la
2018-08-22 18:32:54 +03:00
# -ldl: https://github.com/ostreedev/ostree/commit/1f832597fc83fda6cb8daf48c4495a9e1590774c
# -ldl: https://github.com/rust-lang/rust/issues/47714
# -lm: needed for rand crate in debug mode
rpm_ostree_LDADD += -ldl -lm
2014-01-16 16:26:54 +04:00
2013-12-22 04:41:30 +04:00
privdatadir=$(pkglibdir)
2016-06-15 23:30:11 +03:00
privdata_DATA = src/app/rpm-ostree-0-integration.conf
2016-10-19 21:24:40 +03:00
install-bin-hook:
mv $(DESTDIR)$(bindir)/rpm-ostree $(DESTDIR)$(bindir)/$(primaryname)
ln -sf $(primaryname) $(DESTDIR)$(bindir)/rpm-ostree
if BUILDOPT_NEW_NAME
INSTALL_DATA_HOOKS += install-bin-hook
endif
2018-05-31 23:31:22 +03:00
2018-07-04 21:50:40 +03:00
librpmostree_rust_path = @abs_top_builddir@/target/@RUST_TARGET_SUBDIR@/librpmostree_rust.a
2018-07-04 22:13:25 +03:00
# If the target directory exists, use --frozen; we don't
# want to (by default) touch the Internet during builds here.
# One reason is that we want to support `make && sudo make install`,
# and we don't want to do `sudo cargo` there.
2018-07-04 21:50:40 +03:00
LIBRPMOSTREE_RUST_SRCS = $(wildcard rust/src/*.rs)
$(librpmostree_rust_path): Makefile $(LIBRPMOSTREE_RUST_SRCS)
2018-05-31 23:31:22 +03:00
cd $(top_srcdir)/rust && \
2018-07-04 22:13:25 +03:00
export CARGO_TARGET_DIR=@abs_top_builddir@/target && \
if test -d @abs_top_builddir@/target/@RUST_TARGET_SUBDIR@; then frozen=--frozen; fi && \
$(cargo) build --verbose $${frozen} $(CARGO_RELEASE_ARGS)
2018-07-04 21:50:40 +03:00
EXTRA_DIST += $(LIBRPMOSTREE_RUST_SRCS) rust/Cargo.lock
2018-05-31 23:31:22 +03:00
2018-07-04 21:47:04 +03:00
rpm_ostree_CFLAGS += -Irust/include
2018-07-04 21:50:40 +03:00
rpm_ostree_SOURCES += rust/include/librpmostree-rust.h
rpm_ostree_LDADD += $(librpmostree_rust_path)
2018-07-04 22:47:45 +03:00
rustfmt:
rustfmt $(LIBRPMOSTREE_RUST_SRCS)
# Outside the ifdef, otherwise automake complains
.PHONY: rustfmt