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: Start of work on daemon #157

Merged
merged 63 commits into from
Sep 10, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
c0d15a6
daemon: Start of work on daemon
petervo Apr 28, 2015
a435dea
daemon: Flesh out new API
cgwalters May 21, 2015
2f5057a
daemon: Make the Daemon instance global in main.c
mbarnes May 21, 2015
d6a48fe
daemon: Handle bus name acquisition in main.c
mbarnes May 21, 2015
0774249
daemon: Add "Method" property to Transaction object
mbarnes May 21, 2015
8f5993e
daemon: Add factory function for Transaction objects
mbarnes May 21, 2015
c2e19fb
daemon: Add deployment_generate_id() to utils
mbarnes May 22, 2015
950fcf7
daemon: deployment utils
petervo May 25, 2015
94efc7b
daemon: Publishing and unpublishing interfaces
petervo May 25, 2015
8b28365
daemon: Dbus setup
petervo May 25, 2015
19fde3a
daemon: Start of sysroot interface implementation
petervo May 25, 2015
d332175
daemon: Ensure os names are relative to deploy dir
petervo May 25, 2015
84dbd93
daemon: Add callback stubs for OS methods
mbarnes May 25, 2015
89e41eb
daemon: Integrate download progress into new_transaction()
mbarnes May 25, 2015
b4db4a1
daemon: Some D-Bus API tweaks
mbarnes May 27, 2015
0b89d54
daemon: Add GetOS() method to Sysroot interface
mbarnes May 27, 2015
c6548ac
daemon: Half-implement the Upgrade() command
mbarnes May 28, 2015
a140c26
daemon: OS properties and property updates
petervo Jun 9, 2015
075d6bd
daemon: Implement package diff methods
petervo Jun 10, 2015
0114507
daemon: Start implementing transaction methods
petervo Jun 11, 2015
f525730
daemon: Make parts of cli use the daemon
petervo Jun 13, 2015
23cfdf2
daemon: Track active transaction
petervo Jun 17, 2015
915b78e
daemon: Startup modifications
mbarnes Jul 15, 2015
a4be570
docs: Add generated D-Bus interfaces
mbarnes Jul 15, 2015
463d367
daemon: Miscellaneous cleanups
mbarnes Jul 16, 2015
b6691cb
daemon: Rework transactions
mbarnes Jul 23, 2015
7190f7b
app: Detect peer connection from GDBusConnection
mbarnes Aug 5, 2015
c57cc38
app: Extract GDBusConnection from GDBusProxy
mbarnes Aug 5, 2015
d54f25a
app: Collect D-Bus CLI options into main.c
mbarnes Aug 5, 2015
7b8c67f
app: Tweak transaction DBus helper function
mbarnes Aug 5, 2015
f1973d7
daemon: Add ProgressEnd signal to Transaction interface
mbarnes Aug 7, 2015
cfc52ad
daemon: Catch systemd journal messages by redirecting stdout
mbarnes Aug 10, 2015
1934d63
daemon: Implement GInitableIface in transactions
mbarnes Aug 13, 2015
a0db1c7
daemon: Have Transaction objects handle sysroot locking
mbarnes Aug 13, 2015
029a3e5
daemon: Prepare TransactionClass for subclassing
mbarnes Aug 13, 2015
36c87fb
daemon: Add a Start() method to transactions
mbarnes Aug 14, 2015
434a967
daemon: Add "invocation" property to TransactionClass
mbarnes Aug 16, 2015
d69cb7d
daemon: Convert transactions to subclasses
mbarnes Aug 13, 2015
19e626c
daemon: Use a peer-to-peer connection for transactions
mbarnes Aug 17, 2015
ebc48d0
daemon: Remove owner checks on Transaction methods
mbarnes Aug 18, 2015
7917c89
daemon: More transaction API churn
mbarnes Aug 18, 2015
d051794
daemon: Add debug messages for transactions
mbarnes Aug 20, 2015
495bf4c
daemon: Simplify authorization policy
mbarnes Aug 24, 2015
188be0c
daemon: Change ActiveTransaction value
mbarnes Aug 24, 2015
aaadcba
daemon: Rename all the things!
mbarnes Aug 24, 2015
6e28454
daemon: Change bus name watching semantics
mbarnes Aug 26, 2015
24f0155
daemon: Make the Transaction.Start() method idempotent
mbarnes Aug 26, 2015
b3189b6
daemon: Support multiple Transaction connections
mbarnes Aug 26, 2015
9c0e87b
daemon: Share Transaction address for identical requests
mbarnes Aug 27, 2015
da81156
daemon: Export objects on bus (not name) acquision
cgwalters Sep 1, 2015
41d74ab
daemon: Bind DBus service <-> systemd service configs
cgwalters Sep 1, 2015
a1b7ed5
daemon: Remove "on-message-bus" property
mbarnes Sep 1, 2015
0326568
tests: Adapt to rpm-ostree daemon
mbarnes Sep 1, 2015
8d2713e
daemon: Add a Sysroot.Path property
mbarnes Sep 2, 2015
7aed790
app: Fix local operations with non-default sysroot paths
mbarnes Sep 2, 2015
82702c2
daemon: Fix OS.Rebase() method
mbarnes Sep 2, 2015
22c5d5a
daemon: Add rpmostreed_sysroot_load_state()
mbarnes Sep 3, 2015
a388f98
daemon: Don't keep persistent OstreeSysroot instance
mbarnes Sep 3, 2015
d32a4b9
daemon: Update deployments on "updated" signal
mbarnes Sep 3, 2015
7b7f136
daemon: Remove fallback PATH setting
mbarnes Sep 8, 2015
7267c1e
tests: Import dbus-run-session
cgwalters Sep 8, 2015
a22c592
daemon: Use GVariantDict ("a{sv}") for deployments
mbarnes Sep 8, 2015
73f2a7f
daemon: Make "diff" methods safer
mbarnes Sep 8, 2015
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,10 @@ rpm-ostree-*.tar.xz
rpm-ostree-*.rpm

