Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Idea: ntpdate installation in moode audio
#1
Hi,

I would like to synchronize my two Raspberry Pi's, on which moode Audio is installed, with my time server in the home network. 
Preferably I would like
 
0 * * * * /usr/sbin/ntpdate -s XXX.XXX.XXX.XXX

in crontab -e.

But now when I try to install ntpdate, various other files are supposed to be uninstalled because they are no longer needed. 
Therefore I have canceled the installation for the time being.
What is the best way to do this or can I specify my own time server somewhere else under moode?

Thanks for any suggestions.
Greetings, Carsten
Reply
#2
It's not clear to me why you need this degree of time synchronization but since you would like to, let's consider what happened.

I just tried installing ntpdate on a moOde 9.1.4 player. The package manager apt offered to install it along with 3 related packages 

Code:
The following additional packages will be installed:
 ntpsec-ntpdate ntpsec-ntpdig python3-ntp
The following NEW packages will be installed:
 ntpdate ntpsec-ntpdate ntpsec-ntpdig python3-ntp
0 upgraded, 4 newly installed, 0 to remove and 12 not upgraded.


When I accepted the proposed install, apt did so without suggesting there were now packages no longer needed which could be removed.

What release of moOde are you working with and have you installed anything else on it?

As to the message in question, it's merely advisory---you can accept or reject the removal.  If it makes you uneasy, just leave them installed.

Regards,
Kent
Reply
#3
Hi Kent,

Ok, the usefulness of my idea is debatable, but since I have set it up this way on all my different RPI`s, the Pi's with moode audio should not be missing.

The installation of ntpdate on an RPi 2 with moode audio version 8.3.9 worked now
without any problems.

However, the installation on an RPi 3B+ resulted in the following message:

Host: moOde
RPiOS: 12.6 Bookworm 64-bit | Linux: 6.6.51 64-bit
Model: Pi-3B+ 1GB
Audio: HiFiBerry DAC+


       m o O d e a u d i o p l a y e r

             Release 9.1.4 2024-10-26
               © 2014 Tim Curtis


The programs contained in moOde are free software; the exact
exact conditions for the distribution of each program are described in the
in the individual files in /usr/share/doc/*/copyright or
or in the moOde source files. moOde is distributed with absolutely
no warranties, express or implied, or any other
such warranties.

** To change the password for your user ID, type 'passwd'.

Last login: Wed Nov 6 14:14:20 2024 from 10.0.0.241
pi@moOde:~ $ sudo su
root@moOde:/home/pi# apt install ntpdate
Read package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
 libmd4c0 libqt5dbus5 libqt5gui5 libqt5network5 libqt5qml5 libqt5qmlmodels5 libqt5quick5 libqt5svg5 libqt5waylandclient5 libqt5waylandcompositor5 libqt5widgets5 libxcb-icccm4
 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-util1 libxcb-xinerama0 libxcb-xinput0 linux-headers-6.6.31+rpt-common-rpi linux-headers-6.6.31+rpt-rpi-2712
 linux-headers-6.6.31+rpt-rpi-v8 linux-image-6.6.31+rpt-rpi-2712 linux-image-6.6.31+rpt-rpi-v8 linux-kbuild-6.6.31+rpt qt5-gtk-platformtheme qtwayland5
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
 ntpsec-ntpdate ntpsec-ntpdig python3-ntp
The following NEW packages will be installed:
 ntpdate ntpsec-ntpdate ntpsec-ntpdig python3-ntp
0 upgraded, 4 newly installed, 0 to remove and 78 not upgraded.
Need to get 177 kB of archives.
After this operation, 620 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Abort.
root@moOde:/home/pi#

I can only answer that with [n], because otherwise my system might be affected!

Best regards,
Carsten
Greetings, Carsten
Reply
#4
But note what is actually said


Code:
The following packages were automatically installed and are no longer required:
libmd4c0 libqt5dbus5 libqt5gui5 libqt5network5 libqt5qml5 libqt5qmlmodels5 libqt5quick5 libqt5svg5 libqt5waylandclient5 libqt5waylandcompositor5 libqt5widgets5 libxcb-icccm4
libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-util1 libxcb-xinerama0 libxcb-xinput0 linux-headers-6.6.31+rpt-common-rpi linux-headers-6.6.31+rpt-rpi-2712
linux-headers-6.6.31+rpt-rpi-v8 linux-image-6.6.31+rpt-rpi-2712 linux-image-6.6.31+rpt-rpi-v8 linux-kbuild-6.6.31+rpt qt5-gtk-platformtheme qtwayland5
Use 'sudo apt autoremove' to remove them.


Dunno where those packages came from. Was this an in-place update of a previous moOde release?.

Anyway, just don't run sudo apt autoremove if you don't want to remove them.

As an aside, obviously sudo su can allow you to run interactive commands as root but it's considered better practice just to run the commands prefaced by sudo.


Regards,
Kent
Reply
#5
(11-06-2024, 01:30 PM)Falconcrest Wrote: Hi,

I would like to synchronize my two Raspberry Pi's, on which moode Audio is installed, with my time server in the home network. 
Preferably I would like
 
0 * * * * /usr/sbin/ntpdate -s XXX.XXX.XXX.XXX

in crontab -e.

But now when I try to install ntpdate, various other files are supposed to be uninstalled because they are no longer needed. 
Therefore I have canceled the installation for the time being.
What is the best way to do this or can I specify my own time server somewhere else under moode?

Thanks for any suggestions.

Why?  Let them sync using the default OS config and be done with it.  I suspect that you are over-thinking things here.

Reply
#6
I mean, it was a new installation 1-2 versions of moode audio ago with prior export of the settings and subsequent import into the new installation. But you are right, 1-2 times an in-place upgrade has been done in the meantime.

I will take the sudo su thing into account in future.

Another slightly different question:
Is it still valid to avoid apt update, apt upgrade etc. and better to work only with the updates of moode Audio?
Greetings, Carsten
Reply
#7
I admit, it's perhaps a little playful after all! ?
Greetings, Carsten
Reply
#8
(11-06-2024, 08:06 PM)Falconcrest Wrote: Is it still valid to avoid apt update, apt upgrade etc. and better to work only with the updates of moode Audio?

Yes.

P.S.
all those qt packages look weird to me; I think I've also seen a gtk-something one. They are not, AFAIK, in the moOde distribution. Maybe you tried to install some software that pulled them in...?
Reply
#9
I don't really know where the packages could come from.
The only thing that is certainly different to a "standard" installation is that I don't use an SD card, but an SSD connected via USB and an RTC is installed.
Greetings, Carsten
Reply
#10
(11-07-2024, 04:13 AM)Falconcrest Wrote: I don't really know where the packages could come from.
The only thing that is certainly different to a "standard" installation is that I don't use an SD card, but an SSD connected via USB and an RTC is installed.

To quote my farmer grandfather, “if it ain’t broke, don’t be fixing it.” 

That was usually directed at my uncle who was always fiddling with his tractor.

I expect those packages were in an earlier release of moOde. However they got there, they can stay if nothing else in the current release is complaining or they can go if none of them is supporting some app which depends only on one or more of them. If you’re uncomfortable removing them, then don’t.

If you make a backup of your current configuration first, then the worst that can happen is you have to make a fresh install of moOde 9.1.4 and reload the backup.

Regards,
Kent
Reply


Forum Jump: