You are not logged in.

#1 2017-03-01 09:42:17

brainfucksec
Member
Registered: 2017-03-01
Posts: 40
Website

PKGBUILD review request: archtorify

Hy to all Arch users, I have created  an useful package for my program: archtorify

https://github.com/BrainfuckSec/archtorify

This is the PKGBUILD:

# Maintainer: Brainfuck
# http://github.com/brainfucksec

pkgname=archtorify-git
pkgver=1.8.1
pkgrel=1
pkgdesc="Program for simplify the configuration of transparent proxy trough Tor Network"
arch=('any')
url="https://github.com/brainfucksec/archtorify/"
license=('GPL3')
depends=('tor>=0.2.9' 'curl')
md5sums=('SKIP')

package() {
	cd "$pkgname"

	mkdir -p "$pkgdir/usr/share/$pkgname"
	
	install -Dm644 "README.md" "$pkgdir/usr/share/$pkgname/README.md"
	install -Dm755 "archtorify.sh" "$pkgdir/usr/bin/archtorify"

}

# vim:set ts=2 sw=2 et:

I Have a question, how I can submit this package on AUR ? thanks in advance for the answers smile


--= [ |<!55 ]=--

Offline

#2 2017-03-01 09:45:19

hcjl
Member
From: berlin
Registered: 2007-06-29
Posts: 330

Re: PKGBUILD review request: archtorify

Offline

#3 2017-03-01 09:47:43

brainfucksec
Member
Registered: 2017-03-01
Posts: 40
Website

Re: PKGBUILD review request: archtorify

Thanks hcjl, I have already read the wiki and I had forgotten the part of SSH, I hope this program is useful for security of arch linux users.

Last edited by brainfucksec (2017-03-01 09:48:37)


--= [ |<!55 ]=--

Offline

#4 2017-03-01 09:51:33

GordonGR
Member
From: Thessaloniki, Greece
Registered: 2011-11-07
Posts: 276

Re: PKGBUILD review request: archtorify

I think you forgot the source line.


Intel(R) Celeron(R) CPU E3400 @ 2.60GHz, x86_64. AURs.

“No one without the knowledge of geometry may enter.“ Plato.

Offline

#5 2017-03-01 12:05:47

brainfucksec
Member
Registered: 2017-03-01
Posts: 40
Website

Re: PKGBUILD review request: archtorify

GordonGR wrote:

I think you forgot the source line.

Hi GordonGR, the 'source' variable is a requirement? I don't see this variable in the examples I've read.


--= [ |<!55 ]=--

Offline

#6 2017-03-01 12:12:38

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: PKGBUILD review request: archtorify

Have you actually tested this PKGBUILD?

Without a source variable how does the PKGBUILD know where to download the source from?

It's present in all of the documentation on the wiki and must exist in all PKGBUILD's, you won't find one without it.
https://wiki.archlinux.org/index.php/PKGBUILD#Sources

Last edited by Slithery (2017-03-01 12:13:58)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2017-03-01 13:34:12

brainfucksec
Member
Registered: 2017-03-01
Posts: 40
Website

Re: PKGBUILD review request: archtorify

slithery wrote:

Have you actually tested this PKGBUILD?

Without a source variable how does the PKGBUILD know where to download the source from?

It's present in all of the documentation on the wiki and must exist in all PKGBUILD's, you won't find one without it.
https://wiki.archlinux.org/index.php/PKGBUILD#Sources

Hi slithery, yes I tested the package locally, I've fixed the PKGBUILD:

# Maintainer: Brainfuck
# http://github.com/brainfucksec

pkgname=archtorify
pkgver=1.8.1
pkgrel=1
pkgdesc="Program for simplify the configuration of transparent proxy trough Tor Network"
arch=('any')
url="https://github.com/brainfucksec/archtorify/"
license=('GPL3')
depends=('tor>=0.2.9' 'curl')
md5sums=('SKIP')
source=("https://github.com/brainfucksec/archtorify")

package() {
	cd "$pkgname"

	mkdir -p "$pkgdir/usr/share/$pkgname"
	
	install -Dm644 "README.md" "$pkgdir/usr/share/$pkgname/README.md"
	install -Dm755 "archtorify.sh" "$pkgdir/usr/bin/archtorify"

}

# vim:set ts=2 sw=2 et:

The package is now available on AUR, really thanks for your advice

Last edited by brainfucksec (2017-03-01 13:36:08)


