[lsb-discuss] /etc naming conventions buggy
Peter Moulder
pjrm at mail.internode.on.net
Fri Jan 18 16:35:00 PST 2008
I have tried hard to submit a problem report, but failed:
I click "Problem Reporting", it gives me a list of closed issues.
I click the "Login" link just above the list of closed issues, it
doesn't offer to create an account and just says login failed.
I return to the main LSB page, which offers (at the top of the page)
a "Login / create account" link. The resulting page allows logging in
but doesn't allow creating an account.
I click the "Sign up" link to the right of the "Login / create
account" link, fill in all the required fields, using ‘(individual)’
as the organization name. It reports success.
I go back to the "Problem Reporting" page, and try again to login.
This time I get "500 Internal error" and ("Powered by CherryPy 2.2.1";
should I expect anything better from python software?).
So I give up, and have now subscribed to lsb-discuss, and send this
problem report to the list. I'll shortly send another message about a
bug in a different section.
I've only just become aware of the 3.2 Beta version of the spec since
seeing the lsb-discuss archives, but a quick scan suggests that the
issues below apply equally to v3.1 and v3.2Beta.
http://www.linux-foundation.org/betaspecs/booksets/LSB-Core-generic/LSB-Core-generic/etc.html
/
http://refspecs.linux-foundation.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/etc.html
:
Please run a spell checker over LSB. (E.g. `implemetnations'.)
§16.2.1 ‘File Naming Conventions’ conflicts with existing practice:
/etc/init.d is one of the above locations, i.e. is subject to these
rules, but names like `checkfs.sh' don't match any of the
alternatives: it contains a dot, so it isn't a name "chosen from the
character set [a-z0-9]", so it isn't a valid assigned name [despite
being one of the names in the current list of lanana init.d names]; it
doesn't contain a hyphen, so it doesn't contain "one or more <hier-n>
components", so it isn't a hierarchical name; and it doesn't begin
with an underscore, so it isn't a reserved name.
Similarly, eight current lanana-assigned init.d names contain
underscore, and four contain uppercase letters (LCDd, rcS, README, X).
Several lanana-assigned names contain hyphen (with a first
component that doesn't contain a dot and isn't a lanana-assigned LSB
provider name).
Some lanana-assigned names contain a hyphen with a first component
that *is* a lanana-assigned LSB provider name (and is thus in fact a
valid hierarchical name despite actually being an assigned name). The
assigned names ciphire-gw, ciphire-proxy and ekahau-engine can
probably safely be retracted and be considered hierarchical names
(their assignee seems to be the corresponding LSB provider), whereas
intel-rng-tools and tac-plus each have Assignee field value "Reserved
for LSB-Compliant Distribution".
I suggest changing the specification of assigned names to include A-Z
and to include underscore other than first character, and to include
dot at least in the case that there is no following hyphen. (Note
that some existing lanana-assigned init.d names contain a hyphen
before the dot: console-screen.kbd.sh, console-screen.sh,
initrd-tools.sh, scsitools-pre.sh.)
What to do about assigned names with hyphens is a bit harder:
presumably the intent was that LSB providers have their own namespace
separate from the assigned-name namespace, which appears to be broken
by the intel-rng-tools and tac-plus assigned names. However, so long
as there's no code that needs to know whether a name is a hierarchical
name or an assigned name, I suppose it doesn't matter whether tac-plus
is considered a tac name or an assigned name, it's just up to lanana
to communicate with the tac and intel providers that tac-plus and
intel-rng-tools are for lanana/LSB to specify rather than those LSB
providers.
I suggest specifying what characters reserved names can contain (other
than the initial underscore). In particular, it would be nice to
specify that they can't contain whitespace, shell-special characters,
non-ASCII characters, control characters etc. What reserved names do
distributions already use? (Debian apparently doesn't use any,
according to `zgrep 'etc/init.d/_' Contents-i386.gz'.) I suggest
starting with something fairly minimal like [a-zA-Z.] and possibly
hyphen or underscore. (I include dot in that list so that `.sh'
etc. can be used.)
It isn't clear whether hier1 can itself contain a hyphen. E.g. if the
LSB provider's "DNS name in lower case, with at least one '.'" is
uni-tuebingen.de, then presumably the resulting names would be of the
form uni-tuebingen.de-blah, which appear to be in the namespace of a
lalana-assigned name of `uni'. I think this issue should be mentioned
explicitly so that people are aware of it.
Finally, I suggest summarizing all the rules into a POSIX extended
regexp, to help those writing tools to check that these rules are
followed. (E.g. at least one implementation of install_initd tries
to check that the given name is reasonable, though the check in the
instance I've seen doesn't match the rules given here.)
pjrm.
More information about the lsb-discuss
mailing list