Changeset: e81a411564ef for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e81a411564ef
Modified Files:
MonetDB.spec
tools/merovingian/daemon/config/monetdbd.service.in
Branch: Dec2025
Log Message:
Do not require selinux package + create sections in service file.
Partial revert of changeset 4f7e0cda1c1b: we should not require selinux
packages on systems where selinux is not used.
diffs (38 lines):
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -700,7 +700,6 @@ used from the MAL level.
Summary: MonetDB SQL server modules
Group: Applications/Databases
Requires(pre): %{name}-server%{?_isa} = %{version}-%{release}
-Requires(pre): %{name}-selinux%{?_isa} = %{version}-%{release}
Obsoletes: MonetDB-SQL-server5 < 11.50.0
Provides: %{name}-SQL-server5 = %{version}-%{release}
Provides: %{name}-SQL-server5%{?_isa} = %{version}-%{release}
diff --git a/tools/merovingian/daemon/config/monetdbd.service.in
b/tools/merovingian/daemon/config/monetdbd.service.in
--- a/tools/merovingian/daemon/config/monetdbd.service.in
+++ b/tools/merovingian/daemon/config/monetdbd.service.in
@@ -8,18 +8,23 @@ Type=forking
User=monetdb
Group=monetdb
UMask=0007
+
# DBFARM is configurable using `systemctl edit monetdbd`
# This command will create the file `override.conf` in
/etc/systemd/system/monetdbd.service.d
# Add the following content:
# [Service]
# Environment=DBFARM=/some/other/directory
Environment=DBFARM=@CMAKE_INSTALL_FULL_LOCALSTATEDIR@/monetdb5/dbfarm
+
# create the dbfarm directory if it doesn't exist
ExecStartPre=/bin/bash -c 'test -d ${DBFARM} || (mkdir -m 770 ${DBFARM}; test
! -d /usr/share/selinux || chcon -u system_u -r object_r -t mserver5_db_t
${DBFARM})'
+
# if no properties file, create one with correct pidfile, and set contexts
ExecStartPre=/bin/bash -c 'test -f ${DBFARM}/.merovingian_properties || (umask
0007; @CMAKE_INSTALL_FULL_BINDIR@/monetdbd-@MONETDB_VERSION@ create ${DBFARM};
@CMAKE_INSTALL_FULL_BINDIR@/monetdbd-@MONETDB_VERSION@ set
pidfile=@CMAKE_INSTALL_FULL_RUNSTATEDIR@/monetdb/merovingian.pid ${DBFARM};
touch ${DBFARM}/.merovingian_lock; test ! -d /usr/share/selinux || (chcon -u
system_u -r object_r -t monetdbd_lock_t ${DBFARM}/.merovingian_lock; chcon -u
system_u -r object_r -t monetdbd_etc_t ${DBFARM}/.merovingian_properties))'
+
# make sure pidfile property is set correctly since systemd depends on it
ExecStartPre=/usr/bin/grep -q
pidfile=@CMAKE_INSTALL_FULL_RUNSTATEDIR@/monetdb/merovingian.pid
${DBFARM}/.merovingian_properties
+
# start and stop the server
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/monetdbd-@MONETDB_VERSION@ start
${DBFARM}
ExecStop=@CMAKE_INSTALL_FULL_BINDIR@/monetdbd-@MONETDB_VERSION@ stop ${DBFARM}
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]