You are not logged in.

#1 2016-03-31 23:43:10

intvl
Member
Registered: 2016-02-16
Posts: 7

[SOLVED] Driftnet PKGBUILD Installation Errors

I'm trying to install Drfitent from aur on an i686 architecture.

$ yaourt driftnet
1 aur/driftnet-debian 0.1.6-1 (2) (0.00)
    Listens to network traffic and picks out images from TCP streams it observes. (with Debian patches)
==> Enter n° of packages to be installed (ex: 1 2 3 or 1-3)
==> --------------------------------------------------------
==> 1


==> Downloading driftnet-debian PKGBUILD from AUR...
x .SRCINFO
x PKGBUILD
driftnet-debian 0.1.6-1  (2015-07-14 13:20)
( Unsupported package: Potentially dangerous ! )
==> Edit PKGBUILD ? [Y/n] ("A" to abort)
==> ------------------------------------
==> n

==> driftnet-debian dependencies:
 - libpcap (already installed)
 - gtk2 (already installed)
 - giflib (already installed)
 - imake (already installed) [makedepend]


==> Continue building driftnet-debian ? [Y/n]
==> -----------------------------------------
==> y

==> Building and installing package
==> ERROR: url should not be an array
==> ERROR: Makepkg was unable to build driftnet-debian.
==> Restart building driftnet-debian ? [y/N]
==> ----------------------------------------
==> n

When I edit the PKGBUILD, this is what it says:

# $Id: PKGBUILD 55456 2011-09-13 00:28:38Z ebelanger $
# Maintainer: Timothy Redaelli <timothy.redaelli@gmail.com>

pkgname=driftnet-debian
pkgver=0.1.6
_pkgdebpatchver=9
pkgrel=1
pkgdesc="Listens to network traffic and picks out images from TCP streams it observes. (with Debian patches)"
arch=('i686' 'x86_64')
url=('http://www.ex-parrot.com/~chris/driftnet/')
license=('GPL')
provides=('driftnet')
conflicts=('driftnet')
depends=('libpcap' 'gtk2' 'giflib')
makedepends=('imake')
source=("http://www.ex-parrot.com/~chris/driftnet/driftnet-${pkgver}.tar.gz"
        "http://ftp.de.debian.org/debian/pool/main/d/driftnet/driftnet_${pkgver}-${_pkgdebpatchver}.diff.gz")
md5sums=('8e11d77770452f97bb3c23f510489815'
         '912c7ff5c0af1ebf4482749aa53533e6')

build() {
  cd "${srcdir}/driftnet-${pkgver}"
  patch -p1 -i "${srcdir}/driftnet_${pkgver}-${_pkgdebpatchver}.diff"
  sed -i -e 's/$(OBJS) $(LDFLAGS)/$(LDFLAGS) $(OBJS)/' Makefile
  make
}

package() {
  cd "${srcdir}/driftnet-${pkgver}"
  install -D -m755 driftnet "${pkgdir}/usr/bin/driftnet"
  install -D -m644 driftnet.1 "${pkgdir}/usr/share/man/man1/driftnet.1"
}

I've edited the PKGBUILD as stated here: https://bbs.archlinux.org/viewtopic.php?id=21390


Then I get this:

$ yaourt driftnet
1 aur/driftnet-debian 0.1.6-1 (2) (0.00)
    Listens to network traffic and picks out images from TCP streams it observes. (with Debian patches)
==> Enter n° of packages to be installed (ex: 1 2 3 or 1-3)
==> --------------------------------------------------------
==> 1


==> Downloading driftnet-debian PKGBUILD from AUR...
x .SRCINFO
x PKGBUILD
driftnet-debian 0.1.6-1  (2015-07-14 13:20)
( Unsupported package: Potentially dangerous ! )
==> Edit PKGBUILD ? [Y/n] ("A" to abort)
==> ------------------------------------
==> y

Please add $VISUAL to your environment variables
for example:
export VISUAL="vim" (in ~/.bashrc)
(replace vim with your favorite editor)

==> Edit PKGBUILD with:  nano

==> driftnet dependencies:
 - libpcap (already installed)
 - imake (already installed) [makedepend]
 - libjpeg, (building from AUR)
 - libungif, (building from AUR)
 - gtk, (building from AUR)


==> Edit PKGBUILD ? [Y/n] ("A" to abort)
==> ------------------------------------
==> n

==> Continue building driftnet-debian ? [Y/n]
==> -----------------------------------------
==> y

==> Building and installing package
==> Install or build missing dependencies for driftnet:
error: target not found: libungif,
error: target not found: libjpeg,
error: target not found: gtk,
==> Restart building driftnet-debian ? [y/N]
==> ----------------------------------------
==> n

I'm clearly new to patching, and I am not quite sure how to following this guide https://wiki.archlinux.org/index.php/Patching_in_ABS

Last edited by intvl (2016-04-01 02:17:27)

