void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.57k stars 2.14k forks source link

Package request: sstp-client #46669

Open michalszmidt opened 1 year ago

michalszmidt commented 1 year ago

Package name

sstp-client

Package homepage

https://sstp-client.sourceforge.net https://gitlab.com/sstp-project/sstp-client

Description

SSTP is Microsofts Remote Access Solution (RAS) for PPP over SSL. http://en.wikipedia.org/wiki/Secure_Socket_Tunneling_Protocol

SSTP-Client features:

Already tried creating template without success.

pkgname=sstp-client
version=1.0.19
revision=1
build_style=configure
configure_args='--with-libevent=2 --disable-static --with-runtime-dir="/var/run/sstpc" --enable-group=sstpc --enable-user=sstpc --prefix=/usr'
hostmakedepends="ppp shadow gawk"
makedepends="pkg-config ppp-devel libevent-devel libevent openssl openssl-devel autoconf autoconf-archive libtool automake"
depends="ppp libevent openssl"
short_desc="A client implementation of SSTP VPN for Linux"
license="GPL-2.0-or-later"
homepage="https://sstp-client.sourceforge.net"
distfiles="https://gitlab.com/sstp-project/sstp-client/-/archive/${version}/${pkgname}-${version}.tar.gz"
checksum=e2652365f69f5037102e78f4e115ff764a390b27bb3fd513a8a50b10a61bb613
make_install_args="prefix=/usr"

pre_configure() {
    getent group sstpc || /usr/bin/groupadd sstpc

    getent passwd sstpc || /usr/bin/useradd -r \
        -c "Secure Socket Tunneling Protocol (SSTP) Client" \
        -g sstpc \
        -d /var/run/sstpc \
        -s /usr/bin/nologin \
        sstpc

    pppd_version="$(pppd --version | cut -d ' ' -f 3)"
    configure_args="$configure_args --with-pppd-plugin-dir=/usr/lib/pppd/$pppd_version"
    echo "$configure_args"
    prefix='/usr'
    autoreconf --install

}

pre_build() {
    cd $wrksrc
    ./configure
}

do_check(){
    cd $wrksrc
    make check
}

post_install() {
    vlicense COPYING
}

Does the requested package meet the package requirements?

Compiled, Required

Is the requested package released?

Yes

balejk commented 1 year ago

I have written a template for this some time ago, feel free to use it:

# Template file for 'sstp-client'
pkgname=sstp-client
version=1.0.19
revision=1
build_style=gnu-configure
configure_script=./autogen.sh
hostmakedepends="pkg-config autoconf automake libtool"
makedepends="libevent-devel ppp-devel libtls-devel"
short_desc="A client implementation of Secure Socket Tunneling Protocol (SSTP)"
maintainer=
license="GPL-3.0-or-later"
homepage="https://gitlab.com/eivnaes/sstp-client"
distfiles="https://gitlab.com/eivnaes/sstp-client/-/archive/${version}/sstp-client-${version}.tar.gz"
checksum=e2652365f69f5037102e78f4e115ff764a390b27bb3fd513a8a50b10a61bb613

However, I have been having some issues with the latest version (you can take a look at the project's issue tracker at Gitlab) so right now I'm running a git version. If you happen to run into the same problems, you can just change the template to use version 1.0.18 for now (don't forget to update the checksum), however please note that 1.0.18 requires a simple patch in order to be compilable on musl (see the project's git log, something like second commit after the 1.0.18 tag).

michalszmidt commented 10 months ago

In the end I could assemble something like that

I also assembled nm-sstp-plugin template, see that comment but still can't connect. Unfortunately VPN server is not mine so can't check logs.

@balejk what kind of issues have you encouraged?

@sgn Does it meet packaging guidelines in below form?

# Template file for 'sstp-client'

pkgname=sstp-client
version=1.0.19
revision=1
build_style=gnu-configure
configure_script=./autogen.sh
hostmakedepends="pkg-config autoconf automake libtool"
maintainer=""
license="GPL-3.0"
makedepends="libevent-devel ppp-devel libtls-devel"
depends="libsstp>=${version}_${revision}"
short_desc="A client implementation of Secure Socket Tunneling Protocol (SSTP)"
homepage="https://gitlab.com/eivnaes/sstp-client"
distfiles="https://gitlab.com/eivnaes/sstp-client/-/archive/${version}/sstp-client-${version}.tar.gz"
checksum=e2652365f69f5037102e78f4e115ff764a390b27bb3fd513a8a50b10a61bb613

pppd_plugin_version=2.4.7

sstp-client-devel_package(){
    depends="${sourcepkg}>=${version}_${revision}"
    short_desc+=" - development files"
    pkg_install() {
        vmove usr/include
        vmove "usr/lib/*.a"
        vmove usr/lib/pkgconfig
        vmove "usr/lib/pppd/${pppd_plugin_version}/*.a"
    }
}

sstp-client-doc_package(){
    short_desc+=" - documentation files"
    pkg_install() {
        vmove usr/share/doc
        vmove usr/share/man
    }
}

libsstp_package(){
    short_desc+="sstp-client (libsstp_api-X.so sstp-pppd-plugin.so) - shared libraries"
    shlib_provides="libsstp_api-0.so sstp-pppd-plugin.so"
    pkg_install() {
        vmove "usr/lib/pppd/${pppd_plugin_version}/*.so"
        vmove "usr/lib/*.so"
    }
}     
balejk commented 10 months ago

I also assembled nm-sstp-plugin template, see that comment but still can't connect. Unfortunately VPN server is not mine so can't check logs.

Sorry, I don't use NM so I cannot help you there. But I suggest you try to install version 1.0.18 and check whether that works (see below). Also note that if you are using musl you will need to apply a patch for it to compile - see the project's git log, it should be something like the second commit after the release of 1.0.18.

@balejk what kind of issues have you encouraged?

Please see the issue that I have opened at the project's Gitlab repository, I hope I have described it there in enough detail.

If you could confirm that you are experiencing the same issue (since it seems that you are using version 1.0.19 which should be the first one that is affected) it would be great if you could mention it in the issue with some details, especially if you are using sstpc in a different way than me (i. e. via NM).