You are not logged in.
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
--= [ |<!55 ]=--
Offline
Offline
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
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
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
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)
Offline
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
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)
Offline
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
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
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
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)
Offline
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
Last edited by brainfucksec (2017-03-02 05:20:16)
--= [ |<!55 ]=--
Offline
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
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
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
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
Last edited by brainfucksec (2017-03-15 10:03:28)
--= [ |<!55 ]=--
Offline