Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | myMPD: Install latest master + fixes #2883

Merged
merged 11 commits into from
Jun 2, 2019
Merged

DietPi-Software | myMPD: Install latest master + fixes #2883

merged 11 commits into from
Jun 2, 2019

Conversation

MichaIng
Copy link
Owner

@MichaIng MichaIng commented Jun 1, 2019

Status: Testing

  • Reinstall on v6.25 patch to update existing instances, requires removal (+backup) of config file due to new required settings section
  • Changelog
  • Wiki software list update

Reference: #2156 (comment)

Commit list/description:

  • DietPi-Software | ympd: Use official non-capital letters naming
  • DietPi-Software | ympd: On uninstall, unmask and disable service to remove all possible traces
  • DietPi-Software | myMPD: Do not apply wrong "group" setting
  • DietPi-Software | myMPD: Add libmediainfo to dependencies to support internal album covers
  • DietPi-Software | myMPD: Install latest master release, which works well now

+ DietPi-Software | ympd: Use official non-capital letters naming
+ DietPi-Software | ympd: On uninstall, unmask and disable service to remove all possible traces
+ DietPi-Software | myMPD: Do not apply wrong "group" setting
+ DietPi-Software | myMPD: Add libmediainfo to dependencies to support internal album covers
+ DietPi-Software | myMPD: Install latest master release, which works well now
@MichaIng MichaIng added this to the v6.25 milestone Jun 1, 2019
@MichaIng MichaIng self-assigned this Jun 1, 2019
MichaIng added 7 commits June 2, 2019 00:40
+ DietPi-Patch | myMPD: Update to current master, reset of config file required
+ CHANGELOG | myMPD: Current upstream version will be installed now and existing instances will be upgraded
+ DietPi-Patch | Remove doubled myMPD reinstall
+ DietPi-Patch | myMPD: Remove config file before reinstalling
+ DietPi-Software | myMPD: Revert to systemd unit provided by installer, apply "dietpi" group via drop-in config
+ DietPi-Patch | myMPD: Remove obsolete own systemd unit before reinstall
@MichaIng
Copy link
Owner Author

MichaIng commented Jun 2, 2019

Strange magic is going on sometimes...

EDIT: Nope, explanation is that the service file cam from pre-PR version of myMPD which did not yet contain the bug 🙂!

  • Found /usr/lib/systemd/system/mympd.service being installed by installer and working nice. I actually didn't know that this path is read by systemd.
  • Since, besides "dietpi" group, the systemd unit is identical to ours, I reverted code to skip creating an own one, but applying "dietpi" group via drop-in config.
  • Testing this PR: systemd unit was NOT pre-created....
  • Ran installer manually:
...
Checking status of mympd system user and group
Installing systemd service
Failed to enable unit: File mympd.service: No such file or directory
mympd.conf installed as mympd.conf.dist
Fixing ownership of /var/lib/mympd
Certificates already created
myMPD installed
Edit /etc/mympd/mympd.conf before starting myMPD
root@VM-Stretch:/tmp/myMPD-master# getent passwd mympd
mympd:x:999:999::/var/lib/mympd:/usr/sbin/nologin
root@VM-Stretch:/tmp/myMPD-master# groups mympd
mympd : mympd audio dietpi
root@VM-Stretch:/tmp/myMPD-master# l /usr/lib/systemd/system/
total 0
  • So it states to install the service but it doesn't.
  • But it did well just 2 hours ago, when I tested the previous state... 😕

if [ -d /etc/systemd ]
then
  echo "Installing systemd service"
  [ -d /usr/lib/systemd/system ] || mkdir -p /usr/lib/systemd/system
  if [ ${SHAREDIR}/mympd.service -nt /usr/lib/systemd/system/mympd.service ]
  then
    cp ${SHAREDIR}/mympd.service /usr/lib/systemd/system/
    systemctl daemon-reload
  fi
  systemctl enable mympd
fi
root@VM-Stretch:/tmp/myMPD-master# l /usr/share/mympd/
total 16
-rwxr-xr-x 1 root root 2004 May 24 00:48 crcert.sh
drwxr-xr-x 5 root root 4096 Jun  2 02:00 htdocs
drwxr-xr-x 2 root root 4096 Jun  2 02:00 lib
-rw-r--r-- 1 root root  195 May 24 00:48 mympd.service
root@VM-Stretch:/tmp/myMPD-master# [ /usr/share/mympd/mympd.service -nt /usr/lib/systemd/system/mympd.service ] && echo yes
yes
root@VM-Stretch:/tmp/myMPD-master# cp /usr/share/mympd/mympd.service /usr/lib/systemd/system/
root@VM-Stretch:/tmp/myMPD-master# [ /usr/share/mympd/mympd.service -nt /usr/lib/systemd/system/mympd.service ] && echo yes
root@VM-Stretch:/tmp/myMPD-master# systemctl daemon-reload
root@VM-Stretch:/tmp/myMPD-master# systemctl start mympd # works well
  • I don't get it... Will check back tomorrow.

@MichaIng
Copy link
Owner Author

MichaIng commented Jun 2, 2019

Above issue identified: jcorporation/myMPD#124
Resolved with: jcorporation/myMPD#125

Lets hope for soon merge to master, so we don't need to do a workaround.

+ DietPi-Software | myMPD: Skip "mympd" user creation as this is done by installer, but add it to "dietpi" group
+ DietPi-Software | myMPD: Add workaround for current installer bug where systemd unit is not created/copied
@jcorporation
Copy link

I merged your pull request into master. Don't hesitate to open issues, if some install behaviour of myMPD creates problems with DietPi. I like to support DietPi.

@MichaIng
Copy link
Owner Author

MichaIng commented Jun 2, 2019

@jcorporation
Very nice, many thanks! I already added a workaround, as I thought you will release the fix with 5.4.0. But wonderful, then the install code will be finally what it should be 😃.

Don't hesitate to open issues, if some install behaviour of myMPD creates problems with DietPi. I like to support DietPi.

Many thanks, it works flawlessly now, but I will forward any issues/suggestions we find.

MichaIng added 2 commits June 2, 2019 23:19
+ DietPi-Software | myMPD: Workaround not required anymore, fix has been pushed to master :)
+ DietPi-Software | myMPD: Failsafe config adjustment and do not touch on reinstall
+ DietPi-Patch | myMPD: Remove ".dist" config file as well to assure our installer adjusts the new config file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants