Description of problem: Any spec file with Name: or Epoch: etc. on line one displays with every plain text word outlined in red. This seems to result from a change in the viewvc code in revision 2658 just prior to the release of 1.1.12 that we are using. Here is an example:- http://svnweb.mageia.org/packages/cauldron/yaflight/current/SPECS/yaflight.spec?view=markup&pathrev=310060 I reported this upstream and the initial reply is:- "Yup. That's one ugly display, all right! Would it be possible for you to set the mime-type for .spec files to something like "text/plain" in your mimetypes.conf file?" I'm not sure but I think this would also remove the special rendering of comments. An alternative fix I found was to disable the red error highlighting in the styles.css file - this works without affecting the comments, but may upset something else that I am unaware of. --- styles.css~ 2012-10-25 21:57:21.000000000 +0100 +++ styles.css 2012-10-25 22:09:49.845625732 +0100 @@ -126,7 +126,7 @@ width: 100%; } .pygments-c { color: #408080; font-style: italic } /* Comment */ -.pygments-err { border: 1px solid #FF0000 } /* Error */ +/*.pygments-err { border: 1px solid #FF0000 } /* Error */ .pygments-k { color: #008000; font-weight: bold } /* Keyword */ .pygments-o { color: #666666 } /* Operator */ .pygments-cm { color: #408080; font-style: italic } /* Comment.Multiline */ It certainly needs fixing one way or another. I will post a link to the discussion topic at viewvc dev when their site is running - it's down at the moment. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3.
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4251&dsMessageId=3023559
If we knew what mimetype it is detecting as when it highlights spec files *correctly*, we could manually set it to that.
CC: (none) => luigiwalser
Having searched the pygments site, it seems there is no lexer for rpm spec files. I have tried a whole range of pygments lexers on a spec file and I cannot replicate the "normal" view that we are seeing where only text preceded by "%" has a colour change. I don't think that is very useful anyway, so I would vote for "text/plain" until a lexer for .spec becomes available (if ever).
Keywords: (none) => PATCH
Any python experts feel like writing one? :- http://pygments.org/docs/lexerdevelopment/
(In reply to comment #4) > Any python experts feel like writing one? :- > > http://pygments.org/docs/lexerdevelopment/ That'd be worth asking on the -dev list, maybe there will be interest.
(In reply to comment #5) > > That'd be worth asking on the -dev list, maybe there will be interest. > Done :)
Good news - an RPMspec lexer has been written and it tests OK here. https://bitbucket.org/gentoo90/pygments-main/changeset/346513eed7b5767e7e456c0b85361fd2 Not sure when it will be available in a tarball so we can update our package but I will keep a lookout :)
Pygments Release 1.6 rc 1 is out! ...and it includes the above RPM spec lexer. Can we get this into Cauldron to fix this bug before Mga3 ?
Component: svn.mageia.org => RPM PackagesVersion: trunk => CauldronAssignee: sysadmin-bugs => bugsquadProduct: Websites => MageiaTarget Milestone: --- => Mageia 3Source RPM: (none) => python-pygments-1.5-2.mga3
CC: (none) => sysadmin-bugs
CC: (none) => makowski.mageiaAssignee: bugsquad => makowski.mageia
Philippe, See -dev ML subject "Update question about python-pygments" I have updated package ready - if you wish I can commit for your review. Barry
Since time is critical I have committed the new version and also patched it to fix highlighting of 'Suggests:' that I noticed was missing. I will report it upstream. I will also request a submit on -dev ML
sorry for the delay, I did not saw the emails and thanks for having taking care of
(In reply to comment #11) > sorry for the delay, I did not saw the emails > and thanks for having taking care of OK no problem. This is now in Cauldron, and needs to be applied to the Mageia server that handles ViewVC
Keywords: PATCH => (none)Component: RPM Packages => svn.mageia.orgVersion: Cauldron => trunkAssignee: makowski.mageia => sysadmin-bugsProduct: Mageia => WebsitesTarget Milestone: Mageia 3 => ---
(In reply to comment #12) > (In reply to comment #11) > This is now in Cauldron, and needs to be applied to the Mageia server that > handles ViewVC "This" may not now be obvious. It refers to python-pygments package
python-pygments-1.6-0.rc1.1 installed on svnweb
Status: NEW => RESOLVEDCC: (none) => tmbResolution: (none) => FIXED
\o/ Yay :)