Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (fecf6094e953cd29e77a62fa6bfa291d3460ac5f)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (fecf6094e953cd29e77a62fa6bfa291d3460ac5f)
  • Date: Sun, 3 Sep 2023 18:41:48 +0000

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:

utils/dbus/BUILD |
39 ++--
utils/dbus/CONFIGURE |
4
utils/dbus/DEPENDS |
79 +++++++---
utils/dbus/DETAILS |
2
utils/dbus/HISTORY |
8 +
utils/dbus/INSTALL |
9 -
utils/dbus/PRE_BUILD |
4
utils/dbus/patches-1.15/dbus-1.15.0-enable-elogind-dbus-userdb-util.patch |
23 --
utils/dbus/patches-1.15/dbus-1.15.8-enable-elogind.patch |
65 ++++++++
9 files changed, 166 insertions(+), 67 deletions(-)

New commits:
commit fecf6094e953cd29e77a62fa6bfa291d3460ac5f
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

utils/dbus: split meson and autotools build paths
for both branches

stable branch still uses autotools, hencewhy the split,
also, updated elogind patch for devel branch and made some quoting more
consistent

diff --git a/utils/dbus/BUILD b/utils/dbus/BUILD
index dcf5890..8a9db3d 100755
--- a/utils/dbus/BUILD
+++ b/utils/dbus/BUILD
@@ -1,21 +1,26 @@
-OPTS+=" runtime_dir=/run" &&
-if spell_ok systemd; then
-# # if systemd is installed, then include this. Needed for systemd to work
- OPTS+=" systemd_system_unitdir=/lib/systemd/system" &&
- OPTS+=" runtime_dir=/run"
+if [[ "${DBUS_BRANCH}" == "devel" ]]; then
+ OPTS="runtime_dir=${TRACK_ROOT}/run ${OPTS}" &&
+ if [ "$DBUS_SELINUX" == "y" ]; then
+ OPTS="selinux=enabled ${OPTS}"
+ fi &&
+ # Glib2 is used for regression tests and can cause unnecessary build
failure
+ # when we're in a chain where libffi just has been updated and glib2 not
yet.
+ # Other solution would be to unnecessarily depend on glib2, or even
+ # dbus-glib, which just smells too circular.
+ OPTS="user_session=true modular_tests=disabled ${OPTS}"
+else
+ OPTS="--runstatedir=${TRACK_ROOT}/run ${OPTS}" &&
+ if [ "$DBUS_SELINUX" == "y" ]; then
+ OPTS="--enable-selinux ${OPTS}"
+ fi &&
+ OPTS="--enable-user-session --disable-modular-tests ${OPTS}"
fi &&

-if [ "$DBUS_SELINUX" == "y" ]; then
- OPTS+=" selinux=enabled"
-fi &&
-# Glib2 is used for regression tests and can cause unnecessary build failure
-# when we're in a chain where libffi just has been updated and glib2 not yet.
-# Other solution would be to unnecessarily depend on glib2, or even
-# dbus-glib, which just smells too circular.
-OPTS+=" user_session=true modular_tests=disabled"
create_account messagebus &&
-default_build

-#if is_depends_enabled $SPELL doxygen; then
-# doxygen
-#fi
+default_build &&
+
+if [[ "${DBUS_BRANCH}" == "stable" ]] &&
+ is_depends_enabled "${SPELL}" "doxygen"; then
+ doxygen
+fi
diff --git a/utils/dbus/CONFIGURE b/utils/dbus/CONFIGURE
index f803ba5..e1da812 100755
--- a/utils/dbus/CONFIGURE
+++ b/utils/dbus/CONFIGURE
@@ -1 +1,5 @@
+if [[ "${DBUS_BRANCH}" == "devel" ]]; then
+ . "${GRIMOIRE}/MESON_CONFIGURE"
+fi &&
+
config_query DBUS_SELINUX 'Enable SELinux support?' n
diff --git a/utils/dbus/DEPENDS b/utils/dbus/DEPENDS
index 5ae7114..0cb9c59 100755
--- a/utils/dbus/DEPENDS
+++ b/utils/dbus/DEPENDS
@@ -1,28 +1,65 @@
-source $GRIMOIRE/MESON_DEPENDS &&
-
depends PKG-CONFIG &&

-optional_depends libx11 \
- x11_autolaunch=enabled \
- x11_autolaunch=disabled \
- 'X11 autolaunch support' &&
+if [[ "${DBUS_BRANCH}" == "devel" ]]; then
+ . "${GRIMOIRE}/MESON_DEPENDS" &&
+
+ optional_depends libx11 \
+ "x11_autolaunch=enabled" \
+ "x11_autolaunch=disabled" \
+ "X11 autolaunch support" &&
+
+ optional_depends systemd \
+ "systemd=enabled
systemd_system_unitdir=${INSTALL_ROOT}/etc/systemd/system
systemd_user_unitdir=${INSTALL_ROOT}/etc/systemd/user" \
+ "systemd=disabled" \
+ "systemd support" &&
+
+ optional_depends doxygen \
+ "doxygen_docs=enabled" \
+ "doxygen_docs=disabled" \
+ "API documentation" &&
+
+ optional_depends elogind \
+ "elogind=enabled" \
+ "elogind=disabled" \
+ "for elogind support" &&
+
+ optional_depends xmlto \
+ "xml_docs=enabled" \
+ "xml_docs=disabled" \
+ "docs in XML format"
+else
+ optional_depends libx11 \
+ "--with-x --enable-x11-autolaunch" \
+ "--without-x --disable-x11-autolaunch" \
+ "X11 autolaunch support" &&
+
+ optional_depends systemd \
+ "--enable-systemd
--with-systemdsystemunitdi=${INSTALL_ROOT}/etc/systemd/system
--with-systemduserunitdir=${INSTALL_ROOT}/etc/systemd/user" \
+ "--disable-systemd" \
+ "systemd support" &&

-if is_depends_enabled dbus libx11; then
+ optional_depends doxygen \
+ "--enable-doxygen-docs" \
+ "--disable-doxygen-docs" \
+ "API documentation" &&
+
+ optional_depends elogind \
+ '--enable-elogind' \
+ '--disable-elogind' \
+ 'for elogind support' &&
+
+ optional_depends xmlto \
+ "--enable-xml-docs" \
+ "--disable-xml-docs" \
+ "docs in XML format"
+fi &&
+
+if is_depends_enabled "${SPELL}" "libx11"; then
depends libsm &&
depends libice
fi &&

-optional_depends systemd \
- systemd=enabled \
- systemd=disabled \
- 'systemd support' &&
-
-optional_depends doxygen \
- doxygen_docs=enabled \
- doxygen_docs=disabled \
- 'API documentation' &&
-
-optional_depends xmlto \
- xml_docs=enabled \
- xml_docs=disabled \
- 'docs in XML format'
+if is_depends_enabled "${SPELL}" "elogind"; then
+ depends autoconf &&
+ depends automake
+fi
diff --git a/utils/dbus/DETAILS b/utils/dbus/DETAILS
index 6867e34..32a1ae0 100755
--- a/utils/dbus/DETAILS
+++ b/utils/dbus/DETAILS
@@ -1,6 +1,6 @@
SPELL=dbus
-source $GRIMOIRE/MESON_FUNCTIONS
if [[ "${DBUS_BRANCH}" == "devel" ]]; then
+. "${GRIMOIRE}/MESON_FUNCTIONS"
VERSION=1.15.8
else
VERSION=1.14.10
diff --git a/utils/dbus/HISTORY b/utils/dbus/HISTORY
index 5cfb2f6..503141f 100644
--- a/utils/dbus/HISTORY
+++ b/utils/dbus/HISTORY
@@ -1,3 +1,11 @@
+2023-09-03 Pavel Vinogradov <public AT sorcemage.org>
+ * DETAILS, CONFIGURE, DEPENDS, BUILD, INSTALL: split meson and
autotools
+ build paths for both branches, quoting++, doxygen is back for stable
+ * PRE_BUILD: autogen.sh is for stable branch only
+ * patches-1.15/dbus-1.15.0-enable-elogind-dbus-userdb-util.patch:
removed
+ obsolete patch
+ * patches-1.15/dbus-1.15.8-enable-elogind.patch: added new patch from
Gentoo
+
2023-09-02 Pavel Vinogradov <public AT sorcemage.org>
* DETAILS: stable version 1.14.10

diff --git a/utils/dbus/INSTALL b/utils/dbus/INSTALL
index 5b2a18e..dc8dea4 100755
--- a/utils/dbus/INSTALL
+++ b/utils/dbus/INSTALL
@@ -1,9 +1,10 @@
default_install &&

-#if is_depends_enabled $SPELL doxygen; then
-# mkdir -p "$INSTALL_ROOT/usr/share/doc/$SPELL" &&
-# cp -r "$SOURCE_DIRECTORY"/doc/api/*
"$INSTALL_ROOT/usr/share/doc/$SPELL/"
-#fi &&
+if [[ "${DBUS_BRANCH}" == "stable" ]] &&
+ is_depends_enabled "${SPELL}" "doxygen"; then
+ mkdir -p "$INSTALL_ROOT/usr/share/doc/$SPELL" &&
+ cp -r "$SOURCE_DIRECTORY"/doc/api/* "$INSTALL_ROOT/usr/share/doc/$SPELL/"
+fi &&

mkdir -p "$INSTALL_ROOT"/etc/X11/Xsession.d &&
install -m644 -o root -g root "$SPELL_DIRECTORY"/Xsession.d/* \
diff --git a/utils/dbus/PRE_BUILD b/utils/dbus/PRE_BUILD
index 2016890..cd890cc 100755
--- a/utils/dbus/PRE_BUILD
+++ b/utils/dbus/PRE_BUILD
@@ -4,5 +4,7 @@ cd "${SOURCE_DIRECTORY}" &&
if is_depends_enabled "${SPELL}" "elogind"; then
apply_patch_dir patches &&
apply_patch_dir "patches-${VERSION%.*}" &&
- NOCONFIGURE=1 ./autogen.sh
+ if [[ "${DBUS_BRANCH}" == "stable" ]]; then
+ NOCONFIGURE=1 ./autogen.sh
+ fi
fi
diff --git
a/utils/dbus/patches-1.15/dbus-1.15.0-enable-elogind-dbus-userdb-util.patch
b/utils/dbus/patches-1.15/dbus-1.15.0-enable-elogind-dbus-userdb-util.patch
deleted file mode 100644
index 4ddf701..0000000
---
a/utils/dbus/patches-1.15/dbus-1.15.0-enable-elogind-dbus-userdb-util.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/53
-https://bugs.gentoo.org/599494
---- a/dbus/dbus-userdb-util.c
-+++ b/dbus/dbus-userdb-util.c
-@@ -39,6 +39,9 @@
- #ifdef HAVE_SYSTEMD
- #include <systemd/sd-login.h>
- #endif
-+#if HAVE_ELOGIND
-+#include <elogind/sd-login.h>
-+#endif
-
- /**
- * @addtogroup DBusInternalsUtils
-@@ -65,7 +68,7 @@ dbus_bool_t
- _dbus_is_console_user (dbus_uid_t uid,
- DBusError *error)
- {
--#ifdef HAVE_SYSTEMD
-+#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND)
- /* check if we have logind */
- if (access ("/run/systemd/seats/", F_OK) >= 0)
- {
diff --git a/utils/dbus/patches-1.15/dbus-1.15.8-enable-elogind.patch
b/utils/dbus/patches-1.15/dbus-1.15.8-enable-elogind.patch
new file mode 100644
index 0000000..543eac5
--- /dev/null
+++ b/utils/dbus/patches-1.15/dbus-1.15.8-enable-elogind.patch
@@ -0,0 +1,65 @@
+https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/53
+https://bugs.gentoo.org/599494
+
+Especially see https://bugs.gentoo.org/599494#c21 - this functionality isn't
+particularly required. The only known consumer at the moment is hplip.
+--- a/dbus/dbus-userdb-util.c
++++ b/dbus/dbus-userdb-util.c
+@@ -41,6 +41,9 @@
+ #ifdef HAVE_SYSTEMD
+ #include <systemd/sd-login.h>
+ #endif
++#ifdef HAVE_ELOGIND
++#include <elogind/sd-login.h>
++#endif
+
+ /**
+ * @addtogroup DBusInternalsUtils
+@@ -67,7 +70,7 @@ dbus_bool_t
+ _dbus_is_console_user (dbus_uid_t uid,
+ DBusError *error)
+ {
+-#ifdef HAVE_SYSTEMD
++#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND)
+ /* check if we have logind */
+ if (access ("/run/systemd/seats/", F_OK) >= 0)
+ {
+--- a/dbus/meson.build
++++ b/dbus/meson.build
+@@ -23,6 +23,7 @@ dbus_dependencies = [
+ threads,
+ network_libs,
+ systemd,
++ elogind,
+ valgrind.partial_dependency(compile_args: true),
+ ]
+
+--- a/meson.build
++++ b/meson.build
+@@ -478,6 +478,10 @@ if use_launchd
+ endif
+ endif
+
++elogind = dependency('libelogind', version: '>=209', required:
get_option('elogind'))
++use_elogind = elogind.found()
++config.set('HAVE_ELOGIND', use_elogind)
++
+ systemd = dependency('libsystemd', version: '>=209', required:
get_option('systemd'))
+ use_systemd = systemd.found()
+ config.set('HAVE_SYSTEMD', use_systemd)
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -244,6 +244,13 @@ option(
+ description: 'Systemd at_console support'
+ )
+
++option(
++ 'elogind',
++ type: 'feature',
++ value: 'auto',
++ description: 'elogind at_console support'
++)
++
+ option(
+ 'test_socket_dir',
+ type: 'string',



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (fecf6094e953cd29e77a62fa6bfa291d3460ac5f), Pavel Vinogradov, 09/03/2023

Archive powered by MHonArc 2.6.24.

Top of Page