Skip to content

Commit

Permalink
MT#54294 packaging for rtpengine-gpu
Browse files Browse the repository at this point in the history
Change-Id: Ida33db035754763a6709bb0bcdc001e8764b88f9
  • Loading branch information
rfuchs committed Sep 15, 2023
1 parent 2fa121c commit b3544be
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 3 deletions.
95 changes: 93 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Build-Depends:
libxmlrpc-core-c3-dev (>= 1.16.07),
libxtables-dev (>= 1.4) | iptables-dev (>= 1.4),
markdown,
ngcp-libcudecs-dev <pkg.ngcp-rtpengine.cudecs>,
pandoc,
python3,
python3-websockets,
Expand All @@ -53,6 +54,7 @@ Testsuite: autopkgtest-pkg-dkms

Package: ngcp-rtpengine-daemon
Architecture: any
Build-Profiles: <!pkg.ngcp-rtpengine.cudecs>
Multi-Arch: foreign
Recommends:
ngcp-rtpengine-perftest,
Expand All @@ -74,8 +76,8 @@ Description: proxy for RTP and media streams used in NGCP, userspace part

Package: ngcp-rtpengine-recording-daemon
Architecture: any
Build-Profiles: <!pkg.ngcp-rtpengine.cudecs !pkg.ngcp-rtpengine.no-transcoding>
Multi-Arch: foreign
Build-Profiles: <!pkg.ngcp-rtpengine.no-transcoding>
Recommends:
ngcp-rtpengine-utils,
Suggests:
Expand All @@ -100,6 +102,7 @@ Description: IPtables extension module for the kernel-space NGCP media proxy

Package: ngcp-rtpengine
Architecture: all
Build-Profiles: <!pkg.ngcp-rtpengine.cudecs>
Multi-Arch: foreign
Depends:
ngcp-rtpengine-daemon (>= ${source:Version}),
Expand Down Expand Up @@ -147,8 +150,8 @@ Description: scripts and Perl modules for NGCP rtpengine

Package: ngcp-rtpengine-perftest
Architecture: any
Build-Profiles: <!pkg.ngcp-rtpengine.cudecs !pkg.ngcp-rtpengine.no-transcoding>
Multi-Arch: foreign
Build-Profiles: <!pkg.ngcp-rtpengine.no-transcoding>
Depends:
ngcp-rtpengine-perftest-data (= ${source:Version}),
${misc:Depends},
Expand All @@ -169,3 +172,91 @@ Description: helper tool to test rtpengine transcoding performance - data files
base and produces performance and load statistics.
.
These are data files needed for the binary package.

Package: ngcp-rtpengine-daemon-gpu
Architecture: any
Build-Profiles: <pkg.ngcp-rtpengine.cudecs>
Multi-Arch: foreign
Conflicts:
ngcp-rtpengine-daemon,
Provides:
ngcp-rtpengine-daemon,
Recommends:
ngcp-rtpengine-perftest-gpu,
ngcp-rtpengine-recording-daemon-gpu,
ngcp-rtpengine-utils,
Suggests:
ngcp-system-tools,
Pre-Depends:
adduser,
${misc:Pre-Depends},
Depends:
iptables,
sysvinit-utils (>= 3.05-4~) | lsb-base (>= 3.0-6),
${misc:Depends},
${shlibs:Depends},
Description: proxy for RTP and media streams incl GPU transcoding, userspace part
This daemon handles the first stages of proxying media streams and talks to
the kernel part of the proxy for eventual high-performance packet forwarding.
This build includes support for GPU transcoding.

Package: ngcp-rtpengine-recording-daemon-gpu
Architecture: any
Multi-Arch: foreign
Build-Profiles: <pkg.ngcp-rtpengine.cudecs !pkg.ngcp-rtpengine.no-transcoding>
Conflicts:
ngcp-rtpengine-recording-daemon,
Provides:
ngcp-rtpengine-recording-daemon,
Recommends:
ngcp-rtpengine-utils,
Suggests:
ngcp-system-tools,
Depends:
nfs-common,
ngcp-rtpengine-daemon-gpu,
sysvinit-utils (>= 3.05-4~) | lsb-base (>= 3.0-6),
${misc:Depends},
${shlibs:Depends},
Description: recording daemon for RTP and media streams incl GPU transcodnig
This daemon handles the call recording (media intercept) component of rtpengine.
This build includes support for GPU transcoding.

Package: ngcp-rtpengine-gpu
Architecture: all
Build-Profiles: <pkg.ngcp-rtpengine.cudecs>
Multi-Arch: foreign
Conflicts:
ngcp-rtpengine,
Provides:
ngcp-rtpengine,
Depends:
ngcp-rtpengine-daemon-gpu (>= ${source:Version}),
ngcp-rtpengine-iptables (>= ${source:Version}),
ngcp-rtpengine-kernel-dkms (>= ${source:Version}),
ngcp-rtpengine-perftest-gpu (>= ${source:Version}),
ngcp-rtpengine-recording-daemon-gpu (>= ${source:Version}),
ngcp-rtpengine-utils (>= ${source:Version}),
${misc:Depends},
Description: NGCP RTP/media proxy incl GPU transcoding - meta package
This is a meta package for easy installation of all four parts of the NGCP
media proxy. It will install the user-space daemon, the kernel-space IPtables
module, the IPtables extension module and utility scripts.
This build includes support for GPU transcoding.

Package: ngcp-rtpengine-perftest-gpu
Architecture: any
Multi-Arch: foreign
Build-Profiles: <!pkg.ngcp-rtpengine.no-transcoding pkg.ngcp-rtpengine.cudecs>
Conflicts:
ngcp-rtpengine-perftest,
Provides:
ngcp-rtpengine-perftest,
Depends:
ngcp-rtpengine-perftest-data (= ${source:Version}),
${misc:Depends},
${shlibs:Depends},
Description: helper tool to test rtpengine transcoding performance incl GPU transcoding
This interactive tool simulates transcoding scenarios using the rtpengine code
base and produces performance and load statistics.
This build includes support for GPU transcoding.
28 changes: 28 additions & 0 deletions debian/generate-gpu-dh-fragments.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
for pkg in ngcp-rtpengine-daemon ngcp-rtpengine-recording-daemon ngcp-rtpengine-perftest; do
for file in "$pkg".*; do
if test -f "$file"; then
suffix=${file#"$pkg".}
cp -v "$pkg"."$suffix" "$pkg"-gpu."$suffix"
fi
done
for file in "$pkg"@.*; do
if test -f "$file"; then
suffix=${file#"$pkg"@.}
cp -v "$pkg"@."$suffix" "$pkg"-gpu@."$suffix"
fi
done
if test -f "$pkg"-gpu.links; then
rm -vf "$pkg"-gpu.links.tmp
while read -r line; do
# rewrite link from original 'rtpengine-daemon.service -> ngcp-rtpengine-daemon.service'
# ... to 'rtpengine-daemon-gpu.service -> ngcp-rtpengine-daemon-gpu.service'
echo "$line" | sed 's/\(@\?\)\.service/-gpu\1.service/g' >> "$pkg"-gpu.links.tmp
# add link 'rtpengine-daemon.service -> ngcp-rtpengine-daemon-gpu.service'
echo "$line" | sed 's/\(@\?\)\.service/-gpu\1.service/' >> "$pkg"-gpu.links.tmp
# add link 'ngcp-rtpengine-daemon.service -> ngcp-rtpengine-daemon-gpu.service'
echo "$line" | sed 's/\(@\?\)\.service/-gpu\1.service/; s,system/rtpengine,system/ngcp-rtpengine,' >> "$pkg"-gpu.links.tmp
done < "$pkg"-gpu.links
mv -v "$pkg"-gpu.links.tmp "$pkg"-gpu.links
fi
done
7 changes: 7 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,21 @@ export FIXTURES_PATH = /usr/share/rtpengine-perftest

execute_before_dh_auto_configure:
(cd debian && sh generate-systemd-templates.sh)
ifneq (,$(filter $(DEB_BUILD_PROFILES),pkg.ngcp-rtpengine.cudecs))
(cd debian && ./generate-gpu-dh-fragments.sh)
endif

execute_before_dh_auto_install-indep:
# markdown README
markdown README.md | gzip -9 > debian/README.html.gz
gzip -9 < README.md > debian/README.md.gz

execute_after_dh_installsystemd:
ifneq (,$(filter $(DEB_BUILD_PROFILES),pkg.ngcp-rtpengine.cudecs))
dh_installsystemd -pngcp-rtpengine-recording-daemon-gpu --name=ngcp-rtpengine-recording-nfs-mount
else
dh_installsystemd -pngcp-rtpengine-recording-daemon --name=ngcp-rtpengine-recording-nfs-mount
endif

override_dh_dkms:
dh_dkms -p$(DEB_SOURCE)-kernel-dkms -V $(DEB_VERSION_UPSTREAM)
3 changes: 2 additions & 1 deletion pkg/deb/generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ while read -r file; do
rm "${file}"
done < <(find debian -name '*links')

echo "- Remove NGCP packages from Suggests"
echo "- Remove NGCP packages from control"
sed -i -e '/ngcp-system-tools/d' debian/control
sed -i -e '/ngcp-libcudecs/d' debian/control

echo "- Set package-specific homepage"
sed -i -e 's,^Homepage:.*,Homepage: https://rtpengine.com/,' debian/control
Expand Down

0 comments on commit b3544be

Please sign in to comment.