Skip to content
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

Use an FHS 3.0 compliant pidpath #1032

Closed
wants to merge 1 commit into from

Conversation

brianhlin
Copy link

https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard#FHS_compliance

Modern Linux distributions include a /run directory as a temporary
filesystem (tmpfs) which stores volatile runtime data, following the
FHS version 3.0. According to the FHS version 2.3, this data should be
stored in /var/run but this was a problem in some cases because this
directory isn't always available at early boot. As a result, these
programs have had to resort to trickery, such as using /dev/.udev,
/dev/.mdadm, /dev/.systemd or /dev/.mount directories, even though the
device directory isn't intended for such data. Among other advantages,
this makes the system easier to use normally with the root filesystem
mounted read-only.

https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard#FHS_compliance

> Modern Linux distributions include a /run directory as a temporary
filesystem (tmpfs) which stores volatile runtime data, following the
FHS version 3.0. According to the FHS version 2.3, this data should be
stored in /var/run but this was a problem in some cases because this
directory isn't always available at early boot. As a result, these
programs have had to resort to trickery, such as using /dev/.udev,
/dev/.mdadm, /dev/.systemd or /dev/.mount directories, even though the
device directory isn't intended for such data. Among other advantages,
this makes the system easier to use normally with the root filesystem
mounted read-only.
@simonmichal
Copy link
Contributor

@brianhlin : thanks for the PR! However, I do see few issues :

  • the /run/xrootd directory is not packaged correctly, in the spec file we still have:

    mkdir -p $RPM_BUILD_ROOT%{_var}/run/xrootd

    %attr(-,xrootd,xrootd) %dir %{_var}/run/xrootd

    so need to replace %{_var}/run with %{_rundir}

  • also, we need to still suport rhel6, so your changes need to be conditional and e.g. for slc6 we need to keep /var/run

Could you please update the PR?

@brianhlin
Copy link
Author

Looking at this again, RHEL7 appears to symlink /var/run to /run so I don't think this change is strictly necessary

@brianhlin brianhlin closed this Sep 11, 2019
@brianhlin brianhlin deleted the fhs-compliant-pidpath branch September 11, 2019 15:16
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.

None yet

2 participants