Bug 1500574 - Review Request: golang-github-alecthomas-chroma - A general purpose syntax highlighter in pure Go
Summary: Review Request: golang-github-alecthomas-chroma - A general purpose syntax hi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1500571 1500573 1500831
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-11 04:42 UTC by Athos Ribeiro
Modified: 2017-11-11 02:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-11 02:55:54 UTC
Type: ---
Embargoed:
zebob.m: fedora-review+


Attachments (Terms of Use)

Description Athos Ribeiro 2017-10-11 04:42:06 UTC
Spec URL: https://athoscr.fedorapeople.org/packaging/golang-github-alecthomas-chroma.spec
SRPM URL: https://athoscr.fedorapeople.org/packaging/golang-github-alecthomas-chroma-0.1.1-1.fc26.src.rpm
Description: A general purpose syntax highlighter in pure Go
Fedora Account System Username: athoscr

Comment 1 Robert-André Mauchin 🐧 2017-10-11 11:24:05 UTC
This package is missing:

DEBUG util.py:458:  No matching package to install: 'golang(github.com/aymerick/douceur/css)'
DEBUG util.py:458:  No matching package to install: 'golang(github.com/aymerick/douceur/parser)'

I guess you need to package golang-github-aymerick-douceur too.

Comment 2 Athos Ribeiro 2017-10-11 14:55:29 UTC
Thanks for the input, Robert!

This added a few new dependencies in the dependency chain

Comment 3 Robert-André Mauchin 🐧 2017-10-12 09:03:47 UTC
   I've got an error trying to build thee package:

+ go build -buildmode pie -compiler gc -tags=rpm_crashtraceback -ldflags ' -B 0xc83cd7cc0cef861d84a31cb3d1223c0778855af3 -extldflags '\''-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'\''' -a -v -x -o bin/css2style github.com/alecthomas/chroma/css2style
WORK=/tmp/go-build802240568
can't load package: package github.com/alecthomas/chroma/css2style: cannot find package "github.com/alecthomas/chroma/css2style" in any of:
	/usr/lib/golang/src/github.com/alecthomas/chroma/css2style (from $GOROOT)
	/builddir/build/BUILD/chroma-bc2d6680e4f0f640898b2564c3d479d5cb9023f3/src/github.com/alecthomas/chroma/css2style (from $GOPATH)
	/usr/share/gocode/src/github.com/alecthomas/chroma/css2style
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.KWjMzW (%build)
    Bad exit status from /var/tmp/rpm-tmp.KWjMzW (%build)


   I solved this by modifying:

%gobuild -o bin/css2style %{import_path}/css2style
%gobuild -o bin/exercise %{import_path}/exercise

   into:

%gobuild -o bin/css2style %{import_path}/_tools/css2style
%gobuild -o bin/exercise %{import_path}/_tools/exercise

  But then I've got another error:

+ go build -buildmode pie -compiler gc -tags=rpm_crashtraceback -ldflags ' -B 0x629aebb49a981394444d4eb5e4869b940e646646 -extldflags '\''-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'\''' -a -v -x -o bin/css2style github.com/alecthomas/chroma/_tools/css2style
WORK=/tmp/go-build398625459
src/github.com/alecthomas/chroma/_tools/css2style/main.go:11:2: cannot find package "gopkg.in/alecthomas/kingpin.v3-unstable" in any of:
	/usr/lib/golang/src/gopkg.in/alecthomas/kingpin.v3-unstable (from $GOROOT)
	/builddir/build/BUILD/chroma-bc2d6680e4f0f640898b2564c3d479d5cb9023f3/src/gopkg.in/alecthomas/kingpin.v3-unstable (from $GOPATH)
	/usr/share/gocode/src/gopkg.in/alecthomas/kingpin.v3-unstable


It seems css2style requires yet another dependency: http://gopkg.in/alecthomas/kingpin.v3-unstable

Comment 4 Athos Ribeiro 2017-10-14 19:53:48 UTC
Hi Robert,

Thanks for the input!

The gopkg.in page for kingpin [1] says it is an unstable version, which should not be used in production. In upstream repository [2] it is clear that version 3 is not out yet. I am thinking of not shipping the command line tools with chroma  until the tools start requiring a stable version of kingpin.

Note that kingpin is already packaged in fedora [3] and it does provide the gopkg.in namespace for v2 [4].

Any thoughts?

New sources:

Spec URL: https://athoscr.fedorapeople.org/packaging/golang-github-alecthomas-chroma.spec
SRPM URL: https://athoscr.fedorapeople.org/packaging/golang-github-alecthomas-chroma-0.1.1-2.fc26.src.rpm
Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=22448390

[1] http://gopkg.in/alecthomas/kingpin.v3-unstable
[3] https://github.com/alecthomas/kingpin
[3] https://koji.fedoraproject.org/koji/packageinfo?packageID=24649
[4] https://src.fedoraproject.org/rpms/golang-github-alecthomas-kingpin/blob/master/f/golang-github-alecthomas-kingpin.spec#_10

Comment 5 Robert-André Mauchin 🐧 2017-10-15 15:46:42 UTC
It's your choice, either you package Kingpin unstable, or you do not include the tools in this package, the library will probably work just fine.

Comment 6 Athos Ribeiro 2017-10-15 17:55:11 UTC
OK! The last sources reflect those changes (I added a with_build macro, which is deactivated).

Comment 7 Robert-André Mauchin 🐧 2017-10-15 18:07:14 UTC
this is great, package is accepted.

Comment 8 Athos Ribeiro 2017-10-15 18:09:23 UTC
Thanks for all the reviews on these packages in hugo dependency tree, Robert!!!

Comment 9 Gwyn Ciesla 2017-10-16 14:09:06 UTC
(fedrepo-req-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/golang-github-alecthomas-chroma

Comment 10 Fedora Update System 2017-10-17 13:24:04 UTC
golang-github-alecthomas-chroma-0.1.1-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-9fbb121513

Comment 11 Fedora Update System 2017-10-17 18:52:28 UTC
golang-github-alecthomas-chroma-0.1.1-2.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-9fbb121513

Comment 12 Fedora Update System 2017-11-11 02:55:54 UTC
golang-github-alecthomas-chroma-0.1.1-2.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.