--= [ |<!55 ]=--

Offline

#8 2017-03-01 13:58:11

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: PKGBUILD review request: archtorify

Still a few issues...

As you're building from git master the pkgname should be archtorify-git, and you need a pkgver function to correctly identify the version being built.
If, however, you want to build a specific version then you need to specify the correct download in the source field using tags/commits (and should also provide a checksum).

Last edited by Slithery (2017-03-01 14:05:49)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#9 2017-03-01 14:10:23

brainfucksec
Member
Registered: 2017-03-01
Posts: 40
Website

Re: PKGBUILD review request: archtorify

slithery wrote:

Still a few issues...

As you're building from git master the pkgname should be archtorify-git, and you need a pkgver function to correctly identify the version being built.
If, however, you want to build a specific version then you need to specify the correct download in the source field using tags/commits (and should also provide a checksum).


Thanks slithery, I'm working to write correctly the PKGBUILD file.

Last edited by brainfucksec (2017-03-01 15:06:30)


--= [ |<!55 ]=--

Offline

#10 2017-03-01 14:52:29

brainfucksec
Member
Registered: 2017-03-01
Posts: 40
Website

Re: PKGBUILD review request: archtorify

The package is now deleted from AUR, when is ready, I will update this post

Last edited by brainfucksec (2017-03-01 23:30:06)


--= [ |<!55 ]=--

Offline

#11 2017-03-01 19:58:48

brainfucksec
Member
Registered: 2017-03-01
Posts: 40
Website

Re: PKGBUILD review request: archtorify

I don't understand why this PKGBUILD don't work ...

# Maintainer: Brainfuck
# http://github.com/brainfucksec

pkgname=archtorify-git
pkgver=1.8.1
pkgrel=1
pkgdesc="Program for simplify the configuration of transparent proxy trough Tor Network"
arch=('i686' 'x86_64')
url="https://github.com/brainfucksec/archtorify"
license=('GPL3')
depends=('tor>=0.2.9' 'curl')
makedepends=('git')
source=("https://github.com/brainfucksec/archtorify.git")
md5sums=('SKIP')

pkgver() {
  cd "$pkgname"
  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
	cd "$pkgname"
	
	install -Dm644 README.md "$pkgdir/usr/share/$pkgname/README.md"
	install -Dm755 archtorify.sh "$pkgdir/usr/bin/archtorify"
}

# vim:set ts=2 sw=2 et:

namcap don't output anything but the command: cd "$pkgname" don't work, the package is not builded correctly, thanks in advance for the answers

Last edited by brainfucksec (2017-03-02 05:19:35)


--= [ |<!55 ]=--

Offline

#12 2017-03-01 20:19:45

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: PKGBUILD review request: archtorify

It's because the pkgname variable isn't the same as your git repo name.

The best way to deal with this is to set a new variable to the name of your repo and use it instead of $pkgname in the appropriate places...

# Maintainer: Brainfuck
# http://github.com/brainfucksec

pkgname=archtorify-git
_pkgbase=archtorify
pkgver=1.8.1
pkgrel=1
pkgdesc="Program for simplify the configuration of transparent proxy trough Tor Network"
arch=('i686' 'x86_64')
url="https://github.com/brainfucksec/archtorify"
license=('GPL3')
depends=('tor>=0.2.9' 'curl')
makedepends=('git')
source=("https://github.com/brainfucksec/archtorify.git")
md5sums=('SKIP')

