Re: file /etc/sudoers from install of sudo-config-20110520-1.noarch conflicts with file from package sudo-1.7.2p1

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

 




rpm-list-bounces@xxxxxxxxxxxxx wrote on 05/20/2011 03:56:26 AM:
>
> I was looking for the RPM mailing list, and ended up at the Fedora
> packaging list, so I'm reposting here.
>
> BTW, the mailing list mentioned on this page is not correct:
> http://www.rpm.org/max-rpm/s1-rpm-resources-where-to-talk.html
>
> Anyway, to my problem:
>
>
> Hello all,
>
> I am rolling my own RPM to provide the correct configs for the
> company where I'm working.
>
> (This isn't specifically about sudoers - there are other packages that
> will require this as well, and they don't all have the ability to use
> .d directories.)
>
> For instance, sudo.
> I need to make sure it's >=1.7.1 (so that the includedir directive is
> handled). That's easily done.
> Then I need to archive the existing /etc/sudoers, and put down the
> company's one.
>
> However, when I install it, I get: file /etc/sudoers from install of
> sudo-config-20110520-1.noarch conflicts with file from package
> sudo-1.7.2p1
>
> There are two ways around it that I know:
>
> 1. Put the file down as /etc/sudoers.companyname, and mv it in the %post
> 2. Unpackage sudo, modify, and re-package.
>
> I prefer not to do 2, as that will require keeping a close eye on the
> security errata of the package, and repackaging every time a new
> version is released. I'd rather keep the upstream package untouched,
> and just apply my config over the top.
>
> 1 works fine - however, it breaks the rpm -V functionality, which in
> my eyes is a big plus point for using RPMs.
>
> Installing with --replacefiles will work - however - however, I want
> to deploy the package with Puppet, and it doesn't seem to allow
> specifying that.
>
> Is there a way to create the RPM in such a way that --replacefiles is
> "built-in" to the RPM?
> Is there any other way of doing this - so that rpm -V works?

So without doing #2 you can not do it in such a way that rpm -V will work
against sudo.

What I would do for #1 is

1: place /etc/sudoers.companyname
2: move /etc/sudoers to /etc/sudoers.dist
3: symlink /etc/sudoers to /etc/sudoers.companyname

I don't know if that does work for sudoers, but its what I've done for
other things like multipath.  The benefit is that while rpm -V on sudoers
fails, rpm -V on sudo-config will not.

However, ignoring the rpm -V functionality, if you are using puppet,
arguably that is probably the better way of providing the configuration
file.

-greg

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list


[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux