TT#14008 Update RPM configs + README for /usr/bin usage

Related to commit a3062b5f, let's also update the RPM spec file, its
configs/scripts and the README, to use /usr/bin instead of /usr/sbin.

While at it, noticed that el/ngcp-rtpengine-iptables-setup seemed to use
a wrong path (/sbin/rtpengine-get-table instead of
/usr/sbin/rtpengine-get-table), adjusted accordingly.

While at it, also fixed mixed-use-of-spaces-and-tabs issues (as reported
by rpmlint) in rtpengine.spec.

FTR, we have the following layout in the resulting RPMs now:

* /usr/bin/rtpengine
* /usr/bin/rtpengine-ctl
* /usr/bin/rtpengine-recording
* /usr/sbin/ngcp-rtpengine-iptables-setup
* /usr/sbin/rtpengine-get-table

Change-Id: I7e9e3527f4dc07adba425172cebb5672f2541690
pull/1487/head
Michael Prokop 3 years ago
parent a3062b5f73
commit ffd11fa17d

@ -367,7 +367,7 @@ A typical start-up sequence including in-kernel forwarding might look like this:
echo 'del 0' > /proc/rtpengine/control
# start daemon
/usr/sbin/rtpengine --table=0 --interface=10.64.73.31 --interface=2001:db8::4f3:3d \
/usr/bin/rtpengine --table=0 --interface=10.64.73.31 --interface=2001:db8::4f3:3d \
--listen-ng=127.0.0.1:2223 --tos=184 --pidfile=/run/rtpengine.pid --no-fallback
Running Multiple Instances
@ -389,9 +389,9 @@ then the start-up sequence might look like this:
echo 'del 0' > /proc/rtpengine/control
echo 'del 1' > /proc/rtpengine/control
/usr/sbin/rtpengine --table=0 --interface=10.64.73.31 \
/usr/bin/rtpengine --table=0 --interface=10.64.73.31 \
--listen-ng=127.0.0.1:2223 --tos=184 --pidfile=/run/rtpengine-10.pid --no-fallback
/usr/sbin/rtpengine --table=1 --interface=192.168.65.73 \
/usr/bin/rtpengine --table=1 --interface=192.168.65.73 \
--listen-ng=127.0.0.1:2224 --tos=184 --pidfile=/run/rtpengine-192.pid --no-fallback
With this setup, the SIP proxy can choose which instance of *rtpengine* to talk to and thus which local

@ -11,7 +11,7 @@ if [ -f "$DEFAULTS" ]; then
. "$DEFAULTS" || true
fi
TABLE=$(/sbin/rtpengine-get-table --config-file="${CONFIG_FILE-/etc/rtpengine/rtpengine.conf}")
TABLE=$(/usr/sbin/rtpengine-get-table --config-file="${CONFIG_FILE-/etc/rtpengine/rtpengine.conf}")
MODPROBE_OPTIONS=""
# Handle requested setuid/setgid.

@ -28,7 +28,7 @@ else
fi
prog=rtpengine-recording
runfile=/usr/sbin/${prog}
runfile=/usr/bin/${prog}
pidfile=${PIDFILE-/run/rtpengine-recording.pid}
lockfile=${LOCKFILE-/var/lock/subsys/rtpengine-recording}

@ -13,10 +13,10 @@ Group=ngcp-rtpengine
AmbientCapabilities=CAP_NET_ADMIN
RuntimeDirectory=rtpengine-recording
PIDFile=/run/rtpengine-recording/rtpengine-recording.pid
ExecStart=/usr/sbin/rtpengine-recording --config-file=${CFG_FILE} --pidfile=${PID_FILE}
ExecStart=/usr/bin/rtpengine-recording --config-file=${CFG_FILE} --pidfile=${PID_FILE}
TimeoutSec=15s
Restart=on-failure
[Install]
WantedBy=multi-user.target
Alias=ngcp-rtpengine-recording.service
Alias=ngcp-rtpengine-recording.service

@ -29,12 +29,12 @@ else
exit 6
fi
rtpengine=/usr/sbin/rtpengine
rtpengine=/usr/bin/rtpengine
prog=rtpengine
pidfile=${PIDFILE-/run/rtpengine.pid}
lockfile=${LOCKFILE-/var/lock/subsys/rtpengine}
cachefile=/var/lib/ngcp-rtpengine/rtpengine.cfg
TABLE=$(/sbin/rtpengine-get-table --config-file="${CONFIG_FILE-/etc/rtpengine/rtpengine.conf}")
TABLE=$(/usr/sbin/rtpengine-get-table --config-file="${CONFIG_FILE-/etc/rtpengine/rtpengine.conf}")
PIDFILE=${pidfile}
RETVAL=0
OPTS=""

@ -23,7 +23,7 @@ BuildRequires: pkgconfig(spandsp)
Requires(pre): shadow-utils
%if 0%{?with_transcoding} > 0
BuildRequires: ffmpeg-devel
BuildRequires: ffmpeg-devel
Requires(pre): ffmpeg-libs
%endif
@ -46,7 +46,7 @@ Group: System Environment/Daemons
BuildRequires: gcc make redhat-rpm-config iptables-devel
Requires: iptables %{?iptables_ipv6:iptables-ipv6}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-dkms = %{version}-%{release}
Requires: %{name}-dkms = %{version}-%{release}
%description kernel
%{summary}.
@ -76,9 +76,9 @@ Requires(preun): dkms
%if 0%{?with_transcoding} > 0
%package recording
Summary: The Sipwise NGCP rtpengine recording daemon
Group: System Environment/Daemons
BuildRequires: gcc make redhat-rpm-config %{mysql_devel_pkg} ffmpeg-devel
Summary: The Sipwise NGCP rtpengine recording daemon
Group: System Environment/Daemons
BuildRequires: gcc make redhat-rpm-config %{mysql_devel_pkg} ffmpeg-devel
%description recording
The Sipwise rtpengine media proxy has support for exporting media (RTP) packets
@ -113,14 +113,14 @@ cd ..
%install
# Install the userspace daemon
install -D -p -m755 daemon/%{binname} %{buildroot}%{_sbindir}/%{binname}
install -D -p -m755 daemon/%{binname} %{buildroot}%{_bindir}/%{binname}
# Install CLI (command line interface)
install -D -p -m755 utils/%{binname}-ctl %{buildroot}%{_sbindir}/%{binname}-ctl
install -D -p -m755 utils/%{binname}-ctl %{buildroot}%{_bindir}/%{binname}-ctl
# Install helper
install -D -p -m755 utils/%{binname}-get-table %{buildroot}%{_sbindir}/%{binname}-get-table
# Install recording daemon
%if 0%{?with_transcoding} > 0
install -D -p -m755 recording-daemon/%{binname}-recording %{buildroot}%{_sbindir}/%{binname}-recording
install -D -p -m755 recording-daemon/%{binname}-recording %{buildroot}%{_bindir}/%{binname}-recording
%endif
## Install the init.d script and configuration file
@ -139,7 +139,7 @@ install -D -p -m644 el/%{binname}-recording.service \
%{buildroot}%{_unitdir}/%{binname}-recording.service
%else
install -D -p -m755 el/%{binname}-recording.init \
%{buildroot}%{_initrddir}/%{name}-recording
%{buildroot}%{_initrddir}/%{name}-recording
%endif
%endif
install -D -p -m644 el/%{binname}.sysconfig \
@ -186,9 +186,9 @@ getent passwd %{name} >/dev/null || /usr/sbin/useradd -r -g %{name} \
%post
if [ $1 -eq 1 ]; then
%if 0%{?has_systemd_dirs}
systemctl daemon-reload
systemctl daemon-reload
%else
/sbin/chkconfig --add %{name} || :
/sbin/chkconfig --add %{name} || :
%endif
fi
@ -214,12 +214,12 @@ true
%preun
if [ $1 = 0 ] ; then
%if 0%{?has_systemd_dirs}
systemctl stop %{binname}.service
systemctl disable %{binname}.service
systemctl stop %{binname}.service
systemctl disable %{binname}.service
%else
/sbin/service %{name} stop >/dev/null 2>&1
/sbin/chkconfig --del %{name}
/sbin/service %{name} stop >/dev/null 2>&1
/sbin/chkconfig --del %{name}
%endif
fi
@ -231,9 +231,9 @@ true
%files
# Userspace daemon
%{_sbindir}/%{binname}
%{_bindir}/%{binname}
# CLI (command line interface)
%{_sbindir}/%{binname}-ctl
%{_bindir}/%{binname}-ctl
# CLI table helper
%{_sbindir}/%{binname}-get-table
# init.d script and configuration file
@ -263,7 +263,7 @@ true
%if 0%{?with_transcoding} > 0
%files recording
# Recording daemon
%{_sbindir}/%{binname}-recording
%{_bindir}/%{binname}-recording
# Init script
%if 0%{?has_systemd_dirs}
%{_unitdir}/%{binname}-recording.service

Loading…
Cancel
Save