Summary: | net-ftp/vsftpd - add systemd unit with socket-based activation | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Henry Gebhardt <hsggebhardt> |
Component: | [OLD] Server | Assignee: | Markos Chandras (RETIRED) <hwoarang> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bugs, net-ftp, proxy-maint, systemd, wired |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 448882 |
Description
Henry Gebhardt
2013-09-01 15:02:51 UTC
In Fedora and Arch I see they also provide a vsftpd@.serivice one (but not socket), also, reading that @ one, doesn't seem to have stuff that would vary, like: http://pkgs.fedoraproject.org/cgit/vsftpd.git/tree/vsftpd@.service (In reply to Pacho Ramos from comment #1) > In Fedora and Arch I see they also provide a vsftpd@.serivice one (but not > socket), also, reading that @ one, doesn't seem to have stuff that would > vary, like: > http://pkgs.fedoraproject.org/cgit/vsftpd.git/tree/vsftpd@.service Hm, I don't really like the Fedora one, since it is forking, and there is no checking or overriding of the configuration. The @ can be used in two different ways. The Fedora unit file uses it to support multiple instances with different configuration files. For the socket-activation I used the @ so as not to conflict with the unit file vsftpd.service which is already included in gentoo. However, we could easily reverse which one contains the @ in its name, which is what the option Accept= is for in the .socket file. (In reply to Henry Gebhardt from comment #2) > The @ can be used in two different ways. The Fedora unit file uses it to > support multiple instances with different configuration files. For the > socket-activation I used the @ so as not to conflict with the unit file > vsftpd.service which is already included in gentoo. However, we could easily > reverse which one contains the @ in its name, which is what the option > Accept= is for in the .socket file. I guess, the socket one could reuse already existing .service file? (without needing to add the "@" one) (In reply to Pacho Ramos from comment #3) > (In reply to Henry Gebhardt from comment #2) > > The @ can be used in two different ways. The Fedora unit file uses it to > > support multiple instances with different configuration files. For the > > socket-activation I used the @ so as not to conflict with the unit file > > vsftpd.service which is already included in gentoo. However, we could easily > > reverse which one contains the @ in its name, which is what the option > > Accept= is for in the .socket file. > > I guess, the socket one could reuse already existing .service file? (without > needing to add the "@" one) Unfortunately, this does not work. I slightly misunderstood what the manpages were saying. If I am not mistaken, then vsftpd would need special support for systemd (see man sd_listen_fds) if not using the @ one for socket-activation. (Btw, sshd may be of interest here as it provides a precedence.) (In reply to Pacho Ramos from comment #3) > (In reply to Henry Gebhardt from comment #2) > > The @ can be used in two different ways. The Fedora unit file uses it to > > support multiple instances with different configuration files. For the > > socket-activation I used the @ so as not to conflict with the unit file > > vsftpd.service which is already included in gentoo. However, we could easily > > reverse which one contains the @ in its name, which is what the option > > Accept= is for in the .socket file. > > I guess, the socket one could reuse already existing .service file? (without > needing to add the "@" one) With "Accept=yes" socket activation acts like an inetd and template service (with "@") is needed. From SYSTEMD.SOCKET(5): "For each socket file a matching service file (see systemd.service(5) for details) must exist, describing the service to start on incoming traffic on the socket. Depending on the setting of Accept= (see below), this must either be named like the socket unit, but with the suffix replaced; or it must be a template file named the same way. Example: a socket file foo.socket needs a matching service foo.service if Accept=false is set. If Accept=true is set a service template file foo@.service must exist from which services are instantiated for each incoming connection." Ah, ok, thanks a lot (I am still learning a lot about all systemd stuff ;)). Will review this when I have a bit of time +*vsftpd-3.0.2-r2 (03 Sep 2013) + + 03 Sep 2013; Pacho Ramos <pacho@gentoo.org> +files/vsftpd.socket, + +files/vsftpd_at.service, +vsftpd-3.0.2-r2.ebuild: + Add support for socket activation (#483270 by Henry Gebhardt and Alexander + Tsoy) + |