Changeset: 4f7e0cda1c1b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/4f7e0cda1c1b
Modified Files:
        MonetDB.spec
        tools/merovingian/daemon/config/monetdbd.service.in
Branch: Dec2025
Log Message:

On Fedora require MonetDB-selinux, on systems without SELinux, skip chcon.


diffs (26 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -700,6 +700,7 @@ 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
@@ -15,9 +15,9 @@ UMask=0007
 # 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}; chcon 
-u system_u -r object_r -t mserver5_db_t ${DBFARM})'
+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; 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)'
+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
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to