RPM spec (.spec) has no syntax highlighting
Summary
When RPM spec files are hosted in a GitLab git repository, they do not have any syntax highlighting.
Steps to reproduce
- Upload a valid RPM spec file to a GitLab git repository
- View it from the web interface.
Expected behavior
RPM spec files should have proper syntax highlighting, denoting the various fields, macros, shell expressions, and whatnot.
Actual behavior
RPM spec files have no syntax highlighting and are treated like plain text files.
Relevant logs and/or screenshots
Example on GitLab.com: https://gitlab.com/unity-linux-pkgs-core/dnf/blob/master/dnf.spec
Example on GitHub: https://github.com/rpm-software-management/dnf/blob/master/dnf.spec
Example from a ViewVC instance: http://svnweb.mageia.org/packages/cauldron/dnf/current/SPECS/dnf.spec?view=markup (ViewVC syntax highlighting is busted in this instance)
Example from openSUSE Build Service: https://build.opensuse.org/package/view_file/openSUSE:Factory/dnf/dnf.spec?expand=1
Example from CodeMirror: https://codemirror.net/3/mode/rpm/spec/index.html
Example from Fedora Pagure: https://src.fedoraproject.org/rpms/dnf/blob/master/f/dnf.spec
Output of checks
Results of GitLab application Check
(For installations with omnibus-gitlab package run and paste the output of:
Checking GitLab Shell ...
GitLab Shell version >= 3.2.0 ? ... OK (3.2.0)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
3/4 ... ok
12/6 ... ok
13/7 ... ok
4/9 ... ok
44/10 ... ok
44/11 ... ok
40/12 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
/var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
<stripped>
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
projects have namespace: ...
3/4 ... yes
12/6 ... yes
13/7 ... yes
4/9 ... yes
44/10 ... yes
44/11 ... yes
40/12 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.1.8)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 2.7.3 ? ... yes (2.7.4)
Active users: 58
Checking GitLab ... Finished
Results of GitLab environment info
Server is CentOS 7, but for some reason it doesn't show up under system information...
System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.1.8p440
Gem Version: 2.5.1
Bundler Version:1.10.6
Rake Version: 10.5.0
Sidekiq Version:4.1.4
GitLab information
Version: 8.10.1
Revision: ee0488d
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: <stripped>
HTTP Clone URL: <stripped>
SSH Clone URL: <stripped>
Using LDAP: yes
Using Omniauth: no
GitLab Shell
Version: 3.2.0
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git