Re: [aur-general] rfc: pkgbuild for prospect releng-tool

2019-03-05 Thread DJ Lucas (LFS)
On March 6, 2019 12:24:08 AM CST, James Knight via aur-general 
 wrote:
>Hello -- new user to AUR and hoping if anyone is willing to review a
>PKGBUILD [1] definition for me. I have been reading PKGBUILD [2] and
>"AUR - Submitting packages" [3] documents, which the latter document
>suggests to "... submit the PKGBUILD to the AUR mailing list ... for
>public review before adding it to the AUR".
>

Welcome!

>The following is my prospect PKGBUILD definition if anyone has time to
>make comments/suggestions:
>
>---
># Maintainer: James Knight 
>
>pkgname=releng-tool

Python 2/3?

https://wiki.archlinux.org/index.php/Python_package_guidelines


>pkgver=0.1
>pkgrel=1
>pkgdesc='tool to assist in the release engineering of a project'
>url='https://releng.io/'
>arch=('any')
>license=('BSD')
>makedepends=(
> 'python'
>)

Use depends here, makedepends implicitly includes depends.

>source=("$pkgname-$pkgver::git+https://github.com/releng-tool/releng-tool.git#tag=v$pkgver";)
>sha512sums=('SKIP')
>

If you intend to use a version string and not a specific git commit, then get 
the versioned tarball from 
https://github.com/releng-tool/releng-tool/archive/v0.1/releng-tool.tar.gz and 
provide the sums. Also, since you are the developer, sig? You can add it, as 
well as other compression formats as part of the release process on GitHub. I 
think it's add resources, or similar, been a bit.

>build() {
>   cd "$pkgname-$pkgver"
>   python setup.py build
>}
>
>check() {
>   cd "$pkgname-$pkgver"
>   python setup.py test
>}
>
>package() {
>   depends=('python')
>   cd "$pkgname-$pkgver"
>   python setup.py install --root="$pkgdir" --optimize=1
>
>   install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
>   install -dm 755 "$pkgdir/usr/share/bash-completion/completions"
>   install -m644 scripts/releng-tool-completion 
>"$pkgdir/usr/share/bash-completion/completions/releng-tool"
>}

Personal preference, and likely not very useful here, but use -v for install 
commands, it could save you some time if something breaks in the future.

HTH

--DJ




Re: [aur-general] rfc: pkgbuild for prospect releng-tool

2019-03-05 Thread Doug Newgard via aur-general
On Tue, 5 Mar 2019 23:53:10 -0700
Brett Cornwall via aur-general  wrote:

> On 2019-03-06 01:24, James Knight via aur-general wrote:
> >Hello -- new user to AUR and hoping if anyone is willing to review a
> >PKGBUILD [1] definition for me. I have been reading PKGBUILD [2] and
> >"AUR - Submitting packages" [3] documents, which the latter document
> >suggests to "... submit the PKGBUILD to the AUR mailing list ... for
> >public review before adding it to the AUR".  
> 
> Hello, and welcome!
> 
> Great job doing your research. You've already gone above and beyond with 
> the above.
> 
> 
> >pkgname=releng-tool
> >pkgver=0.1  
> 
> I don't see any releases on the upstream github. Where'd you get this 
> 0.1?
> 
> >pkgrel=1
> >pkgdesc='tool to assist in the release engineering of a project'  
> 
> Capitalize the T!
> 
> >url='https://releng.io/'
> >arch=('any')
> >license=('BSD')  
> 
> I don't see this license in the project. It needs to be in the project, 
> and if it is indeed BSD licensed you need to copy the license to 
> "$pkgdir/usr/share/licenses/$pkgname/" [1]

License is in the repo and is already being installed. Nothing to see here.

> 
> >makedepends=(
> >'python'
> >)  
> 
> You're using python-setuptools, so you'll want to set that in 
> makedepends instead of python.

Also missing git as a makedep. Might want to build in a clean chroot and see
what else you're missing. python shouldn't be in the makedeps, as it should be
in the global deps array, as stated below.

> 
> >source=("$pkgname-$pkgver::git+https://github.com/releng-tool/releng-tool.git#tag=v$pkgver";)
> >  
> 
> I see that you're the maintainer of upstream; Why not create a release 
> on Github and then download the tarball here? Typically, pulling sources 
> via git is for '-git' packages.

git is fine for release packages.

> 
> >sha512sums=('SKIP')  
> 
> Having a tarball release will mean that you can have checksum 
> verification as well.
> 

git does checksumming.

> [...]
> 
> >package() {
> >  depends=('python')  
> 
> The depends() should just go to the top alongside makedepends for this 
> package. You probably saw this in the examples for the python packaging 
> standards, but this is typically used for a 'split package', i.e. using 
> one PKGBUILD to build versions for both python2 and python3. Since 
> you're only building for python 3 depends() should go to the top.
> 
> >  cd "$pkgname-$pkgver"
> >  python setup.py install --root="$pkgdir" --optimize=1  
> 
> Go ahead and add a --skip-build here since you already built earlier.
> 
> [...]
> 
> >  install -dm 755 "$pkgdir/usr/share/bash-completion/completions"
> >  install -m644 scripts/releng-tool-completion 
> >"$pkgdir/usr/share/bash-completion/completions/releng-tool"  
> 
> No need to create the directory beforehand; This can be shortened into:
> 
> install -Dm644 scripts/releng-tool-completion 
> "$pkgdir/usr/share/bash-completion/completions/releng-tool"
> 
> 
> 
> 
> Check out the 'namcap' package in [extra] if you haven't already. It's 
> certainly a fallible tool but it can help with maintenance quality.
> 
> Also, check out the Python packaging guidelines: 
> https://wiki.archlinux.org/index.php/Python_package_guidelines#setuptools
> 
> 
> [1] https://wiki.archlinux.org/index.php/PKGBUILD#license


Re: [aur-general] rfc: pkgbuild for prospect releng-tool

2019-03-05 Thread Brett Cornwall via aur-general

On 2019-03-05 23:53, Brett Cornwall wrote:

url='https://releng.io/'
arch=('any')
license=('BSD')


I don't see this license in the project. It needs to be in the 
project, and if it is indeed BSD licensed you need to copy the license 
to "$pkgdir/usr/share/licenses/$pkgname/" [1]


Oops... I suck at computers and managed to end up in the 
releng-tool-examples repo. I should go to bed. So I see that the license 
is indeed in upstream and you've included it in the package. Derp.



source=("$pkgname-$pkgver::git+https://github.com/releng-tool/releng-tool.git#tag=v$pkgver";)


I see that you're the maintainer of upstream; Why not create a release 
on Github and then download the tarball here? Typically, pulling 
sources via git is for '-git' packages.


You should use the release tarball instead of relying on git then, which 
would be another dependency in this package.



sha512sums=('SKIP')


Having a tarball release will mean that you can have checksum 
verification as well.


^Still applies.


signature.asc
Description: PGP signature


Re: [aur-general] rfc: pkgbuild for prospect releng-tool

2019-03-05 Thread Brett Cornwall via aur-general

On 2019-03-06 01:24, James Knight via aur-general wrote:

Hello -- new user to AUR and hoping if anyone is willing to review a
PKGBUILD [1] definition for me. I have been reading PKGBUILD [2] and
"AUR - Submitting packages" [3] documents, which the latter document
suggests to "... submit the PKGBUILD to the AUR mailing list ... for
public review before adding it to the AUR".


Hello, and welcome!

Great job doing your research. You've already gone above and beyond with 
the above.




pkgname=releng-tool
pkgver=0.1


I don't see any releases on the upstream github. Where'd you get this 
0.1?



pkgrel=1
pkgdesc='tool to assist in the release engineering of a project'


Capitalize the T!


url='https://releng.io/'
arch=('any')
license=('BSD')


I don't see this license in the project. It needs to be in the project, 
and if it is indeed BSD licensed you need to copy the license to 
"$pkgdir/usr/share/licenses/$pkgname/" [1]



makedepends=(
   'python'
)


You're using python-setuptools, so you'll want to set that in 
makedepends instead of python.



source=("$pkgname-$pkgver::git+https://github.com/releng-tool/releng-tool.git#tag=v$pkgver";)


I see that you're the maintainer of upstream; Why not create a release 
on Github and then download the tarball here? Typically, pulling sources 
via git is for '-git' packages.



sha512sums=('SKIP')


Having a tarball release will mean that you can have checksum 
verification as well.


[...]


package() {
 depends=('python')


The depends() should just go to the top alongside makedepends for this 
package. You probably saw this in the examples for the python packaging 
standards, but this is typically used for a 'split package', i.e. using 
one PKGBUILD to build versions for both python2 and python3. Since 
you're only building for python 3 depends() should go to the top.



 cd "$pkgname-$pkgver"
 python setup.py install --root="$pkgdir" --optimize=1


Go ahead and add a --skip-build here since you already built earlier.

[...]


 install -dm 755 "$pkgdir/usr/share/bash-completion/completions"
 install -m644 scripts/releng-tool-completion 
"$pkgdir/usr/share/bash-completion/completions/releng-tool"


No need to create the directory beforehand; This can be shortened into:

   install -Dm644 scripts/releng-tool-completion 
"$pkgdir/usr/share/bash-completion/completions/releng-tool"




Check out the 'namcap' package in [extra] if you haven't already. It's 
certainly a fallible tool but it can help with maintenance quality.


Also, check out the Python packaging guidelines: 
https://wiki.archlinux.org/index.php/Python_package_guidelines#setuptools


[1] https://wiki.archlinux.org/index.php/PKGBUILD#license


signature.asc
Description: PGP signature


[aur-general] rfc: pkgbuild for prospect releng-tool

2019-03-05 Thread James Knight via aur-general

Hello -- new user to AUR and hoping if anyone is willing to review a
PKGBUILD [1] definition for me. I have been reading PKGBUILD [2] and
"AUR - Submitting packages" [3] documents, which the latter document
suggests to "... submit the PKGBUILD to the AUR mailing list ... for
public review before adding it to the AUR".

The following is my prospect PKGBUILD definition if anyone has time to
make comments/suggestions:

---
# Maintainer: James Knight 

pkgname=releng-tool
pkgver=0.1
pkgrel=1
pkgdesc='tool to assist in the release engineering of a project'
url='https://releng.io/'
arch=('any')
license=('BSD')
makedepends=(
'python'
)
source=("$pkgname-$pkgver::git+https://github.com/releng-tool/releng-tool.git#tag=v$pkgver";)
sha512sums=('SKIP')

build() {
  cd "$pkgname-$pkgver"
  python setup.py build
}

check() {
  cd "$pkgname-$pkgver"
  python setup.py test
}

package() {
  depends=('python')
  cd "$pkgname-$pkgver"
  python setup.py install --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -dm 755 "$pkgdir/usr/share/bash-completion/completions"
  install -m644 scripts/releng-tool-completion 
"$pkgdir/usr/share/bash-completion/completions/releng-tool"

}
---

Please be merciless.

[1]: 
https://github.com/releng-tool/releng-tool-pkgbuild/blob/master/PKGBUILD

[2]: https://wiki.archlinux.org/index.php/PKGBUILD
[3]: 
https://wiki.archlinux.org/index.php/Arch_User_Repository#Submitting_packages