Starting somewhere in 2003 or 2004, the dates in GLSAs differ from the format asserted in the glsa.dtd: http://www.gentoo.org/dtd/glsa.dtd Example: <announced>October 20, 2007</announced> <revised>October 20, 2007: 01</revised> DTD excerpt: <!-- Element: announced Description: Date when the advisory is publicised The format must be "YYYY-mm-dd" Example: <announced>2003-11-20</announced> --> <!ELEMENT announced (#PCDATA)> <!-- Element: revised Description: Last revision date of the GLSA Example: <revised>2003-11-20</revised> --> <!ELEMENT revised (#PCDATA)> Either all GLSAs since 2003 should be corrected, or the comment in the DTD be changed.
I guess the format changed with the introduction of GLSAmaker.
Xavier, please advise.
A DTD cannot force any date to use the yyyy-mm-dd format. Since the yyyy-mm-dd can be validated and formatted by our XSL and is the format we use, I'd favour it over the current format, but it means glsamaker needs to be changed. I can convert dates in all GLSAs if you want me to. Last but not least, it would make it easier to fix bug #141909 as the date would not have to be decoded and reformatted for the feed. FYI, current XSL formats yyyy-mm-dd and leaves anything else as-is. Old one with YYYY-MM-DD in announced and revised tags: http://gentoo.org/security/en/glsa/glsa-200312-08.xml Pre-formatted by glsamaker: http://gentoo.org/security/en/glsa/glsa-200711-16.xml
I've just hit this again while attempting to write XML Schema for GLSAs. Long story short, this is a terrible mess and I can't understand how the hell things like this happen in Gentoo. In any case, please either update the spec to match the crap you committed, or fix the crap you committed to match the spec.
A little update based on what me and b-man have established. We have two formats for announced and three formats for revised: 1. ISO8601 [with count="" attr for <revised/>] -- not used at all, 2. ISO8601 [followed by :N for <revised/>] -- used by few old GLSAs, 3. textual date [followed by :N for <revised/>] -- used by GLSAMaker. The third format is most deployed at the moment but it sucks in terms of machine-readability. FWICS, the GLSA code in Portage (used by glsa-check) supports all three formats. pkgcore doesn't seem to care about dates at all. GLSA feed on website doesn't use dates either. So I think it'd be reasonable to go back to the 1st format which is most machine-friendly. This would involve: 1. fixing GLSAMaker to use it, 2. batch-fixing all existing GLEPs to use it.
(In reply to Michał Górny from comment #5) > A little update based on what me and b-man have established. > > We have two formats for announced and three formats for revised: > > 1. ISO8601 [with count="" attr for <revised/>] -- not used at all, > > 2. ISO8601 [followed by :N for <revised/>] -- used by few old GLSAs, > > 3. textual date [followed by :N for <revised/>] -- used by GLSAMaker. > > The third format is most deployed at the moment but it sucks in terms of > machine-readability. > > FWICS, the GLSA code in Portage (used by glsa-check) supports all three > formats. pkgcore doesn't seem to care about dates at all. GLSA feed on > website doesn't use dates either. > > So I think it'd be reasonable to go back to the 1st format which is most > machine-friendly. This would involve: > > 1. fixing GLSAMaker to use it, > > 2. batch-fixing all existing GLEPs to use it. All dates have been switched in GLSAMaker to use ISO8601 per Alex's commits. https://gitweb.gentoo.org/proj/glsamaker.git/commit/?id=e3b81e36e6577ee550a046f573002950bc26bea5 https://gitweb.gentoo.org/proj/glsamaker.git/commit/?id=0967557d18629ab6593dd2ef580e4e49c43d8c66 The count="" attr is broken it seems somewhere within glsa-check, but GLSAMaker is outputting the GLSA's with this attr already. This requires a manual fix before pushing to the repo. I am testing more to try and find the resolution. I have a script ready for the repo that has been tested and converts all old standard dates to the new format. Once everything is fixed we can migrate the repo.
Dates converted via https://gitweb.gentoo.org/data/glsa.git/commit/?id=612f47deca97e8d7ffc2100c1dbc82a602abdf39 Conversion to count attribute usage will follow once >=app-portage/gentoolkit-0.4.0 has been stabilized.
Revision converted into "count" attribute via https://gitweb.gentoo.org/data/glsa.git/commit/?id=f62be9710b7244af8dc15887df52ae442c460d45 All done.