Hi,
I've never added "Requires: initscripts" to packages which contain an init script before. I've now been asked to in this review :
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=233455
I like to avoid as many explicit requirements as possible, and in this particular case, the "require packages owning parent directories of our files and directories" of recent rpm versions (unfortunately not in Fedora, though IIRC) would take care of things.
So my question : As long as the Requires(...) for the scriplets are fine in order to get the package properly installed, updated and erased, do we still need to add that explicit requirement?
I would say we don't, but I prefer asking to be sure...
Matthias
On Tue, May 08, 2007 at 10:38:00AM +0200, Matthias Saou wrote:
Hi,
I've never added "Requires: initscripts" to packages which contain an init script before. I've now been asked to in this review :
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=233455
I like to avoid as many explicit requirements as possible, and in this particular case, the "require packages owning parent directories of our files and directories" of recent rpm versions (unfortunately not in Fedora, though IIRC) would take care of things.
So my question : As long as the Requires(...) for the scriplets are fine in order to get the package properly installed, updated and erased, do we still need to add that explicit requirement?
I would say we don't, but I prefer asking to be sure...
Matthias
Doesn't initscripts belong to the always-assume-installed-set-of-packages- so-don't-redundandly-require-it-unless-you-need-a-versioned-dependency?
Just like gcc, make etc?
Axel Thimm wrote :
On Tue, May 08, 2007 at 10:38:00AM +0200, Matthias Saou wrote:
Hi,
I've never added "Requires: initscripts" to packages which contain an init script before. I've now been asked to in this review :
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=233455
I like to avoid as many explicit requirements as possible, and in this particular case, the "require packages owning parent directories of our files and directories" of recent rpm versions (unfortunately not in Fedora, though IIRC) would take care of things.
So my question : As long as the Requires(...) for the scriplets are fine in order to get the package properly installed, updated and erased, do we still need to add that explicit requirement?
I would say we don't, but I prefer asking to be sure...
Matthias
Doesn't initscripts belong to the always-assume-installed-set-of-packages- so-don't-redundandly-require-it-unless-you-need-a-versioned-dependency?
Just like gcc, make etc?
That would be the list of assumed _build_ requirements. I was asking about a normal requirement for a package containing an init script in /etc/rc.d/init.d/.
Matthias
On Tue, May 08, 2007 at 11:52:04AM +0200, Matthias Saou wrote:
Axel Thimm wrote :
On Tue, May 08, 2007 at 10:38:00AM +0200, Matthias Saou wrote:
Hi,
I've never added "Requires: initscripts" to packages which contain an init script before. I've now been asked to in this review :
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=233455
I like to avoid as many explicit requirements as possible, and in this particular case, the "require packages owning parent directories of our files and directories" of recent rpm versions (unfortunately not in Fedora, though IIRC) would take care of things.
So my question : As long as the Requires(...) for the scriplets are fine in order to get the package properly installed, updated and erased, do we still need to add that explicit requirement?
I would say we don't, but I prefer asking to be sure...
Matthias
Doesn't initscripts belong to the always-assume-installed-set-of-packages- so-don't-redundandly-require-it-unless-you-need-a-versioned-dependency?
Just like gcc, make etc?
That would be the list of assumed _build_ requirements. I was asking about a normal requirement for a package containing an init script in /etc/rc.d/init.d/.
Yes, you're right.
But unless this package is installed in a chroot w/o kernel and friends you always have initscripts present. OTOH it isn't quite wrong to run daemons in chroots where appropriate.
Does your script make any actual use of initscripts (like sourcing in parts of it) or is this just the parent directory ownership issue?
Axel Thimm wrote :
Doesn't initscripts belong to the always-assume-installed-set-of-packages- so-don't-redundandly-require-it-unless-you-need-a-versioned-dependency?
Just like gcc, make etc?
That would be the list of assumed _build_ requirements. I was asking about a normal requirement for a package containing an init script in /etc/rc.d/init.d/.
Yes, you're right.
But unless this package is installed in a chroot w/o kernel and friends you always have initscripts present. OTOH it isn't quite wrong to run daemons in chroots where appropriate.
Does your script make any actual use of initscripts (like sourcing in parts of it) or is this just the parent directory ownership issue?
Nothing fancy. Just a simple "service" to have run on startup, control with chkconfig and service. I don't think "Requires: initscripts" would improve nor fix anything, but I wanted an authoritative answer to be 100% sure :-)
Matthias
On Tue, May 08, 2007 at 12:02:35PM +0200, Matthias Saou wrote:
Axel Thimm wrote :
Doesn't initscripts belong to the always-assume-installed-set-of-packages- so-don't-redundandly-require-it-unless-you-need-a-versioned-dependency?
Just like gcc, make etc?
That would be the list of assumed _build_ requirements. I was asking about a normal requirement for a package containing an init script in /etc/rc.d/init.d/.
Yes, you're right.
But unless this package is installed in a chroot w/o kernel and friends you always have initscripts present. OTOH it isn't quite wrong to run daemons in chroots where appropriate.
Does your script make any actual use of initscripts (like sourcing in parts of it) or is this just the parent directory ownership issue?
Nothing fancy. Just a simple "service" to have run on startup, control with chkconfig and service. I don't think "Requires: initscripts" would improve nor fix anything, but I wanted an authoritative answer to be 100% sure :-)
Well, the authoritative answer might be that accroding to the guidelines you should add it, but given the precedent of a ton of other packages not doing it, either the ton of packages are broken (unlikely) or the guidelines need adjustment/exceptions.
So if this is stalling your work we should have a quickvote on list or in the channel today. Perhaps it would help if you submit a diff to the guideline text.
Axel Thimm wrote :
Nothing fancy. Just a simple "service" to have run on startup, control with chkconfig and service. I don't think "Requires: initscripts" would improve nor fix anything, but I wanted an authoritative answer to be 100% sure :-)
Well, the authoritative answer might be that accroding to the guidelines you should add it, but given the precedent of a ton of other packages not doing it, either the ton of packages are broken (unlikely) or the guidelines need adjustment/exceptions.
So if this is stalling your work we should have a quickvote on list or in the channel today. Perhaps it would help if you submit a diff to the guideline text.
Well, I'm not in favour of adding the requirement, so I'm not really wanting to submit guideline changes either ;-)
Matthias
On Tue, May 08, 2007 at 01:36:06PM +0200, Matthias Saou wrote:
Axel Thimm wrote :
Nothing fancy. Just a simple "service" to have run on startup, control with chkconfig and service. I don't think "Requires: initscripts" would improve nor fix anything, but I wanted an authoritative answer to be 100% sure :-)
Well, the authoritative answer might be that accroding to the guidelines you should add it, but given the precedent of a ton of other packages not doing it, either the ton of packages are broken (unlikely) or the guidelines need adjustment/exceptions.
So if this is stalling your work we should have a quickvote on list or in the channel today. Perhaps it would help if you submit a diff to the guideline text.
Well, I'm not in favour of adding the requirement, so I'm not really wanting to submit guideline changes either ;-)
But, if I understand you correctly the current guidelines would force you to add it, no?
Axel Thimm wrote :
On Tue, May 08, 2007 at 01:36:06PM +0200, Matthias Saou wrote:
Axel Thimm wrote :
Nothing fancy. Just a simple "service" to have run on startup, control with chkconfig and service. I don't think "Requires: initscripts" would improve nor fix anything, but I wanted an authoritative answer to be 100% sure :-)
Well, the authoritative answer might be that accroding to the guidelines you should add it, but given the precedent of a ton of other packages not doing it, either the ton of packages are broken (unlikely) or the guidelines need adjustment/exceptions.
So if this is stalling your work we should have a quickvote on list or in the channel today. Perhaps it would help if you submit a diff to the guideline text.
Well, I'm not in favour of adding the requirement, so I'm not really wanting to submit guideline changes either ;-)
But, if I understand you correctly the current guidelines would force you to add it, no?
Nope. The current guidelines don't mention anything about this AFAICT. It's the reviewer of my package who thinks it should be added, and had it confirmed by someone on IRC (which isn't something I'd consider trustworthy!).
Matthias
On Tue, May 08, 2007 at 01:48:29PM +0200, Matthias Saou wrote:
Axel Thimm wrote :
On Tue, May 08, 2007 at 01:36:06PM +0200, Matthias Saou wrote:
Axel Thimm wrote :
Nothing fancy. Just a simple "service" to have run on startup, control with chkconfig and service. I don't think "Requires: initscripts" would improve nor fix anything, but I wanted an authoritative answer to be 100% sure :-)
Well, the authoritative answer might be that accroding to the guidelines you should add it, but given the precedent of a ton of other packages not doing it, either the ton of packages are broken (unlikely) or the guidelines need adjustment/exceptions.
So if this is stalling your work we should have a quickvote on list or in the channel today. Perhaps it would help if you submit a diff to the guideline text.
Well, I'm not in favour of adding the requirement, so I'm not really wanting to submit guideline changes either ;-)
But, if I understand you correctly the current guidelines would force you to add it, no?
Nope. The current guidelines don't mention anything about this AFAICT. It's the reviewer of my package who thinks it should be added, and had it confirmed by someone on IRC (which isn't something I'd consider trustworthy!).
Well, we do have guidelines on how to deal with file/directory ownerships that try to manage not to orphan anything and not to over-own as well.
http://fedoraproject.org/wiki/Packaging/Guidelines#head-a5931a7372c4a0006571...
But I guess it's a matter of interpretation as well as understanding that guidelines != law.
Matthias Saou wrote:
Nope. The current guidelines don't mention anything about this AFAICT. It's the reviewer of my package who thinks it should be added, and had it confirmed by someone on IRC (which isn't something I'd consider trustworthy!).
Really, how can you say that. You don't even know who weighed in on the discussion. Surely you realize that a lot of people that are on this list are on #fedora-devel as well.
But let me be clear with my position (I am the reviewer for anyone who hasn't bothered to pull up the bug yet). It is unclear for me whether you think your program /doesn't need/ initscripts or /shouldn't require initscripts/. These are two totally different things, so I'll cover them both.
Let's overlook the guideline for requiring the initscripts based on the fact that you put files in it's directories - this will simplify things for the moment.
You must ask yourself, "is my package fully functional if initscripts is not installed". The answer is no. And not only no, but generates errors. Here's why:
1) . /etc/init.d/functions This will fail with an error message.
2) daemon /usr/sbin/autodir ... cmdline opts This will fail with an error message and fail to start the program.
3) pid=`pidfileofproc $prog` This will fail with an error message and cause the initfile to give incorrect status information.
4) killproc $prog This will fail with an error message and also fail to shutdown the program properly.
Now, given the above, I think we can agree that your program "needs" initscripts (let's not say requires just yet).
You might now argue that initscript will always be installed so that this is a non-issue. With that argument you are probably assuming that it will be required by the /installed/ kernel (this was my argument on #fedora-devel, because I was arguing your side of the discussion).
So consider the case that someone compiles and runs their own kernel and removes the fedora kernel from the system. Until this was pointed out to me, I did not know how few dependencies there were (at least in newer fedora releases). This is totally plausible. And then if they remove initscripts (because nothing else depends on it), your package is broken. This is why it should require initscripts.
Bernard Johnson wrote :
Matthias Saou wrote:
Nope. The current guidelines don't mention anything about this AFAICT. It's the reviewer of my package who thinks it should be added, and had it confirmed by someone on IRC (which isn't something I'd consider trustworthy!).
Really, how can you say that. [...]
I'm not sure what you mean : - The current init scripts guidelines don't mention anything else than the fact that the scripts shouldn't be marked as %config. - The reviewer of my package (you) thinks the requirement should be added. - You had someone on IRC (I don't know who) confirm your opinion... without further details, I can definitely not consider this a strong or even valid argument.
Basically, this is what "I can say that" :-)
So consider the case that someone compiles and runs their own kernel and removes the fedora kernel from the system. Until this was pointed out to me, I did not know how few dependencies there were (at least in newer fedora releases). This is totally plausible. And then if they remove initscripts (because nothing else depends on it), your package is broken. This is why it should require initscripts.
Hey, I'm not saying you're wrong! I'm just saying that I've never put an explicit "initscripts" requirement in any package with an init script (nor do I recall seeing any Red Hat package with it). I'm also saying that my preference would be to not put it there, since it's assumed to be there, and any Fedora system will have it installed.
If the Packaging Committee decides that it's best to put it, then so be it, but I prefer discussing the matter here.
Matthias
Matthias Saou wrote:
Bernard Johnson wrote :
Matthias Saou wrote:
Nope. The current guidelines don't mention anything about this AFAICT. It's the reviewer of my package who thinks it should be added, and had it confirmed by someone on IRC (which isn't something I'd consider trustworthy!).
Really, how can you say that. [...]
I'm not sure what you mean :
- The current init scripts guidelines don't mention anything else than
the fact that the scripts shouldn't be marked as %config.
- The reviewer of my package (you) thinks the requirement should be
added.
- You had someone on IRC (I don't know who) confirm your opinion...
without further details, I can definitely not consider this a strong or even valid argument.
Basically, this is what "I can say that" :-)
I should have been more clear. I was only talking about your misrepresentation of the irc sources as not "trustworthy".
without further details, I can definitely not consider this a strong or even valid argument.
And you made this decision without knowing anything about the discussion, people involved, etc. - without asking for details. Please don't.
If you want to say that opinions were collected "off the record" and you'd like to bring it to the mailing list, that's fine.
Furthermore, I did not ask someone to "confirm my opinion". I simply asked "can initscripts be assumed to always be installed". Everyone who responded said no. I then pointed out the kernel->initscripts requires were present at which point it was pointed out to me that kernel can be removed if a custom kernel is built - then initscripts would be not necessarily required on the system. I would say that I was arguing your position more than getting mine confirmed.
I am not trying to be your adversary here. Your position was presented fairly. I'm giving you feedback, which IMHO, is correct.
So consider the case that someone compiles and runs their own kernel and removes the fedora kernel from the system. Until this was pointed out to me, I did not know how few dependencies there were (at least in newer fedora releases). This is totally plausible. And then if they remove initscripts (because nothing else depends on it), your package is broken. This is why it should require initscripts.
Hey, I'm not saying you're wrong! I'm just saying that I've never put an explicit "initscripts" requirement in any package with an init script (nor do I recall seeing any Red Hat package with it). I'm also saying that my preference would be to not put it there, since it's assumed to be there, and any Fedora system will have it installed.
Since you did not respond to the clarification that your program "needs" initscripts, I'll assume you agree with that point.
The remaining discussion should then be around your claim that "it's assumed to be there, and any Fedora system will have it installed.".
I've shown a case for when it may not.
I would also like clarification (and opinions) from everyone on what exactly can be assumed to be ALWAYS installed on the system. We have such a list for BRs but I haven't seen any more Requires. (Maybe I'm just missing it).
If running a non-Fedora kernel can be considered unsupported (you must always run / have installed a Fedora kernel), then that should be clarified.
If the Packaging Committee decides that it's best to put it, then so be it, but I prefer discussing the matter here.
I hardly think this is appropriate for the PC at this point, but feel free free to throw anything you want to them - I won't be offended.
Matthias Saou (thias@spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net) said:
Nothing fancy. Just a simple "service" to have run on startup, control with chkconfig and service. I don't think "Requires: initscripts" would improve nor fix anything, but I wanted an authoritative answer to be 100% sure :-)
If you require /sbin/service, initscripts will get pulled in...
Bill
On Tue, May 08, 2007 at 03:05:22PM -0400, Bill Nottingham wrote:
Matthias Saou (thias@spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net) said:
Nothing fancy. Just a simple "service" to have run on startup, control with chkconfig and service. I don't think "Requires: initscripts" would improve nor fix anything, but I wanted an authoritative answer to be 100% sure :-)
If you require /sbin/service, initscripts will get pulled in...
Looks like the wrong people sit in the FPC - this was just too obvious and our brains jammed in accord.
Axel Thimm wrote :
On Tue, May 08, 2007 at 03:05:22PM -0400, Bill Nottingham wrote:
Matthias Saou (thias@spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net) said:
Nothing fancy. Just a simple "service" to have run on startup, control with chkconfig and service. I don't think "Requires: initscripts" would improve nor fix anything, but I wanted an authoritative answer to be 100% sure :-)
If you require /sbin/service, initscripts will get pulled in...
Looks like the wrong people sit in the FPC - this was just too obvious and our brains jammed in accord.
Not entirely... since /sbin/service is only Requires(preun) and Requires(postun), nothing is making initscripts a "pre" or runtime requirement of the package AFAICT.
I still can't really picture a working system which wouldn't have initscripts installed, though.
Matthias
On Friday 11 May 2007, Matthias Saou wrote:
Not entirely... since /sbin/service is only Requires(preun) and Requires(postun), nothing is making initscripts a "pre" or runtime requirement of the package AFAICT.
http://rpm.org/max-rpm-snapshot/s1-rpm-depend-manual-dependencies.html#S3-RP...
Ville Skyttä wrote :
On Friday 11 May 2007, Matthias Saou wrote:
Not entirely... since /sbin/service is only Requires(preun) and Requires(postun), nothing is making initscripts a "pre" or runtime requirement of the package AFAICT.
http://rpm.org/max-rpm-snapshot/s1-rpm-depend-manual-dependencies.html#S3-RP...
Makes perfect sense, and all is fine. Thanks for the pointer ;-)
Matthias
Matthias Saou (thias@spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net) said:
Not entirely... since /sbin/service is only Requires(preun) and Requires(postun), nothing is making initscripts a "pre" or runtime requirement of the package AFAICT.
preun must be installed when the package is. rpm doesn't support making you install it before you remove the package.
Bill
On Tue, 2007-05-08 at 10:38 +0200, Matthias Saou wrote:
Hi,
I've never added "Requires: initscripts" to packages which contain an init script before. I've now been asked to in this review :
kernel requires initscripts. You'd be hard-pressed to find a proper Fedora install that didn't have initscripts.
I think this is one of those "use your best judgement" issues here. If it were my package, I wouldn't add it. It's a tiny step from Requires: initscripts to Requires: kernel.
~spot
"TC" == Tom "spot" Callaway <Tom> writes:
TC> kernel requires initscripts. You'd be hard-pressed to find a TC> proper Fedora install that didn't have initscripts.
Packages don't have requirements on "filesystem" either.
The initscripts thing might get interesting once we start moving away from old-school init. And right now there are people running "Fedora-like" distros that don't have initscripts, but I'm not sure there's much point in going out of your way to cater to them.
Besides, if things change so that it's required, it will be trivial to add.
- J<
Jason L Tibbitts III tibbs@math.uh.edu writes:
TC> kernel requires initscripts. You'd be hard-pressed to find a TC> proper Fedora install that didn't have initscripts.
Packages don't have requirements on "filesystem" either.
That's an implicit requirement (<package> -> glibc -> .* -> filesystem). Plain -filesystem packages resp. noarch packages without other deps MUST add 'Requires: filesystem'.
It is hard to find such an implicit requirement for 'initscripts' (try e.g. 'rpm -e --test initscripts' and see how small the deptree is).
The 'kernel -> initscripts' example from this thread does not really apply. At first, I do not see, why the kernel needs initscripts.
Then, you have to differ between the 'kernel' package and the kernel-environment. Lot of Fedora installations do not require the 'kernel' package (packaging bugs like gnome-volume-manager do not count ;)) because they are inside chroots. And the requirement on a Linux kernel environment can not be tracked by rpm (e.g. it is similarly to the requirement on an MTA).
Enrico
Enrico Scholz wrote :
The 'kernel -> initscripts' example from this thread does not really apply. At first, I do not see, why the kernel needs initscripts.
It seems to be because it requires a minimal version of it.
Matthias
On Tue, May 08, 2007 at 09:28:02AM -0500, Tom spot Callaway wrote:
On Tue, 2007-05-08 at 10:38 +0200, Matthias Saou wrote:
I've never added "Requires: initscripts" to packages which contain an init script before. I've now been asked to in this review :
kernel requires initscripts. You'd be hard-pressed to find a proper Fedora install that didn't have initscripts.
Not if this is a chroot, for example like an i386 chroot on x86_64, if one wants to avoid multilib headaches.
I think this is one of those "use your best judgement" issues here. If it were my package, I wouldn't add it. It's a tiny step from Requires: initscripts to Requires: kernel.
Matthias Saou thias@spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net writes:
I've never added "Requires: initscripts" to packages which contain an init script before.
When your initscripts do not work without /etc/init.d/functions and the initscripts are an essential part of your package (e.g. not sample %doc), you have to add corresponding Requires: entries.
So my question : As long as the Requires(...) for the scriplets are fine in order to get the package properly installed, updated and erased, do we still need to add that explicit requirement?
It depends how far we want to abuse rpm bugs/missing features. With current rpm, it is fine to add only the tagged Requires(...) because they implicate an untagged Requires: too.
The feature, that deps from Requires(post/preun): can be removed after installation, and will be reinstalled at removal, is not implemented, afaik.
Enrico
packaging@lists.fedoraproject.org