ocfs2-tools: Resolve rpmlint warnings in init scripts
PATCH 1/3 ocfs2-tools: Resolve rpmlint warnings in init scripts
Fix a number of LSB compliance issues reported by rpmlint regarding ocfs2 init scripts
--- upstream/vendor/common/o2cb.init.sh 2008-09-11 16:51:11.000000000
+0200
+++ dev/vendor/common/o2cb.init.sh 2008-10-23 14:36:49.000000000 +0200
@@ -8,7 +8,8 @@
# Provides: o2cb
# Required-Start: $network
# Should-Start:
-# Required-Stop:
+# Should-Stop:
+# Required-Stop: $null
# Default-Start: 2 3 5
# Default-Stop:
# Short-Description: Load O2CB cluster services at system boot.
--- upstream/vendor/common/ocfs2.init 2008-09-11 16:51:11.000000000
+0200
+++ dev/vendor/common/ocfs2.init 2008-10-23 13:13:55.000000000 +0200
@@ -8,9 +8,9 @@
### BEGIN INIT INFO
# Provides: ocfs2
# Required-Start: $network o2cb
-# Required-Stop:
-# X-UnitedLinux-Should-Start:
-# X-UnitedLinux-Should-Stop:
+# Required-Stop: $null
+# Should-Start:
+# Should-Stop:
# Default-Start: 2 3 5
# Default-Stop:
# Short-Description: Mount OCFS2 volumes at boot.
PATCH 1/3 ocfs2-tools: Resolve rpmlint warnings in init scripts
Quoted 9 lines · Andrew Beekhof
Fix a number of LSB compliance issues reported by rpmlint regarding ocfs2 init scripts
Signed-off-by Andrew Beekhof <[email protected]>---
upstream/vendor/common/o2cb.init.sh2008-09-11 16:51:11.000000000
+0200
+++dev/vendor/common/o2cb.init.sh2008-10-23 14:36:49.000000000 +0200
Review line 12
Quoted 6 lines
(quoted diff) +2
-1@@ -8,7 +8,8 @@ # Provides: o2cb # Required-Start: $network # Should-Start: -# Required-Stop: +# Should-Stop: +# Required-Stop: $null
Really, rpmlint requires everyone to know some magic $null? Who
the heck thought that one up? Is it portable to all distros?
Joel
Signature · 11 lines
"There is no more evil thing on earth than race prejudice, none at
all. I write deliberately -- it is the worst single thing in life
now. It justifies and holds together more baseness, cruelty and
abomination than any other sort of error in the world."
- H. G. Wells
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127PATCH 1/3 ocfs2-tools: Resolve rpmlint warnings in init scripts
Quoted 6 lines · Joel Becker
Quoted 5 lines · Andrew Beekhof
Fix a number of LSB compliance issues reported by rpmlint regarding ocfs2 init scripts
Signed-off-by Andrew Beekhof <[email protected]>
Quoted 14 lines
Review line 12
Quoted 11 lines
---
upstream/vendor/common/o2cb.init.sh2008-09-11 16:51:11.000000000
+0200
+++dev/vendor/common/o2cb.init.sh2008-10-23 14:36:49.000000000
+0200(quoted diff) +2
-1@@ -8,7 +8,8 @@ # Provides: o2cb # Required-Start: $network # Should-Start: -# Required-Stop: +# Should-Stop: +# Required-Stop: $nullReally, rpmlint requires everyone to know some magic $null? Who
the heck thought that one up?
Someone with too much time on their hands
Quoted 1 line
Is it portable to all distros?
I'm assuming yes based on rpmlint being an external project and that its vaguely consistent with $network.
But I don't have any other distros to test on - nor the first clue on how to check :-/
PATCH 1/3 ocfs2-tools: Resolve rpmlint warnings in init scripts
Quoted 24 lines · Andrew Beekhof
Quoted 6 lines · Joel Becker
Quoted 5 lines · Andrew Beekhof
Fix a number of LSB compliance issues reported by rpmlint regarding ocfs2 init scripts
Signed-off-by Andrew Beekhof <[email protected]>Quoted 14 lines
Review line 12
Quoted 11 lines
---
upstream/vendor/common/o2cb.init.sh2008-09-11 16:51:11.000000000
+0200
+++dev/vendor/common/o2cb.init.sh2008-10-23 14:36:49.000000000
+0200(quoted diff) +2
-1@@ -8,7 +8,8 @@ # Provides: o2cb # Required-Start: $network # Should-Start: -# Required-Stop: +# Should-Stop: +# Required-Stop: $nullReally, rpmlint requires everyone to know some magic $null? Who
the heck thought that one up?
Quoted 8 lines
Someone with too much time on their hands
Quoted 1 line
Is it portable to all distros?
I'm assuming yes based on rpmlint being an external project and that its vaguely consistent with $network.
But I don't have any other distros to test on - nor the first clue on how to check :-/
Well, sles10 and rhel5 have plenty of "Required-stop" lines.
Not one of them have $null. Checking sles11b4, some scripts have $null, but some still have empty lines "^# Required-Stop:$"
Actually, let's check LSB. Latest is 3.2. Here's the relevant
section:
http://refspecs.linux-foundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/facilname.html
It states that, "Facility names that begin with a dollar sign ('$') are reserved system facility names. ... Conforming applications shall not provide facilities that begin with a dollar sign." It then lists the reserved names: $local_fs, $network, $named, $portmap, $remote_fs, $syslog, and $time. Thus, $null is actually an *invalid* name.
Ok, now let's look at sles11. We find the definition of $null
in the manpage for insserv(8). "The special facility $null is used to enforce an empty dependency in case of Should-Stop and Required-Stop otherwise insserv assumes the same dependencies as for the Start case." So insserv(8) in sles11 is not LSB compliant. Its optimization of the -Stop cases (assume the same as the -Start case) requires an explicit $null for the empty case. LSB, conversly, interprets an empty -Stop line as actually empty.
rpmlint is wrong here, as it is tracking a SuSE-only behavior.
At least, I can't find a RHEL system that behaves different from LSB.
Fortunately, the solution is easy. Our Required-Stop should be
$network, not empty. We want the network still up when we stop o2cb. This is valid on both an LSB-compliant system and sles11.
Joel
Signature · 8 lines
"Time is an illusion, lunchtime doubly so."
-Douglas Adams
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127PATCH 1/3 ocfs2-tools: Resolve rpmlint warnings in init scripts
Quoted 2 lines · Joel Becker
rpmlint is wrong here, as it is tracking a SuSE-only behavior.
At least, I can't find a RHEL system that behaves different from LSB.
Actually, rpmlint is always wrong. An empty -Stop line is valid
on sles11 as well - it just means "the same as -Start".
Joel
Signature · 8 lines
"Behind every successful man there's a lot of unsuccessful years."
- Bob Brown
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127PATCH 1/3 ocfs2-tools: Resolve rpmlint warnings in init scripts
Quoted 6 lines · Joel Becker
Quoted 2 lines · Joel Becker
rpmlint is wrong here, as it is tracking a SuSE-only behavior.
At least, I can't find a RHEL system that behaves different from LSB.Actually, rpmlint is always wrong. An empty -Stop line is valid
on sles11 as well - it just means "the same as -Start".
Ok, just ignore the this patch then.
I've no personal attachment to them... its just something that the SUSE build system threw up and I wanted to be a good OSS citizen by submitting it upstream :-)
But its seems there's good reason for it to be rejected as distro-specific.
What about the others and the OCF agent?
PATCH 1/3 ocfs2-tools: Resolve rpmlint warnings in init scripts
Quoted 5 lines · Andrew Beekhof
Quoted 4 lines · Joel Becker
Quoted 2 lines · Joel Becker
rpmlint is wrong here, as it is tracking a SuSE-only behavior.
At least, I can't find a RHEL system that behaves different from LSB.
Quoted 7 lines
Quoted 2 lines
Actually, rpmlint is always wrong. An empty -Stop line is valid
on sles11 as well - it just means "the same as -Start".Ok, just ignore the this patch then.
I've no personal attachment to them... its just something that the SUSE build system threw up and I wanted to be a good OSS citizen by submitting it upstream :-)
Did you see the other part, where I stated we should have
"Required-Stop" match "Required-Stop"? That's the correct change - valid for LSB and for SLES11.
Joel
Signature · 10 lines
Life's Little Instruction Book #197 "Don't forget, a person's greatest emotional need is to feel appreciated." Joel Becker Principal Software Developer Oracle E-mail: joel.becker at oracle.com Phone: (650) 506-8127