Revert "Fix failing sm services on Debian"

This reverts commit 8b2820f90f.

This introduces a build error when building sm, due to sm-db
dependency. When installing sm-db the shared library is now
moved to another location. Linking will fail when building.

/usr/bin/ld: cannot find -lsm_db
collect2: error: ld returned 1 exit status

Story: 2009101
Task: 44597
Change-Id: I58796e3d285777e5e5b3cf7123acd8bfbf6e6332
This commit is contained in:
Dan Voiculeasa 2022-03-02 08:51:22 +00:00
parent 8b2820f90f
commit 38f9923ebb
16 changed files with 6 additions and 113 deletions

View File

@ -25,12 +25,10 @@ override_dh_install:
install -d $(ROOT)/usr/lib/systemd/system/
install -m 644 -p -D scripts/sm_api.ini $(ROOT)/etc/sm
install -m 755 -p -D scripts/sm-api $(ROOT)/etc/init.d
install -m 644 -p -D scripts/sm-api.service $(ROOT)/usr/lib/systemd/system/
install -m 644 -p -D scripts/sm-api.conf $(ROOT)/etc/pmon.d
dh_install
override_dh_python3:
dh_python3 --shebang=/usr/bin/python3
override_dh_installsystemd:
dh_installsystemd --name sm-api

View File

@ -3,4 +3,5 @@ usr/bin/sm-api
etc/init.d/sm-api
etc/pmon.d/sm-api.conf
etc/sm/sm_api.ini
usr/lib/systemd/system/*
usr/lib/python*/dist-packages/*

View File

@ -1,15 +0,0 @@
[Unit]
Description=Service Management API Unit
After=network-online.target syslog-ng.service config.service sm.service
Before=sm-eru.service pmon.service
[Service]
Type=forking
RemainAfterExit=yes
User=root
ExecStart=/etc/init.d/sm-api start
ExecStop=/etc/init.d/sm-api stop
PIDFile=/var/run/sm-api.pid
[Install]
WantedBy=multi-user.target

View File

@ -1,10 +0,0 @@
#!/bin/sh
set -e
mkdir -p /usr/lib/sm
mv /usr/lib64/libsm_common.so* /usr/lib/sm
systemctl enable sm-watchdog
#DEBHELPER#
exit 0

View File

@ -21,9 +21,6 @@ override_dh_auto_install:
VER_MJR=${VER_MJR} \
install
override_dh_installsystemd:
dh_installsystemd --name sm-eru
# Prevents dh_fixperms from changing the permissions defined in the makefiles
override_dh_fixperms:
dh_fixperms \

View File

@ -1,3 +1,4 @@
etc/init.d/sm-watchdog
etc/pmon.d/sm-watchdog.conf
usr/bin/sm-watchdog
usr/lib/systemd/system/sm-watchdog.service

View File

@ -2,3 +2,4 @@ etc/init.d/sm-eru
etc/pmon.d/sm-eru.conf
usr/bin/sm-eru
usr/bin/sm-eru-dump
usr/lib/systemd/system/sm-eru.service

View File

@ -1,15 +0,0 @@
[Unit]
Description=Service Management Event Recorder Unit
After=network-online.target syslog-ng.service sm-api.service
Before=pmon.service
[Service]
Type=forking
RemainAfterExit=yes
User=root
ExecStart=/etc/init.d/sm-eru start
ExecStop=/etc/init.d/sm-eru stop
PIDFile=/var/run/sm-eru.pid
[Install]
WantedBy=multi-user.target

View File

@ -1,15 +0,0 @@
[Unit]
Description=Service Management Watchdog
After=network-online.target syslog-ng.service config.service
Before=sm.service pmon.service
[Service]
Type=forking
RemainAfterExit=yes
User=root
ExecStart=/etc/init.d/sm-watchdog start
ExecStop=/etc/init.d/sm-watchdog stop
PIDFile=/var/run/sm-watchdog.pid
[Install]
WantedBy=multi-user.target

View File

@ -1,9 +0,0 @@
#!/bin/sh
set -e
mkdir -p /usr/lib/sm
mv /usr/lib64/libsm_db.so* /usr/lib/sm
#DEBHELPER#
exit 0

View File

@ -1,8 +0,0 @@
#!/bin/sh
set -e
/usr/bin/systemctl enable sm-shutdown.service >/dev/null 2>&1
#DEBHELPER#
exit 0

View File

@ -9,9 +9,6 @@ override_dh_usrlocal:
# dh_usrlocal complains about files being put in /usr/local
# this empty override causes dh_usrlocal to be skipped.
override_dh_installsystemd:
dh_installsystemd --name sm
override_dh_auto_install:
rm -rf ${ROOT}
$(MAKE) DEST_DIR=${ROOT} \

View File

@ -1,13 +0,0 @@
[Unit]
Description=Service Management Shutdown Unit
After=sm.service
[Service]
Type=oneshot
User=root
ExecStop=/etc/init.d/sm-shutdown stop
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

View File

@ -1,3 +1,4 @@
usr/lib/systemd/system/*
usr/bin/sm
usr/local/sbin/sm-notify
usr/local/sbin/sm-troubleshoot

View File

@ -1,18 +0,0 @@
[Unit]
Description=Service Management Unit
After=network-online.target syslog-ng.service config.service sm-watchdog.service systemd-udev-settle.service drbd.service
Before=sm-shutdown.service sm-api.service pmon.service
[Service]
Type=forking
RemainAfterExit=yes
User=root
ExecStart=/etc/init.d/sm start
ExecStop=/etc/init.d/sm stop
PIDFile=/var/run/sm.pid
KillMode=process
RestartSec=10
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -22,7 +22,7 @@
### END INIT INFO
. /etc/init.d/functions
export LD_LIBRARY_PATH=/usr/lib/sm
RETVAL=0
SM_NAME="sm"