From 0d07ba30f2cb41b132a3811005017f04b9569162 Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Thu, 9 Aug 2018 22:52:38 +0200 Subject: [PATCH 1/5] Add project description in a dedicated file --- description | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 description diff --git a/description b/description new file mode 100644 index 00000000..c608c84e --- /dev/null +++ b/description @@ -0,0 +1,5 @@ +SoftEther VPN ("SoftEther" means "Software Ethernet") is an open-source cross-platform multi-protocol VPN program, created as an academic project in the University of Tsukuba. +Its protocol is very fast and it can be used in very restricted environments, as it's able to transfer packets over DNS and ICMP. +The server includes a free Dynamic DNS service, which can be used to access the server even if the public IP address changes. +A NAT-Traversal function is also available, very useful in case the required ports cannot be opened on the firewall. +The supported third party protocols are OpenVPN, L2TP/IPSec and SSTP. From a162dec76fec6b8d38b27a62bfce5a04c3e884c4 Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Thu, 9 Aug 2018 23:33:38 +0200 Subject: [PATCH 2/5] CMake: add support for Debian packaging with CPack --- CMakeLists.txt | 26 ++++++++++++++++++++++++-- src/CMakeLists.txt | 40 +++++++++++++++++++++++++++++++++------- 2 files changed, 57 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 540aba12..fe05c2d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,9 @@ -cmake_minimum_required(VERSION 3.4.3) +cmake_minimum_required(VERSION 3.6) -project(SoftEtherVPN LANGUAGES C) +project(SoftEtherVPN + VERSION 5.01.9657 + LANGUAGES C +) set(default_build_type "Release") @@ -10,3 +13,22 @@ if(EXISTS "${SoftEtherVPN_SOURCE_DIR}/.git" AND NOT EXISTS "${SoftEtherVPN_SOURC endif() add_subdirectory(src) + +# Packaging +set(CPACK_GENERATOR "DEB") +set(CPACK_COMPONENTS_ALL vpnserver vpnclient vpnbridge vpncmd) +set(CPACK_PACKAGE_DIRECTORY ${SoftEtherVPN_SOURCE_DIR}/bin) +set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) +set(CPACK_PACKAGE_VENDOR "SoftEther") +set(CPACK_PACKAGE_NAME "softether") +set(CPACK_PACKAGE_DESCRIPTION_FILE "${SoftEtherVPN_SOURCE_DIR}/description") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SoftEther VPN is an open-source cross-platform multi-protocol VPN program, created as an academic project in the University of Tsukuba.") + +# DEB +set(CPACK_DEB_COMPONENT_INSTALL ON) +set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) +set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") +set(CPACK_DEBIAN_PACKAGE_SECTION "net") +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Unknown") + +include(CPack) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 449256d0..c89109c9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,6 @@ include(GNUInstallDirs) -macro(install_wrapper_script target destination) +macro(install_wrapper_script component target destination) get_filename_component(filename ${target} NAME) file(WRITE ${CMAKE_SOURCE_DIR}/tmp/script/${filename} "#!/bin/sh\n") @@ -8,6 +8,7 @@ macro(install_wrapper_script target destination) file(APPEND ${CMAKE_SOURCE_DIR}/tmp/script/${filename} "exit $?\n") install(FILES ${CMAKE_SOURCE_DIR}/tmp/script/${filename} + COMPONENT ${component} DESTINATION ${destination} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE ) @@ -124,8 +125,33 @@ add_custom_command(TARGET hamcore-archive-build COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/tmp/hamcore.se2 ${VPNCMD_RUNTIME_OUTPUT_DIRECTORY} ) -# Copy contents of "bin" directory to /usr/lib(exec)/softether/ -install(DIRECTORY "${CMAKE_SOURCE_DIR}/bin/" +# Copy "vpnserver" directory to /usr/lib(exec)/softether/ +install(DIRECTORY ${VPNSERVER_RUNTIME_OUTPUT_DIRECTORY} + COMPONENT "vpnserver" + DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether" + PATTERN "*" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +) + +# Copy "vpnclient" directory to /usr/lib(exec)/softether/ +install(DIRECTORY ${VPNCLIENT_RUNTIME_OUTPUT_DIRECTORY} + COMPONENT "vpnclient" + DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether" + PATTERN "*" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +) + +# Copy "vpnbridge" directory to /usr/lib(exec)/softether/ +install(DIRECTORY ${VPNBRIDGE_RUNTIME_OUTPUT_DIRECTORY} + COMPONENT "vpnbridge" + DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether" + PATTERN "*" + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +) + +# Copy "vpncmd" directory to /usr/lib(exec)/softether/ +install(DIRECTORY ${VPNCMD_RUNTIME_OUTPUT_DIRECTORY} + COMPONENT "vpncmd" DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}/softether" PATTERN "*" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE @@ -133,10 +159,10 @@ install(DIRECTORY "${CMAKE_SOURCE_DIR}/bin/" # Create wrapper scripts in the user's binaries directory, which is usually "/usr/local/bin". # This is required because symlinks use the folder they are in as working directory. -install_wrapper_script("${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnserver/vpnserver" ${CMAKE_INSTALL_FULL_BINDIR}) -install_wrapper_script("${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnclient/vpnclient" ${CMAKE_INSTALL_FULL_BINDIR}) -install_wrapper_script("${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnbridge/vpnbridge" ${CMAKE_INSTALL_FULL_BINDIR}) -install_wrapper_script("${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpncmd/vpncmd" ${CMAKE_INSTALL_FULL_BINDIR}) +install_wrapper_script("vpnserver" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnserver/vpnserver" ${CMAKE_INSTALL_FULL_BINDIR}) +install_wrapper_script("vpnclient" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnclient/vpnclient" ${CMAKE_INSTALL_FULL_BINDIR}) +install_wrapper_script("vpnbridge" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpnbridge/vpnbridge" ${CMAKE_INSTALL_FULL_BINDIR}) +install_wrapper_script("vpncmd" "${CMAKE_INSTALL_FULL_LIBEXECDIR}/softether/vpncmd/vpncmd" ${CMAKE_INSTALL_FULL_BINDIR}) # Print message after installing the targets install(CODE "message(\"\n----------------------------------------------------------------------------------------------------------------------------\")") From 2d1d3826783764b98b1cc91b975bc079c11c595a Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Thu, 9 Aug 2018 23:32:28 +0200 Subject: [PATCH 3/5] Remove "debian" directory --- debian/README.TXT | 14 ----- debian/bin/vpnbridge | 3 -- debian/bin/vpnclient | 3 -- debian/bin/vpncmd | 3 -- debian/bin/vpnserver | 3 -- debian/changelog | 5 -- debian/compat | 1 - debian/control | 80 ---------------------------- debian/dch-generate.sh | 68 ------------------------ debian/rules | 29 ----------- debian/softether-vpnbridge.install | 5 -- debian/softether-vpnclient.install | 5 -- debian/softether-vpncmd.install | 4 -- debian/softether-vpnserver.init | 83 ------------------------------ debian/softether-vpnserver.install | 4 -- 15 files changed, 310 deletions(-) delete mode 100644 debian/README.TXT delete mode 100755 debian/bin/vpnbridge delete mode 100755 debian/bin/vpnclient delete mode 100755 debian/bin/vpncmd delete mode 100755 debian/bin/vpnserver delete mode 100644 debian/changelog delete mode 100644 debian/compat delete mode 100644 debian/control delete mode 100755 debian/dch-generate.sh delete mode 100755 debian/rules delete mode 100644 debian/softether-vpnbridge.install delete mode 100644 debian/softether-vpnclient.install delete mode 100644 debian/softether-vpncmd.install delete mode 100644 debian/softether-vpnserver.init delete mode 100644 debian/softether-vpnserver.install diff --git a/debian/README.TXT b/debian/README.TXT deleted file mode 100644 index 582d0f36..00000000 --- a/debian/README.TXT +++ /dev/null @@ -1,14 +0,0 @@ -The contents of the "debian" directory were written -by Dmitry Orlov (https://github.com/mosquito) and has been contributed -to the SoftEther VPN Project main source-tree. - -Note that SoftEther VPN Project has not tested this debian package. -Please try it at your own risk. - -See also: -Add simple debian packaging #20 -https://github.com/SoftEtherVPN/SoftEtherVPN/pull/20 - -February 5, 2014 -Daiyuu Nobori -SoftEther VPN Project diff --git a/debian/bin/vpnbridge b/debian/bin/vpnbridge deleted file mode 100755 index 93e0e6a6..00000000 --- a/debian/bin/vpnbridge +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -/opt/vpnbridge/vpnbridge "$@" -exit $? diff --git a/debian/bin/vpnclient b/debian/bin/vpnclient deleted file mode 100755 index dae45e13..00000000 --- a/debian/bin/vpnclient +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -/opt/vpnclient/vpnclient "$@" -exit $? diff --git a/debian/bin/vpncmd b/debian/bin/vpncmd deleted file mode 100755 index d3abbc4b..00000000 --- a/debian/bin/vpncmd +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -/opt/vpncmd/vpncmd "$@" -exit $? diff --git a/debian/bin/vpnserver b/debian/bin/vpnserver deleted file mode 100755 index f8e85f73..00000000 --- a/debian/bin/vpnserver +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -/opt/vpnserver/vpnserver "$@" -exit $? diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 5e66b3a7..00000000 --- a/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -softether-vpn (0:5.01.9657) unstable; urgency=low - - * Updated release version - - -- Ilya Shipitsin Mon, 11 Jun 2018 17:50:39 +0000 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index ec635144..00000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/debian/control b/debian/control deleted file mode 100644 index ad729e02..00000000 --- a/debian/control +++ /dev/null @@ -1,80 +0,0 @@ -Source: softether-vpn -Section: net -Priority: optional -Maintainer: Dmitry Orlov -Build-Depends: debhelper (>= 7.0.50~), libncurses5-dev, linux-libc-dev, libssl-dev, zlib1g-dev, libreadline-dev, build-essential, cmake3 | cmake, dh-exec, git -Standards-Version: 3.9.1 -Homepage: http://www.softether.org/ - -Package: softether-vpnbridge -Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, softether-vpncmd -Section: net -Description: VPN Bridge daemon - An Open-Source Free Cross-platform Multi-protocol VPN Program, as an academic project from University of Tsukuba. - SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the world's most - powerful and easy-to-use multi-protocol VPN software. - It runs on Windows, Linux, Mac, FreeBSD and Solaris. - SoftEther VPN is open source. You can use SoftEther for any - personal or commercial use for free charge. - SoftEther VPN is an optimum alternative to - OpenVPN and Microsoft's VPN servers. SoftEther VPN - has a clone-function of OpenVPN Server. - You can integrate from OpenVPN to SoftEther VPN smoothly. - SoftEther VPN is faster than OpenVPN. - SoftEther VPN also supports Microsoft SSTP VPN for Windows Vista / 7 / 8. - -Package: softether-vpnclient -Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, softether-vpncmd -Section: net -Description: VPN Client daemon - An Open-Source Free Cross-platform Multi-protocol VPN Program, as an academic project from University of Tsukuba. - SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the world's most - powerful and easy-to-use multi-protocol VPN software. - It runs on Windows, Linux, Mac, FreeBSD and Solaris. - SoftEther VPN is open source. You can use SoftEther for any - personal or commercial use for free charge. - SoftEther VPN is an optimum alternative to - OpenVPN and Microsoft's VPN servers. SoftEther VPN - has a clone-function of OpenVPN Server. - You can integrate from OpenVPN to SoftEther VPN smoothly. - SoftEther VPN is faster than OpenVPN. - SoftEther VPN also supports Microsoft SSTP VPN for Windows Vista / 7 / 8. - -Package: softether-vpncmd -Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends} -Section: net -Description: Command line utils - An Open-Source Free Cross-platform Multi-protocol VPN Program, as an academic project from University of Tsukuba. - SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the world's most - powerful and easy-to-use multi-protocol VPN software. - It runs on Windows, Linux, Mac, FreeBSD and Solaris. - SoftEther VPN is open source. You can use SoftEther for any - personal or commercial use for free charge. - SoftEther VPN is an optimum alternative to - OpenVPN and Microsoft's VPN servers. SoftEther VPN - has a clone-function of OpenVPN Server. - You can integrate from OpenVPN to SoftEther VPN smoothly. - SoftEther VPN is faster than OpenVPN. - SoftEther VPN also supports Microsoft SSTP VPN for Windows Vista / 7 / 8. - -Package: softether-vpnserver -Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, softether-vpncmd -Section: net -Description: VPN Server daemon - An Open-Source Free Cross-platform Multi-protocol VPN Program, as an academic project from University of Tsukuba. - SoftEther VPN ("SoftEther" means "Software Ethernet") is one of the world's most - powerful and easy-to-use multi-protocol VPN software. - It runs on Windows, Linux, Mac, FreeBSD and Solaris. - SoftEther VPN is open source. You can use SoftEther for any - personal or commercial use for free charge. - SoftEther VPN is an optimum alternative to - OpenVPN and Microsoft's VPN servers. SoftEther VPN - has a clone-function of OpenVPN Server. - You can integrate from OpenVPN to SoftEther VPN smoothly. - SoftEther VPN is faster than OpenVPN. - SoftEther VPN also supports Microsoft SSTP VPN for Windows Vista / 7 / 8. - diff --git a/debian/dch-generate.sh b/debian/dch-generate.sh deleted file mode 100755 index 285ada5f..00000000 --- a/debian/dch-generate.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -# use: ./debian/dch-generate.sh > ./debian/changelog -# desc: quick and dirty (emphasis on dirty) debian changelog generator for SoftEtherVPN -# -# Copyright (c) 2014 Sahal Ansari (github@sahal.info) -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# version 2 as published by the Free Software Foundation. - -# warning: the following file has CRLF line endings (Windows) -# the location of the following file is relative to this script -cbuild="../src/CurrentBuild.txt" - -# required for debian packaging -package="softether-vpn" -status="UNRELEASED" -# timezone in +hh:mm from UTC (+9 UTC) -tzone="+09:00" -# static changelog entry -entry="* See: http://www.softether.org/5-download/history" - -# are you a debian maintainer? -if [ -z "$DEBFULLNAME" ]; then - DEBFULLNAME="John Q. Sample" -fi -if [ -z "$DEBEMAIL" ]; then - DEBEMAIL="tamade@example.org" -fi - -# where am i located? in $DIR, of course! -DIR="$( cd "$( dirname "$0" )" && pwd )" -cd "$DIR" -# check if debian/changelog exists, check if $cbuild exists -if [ ! -e ./changelog ]; then - echo "Am I in debian/? I can't find changelog" - exit 1 -fi -if [ ! -e "$cbuild" ]; then - echo "This doesn't look like the SoftEtherVPN source tree. I can't find ""$cbuild" - exit 1 -fi - -# version and date info from $cbuild are put into array ${cbuildarray[@]} -# build "${cbuildarray[0]}", major version "${cbuildarray[1]}", -# release type "${cbuildarray[2]}", and date "${cbuildarray[3]}" -while IFS=$'\r\n' read -r line_data; do - cbuildarray[i]="${line_data##*[A-Z]\ }" - ((++i)) -done < "$cbuild" - -# "${cbuildarray[1]}" is converted from "406" to "4.06" using GNU awk -majorversion="$(echo "${cbuildarray[1]}" | awk '{sub(/[0-9]/,"&.",$0);print $0}')" - -# "${cbuildarray[3]}" is split and the second half is converted from -# from "131655" to "13:16:55" using GNU awk then it's put back together -# (like humpty dumpty) and sent to GNU date for conversion to UTC -time="$(echo "${cbuildarray[3]#*_}" | awk '{gsub(/[0-9][0-9]/,"&:",$0);print $0}')" -date="$(date -R --date="$(echo "${cbuildarray[3]%_*}"" ""${time%?}""$tzone")")" - -# print the new debian changelog -echo "$package"" (""$majorversion"".""${cbuildarray[0]}""-""${cbuildarray[2]}"") ""$status""; urgency=low" -echo -echo " ""$entry" -echo -echo " --"" ""$DEBFULLNAME"" <""$DEBEMAIL""> ""$date" - -exit 0 diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 09eda391..00000000 --- a/debian/rules +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/make -f - -define generate_stub - mkdir -p debian/usr/bin - echo '#!/bin/sh' > debian/usr/bin/$(1) - echo '/usr/libexec/softether/$(1)/$(1) "$$@"' >> debian/usr/bin/$(1) - echo 'exit $?' >> debian/usr/bin/$(1) - chmod +x debian/usr/bin/$(1) -endef - -export DH_VERBOSE=1 -export export CMAKE_INSTALL_PREFIX=../debian/usr - -%: - dh $@ - -override_dh_auto_clean: - git submodule update --init --recursive - dh_auto_clean - -override_dh_auto_configure: - cmake . - -override_dh_auto_install: - dh_auto_install - $(call generate_stub,vpnserver) - $(call generate_stub,vpnbridge) - $(call generate_stub,vpncmd) - $(call generate_stub,vpnclient) diff --git a/debian/softether-vpnbridge.install b/debian/softether-vpnbridge.install deleted file mode 100644 index 5af77616..00000000 --- a/debian/softether-vpnbridge.install +++ /dev/null @@ -1,5 +0,0 @@ -#! /usr/bin/dh-exec -debian/tmp/usr/local/libexec/softether/vpnbridge/vpnbridge usr/libexec/softether/vpnbridge/ -debian/tmp/usr/local/libexec/softether/vpnbridge/hamcore.se2 usr/libexec/softether/vpnbridge/ -debian/usr/bin/vpnbridge usr/bin/ - diff --git a/debian/softether-vpnclient.install b/debian/softether-vpnclient.install deleted file mode 100644 index b140f3cb..00000000 --- a/debian/softether-vpnclient.install +++ /dev/null @@ -1,5 +0,0 @@ -#! /usr/bin/dh-exec -debian/tmp/usr/local/libexec/softether/vpnclient/vpnclient usr/libexec/softether/vpnclient/ -debian/tmp/usr/local/libexec/softether/vpnclient/hamcore.se2 usr/libexec/softether/vpnclient/ -debian/usr/bin/vpnclient usr/bin/ - diff --git a/debian/softether-vpncmd.install b/debian/softether-vpncmd.install deleted file mode 100644 index f550a6aa..00000000 --- a/debian/softether-vpncmd.install +++ /dev/null @@ -1,4 +0,0 @@ -#! /usr/bin/dh-exec -debian/tmp/usr/local/libexec/softether/vpncmd/vpncmd usr/libexec/softether/vpncmd/ -debian/tmp/usr/local/libexec/softether/vpncmd/hamcore.se2 usr/libexec/softether/vpncmd/ -debian/tmp/usr/local/bin/vpncmd usr/bin/ diff --git a/debian/softether-vpnserver.init b/debian/softether-vpnserver.init deleted file mode 100644 index 8b815579..00000000 --- a/debian/softether-vpnserver.init +++ /dev/null @@ -1,83 +0,0 @@ -#! /bin/sh - -### BEGIN INIT INFO -# Provides: softether-vpnserver -# Required-Start: $network $remote_fs $syslog -# Required-Stop: $network $remote_fs $syslog -# Should-Start: network-manager -# Should-Stop: network-manager -# X-Start-Before: $x-display-manager gdm kdm xdm wdm ldm sdm nodm -# X-Interactive: true -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: SoftEther VPN service -### END INIT INFO - -# -# Author: Dmitry Orlov -# From Debian skeleton (Tom deLombarde) -# - -set -e - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/qmsys/bin -DAEMON=/usr/bin/vpnserver -NAME=vpnserver -DESC="SoftEtherVPN Server" - -PIDFILE=/var/run/$NAME.pid -SCRIPTNAME=/etc/init.d/$NAME - -# Gracefully exit if the package has been removed. -test -x $DAEMON || exit 0 - -# Read config file if it is present. -#if [ -r /etc/default/$NAME ] -#then -# . /etc/default/$NAME -#fi - -case "$1" in - start) - echo -n "Starting $DESC: $NAME" - $DAEMON start - echo "." - ;; - stop) - echo -n "Stopping $DESC: $NAME" - $DAEMON stop - echo "." - ;; - #reload) - # - # If the daemon can reload its config files on the fly - # for example by sending it SIGHUP, do it here. - # - # If the daemon responds to changes in its config file - # directly anyway, make this a do-nothing entry. - # - # echo -n "Reloading $DESC configuration..." - # start-stop-daemon --stop --signal 1 --quiet --pidfile \ - # $PIDFILE --exec $DAEMON - # echo "done." - #;; - restart|force-reload) - # - # If the "reload" option is implemented, move the "force-reload" - # option to the "reload" entry above. If not, "force-reload" is - # just the same as "restart". - # - echo -n "Restarting $DESC: $NAME" - $DAEMON stop - sleep 1 - $DAEMON start - echo "." - ;; - *) - # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/debian/softether-vpnserver.install b/debian/softether-vpnserver.install deleted file mode 100644 index e604360a..00000000 --- a/debian/softether-vpnserver.install +++ /dev/null @@ -1,4 +0,0 @@ -#! /usr/bin/dh-exec -debian/tmp/usr/local/libexec/softether/vpnserver/vpnserver usr/libexec/softether/vpnserver/ -debian/tmp/usr/local/libexec/softether/vpnserver/hamcore.se2 usr/libexec/softether/vpnserver/ -debian/usr/bin/vpnserver usr/bin/ From 8a064164c91d44ccf6755cedec71b66734ccd8b8 Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Thu, 9 Aug 2018 23:59:43 +0200 Subject: [PATCH 4/5] Travis: create package with CMake --- .ci/check-debian-package-version.sh | 30 ----------------------------- .travis.yml | 8 +------- 2 files changed, 1 insertion(+), 37 deletions(-) delete mode 100755 .ci/check-debian-package-version.sh diff --git a/.ci/check-debian-package-version.sh b/.ci/check-debian-package-version.sh deleted file mode 100755 index 1b38380e..00000000 --- a/.ci/check-debian-package-version.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -set -e - -while IFS=$'\n\r' read -r line || [[ -n "$line" ]]; do - echo "Text read from file: $line" - case $line in - BUILD_NUMBER\ *) - BUILD_NUMBER=${line#BUILD_NUMBER } - ;; - VERSION\ *) - VERSION=${line#VERSION } - ;; - BUILD_NAME\ *) - BUILD_NAME=${line#BUILD_NAME } - ;; - - esac -done < "src/CurrentBuild.txt" - -VERSION=${VERSION:0:1}.${VERSION:1} # Add a colon after the first character. ("501" => "5.01") - -CHANGELOG_VERSION="(0:$VERSION.$BUILD_NUMBER) $BUILD_NAME" - -IFS=$'\n\r' read -r line < "debian/changelog" -if [[ $line == *$CNANGELOG_VERSION* ]]; then - echo "debian/changelog matches src/CurrentBuild.txt" -else - echo "debian/changelog does not match src/CurrentBuild.txt" - exit 1 -fi diff --git a/.travis.yml b/.travis.yml index e7220b7c..4d712467 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,12 +20,6 @@ matrix: - env: OPENSSL_VERSION="1.1.0f" os: linux compiler: clang - - env: DESCRIPTION="check debian package version" - os: linux - before_install: - - true - script: - - .ci/check-debian-package-version.sh - os: osx compiler: clang cache: @@ -58,4 +52,4 @@ script: - ./configure - make -C tmp - ldd bin/vpnserver/vpnserver - - if [ "${BUILD_DEB}" = "1" ]; then debuild -i -us -uc -b; fi + - if [ "${BUILD_DEB}" = "1" ]; then make package -C tmp; fi From 005487c62369c3a7073c78d0eba885df41c4e16c Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Fri, 10 Aug 2018 17:06:14 +0200 Subject: [PATCH 5/5] GitLab: create package with CMake --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e0db1165..d29cf996 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,8 @@ before_script: - apt-get update && apt-get install -y debhelper devscripts fakeroot ${CMAKE} dh-exec gcc libncurses5-dev libreadline-dev libssl-dev make zlib1g-dev git script: - - debuild -i -us -uc -b + - ./configure + - make package -C tmp bionic: <<: *ubuntu_def