Re: removable setup rpm?!

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

 



Dne 18.8.2017 v 13:43 Petr Stodulka napsal(a):
which leads to unusable system, because of missing important files,
like /etc/shadow, ....

Lets just focus on this one package. The question is why the removal of the package is removing
  /etc/shadow
  /etc/passwd
?

When I remove it it will:
warning: /etc/shadow saved as /etc/shadow.rpmsave
warning: /etc/passwd saved as /etc/passwd.rpmsave

That is because there is in spec file:

%verify(not md5 size mtime) %config(noreplace) /etc/passwd
%verify(not md5 size mtime) %config(noreplace) /etc/group

I would expect rather %ghost directive there.

With %ghost in place we can even omit the %posttrans:

#throw away useless and dangerous update stuff until rpm will be able to
#handle it ( http://rpm.org/ticket/6 )
%post -p <lua>
for i, name in ipairs({"passwd", "shadow", "group", "gshadow"}) do
     os.remove("/etc/"..name..".rpmnew")
end

The initial content should be IMHO populated by anaconda.

With the %ghost the removal of package will leave the important files on disk and the system will be operational.

Mirek
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[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