The officially official Devuan Forum!

You are not logged in.

#1 2025-04-14 00:56:03

igorzwx
Member
Registered: 2024-05-06
Posts: 121  

How to change dependencies of a Debian package

There is a standard method with which to modify Debian packages.
We can use it to remove strange dependencies of strawberry_1.2.9-bookworm_amd64.deb (github)
_https://github.com/strawberrymusicplayer/strawberry/releases/tag/1.2.9

_https://github.com/strawberrymusicplayer/strawberry
Strawberry is a music player and music collection organizer. It is a fork of Clementine released in 2018 aimed at music collectors and audiophiles.

It is aimed at audiophiles in the sense, perhaps, that it depends on gstreamer1.0-pulseaudio. There is a common belief that Linux users, in general, and Linux audiophiles, in particular, tend to be semi-deaf and semi-blind, and, therefore, they want to use pulseaudio and all sorts of equalizers, amplifiers, and DACs to enhance high frequencies.

Why are high frequency sounds typically the first to go in hearing loss?

https://www.newyorkhearingdoctors.com/why-are-high-frequency-sounds-typically-the-first-to-go-in-hearing-loss/

Download: strawberry_1.2.9-bookworm_amd64.deb (github)

https://github.com/strawberrymusicplayer/strawberry/releases/download/1.2.9/strawberry_1.2.9-bookworm_amd64.deb
$ ls
strawberry_1.2.9-bookworm_amd64.deb
$ dpkg --info *.deb | grep Depends -B5
 Package: strawberry
 Version: 1.2.9-bookworm
 Architecture: amd64
 Maintainer: Jonas Kvinge <jonas@jkvinge.net>
 Installed-Size: 13869
 Depends: libasound2 (>= 1.0.16), libc6 (>= 2.34), libcdio19 (>= 2.1.0), libchromaprint1 (>= 1.3.2), libebur128-1 (>= 1.1.0), libfftw3-double3 (>= 3.3.10), libgcc-s1 (>= 3.0), libgdk-pixbuf-2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.51.0), libgpod4 (>= 0.7.0), libgstreamer-plugins-base1.0-0 (>= 1.0.0), libgstreamer1.0-0 (>= 1.6.0), libicu72 (>= 72.1~rc-1~), libmtp9 (>= 1.1.0), libpulse0 (>= 0.99.1), libqt6concurrent6 (>= 6.1.2), libqt6core6 (>= 6.4.0), libqt6dbus6 (>= 6.4.0), libqt6gui6 (>= 6.3.0), libqt6network6 (>= 6.4.0), libqt6sql6 (>= 6.1.2), libqt6widgets6 (>= 6.3.0), libsqlite3-0 (>= 3.6.11), libstdc++6 (>= 11), libtag1v5 (>= 1.11), libx11-6, libqt6sql6-sqlite, qt6-qpa-plugins, gstreamer1.0-plugins-base, gstreamer1.0-plugins-good, gstreamer1.0-alsa, gstreamer1.0-pulseaudio 

gstreamer1.0-alsa, gstreamer1.0-pulseaudio are, of course, pseudo-dependencies. They are not real dependencies in the sense that they can be safely removed.

Strawberry player is simply a GUI for GStreamer, and nothing more. Regardless of what you think GStreamer is, it does not depend on its plugins. It should be obvious that GStreamer plugins depend on GStreamer and not other way round.

There is a reason, of course, why the GStreamer package is split into "libgstreamer" and "plugins". If you have not been initiated into the secret knowledge of GStreamer, you may try to read its documentation
_https://gstreamer.freedesktop.org/documentation/installing/on-linux.html

ALSA users may want to install gstreamer1.0-alsa.
OSS4 users may want to remove gstreamer1.0-alsa, in order to use GStreamer based media players (e.g. Totem, Parole, and the like) with OSS4.

NOTE: ALSA users are recommended to install "gstreamer1.0-alsa". Otherwise, GStreamer may use "openalsink" with ALSA.
_https://gstreamer.freedesktop.org/documentation/openal/openalsink.html

It is not difficult to correct dependencies of a Debian package.

Install fakeroot

sudo apt install fakeroot
$ ls
strawberry_1.2.9-bookworm_amd64.deb

Open fakeroot console and execute mkdir debdir:

$ fakeroot
# mkdir debdir

# ls -1
debdir
strawberry_1.2.9-bookworm_amd64.deb

Unpack the deb package to debdir

# dpkg-deb -R *.deb debdir

# ls -1 ./debdir
DEBIAN
usr

# ls -1 ./debdir/DEBIAN
control
md5sums

# file ./debdir/DEBIAN/control
./debdir/DEBIAN/control: ASCII text, with very long lines (784)

Remove unwanted dependencies with a text editor:

# nano ./debdir/DEBIAN/control
Unable to create directory /root/.local/share/nano/: Permission denied
It is required for saving/loading search history or cursor positions. 

You may have noticed that nano is complaining about missing root privileges.
This is because "fakeroot" is not a real "root", as the name suggests.
Such complaints can be safely ignored.

