Sample Header Ad - 728x90

Options for managing user created files in rpm spec file

3 votes
0 answers
327 views
How is best to handle files in an rpm spec file that may or may not exist with these specifics: Part of the files delivered are example files under a /conf.d/ directory. The files are installed as conf.d/example.conf-. It is expected that the user would copy or rename the files with the end hyphen removed so the application will use it. The application uses /conf.d/*.conf as is common. All files with and without a hyphen suffix should be part of the package with permissions managed by the rpm. The original hyphen-suffixed files may or may not exist at update or remove time. Same with the non hyphen-suffixed versions. It appears that both file name versions must be added to buildroot but I'm not sure of best practice to name some as ghost. The user may also add a conf file of their own. Is it possible to enforce permissions for files in a package owned directory but not known to the package? The conf.d/*conf strategy is commonly used but I haven't found any example of handling this other than ignoring user created files and not deleting the directory on remove if any exist. Advice, references and/or examples would be appreciated.
Asked by EddieSub (31 rep)
Jun 23, 2023, 09:28 PM
Last activity: Jun 24, 2023, 11:16 AM