Package Details: mpdpopm-bin 0.3.3-1

Git Clone URL: https://aur.archlinux.org/mpdpopm-bin.git (read-only, click to copy)
Package Base: mpdpopm-bin
Description: Maintain ratings & playcounts for your mpd server (pre-compiled)
Upstream URL: https://github.com/sp1ff/mpdpopm
Licenses: GPL-3.0-or-later
Conflicts: mpdpopm
Provides: mpdpopm
Submitter: sp1ff
Maintainer: sp1ff
Last Packager: sp1ff
Votes: 0
Popularity: 0.000000
First Submitted: 2024-05-10 22:12 (UTC)
Last Updated: 2024-05-10 22:12 (UTC)

Latest Comments

m040601 commented on 2024-10-15 20:26 (UTC) (edited on 2024-10-15 21:07 (UTC) by m040601)

Some many months (years ?) ago, I tried mpdpopm on Archlinux and I think i had some sucess. Cant remeber exactly, but I think I saw some stuff actually written to the sticker database.

Today I am trying the Archlinux specific PKGBUILDS.

TLDR:

  • I cant get it to work on Arch.
  • I must say i find myself again very confused and always tripping with tthe names :

"mpdpopm" the project name "mppopm" and "mppompd" the name of the "tools".

Here is my feedback.

  1. using systemd
  2. manually

  3. using systemd pacman -Ql mpdpopm-bin

mpdpopm-bin /etc/mppopmd.conf
mpdpopm-bin /usr/bin/mppopm
mpdpopm-bin /usr/bin/mppopmd
mpdpopm-bin /usr/lib/systemd/user/mppopmd.service
mpdpopm-bin /usr/share/info/mpdpopm.info.gz

The content of that /usr/lib/systemd/user/mppopmd.service is:

# MPPOPMD SYSTEMD UNIT
# You will likely need to edit this to suit your particular installation.
[Unit]
Description=mpdpopm ratings and playcounts for MPD
Requires=mpd.service
After=mpd.service

[Service]
Restart=on-failure
ExecStart=/usr/local/bin/mppopmd -F

[Install]
WantedBy=default.target

This does not work on Archlinux:

ExecStart=/usr/local/bin/mppopmd -F

It should be "/usr/bin" right ???

Additionally, mppopmd --help

Options:
  -F, --no-daemon        do not daemonize; remain in foreground
  -c, --config <config>  path to configuration file [default: /usr/local/etc/mppopmd.conf]
  -v, --verbose          enable verbose logging
  -d, --debug            enable debug logging (implies --verbose)
  -h, --help             Print help (see more with '--help')

So that .conf file is hard-coded to "/usr/local/etc/mppopmd.conf"

Where does this all "/usr/local" thing comes from ? Debian ? It is not a Archlinux thing.

exception: Failed to bind to '0.0.0.0:6600'; Failed to bind socket: Address already in use
mpd.service: Main process exited, code=exited, status=1/FAILURE
mpd.service: Failed with result 'exit-code'.
Failed to start Music Player Daemon.
Dependency failed for mpdpopm ratings and playcounts for MPD.
mppopmd.service: Job mppopmd.service/start failed with result 'dependency'.
  1. manually

I edited the shipped "/etc/mppopmd.conf" and ONLY CHANGED these two lines


 ;;(log . "/usr/local/share/log/mppopmd.log")
 (log . "/dev/shm/loggy.txt")
 ;; (local_music_dir . "/usr/local/Music")
 (local_music_dir . "/mnt/label500/music/")

echo hello > /dev/shm/loggy.txt

$ /usr/bin/mppopmd -v -F -c /etc/mppopmd.conf

