#1232 No RPM Spec syntax highlighting
Closed: Fixed 6 years ago Opened 7 years ago by ngompa.

It appears that there's no RPM spec syntax highlighting on Fedora Pagure.

For example, when looking at rpm.spec on pkgs.stg.fp.o, no syntax highlighting is rendered.

On IRC, I confirmed with Ryan Lerch that this is supposed to work, but it doesn't on prod/staging environments. He posits that pygments is < 1.6, which lacks support for it. His local F24 install with new pygments works fine, according to him.


Confirmed that i am getting highlighting for spec files in my dev instance (using pygments 2.1.3).

And the support for RPM Specs was added in 1.6 of pygments:
https://bitbucket.org/birkenfeld/pygments-main/src/tip/CHANGES?fileviewer=file-view-default#CHANGES-378

We just need to talk with fedora-infra to see what version is on our prod instance, and if it is <1.6 then see if it can be updated.

The version in prod is python-pygments-1.4-9.el7.noarch and it is not coming from EPEL: https://admin.fedoraproject.org/pkgdb/package/python-pygments (making updating it more complicated)

@pingou shouldn't we just start using F25 instead of EL7?

@ignatenkobrain volunteering for the support and maintenance?

@pingou yes! (though you will need to teach me a bit)

+1 for f25 :doughnut:

Really would like this! :)

Just thinking out loud, we could just make a forward-compat package: python-pygments2 and put it in epel only :)

@pingou or migrate to proper distribution (like Fedora) which has all those features out of the box :-P

@ignatenkobrain And at the same time get to chase libgit2 and pygit2 with every minor release, since they like changing their API with minor updates.

@puiterwijk Maybe with new pygit2, #1867 can be solved?

@ngompa I don't know, but the problem is that if we follow Fedora, someone will need to put in the work to make Pagure work with every minor libgit2/pygit2 update.
And if not that, backport security fixes for libgit2.

@puiterwijk since I'm maintainer of libgit2 (and all such) in Fedora, I can port pagure to new API every time when there' new update in Fedora.

Now that pygments2 is in epel7 this is trivial, I'm going to fix this on the infra side.

Metadata Update from @pingou:
- Issue status updated to: Closed (was: Open)
- Issue close_status updated to: Fixed

Metadata Update from @ngompa:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

6 years ago

Login to comment on this ticket.

Metadata