• Rafli Akmal's avatar
    MDEV-15052: Allow sysusers and tmpfiles install for non-systemd users · 742c36d0
    Rafli Akmal authored
    ..as they have their own tools that parses those files, such as
    opensysusers[1] that handles sysusers file and opentmpfiles[2] that
    handles tmpfiles.d settings
    
    Because of this. Move both sysusers and tmpfiles 'if' function
    outside systemd function, allowing independent install
    Signed-off-by: default avatarRafli Akmal <thefallenrat@artixlinux.org>
    
    [1] - https://github.com/artix-linux/opensysusers
    [2] - https://github.com/OpenRC/opentmpfiles
    
    Changes done by vicentiu@mariadb.org, from original author patch:
    
    Installing sysusers and tmpfiles without checking for systemd existence
    means that by default, cmake will ALWAYS install these files. Our
    general policy is we do not install things which are not needed.
    However, there is a valid use case when these files are useful, as is
    described above.
    
    To allow this, provide an extra switch that can be enabled during
    configuring by doing -DINSTALL_SYSTEMD_{SYSUSERS|TMPFILES}=True
    
    This will use the default path INSTALL_SYSTEMD_{SYSUSERS|TMPFILES}DIR
    fetched from install_layout.cmake for rpm & deb based layouts
    respectively, or they must be overriden if the install_layout is
    standalone.
    
    Example:
    
    cmake . -DINSTALL_SYSTEMD_SYSUSERS=True -DINSTALL_SYSTEMD_SYSUSERSDIR=/etc/sysusers.d
    742c36d0
CMakeLists.txt 7.96 KB