[2024-10-15T21:40:57.949907090+01:00][mppopmd] mppopmd 0.3.3 logging at level Debug.
[2024-10-15T21:40:57.950698076+01:00][mpdpopm] mpdpopm 0.3.3 beginning (PID 413655).
[2024-10-15T21:40:57.953444527+01:00][mpdpopm::clients] Connected 0.23.5.
[2024-10-15T21:40:57.961977692+01:00][mpdpopm::clients] Connected 0.23.5.
[2024-10-15T21:40:57.962294477+01:00][mpdpopm::clients] Sent subscribe message for unwoundstack.com:commands; got `OK
'.
[2024-10-15T21:40:57.965523929+01:00][mpdpopm::clients] Subscribed to unwoundstack.com:commands.
[2024-10-15T21:40:57.966457175+01:00][mpdpopm] selecting...
[2024-10-15T21:40:57.970653116+01:00][mpdpopm] output status is Ok(
    Output {
        status: ExitStatus(
            unix_wait_status(
                0,
            ),
        ),
        stdout: "/dev/shm\n",
        stderr: "",
    },
)
[2024-10-15T21:40:57.970860885+01:00][mpdpopm] No database update needed
[2024-10-15T21:40:57.970890217+01:00][mpdpopm] No more commands to process.

I then try to issue some "mppopm" commands.

I do not have a ~/.mppopm.conf I do not have a ~/.config/mpdpopm/mppopmd.conf I do not have a ~/.config/mpdpopm/mppopm.conf

I assume this to be OK because I dont customize anything. So mpdpopm should use all its default channels and variables. Although the documentation is not very clear.

Do you actually need a "mppopm.conf" ? If so is it hard coded to ~/.mppopm.conf ?

$ mppopm get-pc
0

$ mppopm get-rating
0
$ mppopm set-rating '***'

Error: Client error: Protocol error (SendMessage): ACK [50@0] {sendmessage} nobody is subscribed to this channel


$ mppopm set-pc '3'
Error: Client error: Protocol error (SendMessage): ACK [50@0] {sendmessage} nobody is subscribed to this channel

Additionaly I find it extremely difficult to stop the manually started daemon:

  • Control-c does not work
  • killall "mppopmd" does not work
  • killall -9 mppopmd works

m040601 commented on 2024-10-15 20:11 (UTC) (edited on 2024-10-15 21:18 (UTC) by m040601)

Thanks for the "-bin" PKGBUILD. Very useful.

pacman -Ql mpdpopm-bin

mpdpopm-bin /etc/mppopmd.conf
mpdpopm-bin /usr/bin/mppopm
mpdpopm-bin /usr/bin/mppopmd
mpdpopm-bin /usr/lib/systemd/user/mppopmd.service
mpdpopm-bin /usr/share/info/mpdpopm.info.gz

But you have much more inside the released tar.gz

$ tar tf mpdpopm-0.3.3-x86_64-unknown-linux.tar.gz

mpdpopm-0.3.3-x86_64-unknown-linux/bin/mppopm
mpdpopm-0.3.3-x86_64-unknown-linux/bin/mppopmd
mpdpopm-0.3.3-x86_64-unknown-linux/doc/THANKS
mpdpopm-0.3.3-x86_64-unknown-linux/doc/mppopmd.conf
mpdpopm-0.3.3-x86_64-unknown-linux/doc/COPYING
mpdpopm-0.3.3-x86_64-unknown-linux/doc/mppopmd.service
mpdpopm-0.3.3-x86_64-unknown-linux/doc/AUTHORS
mpdpopm-0.3.3-x86_64-unknown-linux/doc/README.org
mpdpopm-0.3.3-x86_64-unknown-linux/doc/ChangeLog
mpdpopm-0.3.3-x86_64-unknown-linux/doc/mpdpopm.info
mpdpopm-0.3.3-x86_64-unknown-linux/doc/NEWS

These are useful to keep up with things. Same people prefer the simple README, dont like the "info". Dont trash them. Please make sure these also end up in something like

/usr/share/doc/ChangeLog
/usr/share/doc/NEWS
/usr/share/doc/README.org

You also need to copy LICENSE to

/usr/share/licenses/mpdpopm/LICENSE

Additionaly I personally think the best thing would be to ship some "example" files . Explicitly named as example. Not to "etc" but to "doc". And make it very clear if and when they are needed.

/usr/share/doc/mpdpopm/mppopmd.conf.example
/usr/share/doc/mpdpopm/mppopm.conf.example

For both "mpdpopm" "mpdpopm-git" and "mpdpopm-bin".

Thanks in advance.