leamas / ddupdate

Update DNS Data for Dynamic IP Addresses
MIT License
40 stars 28 forks source link

Misconfigured install.conf #41

Closed ruedigerkupper closed 4 years ago

ruedigerkupper commented 4 years ago

The root cause here seems to be a misconfigured /usr/lib/python3/dist-packages/ddupdate/install.conf which reads (excerpt)

root = debian/tmp
install_purelib = debian/tmp/usr/lib/python3/dist-packages
install_platlib = debian/tmp/usr/lib/python3/dist-packages
install_lib = debian/tmp/usr/lib/python3/dist-packages/
install_headers = debian/tmp/usr/include/python3.7/ddupdate
install_scripts = debian/tmp/usr/bin
install_data = debian/tmp/usr

You should be able to walk around the problem by fixing this file. Note that the syntax warning needs to be fixd as well, but it should actually not be a blocking error.

Originally posted by @leamas in https://github.com/leamas/ddupdate/issues/40#issuecomment-643134377

ruedigerkupper commented 4 years ago

Fix committed in #40, needs building.

leamas commented 4 years ago

This is about the debian packaging: when building the debian package, the python files are installed under debian/tmp according to standard practices. But a file installled in debian/trmp/usr will eventually end up in /usr, so the packaging needs to patch the install.conf file to reflect this.

Nothing strange when I look at it now; still mystery how this worked in earlier releases, though.

leamas commented 4 years ago

There is a ppa build available at https://launchpad.net/~leamas-alec/+archive/ubuntu/ddupdate which should fix this issue on focal.

The regular Debian update is waiting for review at https://mentors.debian.net/package/ddupdate

ruedigerkupper commented 4 years ago

Thanks, great! There seems to be still some problem. ddupdate-config reports:

Starting service and displaying logs
Failed to connect to bus: Datei oder Verzeichnis nicht gefunden
Failed to connect to bus: Datei oder Verzeichnis nicht gefunden
No journal files were found.
-- No entries --
Use "journalctl --user -u ddupdate.service" to display logs.
Shall I run service regularly (Yes/No) [No]: Yes

Starting and enabling ddupdate.timer
Failed to connect to bus: Datei oder Verzeichnis nicht gefunden
Failed to connect to bus: Datei oder Verzeichnis nicht gefunden

And the service is not running :-/

ruedigerkupper commented 4 years ago

I'm running ddupdate as root, perhaps that's wrong. I want it to be configured as a system service … (Installing as a regular user seems to work.)

leamas commented 4 years ago

The intended usage is as regular user.

What would the advantage be of running as a system service?

ruedigerkupper commented 4 years ago

The service would run without any user logged in (or even configured). I know, ddupdate-conf mentions enabling user-lingering, but that appears a little awkward to me? On a machine where I am root, why configure a service like that as a user service – and then have some (root-)process installed that runs the service as the user? It's a fine feature that ddupdate can be run as a user service, as this enables a user to use it on machines, where she has no root access. But in the case you have root rights, it feels natural to have it as a system service. The machine we are talking about is my home and web server – a headless machine which would'nt even have any normal users configured unless I do so. If ddupdate wasn't a systemd service, I'd naturally have put it in /etc/crontab.

ruedigerkupper commented 4 years ago

BTW – I guess I just could put it into /etc/crontab, right?

leamas commented 4 years ago

BTW – I guess I just could put it into /etc/crontab, right?

I guess so. Still, crontab jobs are noway as flexible as systemd timers.

The machine we are talking about is my home and web server – a headless machine which would'nt even have any normal users configured unless I do so

Personally, I would probably just create a ddupdate user which runs the service and add lingering to it. IMHO a much cleaner and safer solution that running from crontab as root.

IMHO one should avoid running services as root if possible.

ruedigerkupper commented 4 years ago

You might be right. Can you point me to your reasons? (That has certainly been discussed elsewhere already, perhaps you have a link.) Actually, I like systemd a lot, I think it's a potent and flexible concept. Okay, so I'll have a ddupdate-user.

leamas commented 4 years ago

In any case. it looks like the very problem described in this bug is solved, right?

ruedigerkupper commented 4 years ago

Right. Thank you for being so quick. Regards!