Skip to content

Commit

Permalink
add catalog support
Browse files Browse the repository at this point in the history
  • Loading branch information
ejoerns committed Aug 17, 2023
1 parent f85d0f3 commit 3afe13e
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ rauc_LDADD = $(JSON_GLIB_LIBS) $(librauc_la_LIBADD) librauc.la
if SYSTEMD
systemdunitdir=$(SYSTEMD_UNITDIR)
nodist_systemdunit_DATA = data/rauc.service
systemdcatalogdir=$(SYSTEMD_CATALOGDIR)
nodist_systemdcatalog_DATA = data/rauc.catalog
endif

dbussystemservicedir = $(DBUS_SYSTEMSERVICEDIR)
Expand Down
9 changes: 9 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,15 @@ if (test -n "${with_systemdunitdir}"); then
fi
AM_CONDITIONAL(SYSTEMD, test -n "${with_systemdunitdir}")

AC_ARG_WITH([systemdcatalogdir],
AC_HELP_STRING([--with-systemdcatalogdir=DIR], [path to systemd catalog directory]),
[],
[with_systemdcatalogdir="$($PKG_CONFIG --variable=catalogdir systemd)"])
if (test -n "${with_systemdcatalogdir}"); then
SYSTEMD_CATALOGDIR="${with_systemdcatalogdir}"
AC_SUBST(SYSTEMD_CATALOGDIR)
fi

AC_ARG_WITH([dbuspolicydir],
AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
[],
Expand Down
2 changes: 2 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ rauc_dbus_policy = configure_file(
copy : true
)
install_data(rauc_dbus_policy, install_dir : dbuspolicydir)

install_data('rauc.catalog', install_dir : systemdcatalogdir)
44 changes: 44 additions & 0 deletions data/rauc.catalog
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
-- 0163db5468ac4237b090d28490c301ed
Subject: RAUC Installation succeeded
Defined-By: rauc
Support: https://rauc.io
Documentation: https://rauc.readthedocs.io

The installation with transaction ID @TRANSACTION_ID@ succeded.

It installed the bundle with @BUNDLE_HASH@ on your system.

-- c48141f7fd49443aafff862b4809168f
Subject: RAUC Installation failed
Defined-By: rauc
Support: https://rauc.io
Documentation: https://rauc.readthedocs.io

The installation with transaction ID @TRANSACTION_ID@ failed.

It attemted to installed the bundle with @BUNDLE_HASH@ on your system.

Note that the target slot group might be inactive now.
Check with 'rauc status'.

-- 8b5e7435e1054d86858278e7544fe6da
Subject: RAUC slot @RAUC_SLOT@ was marked as 'active'
Defined-By: rauc
Support: https://rauc.io
Documentation: https://rauc.readthedocs.io/en/latest/using.html#react-to-a-successfully-booted-system-failed-boot

The RAUC slot @RAUC_SLOT@ was marked as 'active'.

This normally means that it will be selected as the boot target after
rebooting.

-- 3304e15a7a9a447885eb208ba7ae3a05
Subject: RAUC slot @RAUC_SLOT@ was marked as 'good'
Defined-By: rauc
Support: https://rauc.io
Documentation: https://rauc.readthedocs.io/en/latest/using.html#react-to-a-successfully-booted-system-failed-boot

The RAUC slot @RAUC_SLOT@ was marked as 'good'.

This normally means that some instance decided that the slot we booted from is
ok.
7 changes: 7 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,13 @@ if systemdunitdir == ''
endif
endif

systemdcatalogdir = get_option('systemdcatalogdir')
if systemdcatalogdir == ''
if systemddep.found()
systemdcatalogdir = prefixdir / 'lib/systemd/catalog'
endif
endif

datadir = get_option('datadir')

dbussystemservicedir = get_option('dbussystemservicedir')
Expand Down
5 changes: 5 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ option(
type : 'string',
value : '',
description : 'Directory for systemd service files')
option(
'systemdcatalogdir',
type : 'string',
value : '',
description : 'Directory for systemd journal catalog files')
option(
'dbuspolicydir',
type : 'string',
Expand Down

0 comments on commit 3afe13e

Please sign in to comment.