Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 511958 - net-misc/rsync - make unit file honor -c option
Summary: net-misc/rsync - make unit file honor -c option
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-31 12:44 UTC by putty_bug
Modified: 2014-07-20 14:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description putty_bug 2014-05-31 12:44:16 UTC
First: if emerging gentoo-rsync-mirror i receive the following messages....:

* RSYNC_OPTS=--config=/etc/rsync/rsyncd.conf needs
* to be set in /etc/conf.d/rsyncd to make allow syncing.
*
* The service can be started using /etc/init.d/rsyncd start
* If you are setting up an official mirror, don't forget to add

In case i use systemd /etc/rsync/rsyncd.conf won't be read because rsync only reads /etc/rsyncd.conf.
If i tell rsync to use an other config file all is fine 

So my solution for that problem was:

create my own /etc/systemd/system/rsyncd.service (which should be generally the gentoo rsync definition):

[Unit]
Description=rsync daemon
After=networking.target

[Service]
Type=simple
EnvironmentFile=/etc/conf.d/rsyncd
ExecStart=/usr/bin/rsync --daemon --no-detach ${RSYNC_OPTS}
StandardOutput=syslog
StandardError=syslog

[Install]
WantedBy=multi-user.target


The Changes different from the original rsyncd.service are:
EnvironmentFile=/etc/conf.d/rsyncd
ExecStart=/usr/bin/rsync --daemon --no-detach ${RSYNC_OPTS}

Conclusion: the same /etc/conf.d/rsyncd file will be used both in openrc and systemd

Second: a dependency to net-misc/rsync whould be nice...so: if i install net-misc/rsync, net-misc/rsync installes too.

with kind regards
putty

Reproducible: Always

Steps to Reproduce:
1.emerge -s gentoo-rsync-mirror
2.customize /etc/conf.d/rsyncd as decribed
3.systemctl start rsyncd.service
4.see that rsync is not willing to use /etc/conf.d/rsyncd
Actual Results:  
After adding my own /etc/systemd/system/rsyncd.service file, all is fine.

Expected Results:  
the gentoo-rsync-mirror ebuild should include a seperate /etc/systemd/system/gentoo-rsyncd.service file and a hint in the emerge messages how to start it.
Comment 1 Pacho Ramos gentoo-dev 2014-07-08 12:36:03 UTC
What do you want to supply at /etc/rsync/rsyncd.conf that cannot be added to /etc/rsyncd.conf?
Comment 2 putty_bug 2014-07-20 14:43:26 UTC
In principle: nothing.

The problem for me was: the emerge messages say:

* RSYNC_OPTS=--config=/etc/rsync/rsyncd.conf needs
* to be set in /etc/conf.d/rsyncd to make allow syncing.

But the emerge message only is for non-systemd-system valid.

For systemd-systems you might mention:
(1) you need an extra rsyncd.service entry in /etc/sytemd/system like the one i supplied
(2) you tell the user he should copy /etc/rsync/rsyncd.conf in to /etc/rsync.conf
  --> i think this is not the right way, because a new app-admin/gentoo-rsync-mirror release will overwrite app-admin/gentoo-rsync-mirror, but does not know that a copy is at /etc/rsync.conf. so i prever solution (1), with the advantage of using the "default" gentoo config directory /etc/conf.d

Thorsten