Offline

#2 2016-03-31 23:44:49

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Driftnet PKGBUILD Installation Errors

Moving to AUR Issues...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-03-31 23:49:31

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

Re: [SOLVED] Driftnet PKGBUILD Installation Errors

Post your edited PKGBUILD, it appears you edited the depends array (badly).

Offline

#4 2016-03-31 23:51:30

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: [SOLVED] Driftnet PKGBUILD Installation Errors

Please read error messages.  The first error is clear: it says "url should not be an array", so fix the url field in the PKGBUILD so it is a regular variable and not an array.

It's good you searched for related threads, but the one you found is almost 10 years old.  It's fairly safe to say nothing in that thread applies today.

EDIT: note it looks like the source url may no longer be available - and debian has a newer version of driftnet.  Driftnet is also available on github.  I'd ditch this PKGBUILD and start fresh to build from github.  The patch might not even be needed if you're not using ancient code. (There are even versioned release tags available on the github page).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2016-04-01 00:35:58

intvl
Member
Registered: 2016-02-16
Posts: 7

Re: [SOLVED] Driftnet PKGBUILD Installation Errors

Scimmia wrote:

Post your edited PKGBUILD, it appears you edited the depends array (badly).

I didn't really edit it. Like I said, i'm new to patching. I'm not quite sure what to do. I was hoping someone could show and explain to me.

Offline

#6 2016-04-01 01:15:01

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: [SOLVED] Driftnet PKGBUILD Installation Errors

I find it unlikely that you didn't edit it.  If you didn't edit it, why did you say you edited it following the example in the thread you linked to?  Also, if you didn't edit it, why are the errors from your second attempt exactly what would be expected if you had used the PKGBUILD from the thread you linked to.

You don't need to patch anything to use the PKGBUILD currently in the AUR.  Just remove the parentheses around the url field, that's it.  The patch is already applied in the PKBGUILD, so don't worry about that.  I don't know if that PKGBUILD will work anyways due to the source link not being reliable, but that is a different issue all together: there'd be nothing to patch for that, you'd just need to find another provider.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2016-04-01 01:34:06

intvl
Member
Registered: 2016-02-16
Posts: 7

Re: [SOLVED] Driftnet PKGBUILD Installation Errors

Trilby wrote:

I find it unlikely that you didn't edit it.  If you didn't edit it, why did you say you edited it following the example in the thread you linked to?  Also, if you didn't edit it, why are the errors from your second attempt exactly what would be expected if you had used the PKGBUILD from the thread you linked to.

I didn't edit what was provided, only cut everything and pasted what was inside of the thread because I have no clue what I am doing. Another source, okay. Thanks!

Offline

#8 2016-04-01 01:42:26

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

Re: [SOLVED] Driftnet PKGBUILD Installation Errors

So stop and figure out what you're doing. Never, ever just copy things at random without understanding what they do.

Offline

#9 2016-04-01 01:53:41

intvl
Member
Registered: 2016-02-16
Posts: 7

Re: [SOLVED] Driftnet PKGBUILD Installation Errors

Scimmia wrote:

So stop and figure out what you're doing. Never, ever just copy things at random without understanding what they do.

You're right. I am doing that now. I'll post an update shortly.

Offline

#10 2016-04-01 01:54:44

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: [SOLVED] Driftnet PKGBUILD Installation Errors

So you did edit the PKGBUILD rather than using the one from the AUR.  Again the thread you linked to is nearly 10 years old!  The PKGBUILD in the aur looks to be a little out of date and have at least one minor problem, but it is far better than what is in that 10-year-old thread: start with what almost works and go from there, don't go 10 years into the past to get something that was totally broken even at that time.

EDIT: the following works with the current code, that patch from 10 years ago is not needed:

_gitname="driftnet"
pkgname="${_gitname}-git"
pkgver=v1.1.3.r19.g7602b53
pkgrel=1
pkgdesc="Listens to network traffic and picks out images from TCP streams"
url="https://github.com/deiv/driftnet"
arch=('x86_64' 'i686')
license=('GPL2')
depends=('gtk2' 'giflib' 'libjpeg-turbo' 'libpcap')
makedepends=('git')
source=("${_gitname}::git://github.com/deiv/driftnet.git")
sha256sums=('SKIP')

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

build() {
	cd "${_gitname}"
	autoreconf -fi
	./configure --prefix=/usr
	make
}

package() {
	cd "${_gitname}"
	make DESTDIR="${pkgdir}" install
}

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#11 2016-04-01 02:14:45

intvl
Member
Registered: 2016-02-16
Posts: 7

Re: [SOLVED] Driftnet PKGBUILD Installation Errors

Yes! That worked. I got as far as changing the url to https://github.com/deiv/driftnet I wouldn't have known what to change the rest to besides the updated depends.

Last edited by intvl (2016-04-01 02:18:16)

Offline

Board footer

Powered by FluxBB