# cat ./debdir/DEBIAN/control | grep Depends -B5 -A1
Package: strawberry
Version: 1.2.9-bookworm
Architecture: amd64
Maintainer: Jonas Kvinge <jonas@jkvinge.net>
Installed-Size: 13869
Depends: libasound2 (>= 1.0.16), libc6 (>= 2.34), libcdio19 (>= 2.1.0), libchromaprint1 (>= 1.3.2), libebur128-1 (>= 1.1.0), libfftw3-double3 (>= 3.3.10), libgcc-s1 (>= 3.0), libgdk-pixbuf-2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.51.0), libgpod4 (>= 0.7.0), libgstreamer-plugins-base1.0-0 (>= 1.0.0), libgstreamer1.0-0 (>= 1.6.0), libicu72 (>= 72.1~rc-1~), libmtp9 (>= 1.1.0), libpulse0 (>= 0.99.1), libqt6concurrent6 (>= 6.1.2), libqt6core6 (>= 6.4.0), libqt6dbus6 (>= 6.4.0), libqt6gui6 (>= 6.3.0), libqt6network6 (>= 6.4.0), libqt6sql6 (>= 6.1.2), libqt6widgets6 (>= 6.3.0), libsqlite3-0 (>= 3.6.11), libstdc++6 (>= 11), libtag1v5 (>= 1.11), libx11-6, libqt6sql6-sqlite, qt6-qpa-plugins, gstreamer1.0-plugins-base, gstreamer1.0-plugins-good
Suggests: gstreamer1.0-alsa, gstreamer1.0-pulseaudio 

Build the package:

# dpkg-deb -b debdir strawberry_1.2.9-devuan_amd64-fixed.deb
dpkg-deb: building package 'strawberry' in 'strawberry_1.2.9-devuan_amd64-fixed.deb'.

# ls -1 *.deb
strawberry_1.2.9-bookworm_amd64.deb
strawberry_1.2.9-devuan_amd64-fixed.deb

Exit fakeroot console

# exit
exit

Check dependencies

$ dpkg --info *fixed.deb | grep Depends -B5 -A1
 Package: strawberry
 Version: 1.2.9-bookworm
 Architecture: amd64
 Maintainer: Jonas Kvinge <jonas@jkvinge.net>
 Installed-Size: 13869
 Depends: libasound2 (>= 1.0.16), libc6 (>= 2.34), libcdio19 (>= 2.1.0), libchromaprint1 (>= 1.3.2), libebur128-1 (>= 1.1.0), libfftw3-double3 (>= 3.3.10), libgcc-s1 (>= 3.0), libgdk-pixbuf-2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.51.0), libgpod4 (>= 0.7.0), libgstreamer-plugins-base1.0-0 (>= 1.0.0), libgstreamer1.0-0 (>= 1.6.0), libicu72 (>= 72.1~rc-1~), libmtp9 (>= 1.1.0), libpulse0 (>= 0.99.1), libqt6concurrent6 (>= 6.1.2), libqt6core6 (>= 6.4.0), libqt6dbus6 (>= 6.4.0), libqt6gui6 (>= 6.3.0), libqt6network6 (>= 6.4.0), libqt6sql6 (>= 6.1.2), libqt6widgets6 (>= 6.3.0), libsqlite3-0 (>= 3.6.11), libstdc++6 (>= 11), libtag1v5 (>= 1.11), libx11-6, libqt6sql6-sqlite, qt6-qpa-plugins, gstreamer1.0-plugins-base, gstreamer1.0-plugins-good
 Suggests: gstreamer1.0-alsa, gstreamer1.0-pulseaudio

Install Strawberry

sudo dpkg -i strawberry_1.2.9-devuan_amd64-fixed.deb
$ strawberry --version
Strawberry 1.2.9

$ apt info strawberry | grep Package: -A2
Package: strawberry
Version: 1.2.9-bookworm
Status: install ok installed

You can also rename a Debian package, change version, add scripts to debdir/usr/bin, and so on.
Notice that it is immoral (and illegal) to insert malware into Debian packages.

To debug Strawberry, you can simply start it from terminal.

EXAMPLES:

Strawberry is using "openalsink" with ALSA:

$ strawberry 
...
22:24:48.921 DEBUG Player:776                       Playing song "" QUrl("file:///.../audio/audio_test_48kHz_16bit.flac") position 0
22:24:48.921 DEBUG GstEnginePipeline:459            Using "playbin" for pipeline
22:24:48.974 DEBUG GstEnginePipeline:797            Setting buffer duration: 4000000000 low watermark: 0.33 high watermark: 0.99
22:24:48.976 DEBUG GstEnginePipeline:480            "openalsink" does not have volume, using own volume.
...
[fftrate ALSA plugin output]
Input:  44100 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1764
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  44100 --> 48000 (J: 0.00%, T: FFT, W: Vorbis)
Ok.

Input:  48000 Hz, 2 ch, 's32_le' (0xa): dummy = 0, period = 1920
Output: 48000 Hz, 2 ch, 's16_le' (0x2): dummy = 0, period = 1920
Rates:  48000 --> 48000 (J: 0.00%, T: None, W: Planar)
Ok.

Strawberry is using "oss4sink" with OSS4:

$ strawberry 
...
22:16:51.126 DEBUG Player:776                       Playing song "" QUrl("file:///.../audio/audio_test_48kHz_16bit.flac") position 0
22:16:51.126 DEBUG GstEnginePipeline:459            Using "playbin" for pipeline
22:16:51.250 DEBUG GstEnginePipeline:626            "oss4sink" has volume, enabling volume synchronization.

Last edited by igorzwx (2025-04-14 01:07:55)

Offline

Board footer