Bug#1038416: possible fix

Francesco P. Lovergine frankie at debian.org
Wed Jun 21 08:58:35 BST 2023


severity 1038416 serious
tags 1038416 + patch bookworm
thanks


Hi all,

Here we go, there is a better solution. 

It is possible to install and enable a third unit file such as:

+++ /etc/systemd/system/proftpd-run.service:

[Unit]
Description=ProFTPD FTP Server in standalone/socket mode
OnFailure=proftpd.socket
OnSuccess=proftpd.service

[Service]
Type=oneshot
Environment=CONFIG_FILE=/etc/proftpd/proftpd.conf
EnvironmentFile=-/etc/default/proftpd
ExecStart=/usr/bin/grep -iqE '^[[:space:]]*ServerType[[:space:]]+standalone$' $CONFIG_FILE
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Here one can enable only this service and install only the other ones.

systemctl disable proftpd.service
systemctl disable proftpd.socket
systemctl enable --now proftpd-run.service

do the task.

I would add this solution to git and prepare an ad hoc p-u for bookworm, but 
I'd prefer having a go from the release team, before that.

- cheers


On Tue, Jun 20, 2023 at 08:42:57PM +0200, Francesco P. Lovergine wrote:
>For reference, all this is a side effect of the proposed fix for #991266,
>strangely not caught at the time.
>
>On Tue, Jun 20, 2023 at 08:00:19PM +0200, Francesco P. Lovergine wrote:
>>Bruno, that's right
>>
>>Unfortunately yes: originally the socket unit file was concepted as an example
>>file to keep into the documentation and the Conflicts there does not 
>>ensure that the .socket unit is ignored when the .service is 
>>enabled.
>>
>>The simplest workaroud is
>>
>>systemctl disable --now proftpd.socket
>>systemctl enable --now proftpd.service
>>
>>but the initial installation is definitively broken, because proftpd 
>>starts as a systemd socket, which is not intended by the distributed 
>>proftpd.conf.
>>
>>Hilmar, the simplest thing to do is probably addig a mask/disable of proftpd.socket at postinst time,
>>and an enable --now for the proftpd.service, when server should be 
>>run in standalone mode (check via grepping proftpd.conf), after 
>>installing systemd stuff in --no-enable --no-start mode.
>>
>>This is of course not completely fair because ignores xinetd/inetd setup.
>>
>
>-- 
>Francesco P. Lovergine
>
>_______________________________________________
>Pkg-proftpd-maintainers mailing list
>Pkg-proftpd-maintainers at alioth-lists.debian.net
>https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-proftpd-maintainers
>

-- 
Francesco P. Lovergine



More information about the Pkg-proftpd-maintainers mailing list