Question about profile.d scripts definition in Spec file

Michael Schwendt mschwendt at gmail.com
Sun Aug 2 12:48:00 UTC 2015


On Sun, 2 Aug 2015 14:24:00 +0200, Marcin Haba wrote:

> > The explanation is given by "rpmlint -i …".
> > 
> 
> Hello,
> 
> Not really. I read output from rpmlint and I am not sure if it is
> unambiguous for shell scripts placed in /etc location.

Well, it is the contents of the file that matter. The purpose of the
file, not the "type of file". You call them "shell scripts", but all
these files do, if sourced by the shell, is they alter the global
runtime _configuration_ by setting environment variables for a program
that may evaluate those variables.

> A) if a shell script can be treated as configuration file?

Certainly. It's a cheap way to set a program's runtime configuration
instead of implementing a full config file loader/parser.

And don't forget, there is a difference between marking files as
%config and %config(noreplace).

> B) does in rpmlint aspect non-executable mean 'without execute
> permissions' or 'non-executable at all' (directly and by any interpreter) ?

It refers to the exec permission bit. Executables files in /etc being
marked as %config would be another mistake.

It's some sort of white-list to assume that files in /etc meant to be
executed (such as initscripts related files) are not configuration
files in any way. Admin may decide to edit such executables nevertheless
(for reasons unknown), but the next update would overwrite the changes.

Also not forget, rpmlint only warns about it. Not marking them %config
would not be a severe mistake. It's just better to mark them %config
because of the contents of these files.


More information about the devel mailing list