Re: Question about profile.d scripts definition in Spec file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02.08.2015 14:48, Michael Schwendt wrote:
> 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.

Hello Michael,

Thanks for your comments.

>> 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.

My image of configuration files is that they are files for read/write
purpose by design, because they enables _configure_ something
(application, service, single program, script...whatever). If they are
dedicated only for reading then from my point of view they lose
"configuration" meaning (something like WORM storage ;-) ).

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

Yes, I remember about it. Thanks.

>> 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.

If rpmlint refers 'non-executable' only to the exec permission, what I
believe takes place, and the contents of the file that matter for
determine 'executable/non-executable' type, it means that rpmlint search
'executable' property not there where it should search.

Partially I understand this searching for executable files because it
might be difficult clearly qualify some file to some specific type of
files basing on a file content or just interpreter definition.

However I believe that exist some tools or libraries that can do this
content analyze for rpmlint.

> 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.

Good to know that mentioned white-list exists. Could you indicate me
where can I find this white-list?

> 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.

Yes, right.

Best regards.
Marcin Haba

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux