Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package vpcs for openSUSE:Factory checked in at 2026-10-17 21:24:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vpcs (Old) and /work/SRC/openSUSE:Factory/.vpcs.new.3698736 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "vpcs" Sat Oct 17 21:24:11 2026 rev:15 rq:1385197 version:0.8.5 Changes: -------- --- /work/SRC/openSUSE:Factory/vpcs/vpcs.changes 2026-08-11 17:10:36.945472681 +0200 +++ /work/SRC/openSUSE:Factory/.vpcs.new.3698736/vpcs.changes 2026-10-17 21:24:26.489475093 +0200 @@ -1,0 +2,12 @@ +Mon Oct 12 14:43:39 UTC 2026 - Martin Hauke <[email protected]> + +- Update to version 0.8.5 + * Fixed the DNS parser to accept responses from non-recursive + servers. + * Tap mode: add -n flag, activate interface on open, fix + build/install. + * Fix crash when sending or receiving fragmented packets. + * Enable custom CFLAGS and LDFLAGS in Makefile.linux. + * Install man page. + +------------------------------------------------------------------- Old: ---- vpcs-0.8.4.tar.gz New: ---- vpcs-0.8.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vpcs.spec ++++++ --- /var/tmp/diff_new_pack.KjkST2/_old 2026-10-17 21:24:27.132501918 +0200 +++ /var/tmp/diff_new_pack.KjkST2/_new 2026-10-17 21:24:27.133501960 +0200 @@ -1,7 +1,7 @@ # # spec file for package vpcs # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: vpcs -Version: 0.8.4 +Version: 0.8.5 Release: 0 Summary: Virtual PC Simulator License: BSD-2-Clause @@ -44,16 +44,15 @@ %build cd src rm getopt.* -export CFLAGS="%{optflags} -D_GNU_SOURCE -fno-strict-aliasing -fcommon" -%make_build -f Makefile.linux CPUTYPE=%_target_cpu +export CFLAGS="%{optflags}" +%make_build -f Makefile.linux CPUTYPE=%{_target_cpu} %install -install -D -m0755 src/vpcs %{buildroot}%{_bindir}/vpcs -install -D -m0644 man/vpcs.1 %{buildroot}%{_mandir}/man1/vpcs.1 +%make_install BINDIR=%{_bindir} MANDIR=%{_mandir} %files %license COPYING %doc readme.txt %{_bindir}/vpcs -%{_mandir}/man1/vpcs.1%{ext_man} +%{_mandir}/man1/vpcs.1%{?ext_man} ++++++ vpcs-0.8.4.tar.gz -> vpcs-0.8.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vpcs-0.8.4/.circleci/config.yml new/vpcs-0.8.5/.circleci/config.yml --- old/vpcs-0.8.4/.circleci/config.yml 2026-08-01 20:05:54.000000000 +0200 +++ new/vpcs-0.8.5/.circleci/config.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,49 +0,0 @@ -# iOS CircleCI 2.1 configuration file -version: 2.1 -jobs: - build: - macos: - xcode: "15.4.0" - resource_class: m4pro.medium - - steps: - - checkout - - - run: - name: Set timezone and check current datetime - command: | - sudo systemsetup -settimezone Europe/Warsaw - echo "Today is $(date +"%Y-%m-%d %T")" - - - run: - name: Install gcc - command: | - HOMEBREW_NO_AUTO_UPDATE=1 brew install gcc - - - run: - name: Build vpcs - command: | - cd src && ./mk.sh amd64 - - - run: - name: Gather artifacts - command: | - mkdir artifacts - mv src/vpcs artifacts/vpcs-osx - - - store_artifacts: - path: artifacts - destination: artifacts - - - run: - name: Upload nightly builds to SF - command: | - if [ -n "${RUN_NIGHTLY_BUILD}" ]; then - ssh-keyscan -H frs.sourceforge.net >> ~/.ssh/known_hosts - echo "mkdir \"/home/frs/project/gns-3/Nightly Builds/$(date +"%Y-%m-%d")/\"" | sftp [email protected] - echo -ne " - cd \"/home/frs/project/gns-3/Nightly Builds/$(date +"%Y-%m-%d")/\" - put \"artifacts/vpcs-osx\" - " | sftp [email protected] - fi - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vpcs-0.8.4/.github/workflows/ci-build.yml new/vpcs-0.8.5/.github/workflows/ci-build.yml --- old/vpcs-0.8.4/.github/workflows/ci-build.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/vpcs-0.8.5/.github/workflows/ci-build.yml 2026-10-12 13:50:58.000000000 +0200 @@ -0,0 +1,51 @@ +name: CI build + +on: + workflow_dispatch: # run manually https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow + push: + branches: [ "master" ] # run for these branches + pull_request: + branches: [ "master" ] # run for pull requests that target these branches + + +jobs: + linux: + name: Linux (${{ matrix.platform }}) + runs-on: ${{ matrix.runner }} + strategy: + matrix: + include: + - arch: amd64 + platform: amd64/x86_64 + runner: ubuntu-latest + - arch: arm64 + platform: arm64/aarch64 + runner: ubuntu-24.04-arm + steps: + - uses: actions/checkout@v7 + + - name: Build ${{ matrix.arch }} + run: | + cd ${{github.workspace}}/src + ./mk.sh ${{ matrix.arch }} + + - name: Test + run: | + cd ${{github.workspace}}/src + ./vpcs -h + + - name: Upload success + if: ${{ success() }} + uses: actions/upload-artifact@v7 + with: + name: linux-${{ matrix.arch }}-success + path: ${{github.workspace}}/src/vpcs + compression-level: 9 # maximum compression + + - name: Upload failure + if: ${{ failure() }} + uses: actions/upload-artifact@v7 + with: + name: linux-${{ matrix.arch }}-failure + path: ${{github.workspace}}/src/vpcs + compression-level: 9 # maximum compression diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vpcs-0.8.4/INSTALL new/vpcs-0.8.5/INSTALL --- old/vpcs-0.8.4/INSTALL 2026-08-01 20:05:54.000000000 +0200 +++ new/vpcs-0.8.5/INSTALL 2026-10-12 13:50:58.000000000 +0200 @@ -1,8 +1,15 @@ -run src/mk.sh to compile +build: -Options: - [i386 | amd64 | 32 | 64] [clean] + make (or: src/mk.sh [i386 | amd64 | arm64 | 32 | 64] [clean | debug]) - i386 or 32, generate code for 32bit - amd64 or 64, generate code for 64bit +install (Linux): + sudo make install [BINDIR=dir] [MANDIR=dir] [DESTDIR=dir] + + The vpcs.1 man page is installed under MANDIR/man1 (default: + /usr/local/share/man/man1). + + 'make install' grants cap_net_admin to the binary via setcap when + available, so tap mode (-e) works for unprivileged users. Without it, + tap mode requires root; udp mode (default) needs no privileges. + The -n option disables vpcs configuring the host tap interface. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vpcs-0.8.4/Makefile new/vpcs-0.8.5/Makefile --- old/vpcs-0.8.4/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ new/vpcs-0.8.5/Makefile 2026-10-12 13:50:58.000000000 +0200 @@ -0,0 +1,27 @@ +# Top-level convenience wrapper for make / make install / make clean. +# src/mk.sh remains the full-featured entry (arch and debug options). +# 'install' currently exists only in Makefile.linux. + +UNAME := $(shell uname) + +ifeq ($(UNAME),Linux) +MKFILE := Makefile.linux +else ifeq ($(UNAME),Darwin) +MKFILE := Makefile.osx +else ifeq ($(UNAME),FreeBSD) +MKFILE := Makefile.fbsd +else ifeq ($(UNAME),OpenBSD) +MKFILE := Makefile.obsd +else ifneq (,$(findstring CYGWIN,$(UNAME))) +MKFILE := Makefile.cygwin +else +$(error unsupported OS: $(UNAME)) +endif + +# mk.sh passes -O2 (plus arch flags); keep direct 'make' equivalent. +export CCOPT ?= -O2 + +all install clean: + $(MAKE) -C src -f $(MKFILE) $@ + +.PHONY: all install clean diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vpcs-0.8.4/man/vpcs.1 new/vpcs-0.8.5/man/vpcs.1 --- old/vpcs-0.8.4/man/vpcs.1 2026-08-01 20:05:54.000000000 +0200 +++ new/vpcs-0.8.5/man/vpcs.1 2026-10-12 13:50:58.000000000 +0200 @@ -1,6 +1,6 @@ -.TH VPCS "1" "2013-12-16" "0.8" "Virtual PC Simulator" -./ Last revision: 2015-10-04 16:07:00 +.TH VPCS "1" "2026-10-12" "0.8.5" "Virtual PC Simulator" +./ Last revision: 2026-10-12 12:48:00 .hy 0 .if n .ad l diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vpcs-0.8.4/src/Makefile.linux new/vpcs-0.8.5/src/Makefile.linux --- old/vpcs-0.8.4/src/Makefile.linux 2026-08-01 20:05:54.000000000 +0200 +++ new/vpcs-0.8.5/src/Makefile.linux 2026-10-12 13:50:58.000000000 +0200 @@ -4,8 +4,8 @@ CPUTYPE:=$(shell uname -m) HVOPT=-DHV -CFLAGS=-D$(OSTYPE) -D$(CPUTYPE) $(HVOPT) -Wall -DTAP -LDFLAGS=-lpthread -lutil +CFLAGS:=$(CFLAGS) -D$(OSTYPE) -D$(CPUTYPE) $(HVOPT) -Wall -DTAP +LDFLAGS:=$(LDFLAGS) -lpthread -lutil OBJS=vpcs.o \ daemon.o \ readline.o \ @@ -32,10 +32,25 @@ all: vpcs vpcs: $(OBJS) - $(CC) $(OBJS) -o vpcs $(LDFLAGS) + $(CC) $(OBJS) -o vpcs $(LDFLAGS) -.c.o: keys.h vpcs.h packets.h dhcp.h +%.o: %.c keydef.h vpcs.h packets.h dhcp.h $(CC) $(INCLUDE_PATH) $(CFLAGS) -c $< +BINDIR ?= /usr/local/bin +MANDIR ?= /usr/local/share/man + +install: vpcs + mkdir -p $(DESTDIR)$(BINDIR) + install -m 755 vpcs $(DESTDIR)$(BINDIR)/vpcs + mkdir -p $(DESTDIR)$(MANDIR)/man1 + install -m 644 ../man/vpcs.1 $(DESTDIR)$(MANDIR)/man1/vpcs.1 + -@if command -v setcap >/dev/null 2>&1; then \ + setcap cap_net_admin+ep $(DESTDIR)$(BINDIR)/vpcs || \ + echo "warning: setcap failed, TAP mode (-e) needs root or cap_net_admin"; \ + else \ + echo "warning: setcap not found, TAP mode (-e) needs root or cap_net_admin"; \ + fi + clean: $(RM) *.o vpcs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vpcs-0.8.4/src/command.c new/vpcs-0.8.5/src/command.c --- old/vpcs-0.8.4/src/command.c 2026-08-01 20:05:54.000000000 +0200 +++ new/vpcs-0.8.5/src/command.c 2026-10-12 13:50:58.000000000 +0200 @@ -54,6 +54,8 @@ extern int pcid; extern int devtype; +extern int hostconf; +extern char *tapname; extern int ctrl_c; extern int ctrl_z; extern u_int time_tick; @@ -1008,10 +1010,13 @@ pc->mtu = MTU; /* set tap ip address */ - if (DEV_TAP == devtype) { + if (DEV_TAP == devtype && hostconf) { tip = (ntohl(rip) | (~ip_masks[icidr])) - 1; in.s_addr = ntohl(tip); - i = sprintf(buf, "ifconfig tap%d %s ", pcid, inet_ntoa(in)); + if (num_pths > 1) + i = sprintf(buf, "ifconfig tap%d %s ", pcid, inet_ntoa(in)); + else + i = sprintf(buf, "ifconfig %s %s ", tapname, inet_ntoa(in)); in.s_addr = ntohl(ip_masks[icidr]); sprintf(buf + i, " netmask %s up", inet_ntoa(in)); i = system(buf); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vpcs-0.8.4/src/dev.c new/vpcs-0.8.5/src/dev.c --- old/vpcs-0.8.4/src/dev.c 2026-08-01 20:05:54.000000000 +0200 +++ new/vpcs-0.8.5/src/dev.c 2026-10-12 13:50:58.000000000 +0200 @@ -165,8 +165,9 @@ { struct ifreq ifr; int fd; + int s; - char dev[IFNAMESIZ]; + char dev[IFNAMSIZ]; if (num_pths > 1) sprintf(dev, "tap%d", id); @@ -188,12 +189,31 @@ * TUNSLMODE | TUNSIFHEAD on the freebsd. */ ifr.ifr_flags = IFF_TAP | IFF_NO_PI; - strncpy(ifr.ifr_name, dev, IFNAMESIZ); + strncpy(ifr.ifr_name, dev, IFNAMSIZ); if (ioctl(fd, TUNSETIFF, (void *) &ifr) < 0) { close(fd); return(-1); } + + /* + * TUNSETIFF attaches (or creates) the interface but leaves it + * administratively DOWN, and no frames can flow until it is + * brought up. Activate it here; this is device activation, not + * host configuration - addresses and masks stay with the caller + * (see the -n option). Needs the same CAP_NET_ADMIN as TUNSETIFF. + */ + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s >= 0) { + memset(&ifr, 0, sizeof(ifr)); + snprintf(ifr.ifr_name, IFNAMSIZ, "%s", dev); + if (ioctl(s, SIOCGIFFLAGS, &ifr) == 0 && + !(ifr.ifr_flags & IFF_UP)) { + ifr.ifr_flags |= IFF_UP; + ioctl(s, SIOCSIFFLAGS, &ifr); + } + close(s); + } return(fd); } #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vpcs-0.8.4/src/dns.c new/vpcs-0.8.5/src/dns.c --- old/vpcs-0.8.4/src/dns.c 2026-08-01 20:05:54.000000000 +0200 +++ new/vpcs-0.8.5/src/dns.c 2026-10-12 13:50:58.000000000 +0200 @@ -342,7 +342,7 @@ return 0; /* invalid name or answer */ - if ((dh->flags & 0x8081) != 0x8081) { + if ((dh->flags & 0x0081) != 0x0081) { c = (dh->flags >> 8) & 0xf; if (c == 0) return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vpcs-0.8.4/src/frag.c new/vpcs-0.8.5/src/frag.c --- old/vpcs-0.8.4/src/frag.c 2026-08-01 20:05:54.000000000 +0200 +++ new/vpcs-0.8.5/src/frag.c 2026-10-12 13:50:58.000000000 +0200 @@ -263,7 +263,7 @@ { struct packet *m, *mh, *m2; iphdr *ip; - int len; + int len, lenfr; int elen; int off; @@ -280,22 +280,23 @@ return *m0; mh = *m0; - memcpy(m->data, mh->data, mh->len); - ip = (iphdr *)(m->data + sizeof(ethdr)); - ip->len = ntohs(len + sizeof(iphdr)); - off = mh->len; + /* copy header from first fragment */ elen = sizeof(ethdr) + sizeof(iphdr); - m2 = mh; - mh = mh->next; - del_pkt(m2); + memcpy(m->data, mh->data, elen); + off = elen; while (mh) { - len = mh->len - elen; - memcpy(m->data + off, mh->data + elen, len); - off += len; + ip = (iphdr *)(mh->data + sizeof(ethdr)); + lenfr = ntohs(ip->len) - sizeof(iphdr); + /* copy IP payload */ + memcpy(m->data + off, mh->data + elen, lenfr); + off += lenfr; m2 = mh; mh = mh->next; del_pkt(m2); } + /* fix header */ + ip = (iphdr *)(m->data + sizeof(ethdr)); + ip->len = ntohs(len + sizeof(iphdr)); ip->frag = 0; ip->cksum = 0; ip->cksum = cksum((u_short *)ip, sizeof(iphdr)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vpcs-0.8.4/src/help.c new/vpcs-0.8.5/src/help.c --- old/vpcs-0.8.4/src/help.c 2026-08-01 20:05:54.000000000 +0200 +++ new/vpcs-0.8.5/src/help.c 2026-10-12 13:50:58.000000000 +0200 @@ -118,7 +118,7 @@ " the gateway to 10.1.1.65, the netmask to 255.255.255.192.\n" " In tap mode, the ip of the tapx is the maximum host ID\n" " of the subnet. In the example above the tapx ip would be \n" - " 10.1.1.126\n" + " 10.1.1.126 (unless -n is given)\n" " {Umask} may be written as /26, 26 or 255.255.255.192\n" " {Hauto} Attempt to obtain IPv6 address, mask and gateway using SLAAC\n" " {Hdhcp} [{UOPTION}] Attempt to obtain IPv4 address, mask, gateway, DNS via DHCP\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vpcs-0.8.4/src/mk.sh new/vpcs-0.8.5/src/mk.sh --- old/vpcs-0.8.4/src/mk.sh 2026-08-01 20:05:54.000000000 +0200 +++ new/vpcs-0.8.5/src/mk.sh 2026-10-12 13:50:58.000000000 +0200 @@ -3,7 +3,7 @@ os=`uname` if [ $# -eq 0 ]; then - arch=`uname -p` + arch=`uname -m` fi CCOPT="-O2" @@ -11,12 +11,12 @@ case $1 in clean) MKOPT=clean - arch=`uname -p` + arch=`uname -m` ;; debug) CCOPT="-g" MKOPT=debug - arch=`uname -p` + arch=`uname -m` ;; *) arch=$1 @@ -49,18 +49,33 @@ fi if [ "x$arch" = "x" ]; then - echo $0" [i386 | amd64 | 32 | 64] [clean | debug]" + echo $0" [i386 | amd64 | arm64 | 32 | 64] [clean | debug]" exit 1 fi -if [ $arch = "i386" -o $arch = "32" ]; then - CCOPT=$CCOPT" -m32" -fi - -if [ $arch = "amd64" -o $arch = "x86_64" -o $arch = "64" ]; then - CCOPT=$CCOPT" -m64" -fi +case "$arch" in + i386|32) + CCOPT=$CCOPT" -m32" + ;; + amd64|x86_64|64) + CCOPT=$CCOPT" -m64" + ;; + arm64|aarch64) + case `uname -m` in + aarch64|arm64) + ;; + *) + echo "arm64 builds require an ARM64 host" >&2 + exit 1 + ;; + esac + ;; + *) + echo $0" [i386 | amd64 | arm64 | 32 | 64] [clean | debug]" >&2 + exit 1 + ;; +esac if [ $os = "Darwin" ]; then CCOPT=$CCOPT"" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vpcs-0.8.4/src/vpcs.c new/vpcs-0.8.5/src/vpcs.c --- old/vpcs-0.8.4/src/vpcs.c 2026-08-01 20:05:54.000000000 +0200 +++ new/vpcs-0.8.5/src/vpcs.c 2026-10-12 13:50:58.000000000 +0200 @@ -53,7 +53,7 @@ #include "dhcp.h" #include "frag6.h" -const char *ver = "0.8.4"; +const char *ver = "0.8.5"; /* track the binary */ static const char *ident = "$Id$"; @@ -86,6 +86,7 @@ int num_pths = MAX_NUM_PTHS; /* number of VPCs */ char *tapname = "tap0"; /* TAP device name (only when 1 VPC is created) */ +int hostconf = 1; /* auto-configure the host tap interface (tap mode) */ int macaddr = 0; /* the last byte of ether address */ @@ -161,7 +162,7 @@ rhost = inet_addr("127.0.0.1"); devtype = DEV_UDP; - while ((c = getopt(argc, argv, "?c:efhm:p:r:Rs:t:uvFi:d:")) != -1) { + while ((c = getopt(argc, argv, "?c:efhm:p:r:Rs:t:uvFi:d:n")) != -1) { switch (c) { case 'c': rport_flag = 1; @@ -212,6 +213,9 @@ } tapname = strdup(optarg); break; + case 'n': + hostconf = 0; + break; case 'h': case '?': @@ -726,6 +730,7 @@ " {H-t} {Uip} remote host {UIP}, default 127.0.0.1\r\n" "\r\ntap mode options:\r\n" " {H-d} {Udevice} {Udevice} name, works only when -i is set to 1\r\n" + " {H-n} do not auto-configure the host tap interface\r\n" "\r\nhypervisor mode option:\r\n" " {H-H} {Uport} run as the hypervisor listening on the tcp {Uport}\r\n" "\r\n"
