Package Details: vpcs 0.8.3-1

Git Clone URL: https://aur.archlinux.org/vpcs.git (read-only, click to copy)
Package Base: vpcs
Description: Simple virtual PC simulator
Upstream URL: https://github.com/GNS3/vpcs
Keywords: gns3 vpcs
Licenses: BSD
Submitter: FillFeile
Maintainer: FillFeile
Last Packager: FillFeile
Votes: 30
Popularity: 0.000021
First Submitted: 2015-08-17 18:37 (UTC)
Last Updated: 2023-09-18 13:45 (UTC)

Dependencies (3)

Required by (2)

Sources (1)

Latest Comments

1 2 Next › Last »

FillFeile commented on 2021-02-22 10:24 (UTC)

I just updated the package to the latest version of the vpcs fork maintained by the GNS3 team and also switch the upstream URL to the forks GitHub repo. I was able to drop the several custom patches with this new version.

FillFeile commented on 2020-06-20 15:53 (UTC)

I just added the patches provided by Un1Gfn as workaround until his work finds a ways into a upstream release. The package should build again now.

Thanks a lot Darren for helping on this and making the package even better!

zkm2fw commented on 2020-06-19 07:08 (UTC) (edited on 2020-06-20 12:39 (UTC) by zkm2fw)

In short: https://github.com/GNS3/vpcs/issues/23#issuecomment-646475617

Apply this

diff --git a/.SRCINFO b/.SRCINFO
index 5743db7..f9ec4a2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,7 @@
-# Generated by mksrcinfo v8
-# Tue Nov 21 19:35:08 UTC 2017
 pkgbase = vpcs
    pkgdesc = Simple virtual PC simulator
    pkgver = 0.8
-   pkgrel = 4
+   pkgrel = 5
    url = http://sourceforge.net/projects/vpcs/
    arch = i686
    arch = x86_64
@@ -11,7 +9,9 @@ pkgbase = vpcs
    makedepends = make
    makedepends = gcc
    makedepends = git
-   source = https://github.com/GNS3/vpcs/archive/v0.8beta1.tar.gz
+   source = getopts.patch
+   source = vpcs-0.8beta1.tar.gz::https://github.com/GNS3/vpcs/archive/v0.8beta1.tar.gz
+   md5sums = d92bcb182656dc965d353ac276161c10
    md5sums = c02fa7181e6a66403318b3680368ae53

 pkgname = vpcs
diff --git a/PKGBUILD b/PKGBUILD
index aebe0e8..b9153db 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,28 @@
 # Maintainer: Daniel Haß <aur@hass.onl>
+# Contributor: Darren Ng <$(base64 --decode <<<'ZGFycmVuMTk5NzA4MTBAZ21haWwuY29tCg==')>
+
 pkgname=vpcs
 pkgver=0.8
-pkgrel=4
+pkgrel=5
 pkgdesc="Simple virtual PC simulator"
 arch=('i686' 'x86_64')
 url="http://sourceforge.net/projects/vpcs/"
 license=('BSD')
 makedepends=('make' 'gcc' 'git')