rpm-ostree.1

rpm-ostreed
rpm-ostreed.1
org.projectatomic.rpmostree1.service
rpm-ostreed.service
rpm-ostreed-generated.c
rpm-ostreed-generated.h
105 changes: 105 additions & 0 deletions Makefile-daemon.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
libexec_PROGRAMS += rpm-ostreed

dbus_built_sources = rpm-ostreed-generated.h rpm-ostreed-generated.c

rpm-ostreed-generated.h: rpm-ostreed-generated.c
rpm-ostreed-generated.c: Makefile.am $(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*

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/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 \
$(NULL)

librpmostreed_la_CFLAGS = \
$(AM_CFLAGS) \
$(PKGDEP_RPMOSTREE_CFLAGS) \
-DG_LOG_DOMAIN=\"rpm-ostreed\" \
-I$(srcdir)/src/daemon \
-I$(srcdir)/src/lib \
-I$(libglnx_srcpath) \
$(NULL)

librpmostreed_la_LIBADD = \
$(AM_LDFLAGS) \
$(PKGDEP_RPMOSTREE_LIBS) \
librpmostreepriv.la \
librpmostree-1.la \
$(CAP_LIBS)
$(NULL)

rpm_ostreed_SOURCES = \
src/daemon/main.c \
$(NULL)

rpm_ostreed_CFLAGS = \
$(AM_CFLAGS) \
-DPKGLIBDIR=\"$(pkglibdir)\" \
$(PKGDEP_RPMOSTREE_CFLAGS) \
-I$(srcdir)/src/daemon \
-I$(srcdir)/libglnx \
-DG_LOG_DOMAIN=\"rpm-ostreed\" \
$(NULL)

rpm_ostreed_LDADD = \
librpmostreed.la \
$(AM_LDFLAGS) \
$(PKGDEP_RPMOSTREE_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/
$(systemdunit_DATA):
$(SED_SUBST) [email protected] > $@

service_in_files = $(srcdir)/src/daemon/org.projectatomic.rpmostree1.service.in
service_DATA = $(service_in_files:.service.in=.service)
servicedir = $(dbusservicedir)
$(service_DATA):
$(SED_SUBST) [email protected] > $@

EXTRA_DIST += \
$(dbusservice_DATA) \
$(service_in_files) \
$(systemdunit_in_files) \
$(NULL)

CLEANFILES += \
$(service_DATA) \
$(systemdunit_DATA) \
$(NULL)
4 changes: 4 additions & 0 deletions Makefile-rpm-ostree.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
bin_PROGRAMS += rpm-ostree

rpm_ostree_SOURCES = src/app/main.c \
rpm-ostreed-generated.h \
rpm-ostreed-generated.c \
src/app/rpmostree-builtins.h \
src/app/rpmostree-db-builtins.h \
src/app/rpmostree-compose-builtins.h \
Expand All @@ -29,6 +31,8 @@ rpm_ostree_SOURCES = src/app/main.c \
src/app/rpmostree-db-builtin-diff.c \
src/app/rpmostree-db-builtin-list.c \
src/app/rpmostree-db-builtin-version.c \
src/app/rpmostree-dbus-helpers.c \
src/app/rpmostree-dbus-helpers.h \
src/app/rpmostree-libbuiltin.c \
src/app/rpmostree-libbuiltin.h \
$(NULL)
Expand Down
14 changes: 14 additions & 0 deletions Makefile-tests.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include $(top_srcdir)/buildutil/glib-tap.mk

CLEANFILES += \
tests/setup-session.sh \
tests/compose/yum/empty tests/compose/yum/repodata/repomd.xml \
tests/compose/test-repo.repo \
tests/compose/yum/repodata/*.bz2 \
Expand Down Expand Up @@ -33,6 +34,16 @@ installed_test_data = tests/libtest.sh \
tests/compose/test-repo.repo.in \
$(NULL)

tests/setup-session.sh: tests/setup-session.sh.in
sed \
-e "s|[@]installed_testdir[@]|$(installed_testdir)|" \
-e "s|[@]LIBEXECDIR[@]|$(libexecdir)|" \
< $< > [email protected] && mv [email protected] $@

test_installed_extra_scripts = \
tests/setup-session.sh \
$(NULL)

nobase_installed_test_DATA += $(shell find tests/compose/yum/ -type f) \
$(NULL)

Expand All @@ -46,6 +57,9 @@ test_programs = \
tests/jsonutil \
$(NULL)

installed_test_PROGRAMS += dbus-run-session
dbus_run_session_SOURCES = tests/dbus-run-session.c

check-local:
@echo " *** NOTE ***"
@echo " *** NOTE ***"
Expand Down
7 changes: 6 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ AM_CFLAGS += $(WARN_CFLAGS)

EXTRA_DIST += autogen.sh COPYING

SED_SUBST = sed \
-e 's,[@]libexecdir[@],$(libexecdir),g' \
$(NULL)

libglnx_srcpath := $(srcdir)/libglnx
libglnx_cflags := $(PKGDEP_GIO_UNIX_CFLAGS) -I$(libglnx_srcpath) -fvisibility=hidden
libglnx_ldflags :=
libglnx_ldflags :=
libglnx_libs := $(PKGDEP_GIO_UNIX_LIBS)

include $(INTROSPECTION_MAKEFILE)
Expand All @@ -48,6 +52,7 @@ include libglnx/Makefile-libglnx.am
noinst_LTLIBRARIES += libglnx.la
include Makefile-libpriv.am
include Makefile-lib.am
include Makefile-daemon.am
include Makefile-rpm-ostree.am
include Makefile-tests.am
include Makefile-man.am
2 changes: 1 addition & 1 deletion buildutil/glib-tap.mk
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ installed_test_meta_DATA = $(installed_testcases:=.test)
%.test: %$(EXEEXT) Makefile
$(AM_V_GEN) (echo '[Test]' > [email protected]; \
echo 'Type=session' >> [email protected]; \
echo 'Exec=$(installed_testdir)/$(notdir $<)' >> [email protected]; \
echo 'Exec=$(installed_testdir)/setup-session.sh $(installed_testdir)/$(notdir $<)' >> [email protected]; \
mv [email protected] $@)

CLEANFILES += $(installed_test_meta_DATA)
Expand Down
13 changes: 13 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ AC_SYS_LARGEFILE
AC_PROG_CC
AM_PROG_CC_C_O

# dbus system dir
AC_MSG_CHECKING(for dbus system services directory)
if test "$enable_prefix_only" = "yes"; then
dbusservicedir='${datadir}/dbus-1/system-services'
else
dbusservicedir='${datadir}/dbus-1/system-services'
if test "$dbusservicedir" = ""; then
AC_MSG_ERROR(Couldn't find dbus services directory. Try installing dbus-devel)
fi
fi
AC_SUBST([dbusservicedir], [$dbusservicedir])
AC_MSG_RESULT(dbusservicedir)

changequote(,)dnl
if test "x$GCC" = "xyes"; then
WARN_CFLAGS="-Wall -Wstrict-prototypes -Werror=missing-prototypes \
Expand Down
8 changes: 8 additions & 0 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,16 @@ GTKDOC_LIBS=
rpmostree-sections.txt: $(srcdir)/rpmostree-sections.txt
cp $< $@

$(DOC_MAIN_SGML_FILE): $(DOC_MAIN_SGML_FILE).in
sed -e 's|\@SRCDIR\@|$(top_srcdir)|g' $< > $(@)

version.xml:
echo -n $(VERSION) > "$@"

BUILT_SOURCES = $(DOC_MAIN_SGML_FILE)

# This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make

CLEANFILES += $(BUILT_SOURCES)
EXTRA_DIST += $(DOC_MAIN_SGML_FILE).in
7 changes: 7 additions & 0 deletions doc/rpmostree-docs.xml → doc/rpmostree-docs.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,11 @@
</index>

</chapter>

<chapter>
<title>D-Bus Interfaces</title>
<xi:include href="@SRCDIR@/rpm-ostreed-generated-org.projectatomic.rpmostree1.Sysroot.xml"/>
<xi:include href="@SRCDIR@/rpm-ostreed-generated-org.projectatomic.rpmostree1.OS.xml"/>
<xi:include href="@SRCDIR@/rpm-ostreed-generated-org.projectatomic.rpmostree1.Transaction.xml"/>
</chapter>
</book>
2 changes: 1 addition & 1 deletion libglnx
Submodule libglnx updated from fbdb15 to 0cf50c
4 changes: 4 additions & 0 deletions packaging/rpm-ostree.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
%{_mandir}/man1/*
%{_libdir}/*.so.1*
%{_libdir}/girepository-1.0/*.typelib
%{_libexecdir}/rpm-ostreed
%{_datadir}/dbus-1/system-services/org.projectatomic.rpmostree1.service
%{_prefix}/lib/systemd/system/rpm-ostreed.service
%{_sysconfdir}/dbus-1/system.d/org.projectatomic.rpmostree1.conf

%files devel
%{_libdir}/lib*.so
Expand Down
Loading