[opensuse-buildservice] configure logrotate - best practice
Hi, I am building a package that needs to configure logrotate. Now two possiblities come to my mind: a) Put /etc/logrotate.d/mypackage in the rpm and install it just like any other file from the package b) Create /etc/logrotate.d/mypackage with a postinstall script I was wondering which way is the "best" or most common way to do things like this for rpms. But also in the light of the build service, where I want to create rpms and debs alike. Best, Isaac -- Isaac Hailperin Heinlein Professional Linux Support GmbH Linux: Akademie - Support - Hosting http://www.heinlein-support.de Tel: 030-405051-45 Fax: 030-405051-19 Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht Berlin-Charlottenburg, Geschäftsführer: Peer Heinlein -- Sitz: Berlin -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Wed, May 16, 2012 at 12:14:37PM +0200, Isaac Hailperin wrote:
Hi,
I am building a package that needs to configure logrotate. Now two possiblities come to my mind:
a) Put /etc/logrotate.d/mypackage in the rpm and install it just like any other file from the package b) Create /etc/logrotate.d/mypackage with a postinstall script
I was wondering which way is the "best" or most common way to do things like this for rpms. But also in the light of the build service, where I want to create rpms and debs alike.
Install it as a %config marked file. Do not use %post for this. Ciao, Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On 05/16/2012 12:23 PM, Marcus Meissner wrote:
On Wed, May 16, 2012 at 12:14:37PM +0200, Isaac Hailperin wrote:
Hi,
I am building a package that needs to configure logrotate. Now two possiblities come to my mind:
a) Put /etc/logrotate.d/mypackage in the rpm and install it just like any other file from the package b) Create /etc/logrotate.d/mypackage with a postinstall script
I was wondering which way is the "best" or most common way to do things like this for rpms. But also in the light of the build service, where I want to create rpms and debs alike. Install it as a %config marked file.
Do not use %post for this. And if I would like to edit the logroatet config of some other package? I would use sed to edit it in a postinstall script. Is that the way to it?
Isaac -- Isaac Hailperin Heinlein Professional Linux Support GmbH Linux: Akademie - Support - Hosting http://www.heinlein-support.de Tel: 030-405051-45 Fax: 030-405051-19 Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht Berlin-Charlottenburg, Geschäftsführer: Peer Heinlein -- Sitz: Berlin -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Wed, May 16, 2012 at 03:40:42PM +0200, Isaac Hailperin wrote:
On 05/16/2012 12:23 PM, Marcus Meissner wrote:
On Wed, May 16, 2012 at 12:14:37PM +0200, Isaac Hailperin wrote:
Hi,
I am building a package that needs to configure logrotate. Now two possiblities come to my mind:
a) Put /etc/logrotate.d/mypackage in the rpm and install it just like any other file from the package b) Create /etc/logrotate.d/mypackage with a postinstall script
I was wondering which way is the "best" or most common way to do things like this for rpms. But also in the light of the build service, where I want to create rpms and debs alike. Install it as a %config marked file.
Do not use %post for this. And if I would like to edit the logroatet config of some other package? I would use sed to edit it in a postinstall script. Is that the way to it?
Why would you want to do that? I cannot think of a good example right away. But probably it is the way to do it, although it is bad to touch other packages files. Ciao, Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Wed, May 16, 2012 at 03:40:42PM +0200, Isaac Hailperin wrote:
On 05/16/2012 12:23 PM, Marcus Meissner wrote:
On Wed, May 16, 2012 at 12:14:37PM +0200, Isaac Hailperin wrote:
Hi,
I am building a package that needs to configure logrotate. Now two possiblities come to my mind:
a) Put /etc/logrotate.d/mypackage in the rpm and install it just like any other file from the package b) Create /etc/logrotate.d/mypackage with a postinstall script
I was wondering which way is the "best" or most common way to do things like this for rpms. But also in the light of the build service, where I want to create rpms and debs alike. Install it as a %config marked file.
Do not use %post for this. And if I would like to edit the logroatet config of some other package? I would use sed to edit it in a postinstall script. Is that the way to it? Why would you want to do that? I cannot think of a good example right away. We have a package that analyses mail logs. Each time the log is rotated,
But probably it is the way to do it, although it is bad to touch other packages files. Thank you. I agree with not touching other packages files, but currently
On 05/16/2012 03:42 PM, Marcus Meissner wrote: the daemon that watches the log needs to be restarted. There might be other solutions, but I am just packaging it, so I have to deal with it :) there is no other solution. Isaac -- Isaac Hailperin Heinlein Professional Linux Support GmbH Linux: Akademie - Support - Hosting http://www.heinlein-support.de Tel: 030-405051-45 Fax: 030-405051-19 Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht Berlin-Charlottenburg, Geschäftsführer: Peer Heinlein -- Sitz: Berlin -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (2)
-
Isaac Hailperin
-
Marcus Meissner