Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-88772

fix: files and templates in nested directories are not placed correctly

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • rhel-system-roles
    • 0
    • QE ack, Dev ack
    • False
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Red Hat Enterprise Linux
    • None
    • Bug Fix
    • Hide
      .The `systemd` role uses file basename to construct the path to the destination

      Before this update, if a user specified a file or a template source within a nested directory, the `systemd` RHEL system role used the whole path instead of the basename for the destination file. As a consequence, files and templates were placed in the same directory structure on the destination, which `systemd` does not support. With this release, the role uses basenames for destination files in nested directories. As a result, users can use nested directories with the role.
      Show
      .The `systemd` role uses file basename to construct the path to the destination Before this update, if a user specified a file or a template source within a nested directory, the `systemd` RHEL system role used the whole path instead of the basename for the destination file. As a consequence, files and templates were placed in the same directory structure on the destination, which `systemd` does not support. With this release, the role uses basenames for destination files in nested directories. As a result, users can use nested directories with the role.
    • Done
    • Done
    • Done
    • Not Required
    • None

      Cause: If the user specified a file or template source within a nested
      directory, the role was using the whole path and not just the basename
      for the name of the destination file.

      Consequence: The role was trying to place files and templates in the
      same directory structure on the destination, which is not supported
      by systemd.

      Fix: Ensure the basename of the given file or template is used to
      construct the path to the destination.

      Result: The role works even when the source files and templates are
      in nested directories.

      NOTE: If you were relying on the old broken code to make deeply nested
      systemd and drop-in directories on the destination, and that somehow
      was working, it will no longer be working.

      Signed-off-by: Rich Megginson <rmeggins@redhat.com>

              rmeggins@redhat.com Richard Megginson
              rmeggins@redhat.com Richard Megginson
              Richard Megginson Richard Megginson
              David Jez David Jez
              Valentina Ashirova Valentina Ashirova
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: