## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 12; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global hamcore_commit 2951ae5b61b16c1f4e03ceee88d6db7e1e45362b %global console_version 1.0.0 %global console_source_dir %{name}-console-%{console_version} %global console_url_path /admin/default/ %global console_path src/bin/hamcore/wwwroot/%{console_url_path} # The web console (softethervpn-console) is NOT built by default. # Build with `--with console` to compile it and embed it in hamcore. # The build is offline and consumes Source3, generated by: # ./create-node-offline-cache.sh %bcond_with console # Set build in advance so we can reuse it %global buildnum 5188 Name: softethervpn Version: 5.2.%{buildnum} Release: %{autorelease} Summary: Cross-platform multi-protocol VPN software. License: Apache-2.0 URL: https://www.softether.org Source0: https://github.com/SoftEtherVPN/SoftEtherVPN/archive/%{version}/%{name}-%{version}.tar.gz Source1: https://github.com/SoftEtherVPN/libhamcore/archive/%{hamcore_commit}/libhamcore-%{hamcore_commit}.tar.gz # Conditional so the default (no-console) build does not require the UI # tarball in SOURCES; fetch it with spectool --define '_with_console 1'. %if %{with console} Source2: https://github.com/Leuca/softethervpn-console/archive/v%{console_version}/%{console_source_dir}.tar.gz Source3: %{console_source_dir}-npm-cache.tar.gz %endif Patch0: softethervpn-add-soversion.patch Patch1: softethervpn-unbundle-deps.patch Patch2: softethervpn-support-libb2.patch # Fix pointer key hashing Patch3: softethervpn-fix-pointer-key-hashing.patch # Fix cluster ip table deletion Patch4: softethervpn-fix-cluster-ip-table-delete.patch # Fix clustered SecureNAT session listing Patch5: softethervpn-fix-cluster-session-list.patch BuildRequires: gettext BuildRequires: nodejs BuildRequires: wget BuildRequires: cmake BuildRequires: ncurses-devel %if 0%{?fedora} > 44 BuildRequires: openssl3-devel %else BuildRequires: openssl-devel %endif BuildRequires: libsodium-devel BuildRequires: readline-devel BuildRequires: zlib-devel BuildRequires: diffstat BuildRequires: doxygen BuildRequires: git BuildRequires: patch BuildRequires: patchutils BuildRequires: subversion BuildRequires: systemtap BuildRequires: gcc-c++ BuildRequires: systemd-rpm-macros BuildRequires: google-cpu_features-devel BuildRequires: libb2-devel BuildRequires: tinydir-devel %if %{with console} BuildRequires: nodejs-devel BuildRequires: nodejs-npm %endif Requires: softether-vpncmd%{?_isa} = %{version}-%{release} Requires: softether-vpnserver%{?_isa} = %{version}-%{release} Requires: softether-vpnclient%{?_isa} = %{version}-%{release} Requires: softether-vpnbridge%{?_isa} = %{version}-%{release} %description SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the world's most powerful and easy-to-use multi-protocol VPN software. SoftEther VPN supports most of widely-used VPN protocols including SSL-VPN, WireGuard, OpenVPN, IPsec, L2TP, MS-SSTP, L2TPv3 and EtherIP by the single SoftEther VPN Server program. %package -n softether-vpncmd Summary: SoftEtherVPN cmd binaries Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description -n softether-vpncmd Console binaries for %{name} %package -n softether-vpnserver Summary: SoftEtherVPN server binaries Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description -n softether-vpnserver Server binaries for %{name} %package -n softether-vpnclient Summary: SoftEtherVPN client binaries Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description -n softether-vpnclient Client binaries for %{name} %package -n softether-vpnbridge Summary: SoftEtherVPN bridge binaries Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description -n softether-vpnbridge Bridge binaries for %{name} %package libs Summary: SoftEtherVPN shared libraries %if (0%{?fedora} && 0%{?fedora} < 43) || (0%{?rhel} && 0%{?rhel} < 10) Requires: oqsprovider %endif %description libs Package that provides shared libraries needed by SoftEtherVPN software %package devel Summary: SoftEtherVPN development headers Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description devel Development headers of SoftEtherVPN %prep %autosetup -p1 -n SoftEtherVPN-%{version} # Unpack libhamcore pushd src rm -rf libhamcore tar xvf %{SOURCE1} mv libhamcore-%{hamcore_commit} libhamcore popd # Remove absolute rpaths sed -i '/CMAKE_INSTALL_RPATH/d' CMakeLists.txt %if %{with console} tar -xzf %{SOURCE2} tar -xzf %{SOURCE3} %endif %build # Optionally integrate the web console %if %{with console} pushd %{console_source_dir} npm ci --offline --cache ../npm-cache --include=dev --ignore-scripts --no-audit --fund=false ASSET_PATH=%{console_url_path} npm run build:integrated popd rm -rf %{console_path} cp -r %{console_source_dir}/dist/. %{console_path} %endif %cmake \ -DBUILD_NUMBER=%{buildnum} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_SYSTEMD_UNITDIR=%{_unitdir} \ -DSE_PIDDIR=%{_rundir}/softether \ -DSE_LOGDIR=%{_localstatedir}/log/softether \ -DSE_DBDIR=%{_sysconfdir}/softether %cmake_build %install %cmake_install # Add paths to systemd units sed -i 's/Restart=on-failure/Restart=on-failure\nLogsDirectory=softerher\nRuntimeDirectory=softether/' %{buildroot}%{_unitdir}/softether-vpnserver.service sed -i 's/ReadOnlyDirectories=/ReadOnlyPaths=/' %{buildroot}%{_unitdir}/softether-vpnserver.service sed -i 's/ReadWriteDirectories=-\/usr\/libexec\/softether\/vpnserver/ReadWritePaths=-\/etc\/softether\nReadWritePaths=-\/run\/softether\nReadWritePaths=-\/var\/log\/softether/' %{buildroot}%{_unitdir}/softether-vpnserver.service sed -i 's/Restart=on-failure/Restart=on-failure\nLogsDirectory=softerher\nRuntimeDirectory=softether/' %{buildroot}%{_unitdir}/softether-vpnclient.service sed -i 's/ReadOnlyDirectories=/ReadOnlyPaths=/' %{buildroot}%{_unitdir}/softether-vpnclient.service sed -i 's/ReadWriteDirectories=-\/usr\/libexec\/softether\/vpnclient/ReadWritePaths=-\/etc\/softether\nReadWritePaths=-\/run\/softether\nReadWritePaths=-\/var\/log\/softether/' %{buildroot}%{_unitdir}/softether-vpnclient.service sed -i 's/Restart=on-failure/Restart=on-failure\nLogsDirectory=softerher\nRuntimeDirectory=softether/' %{buildroot}%{_unitdir}/softether-vpnbridge.service sed -i 's/ReadOnlyDirectories=/ReadOnlyPaths=/' %{buildroot}%{_unitdir}/softether-vpnbridge.service sed -i 's/ReadWriteDirectories=-\/usr\/libexec\/softether\/vpnbridge/ReadWritePaths=-\/etc\/softether\nReadWritePaths=-\/run\/softether\nReadWritePaths=-\/var\/log\/softether/' %{buildroot}%{_unitdir}/softether-vpnbridge.service # Copy headers mkdir -p %{buildroot}%{_includedir}/libcedar mkdir -p %{buildroot}%{_includedir}/libmayaqua install -m 0644 src/Cedar/*.h %{buildroot}%{_includedir}/libcedar install -m 0644 src/Mayaqua/*.h %{buildroot}%{_includedir}/libmayaqua # Generate empty folders %define makedirs \ if [ ! -d %{_sysconfdir}/softether ]; \ then \ mkdir -p %{_sysconfdir}/softether &>/dev/null \ fi \ if [ ! -d %{_localstatedir}/log/softether ]; \ then \ mkdir -p %{_localstatedir}/log/softether &>/dev/null \ fi \ if [ ! -d %{_rundir}/softether ]; \ then \ mkdir -p %{_rundir}/softether &>/dev/null \ fi \ if [ ! -d %{_sharedstatedir}/softether ]; \ then \ mkdir -p %{_sharedstatedir}/softether &>/dev/null \ fi %pre -n softether-vpnserver %makedirs %pre -n softether-vpnbridge %makedirs %pre -n softether-vpnclient %makedirs %post -n softether-vpnserver %systemd_post softether-vpnserver.service %post -n softether-vpnbridge %systemd_post softether-vpnbridge.service %post -n softether-vpnclient %systemd_post softether-vpnclient.service %preun -n softether-vpnserver %systemd_preun softether-vpnserver.service %preun -n softether-vpnbridge %systemd_preun softether-vpnbridge.service %preun -n softether-vpnclient %systemd_preun softether-vpnclient.service %postun -n softether-vpnserver %systemd_postun_with_restart softether-vpnserver.service %postun -n softether-vpnbridge %systemd_postun_with_restart softether-vpnbridge.service %postun -n softether-vpnclient %systemd_postun_with_restart softether-vpnclient.service %files %license LICENSE %doc AUTHORS.TXT CODE_OF_CONDUCT.md DISCLAIMER.md FUNDING.yml README.md SECURITY.md %files -n softether-vpncmd %{_bindir}/vpncmd %{_libexecdir}/softether/vpncmd/vpncmd %{_libexecdir}/softether/vpncmd/hamcore.se2 %files -n softether-vpnserver %{_bindir}/vpnserver %{_libexecdir}/softether/vpnserver/vpnserver %{_libexecdir}/softether/vpnserver/hamcore.se2 %{_unitdir}/softether-vpnserver.service %files -n softether-vpnclient %{_bindir}/vpnclient %{_libexecdir}/softether/vpnclient/vpnclient %{_libexecdir}/softether/vpnclient/hamcore.se2 %{_unitdir}/softether-vpnclient.service %files -n softether-vpnbridge %{_bindir}/vpnbridge %{_libexecdir}/softether/vpnbridge/vpnbridge %{_libexecdir}/softether/vpnbridge/hamcore.se2 %{_unitdir}/softether-vpnbridge.service %files libs %{_libdir}/libcedar.so.* %{_libdir}/libmayaqua.so.* %files devel %{_libdir}/libcedar.so %{_libdir}/libmayaqua.so %{_includedir}/libmayaqua/*.h %{_includedir}/libcedar/*.h %changelog ## START: Generated by rpmautospec * Sat Aug 15 2026 Luca Magrone - 5.2.5188-12 - Bump console to 1.0.0 * Thu Aug 06 2026 Luca Magrone - 5.2.5188-11 - Require openssl3-devel from fedora 45 onwards * Thu Aug 06 2026 Luca Magrone - 5.2.5188-10 - Fix cluster related issues - Add patch to fix pointer key hashing - Add patch to fix cluster ip table deletion - Add patch to fix cluster session list error. - Drop requirement of openssl-devel-engine * Thu Aug 06 2026 Luca Magrone - 5.2.5188-9 - Bump console version to 0.2.0 - Override the built-in build number to ensure it is the same as the package * Wed Jul 15 2026 Luca Magrone - 5.2.5188-8 - Bump console to 0.1.2 * Tue Jul 14 2026 Luca Magrone - 5.2.5188-7 - Bump console to 0.1.1 * Tue Jul 14 2026 Luca Magrone - 5.2.5188-6 - Add the possibility to integrate the web console * Sun Aug 24 2025 Luca Magrone - 5.2.5188-5 - Run scriptles in the subpackages * Thu Aug 21 2025 Luca Magrone - 5.2.5188-4 - Fix oqsprovider dependency requirement * Thu Aug 21 2025 Luca Magrone - 5.2.5188-3 - Do not require oqsprovider on RHEL 10 * Thu Aug 21 2025 Luca Magrone - 5.2.5188-2 - Fix depenency unbundling on some systems * Thu Aug 21 2025 Luca Magrone - 5.2.5188-1 - Initial package ## END: Generated by rpmautospec