Make bugzilla-queue init script support SuSE

RESOLVED FIXED in Bugzilla 4.0



9 years ago
8 years ago


(Reporter: mrbball, Assigned: mrbball)


Bugzilla 4.0
Bug Flags:
approval +



(1 attachment, 2 obsolete attachments)



9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/2009073021 Firefox/3.0.13
Build Identifier: Bugzilla 3.4.6

The bugzilla-queue script which is the init script used to control
The init script for Bugzilla's jobqueue daemon (contrib/bugzilla-queue),
does not work on SuSE systems.  It is apparently specific to RH systems.
It should be ported to Linux Standard Base (LSB) format.

I will attach a patch to bugzilla-queue that I believe conforms to LSB
specs.  It implements all actions that are expected to be there: start,
stop, restart, try-restart, force-reload, reload and status.

Reproducible: Always

Comment 1

9 years ago
Created attachment 443345 [details] [diff] [review]
V1 - against tip

LSB-ized version of bugzilla-queue.  I do not have a RHEL system to test
this on.  Tested on SuSE 10.1.
Attachment #443345 - Flags: review?(mkanat)
RHEL5's /lib/lsb/init-functions appears to support LSB 3.1.  It does not implement the following functions that you're making use of:


I'm guessing the above functions are SuSE-specific. They're not part of a newer LSB spec (I just looked at the LSB 4.0 spec - they aren't defined there).  RHEL5 does not include any of them as command-line executables either.

Comment 3

9 years ago
Ok, so /lib/lsb/init-function doesn't source /etc/rc.status?  I guess I
mistook that for part of LSB. :-(
Okay. So if there's no LSB way to do this, we could instead add some code to detect SuSE (similarly to how we detect RHEL now in gd_install) and include a separate SuSE initscript for that situation.
Assignee: installation → kar
Comment on attachment 443345 [details] [diff] [review]
V1 - against tip

So that's an r- for modifying the existing script.
Attachment #443345 - Flags: review?(mkanat) → review-


9 years ago
Severity: normal → enhancement
Ever confirmed: true
Summary: LSB-ize bugzilla-queue init script → Make bugzilla-queue init script support SuSE

Comment 6

9 years ago
Created attachment 444102 [details] [diff] [review]

How's this?  I updated contrib to contain two init scripts: one for suse
and one for rhel/other (default).  If on a SuSE system, the suse version
is installed.  Otherwise, the rhel version is installed.
Attachment #444102 - Flags: review?(mkanat)


9 years ago
Attachment #443345 - Attachment is obsolete: true
Comment on attachment 444102 [details] [diff] [review]

Looks good! What about SuSE derivatives, are there any? Will this script work on them?
Attachment #444102 - Flags: review?(mkanat) → review+


9 years ago
Flags: approval+
Target Milestone: --- → Bugzilla 3.8
  That is, I'm mostly curious as to whether /etc/SuSE-release is the most reliable way of checking whether or not we're on SuSE (or whether or not we want the SuSE script).
Keywords: relnote

Comment 9

9 years ago
I'm willing to test it on all SuSE derivatives I have access to: OpenSuse,
SuSE Linux and SLES (versions 9, 10 & 11).  My production Bugzilla server
is running SuSE Linux 10.1 and I've also tried it on SLES9 & SLES11 so far.

According to Novell's own web site, /etc/SuSE-release is the way to check
whether or not we're on SuSE:
  Okay, great. :-) Yeah, if you could test it, that would be great.

Comment 11

9 years ago
I've tested it on all SuSE variants I have access to: OpenSuse (i.e.
SuSE Linux - 9 & 10) and SLES (9, 10, 11).  The init script itself
works great.  However, installing it is a problem.  The Required-Start:
and Required-Stop: lines list "MTA" and "mysqld", and those do not work
for SuSE systems.  Reasonable replacements might be "sendmail" and
"mysql", respectively, but I don't think either are even necessary.

What does the jobqueue daemon do if mail_delivery_method is set to Test
or None?  I think you can still have it installed/running, even if the
MTA is not running.  And even if mail_delivery_method is set to a
particular MTA, it doesn't appear that the MTA needs to be "enabled"
(as indicated by chkconfig).  It simply needs to be running.

Also, if the MySQL server for a Bugzilla installation is a separate
system, the mysql service would not need to be enabled or running on
the Bugzilla server!

So, I want to simply remove "MTA" and "mysqld" from the Required-Start:
and Required-Stop: lines in bugzilla-queue for SuSE systems.  Does
that make sense?

Would it make sense in the default case as well?
  You can remove the Required-Start and Required-Stop from the SuSE script.

  Actually, they're not technically doing anything in the RHEL script at the moment, I believe, so they could probably be removed there as well.

Comment 13

9 years ago
Created attachment 445802 [details] [diff] [review]
v3 (involves a rename)

Removed "MTA" and "mysqld" from Required-Start and Required-Stop in the
SuSE script.  The jobqueue daemon is now installed correctly as a system
service and will start as expected at runlevels 3 and 5 on SuSE variants.
Attachment #444102 - Attachment is obsolete: true
Attachment #445802 - Flags: review?(mkanat)
Comment on attachment 445802 [details] [diff] [review]
v3 (involves a rename)

Cool, looks good!
Attachment #445802 - Attachment description: v3 → v3 (involves a rename)
Attachment #445802 - Flags: review?(mkanat) → review+
Thanks for the patch, Kent! :-)

Committing to: bzr+ssh://
modified Bugzilla/JobQueue/
renamed contrib/bugzilla-queue => contrib/bugzilla-queue.rhel
added contrib/bugzilla-queue.suse
Committed revision 7183.
Last Resolved: 9 years ago
Resolution: --- → FIXED
Added to the release notes in bug 604256.
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.