Files
snapd/data/dbus/Makefile
Alberto Mardegan 7fe4772e26 many: add stub services for prompting
The implementation of these services is not yet ready, but in order to
be able to deliver it in a snap package, we need to have at least the
service files installed on the system by the distribution package.

These stubs just reexecute the binaries from the snap.

* tests: add spread test for reexec of prompt services

* packaging: update distros for prompt services

Ship them in Debian and Ubuntu, remove them elsewhere.

* cmd: update error message with unimplemented prompt services

* tests: do not disable prompt-reexec tests in UC

* many: disable prompting for 14.04

The kernel changes will most likely not land there.

* many: install prompt services for Ubuntu Core

* tests: exclude UC16 from reexec-prompt test

The services are installed, but disabled; enabling them is not trivial
and not worth the effort, since prompting will most likely not be
backported there.

* wrappers/core18: don't fail if the prompt service is missing in snapd

This fixes a spread failure in the tests/core/snapd-refresh-vs-services
test, where we install an old version of snapd (2.49) which does not
have the Prompt service.

* tests: fix typo in comment

Thanks @pedronis.

* cmd: add license header

Thanks @Meulengracht
2022-10-10 15:50:59 +02:00

47 lines
1.5 KiB
Makefile

#
# Copyright (C) 2017 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
BINDIR := /usr/bin
LIBEXECDIR := /usr/lib
DBUSDIR = /usr/share/dbus-1
DBUSSERVICESDIR := ${DBUSDIR}/services
SERVICES_GENERATED := $(patsubst %.service.in,%.service,$(wildcard *.service.in))
SERVICES := ${SERVICES_GENERATED}
%.service: %.service.in
cat $< | \
sed s:@libexecdir@:$(LIBEXECDIR):g | \
sed 's:@bindir@:${BINDIR}:g' | \
cat > $@
all: ${SERVICES}
install:: ${SERVICES}
# NOTE: old (e.g. 14.04) GNU coreutils doesn't -D with -t
install -d -m 0755 ${DESTDIR}/${DBUSSERVICESDIR}
install -m 0644 -t ${DESTDIR}/${DBUSSERVICESDIR} $^
install:: snapd.session-services.conf
install -d -m 0755 ${DESTDIR}/${DBUSDIR}/session.d
install -m 0644 -t ${DESTDIR}/${DBUSDIR}/session.d $^
install:: snapd.system-services.conf
install -d -m 0755 ${DESTDIR}/${DBUSDIR}/system.d
install -m 0644 -t ${DESTDIR}/${DBUSDIR}/system.d $^
clean:
rm -f ${SERVICES_GENERATED}