GlobalProtect-openconnect icon indicating copy to clipboard operation
GlobalProtect-openconnect copied to clipboard

Fails to build with dpkg-buildpackage

Open northivanastan opened this issue 2 years ago • 1 comments

I realize this is probably not supported, but since this project had a debian/ directory, and I use vanilla Debian (not Ubuntu), I figured I would try building it with dpkg-buildpackage, instead of the route suggested in the readme, so I could manage it with APT and cleanly uninstall it if necessary.

Unfortunately, this failed with an error:

dpkg-buildpackage: info: source package globalprotect-openconnect
dpkg-buildpackage: info: source version 1.4.8-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Kevin Yue <[email protected]>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source --before-build .
 fakeroot debian/rules clean
dh clean
   dh_auto_clean
        rm -rf obj-x86_64-linux-gnu
   dh_clean
        rm -f debian/debhelper-build-stamp
        rm -rf debian/.debhelper/
        rm -f debian/globalprotect-openconnect.debhelper.log
        rm -f -- debian/globalprotect-openconnect.substvars debian/globalprotect-openconnect.postrm.debhelper debian/files
        rm -fr -- debian/globalprotect-openconnect/ debian/tmp/
        find .  \( \( \
                \( -path .\*/.git -o -path .\*/.svn -o -path .\*/.bzr -o -path .\*/.hg -o -path .\*/CVS -o -path .\*/.pc -o -path .\*/_darcs \) -prune -o -type f -a \
                \( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
                 -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
                 -o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \
                 -o -name TAGS -o \( -path '*/.deps/*' -a -name '*.P' \) \
                \) -exec rm -f {} + \) -o \
                \( -type d -a -name autom4te.cache -prune -exec rm -rf {} + \) \)
 dpkg-source -b .
dpkg-source: error: can't build with source format '3.0 (native)': native package version may not have a revision
dpkg-buildpackage: error: dpkg-source -b . subprocess returned exit status 255

I decided to report this as an issue because, as it turns out, there's a simple fix for this! The error was merely complaining about the version format in the debian/changelog being incompatible with the source format asserted in debian/source/format. After changing the version number of the latest version listed in debian/changelog from 1.4.8-1 to simply 1.4.8, the package built and installed successfully, and it is currently working on my system. Perhaps future versions should alter the versioning format, or the source format, so that the package can be built as a DEB automatically.

northivanastan avatar Sep 10 '22 23:09 northivanastan

Which Ubuntu version would work on my vanilla Debian (Bullseye)? Dunno, but the build from source looks pretty polished, except for hitting the above issue... which @northivanastan had handily showed me the way around, thanks. The install_debian.sh script had worked too but I was perturbed by the lack of uninstall instructions. Having built and installed the package, removing it got rid of gpservice. One of the signs of trustworthy code, that.

martindorey avatar Feb 12 '23 20:02 martindorey