-source=("https://github.com/GNS3/${pkgname}/archive/v${pkgver}beta1.tar.gz")
-md5sums=('c02fa7181e6a66403318b3680368ae53')
+source=("getopts.patch"
+        "vpcs-${pkgver}beta1.tar.gz::https://github.com/GNS3/${pkgname}/archive/v${pkgver}beta1.tar.gz")
+md5sums=('d92bcb182656dc965d353ac276161c10'
+         'c02fa7181e6a66403318b3680368ae53')

 prepare(){
-   patch -p1 -d "${srcdir}/${pkgname}-${pkgver}beta1/" < "${startdir}/getopts.patch"
+   patch -p1 -d "${srcdir}/${pkgname}-${pkgver}beta1/" < "${srcdir}/getopts.patch"
    cat "${srcdir}/${pkgname}-${pkgver}beta1/src/getopt.h" 
+
+   cd "${srcdir}/${pkgname}-${pkgver}beta1/src"
+   sed -i vpcs.h -e 's#pcs vpc\[MAX_NUM_PTHS\];#extern pcs vpc\[MAX_NUM_PTHS\];#g'
+   sed -i vpcs.c -e '/^static const char \*ident/a \\npcs vpc[MAX_NUM_PTHS];'
+   # https://fabianlee.org/2018/10/28/linux-using-sed-to-insert-lines-before-or-after-a-match/
+
 }

 build(){
@@ -24,4 +34,7 @@ build(){
 package() {
    mkdir -p "$pkgdir/usr/bin"
    install -Dm755 "${srcdir}/${pkgname}-${pkgver}beta1/src/${pkgname}" ${pkgdir}/usr/bin/${pkgname}  
+   install -Dvm644 "${srcdir}/${pkgname}-${pkgver}beta1/COPYING" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+   install -dm755 "$pkgdir/usr/share/man/man1/"
+   gzip "${srcdir}/${pkgname}-${pkgver}beta1/man/vpcs.1" -cv --best > "$pkgdir/usr/share/man/man1/vpcs.1.gz"
 }

FillFeile commented on 2020-06-18 16:54 (UTC)

Dear Un1Gfn, thanks for reporting this issue. It looks like we need a fix for this on the upstream. There is already an issue on the GNS3/vpcs GitHub repo open for this problem:

https://github.com/GNS3/vpcs/issues/23

I also added a comment there. Maybe you would like to bump this also?

zkm2fw commented on 2020-06-18 02:27 (UTC) (edited on 2020-06-18 02:28 (UTC) by zkm2fw)

Sorry but

gcc -O2 -m64  -DLinux -Di386 -DHV -Wall -I. -DTAP -c hv.c
gcc -O2 -m64  -DLinux -Di386 -DHV -Wall -I. -DTAP -c frag.c
gcc -O2 -m64  -DLinux -Di386 -DHV -Wall -I. -DTAP -c frag6.c
gcc -O2 -m64 vpcs.o daemon.o readline.o packets.o utils.o queue.o command.o dev.o dhcp.o command6.o packets6.o ip.o tcp.o inet6.o dns.o remote.o help.o dump.o relay.o hv.o frag.o frag6.o -o vpcs -lpthread -lutil -s -static
/usr/bin/ld: packets.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: command.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: dev.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: dhcp.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: command6.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: packets6.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: tcp.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: dns.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: dump.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: relay.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
/usr/bin/ld: frag6.o:(.bss+0x0): multiple definition of `vpc'; vpcs.o:(.bss+0x60): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile.linux:35: vpcs] Error 1
==> ERROR: A failure occurred in build().
    Aborting...

FillFeile commented on 2017-11-21 19:39 (UTC)

Hey Artyom, thank you for your line of code. I added a patch to the PKGBUILD that replaces line 53 with your code. Now the compilation works again.

Artyom commented on 2017-11-20 14:55 (UTC)

FillFeile, you must edit getopt.h located in /vpcs/src/ at line 53: Replace "int getopt(int argc,char** argv,char* optstr);" By "int getopt(int argc,char *const *argv,const char *optstr);" Now the compilation should work. For GNS3 users, set the VPCS executable to location to the file "vpcs" created from the compilation.

FillFeile commented on 2017-11-05 20:51 (UTC)

Hi Time0o, thanks for pointing this out. I was able to reproduce your error. As I'm not a great C developer, could you provide me with a simple patch file for fixing this? I would add it afterwards to the package.

Time0o commented on 2017-11-01 00:14 (UTC)

This fails to compile for me out of the box as of now because of conflicting function declarations in getopt.h and /usr/include/bits/getopt_core.h. This can be easily fixed by just adding some 'const's to to the declaration in getopt.h.

FillFeile commented on 2016-03-24 18:10 (UTC)

Changed to source tarball from github GNS3 repo. Not downloading binary file anymore. Building package from source now.