On 04/13/2015 07:13 PM, Kevin Zander wrote:
On Mon, 2015-04-13 at 17:19 -0300, Aline Manera wrote:
>
> On 13/04/2015 17:00, Crístian Viana wrote:
>
>> I tested this patch on Fedora 21 and, after removing Kimchi, some
>> files were still left on the system.
>>
>>
>> I installed the RPM, started the Kimchi server, stopped the server
>> and then I removed the RPM. Here's the final output of my tests:
> Yeap! I talked to Ramon about that.
> Those 2 cert files are created automatically according to the user
> configuration, ie, if the user provides them Kimchi will not generate
> those files.
> So they may exist or not on package removal.
>
>>
>> [kimchi@localhost ~]$ ls /etc/kimchi/
>> distros.d kimchi-cert.pem kimchi.conf kimchi-key.pem
>> nginx.conf.in nginx_kimchi.conf
>> [kimchi@localhost ~]$ sudo yum remove kimchi
>> [...]
>> [kimchi@localhost ~]$ ls /etc/kimchi/
>>
>> kimchi-cert.pem kimchi-key.pem
>> [kimchi@localhost ~]$
Why not use a %preun/%postun script in the spec file? Test for the
existence of files that Kimchi can generate and remove accordingly.
RPM does not remove files (without force) if the file was not created by
the rpm. Use a rm -rf on the postscripts can fix this, but it's not the
best way. I guess this way now it's safer.
--
Ramon Nunes Medeiros
Kimchi Developer
Software Engineer - Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn(a)br.ibm.com