Spec URL: https://github.com/rimolive/oshinko-cli-rpm/blob/master/oshinko-cli.spec SRPM URL: https://rimolive.fedorapeople.org/oshinko-cli-0.5.4-0.fc28.src.rpm Description: Command line interface for spark cluster management app Fedora Account System Username: rimolive
- ExclusiveArch: x86_64 Why? - Unbundle vendor - would recommend not using the build scrip but do a %gobuild instead - Version: 0.5.4 should go before %gometa
(In reply to Robert-André Mauchin from comment #1) > - ExclusiveArch: x86_64 As specified in the github repo, it is intended to use with openshift. Having that said, I will change this line to reflect what openshift does for packaging. > > > Why? > > - Unbundle vendor Will work on this > > - would recommend not using the build script but do a %gobuild instead Is it recommended or required? The Makefile does more than just build the code and it's important to run as is. > > - Version: 0.5.4 should go before %gometa Done, will push the change soon
(In reply to Robert-André Mauchin from comment #1) > - ExclusiveArch: x86_64 > > > Why? > > - Unbundle vendor Just to make sure I understood what you meant by "Unbundle vendor": You want me to remove all contents of this dir and replace with BuildRequires entries for each library. Is that correct? > > - would recommend not using the build scrip but do a %gobuild instead > > - Version: 0.5.4 should go before %gometa
Yeah that's the gist of it, it will take a lot of time to package them all. If you're not up to it that's okay, that's a considerable task which maybe should fall on the new Golang SIG,s shoulders. >Is it recommended or required? The Makefile does more than just build the code and it's important to run as is. %gobuild passes some supplementary flags specifc to Fedora. Try to reimplement scripts/build.sh into the SPEC.
Thanks for the clarification. I made the changes according to the review, please take a look: https://github.com/rimolive/oshinko-cli-rpm/commit/da1c772b1955ae6852ec3c0760cfcca490790cb7
- I'd rather you do the opposite as I said: %global GIT_COMMIT 7acbd8382 %global TAG %{VERSION}-%{GIT_COMMIT} %global SPARK_IMAGE "radanalyticsio/openshift-spark:2.3-latest" export LDFLAGS="$LDFLAGS -X %{goipath}/version.gitTag=%{TAG} -X %{goipath}/version.appName=oshinko -X %{goipath}/version.sparkImage=%{SPARK_IMAGE}" %gobuild -o _bin/oshinko %{goipath}/cmd/oshinko ln -s _bin/oshinko _bin/oshinko-cli %install %goinstall install -Dpm 0755 _bin/oshinko %{buildroot}%{_bindir}/oshinko install -Dpm 0755 _bin/oshinko-cli %{buildroot}%{_bindir}/oshinko-cli And drop the patch. - This shouldn't be needed: %global debug_package %{nil} %global gopath %{_datadir}/gocode - Use: URL: %{gourl} Source0: %{gosource} - I don't understand why you expect go_arches not to be defined, this whole part should be removed, it is defined by %gometa: # If go_arches not defined fall through to implicit golang archs %if 0%{?go_arches:1} ExclusiveArch: %{go_arches} %else ExclusiveArch: x86_64 aarch64 ppc64le s390x %endif If you plan for EPEL, the new Go packaging doesn't work there yet so you would need to redo the SPEC in the old style anyway.
Another issue is that the -devel package requires other non packaged dependencies to install: rpm -q --requires -p golang-github-radanalyticsio-oshinko-cli-devel-0.5.4-0.fc30.noarch.rpm golang(github.com/ghodss/yaml) golang(github.com/go-openapi/errors) golang(github.com/go-openapi/loads) golang(github.com/go-openapi/runtime) golang(github.com/go-openapi/runtime/client) golang(github.com/go-openapi/runtime/middleware) golang(github.com/go-openapi/spec) golang(github.com/go-openapi/strfmt) golang(github.com/go-openapi/swag) golang(github.com/go-openapi/validate) golang(github.com/golang/glog) golang(github.com/jessevdk/go-flags) golang(github.com/openshift/api/apps/v1) golang(github.com/openshift/api/route/v1) golang(github.com/openshift/api/user/v1) golang(github.com/openshift/client-go/apps/clientset/versioned) golang(github.com/openshift/client-go/project/clientset/versioned) golang(github.com/openshift/client-go/route/clientset/versioned) golang(github.com/openshift/client-go/user/clientset/versioned) golang(github.com/openshift/origin/pkg/api/install) golang(github.com/openshift/origin/pkg/client/config) golang(github.com/openshift/origin/pkg/cmd/flagtypes) golang(github.com/openshift/origin/pkg/oc/cli/config) golang(github.com/openshift/origin/pkg/oc/cli/util/clientcmd) golang(github.com/openshift/origin/pkg/project/generated/internalclientset/typed/project/internalversion) golang(github.com/openshift/origin/pkg/user/apis/user) golang(github.com/openshift/origin/pkg/user/generated/internalclientset/typed/user/internalversion) golang(github.com/renstrom/dedent) golang(github.com/rs/cors) golang(github.com/spf13/cobra) golang(github.com/tylerb/graceful) golang(k8s.io/api/core/v1) golang(k8s.io/apimachinery/pkg/api/errors) golang(k8s.io/apimachinery/pkg/api/resource) golang(k8s.io/apimachinery/pkg/apis/meta/v1) golang(k8s.io/apimachinery/pkg/labels) golang(k8s.io/apimachinery/pkg/runtime) golang(k8s.io/apimachinery/pkg/runtime/schema) golang(k8s.io/apimachinery/pkg/runtime/serializer) golang(k8s.io/apimachinery/pkg/types) golang(k8s.io/apimachinery/pkg/util/intstr) golang(k8s.io/apimachinery/pkg/util/runtime) golang(k8s.io/apimachinery/pkg/util/sets) golang(k8s.io/apimachinery/pkg/util/wait) golang(k8s.io/apimachinery/pkg/watch) golang(k8s.io/apiserver/pkg/util/logs) golang(k8s.io/client-go/discovery) golang(k8s.io/client-go/discovery/fake) golang(k8s.io/client-go/informers) golang(k8s.io/client-go/kubernetes) golang(k8s.io/client-go/kubernetes/scheme) golang(k8s.io/client-go/kubernetes/typed/core/v1) golang(k8s.io/client-go/listers/apps/v1) golang(k8s.io/client-go/rest) golang(k8s.io/client-go/testing) golang(k8s.io/client-go/tools/cache) golang(k8s.io/client-go/tools/clientcmd) golang(k8s.io/client-go/tools/clientcmd/api) golang(k8s.io/client-go/tools/record) golang(k8s.io/client-go/util/cert) golang(k8s.io/client-go/util/flowcontrol) golang(k8s.io/client-go/util/workqueue) golang(k8s.io/kubernetes/pkg/api/install) golang(k8s.io/kubernetes/pkg/apis/autoscaling/install) golang(k8s.io/kubernetes/pkg/apis/batch/install) golang(k8s.io/kubernetes/pkg/apis/core/install) golang(k8s.io/kubernetes/pkg/apis/extensions/install) golang(k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset) golang(k8s.io/kubernetes/pkg/kubectl/cmd/templates) golang(k8s.io/kubernetes/pkg/kubectl/cmd/util) So it is back to square 1 with packaging missing deps.
(In reply to Robert-André Mauchin from comment #6) > - I'd rather you do the opposite as I said: > > %global GIT_COMMIT 7acbd8382 > %global TAG %{VERSION}-%{GIT_COMMIT} > %global SPARK_IMAGE "radanalyticsio/openshift-spark:2.3-latest" > > export LDFLAGS="$LDFLAGS -X %{goipath}/version.gitTag=%{TAG} -X > %{goipath}/version.appName=oshinko -X > %{goipath}/version.sparkImage=%{SPARK_IMAGE}" > > %gobuild -o _bin/oshinko %{goipath}/cmd/oshinko > ln -s _bin/oshinko _bin/oshinko-cli > > %install > %goinstall > install -Dpm 0755 _bin/oshinko %{buildroot}%{_bindir}/oshinko > install -Dpm 0755 _bin/oshinko-cli %{buildroot}%{_bindir}/oshinko-cli > > > And drop the patch. > > - This shouldn't be needed: > > %global debug_package %{nil} For some reason, if I remove this line the epel-7 build fails. I can share my copr build with the error if you want > > %global gopath %{_datadir}/gocode > > - Use: > > URL: %{gourl} > Source0: %{gosource} The Source0 must be set as I did because the source generated by the go macro is wrong. But gourl macro is being used now. > > - I don't understand why you expect go_arches not to be defined, this whole > part should be removed, it is defined by %gometa: > > # If go_arches not defined fall through to implicit golang archs > %if 0%{?go_arches:1} > ExclusiveArch: %{go_arches} > %else > ExclusiveArch: x86_64 aarch64 ppc64le s390x > %endif As this package is to use with OpenShift, I just reused these lines from the OpenShift packages. > > If you plan for EPEL, the new Go packaging doesn't work there yet so you > would need to redo the SPEC in the old style anyway. I added some conditionals to run the go macros only for Fedora builds.
(In reply to Robert-André Mauchin from comment #7) > Another issue is that the -devel package requires other non packaged > dependencies to install: > > rpm -q --requires -p > golang-github-radanalyticsio-oshinko-cli-devel-0.5.4-0.fc30.noarch.rpm > golang(github.com/ghodss/yaml) > golang(github.com/go-openapi/errors) > golang(github.com/go-openapi/loads) > golang(github.com/go-openapi/runtime) > golang(github.com/go-openapi/runtime/client) > golang(github.com/go-openapi/runtime/middleware) > golang(github.com/go-openapi/spec) > golang(github.com/go-openapi/strfmt) > golang(github.com/go-openapi/swag) > golang(github.com/go-openapi/validate) > golang(github.com/golang/glog) > golang(github.com/jessevdk/go-flags) > golang(github.com/openshift/api/apps/v1) > golang(github.com/openshift/api/route/v1) > golang(github.com/openshift/api/user/v1) > golang(github.com/openshift/client-go/apps/clientset/versioned) > golang(github.com/openshift/client-go/project/clientset/versioned) > golang(github.com/openshift/client-go/route/clientset/versioned) > golang(github.com/openshift/client-go/user/clientset/versioned) > golang(github.com/openshift/origin/pkg/api/install) > golang(github.com/openshift/origin/pkg/client/config) > golang(github.com/openshift/origin/pkg/cmd/flagtypes) > golang(github.com/openshift/origin/pkg/oc/cli/config) > golang(github.com/openshift/origin/pkg/oc/cli/util/clientcmd) > golang(github.com/openshift/origin/pkg/project/generated/internalclientset/ > typed/project/internalversion) > golang(github.com/openshift/origin/pkg/user/apis/user) > golang(github.com/openshift/origin/pkg/user/generated/internalclientset/ > typed/user/internalversion) > golang(github.com/renstrom/dedent) > golang(github.com/rs/cors) > golang(github.com/spf13/cobra) > golang(github.com/tylerb/graceful) > golang(k8s.io/api/core/v1) > golang(k8s.io/apimachinery/pkg/api/errors) > golang(k8s.io/apimachinery/pkg/api/resource) > golang(k8s.io/apimachinery/pkg/apis/meta/v1) > golang(k8s.io/apimachinery/pkg/labels) > golang(k8s.io/apimachinery/pkg/runtime) > golang(k8s.io/apimachinery/pkg/runtime/schema) > golang(k8s.io/apimachinery/pkg/runtime/serializer) > golang(k8s.io/apimachinery/pkg/types) > golang(k8s.io/apimachinery/pkg/util/intstr) > golang(k8s.io/apimachinery/pkg/util/runtime) > golang(k8s.io/apimachinery/pkg/util/sets) > golang(k8s.io/apimachinery/pkg/util/wait) > golang(k8s.io/apimachinery/pkg/watch) > golang(k8s.io/apiserver/pkg/util/logs) > golang(k8s.io/client-go/discovery) > golang(k8s.io/client-go/discovery/fake) > golang(k8s.io/client-go/informers) > golang(k8s.io/client-go/kubernetes) > golang(k8s.io/client-go/kubernetes/scheme) > golang(k8s.io/client-go/kubernetes/typed/core/v1) > golang(k8s.io/client-go/listers/apps/v1) > golang(k8s.io/client-go/rest) > golang(k8s.io/client-go/testing) > golang(k8s.io/client-go/tools/cache) > golang(k8s.io/client-go/tools/clientcmd) > golang(k8s.io/client-go/tools/clientcmd/api) > golang(k8s.io/client-go/tools/record) > golang(k8s.io/client-go/util/cert) > golang(k8s.io/client-go/util/flowcontrol) > golang(k8s.io/client-go/util/workqueue) > golang(k8s.io/kubernetes/pkg/api/install) > golang(k8s.io/kubernetes/pkg/apis/autoscaling/install) > golang(k8s.io/kubernetes/pkg/apis/batch/install) > golang(k8s.io/kubernetes/pkg/apis/core/install) > golang(k8s.io/kubernetes/pkg/apis/extensions/install) > golang(k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset) > golang(k8s.io/kubernetes/pkg/kubectl/cmd/templates) > golang(k8s.io/kubernetes/pkg/kubectl/cmd/util) > > So it is back to square 1 with packaging missing deps. Does that mean I still need to packages the dependencies? That's my first Go RPM (although I packages other softwares, it is also my first package to add in Fedora) so if you could give me some options to solve this item that would be great.
(In reply to Ricardo Martinelli de Oliveira from comment #8) > > If you plan for EPEL, the new Go packaging doesn't work there yet so you > > would need to redo the SPEC in the old style anyway. > > I added some conditionals to run the go macros only for Fedora builds. I think you should maintain two differents SPEC in parallel for EPEL but you can do as you wish. (In reply to Ricardo Martinelli de Oliveira from comment #9) > > So it is back to square 1 with packaging missing deps. > > Does that mean I still need to packages the dependencies? That's my first Go > RPM (although I packages other softwares, it is also my first package to add > in Fedora) so if you could give me some options to solve this item that > would be great. Well you need to package the dependencies needed to install the devel package. Some may already be packaged (just check that "dnf install "golang(github.com/ghodss/yaml)"" exists for example). This kinda requires lots of work. Also I don't think kubernetes is packaged for EPEL7, so you'll hit a problem there and might need to work with Kubernetes maintainers to have it on EPEL, if you really want to support EPEL.
On the other hand, do we really need golang-github-radanalyticsio-oshinko-cli-devel? If this is to be used as a command line tool only, I think we could skip it. The -devel package is only useful if other things need the library to be built.
You are right, we can ignore -devel package. All I need is to package the binary, but I thought the -devel package would be required.
I'll be busy tomorrow so if you could make the necessary changes to remove the -devel subpackage right now, it would be great.
https://github.com/rimolive/oshinko-cli-rpm/commit/4da4cebae1bb6e514a634a57e22a054c309d6fb9
- I would switch 0%{?rhel} >= 7 to == 7, I hope for RHEL 8 we will have our new Go packaging working. - Use a more meaningful name for your archive: Source0: %url/archive/v%{version}/%{name}-%{version}.tar.gz - Split the description to stay below 80 characters per line: oshinko-cli.x86_64: W: spelling-error %description -l en_US subdirectory -> sub directory, sub-directory, directory oshinko-cli.x86_64: E: description-line-too-long C The oshinko application manages Apache Spark clusters on OpenShift. The application oshinko-cli.x86_64: E: description-line-too-long C consists of a REST server (oshinko-rest) and a web UI and is designed to run in an oshinko-cli.x86_64: E: description-line-too-long C This repository contains tools to launch the oshinko application along with the source oshinko-cli.x86_64: E: description-line-too-long C code for the oshinko REST server in the rest subdirectory. The source code for the web - Changelog entry is incorrect oshinko-cli.x86_64: W: incoherent-version-in-changelog 0-0.5.4 ['0.5.4-0.fc30', '0.5.4-0'] It should be * Thu Jul 26 2018 Ricardo Martinelli de Oliveira <rmartine> - 0.5.4-1 - And Release should start at 1 Release: 1%{?dist} - Use %global not define: %global debug_package %{nil} Also only use it on EPEL since it's where it fails
(In reply to Robert-André Mauchin from comment #15) > - I would switch 0%{?rhel} >= 7 to == 7, I hope for RHEL 8 we will have our > new Go packaging working. > > - Use a more meaningful name for your archive: > > Source0: %url/archive/v%{version}/%{name}-%{version}.tar.gz Is it required the /archive/ part? This is what I have for URL: https://github.com/radanalyticsio/oshinko-cli/releases/download/v0.5.4/oshinko-cli-v0.5.4_linux_amd64.tar.gz > > - Split the description to stay below 80 characters per line: > > > oshinko-cli.x86_64: W: spelling-error %description -l en_US subdirectory -> > sub directory, sub-directory, directory > oshinko-cli.x86_64: E: description-line-too-long C The oshinko application > manages Apache Spark clusters on OpenShift. The application > oshinko-cli.x86_64: E: description-line-too-long C consists of a REST server > (oshinko-rest) and a web UI and is designed to run in an > oshinko-cli.x86_64: E: description-line-too-long C This repository contains > tools to launch the oshinko application along with the source > oshinko-cli.x86_64: E: description-line-too-long C code for the oshinko REST > server in the rest subdirectory. The source code for the web > > > - Changelog entry is incorrect > > oshinko-cli.x86_64: W: incoherent-version-in-changelog 0-0.5.4 > ['0.5.4-0.fc30', '0.5.4-0'] > > It should be > > * Thu Jul 26 2018 Ricardo Martinelli de Oliveira <rmartine> - > 0.5.4-1 > > - And Release should start at 1 > > Release: 1%{?dist} > > > - Use %global not define: > > %global debug_package %{nil} > > Also only use it on EPEL since it's where it fails
(In reply to Ricardo Martinelli de Oliveira from comment #16) > (In reply to Robert-André Mauchin from comment #15) > > - I would switch 0%{?rhel} >= 7 to == 7, I hope for RHEL 8 we will have our > > new Go packaging working. > > > > - Use a more meaningful name for your archive: > > > > Source0: %url/archive/v%{version}/%{name}-%{version}.tar.gz > > Is it required the /archive/ part? This is what I have for URL: > https://github.com/radanalyticsio/oshinko-cli/releases/download/v0.5.4/ > oshinko-cli-v0.5.4_linux_amd64.tar.gz > That's not the source code, source code is at the "/archive/" part.
Hope to have everything fixed: https://github.com/rimolive/oshinko-cli-rpm/commit/e9dcd008a5c0993244da89845aa451d98ff1c94b
Source has two lines: Source0: https://%{goipath}/archive/v%{version}.tar.gz https://%{goipath}/archive/v%{version}/%{name}-v%{version}.tar.gz Fix it. Package otherwise approved.
Fixed the Source URL: https://github.com/rimolive/oshinko-cli-rpm/commit/ab7b25c98d3fc9f5bfa01bb04b6b72b2c783a6e2
Don't wait too long to request your repo, you have 60 days.
repo request: https://pagure.io/releng/fedora-scm-requests/issue/8170
last repo request was closed because my e-mail in bugzilla was different than my FAS account e-mail (unbelievable!) so I created another one: https://pagure.io/releng/fedora-scm-requests/issue/8176
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/oshinko-cli
oshinko-cli-0.5.4-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-51a8158b34
oshinko-cli-0.5.4-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-7074932c8c
oshinko-cli-0.5.4-1.fc29 has been pushed to the Fedora 29 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-2018-51a8158b34
oshinko-cli-0.5.4-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
oshinko-cli-0.5.4-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.