pkgver() {
  cd "$_pkgbase"
  git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

package() {
	cd "$_pkgbase"
	install -Dm644 README.md "$pkgdir/usr/share/$_pkgbase/README.md"
	install -Dm755 archtorify.sh "$pkgdir/usr/bin/archtorify"
}

On another not you can also remove the version depency of tor>=0.2.9 as the current version in the Arch repos is higher than this anyway.

Last edited by Slithery (2017-03-01 20:20:20)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#13 2017-03-01 20:57:02

brainfucksec
Member
Registered: 2017-03-01
Posts: 40
Website

Re: PKGBUILD review request: archtorify

Thanks! slithery, solved, this is the PKGBUILD without errors:

# Maintainer: Brainfuck
# http://github.com/brainfucksec

_gitname=archtorify
pkgname=archtorify-git
pkgver=1.8.1
pkgrel=1
pkgdesc="Program for simplify the configuration of transparent proxy trough Tor Network"
arch=('i686' 'x86_64')
url="https://github.com/brainfucksec/archtorify/"
license=('GPL3')
depends=('tor' 'curl')
makedepends=('git')
source=("git+https://github.com/brainfucksec/${_gitname}/")
md5sums=('SKIP')

pkgver() {
  cd "$_gitname"
  git describe --always | sed 's|-|.|g'
}

package() {
	cd "$_gitname"
	
        install -Dm644 README.md "$pkgdir/usr/share/$_gitname/README.md"
	install -Dm755 archtorify.sh "$pkgdir/usr/bin/archtorify"
}

# vim:set ts=2 sw=2 et:

I'm working for improve these lines (adding sha512sums etc.), when the package is ready I will update this post, thanks to all smile

Last edited by brainfucksec (2017-03-02 05:20:16)


--= [ |<!55 ]=--

Offline

#14 2017-03-05 14:50:31

brainfucksec
Member
Registered: 2017-03-01
Posts: 40
Website

Re: PKGBUILD review request: archtorify

The package archtorify-git v1.8.1-1 is now available on aur, thanks to all for helping me to fix the PKGBUILD file.

https://aur.archlinux.org/packages/archtorify-git/

Last edited by brainfucksec (2017-03-06 07:40:26)


--= [ |<!55 ]=--

Offline

#15 2017-03-08 04:13:23

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: PKGBUILD review request: archtorify

Personally, for packages like this I prefer to remove the _gitname variable altogether as such:

url="https://github.com/brainfucksec/${pkgname%-git}"
source=("git+${url}.git")

Note that as a program which does not include compiled binaries or anything else that cares about 32-bit vs. 64-bit, you should use the "any" arch to indicate that the built package can be installed on any architecture. Specifying arch=('i686' 'x86_64') says that the package can be built for either, but requires a separate *.pkg.tar.xz for each.

You do not need to specify curl as a dependency, since it is guaranteed to be installed on all Arch systems; pacman depends on it.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#16 2017-03-13 19:39:29

brainfucksec
Member
Registered: 2017-03-01
Posts: 40
Website

Re: PKGBUILD review request: archtorify

Eschwartz wrote:

Personally, for packages like this I prefer to remove the _gitname variable altogether as such:

url="https://github.com/brainfucksec/${pkgname%-git}"
source=("git+${url}.git")

Note that as a program which does not include compiled binaries or anything else that cares about 32-bit vs. 64-bit, you should use the "any" arch to indicate that the built package can be installed on any architecture. Specifying arch=('i686' 'x86_64') says that the package can be built for either, but requires a separate *.pkg.tar.xz for each.

You do not need to specify curl as a dependency, since it is guaranteed to be installed on all Arch systems; pacman depends on it.


Thanks for the advice Eschwartz, this information is really important. I will make the changes with the next update.


--= [ |<!55 ]=--

Offline

#17 2017-03-15 10:02:19

brainfucksec
Member
Registered: 2017-03-01
Posts: 40
Website

Re: PKGBUILD review request: archtorify

Version 1.8.2-2 uploaded.

https://aur.archlinux.org/packages/archtorify-git

NOTE: The docs directories are changed in new package, used /usr/share/doc/archtorify instead of /usr/share/archtorify, please remove the old package first.

This is the new PKGBUILD with fixes (see above post replies):

# Maintainer: Brainfuck
# http://github.com/brainfucksec

_gitname=archtorify
pkgname=archtorify-git
pkgver=1.8.2
pkgrel=1
pkgdesc="Program for simplify the configuration of transparent proxy trough Tor Network"
arch=('any')
url="https://github.com/brainfucksec/archtorify/"
license=('GPL3')
depends=('tor')
makedepends=('git')
source=("git+https://github.com/brainfucksec/${_gitname}/")
md5sums=('SKIP')

pkgver() {
  cd "$_gitname"
  git describe --always | sed 's|-|.|g'
}

package() {
	cd "$_gitname"
	
	install -Dm644 README.md $pkgdir/usr/share/doc/$_gitname/README.md
	install -Dm755 archtorify.sh $pkgdir/usr/bin/archtorify
}

# vim:set ts=2 sw=2

Thanks to this really good community for helped me with this PKGBUILD smile

Last edited by brainfucksec (2017-03-15 10:03:28)


--= [ |<!55 ]=--

Offline

Board footer

Powered by FluxBB