You are not logged in.

#1 2013-04-07 15:48:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

PKGBUILD for a bzr project (pacman 4.1 format) [SOVLED]

I am trying to modernize ufw-brz but am running into a wall on two issues:

1) The 000 permissions of pkg seem be to tripping up makepkg:

% makepkg -s
...
copying staging/util.py -> build/lib/ufw
copying staging/applications.py -> build/lib/ufw
copying staging/parser.py -> build/lib/ufw
running install_lib
creating /scratch/ufw-bzr-new/pkg/ufw-bzr
error: could not create '/scratch/ufw-bzr-new/pkg/ufw-bzr': Permission denied
==> ERROR: A failure occurred in build().
    Aborting...

2) When I attempt to re-run makepkg, the method I am using to check out the bzr repo is not right as makepkg tells me:

% makepkg -s
==> Making package: ufw-bzr 810-1 (Sun Apr  7 11:47:56 EDT 2013)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
==> ERROR: /scratch/ufw-bzr-new/ufw is not a branch of https://code.launchpad.net/~jdstrand/ufw/trunk
    Aborting...

Thanks for the suggestions.

Working draft of PKGBUILD:

# Maintainer: graysky <graysky AT archlinux DOT us>
# Contributor:  Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Kessia 'even' Pinheiro <kessiapinheiro at gmail.com>
# Contributor: Sorin Ionescu <sorin.ionescu@gmail.com>

pkgname=ufw-bzr
_pkgname=ufw
pkgver=810
pkgrel=1
pkgdesc="Uncomplicated and easy to use CLI tool for managing a netfilter firewall. Development branch."
arch=('any')
url="https://code.launchpad.net/~jdstrand/ufw/trunk"
license=('GPL3')
depends=('iptables' 'python2')
makedepends=('bzr')
provides=('ufw')
conflicts=('ufw')
backup=('etc/ufw/before.rules'
'etc/ufw/before6.rules'
'etc/ufw/after.rules'
'etc/ufw/after6.rules'
'etc/ufw/ufw.conf'
'etc/ufw/user.rules'
'etc/ufw/sysctl.conf'
'etc/default/ufw'
'usr/lib/ufw/user.rules'
'usr/lib/ufw/user6.rules')
source=("$_pkgname::bzr+https://code.launchpad.net/~jdstrand/$_pkgname/trunk"
"$_pkgname.service")
sha256sums=('SKIP'
'fdface6f4690e4748fbbd5661c02e1967a8750fdb23581d35516174017a3fe39')

pkgver() {
  cd "$_pkgname"
  bzr revno
}

prepare() {
  cd "$_pkgname"

  # FS#28769 - move from /lib to /usr/lib
  sed -e 's|/lib|/usr/lib|' -i setup.py
}

build() {
  cd "$_pkgname"

  python2 setup.py install --root=$pkgdir
}

package() {
  cd "$_pkgname"
  install -Dm644 $srcdir/$_pkgname.service $pkgdir/usr/lib/systemd/system/$_pkgname.service
  install -Dm755 $pkgdir/usr/sbin/$_pkgname $pkgdir/usr/bin/$_pkgname
  rm -rf $pkgdir/usr/sbin
  chmod 644 $pkgdir/etc/ufw/*.rules $pkgdir/usr/lib/ufw/*.rules
}

Last edited by graysky (2013-04-07 20:15:57)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2013-04-07 16:41:14

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: PKGBUILD for a bzr project (pacman 4.1 format) [SOVLED]

Looks to me like you're running into the same problem as this mailing list thread: https://mailman.archlinux.org/pipermail … 22915.html

Initial pull works, but updates to the working tree don't. Has something to do with the URL being redirected. I checked the repo you're having trouble with, it redirects to http://bazaar.launchpad.net/~jdstrand/ufw/trunk/. Try that in the source array.

Last edited by Scimmia (2013-04-07 16:44:54)

Offline

#3 2013-04-07 16:54:14

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: PKGBUILD for a bzr project (pacman 4.1 format) [SOVLED]

Thanks for the reply to issue #2.  I made the change but found that makepkg stuff throws the same error.

s/bazarr/code/

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2013-04-07 17:03:54

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: PKGBUILD for a bzr project (pacman 4.1 format) [SOVLED]

notice that it's http, not https. That change works to avoid the second error for me.

For the first error, don't install in the build function. Do python2 setup.py build in the build function then python2 setup.py install  --root=$pkgdir in the package function.

Last edited by Scimmia (2013-04-07 17:05:46)

Offline

#5 2013-04-07 19:33:00

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: PKGBUILD for a bzr project (pacman 4.1 format) [SOVLED]

@Scimmia - OK.  Issue #1 is solved; good suggestion.  As to issue #2, I must a moron.  What am I missing:

% diff -u ../old/PKGBUILD PKGBUILD 
--- ../old/PKGBUILD	2013-04-07 15:26:18.557839507 -0400
+++ PKGBUILD	2013-04-07 15:32:25.001894314 -0400
@@ -26,7 +26,7 @@
 'etc/default/ufw'
 'usr/lib/ufw/user.rules'
 'usr/lib/ufw/user6.rules')
-source=("$_pkgname::bzr+https://code.launchpad.net/~jdstrand/$_pkgname/trunk"
+source=("$_pkgname::bzr+http://bazaar.launchpad.net/~jdstrand/$_pkgname/trunk"
 "$_pkgname.service")
 sha256sums=('SKIP'
 'fdface6f4690e4748fbbd5661c02e1967a8750fdb23581d35516174017a3fe39')

Last edited by graysky (2013-04-07 19:33:47)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2013-04-07 19:56:16

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: PKGBUILD for a bzr project (pacman 4.1 format) [SOVLED]

You're missing the final "/"

It's gotta be exact. big_smile

Offline

#7 2013-04-07 20:15:38

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: PKGBUILD for a bzr project (pacman 4.1 format) [SOVLED]

AH!  Thanks for the assistance.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#8 2013-04-07 20:43:40

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: PKGBUILD for a bzr project (pacman 4.1 format) [SOVLED]

That error was mine ! smile

See the thread mentioned  above.

Offline

Board footer

Powered by FluxBB