Skip to content

Moving to rsyncd.conf from /etc to hermetic-usr pattern. #551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

schubi2
Copy link

@schubi2 schubi2 commented Nov 29, 2023

In order to fulfill the UAPI Group Specifications regarding configuration files:
https://uapi-group.org/specifications/specs/configuration_files_specification/
we are adapting "main" packages.
Fortunately rsync has already similar way. So only few changes are needed for it :-)

@schubi2 schubi2 changed the title Moving to rsyncd.conf from /etc to /usr/etc Moving to rsyncd.conf from /etc to hermetic-usr pattern. Nov 30, 2023
Copy link
Member

@tridge tridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after the fix please describe the testing you have done

config_file = RSYNCD_SYSCONF;
#ifdef RSYNCD_DISTCONF
STRUCT_STAT st;
if (do_stat(RSYNCD_SYSCONF, &st) != 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is odd - do_stat() returns 0 on finding the file. So you are using the file only if it doesn't exist?

Copy link
Author

@schubi2 schubi2 Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is odd - do_stat() returns 0 on finding the file. So you are using the file only if it doesn't exist?

Yes, then RSYNCD_DISTCONF will be used. So, how it should be changed ?

Regarding testing: openSUSE is using this patch since Nov 29 12:34:30 UTC 2023 without any problem:
Changelog:
Wed Nov 29 12:34:30 UTC 2023 - Stefan Schubert [email protected]

  • Moved rsyncd.conf and rsyncd.secrets to /usr/etc.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is odd - do_stat() returns 0 on finding the file. So you are using the file only if it doesn't exist?

Let me try to explain it again:

RSYNCD_DISTCONF = "/usr/etc/rsyncd.conf"
RSYNCD_SYSCONF "/etc/rsyncd.conf"

RSYNCD_DISTCONF comes from the distribution and is included by e.g. a RPM.
RSYNCD_SYSCONF is a user changed file and MUST NOT be overwritten by a package update and has more priority than RSYNCD_DISTCONF.
So if RSYNCD_SYSCONF is not there the default RSYNCD_DISTCONF will be take for parsing.

@schubi2
Copy link
Author

schubi2 commented May 22, 2025

Sorry, I have overseen this PR. Is there still something open here ?

@tridge tridge force-pushed the moving_to_usr_etc branch from b1ec4c8 to dfaa2a7 Compare August 23, 2025 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants