Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 676864 - dev-util/gitstrap-0.1.7 - Command line tool to bootstrap Github repository
Summary: dev-util/gitstrap-0.1.7 - Command line tool to bootstrap Github repository
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Default Assignee for New Packages
URL: https://github.com/g4s8/gitstrap
Whiteboard:
Keywords: EBUILD, PullRequest
Depends on:
Blocks:
 
Reported: 2019-01-29 19:45 UTC by g4s8.public
Modified: 2019-02-28 10:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gitstrap-0.1.7.ebuild (gitstrap-0.1.7.ebuild,1.05 KB, text/plain)
2019-01-29 19:45 UTC, g4s8.public
Details
gitstrap-0.1.7.ebuild (gitstrap-0.1.7.ebuild,1.01 KB, text/plain)
2019-01-31 18:07 UTC, g4s8.public
Details
metadata.xml (metadata.xml,1012 bytes, application/xml)
2019-01-31 18:07 UTC, g4s8.public
Details
Manifest (Manifest,305 bytes, text/plain)
2019-01-31 18:08 UTC, g4s8.public
Details
gitstrap-0.1.7.ebuild (gitstrap-0.1.7.ebuild,1.03 KB, text/plain)
2019-02-28 10:22 UTC, g4s8.public
Details

Note You need to log in before you can comment on or make changes to this bug.
Description g4s8.public 2019-01-29 19:45:39 UTC
Created attachment 563240 [details]
gitstrap-0.1.7.ebuild

Hi.

Please look at "gitstrap-0.1.7.ebuild" attachment and add it as Gentoo package.

Gitstrap is a command line tool which helps to bootstrap Github repositories. It can create or delete repository on Github, sync with local folder, configure webhooks, collaborators and some other settings via yaml configuration file. You may find more details on README: https://github.com/g4s8/gitstrap

It has build dependency: golang, and runtime dependency: git.

I've checked this ebuild in my overlay https://github.com/g4s8-overlay/layman/tree/master/dev-vcs/gitstrap and sucessfully install on amd64 Gentoo

I suggest to place it in 'dev-vcs/gitstrap'.

Thanks.
Comment 1 g4s8.public 2019-01-29 22:02:15 UTC
Submitted PR: https://github.com/gentoo/gentoo/pull/10936

(slightly changed ebuild to fix repoman warnings)
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2019-01-29 22:20:00 UTC
Comment on attachment 563240 [details]
gitstrap-0.1.7.ebuild

># Copyright 1999-2018 Gentoo Foundation
># Distributed under the terms of the GNU General Public License v2
>
>EAPI=6

Might as well have been 7.

>
>REPO="github.com/g4s8/${PN}"

You set REPO

>DESCRIPTION="Command line tool to bootstrap Github repository"
>HOMEPAGE="https://github.com/g4s8/gitstrap"

But also HOMEPAGE, which does the same and more.

>SRC_URI="https://${REPO}/archive/${PV}.tar.gz"

And then you might as well use HOMEPAGE instead of REPO, which you use nowhere else.


>LICENSE="MIT"
>SLOT="0"
>KEYWORDS="~x86 ~amd64"
>IUSE="test"
>
>DEPEND="dev-lang/go"
>RDEPEND="dev-vcs/git"
>
>_go_get() {
>	local name=$1
>	go get -v -u $name || die "'go get' failed to get $name"
>}
>
>src_prepare() {
>	default
>	mkdir -pv $HOME/go/src/github.com/g4s8 || die
>	ln -snv $PWD $HOME/go/src/github.com/g4s8/gitstrap || die
>	_go_get github.com/google/go-github/github
>	_go_get golang.org/x/oauth2
>	_go_get gopkg.in/yaml.v2

Looks like _fetch() done in src_prepare() to me.

>}
>
>src_compile() {
>	local now=$(date -u +%Y.%m.%dT%H:%M:%S)

Reproducible builds?

>	emake OUTPUT=lib BUILD_VERSION=${PV} BUILD_DATE=${now} lib || die
>	go build -o ${PN} ./cmd/${PN} || die
>}
>
>src_test() {
>	emake OUTPUT=lib test || die
>}
>
>src_install() {
>	dobin ${PN} || die "'${PN} installation failed"

Extra '.

>	elog "Read the README for details: https://github.com/g4s8/gitstrap/"

Like here.

>}
>
Comment 3 g4s8.public 2019-01-29 23:12:22 UTC
(In reply to Jeroen Roovers from comment #2)
> Comment on attachment 563240 [details]
> gitstrap-0.1.7.ebuild
> 
> ># Copyright 1999-2018 Gentoo Foundation
> ># Distributed under the terms of the GNU General Public License v2
> >
> >EAPI=6
> 
> Might as well have been 7.
> 
> >
> >REPO="github.com/g4s8/${PN}"
> 
> You set REPO
> 
> >DESCRIPTION="Command line tool to bootstrap Github repository"
> >HOMEPAGE="https://github.com/g4s8/gitstrap"
> 
> But also HOMEPAGE, which does the same and more.
> 
> >SRC_URI="https://${REPO}/archive/${PV}.tar.gz"
> 
> And then you might as well use HOMEPAGE instead of REPO, which you use
> nowhere else.
> 
> 
> >LICENSE="MIT"
> >SLOT="0"
> >KEYWORDS="~x86 ~amd64"
> >IUSE="test"
> >
> >DEPEND="dev-lang/go"
> >RDEPEND="dev-vcs/git"
> >
> >_go_get() {
> >	local name=$1
> >	go get -v -u $name || die "'go get' failed to get $name"
> >}
> >
> >src_prepare() {
> >	default
> >	mkdir -pv $HOME/go/src/github.com/g4s8 || die
> >	ln -snv $PWD $HOME/go/src/github.com/g4s8/gitstrap || die
> >	_go_get github.com/google/go-github/github
> >	_go_get golang.org/x/oauth2
> >	_go_get gopkg.in/yaml.v2
> 
> Looks like _fetch() done in src_prepare() to me.
> 
> >}
> >
> >src_compile() {
> >	local now=$(date -u +%Y.%m.%dT%H:%M:%S)
> 
> Reproducible builds?
> 
> >	emake OUTPUT=lib BUILD_VERSION=${PV} BUILD_DATE=${now} lib || die
> >	go build -o ${PN} ./cmd/${PN} || die
> >}
> >
> >src_test() {
> >	emake OUTPUT=lib test || die
> >}
> >
> >src_install() {
> >	dobin ${PN} || die "'${PN} installation failed"
> 
> Extra '.
> 
> >	elog "Read the README for details: https://github.com/g4s8/gitstrap/"
> 
> Like here.
> 
> >}
> >

Thanks for comments.

I've fixed almost all issues:
removed REPO variable, replaced with HOMEPAGE
changed EAPI from 6 to 7
removed quote

> Looks like _fetch() done in src_prepare() to me.
I'm not sure about it, these lines downloads and installs build dependencies, what is the correct place to put them?

> Reproducible builds?
I checked the build by "ebuild gitstrap-0.1.7.ebuild manifest clean compile" command and by publishing to layman overlay.

I commited and pushed these changes to same PR; but as package category was changed, should I close my PR and resubmit new one with correct category?

Also it's not clear, do I need to add sign-of to commits in PR or gpg signing is enough?

Sorry for so many questions, this is my first package.
Comment 4 g4s8.public 2019-01-31 18:07:01 UTC
Created attachment 563364 [details]
gitstrap-0.1.7.ebuild

Updated ebuild attachment in case if it's not synchronizing with pull request
Comment 5 g4s8.public 2019-01-31 18:07:40 UTC
Created attachment 563368 [details]
metadata.xml

Added metadata.xml
Comment 6 g4s8.public 2019-01-31 18:08:08 UTC
Created attachment 563370 [details]
Manifest

Added Manifest file
Comment 7 g4s8.public 2019-02-28 10:22:52 UTC
Created attachment 566882 [details]
gitstrap-0.1.7.ebuild