Initially the bug report was shot down by systemd developer Luca Boccassi of Microsoft with:

So an option that is literally documented as saying “all files and directories created by a tmpfiles.d/ entry will be deleted”, that you knew nothing about, sounded like a “good idea”? Did you even go and look what tmpfiles.d entries you had beforehand?

Maybe don’t just run random commands that you know nothing about, while ignoring what the documentation tells you? Just a thought eh"

Good devs, good product, I’m really excited about our shitty, shitty future.

  • Nibodhika@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    12 days ago

    For anyone defending the dev ensure you have the version before this patch and run systemd-tmpfiles --purge just a heads up, it will delete your home because /usr/lib/tmpfiles.d/home.conf exists and lists your home as a temporary file. This is a HUGE issue, tmpfiles.d default behavior is to list /home as a temporary dir, that should NOT be the case. Their fix is also sort of bullshit, instead of removing home as a tmpdir they made it so that you need to specify which files to purge.

      • Laser@feddit.de
        link
        fedilink
        arrow-up
        0
        ·
        12 days ago

        E.g. for quick provisioning of containers or virtual machines, this is also to make sure the required directories always exist. In a normal distribution, /home already exists, so systemd-tmpfiles does nothing, but there are cases where you want to setup a standard directory structure and this is a declarative alternative to scripts with a lot of mkdir, chmod and chown.

        The name systemd-tmpfiles is kind of historic at this point, but wasn’t changed due to backwards compatibility and all.

        • Nibodhika@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          12 days ago

          Then those containers or virtual machines should add this or create the home as needed. Having/home listed as a tmp file on regular systems is problematic by the nature of what tmpfiles claims it does.

          • Laser@feddit.de
            link
            fedilink
            arrow-up
            0
            ·
            12 days ago

            Then those containers or virtual machines should add this or create the home as needed.

            systemd has its own containers, so this is the implementation of that requirement; “virtual machines” might use this exact binary to create home, among other directories like srv and what not. Someone at one point probably said “we always need to create these when spinning up systems, maybe systems can provide a mechanism to do that for us?” and then it was implemented.

            Having/home listed as a tmp file on regular systems is problematic by the nature of what tmpfiles claims it does.

            systemd-tmpfiles claims the following:

            systemd-tmpfiles creates, deletes, and cleans up files and directories, using the configuration file format and location specified in tmpfiles.d(5). Historically, it was designed to manage volatile and temporary files, as the name suggests, but it provides generic file management functionality and can be used to manage any kind of files.

            I rather think having a purge command was the issue here, at the very least it should print a big fat warning at what it does, better even list all affected files and directories. There’s no reason a normal user needs this and with the name of the binary, it’s totally misleading, which is an issue in these situations.

    • exu@feditown.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      12 days ago

      Is that a standard systemd configuration or something enabled by a distro?

      • Nibodhika@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        12 days ago

        I assume systemd standard since the two different distros I have (Ubuntu and Arch) have it there.