From 0844a8419b4dd13a0ad1f1f1d24f98f5ac54f9f7 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Thu, 12 Sep 2019 16:32:27 +0300 Subject: [PATCH 01/37] Combined extensions pull request: * Ubuntu/Debian packaging files * Fedora packaging files * FreeBSD port packaging files * Travis CI configuration * Corresponding Travis CI build scripts for Ubuntu, Fedora, FreeBSD and MacOS builds. --- .travis.yml | 316 ++++++++++++++++++++ CMakeLists.txt | 50 +++- autogen.sh | 69 +++++ build-deb | 123 ++++++++ build-rpm | 97 +++++++ ci/before-install | 93 ++++++ ci/build | 184 ++++++++++++ ci/enter | 27 ++ ci/get-container | 53 ++++ ci/get-dependencies | 184 ++++++++++++ ci/install | 451 +++++++++++++++++++++++++++++ ci/monitor | 79 +++++ ci/retry | 69 +++++ ci/run-test | 99 +++++++ ci/test | 132 +++++++++ clean-deb | 37 +++ debian/changelog | 5 + debian/compat | 1 + debian/control | 48 +++ debian/copyright | 35 +++ debian/libusrsctp-dev.examples | 1 + debian/libusrsctp-dev.install | 3 + debian/libusrsctp-examples.install | 22 ++ debian/libusrsctp1.install | 1 + debian/rules | 6 + debian/source/format | 1 + debian/tests/control | 1 + debian/upstream/metadata | 7 + debian/upstream/signing-key.asc | 405 ++++++++++++++++++++++++++ debian/watch | 3 + filter-empty-entries | 60 ++++ freebsd/libusrsctp/distinfo | 3 + freebsd/libusrsctp/pkg-descr | 3 + freebsd/libusrsctp/pkg-plist | 5 + freebsd/libusrsctp/test-packaging | 74 +++++ make-deb | 348 ++++++++++++++++++++++ make-ppa | 130 +++++++++ make-srpm | 120 ++++++++ make-upstream-package | 103 +++++++ meson.build | 240 --------------- packaging.conf | 10 + programs/CMakeLists.txt | 4 + rpm/libusrsctp.spec | 86 ++++++ usrsctplib/CMakeLists.txt | 3 +- 44 files changed, 3547 insertions(+), 244 deletions(-) create mode 100644 .travis.yml create mode 100755 autogen.sh create mode 100755 build-deb create mode 100755 build-rpm create mode 100755 ci/before-install create mode 100755 ci/build create mode 100755 ci/enter create mode 100755 ci/get-container create mode 100755 ci/get-dependencies create mode 100755 ci/install create mode 100755 ci/monitor create mode 100755 ci/retry create mode 100755 ci/run-test create mode 100755 ci/test create mode 100755 clean-deb create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/libusrsctp-dev.examples create mode 100644 debian/libusrsctp-dev.install create mode 100644 debian/libusrsctp-examples.install create mode 100644 debian/libusrsctp1.install create mode 100644 debian/rules create mode 100644 debian/source/format create mode 100644 debian/tests/control create mode 100644 debian/upstream/metadata create mode 100644 debian/upstream/signing-key.asc create mode 100644 debian/watch create mode 100755 filter-empty-entries create mode 100644 freebsd/libusrsctp/distinfo create mode 100644 freebsd/libusrsctp/pkg-descr create mode 100644 freebsd/libusrsctp/pkg-plist create mode 100755 freebsd/libusrsctp/test-packaging create mode 100755 make-deb create mode 100755 make-ppa create mode 100755 make-srpm create mode 100755 make-upstream-package delete mode 100644 meson.build create mode 100644 packaging.conf create mode 100644 rpm/libusrsctp.spec diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..1e6997449 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,316 @@ +language: c +sudo: required +cache: + directories: + - /var/cache/apt/ + - /var/cache/pbuilder/aptcache/ + + +matrix: + include: + + # ###### Ubuntu Linux #################################################### + + # ====== Ubuntu 19.10 (Eoan Ermine) ====================================== + - name: "Ubuntu 19.10 (Eoan Ermine) with GCC" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="ubuntu:eoan" VARIANT="ubuntu" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + - name: "Ubuntu 19.10 (Eoan Ermine) with Clang" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="ubuntu:eoan" VARIANT="ubuntu" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "Ubuntu 19.10 (Eoan Ermine) packaging with pbuilder" + dist: bionic + group: travis_latest + env: DOCKER="ubuntu:eoan" VARIANT="ubuntu" TOOL="pbuilder" + + # ====== Ubuntu 19.04 (Disco Dingo) ====================================== + - name: "Ubuntu 19.04 (Disco Dingo) with GCC" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="ubuntu:disco" VARIANT="ubuntu" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + - name: "Ubuntu 19.04 (Disco Dingo) with Clang" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="ubuntu:disco" VARIANT="ubuntu" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "Ubuntu 19.04 (Disco Dingo) packaging with pbuilder" + dist: bionic + group: travis_latest + env: DOCKER="ubuntu:disco" VARIANT="ubuntu" TOOL="pbuilder" + + # ====== Ubuntu 18.04 (Bionic Beaver) ==================================== + - name: "Ubuntu 18.04 (Bionic Beaver) with GCC" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="ubuntu:bionic" VARIANT="ubuntu" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + - name: "Ubuntu 18.04 (Bionic Beaver) with Clang" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="ubuntu:bionic" VARIANT="ubuntu" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "Ubuntu 18.04 (Bionic Beaver) packaging with pbuilder" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="ubuntu:bionic" VARIANT="ubuntu" TOOL="pbuilder" + + # ====== Ubuntu 16.04 (Xenial Xerus) ===================================== + - name: "Ubuntu 16.04 (Xenial Xerus) with GCC" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="ubuntu:xenial" VARIANT="ubuntu" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + - name: "Ubuntu 16.04 (Xenial Xerus) with Clang" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="ubuntu:xenial" VARIANT="ubuntu" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "Ubuntu 16.04 (Xenial Xerus) packaging with pbuilder" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="ubuntu:xenial" VARIANT="ubuntu" TOOL="pbuilder" + + # ====== Ubuntu 14.04 (Trusty Tahr) ====================================== + - name: "Ubuntu 14.04 (Trusty Tahr) with GCC" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="ubuntu:trusty" VARIANT="ubuntu" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + - name: "Ubuntu 14.04 (Trusty Tahr) with Clang" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="ubuntu:trusty" VARIANT="ubuntu" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "Ubuntu 14.04 (Trusty Tahr) packaging with pbuilder" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="ubuntu:trusty" VARIANT="ubuntu" TOOL="pbuilder" + + + # ###### Debian Linux ################################################### + + # ====== Debian Testing ================================================= + - name: "Debian Testing with GCC" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="debian:testing" VARIANT="debian" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + - name: "Debian Testing with Clang" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="debian:testing" VARIANT="debian" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "Debian Testing packaging with pbuilder" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="debian:testing" VARIANT="debian" TOOL="pbuilder" + + # ====== Debian Sid ====================================================== + - name: "Debian Sid with GCC" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="debian:sid" VARIANT="debian" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + - name: "Debian Sid with Clang" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="debian:sid" VARIANT="debian" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "Debian Sid packaging with pbuilder" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="debian:sid" VARIANT="debian" TOOL="pbuilder" + + # ====== Debian Buster =================================================== + - name: "Debian Buster with GCC" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="debian:buster" VARIANT="debian" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + - name: "Debian Buster with Clang" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="debian:buster" VARIANT="debian" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "Debian Buster packaging with pbuilder" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="debian:buster" VARIANT="debian" TOOL="pbuilder" + + # ====== Debian Stretch ================================================== + - name: "Debian Stretch with GCC" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="debian:stretch" VARIANT="debian" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + - name: "Debian Stretch with Clang" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="debian:stretch" VARIANT="debian" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "Debian Stretch packaging with pbuilder" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="debian:stretch" VARIANT="debian" TOOL="pbuilder" + + + # ###### FreeBSD ######################################################### + + # ====== FreeBSD 12.0-RELEASE ============================================ + - name: "FreeBSD 12.0-RELEASE with Clang" + os: linux + dist: bionic + group: travis_latest + env: QEMU="FreeBSD" VARIANT="12.0-RELEASE" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "FreeBSD 12.0-RELEASE with GCC" + os: linux + dist: bionic + group: travis_latest + env: QEMU="FreeBSD" VARIANT="12.0-RELEASE" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + + # ====== FreeBSD 11.3-RELEASE ============================================ + - name: "FreeBSD 11.3-RELEASE with Clang" + os: linux + dist: bionic + group: travis_latest + env: QEMU="FreeBSD" VARIANT="11.3-RELEASE" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "FreeBSD 11.3-RELEASE with GCC" + os: linux + dist: bionic + group: travis_latest + env: QEMU="FreeBSD" VARIANT="11.3-RELEASE" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + + # ====== FreeBSD 11.2-RELEASE ============================================ + - name: "FreeBSD 11.2-RELEASE with Clang" + os: linux + dist: bionic + group: travis_latest + env: QEMU="FreeBSD" VARIANT="11.2-RELEASE" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "FreeBSD 11.2-RELEASE with GCC" + os: linux + dist: bionic + group: travis_latest + env: QEMU="FreeBSD" VARIANT="11.2-RELEASE" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + + + # ###### Fedora Linux #################################################### + + ## ====== Fedora 31 ======================================================= + #- name: "Fedora 31 with GCC" + #os: linux + #dist: bionic + #group: travis_latest + #env: DOCKER="fedora:31" VARIANT="fedora" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + #- name: "Fedora 31 with Clang" + #os: linux + #dist: bionic + #group: travis_latest + #env: DOCKER="fedora:31" VARIANT="fedora" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + #- name: "Fedora 31 packaging with mock" + #os: linux + #dist: bionic + #group: travis_latest + #env: DOCKER="fedora:31" VARIANT="fedora" TOOL="mock" + + # ====== Fedora 30 ======================================================= + - name: "Fedora 30 with GCC" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="fedora:30" VARIANT="fedora" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + - name: "Fedora 30 with Clang" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="fedora:30" VARIANT="fedora" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "Fedora 30 packaging with mock" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="fedora:30" VARIANT="fedora" TOOL="mock" + + # ====== Fedora 29 ======================================================= + - name: "Fedora 29 with GCC" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="fedora:29" VARIANT="fedora" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + - name: "Fedora 29 with Clang" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="fedora:29" VARIANT="fedora" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "Fedora 29 packaging with mock" + os: linux + dist: bionic + group: travis_latest + env: DOCKER="fedora:29" VARIANT="fedora" TOOL="mock" + + # ====== Fedora Rawhide ================================================== + # - name: "Fedora Rawhide with GCC" + # os: linux + # dist: bionic + # group: travis_latest + # env: DOCKER="fedora:rawhide" VARIANT="fedora" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + # - name: "Fedora Rawhide with Clang" + # os: linux + # dist: bionic + # group: travis_latest + # env: DOCKER="fedora:rawhide" VARIANT="fedora" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + # - name: "Fedora Rawhide packaging with mock" + # os: linux + # dist: bionic + # group: travis_latest + # env: DOCKER="fedora:rawhide" VARIANT="fedora" TOOL="mock" + + + # ###### Other ########################################################### + + # ====== MacOS X ========================================================= + - name: "MacOS 10.14 with Xcode 11" + os: osx + osx_image: xcode11 + compiler: clang + group: travis_latest + - name: "MacOS 10.13 with Xcode 10" + os: osx + osx_image: xcode10 + compiler: clang + group: travis_latest + - name: "MacOS 10.12 with Xcode 9" + os: osx + osx_image: xcode9 + compiler: clang + group: travis_latest + - name: "MacOS 10.11 with Xcode 8" + os: osx + osx_image: xcode8 + compiler: clang + group: travis_latest + + +before_install: + - | + ci/before-install + + +install: + - | + ci/install + + +script: + - | + ci/build diff --git a/CMakeLists.txt b/CMakeLists.txt index dfc2fb6ef..b0659ea8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,8 +29,34 @@ # SUCH DAMAGE. # -project(usrsctplib C) -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 3.0.2) +project(libusrsctp C) + +SET(BUILD_MAJOR "1") +SET(BUILD_MINOR "0") +SET(BUILD_PATCH "0~td128") +set(BUILD_VERSION ${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_PATCH}) + + +# INSTALLATION_DIRECTORIES +################################################# + +# See: https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html +INCLUDE(GNUInstallDirs) + + +# TARBALL +################################################# + +set(CPACK_SOURCE_GENERATOR "TGZ") +set(CPACK_SOURCE_PACKAGE_FILE_NAME + "${CMAKE_PROJECT_NAME}-${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_PATCH}") +set(CPACK_SOURCE_IGNORE_FILES + "${PROJECT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}-*;${PROJECT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}_*;/build/;/.git/;/CMakeFiles/;CMakeCache.txt$;.cmake$;.tar.gz$;/_CPack_Packages;/Makefile$;~$;/build-deb;/clean-deb;/filter-empty-entries;/make-symbols;/make-ppa;/make-deb;/debian.conf;/make-rpm;/rpm.conf;${CPACK_SOURCE_IGNORE_FILES}") +message("CPACK_SOURCE_IGNORE_FILES = ${CPACK_SOURCE_IGNORE_FILES}") +include(CPack) + +add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} clean package_source) # Debug build type as default if (NOT CMAKE_BUILD_TYPE) @@ -168,6 +194,18 @@ endif () if (CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "AppleClang" OR CMAKE_C_COMPILER_ID MATCHES "GNU") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -pedantic -Wall -Wextra") + # Necessary for Fedora >= 30 and Ubuntu >= 19.10 builds: + check_c_compiler_flag(-Waddress-of-packed-member has_address_of_packed_member) + if (has_address_of_packed_member) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-address-of-packed-member") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-address-of-packed-member") + endif() + check_c_compiler_flag(-Wsign-compare has_no_sign_compare) + if (has_no_sign_compare) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-sign-compare") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare") + endif() + check_c_compiler_flag(-Wfloat-equal has_wfloat_equal) if (has_wfloat_equal) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wfloat-equal") @@ -264,6 +302,14 @@ message(STATUS "Compiler flags (CMAKE_C_FLAGS): ${CMAKE_C_FLAGS}") # INCLUDE SUBDIRS ################################################# +# Enable verbose output in DEBUG mode +if (${CMAKE_BUILD_TYPE} MATCHES "DEBUG") + message(STATUS "enabling verbose outout") + set(CMAKE_VERBOSE_MAKEFILE on) +endif() + +find_package(Threads REQUIRED) + add_subdirectory(usrsctplib) if (sctp_build_programs) diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 000000000..6fa09bfd2 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +# +# Build Scripts +# Copyright (C) 2002-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + + +CMAKE_OPTIONS="" +while [ $# -gt 0 ] ; do + if [[ "$1" =~ ^(-|--)use-clang$ ]] ; then + # Use these settings for CLang: + export CXX=clang++ + export CC=clang + elif [[ "$1" =~ ^(-|--)use-gcc$ ]] ; then + # Use these settings for GCC: + export CXX=g++ + export CC=gcc + elif [[ "$1" =~ ^(-|--)debug$ ]] ; then + # Enable debugging build: + CMAKE_OPTIONS="$CMAKE_OPTIONS -DCMAKE_BUILD_TYPE=DEBUG" + elif [[ "$1" =~ ^(-|--)verbose$ ]] ; then + # Enable verbose Makefile: + CMAKE_OPTIONS="$CMAKE_OPTIONS -DCMAKE_VERBOSE_MAKEFILE=ON" + elif [ "$1" == "--" ] ; then + break + else + echo >&2 "Usage: autogen.sh [--use-clang|--use-gcc] [--debug] [--verbose]" + exit 1 + fi + shift +done + + +# ====== Configure with CMake =============================================== +rm -f CMakeCache.txt +echo "CMake options:${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=/usr $@ ." +cmake ${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=/usr $@ . + +# ------ Obtain number of cores --------------------------------------------- +# Try Linux +cores=`getconf _NPROCESSORS_ONLN 2>/dev/null || true` +if [ "${cores}" == "" ] ; then + # Try FreeBSD + cores=`sysctl -a | grep 'hw.ncpu' | cut -d ':' -f2 | tr -d ' ' || true` +fi +if [ "${cores}" == "" ] ; then + cores="1" +fi +echo "This system has ${cores} cores!" + +# ====== Build ============================================================== +make -j${cores} diff --git a/build-deb b/build-deb new file mode 100755 index 000000000..f098e8127 --- /dev/null +++ b/build-deb @@ -0,0 +1,123 @@ +#!/usr/bin/env bash +# +# Debian Packaging Scripts +# Copyright (C) 2002-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + + +# ====== Obtain package and version information ============================= +OVERRIDE_PACKAGE_DISTRIBUTION="$1" + +CHANGELOG_HEADER="`head -n1 debian/changelog`" + +# The package name, e.g. MyApplication +PACKAGE=`echo ${CHANGELOG_HEADER} | sed -e "s/(.*//" -e "s/ //g"` +# The package distribution, e.g. precise, raring, ... +PACKAGE_DISTRIBUTION=`echo ${CHANGELOG_HEADER} | sed -e "s/[^)]*)//" -e "s/;.*//g" -e "s/ //g"` +# The package's version, e.g. 1.2.3-1ubuntu1 +PACKAGE_VERSION=`echo ${CHANGELOG_HEADER} | sed -e "s/.*(//" -e "s/).*//" -e "s/ //g" -e "s/ //g" -e "s/^[0-9]://g"` +# The package's output version, e.g. 1.2.3-1ubuntu +OUTPUT_VERSION=`echo ${PACKAGE_VERSION} | sed -e "s/\(ubuntu\|ppa\)[0-9]*$/\1/"` +# The package's Debian version, e.g. 1.2.3-1 +DEBIAN_VERSION=`echo ${OUTPUT_VERSION} | sed -e "s/\(ubuntu\|ppa\)$//1"` +# The package's upstream version, e.g. 1.2.3 +UPSTREAM_VERSION=`echo ${DEBIAN_VERSION} | sed -e "s/-[0-9]*$//"` +# The package's plain upstream version, e.g. 1.2.3 (without e.g. ~svn) +PLAIN_VERSION=`echo ${UPSTREAM_VERSION} | sed -e "s/\([0-9\.]*\)[-+~].*$/\1/"` + + +echo -e "\x1b[34m######################################################################\x1b[0m" +echo -e "\x1b[34mCHANGELOG_HEADER: ${CHANGELOG_HEADER}\x1b[0m" +echo -e "\x1b[34mPACKAGE: ${PACKAGE}\x1b[0m" +echo -e "\x1b[34mPACKAGE_DISTRIBUTION: ${PACKAGE_DISTRIBUTION}\x1b[0m" +echo -e "\x1b[34mPACKAGE_VERSION ${PACKAGE_VERSION}\x1b[0m" +echo -e "\x1b[34mOUTPUT_VERSION: ${OUTPUT_VERSION}\x1b[0m" +echo -e "\x1b[34mDEBIAN_VERSION: ${DEBIAN_VERSION}\x1b[0m" +echo -e "\x1b[34mUPSTREAM_VERSION: ${UPSTREAM_VERSION}\x1b[0m" +echo -e "\x1b[34mPLAIN_VERSION: ${PLAIN_VERSION}\x1b[0m" +echo -e "\x1b[34m######################################################################\x1b[0m" + +if [ ! -e ./packaging.conf ] ; then + echo >&2 "ERROR: packaging.conf does not exist -> no configuration for the new package!" + exit 1 +fi +. ./packaging.conf + +if [ "${OVERRIDE_PACKAGE_DISTRIBUTION}" != "" ] ; then + PACKAGE_DISTRIBUTION="${OVERRIDE_PACKAGE_DISTRIBUTION}" + echo "" + echo -e "\x1b[34m**** Overriding PACKAGE_DISTRIBUTION: PACKAGE_DISTRIBUTION=${PACKAGE_DISTRIBUTION}! ****\x1b[0m" + echo "" +fi + + +# ====== Create source package ============================================== +sudo echo "" +./clean-deb +./make-deb ${PACKAGE_DISTRIBUTION} + +if [ "${PACKAGE_DISTRIBUTION}" == "unstable" -o \ + "${PACKAGE_DISTRIBUTION}" == "testing" -o \ + "${PACKAGE_DISTRIBUTION}" == "stable" -o \ + "${PACKAGE_DISTRIBUTION}" == "default" ] ; then + if [ "${PACKAGE_DISTRIBUTION}" == "default" ] ; then + version=${PACKAGE_VERSION} + else + version=${DEBIAN_VERSION} + fi + changesFilesPattern="${PACKAGE}_${version}_*.changes" + dscFile=`ls ${PACKAGE}_${version}.dsc | tail -n1` +else + changesFilesPattern="${PACKAGE}_${PACKAGE_VERSION}~${PACKAGE_DISTRIBUTION}[0-9]~ppa[0-9]_*.changes" + dscFile=`ls ${PACKAGE}_${PACKAGE_VERSION}~${PACKAGE_DISTRIBUTION}[0-9]~ppa[0-9].dsc | tail -n1` +fi + + +# ====== Build binary package =============================================== +echo -e "" +echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Building binary package ========================================\x1b[0m" +echo -e "" + +if [ ! -e "${dscFile}" ] ; then + echo >&2 "ERROR: Unable to find description file ${dscFile}!" + exit 1 +fi +sudo pbuilder build ${dscFile} + + +# ====== Run lintian ======================================================== +echo -e "" +echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Running lintian ================================================\x1b[0m" +echo -e "" + +changesFile=`find /var/cache/pbuilder/result/ -name "${changesFilesPattern}"` +if [ ! -e "${changesFile}" ] ; then + echo >&2 "ERROR: Unable to find changes file ${changesFile}!" + exit 1 +fi + +profile="ubuntu" +if [ "${PACKAGE_DISTRIBUTION}" == "unstable" -o \ + "${PACKAGE_DISTRIBUTION}" == "testing" -o \ + "${PACKAGE_DISTRIBUTION}" == "stable" ] ; then + profile="debian" +fi +echo "Calling: lintian -iIEv --pedantic --profile ${profile} ${changesFile}" +lintian -iIEv --pedantic --profile ${profile} ${changesFile} || true diff --git a/build-rpm b/build-rpm new file mode 100755 index 000000000..c062b8ecb --- /dev/null +++ b/build-rpm @@ -0,0 +1,97 @@ +#!/usr/bin/env bash +# +# Packaging Scripts +# Copyright (C) 2017-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + + +# --------------------------------------------------------------------------- +# USAGE: +# ./make-rpm => Use current distribution and architecture +# ./make-rpm fedora-30-x86_64 => F30, amd64 +# ./make-rpm fedora-rawhide-i386 => F30, i386 +# ... +# --------------------------------------------------------------------------- + + +DISTRIBUTIONS=`\ +( \ +while [ x$1 != "x" ] ; do \ + echo $1 + shift +done \ +) | sort -u` +if [ "${DISTRIBUTIONS}" == "" ] ; then + release=`cat /etc/fedora-release | sed -e "s/^\(.*\) release \([0-9]*\) (\(.*\))$/\2/g"` + arch=`uname -m` + + DISTRIBUTIONS="fedora-${release}-${arch}" +fi + +PACKAGE=`grep "^Name:" rpm/*.spec | head -n1 | sed -e "s/Name://g" -e "s/[ \t]*//g"` +PACKAGE_VERSION=`grep "^Version:" rpm/*.spec | head -n1 | sed -e "s/Version://g" -e "s/[ \t]*//g"` + +echo -e "\x1b[34m###########################################\x1b[0m" +echo -e "\x1b[34mPACKAGE: ${PACKAGE}\x1b[0m" +echo -e "\x1b[34mPACKAGE_VERSION: ${PACKAGE_VERSION}\x1b[0m" +echo -e "\x1b[34m###########################################\x1b[0m" + + +# ====== Create source RPM ================================================== +./make-srpm + +PACKAGE_SRPM=`find $HOME/rpmbuild/SRPMS/ -name "${PACKAGE}-*-*.src.rpm"` +if [ ! -e "${PACKAGE_SRPM}" ] ; then + echo >&2 "ERROR: Cannot find SRPM ${PACKAGE}-*-*.src.rpm in $HOME/rpmbuild/SRPMS!" + exit 1 +fi + + +# ====== Build binary RPMs ================================================== +# Create binary RPMs +for DISTRIBUTION in ${DISTRIBUTIONS} ; do + echo -e "" + echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Creating binary RPM for ${DISTRIBUTION} ==========\x1b[0m" + echo -e "" + + # NOTE: DISTRIBUTION may point to another directory (e.g. "rawhide" instead of "30")! + if [ ! -e "/etc/mock/${DISTRIBUTION}.cfg" ] ; then + echo >&2 "ERROR: Cannot find /etc/mock/${DISTRIBUTION}.cfg!" + exit 1 + fi + distribution=`grep "config_opts..root.. =" /etc/mock/${DISTRIBUTION}.cfg | sed -e "s/^.* = //g" -e "s/'//g"` + + # Remove old files + find /var/lib/mock/${DISTRIBUTION}/result -name "${PACKAGE}-*.rpm" | xargs --no-run-if-empty rm -f + + # Build the binary RPM + # NOTE: using old chroot instead of container, to allow running it inside a container! + mock -r ${DISTRIBUTION} --old-chroot --init + mock -r ${DISTRIBUTION} --old-chroot --installdeps ${PACKAGE_SRPM} + mock -r ${DISTRIBUTION} --old-chroot --install openssl pesign + mock -r ${DISTRIBUTION} --old-chroot --no-clean --rebuild ${PACKAGE_SRPM} + + # Check whether files are at the right location + PACKAGE_RPMS=`find /var/lib/mock/${distribution}/result -name "${PACKAGE}-*-*.rpm" | grep -v "${PACKAGE}-*-*.src.rpm" || true` + if [ "${PACKAGE_RPMS}" == "" ] ; then + echo >&2 "ERROR: Cannot find RPMs!" + exit 1 + fi +done diff --git a/ci/before-install b/ci/before-install new file mode 100755 index 000000000..b1aa2b4c1 --- /dev/null +++ b/ci/before-install @@ -0,0 +1,93 @@ +#!/usr/bin/env bash +# +# Travis CI Scripts +# Copyright (C) 2018-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + + +. `dirname $0`/get-container + + +# ###### Linux as-is ######################################################## +if [ "${TRAVIS_OS_NAME}" == "linux" -a "${DOCKER}" == "" -a "${QEMU}" == "" ] ; then + + # Nothing to be done here. + true + + +# ###### Linux via Docker ################################################### +elif [ "${TRAVIS_OS_NAME}" == "linux" -a "${DOCKER}" != "" -a "${QEMU}" == "" ] ; then + + # NOTE: Using tmpfs for pbuilder and mock! + # The build machine therefore needs a sufficient amount of RAM! + sudo docker rm -f ${CONTAINER} || true + sudo docker run -d \ + --name ${CONTAINER} \ + --tmpfs /var/cache/pbuilder:rw,exec,dev,size=4g \ + --tmpfs /var/lib/mock:rw,exec,dev,size=4g \ + --cap-add=SYS_ADMIN --cap-add=NET_ADMIN \ + --security-opt apparmor:unconfined \ + -v $(pwd):/travis -w /travis \ + $DOCKER tail -f /dev/null + sudo docker ps + + +# ###### FreeBSD via QEMU ################################################### +elif [ "${TRAVIS_OS_NAME}" == "linux" -a "${QEMU}" == "FreeBSD" ] ; then + if [ "${VARIANT}" != "" ] ; then + + sudo mkdir -p /vservers/qemu-freebsd + sudo chown $USER:$USER /vservers/qemu-freebsd + mkdir -p /vservers/qemu-freebsd/mnt + cd /vservers/qemu-freebsd + + # ====== Download image ============================================ + imageName="FreeBSD-${VARIANT}-amd64.raw" + if [ -e ${imageName}.xz -a ! -e ${imageName} ] ; then + echo "Extracting existing ${imageName}.xz ..." + xz -T0 -dk ${imageName}.xz + elif [ ! -e ${imageName}.xz -o ! -e ${imageName} ] ; then + imageURL="https://download.freebsd.org/ftp/releases/VM-IMAGES/${VARIANT}/amd64/Latest/${imageName}.xz" + echo "Downloading FreeBSD VM image from ${imageURL} ..." + curl "${imageURL}" | tee ${imageName}.xz.tmp | xz -T0 -d - >${imageName} + mv ${imageName}.xz.tmp ${imageName}.xz + fi + + # ====== Download fuse-ufs2 ======================================== + if [ ! -d fuse-ufs2/ ] ; then + echo "Downloading fuse-ufs2 ..." + git clone https://github.com/dreibh/fuse-ufs2 -b dreibh/ubuntu-disco-fix + # git clone https://github.com/mkatiyar/fuse-ufs2 + fi + fi + + +# ###### MacOS X ############################################################ +elif [ "${TRAVIS_OS_NAME}" == "osx" ] ; then + + # Nothing to be done here. + true + + +# ###### Error ############################################################## +else + echo >&2 "ERROR: Invalid setting of TRAVIS_OS_NAME=${TRAVIS_OS_NAME}, DOCKER=${DOCKER}, QEMU=${QEMU}!" + exit 1 +fi diff --git a/ci/build b/ci/build new file mode 100755 index 000000000..59d99f472 --- /dev/null +++ b/ci/build @@ -0,0 +1,184 @@ +#!/usr/bin/env bash +# +# Travis CI Scripts +# Copyright (C) 2018-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + + +. `dirname $0`/get-container + + +# ###### Linux as-is ######################################################## +if [ "${TRAVIS_OS_NAME}" == "linux" -a "${DOCKER}" == "" -a "${QEMU}" == "" ] ; then + # ====== Configure with CMake ============================================ + if [ -e CMakeLists.txt ] ; then + env CC=${COMPILER_C} CXX=${COMPILER_CXX} cmake . $@ + + # ====== Configure with autoconf/automake (via bootstrap script) ========= + elif [ -e configure.ac -o -e configure.in ] ; then + if [ -e bootstrap ] ; then + env CC=${COMPILER_C} CXX=${COMPILER_CXX} ./bootstrap + env CC=${COMPILER_C} CXX=${COMPILER_CXX} ./configure $@ + elif [ -e autogen.sh ] ; then + env CC=${COMPILER_C} CXX=${COMPILER_CXX} ./autogen.sh + else + env CC=${COMPILER_C} CXX=${COMPILER_CXX} ./configure $@ + fi + else + echo >&2 "WARNING: No build system detected. Trying to just call \"make\" ..." + fi + cores=`getconf _NPROCESSORS_ONLN 2>/dev/null || true` + if [ $cores -gt 1 ] ; then + MAKEFLAGS="-j${cores}" + fi + + # ====== Compile ====================================================== + if [ "${TOOL}" == "compile" ] ; then + env MAKEFLAGS=${MAKEFLAGS} make # VERBOSE=1 + + # ====== Coverity Scan ================================================ + elif [ "${TOOL}" == "coverity" ] ; then + # ------ Build ----------------------------------------------------- + cd coverity + export PATH="coverity/$(ls -d cov*)/bin:$PATH" + cd .. + + env MAKEFLAGS=${MAKEFLAGS} cov-build --dir cov-int make + tar czf coverity-results.tar.gz cov-int + ls -l coverity-results.tar.gz + + # ------ Upload results -------------------------------------------- + if [ "${TRAVIS_BRANCH}" == "${COVERITY_SCAN_BRANCH}" ] ; then + curl --form token=${COVERITY_SCAN_TOKEN} \ + --form email=${COVERITY_SCAN_NOTIFICATION_EMAIL} \ + --form file=@coverity-results.tar.gz \ + --form version="master branch head" \ + --form description="$(git log -1|head -1)" \ + https://scan.coverity.com/builds?project=${COVERITY_PROJECT} + CURL_RESULT=$? + echo "curl returned ${CURL_RESULT}" + if [ $CURL_RESULT -ne 0 ]; then + echo >&2 "ERROR: Upload to Coverity Scan failed; curl returned ${CURL_RESULT}!" + exit 1 + fi + else + echo >&2 "###### NOTE: This branch \"${TRAVIS_BRANCH}\" is not the scan branch \"${COVERITY_SCAN_BRANCH}\"! Skipping upload! ######" + fi + + # ====== Invalid setting ================================================= + else + echo >&2 "ERROR: Invalid setting of TOOL=${TOOL}!" + exit 1 + fi + + +# ###### FreeBSD via QEMU ################################################### +elif [ "${TRAVIS_OS_NAME}" == "linux" -a "${QEMU}" == "FreeBSD" ] ; then + + ssh -p 8829 -oStrictHostKeyChecking=no -i ~/.ssh/id_rsa root@localhost <&2 "WARNING: No build system detected. Trying to just call \"make\" ..." + fi + + cores=\`sysctl -a | grep 'hw.ncpu' | cut -d ':' -f2 | tr -d ' '\` + if [ \${cores} -gt 1 ] ; then + MAKEFLAGS="-j\${cores}" + fi + echo "Running: env MAKEFLAGS=\${MAKEFLAGS} make" + env MAKEFLAGS=\${MAKEFLAGS} make || exit 1 + + echo "Done!" + exit 0 +EOF + + +# ###### Linux via Docker ################################################### +elif [ "${TRAVIS_OS_NAME}" == "linux" -a "${DOCKER}" != "" -a "${QEMU}" == "" ] ; then + + # ====== Compile (generic) =============================================== + if [ "${TOOL}" == "compile" ] ; then + echo "###### Compiling ... ##################################################" + + if [ -e CMakeLists.txt ] ; then + sudo docker exec ${CONTAINER} env LANG=C.UTF CC=${COMPILER_C} CXX=${COMPILER_CXX} cmake . $@ + elif [ -e configure.ac -o -e configure.in ] ; then + if [ -e bootstrap ] ; then + sudo docker exec ${CONTAINER} env LANG=C.UTF CC=${COMPILER_C} CXX=${COMPILER_CXX} ./bootstrap + sudo docker exec ${CONTAINER} env LANG=C.UTF CC=${COMPILER_C} CXX=${COMPILER_CXX} ./configure $@ + elif [ -e autogen.sh ] ; then + sudo docker exec ${CONTAINER} env LANG=C.UTF CC=${COMPILER_C} CXX=${COMPILER_CXX} ./autogen.sh + else + sudo docker exec ${CONTAINER} env LANG=C.UTF CC=${COMPILER_C} CXX=${COMPILER_CXX} ./configure $@ + fi + else + echo >&2 "WARNING: No build system detected. Trying to just call \"make\" ..." + fi + + cores=`sudo docker exec ${CONTAINER} env LANG=C.UTF-8 getconf _NPROCESSORS_ONLN 2>/dev/null || true` + if [ $cores -gt 1 ] ; then + MAKEFLAGS="-j${cores}" + fi + sudo docker exec ${CONTAINER} env LANG=C.UTF-8 MAKEFLAGS=${MAKEFLAGS} make # VERBOSE=1 + + # ====== pbuilder (Debian/Ubuntu variants) =============================== + elif [ "${TOOL}" == "pbuilder" ] ; then + echo "###### Running pbuilder ... ###########################################" + ci/monitor 60 sudo docker exec ${CONTAINER} env LANG=C.UTF-8 OVERRIDE_SKIP_PACKAGE_SIGNING=1 eatmydata ./build-deb + + # ====== mock (Fedora variants) ========================================== + elif [ "${TOOL}" == "mock" ] ; then + echo "###### Running mock ... ###############################################" + release=`sudo docker exec -t ${CONTAINER} bash -c "LANG=C.UTF-8 ; cat /etc/fedora-release | sed -e \"s/^\(.*\) release \([0-9]*\) (\(.*\))$/\2/g\"" | sed -e "s/[^0-9]//g"` + arch=`sudo docker exec -t ${CONTAINER} env LANG=C.UTF-8 uname -m | sed -e "s/[^0-9a-zA-Z_+-]//g"` + ci/monitor 60 sudo docker exec ${CONTAINER} env LANG=C.UTF-8 LD_PRELOAD=/usr/lib64/nosync/nosync.so OVERRIDE_SKIP_PACKAGE_SIGNING=1 ./build-rpm fedora-${release}-${arch} + + # ====== Invalid setting ================================================= + else + echo >&2 "ERROR: Invalid setting of TOOL=${TOOL}!" + exit 1 + fi + + +# ###### MacOS X ############################################################ +elif [ "${TRAVIS_OS_NAME}" == "osx" ] ; then + + cmake . $@ + make VERBOSE=1 + + +# ###### Error ############################################################## +else + echo >&2 "ERROR: Invalid setting of TRAVIS_OS_NAME=${TRAVIS_OS_NAME}, DOCKER=${DOCKER}, QEMU=${QEMU}!" + exit 1 +fi diff --git a/ci/enter b/ci/enter new file mode 100755 index 000000000..3056e5938 --- /dev/null +++ b/ci/enter @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +# +# Travis CI Scripts +# Copyright (C) 2018-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + + +. `dirname $0`/get-container +sudo docker exec -it ${CONTAINER} env LANG=C.UTF-8 /bin/bash +exit 1 diff --git a/ci/get-container b/ci/get-container new file mode 100755 index 000000000..5e64d8090 --- /dev/null +++ b/ci/get-container @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +# +# Travis CI Scripts +# Copyright (C) 2018-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + + +if [ "${DOCKER}" != "" ] ; then + # ====== Check configuration ============================================= + if [ "${VARIANT}" == "" ] ; then + echo >&2 "ERROR: VARIANT is not set!" + exit 1 + fi + if [ "${TOOL}" == "" ] ; then + echo >&2 "ERROR: TOOL is not set!" + exit 1 + fi + + + # ====== Get name of package ============================================= + CHANGELOG_HEADER="`head -n1 debian/changelog`" + PACKAGE=`echo ${CHANGELOG_HEADER} | sed -e "s/(.*//" -e "s/ //g"` + + + # ====== Set container name ============================================== + CONTAINER=`echo "${PACKAGE}-${DOCKER}-${TOOL}" | sed -e "s/:/_/g"` + if [ "${COMPILER_C}" != "" ] ; then + CONTAINER="${CONTAINER}-${COMPILER_C}" + fi + export CONTAINER + + # echo "###### Using container ${CONTAINER} ######" + +else + export CONTAINER="" # Not using docker -> no container! +fi diff --git a/ci/get-dependencies b/ci/get-dependencies new file mode 100755 index 000000000..303e7eb94 --- /dev/null +++ b/ci/get-dependencies @@ -0,0 +1,184 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Travis CI Scripts +# Copyright (C) 2018-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + + +import glob +import os +import re +import subprocess +import sys + + +# ###### Write dependency ################################################### +dep = re.compile(r'^([a-zA-Z0-9-+\.]+)[\s]*(|\|.*|\(.*)[\s]*$') + +def extractDependencies(line, system): + dependencies = [] + + # Remove "build-depends:", etc.: + m = re.match(r'^(.*:[ \t]*)([a-zA-Z0-9-+]*)(.*)$', line) + if m != None: + line = m.group(2) + line = line.strip() + + # Split into segments + for l in line.split(','): + l = l.strip() + m = dep.match(l) + if m != None: + dependency = m.group(1) + + # ------ Ugly work-around for cmake -------------------------------- + # We need cmake >= 3.0! + if ((dependency == 'cmake') or (dependency == 'cmake3')): + if ((system == 'debian') or (system == 'ubuntu')): + try: + distribution = subprocess.check_output( ["lsb_release", "-cs"] ).decode('utf-8').strip() + # print("distribution=", distribution, ".") + if distribution in [ 'trusty' ]: + dependency = 'cmake3' + except: + pass + + dependencies.append(dependency) + + return dependencies + + +# ###### Main program ####################################################### + +# ====== Check arguments ==================================================== +if len(sys.argv) < 2: + sys.stderr.write('Usage: ' + sys.argv[0] + ' debian|ubuntu|fedora|freebsd [-i|--install]\n') + sys.exit(1) +system = sys.argv[1] +runInstall = False +for i in range(2, len(sys.argv)): + if sys.argv[i] == '-i' or sys.argv[i] == '--install': + runInstall = True + else: + sys.stderr.write('ERROR: Bad parameter ' + sys.argv[i] + '!') + sys.exit(1) + +# ====== Debian/Ubuntu ====================================================== +dependencies = [ ] +if ((system == 'debian') or (system == 'ubuntu')): + if os.path.exists('debian/control'): + with open('debian/control', 'r') as fp: + inside = False + for line in fp: + if not line: + break + line_lower = line.lower() + if inside: + if line.startswith((' ', "\t")): + dependencies = dependencies + extractDependencies(line, system) + continue + elif line.startswith('#'): + continue + inside = False + if line_lower.startswith(('build-depends:', 'build-depends-indep:')): + dependencies = dependencies + extractDependencies(line, system) + inside = True + + for dependency in sorted(set(dependencies)): + sys.stdout.write(dependency + ' ') + sys.stdout.write('\n') + + if runInstall == True: + subprocess.call([ 'apt-get', 'install', '-y' ] + dependencies) + + else: + sys.stderr.write('ERROR: Unable to locate Debian control file!\n') + sys.exit(1) + + +# ====== Fedora ============================================================= +elif system == 'fedora': + specFiles = glob.glob('rpm/*.spec') + if len(specFiles) == 1: + with open(specFiles[0], 'r') as fp: + inside = False + for line in fp: + if not line: + break + line_lower = line.lower() + if inside: + if line.startswith((' ', "\t")): + dependencies = dependencies + extractDependencies(line, system) + continue + elif line.startswith('#'): + continue + inside = False + if line_lower.startswith('buildrequires:'): + dependencies = dependencies + extractDependencies(line, system) + inside = True + + for dependency in sorted(set(dependencies)): + sys.stdout.write(dependency + ' ') + sys.stdout.write('\n') + + if runInstall == True: + subprocess.call([ 'dnf', 'install', '-y' ] + dependencies) + + else: + sys.stderr.write('ERROR: Unable to locate RPM spec file!\n') + sys.exit(1) + + +# ====== FreeBSD ============================================================ +elif system == 'freebsd': + freeBSDMakefile = glob.glob('freebsd/*/Makefile') + if len(freeBSDMakefile) == 1: + freeBSDDirectory = os.path.dirname(freeBSDMakefile[0]) + + cmd = 'make build-depends-list && make run-depends-list' + try: + os.chdir(freeBSDDirectory) + output = subprocess.check_output(cmd, shell=True) + except Exception as e: + sys.stderr.write('ERROR: Getting FreeBSD dependencies failed: ' + str(e) + '\n') + sys.exit(1) + + if output != None: + ports = output.decode('utf-8').splitlines() + for port in ports: + basename = os.path.basename(port) + if basename == 'glib20': + basename = 'glib' # May be there is a better solution here? + dependencies.append(basename) + + for dependency in sorted(set(dependencies)): + sys.stdout.write(dependency + ' ') + sys.stdout.write('\n') + + if runInstall == True: + subprocess.call([ 'pkg', 'install', '-y' ] + dependencies) + + else: + sys.stderr.write('ERROR: Unable to locate FreeBSD port makefile!\n') + sys.exit(1) + + +# ====== Error ============================================================== +else: + sys.stderr.write('ERROR: Invalid system name "' + system + '"!\n') + sys.exit(1) diff --git a/ci/install b/ci/install new file mode 100755 index 000000000..505a0e125 --- /dev/null +++ b/ci/install @@ -0,0 +1,451 @@ +#!/usr/bin/env bash +# +# Travis CI Scripts +# Copyright (C) 2018-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + + +. `dirname $0`/get-container +UBUNTU_MIRROR="us.archive.ubuntu.com" +RETRY_MAXTRIALS=5 +RETRY_PAUSE=60 + + +# ###### Linux as-is ######################################################## +if [ "${TRAVIS_OS_NAME}" == "linux" -a "${DOCKER}" == "" -a "${QEMU}" == "" ] ; then + + # ====== Travis CI standard Ubuntu Linux machine ========================= + # That is: not using Docker + # Travis CI only supports Ubuntu: + env LANG=C.UTF-8 ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo apt-get install -y software-properties-common + env LANG=C.UTF-8 ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo apt-add-repository -y ppa:dreibh/ppa + env LANG=C.UTF-8 ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo apt-get update + env LANG=C.UTF-8 ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo ci/get-dependencies ubuntu --install + + # ====== Coverity Scan =================================================== + if [ "${TOOL}" == "coverity" ] ; then + rm -rf coverity + mkdir coverity + cd coverity + ../ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- wget --no-verbose https://scan.coverity.com/download/linux64 --post-data "\"token=${COVERITY_SCAN_TOKEN}&project=${COVERITY_PROJECT}\"" -O coverity_tool.tar.gz + if [ $? -ne 0 ] ; then + echo 2>&1 "ERROR: Download of Coverity Scan analysis tool failed!" + exit 1 + fi + tar xzf coverity_tool.tar.gz + rm -f coverity_tool.tar.gz + cd .. + fi + + +# ###### Linux via Docker ################################################### +elif [ "${TRAVIS_OS_NAME}" == "linux" -a "${DOCKER}" != "" -a "${QEMU}" == "" ] ; then + + # ====== Ubuntu Linux ==================================================== + if [ "${VARIANT}" == "ubuntu" -o "${VARIANT}" == "debian" ] ; then + APT_UPDATE='env LANG=C.UTF-8 apt-get update -o Acquire::GzipIndexes=false' + APT_INSTALL="env LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef --no-install-recommends" + APT_UPGRADE="env LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y -o Dpkg::Options::=--force-confold -o Dpkg::Options::=--force-confdef --no-install-recommends" + APT_ADD_REPOSITORY="env LANG=C.UTF-8 apt-add-repository -y" + + # ====== Prepare container ============================================ + echo "###### Preparing container ... ########################################" + # Use uncompressed package lists. Necessary to work around + # "apt-show-version" problems due to usage of compressed lists in + # Docker containers: + # https://askubuntu.com/questions/916199/install-apt-show-versions-inside-an-ubuntu-docker-container + sudo docker exec ${CONTAINER} env LANG=C.UTF-8 \ + sed -e "s#http://archive.ubuntu.com/ubuntu/#http://${UBUNTU_MIRROR}/ubuntu/#g" -i /etc/apt/sources.list + sudo docker exec ${CONTAINER} bash -c "find /var/lib/apt/lists/ -maxdepth 1 -type f | xargs rm -f" + sudo docker exec ${CONTAINER} ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- ${APT_UPDATE} + + echo "Installing eatmydata ..." + sudo docker exec ${CONTAINER} ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- ${APT_INSTALL} eatmydata python3 software-properties-common lsb-release + + distribution=`sudo docker exec ${CONTAINER} env LANG=C.UTF-8 lsb_release -cs | sed -e "s/[^0-9a-zA-Z]//g"` + if [ "${VARIANT}" == "debian" ] ; then + if [[ "$DOCKER" =~ ^(debian:)(.*)$ ]] ; then + distribution="${BASH_REMATCH[2]}" + fi + fi + echo "distribution=$distribution" + + # Ubuntu 12.04 needs "python-software-properties" package: + if [ "$distribution" == "precise" ] ; then + sudo docker exec ${CONTAINER} ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- ${APT_INSTALL} python-software-properties + fi + + if [ "${VARIANT}" == "ubuntu" ] ; then + mirror="http://${UBUNTU_MIRROR}/ubuntu/" + else + mirror="http://deb.debian.org/debian" + fi + echo "mirror=$mirror" + + + # ====== Ubuntu/Debian: add repositories (dreibh:ppa, backports, updates) + echo "###### Adding dreibh:ppa, backports, updates to container ... ###############" + if [ "${VARIANT}" == "ubuntu" ] ; then + echo "Ubuntu: adding adding ppa:dreibh/ppa ..." + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} ${APT_ADD_REPOSITORY} ppa:dreibh/ppa + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} eatmydata ${APT_UPDATE} + fi + if [ "${VARIANT}" == "ubuntu" -o "${VARIANT}" == "debian" ] ; then + echo "Ubuntu/Debian: adding ${distribution}-backports ..." + # NOTE: backports may be unavailable -> ignore error on apt-get update! + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} ${APT_ADD_REPOSITORY} "\"deb ${mirror} ${distribution}-updates main universe\"" + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} ${APT_ADD_REPOSITORY} "\"deb ${mirror} ${distribution}-backports main universe\"" + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} eatmydata ${APT_UPDATE} || true + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} eatmydata ${APT_UPGRADE} + fi + + + # ====== Ubuntu/Debian: extract dependencies ========================== + echo "###### Obtaining build dependencies ... ###############################" + echo "Extracting dependencies ..." + UBUNTU_DEPS=`sudo docker exec ${CONTAINER} env LANG=C.UTF-8 ci/get-dependencies ${VARIANT}` + echo "Dependencies: ${UBUNTU_DEPS}" + + + # ====== Ubuntu/Debian: set up compiler =============================== + if [ "${TOOL}" == "compile" ] ; then + echo "###### Installing compile environment ... #############################" + eatmydata ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} ${APT_INSTALL} build-essential joe clang ${UBUNTU_DEPS} + + + # ====== Ubuntu/Debian: set up pbuilder =============================== + elif [ "${TOOL}" == "pbuilder" ] ; then + echo "###### Installing pbuilder environment ... ############################" + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} eatmydata ${APT_INSTALL} \ + joe build-essential devscripts fakeroot lintian pbuilder sudo ${UBUNTU_DEPS} + if [ "$distribution" == "precise" ] ; then + # Ubuntu 12.04 needs "python-debian" package: + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} eatmydata ${APT_INSTALL} python-debian + else + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} eatmydata ${APT_INSTALL} python3-debian + fi + + # ====== pbuilder environment ====================================== + echo "###### Setting up pbuilder ... ########################################" + sudo docker exec ${CONTAINER} bash -c "env LANG=C.UTF-8 cat >/etc/pbuilderrc < ignore error on apt-get update! + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} bash -c "\"env LANG=C.UTF-8 eatmydata pbuilder login --save-after-login <&2 "ERROR: Invalid setting of TOOL=${TOOL}" + exit 1 + fi + + echo "###### Finished setup of build environment ############################" + + + # ======Fedora Core Linux ================================================ + elif [ "${VARIANT}" == "fedora" ] ; then + # ====== Fedora: extract dependencies ================================= + echo "###### Obtaining build dependencies ... ###############################" + echo "Extracting dependencies ..." + FEDORA_DEPS="`ci/get-dependencies ${VARIANT}`" + echo "Dependencies: ${FEDORA_DEPS}" + + echo "###### Preparing environment setup ... ################################" + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} env LANG=C.UTF-8 \ + dnf install -y --allowerasing nosync + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} env LANG=C.UTF-8 LD_PRELOAD=/usr/lib64/nosync/nosync.so \ + dnf install -y --allowerasing dnf-plugins-core + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} env LANG=C.UTF-8 LD_PRELOAD=/usr/lib64/nosync/nosync.so \ + dnf copr enable -y dreibh/ppa + + # ====== Fedora: set up compiler ====================================== + if [ "${TOOL}" == "compile" ] ; then + echo "###### Installing compile environment ... #############################" + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} env LANG=C.UTF-8 LD_PRELOAD=/usr/lib64/nosync/nosync.so \ + dnf install -y --allowerasing make clang ${FEDORA_DEPS} + + # ====== Fedora: set up mock ========================================== + elif [ "${TOOL}" == "mock" ] ; then + echo "###### Installing mock environment ... ################################" + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo docker exec ${CONTAINER} env LANG=C.UTF-8 LD_PRELOAD=/usr/lib64/nosync/nosync.so \ + dnf install -y --allowerasing make findutils fedora-release mock rpmdevtools ${FEDORA_DEPS} + + sudo docker exec ${CONTAINER} env LANG=C.UTF-8 groupadd -f mock + + release=`sudo docker exec -t ${CONTAINER} bash -c "LANG=C.UTF-8 ; cat /etc/fedora-release | sed -e \"s/^\(.*\) release \([0-9]*\) (\(.*\))$/\2/g\"" | sed -e "s/[^0-9]//g"` + arch=`sudo docker exec -t ${CONTAINER} env LANG=C.UTF-8 uname -m | sed -e "s/[^0-9a-zA-Z_+-]//g"` + if ! sudo docker exec ${CONTAINER} grep "^\[copr-dreibh-ppa\]" /etc/mock/fedora-${release}-${arch}.cfg ; then + shopt -s extglob + ppa="[copr-dreibh-ppa]\nname=Copr repo for ppa owned by dreibh\nbaseurl=https://copr-be.cloud.fedoraproject.org/results/dreibh/ppa/fedora-\\\$releasever-\\\$basearch/\ntype=rpm-md\nskip_if_unavailable=True\ngpgcheck=1\ngpgkey=https://copr-be.cloud.fedoraproject.org/results/dreibh/ppa/pubkey.gpg\nrepo_gpgcheck=0\nenabled=1" + ppa="${ppa//+( )$/\\n}" + sudo docker exec ${CONTAINER} sed -e "s@^# repos@# repos\n${ppa}@g" -i /etc/mock/fedora-${release}-${arch}.cfg + if ! sudo docker exec ${CONTAINER} grep "^\[copr-dreibh-ppa\]" /etc/mock/fedora-${release}-${arch}.cfg ; then + echo >&2 "ERROR: Unable to inject PPA configuration into Mock configuration file /etc/mock/fedora-${release}-${arch}.cfg!" + exit 1 + fi + fi + else + echo >&2 "ERROR: Invalid setting of TOOL=${TOOL}!" + exit 1 + fi + + # ======Fedora Core Linux ================================================ + else + echo >&2 "ERROR: Invalid setting of VARIANT=${VARIANT}!" + exit 1 + fi + + +# ###### FreeBSD via QEMU ################################################### +elif [ "${TRAVIS_OS_NAME}" == "linux" -a "${QEMU}" == "FreeBSD" ] ; then + + if [ "${VARIANT}" != "" ] ; then + imageName="FreeBSD-${VARIANT}-amd64.raw" + + # ====== Build fuse-ufs2 ============================================== + # Activate "updates" and "backports" repositories! + # This is needed to later install dependencies for fuse-ufs2. + distribution=`env LANG=C.UTF-8 lsb_release -cs | sed -e "s/[^0-9a-zA-Z]//g"` + mirror="http://${UBUNTU_MIRROR}/ubuntu/" + if ! grep -E "^deb .* ${distribution}-updates .*" /etc/apt/sources.list >/dev/null ; then + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo apt-add-repository -y "\"deb ${mirror} ${distribution}-updates main universe\"" + fi + if ! grep -E "^deb .* ${distribution}-backports .*" /etc/apt/sources.list >/dev/null ; then + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo apt-add-repository -y "\"deb ${mirror} ${distribution}-backports main universe\"" + fi + ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo eatmydata apt-get update || true + env LANG=C.UTF-8 ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- sudo eatmydata apt-get install -y \ + build-essential fuse libfuse-dev autoconf automake libtool git libbsd-dev e2fslibs-dev \ + gdisk parted + + pushd /vservers/qemu-freebsd/fuse-ufs2/ + ./autogen.sh + ./configure + cores=`getconf _NPROCESSORS_ONLN 2>/dev/null || echo "1"` + make -j${cores} + popd + + + # ====== Modify FreeBSD image ========================================= + pushd /vservers/qemu-freebsd/ + + # ~~~~~ Grow image ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + truncate -s 128G ${imageName} + echo -e "w\nY\nY\n" | LANG=C gdisk ${imageName} + parted -s ${imageName} resizepart 3 100% + parted -s ${imageName} print + + # ~~~~~~ Mount ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ls -l ${imageName} + mountPoint=`pwd`/mnt + + sudo umount ${mountPoint} 2>/dev/null || true + LOOPDEVS=`sudo losetup -j ${imageName} | awk '{ print $1 }' | sed -e "s/:$//g"` + for loopdev in ${LOOPDEVS} ; do + sudo losetup -d ${loopdev} || true + done + + sudo losetup -P -f ${imageName} + sudo losetup -j ${imageName} + LOOPDEV=`sudo losetup -j ${imageName} | awk '{ print $1 }' | sed -e "s/:$//g"` + + echo "sudo fuse-ufs2/fuse-ufs/fuse-ufs ${LOOPDEV}p3 ${mountPoint} -o rw" + sudo fuse-ufs2/fuse-ufs/fuse-ufs ${LOOPDEV}p3 ${mountPoint} -o rw + + # ~~~~~~ Modify ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # Set up networking: + sudo cp ${mountPoint}/etc/rc.conf . + sudo bash -c "( + echo \"sshd_enable=\\\"YES\\\"\" + echo \"ifconfig_vtnet0=\\\"DHCP\\\"\" + echo \"ifconfig_vtnet1=\\\"inet 192.168.100.100 netmask 255.255.255.0\\\"\" + echo \"nfs_client_enable=\\\"YES\\\"\" + echo \"rpc_lockd_enable=\\\"YES\\\"\" + echo \"rpc_statd_enable=\\\"YES\\\"\" + ) >>${mountPoint}/etc/rc.conf" + # sudo cat ${mountPoint}/etc/rc.conf + + # Make sure that FreeBSD uses the latest packages: + sudo sed -e 's#"pkg+http://pkg.FreeBSD.org/${ABI}/quarterly"#"pkg+http://pkg.FreeBSD.org/${ABI}/latest"#g' -i ${mountPoint}/etc/pkg/FreeBSD.conf + + # Make sure that the /usr/ports directory is there. + sudo mkdir -p ${mountPoint}/usr/ports + + # Add SSH public key authentication: + sudo mkdir -p ${mountPoint}/root/.ssh + sudo chmod 700 ${mountPoint}/root/.ssh + if [ ! -e ~/.ssh/id_rsa ] ; then + ssh-keygen -t rsa -b 4096 -P "" -f ~/.ssh/id_rsa + fi + sudo cp ~/.ssh/id_rsa.pub ${mountPoint}/root/.ssh/authorized_keys + sudo chmod 600 ${mountPoint}/root/.ssh/authorized_keys + + sudo bash -c "echo \"PermitRootLogin prohibit-password\" >>${mountPoint}/etc/ssh/sshd_config" + # sudo tail -n 6 ${mountPoint}/etc/ssh/sshd_config + + # Set up NFS: + sudo mkdir -p ${mountPoint}/travis + sudo sed -e "/^.*\/travis.*$/d" -i~ ${mountPoint}/etc/fstab + sudo bash -c "( echo \"192.168.100.1:/travis /travis nfs rw,soft,async,noatime,nfsv3,rsize=65536,wsize=65536 0 0\" ; echo \"tmpfs /usr/ports tmpfs rw 0 0\" ) >>${mountPoint}/etc/fstab" + sudo cat ${mountPoint}/etc/fstab + + # ~~~~~~ Unmount ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + sudo umount ${mountPoint} + sudo losetup -d ${LOOPDEV} + + popd + + + # ====== Host-only networking ========================================= + sudo ip link add br0 type bridge || true + sudo ip addr flush dev br0 + sudo ip addr add 192.168.100.1/24 brd 192.168.100.255 dev br0 + sudo ip tuntap add mode tap + sudo ip link set tap0 master br0 + sudo ip link set dev br0 up + sudo ip link set dev tap0 up + sudo iptables -A INPUT -i tap0 -s 192.168.100.0/24 -j ACCEPT + sudo iptables -A OUTPUT -o tap0 -d 192.168.100.0/24 -j ACCEPT + sudo iptables -A INPUT -i br0 -s 192.168.100.0/24 -j ACCEPT + sudo iptables -A OUTPUT -o br0 -d 192.168.100.0/24 -j ACCEPT + sudo iptables -A FORWARD -s 192.168.100.0/24 -d 192.168.100.0/24 + # sudo dnsmasq --interface=br0 --bind-interfaces \ + # --dhcp-range=192.168.100.2,192.168.100.254 || true + + + # ====== NFS ========================================================== + sudo mkdir -p /travis + sudo mount --bind `pwd` /travis + sudo bash -c "echo \"/travis 192.168.100.0/24(rw,no_root_squash)\" >/etc/exports" + env LANG=C.UTF-8 ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- \ + sudo apt-get install -y qemu-kvm nfs-kernel-server + sudo exportfs -v + sudo service nfs-kernel-server restart + + + # ====== Start VM ===================================================== + sudo killall -q qemu-system-x86_64 || true + ssh-keygen -R "[localhost]:8829" -f ~/.ssh/known_hosts + # Non-KVM execution: qemu-system-x86_64 \ + sudo qemu-system-x86_64 -machine type=pc,accel=kvm -nographic \ + -m 6144 -cpu host -smp $(nproc) \ + -drive if=virtio,media=disk,file=/vservers/qemu-freebsd/${imageName},format=raw \ + -netdev user,id=mynet0,hostfwd=tcp:127.0.0.1:8829-:22 -device virtio-net-pci,netdev=mynet0 \ + -netdev tap,id=network0,ifname=tap0,script=no,downscript=no -device virtio-net-pci,netdev=network0,mac=00:00:00:00:00:00 \ + & + + ready=0 + trials=20 ; sleep=15 + i=0 ; while [ $i -lt ${trials} ] ; do + let i=$i+1 + echo "${i}/${trials}: Waiting for VM to boot ..." + sleep ${sleep} + if ssh -p 8829 -oStrictHostKeyChecking=no -i ~/.ssh/id_rsa root@localhost hostname ; then + ready=1 + break + fi + done + if [ ${ready} -eq 0 ] ; then + echo >&2 "VM did not boot properly!" + exit 1 + fi + + # ====== Install packages ============================================= + # Ensure the file system is okay (fuse-ufs2 in write mode is unreliable!) + ssh -p 8829 -oStrictHostKeyChecking=no -i ~/.ssh/id_rsa root@localhost \ + "mount -fr / ; fsck -y /dev/gpt/rootfs ; mount -fw / ; df -h" + + # Basic dependencies: + ssh -p 8829 -oStrictHostKeyChecking=no -i ~/.ssh/id_rsa root@localhost \ + env ASSUME_ALWAYS_YES=yes pkg update + ssh -p 8829 -oStrictHostKeyChecking=no -i ~/.ssh/id_rsa root@localhost \ + env ASSUME_ALWAYS_YES=yes pkg install -y bash gcc joe git libtool autoconf automake + + # Bash shell: + # Use bash, and make sure it is available under /bin/bash. + ssh -p 8829 -oStrictHostKeyChecking=no -i ~/.ssh/id_rsa root@localhost \ + chsh -s /usr/local/bin/bash + ssh -p 8829 -oStrictHostKeyChecking=no -i ~/.ssh/id_rsa root@localhost \ + ln -s /usr/local/bin/bash /bin/bash || true + + # Ports collection: + # This is the slow method via portsnap: + # --- ssh -p 8829 -oStrictHostKeyChecking=no -i ~/.ssh/id_rsa root@localhost \ + # --- "portsnap --interactive fetch extract | grep -v ^/usr/ports" + # Using Git is much faster: + ssh -p 8829 -oStrictHostKeyChecking=no -i ~/.ssh/id_rsa root@localhost \ + "rm -rf /usr/ports ; git clone --depth=1 --filter=tree:0 https://github.com/freebsd/freebsd-ports /usr/ports" + + # Package's dependencies: + ssh -p 8829 -oStrictHostKeyChecking=no -i ~/.ssh/id_rsa root@localhost \ + "cd /travis/freebsd/*/ && ( make build-depends-list && make run-depends-list ) | sed -e 's/^.*\///g' -e 's/glib20/glib/g' | sort -u | xargs -r env ASSUME_ALWAYS_YES=yes pkg install -y" + + echo "===== The FreeBSD VM is ready! =====" + fi + + +# ###### MacOS X ############################################################ +elif [ "${TRAVIS_OS_NAME}" == "osx" ] ; then + + # For MacOS, the dependencies have to be specified as parameters to "ci/install": + if [ "$@" != "" ] ; then + brew update + brew install $@ + fi + + +# ###### Error ############################################################## +else + echo >&2 "ERROR: Invalid setting of TRAVIS_OS_NAME=${TRAVIS_OS_NAME}, DOCKER=${DOCKER}, QEMU=${QEMU}!" + exit 1 +fi diff --git a/ci/monitor b/ci/monitor new file mode 100755 index 000000000..64570186f --- /dev/null +++ b/ci/monitor @@ -0,0 +1,79 @@ +#!/usr/bin/env bash +# +# Travis CI Scripts +# Copyright (C) 2018-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + + +# ###### Wait and display status ############################################ + wait_for_timeout () + { + local pid="${1}" + local timeout="${2}" + shift ; shift + + local count=0 + while [[ "${count}" -lt "${timeout}" ]]; do + echo "Waiting for ${pid}: ${count}/${timeout} ..." + sleep 60 + let count=${count}+1 + + # local i=0 + # while [ ${i} -lt 60 ] ; do + # let i=${i}+1 + # echo "Waiting for ${pid}: ${count}/${timeout} ..." + # echo -n "." + # if test $(($i%60)) = 0 ; then + # echo " ${count}" + # fi + # done + done + echo "Timeout (${timeout} min) for ${pid} reached -> sending SIGKILL ..." + kill -9 ${pid} +} + + +# ###### Main program ####################################################### +if [ $# -lt 2 ] ; then + echo >&2 "Usage: $0 timeout_in_min command [args ...]" + exit 1 +fi + +timeout=$1 +shift +command=("${@}") +logfile="monitor_${$}.log" + +echo "Calling: ${command[@]}" +"${command[@]}" 2>&1 | tee "${logfile}" & +command_pid="${!}" +wait_for_timeout "${command_pid}" "${timeout}" "${cmd[@]}" & +status_pid="${!}" + +result=1 +{ + set +e + wait "${command_pid}" 2>/dev/null + result="${?}" + ps -p ${status_pid} &>/dev/null && kill ${status_pid} + set -e +} + +exit ${result} diff --git a/ci/retry b/ci/retry new file mode 100755 index 000000000..a1be18614 --- /dev/null +++ b/ci/retry @@ -0,0 +1,69 @@ +#!/usr/bin/env bash +# +# Travis CI Scripts +# Copyright (C) 2018-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + + +maxTrials=3 +pause=10 +while [ $# -gt 0 ] ; do + case "$1" in + -t|--tries) + maxTrials="$2" + shift 2 + ;; + -p|--pause) + pause="$2" + shift 2 + ;; + --) + shift + break + ;; + *) + echo >&2 "Usage: $0 [-t|--trials max_trials] [-p|--pause seconds] -- command ..." + exit 1 + ;; + esac +done + + +attempts=1 +result=1 +command="$@" +while [[ ${result} -ne 0 && ${attempts} -le ${maxTrials} ]] ; do + if [ ${attempts} -gt 1 ] ; then + echo "Sleeping ${pause}s ..." + sleep ${pause} + fi + echo "Trying ${attempts}/${maxTrials}: ${command}" + bash -c "${command}" && result=$? || result=$? + if [ ${result} -eq 127 ] ; then + # Command not found => no need for a retry! + exit ${result} + elif [ ${result} -ne 0 ] ; then + # Attempt failed + let attempts=${attempts}+1 + fi +done + + +exit ${result} diff --git a/ci/run-test b/ci/run-test new file mode 100755 index 000000000..c2655678f --- /dev/null +++ b/ci/run-test @@ -0,0 +1,99 @@ +#!/usr/bin/env bash +# +# Travis CI Scripts +# Copyright (C) 2018-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + + +# ====== Get settings ======================================================= +export TRAVIS_OS_NAME="linux" + +if [[ "$1" =~ ^(debian|ubuntu|fedora|freebsd)_([a-zA-Z0-9]*|[0-9\.]*)-(pbuilder|mock|compile)(|-gcc|-clang)$ ]] ; then + if [ "${BASH_REMATCH[1]}" == "freebsd" ] ; then + export DOCKER="" + export QEMU="FreeBSD" + export VARIANT="${BASH_REMATCH[2]}-RELEASE" + else + export DOCKER="${BASH_REMATCH[1]}:${BASH_REMATCH[2]}" + export VARIANT="${BASH_REMATCH[1]}" + fi + export TOOL="${BASH_REMATCH[3]}" + COMPILER="${BASH_REMATCH[4]}" + echo "DOCKER=${DOCKER}" + echo "QEMU=${QEMU}" + echo "VARIANT=${VARIANT}" + echo "TOOL=${TOOL}" + if [ "${TOOL}" == "compile" -a "${COMPILER}" != "" ] ; then + if [ "${COMPILER}" == "-gcc" ] ; then + export COMPILER_C=gcc + export COMPILER_CXX=g++ + elif [ "${COMPILER}" == "-clang" ] ; then + export COMPILER_C=clang + export COMPILER_CXX=clang++ + else + echo >&2 "ERROR: Bad compiler setting!" + exit 1 + fi + echo "COMPILER_C=${COMPILER_C}" + echo "COMPILER_CXX=${COMPILER_CXX}" + fi + +elif [ "$1" == "" ] ; then + # ------ Use defaults ---------------------------------- + export DOCKER="ubuntu:bionic" + export VARIANT="ubuntu" + export TOOL="pbuilder" + +else + echo >&2 "Usage: $0 [ubuntu|fedora|freebsd]_[release]-[pbuilder|mock|compile-[gcc|clang]]" + exit 1 +fi + + +# ====== Run test =========================================================== +SCRIPTS="before-install install build test" +# SCRIPTS="test" + +for script in $SCRIPTS ; do + echo "###### Running $script ... ######" + sudo env \ + TRAVIS_OS_NAME="$TRAVIS_OS_NAME" \ + DOCKER="$DOCKER" QEMU="$QEMU" \ + VARIANT="$VARIANT" \ + TOOL="$TOOL" \ + COMPILER_C="$COMPILER_C" \ + COMPILER_CXX="$COMPILER_CXX" \ + ci/${script} \ + || { + echo "" + echo "====== Something went wrong! Getting shell into the container! ======" + echo "" + sudo env \ + TRAVIS_OS_NAME="$TRAVIS_OS_NAME" \ + DOCKER="$DOCKER" QEMU="$QEMU" \ + VARIANT="$VARIANT" \ + TOOL="$TOOL" \ + COMPILER_C="$COMPILER_C" \ + COMPILER_CXX="$COMPILER_CXX" \ + ci/enter + exit 1 + } +done +echo "###### Build test completed! ######" diff --git a/ci/test b/ci/test new file mode 100755 index 000000000..181fbe686 --- /dev/null +++ b/ci/test @@ -0,0 +1,132 @@ +#!/usr/bin/env bash +# +# Travis CI Scripts +# Copyright (C) 2018-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + + +. `dirname $0`/get-container + + +# ###### Linux as-is ######################################################## +if [ "${TRAVIS_OS_NAME}" == "linux" -a "${DOCKER}" == "" -a "${QEMU}" == "" ] ; then + + # Nothing to be done here. + true + + +# ###### Linux via Docker ################################################### +elif [ "${TRAVIS_OS_NAME}" == "linux" -a "${DOCKER}" != "" -a "${QEMU}" == "" ] ; then + + # ====== pbuilder environment ========================================= + if [ "$TOOL" == "pbuilder" ] ; then + CHANGELOG_HEADER="`head -n1 debian/changelog`" + PACKAGE=`echo ${CHANGELOG_HEADER} | sed -e "s/(.*//" -e "s/ //g"` + PACKAGE_VERSION=`echo ${CHANGELOG_HEADER} | sed -e "s/.*(//" -e "s/).*//" -e "s/ //g" -e "s/ //g" -e "s/^[0-9]://g"` + OUTPUT_VERSION=`echo ${PACKAGE_VERSION} | sed -e "s/\(ubuntu\|ppa\)[0-9]*$/\1/"` + DEBIAN_VERSION=`echo ${OUTPUT_VERSION} | sed -e "s/\(ubuntu\|ppa\)$//1"` + + packages="" + if [ $# -eq 0 ] ; then + echo "Looking for *${DEBIAN_VERSION}*.deb in /var/cache/pbuilder/result ..." + packages="`sudo docker exec ${CONTAINER} env LANG=C.UTF-8 find /var/cache/pbuilder/result -name "*${DEBIAN_VERSION}*.deb"`" + fi + while [ $# -gt 0 ] ; do + echo "Looking for $1*${DEBIAN_VERSION}*.deb in /var/cache/pbuilder/result ..." + packages="${packages} `sudo docker exec ${CONTAINER} env LANG=C.UTF-8 find /var/cache/pbuilder/result -name "$1*${DEBIAN_VERSION}*.deb"`" + shift + done + packages=`echo "${packages}" | xargs -n1 | sort -u | xargs` + if [ "${packages}" == "" ] ; then + echo >&2 "ERROR: No packages have been found!" + exit 1 + fi + + echo "Installing ${packages} ..." + sudo docker exec ${CONTAINER} env LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive eatmydata apt-get install -fy ${packages} || { + echo "NOTE: apt-get failed -> trying dpkg instead of apt-get for local file!" + # NOTE: Older "apt-get" versions do not handle local files! + if ! sudo docker exec ${CONTAINER} env LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive eatmydata dpkg -i ${packages} ; then + echo "There may be some dependencies missing. Trying to install them ..." + sudo docker exec ${CONTAINER} env LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive eatmydata apt-get install -fy -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-confdef" --no-install-recommends + echo "Retrying to install ${packages} ..." + sudo docker exec ${CONTAINER} env LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive eatmydata dpkg -i ${packages} + fi + } + echo "Done!" + + # ====== mock environment ============================================= + elif [ "$TOOL" == "mock" ] ; then + PACKAGE=`grep "^Name:" rpm/*.spec | head -n1 | sed -e "s/Name://g" -e "s/[ \t]*//g"` + PACKAGE_VERSION=`grep "^Version:" rpm/*.spec | head -n1 | sed -e "s/Version://g" -e "s/[ \t]*//g"` + + release=`sudo docker exec ${CONTAINER} bash -c "LANG=C.UTF-8 ; cat /etc/fedora-release | sed -e \"s/^\(.*\) release \([0-9]*\) (\(.*\))$/\2/g\"" | sed -e "s/[^0-9]//g"` + arch=`sudo docker exec ${CONTAINER} env LANG=C.UTF-8 uname -m | sed -e "s/[^0-9a-zA-Z_+-]//g"` + if ! sudo docker exec ${CONTAINER} cd /var/lib/mock/fedora-${release}-${arch}/result ; then + if sudo docker exec ${CONTAINER} cd /var/lib/mock/fedora-rawhide-${arch}/result ; then + release="rawhide" + else + echo >&2 "ERROR: No results have been found!" + exit 1 + fi + fi + + packages="" + if [ $# -eq 0 ] ; then + echo "Looking for *${PACKAGE_VERSION}*.rpm in /var/lib/mock/fedora-${release}-${arch}/result ..." + packages="`sudo docker exec ${CONTAINER} env LANG=C.UTF-8 find /var/lib/mock/fedora-${release}-${arch}/result -name "*${PACKAGE_VERSION}*.rpm" | grep -v "\.src\.rpm$"`" + fi + while [ $# -gt 0 ] ; do + echo "Looking for $1*${PACKAGE_VERSION}*.rpm in /var/lib/mock/fedora-${release}-${arch}/result ..." + packages="${packages} `sudo docker exec ${CONTAINER} env LANG=C.UTF-8 find /var/lib/mock/fedora-${release}-${arch}/result -name "$1*${PACKAGE_VERSION}*.rpm" | grep -v "\.src\.rpm$"`" + shift + done + packages=`echo "${packages}" | xargs -n1 | sort -u | xargs` + if [ "${packages}" == "" ] ; then + echo >&2 "ERROR: No packages have been found!" + exit 1 + fi + + echo "Installing ${packages} ..." + sudo docker exec ${CONTAINER} env LANG=C.UTF-8 LD_PRELOAD=/usr/lib64/nosync/nosync.so dnf install -y --allowerasing ${packages} + echo "Done!" + + fi + + +# ###### FreeBSD via QEMU ################################################### +elif [ "${TRAVIS_OS_NAME}" == "linux" -a "${QEMU}" == "FreeBSD" ] ; then + + # FIXME: TBD! + true + + +# ###### MacOS X ############################################################ +elif [ "${TRAVIS_OS_NAME}" == "osx" ] ; then + + # Nothing to be done here. + true + + +# ###### Error ############################################################## +else + echo >&2 "ERROR: Invalid setting of TRAVIS_OS_NAME=${TRAVIS_OS_NAME}, DOCKER=${DOCKER}, QEMU=${QEMU}!" + exit 1 +fi diff --git a/clean-deb b/clean-deb new file mode 100755 index 000000000..075e8fa0f --- /dev/null +++ b/clean-deb @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +# +# Debian Packaging Scripts +# Copyright (C) 2002-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + + +# ====== Obtain package information ========================================= +CHANGELOG_HEADER="`head -n1 debian/changelog`" +PACKAGE=`echo ${CHANGELOG_HEADER} | sed -e "s/(.*//" -e "s/ //g"` + + +# ====== Clean up =========================================================== +rm -f *.deb *.dsc *.asc *.changes *.build *.upload *.tar.gz stamp-h* svn-commit* *~ + +for type in gz bz2 xz ; do + find . -maxdepth 1 -name "${PACKAGE}-*.${type}" | xargs -r rm + find . -maxdepth 1 -name "${PACKAGE}_*.${type}" | xargs -r rm +done +find . -maxdepth 1 -name "*.buildinfo" | xargs -r rm + +shopt -s extglob +rm -rf ${PACKAGE}-+([0-9]).+([0-9]).+([0-9])* diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..6cdfe1368 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +libusrsctp (1.0.0~td128-1ubuntu1) disco; urgency=medium + + * Initial release. + + -- Thomas Dreibholz Wed, 11 Sep 2019 15:55:10 +0300 diff --git a/debian/compat b/debian/compat new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..6d1735394 --- /dev/null +++ b/debian/control @@ -0,0 +1,48 @@ +Source: libusrsctp +Maintainer: Thomas Dreibholz +Section: net +Priority: optional +Build-Depends: cmake (>= 3.0.2) | cmake3, + debhelper (>= 9), + libfile-fcntllock-perl +Standards-Version: 4.4.0.1 +Vcs-Browser: https://github.com/sctplab/usrsctp +Vcs-Git: https://github.com/sctplab/usrsctp.git +Homepage: https://github.com/sctplab/usrsctp + +Package: libusrsctp1 +Section: libs +Architecture: any +Depends: ${misc:Depends}, + ${shlibs:Depends} +Description: Portable SCTP Userland Stack + This is a userland SCTP stack supporting + FreeBSD, Linux, Mac OS X and Windows. + . + This package contains the shared library for the + Portable SCTP Userland Stack. + +Package: libusrsctp-dev +Section: libdevel +Architecture: any +Depends: libusrsctp1 (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Description: Portable SCTP Userland Stack (Development Files) + This is a userland SCTP stack supporting + FreeBSD, Linux, Mac OS X and Windows. + . + This package contains the development files for the + Portable SCTP Userland Stack. + +Package: libusrsctp-examples +Architecture: any +Depends: libusrsctp1 (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends} +Description: Portable SCTP Userland Stack (Examples) + This is a userland SCTP stack supporting + FreeBSD, Linux, Mac OS X and Windows. + . + This package contains the examples for the + Portable SCTP Userland Stack. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..dae1b00ff --- /dev/null +++ b/debian/copyright @@ -0,0 +1,35 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: usrsctp +Source: https://github.com/sctplab/usrsctp + +Files: * +Copyright: + (C) Copyright (C) 2015 Randall Stewart + (C) Copyright (C) 2015 Michael Tuexen +License: BSD-3-clause + +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + . + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + . + * Neither the name of usrsctp nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/debian/libusrsctp-dev.examples b/debian/libusrsctp-dev.examples new file mode 100644 index 000000000..6643c0890 --- /dev/null +++ b/debian/libusrsctp-dev.examples @@ -0,0 +1 @@ +programs/*.c diff --git a/debian/libusrsctp-dev.install b/debian/libusrsctp-dev.install new file mode 100644 index 000000000..1b01a65fe --- /dev/null +++ b/debian/libusrsctp-dev.install @@ -0,0 +1,3 @@ +usr/include/usrsctp.h +usr/lib/*/libusrsctp*.a +usr/lib/*/libusrsctp*.so diff --git a/debian/libusrsctp-examples.install b/debian/libusrsctp-examples.install new file mode 100644 index 000000000..08b045a34 --- /dev/null +++ b/debian/libusrsctp-examples.install @@ -0,0 +1,22 @@ +usr/bin/chargen_server_upcall +usr/bin/client +usr/bin/client_upcall +usr/bin/daytime_server +usr/bin/daytime_server_upcall +usr/bin/discard_server +usr/bin/discard_server_upcall +usr/bin/echo_server +usr/bin/echo_server_upcall +usr/bin/ekr_client +usr/bin/ekr_loop +usr/bin/ekr_loop_offload +usr/bin/ekr_loop_upcall +usr/bin/ekr_peer +usr/bin/ekr_server +usr/bin/http_client +usr/bin/http_client_upcall +usr/bin/rtcweb +usr/bin/test_libmgmt +usr/bin/test_timer +usr/bin/tsctp +usr/bin/tsctp_upcall diff --git a/debian/libusrsctp1.install b/debian/libusrsctp1.install new file mode 100644 index 000000000..f4d466061 --- /dev/null +++ b/debian/libusrsctp1.install @@ -0,0 +1 @@ +usr/lib/*/libusrsctp.so.* diff --git a/debian/rules b/debian/rules new file mode 100644 index 000000000..9c44efee5 --- /dev/null +++ b/debian/rules @@ -0,0 +1,6 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +%: + dh $@ --buildsystem cmake --parallel diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 000000000..56471429d --- /dev/null +++ b/debian/tests/control @@ -0,0 +1 @@ +Tests: diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 000000000..dae98b5dd --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,7 @@ +Name: usrsctp +Homepage: https://github.com/sctplab/usrsctp +Repository: https://github.com/sctplab/usrsctp +Repository-Browse: https://github.com/sctplab/usrsctp +Bug-Submit: https://github.com/sctplab/usrsctp/issues +Contact: Michael Tüxen +Security-Contact: Michael Tüxen diff --git a/debian/upstream/signing-key.asc b/debian/upstream/signing-key.asc new file mode 100644 index 000000000..4b169252c --- /dev/null +++ b/debian/upstream/signing-key.asc @@ -0,0 +1,405 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1 + +mQGiBDr2cOgRBAC71Xhy1yzNTBxnousyxwtZ+zxRQJIfkDUQ8Yry5/rdoRkUldnE +VQUNX9owxKKwA40DsKMX5lfPIgfPpefqnSOx1/XOtjpffkF8+FY8ncU/LKvHPPw3 +oNXzFAr8F6NqpJAIbp8eW6DlfraXiJFZk0D6sZyIk9XDqTY01+Dn5WmAewCg4Szj +r52geHYk+6n83yfVqw8+c3MD/A9d4ylhJikTHzbL83HTO7WozqlGtZq0rwGY+JIq +wPAaRAdBnu0brQz7xtfTZrvxA6v3sYb73bpuosaQNtg1K5Z0l0fbJQxls7wCdSC4 +GmkXyl64c1bPiGMHu7WVE85mwdm4KyD7qELnnNKZoagFgK1HNYFJtuUDYQ3ihBQq +k0VnBACaqJ4k/VJYPQvuWy0fppX+Ultyqz2rrHqqVvaSotjc8muxwM0OL42ZCjL1 +scuFb1TonojymUFa1nqe6uYU5Owjh2CRfs5+TnMUO7S7vXQRQgWPffIE7kJqL46G +S79MmHXVWwmO1WMpJooTlsCUv+J+pAWpYu5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2RI0OImm2e0H0NftIRvVX4ZTrZdk6GO7qjgZsu +WFGzLjRJW/Nn9GV2Shh4JEfUmCFTsSQayfxFwu5EWPsCBb5taQjILc0IZk36Z1z+ +aZHFip4WkxC/b5edvUS4KTqOoMkvoiNUq55hkPle0pdb5ACPVSVGj28ak0uzuhnP +dBqESB/RLkKf14unYlGv3gMVWgidnDOI5bIQnwGsmjJ0OAIBv/l4R2sBz7uJu49I +6c7FUfxp73PI1t2KZIkYO3Wmd8TP8LDdxhi/AAMHB/9tX2Ik7bbNMloHlLPx3NtB +/Bprnl+6CLsO8857l6ITWn39b648lNhntZDFqszyr+HwHO3A4B95QrO3OgZJW8R/ +GFrxae/P/estYsrU6T6/1lUSWsBiYltsRyLUuaTW9fCaNxiiiNiX/bmaGS+5yDzN +U7xZ81gLAFSQZQZSP5JClt/ES3zR3IabooW/1c7V8DOVReRYE4Nni8M81Fj4DLh6 +8AWRt8oWAdcxQG+1eUZ+5JClNFc23SZ9FVng554gps90IjwNfk0P35whYRAnYA+B +a1r6HrWTAnlzuTbHFptti3q/2NPM+vnvK9WV7h85XoTFR4JwVpEjO9f7zsUyhpz5 +iEYEGBECAAYFAjr2cPwACgkQ32BbsHYPLWU+nACdHdhBhlE3hai5nAtwal8x8fZf +lFUAoMJrt3ofCGhrsOs9pMA//3rkg/Js +=0dBa +-----END PGP PUBLIC KEY BLOCK----- diff --git a/debian/watch b/debian/watch new file mode 100644 index 000000000..0356438a1 --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=4 +opts=pgpsigurlmangle=s/$/.asc/ \ +https://packages.nntb.no/software/libusrsctp libusrsctp-(.*)\.tar\.gz diff --git a/filter-empty-entries b/filter-empty-entries new file mode 100755 index 000000000..892884462 --- /dev/null +++ b/filter-empty-entries @@ -0,0 +1,60 @@ +#!/usr/bin/perl +# +# Debian Packaging Scripts +# Copyright (C) 2002-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +use warnings; +use strict; + +my $mode=0; +my $entryLines=0; +my $entry=""; + +while (my $text = ) { + chomp $text; + + if($entryLines == 0) { + if($text =~ /^[a-zA-Z].*$/) { + $entry = "$text\n\n"; + $entryLines = 1; + } + } + else { + if($text =~ /^[ \t]*$/) { + # Remove empty line. + } + elsif($text =~ /^ --.*$/) { + $entry = "$entry\n$text\n"; + if($entryLines > 1) { + print "$entry\n"; + } + + if($ARGV[0] !~ /^$/) { + if($text =~ /($ARGV[0])/) { + exit; + } + } + + $entryLines = 0; + } + else { + $entry = "$entry$text\n"; + $entryLines = $entryLines + 1; + } + } +} diff --git a/freebsd/libusrsctp/distinfo b/freebsd/libusrsctp/distinfo new file mode 100644 index 000000000..4c481fb50 --- /dev/null +++ b/freebsd/libusrsctp/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1566564355 +SHA256 (libusrsctp-1.0.0~td127.tar.gz) = 2185213b9d5e1afd070e50edb9c8c2e7269231f01fbecf4c9c0b19ba7253f614 +SIZE (libusrsctp-1.0.0~td127.tar.gz) = 717203 diff --git a/freebsd/libusrsctp/pkg-descr b/freebsd/libusrsctp/pkg-descr new file mode 100644 index 000000000..71e69a71d --- /dev/null +++ b/freebsd/libusrsctp/pkg-descr @@ -0,0 +1,3 @@ +This is a userland SCTP stack supporting FreeBSD, Linux, Mac OS X and Windows. + +WWW: https://github.com/sctplab/usrsctp diff --git a/freebsd/libusrsctp/pkg-plist b/freebsd/libusrsctp/pkg-plist new file mode 100644 index 000000000..581478661 --- /dev/null +++ b/freebsd/libusrsctp/pkg-plist @@ -0,0 +1,5 @@ +include/usrsctp.h +lib/libusrsctp.a +lib/libusrsctp.so +lib/libusrsctp.so.1 +lib/libusrsctp.so.1.0.0 diff --git a/freebsd/libusrsctp/test-packaging b/freebsd/libusrsctp/test-packaging new file mode 100755 index 000000000..b868dc1e7 --- /dev/null +++ b/freebsd/libusrsctp/test-packaging @@ -0,0 +1,74 @@ +#!/bin/sh +# +# Free Packaging Test Script +# Copyright (C) 2010-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +PACKAGE=`cat Makefile | grep PORTNAME= | sed -e "s/^PORTNAME=//g" | tr -d " \t"` +UPSTREAM_VERSION=`cat Makefile | grep PORTVERSION= | sed -e "s/^PORTVERSION=//g" | tr -d " \t"` +PORTREVISION=`cat Makefile | grep PORTREVISION= | sed -e "s/^PORTREVISION=//g" | tr -d " \t"` +CATEGORY=`cat Makefile | grep CATEGORIES= | sed -e "s/^CATEGORIES=//g" | tr -d " \t"` + +PACKAGE_VERSION="${UPSTREAM_VERSION}" +if [ "$PORTREVISION" != "" ] ; then + PACKAGE_VERSION="${UPSTREAM_VERSION}_${PORTREVISION}" +fi + + +echo "######################################################################" +echo "PACKAGE: $PACKAGE" +echo "UPSTREAM_VERSION: $UPSTREAM_VERSION" +echo "PACKAGE_VERSION: $PACKAGE_VERSION" +echo "CATEGORY: $CATEGORY" +echo "######################################################################" + + +if [ -e work ] ; then + rm -rf work +fi +rm -f ${PACKAGE}-${PACKAGE_VERSION}.txz +find /usr/ports/packages -name "${PACKAGE}*.txz" | xargs rm -f + + +echo "1. ###### make deinstall ##############################################" && \ +make deinstall && \ +echo "2. ###### make install ################################################" && \ +make install && \ +echo "3. ###### make package ################################################" && \ +make package && \ +echo "4. ###### make deinstall ##############################################" && \ +make deinstall && \ +echo "5. ###### pkg add #####################################################" && \ +if [ -e work/pkg/${PACKAGE}-${PACKAGE_VERSION}.txz ] ; then + mkdir /usr/ports/packages /usr/ports/packages/All + cp work/pkg/${PACKAGE}-${PACKAGE_VERSION}.txz /usr/ports/packages/All +else + echo >&2 "ERROR: Cannot find work/pkg/${PACKAGE}-${PACKAGE_VERSION}.txz!" + exit 1 +fi +pkg add /usr/ports/packages/All/${PACKAGE}-${PACKAGE_VERSION}.txz && \ +echo "6. ###### make deinstall ##############################################" && \ +make deinstall && \ +echo "7. ###### make reinstall ##############################################" && \ +make reinstall && \ +echo "8. ###### make package ################################################" && \ +make package && \ +echo "9. ###### tar tzvf *.txz ##############################################" && \ +tar tzvf /usr/ports/packages/All/${PACKAGE}-${PACKAGE_VERSION}.txz && \ +echo "Running portlint ..." && \ +portlint && \ +echo "====== Successfully completed! ======" diff --git a/make-deb b/make-deb new file mode 100755 index 000000000..0157e04b1 --- /dev/null +++ b/make-deb @@ -0,0 +1,348 @@ +#!/usr/bin/env bash +# +# Debian Packaging Scripts +# Copyright (C) 2002-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + + +# --------------------------------------------------------------------------- +# USAGE: +# ./make-deb default => for Ubuntu REVU +# Note: Replaces "Maintainer" by Ubuntu Developers and +# writes original maintainer entry to "XSBC-Original-Maintainer" +# ./make-deb unstable => for Debian Mentors +# ./make-deb bionic|disco|... => for Launchpad PPA +# --------------------------------------------------------------------------- + + +# Set current Debian debhelper version here +# for building unstable/testing/stable packages +# (See https://packages.qa.debian.org/d/debhelper.html for latest version!) +DEBHELPER_LATEST_VERSION="12" + + +# ====== Obtain package and version information ============================= +DISTRIBUTIONS=`\ +( \ +while [ x$1 != "x" ] ; do \ + echo $1 + shift +done \ +) | sort -u` +if [ "${DISTRIBUTIONS}" == "" ] ; then + DISTRIBUTIONS="default" +fi + + +CHANGELOG_HEADER="`head -n1 debian/changelog`" + +# The package name, e.g. MyApplication +PACKAGE=`echo ${CHANGELOG_HEADER} | sed -e "s/(.*//" -e "s/ //g"` +# The package distribution, e.g. precise, raring, ... +PACKAGE_DISTRIBUTION=`echo ${CHANGELOG_HEADER} | sed -e "s/[^)]*)//" -e "s/;.*//g" -e "s/ //g"` +# The package's version, e.g. 1.2.3-1ubuntu1 +PACKAGE_VERSION=`echo ${CHANGELOG_HEADER} | sed -e "s/.*(//" -e "s/).*//" -e "s/ //g" -e "s/ //g" -e "s/^[0-9]://g"` +# The package's output version, e.g. 1.2.3-1ubuntu +OUTPUT_VERSION=`echo ${PACKAGE_VERSION} | sed -e "s/\(ubuntu\|ppa\)[0-9]*$/\1/"` +# The package's Debian version, e.g. 1.2.3-1 +DEBIAN_VERSION=`echo ${OUTPUT_VERSION} | sed -e "s/\(ubuntu\|ppa\)$//1"` +# The package's upstream version, e.g. 1.2.3 +UPSTREAM_VERSION=`echo ${DEBIAN_VERSION} | sed -e "s/-[0-9]*$//"` +# The package's plain upstream version, e.g. 1.2.3 (without e.g. ~svn) +PLAIN_VERSION=`echo ${UPSTREAM_VERSION} | sed -e "s/\([0-9\.]*\)[-+~].*$/\1/"` + + +echo -e "\x1b[34m######################################################################\x1b[0m" +echo -e "\x1b[34mCHANGELOG_HEADER: ${CHANGELOG_HEADER}\x1b[0m" +echo -e "\x1b[34mPACKAGE: ${PACKAGE}\x1b[0m" +echo -e "\x1b[34mPACKAGE_DISTRIBUTION: ${PACKAGE_DISTRIBUTION}\x1b[0m" +echo -e "\x1b[34mPACKAGE_VERSION ${PACKAGE_VERSION}\x1b[0m" +echo -e "\x1b[34mOUTPUT_VERSION: ${OUTPUT_VERSION}\x1b[0m" +echo -e "\x1b[34mDEBIAN_VERSION: ${DEBIAN_VERSION}\x1b[0m" +echo -e "\x1b[34mUPSTREAM_VERSION: ${UPSTREAM_VERSION}\x1b[0m" +echo -e "\x1b[34mPLAIN_VERSION: ${PLAIN_VERSION}\x1b[0m" +echo -e "\x1b[34m######################################################################\x1b[0m" + +if [ ! -e ./packaging.conf ] ; then + echo >&2 "ERROR: packaging.conf does not exist -> no configuration for the new package!" + exit 1 +fi +. ./packaging.conf + + +# ====== Run warp-and-sort tool ============================================= +if [ -e /usr/bin/wrap-and-sort ] ; then + echo -e "" + echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Calling wrap-and-sort ==========================================\x1b[0m" + echo -e "" + wrap-and-sort -a -v +fi + + +# ====== Create upstream source package ===================================== +echo -e "" +echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Creating upstream package ======================================\x1b[0m" +echo -e "" +if [ "${SKIP_PACKAGE_SIGNING}" != "" -a ${SKIP_PACKAGE_SIGNING} -eq 1 -o "${OVERRIDE_SKIP_PACKAGE_SIGNING}" == "1" ] ; then + ./make-upstream-package ${PACKAGE} ${UPSTREAM_VERSION} "${MAKE_DIST}" -skip-signing +else + ./make-upstream-package ${PACKAGE} ${UPSTREAM_VERSION} "${MAKE_DIST}" +fi + +for UPSTREAM_PACKAGE_TYPE in xz bz2 gz ; do + UPSTREAM_PACKAGE="`find . -maxdepth 1 -name "${PACKAGE}-${UPSTREAM_VERSION}.tar.${UPSTREAM_PACKAGE_TYPE}" -printf '%f'`" + if [ -e "${UPSTREAM_PACKAGE}" ] ; then + break + fi +done +if [ ! -e "${UPSTREAM_PACKAGE}" ] ; then + echo -e "\x1b[34mERROR: No upstream package (${PACKAGE}-${UPSTREAM_VERSION}.tar.*) found!\x1b[0m" + exit 1 +fi + + +# ====== Build source packages ============================================== +echo -e "" +echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Building source packages =======================================\x1b[0m" +for DISTRIBUTION in ${DISTRIBUTIONS} ; do + + updatedDebhelperVersion=0 + + echo -e "" + echo -e "\x1b[34m------ Creating package for ${DISTRIBUTION} ------\x1b[0m" + + cp ${UPSTREAM_PACKAGE} ${PACKAGE}_${UPSTREAM_VERSION}.orig.tar.${UPSTREAM_PACKAGE_TYPE} + cp ${UPSTREAM_PACKAGE} ${PACKAGE}_${OUTPUT_VERSION}.orig.tar.${UPSTREAM_PACKAGE_TYPE} + cp ${UPSTREAM_PACKAGE} ${PACKAGE}_${DEBIAN_VERSION}.orig.tar.${UPSTREAM_PACKAGE_TYPE} + if [ ! ${SKIP_PACKAGE_SIGNING} == "1" -a ! "${OVERRIDE_SKIP_PACKAGE_SIGNING}" == "1" ] ; then + cp ${UPSTREAM_PACKAGE}.asc ${PACKAGE}_${UPSTREAM_VERSION}.orig.tar.${UPSTREAM_PACKAGE_TYPE}.asc + cp ${UPSTREAM_PACKAGE}.asc ${PACKAGE}_${OUTPUT_VERSION}.orig.tar.${UPSTREAM_PACKAGE_TYPE}.asc + cp ${UPSTREAM_PACKAGE}.asc ${PACKAGE}_${DEBIAN_VERSION}.orig.tar.${UPSTREAM_PACKAGE_TYPE}.asc + else + rm -f ${PACKAGE}_${UPSTREAM_VERSION}.orig.tar.${UPSTREAM_PACKAGE_TYPE}.asc + rm -f ${PACKAGE}_${OUTPUT_VERSION}.orig.tar.${UPSTREAM_PACKAGE_TYPE}.asc + rm -f ${PACKAGE}_${DEBIAN_VERSION}.orig.tar.${UPSTREAM_PACKAGE_TYPE}.asc + fi + rm -rf ${PACKAGE}-${UPSTREAM_VERSION} + rm -rf ${PACKAGE}-${UPSTREAM_VERSION}.orig + if [ "${UPSTREAM_PACKAGE_TYPE}" == "gz" ] ; then + tar xzf ${UPSTREAM_PACKAGE} + elif [ "${UPSTREAM_PACKAGE_TYPE}" == "bz2" ] ; then + tar xjf ${UPSTREAM_PACKAGE} + elif [ "${UPSTREAM_PACKAGE_TYPE}" == "xz" ] ; then + tar xJf ${UPSTREAM_PACKAGE} + else + echo 2>&1 "ERROR: Bad archive format: ${UPSTREAM_PACKAGE}" + exit 1 + fi + cp -r debian ${PACKAGE}-${UPSTREAM_VERSION} + find ${PACKAGE}-${UPSTREAM_VERSION} -name .svn | xargs --no-run-if-empty rm -rf + cd ${PACKAGE}-${UPSTREAM_VERSION} + + if [ "${DISTRIBUTION}" != "default" ] ; then + if [ "${DISTRIBUTION}" == "unstable" -o "${DISTRIBUTION}" == "testing" -o "${DISTRIBUTION}" == "stable" ] ; then + # Debian: Also remove Launchpad Bug IDs. + sed -e "s/${PACKAGE_DISTRIBUTION};/${DISTRIBUTION};/1" \ + -e "s/\(ubuntu\|ppa\)[0-9]//1" \ + -e "/(LP: #/D" \ + debian/changelog.new + else + # Ubuntu PPA + # Naming example: 2.7.7-0ubuntu1~natty1~ppa0 + # Ubuntu: Also remove Debian Bug IDs. + sed -e "s/${PACKAGE_DISTRIBUTION};/${DISTRIBUTION};/1" \ + -e "s/${PACKAGE_VERSION}/${PACKAGE_VERSION}~${DISTRIBUTION}1~ppa0/1" \ + -e "/(Closes: #/D" \ + debian/changelog.new + + # ------ Old distributions not supporting c++/regex style symbols -- + if [ "${DISTRIBUTION}" == "dapper" -o \ + "${DISTRIBUTION}" == "edgy" -o \ + "${DISTRIBUTION}" == "feisty" -o \ + "${DISTRIBUTION}" == "hardy" -o \ + "${DISTRIBUTION}" == "intrepid" -o \ + "${DISTRIBUTION}" == "jaunty" -o \ + "${DISTRIBUTION}" == "karmic" -o \ + "${DISTRIBUTION}" == "lucid" ] ; then + # Just skip the symbols ... + find debian/ -maxdepth 1 -name "*.symbols" | xargs --no-run-if-empty rm -f + fi + fi + + # Remove additional newlines at the end of the file: + sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' debian/changelog.new + + mv debian/changelog.new debian/changelog + + # ------ Old distributions not supporting new Debian format ----------- + if [ "${DISTRIBUTION}" == "dapper" -o \ + "${DISTRIBUTION}" == "edgy" -o \ + "${DISTRIBUTION}" == "feisty" -o \ + "${DISTRIBUTION}" == "hardy" -o \ + "${DISTRIBUTION}" == "intrepid" -o \ + "${DISTRIBUTION}" == "jaunty" ] ; then + rm -rf debian/source + fi + + # ------ Use latest Debhelper for Debian ------------------------------ + if [ "${DISTRIBUTION}" == "unstable" -o "${DISTRIBUTION}" == "testing" -o "${DISTRIBUTION}" == "stable" ] ; then + # Update debhelper version: + echo "${DEBHELPER_LATEST_VERSION}" >debian/compat + sed -e "s/debhelper (.* [0-9]*)/debhelper (>= ${DEBHELPER_LATEST_VERSION})/g" debian/control.new + # Newer debhelper does not need "--parallel" for building: + sed -e "s/\(.*dh .. .*--buildsystem=cmake.*\)\(--parallel\)\(.*\)/\1\3/g" -e 's@[[:space:]]*$@@g' debian/rules.new + mv debian/control.new debian/control + mv debian/rules.new debian/rules + updatedDebhelperVersion=1 + fi + + else + # Ubuntu: Remove Debian Bug IDs. + sed -e "/(Closes: #/D" \ + debian/changelog.new + mv debian/changelog.new debian/changelog + sed -e "s/^Maintainer:/Maintainer: Ubuntu Developers \nXSBC-Original-Maintainer:/g" debian/control.new + mv debian/control.new debian/control + fi + + echo -e "" + echo -e "\x1b[34m------ Creating diff file ${PACKAGE}-${PACKAGE_VERSION}.diff.gz ------\x1b[0m" + ( + cd .. + diff -urN "--exclude=*~" "--exclude=.svn" "--exclude=.git" \ + ${PACKAGE}-${UPSTREAM_VERSION}.orig ${PACKAGE}-${UPSTREAM_VERSION} \ + | gzip -c >${PACKAGE}-${PACKAGE_VERSION}.diff.gz + ) + + + echo -e "" + echo -e "\x1b[34m------ Building source package ------\x1b[0m" + + # Without signature: + # debuild -us -uc + # For sources: + # debuild -S + # For binaries: + # debuild -b + # Use -i to ignore .svn files! + + if [ "${SKIP_PACKAGE_SIGNING}" == "" ] ; then + SKIP_PACKAGE_SIGNING=0 + fi + if [ $updatedDebhelperVersion -eq 0 ] ; then + opt="" + else + opt="--no-check-builddeps" # Needed for increased debhelper version! + fi + if [ ${SKIP_PACKAGE_SIGNING} -eq 1 -o "${OVERRIDE_SKIP_PACKAGE_SIGNING}" == "1" ] ; then + # Build source package without signature: + debuild ${opt} -us -uc -S "-k${MAINTAINER}" -i || exit 1 + else + # Build source package including signature: + debuild ${opt} -sa -S "-k${MAINTAINER}" -i || exit 1 + fi + + # Important: In /etc/pbuilderrc, set COMPONENTS="main universe"! + # Important: After that, update with option "--override-config"! + # sudo pbuilder update --override-config + + cd .. + + if [ "${DISTRIBUTION}" == "unstable" -o \ + "${DISTRIBUTION}" == "testing" -o \ + "${DISTRIBUTION}" == "stable" -o \ + "${DISTRIBUTION}" == "default" ] ; then + if [ "${DISTRIBUTION}" == "default" ] ; then + version=${PACKAGE_VERSION} + else + version=${DEBIAN_VERSION} + fi + dscFile=`ls ${PACKAGE}_${version}.dsc | tail -n1` + else + dscFile=`ls ${PACKAGE}_${PACKAGE_VERSION}~${DISTRIBUTION}[0-9]~ppa[0-9].dsc | tail -n1` + fi + if [ ! -e "${dscFile}" ] ; then + echo -e "\x1b[34mERROR: ${dscFile} has not been generated successfully -> Aborting!\x1b[0m" + exit 1 + fi + +done + + +# ====== Show results ======================================================= +echo -e "" +echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Results overview ============================================\x1b[0m" +echo -e "" + +echo -e "\x1b[34mUpload to PPA:\x1b[0m" +for DISTRIBUTION in ${DISTRIBUTIONS} ; do + if [ "${DISTRIBUTION}" == "unstable" -o \ + "${DISTRIBUTION}" == "testing" -o \ + "${DISTRIBUTION}" == "stable" -o \ + "${DISTRIBUTION}" == "default" ] ; then + if [ "${DISTRIBUTION}" == "default" ] ; then + ppa="revu" + version=${PACKAGE_VERSION} + else + ppa="mentors" + version=${DEBIAN_VERSION} + fi + changesFile=`ls ${PACKAGE}_${version}_source.changes | tail -n1` + else + ppa="ppa" + changesFile=`ls ${PACKAGE}_${PACKAGE_VERSION}~${DISTRIBUTION}[0-9]~ppa[0-9]_source.changes | tail -n1` + fi + echo -e "\x1b[34m dput ${ppa} $changesFile\x1b[0m" +done +echo -e "" + +if [ -e make-symbols ] ; then + echo -e "\x1b[34m################################################################\x1b[0m" + echo -e "\x1b[34mDo not forget to run make-symbols after library version changes!\x1b[0m" + echo -e "\x1b[34m################################################################\x1b[0m" + echo -e "" +fi + +echo -e "\x1b[34mBuild Test Commands:\x1b[0m" +for DISTRIBUTION in ${DISTRIBUTIONS} ; do + if [ "${DISTRIBUTION}" == "unstable" -o \ + "${DISTRIBUTION}" == "testing" -o \ + "${DISTRIBUTION}" == "stable" -o \ + "${DISTRIBUTION}" == "default" ] ; then + if [ "${DISTRIBUTION}" == "default" ] ; then + version=${PACKAGE_VERSION} + else + version=${DEBIAN_VERSION} + fi + changesFilesPattern="${PACKAGE}_${version}_*.changes" + dscFile=`ls ${PACKAGE}_${version}.dsc | tail -n1` + else + changesFilesPattern="${PACKAGE}_${PACKAGE_VERSION}~${DISTRIBUTION}[0-9]~ppa[0-9]_*.changes" + dscFile=`ls ${PACKAGE}_${PACKAGE_VERSION}~${DISTRIBUTION}[0-9]~ppa[0-9].dsc | tail -n1` + fi + profile="ubuntu" + if [ "${DISTRIBUTION}" == "unstable" -o \ + "${DISTRIBUTION}" == "testing" -o \ + "${DISTRIBUTION}" == "stable" ] ; then + profile="debian" + fi + echo -e "\x1b[34m sudo pbuilder build ${dscFile} && lintian -iIEv --profile ${profile} --pedantic /var/cache/pbuilder/result/$changesFilesPattern\x1b[0m" +done +echo -e "" diff --git a/make-ppa b/make-ppa new file mode 100755 index 000000000..74ba49d23 --- /dev/null +++ b/make-ppa @@ -0,0 +1,130 @@ +#!/usr/bin/env bash +# +# Packaging Scripts +# Copyright (C) 2002-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + +COPR=0 +DPUT=0 + +# NOTE: These are the supported distributions by Ubuntu Launchpad and Debian: +DPUT_DISTRIBUTIONS="precise trusty xenial bionic disco eoan unstable" + +while [ $# -gt 0 ] ; do + if [ "$1" == "dput" ] ; then + DPUT=1 + elif [ "$1" == "copr" ] ; then + COPR=1 + elif [ "$1" == "all" ] ; then + DPUT=1 + COPR=1 + else + echo >&2 "Usage: $0 [dput] [copr] [all]" + exit 1 + fi + shift +done + +if [ ${DPUT} -eq 0 -a ${COPR} -eq 0 ] ; then + COPR=1 + DPUT=1 +fi + +if [ ! -e debian/ ] ; then + DPUT=0 +fi +if [ ! -e rpm/ ] ; then + COPR=0 +fi + + +# ====== Build source packages ============================================== +./clean-deb +if [ ${DPUT} -ne 0 ] ; then + . ./packaging.conf + if [ "${NOT_TARGET_DISTRIBUTIONS}" == "" ] ; then + echo >&2 "ERROR: Define NOT_TARGET_DISTRIBUTIONS in packaging.conf!" + exit 1 + fi + buildForDistribution="" + for dputDistribution in ${DPUT_DISTRIBUTIONS} ; do + notATarget=0 + for notTargetDistribution in ${NOT_TARGET_DISTRIBUTIONS} ; do + if [ "${notTargetDistribution}" == "${dputDistribution}" ] ; then + notATarget=1 + break + fi + done + if [ $notATarget -eq 0 ] ; then + buildForDistribution="${buildForDistribution} ${dputDistribution}" + fi + done + + echo "Building for distributions:${buildForDistribution}" + ./make-deb ${buildForDistribution} +fi + +if [ ${COPR} -ne 0 ] ; then + if [ -e rpm -o -e ./make-srpm ] ; then + ./make-srpm || exit 1 + else + echo >&2 "ERROR: RPM files not found!" + exit 1 + fi +fi + + +# ====== dput =============================================================== +if [ ${DPUT} -ne 0 ] ; then + changeFiles=`ls *.changes` + for changeFile in $changeFiles ; do + if [[ $changeFile =~ .*[0-9](ppa|ubuntu)[0-9].* ]] ; then + dput ppa $changeFile + else + dput mentors $changeFile + fi + done +fi + + +# ====== COPR =============================================================== +if [ ${COPR} -ne 0 ] ; then + PACKAGE=`grep "^Name:" rpm/*.spec | head -n1 | sed -e "s/Name://g" -e "s/[ \t]*//g"` + SRPM=`find ${HOME}/rpmbuild/SRPMS -name "${PACKAGE}-*.src.rpm"` + if [ ! -e "${SRPM}" ] ; then + echo >&2 "ERROR: ${PACKAGE}-*.src.rpm not found!" + exit 1 + fi + + COPR_CLI="" + for directory in /usr/bin ~/.local/bin ; do + if [ -x "${directory}/copr-cli" ] ; then + COPR_CLI="${directory}/copr-cli" + break + fi + done + if [ "${COPR_CLI}" == "" ] ; then + echo >&2 "ERROR: copr-cli not found!" + exit 1 + fi + echo "Using ${COPR_CLI}" + + ${COPR_CLI} build --nowait ppa ${SRPM} +fi diff --git a/make-srpm b/make-srpm new file mode 100755 index 000000000..79b051df1 --- /dev/null +++ b/make-srpm @@ -0,0 +1,120 @@ +#!/usr/bin/env bash +# +# Packaging Scripts +# Copyright (C) 2017-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + + +# --------------------------------------------------------------------------- +# USAGE: +# ./make-srpm +# --------------------------------------------------------------------------- + + +# ====== Obtain package and version information ============================= +PACKAGE=`grep "^Name:" rpm/*.spec | head -n1 | sed -e "s/Name://g" -e "s/[ \t]*//g"` +PACKAGE_VERSION=`grep "^Version:" rpm/*.spec | head -n1 | sed -e "s/Version://g" -e "s/[ \t]*//g"` +PACKAGE_RELEASE=`grep "^Release:" rpm/*.spec | head -n1 | sed -e "s/Release://g" -e "s/[ \t]*//g"` + +echo -e "\x1b[34m###########################################\x1b[0m" +echo -e "\x1b[34mPACKAGE: ${PACKAGE}\x1b[0m" +echo -e "\x1b[34mPACKAGE_VERSION: ${PACKAGE_VERSION}\x1b[0m" +echo -e "\x1b[34mPACKAGE_RELEASE: ${PACKAGE}_RELEASE\x1b[0m" +echo -e "\x1b[34m###########################################\x1b[0m" + +# ====== Check with Debian package's version ================================ +if [ -e debian/changelog ] ; then + DEBIAN_CHANGELOG_HEADER="`head -n1 debian/changelog`" + + # The package name, e.g. MyApplication + DEBIAN_PACKAGE=`echo ${DEBIAN_CHANGELOG_HEADER} | sed -e "s/(.*//" -e "s/ //g"` + # The package distribution, e.g. precise, raring, ... + DEBIAN_PACKAGE_DISTRIBUTION=`echo ${DEBIAN_CHANGELOG_HEADER} | sed -e "s/[^)]*)//" -e "s/;.*//g" -e "s/ //g"` + # The package's version, e.g. 1.2.3-1ubuntu1 + DEBIAN_PACKAGE_VERSION=`echo ${DEBIAN_CHANGELOG_HEADER} | sed -e "s/.*(//" -e "s/).*//" -e "s/ //g" -e "s/ //g" -e "s/^[0-9]://g"` + # The package's output version, e.g. 1.2.3-1ubuntu + DEBIAN_OUTPUT_VERSION=`echo ${DEBIAN_PACKAGE_VERSION} | sed -e "s/\(ubuntu\|ppa\)[0-9]*$/\1/"` + # The package's Debian version, e.g. 1.2.3-1 + DEBIAN_VERSION=`echo ${DEBIAN_OUTPUT_VERSION} | sed -e "s/\(ubuntu\|ppa\)$//1"` + # The package's upstream version, e.g. 1.2.3 + DEBIAN_UPSTREAM_VERSION=`echo ${DEBIAN_VERSION} | sed -e "s/-[0-9]*$//"` + + if [ "${PACKAGE}-${PACKAGE_VERSION}" != "${DEBIAN_PACKAGE}-${DEBIAN_UPSTREAM_VERSION}" ] ; then + echo >&2 "ERROR: RPM version and Debian version do not match -> ${PACKAGE}-${PACKAGE_VERSION} vs. ${DEBIAN_PACKAGE}-${DEBIAN_UPSTREAM_VERSION}!" +# exit 1 + fi +fi + +if [ -e packaging.conf ] ; then + . ./packaging.conf +fi + + +# ====== Create upstream source package ===================================== +echo -e "" +echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Creating upstream package ======================================\x1b[0m" +echo -e "" +if [ "${SKIP_PACKAGE_SIGNING}" != "" -a ${SKIP_PACKAGE_SIGNING} -eq 1 -o "${OVERRIDE_SKIP_PACKAGE_SIGNING}" == "1" ] ; then + ./make-upstream-package ${PACKAGE} ${PACKAGE_VERSION} "${MAKE_DIST}" -skip-signing +else + ./make-upstream-package ${PACKAGE} ${PACKAGE_VERSION} "${MAKE_DIST}" +fi + +for UPSTREAM_PACKAGE_TYPE in xz bz2 gz ; do + UPSTREAM_PACKAGE="`find . -maxdepth 1 -name "${PACKAGE}-*.tar.${UPSTREAM_PACKAGE_TYPE}" -printf '%f'`" + if [ -e "${UPSTREAM_PACKAGE}" ] ; then + break + fi +done +if [ ! -e "${UPSTREAM_PACKAGE}" ] ; then + echo -e "\x1b[34mERROR: No upstream package (${PACKAGE}-*.tar.*) found!\x1b[0m" + exit 1 +fi + + +# ====== Create source RPM ================================================== +echo -e "" +echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Creating source RPM ============================\x1b[0m" +echo -e "" + +# ------ Initialise RPM build directories ----------------------------------- +for subdir in BUILD BUILDROOT RPMS SOURCES SPECS SRPMS ; do + mkdir -p ${HOME}/rpmbuild/${subdir} +done +find ${HOME}/rpmbuild/SRPMS -name "${PACKAGE}*.rpm" | xargs --no-run-if-empty rm -f +find ${HOME}/rpmbuild/RPMS -name "${PACKAGE}*.rpm" | xargs --no-run-if-empty rm -f +# Copy upstream sources +cp ${UPSTREAM_PACKAGE} ${HOME}/rpmbuild/SOURCES/ +# Patches +if [ -e original ] ; then + find original -name "*" -type f | grep -v "~$" | grep -v ".spec$" | xargs -n1 -i§ cp "§" ${HOME}/rpmbuild/SOURCES/ +fi +# Further patches +find rpm -name "*" -type f | grep -v "~$" | grep -v ".spec$" | xargs -n1 -i§ cp "§" ${HOME}/rpmbuild/SOURCES/ +# The .spec file +cp rpm/${PACKAGE}.spec ${HOME}/rpmbuild/SPECS/ + +# ------ Create source RPM -------------------------------------------------- +rpmbuild -bs rpm/${PACKAGE}.spec +PACKAGE_SRPM=`find ${HOME}/rpmbuild/SRPMS/ -name "${PACKAGE}-*-*.src.rpm"` +if [ ! -e "${PACKAGE_SRPM}" ] ; then + echo >&2 "ERROR: Cannot find SRPM ${PACKAGE_SRPM}!" + exit 1 +fi diff --git a/make-upstream-package b/make-upstream-package new file mode 100755 index 000000000..e7c31c433 --- /dev/null +++ b/make-upstream-package @@ -0,0 +1,103 @@ +#!/usr/bin/env bash +# +# Packaging Scripts +# Copyright (C) 2017-2019 by Thomas Dreibholz +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Contact: dreibh@iem.uni-due.de + +# Bash options: +set -e + + +# --------------------------------------------------------------------------- +# USAGE: +# ./make-upstream-package package_name version [-skip-signing] +# --------------------------------------------------------------------------- + + +# ====== Check arguments ==================================================== +if [ $# -lt 3 ] ; then + echo >&2 "Usage: $0 package_name version make_dist [-skip-signing]" + exit 1 +fi +PACKAGE="$1" +UPSTREAM_VERSION="$2" +MAKE_DIST="$3" +SKIP_PACKAGE_SIGNING=0 +shift ; shift ; shift +while [ $# -gt 0 ] ; do + if [ "$1" == "-skip-signing" ] ; then + SKIP_PACKAGE_SIGNING=1 + else + echo >&2 "ERROR: Bad argument $0!" + exit 1 + fi + shift +done + + +# ====== Create upstream source package ===================================== +echo -e "" +echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Creating upstream package ======================================\x1b[0m" +echo -e "" +for UPSTREAM_PACKAGE_TYPE in xz bz2 gz ; do + echo -n "Looking for ${PACKAGE}-*.tar.${UPSTREAM_PACKAGE_TYPE} ... " + UPSTREAM_PACKAGE="`find . -maxdepth 1 -name "${PACKAGE}-*.tar.${UPSTREAM_PACKAGE_TYPE}" -printf '%f'`" + if [ -e "${UPSTREAM_PACKAGE}" ] ; then + echo "found!" + break + else + echo "not found" + fi +done +if [ ! -e "${UPSTREAM_PACKAGE}" ]; then + rm -f ${PACKAGE}-*.gz ${PACKAGE}"_"*.gz ${PACKAGE}-*.bz2 ${PACKAGE}"_"*.bz2 ${PACKAGE}-*.xz ${PACKAGE}"_"*.xz + + echo -e "\x1b[34m------ Running MAKE_DIST ... ------\x1b[0m" + echo "\$ $MAKE_DIST" + eval "$MAKE_DIST" + + echo -e "\x1b[34m------ Looking for upstream package ... ------\x1b[0m" + for UPSTREAM_PACKAGE_TYPE in xz bz2 gz ; do + UPSTREAM_PACKAGE="`find . -maxdepth 1 -name "${PACKAGE}-*.tar.${UPSTREAM_PACKAGE_TYPE}" -printf '%f'`" + if [ -e "${UPSTREAM_PACKAGE}" ] ; then + break + fi + done + if [ ! -e "${UPSTREAM_PACKAGE}" ] ; then + echo -e "\x1b[34mERROR: No upstream package (${PACKAGE}-*.tar.*) found!\x1b[0m" + exit 1 + fi + + rm -f "${UPSTREAM_PACKAGE}.asc" # Ensure that old signature file is removed! + echo -e "" +fi +echo -e "\x1b[34m==> Upstream package is ${UPSTREAM_PACKAGE} (type is ${UPSTREAM_PACKAGE_TYPE})\x1b[0m" +echo -e "" + + +# ====== Sign upstream source package ======================================= +if [ ! -e "${UPSTREAM_PACKAGE}.asc" ] ; then + if [ ! ${SKIP_PACKAGE_SIGNING} == "1" -a ! "${OVERRIDE_SKIP_PACKAGE_SIGNING}" == "1" ] ; then + echo -e "" + echo -e "\x1b[34m`date +%FT%H:%M:%S`: ====== Sign upstream package ==========================================\x1b[0m" + echo -e "" + echo -e "\x1b[34mSigning upstream package ${UPSTREAM_PACKAGE} ...\x1b[0m" + gpg -sab "${UPSTREAM_PACKAGE}" + else + rm -f "${UPSTREAM_PACKAGE}.asc" + fi +fi diff --git a/meson.build b/meson.build deleted file mode 100644 index 763edf937..000000000 --- a/meson.build +++ /dev/null @@ -1,240 +0,0 @@ -# Project definition -project('usrsctplib', 'c', - version: '1.0.0', - default_options: ['c_std=c99'], - meson_version: '>=0.49.0') - -# Set compiler warning flags -compiler = meson.get_compiler('c') -if compiler.get_argument_syntax() == 'msvc' - compiler_args = compiler.get_supported_arguments([ - '/wd4100', # 'identifier' : unreferenced formal parameter - '/wd4127', # conditional expression is constant - '/wd4200', # nonstandard extension used : zero-sized array in struct/union - '/wd4214', # bit field types other than int - '/wd4706', # assignment within conditional expression - '/wd4245', # 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch - '/wd4389', # 'operator' : signed/unsigned mismatch - '/wd4702', # unreachable code - '/wd4701', # Potentially uninitialized local variable 'name' used - '/wd4244', # 'conversion' conversion from 'type1' to 'type2', possible loss of data - ]) -else - compiler_args = compiler.get_supported_arguments([ - '-pedantic', - '-Wall', - '-Wextra', - '-Wfloat-equal', - '-Wshadow', - '-Wpointer-arith', - '-Winit-self', - '-Wno-unused-function', - '-Wno-unused-parameter', - '-Wno-unreachable-code', - '-Wstrict-prototypes', - ]) -endif -add_project_arguments(compiler_args, language: 'c') - -# Configuration -compile_args = [] - -# Dependency: Threads -thread_dep = dependency('threads', required: true) - -# Dependencies list -dependencies = [ - thread_dep, -] - -# Global settings -add_project_arguments([ - '-D__Userspace__', - '-DSCTP_SIMPLE_ALLOCATOR', - '-DSCTP_PROCESS_LEVEL_LOCKS', -], language: 'c') - -# OS-specific settings -system = host_machine.system() -if system == 'linux' - add_project_arguments([ - '-D__Userspace_os_Linux', - '-D_GNU_SOURCE', - ], language: 'c') -elif system == 'freebsd' - add_project_arguments([ - '-D__Userspace_os_FreeBSD', - '-U__FreeBSD__', - ] + compiler.get_supported_arguments([ - '-Wno-address-of-packed-member', - ]), language: 'c') -elif system == 'darwin' - add_project_arguments([ - '-D__Userspace_os_Darwin', - '-U__APPLE__', - '-D__APPLE_USE_RFC_2292', - ] + compiler.get_supported_arguments([ - '-Wno-address-of-packed-member', - '-Wno-deprecated-declarations', - ]), language: 'c') -elif system == 'dragonfly' - add_project_arguments([ - '-D__Userspace_os_DragonFly', - '-U__DragonFly__', - ], language: 'c') -elif system == 'netbsd' - add_project_arguments([ - '-D__Userspace_os_NetBSD', - '-U__NetBSD__', - ], language: 'c') -elif system == 'openbsd' - add_project_arguments([ - '-D__Userspace_os_OpenBSD', - '-U__OpenBSD__', - ], language: 'c') -elif system == 'windows' - add_project_arguments('-D__Userspace_os_Windows', language: 'c') - dependencies += compiler.find_library('ws2_32', required: true) - dependencies += compiler.find_library('iphlpapi', required: true) - if compiler.get_id() == 'gcc' - add_project_arguments(compiler.get_supported_arguments([ - '-Wno-format', - '-D_WIN32_WINNT=0x601', # Enables inet_ntop and friends - ]), language: 'c') - endif -else - error('Unknown system: @0@'.format(system)) -endif - -# Feature: sys/queue -if compiler.has_header('sys/queue.h') - add_project_arguments('-DHAVE_SYS_QUEUE_H', language: 'c') -endif - -# Feature: sys/socket, linux/ifaddr, linux/rtnetlink -if compiler.has_header('sys/socket.h') - if compiler.has_header('linux/if_addr.h') - add_project_arguments('-DHAVE_LINUX_IF_ADDR_H', language: 'c') - endif - - if compiler.has_header('linux/rtnetlink.h') - add_project_arguments('-DHAVE_LINUX_RTNETLINK_H', language: 'c') - endif -endif - -# Feature: ICMP -have_sys_types = compiler.has_header('sys/types.h') -have_netinet_in = compiler.has_header('netinet/in.h') -have_netinet_ip = compiler.has_header('netinet/ip.h') -have_netinet_ip_icmp = compiler.has_header('netinet/ip_icmp.h') -if have_sys_types and have_netinet_in and have_netinet_ip and have_netinet_ip_icmp - add_project_arguments('-DHAVE_NETINET_IP_ICMP_H', language: 'c') -endif - -# Feature: stdatomic -if compiler.has_header('stdatomic.h') - add_project_arguments('-DHAVE_STDATOMIC_H', language: 'c') -endif - -# Feature: sockaddr.sa_len -prefix = ''' -#include -#include -''' -have_sa_len = compiler.has_member('struct sockaddr', 'sa_len', prefix: prefix) -if have_sa_len - add_project_arguments('-DHAVE_SA_LEN', language: 'c') -endif - -# Feature: sockaddr_in.sin_len / sockaddr_in6.sin6_len / sockaddr_conn.sconn_len -prefix = ''' -#include -#include -''' -have_sin_len = compiler.has_member('struct sockaddr_in', 'sin_len', prefix: prefix) -if have_sin_len - add_project_arguments('-DHAVE_SIN_LEN', language: 'c') -endif -have_sin6_len = compiler.has_member('struct sockaddr_in6', 'sin6_len', prefix: prefix) -if have_sin6_len - add_project_arguments('-DHAVE_SIN6_LEN', language: 'c') -endif -have_sconn_len = compiler.has_member('struct sockaddr_conn', 'sconn_len', prefix: '#include "usrsctp.h"') -if have_sconn_len - add_project_arguments('-DHAVE_SCONN_LEN', language: 'c') -endif - -# Options -if get_option('sctp_invariants') - add_project_arguments('-DINVARIANTS', language: 'c') -endif -if get_option('sctp_debug') - add_project_arguments('-DSCTP_DEBUG', language: 'c') - compile_args += '-DSCTP_DEBUG' -endif -if get_option('sctp_inet') - add_project_arguments('-DINET', language: 'c') -endif -if get_option('sctp_inet6') - add_project_arguments('-DINET6', language: 'c') -endif - -# Library -subdir('usrsctplib') - -# Build library -if compiler.get_id() == 'msvc' and get_option('default_library') == 'shared' - # Needed by usrsctp_def - find_program('dumpbin') - - usrsctp_static = static_library('usrsctp-static', sources, - dependencies: dependencies, - include_directories: include_dirs) - - usrsctp_def = custom_target('usrsctp.def', - command: [find_program('gen-def.py'), '@INPUT@'], - input: usrsctp_static, - output: 'usrsctp.def', - capture: true) - - usrsctp = shared_library('usrsctp', - link_whole: usrsctp_static, - vs_module_defs: usrsctp_def, - install: true, - version: meson.project_version()) -else - usrsctp = library('usrsctp', sources, - dependencies: dependencies, - include_directories: include_dirs, - install: true, - version: meson.project_version()) -endif - -# Declare dependency -usrsctp_dep = declare_dependency( - compile_args: compile_args, - include_directories: include_dirs, - link_with: usrsctp) - -# Generate pkg-config file -pkg = import('pkgconfig') -pkg.generate(usrsctp, - name: 'usrsctp', - description: 'A portable SCTP userland stack', - url: 'https://github.com/sctplab/usrsctp', - extra_cflags: compile_args) - -# Programs (optional) -if get_option('sctp_build_programs') - subdir('programs') - - # Build executables - foreach name, sources : programs - executable( - name, - programs_helper_sources + sources, - dependencies: dependencies, - link_with: usrsctp, - include_directories: include_dirs) - endforeach -endif diff --git a/packaging.conf b/packaging.conf new file mode 100644 index 000000000..3803c8b1b --- /dev/null +++ b/packaging.conf @@ -0,0 +1,10 @@ +#!/bin/bash + +# --------------------------------------------------------- +MAKE_DIST="./autogen.sh && make dist" +NOT_TARGET_DISTRIBUTIONS="lucid precise" # <<-- Distrubutions which are *not* supported! +MAINTAINER="Thomas Dreibholz " +DEBIAN_LAST_ENTRY="" +UBUNTU_LAST_ENTRY="" +SKIP_PACKAGE_SIGNING=0 # <<-- Must be set to 0 (=off) for PPA upload! +# --------------------------------------------------------- diff --git a/programs/CMakeLists.txt b/programs/CMakeLists.txt index d9b89d823..8bce66337 100644 --- a/programs/CMakeLists.txt +++ b/programs/CMakeLists.txt @@ -120,4 +120,8 @@ foreach (source_file ${check_programs}) ${programs_link_library} ${CMAKE_THREAD_LIBS_INIT} ) + + install(TARGETS ${source_file_we} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR}) endforeach () diff --git a/rpm/libusrsctp.spec b/rpm/libusrsctp.spec new file mode 100644 index 000000000..36c6e7e01 --- /dev/null +++ b/rpm/libusrsctp.spec @@ -0,0 +1,86 @@ +Name: libusrsctp +Version: 1.0.0~td128 +Release: 1 +Summary: Portable SCTP Userland Stack +License: BSD +Group: Applications/Internet +URL: https://github.com/sctplab/usrsctp +Source: %{name}-%{version}.tar.gz + +AutoReqProv: on +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +This is a userland SCTP stack supporting FreeBSD, Linux, Mac OS X and Windows. + + +%package devel +Summary: Portable SCTP Userland Stack (Development Files) +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel + This is a userland SCTP stack supporting FreeBSD, Linux, Mac OS X and Windows. + This package contains the shared library for the Portable SCTP Userland Stack. + + +%package examples +Summary: Portable SCTP Userland Stack (Examples) +Group: Applications/Internet +Requires: %{name} = %{version}-%{release} + +%description examples + This is a userland SCTP stack supporting FreeBSD, Linux, Mac OS X and Windows. + This package contains the examples for the Portable SCTP Userland Stack. + + +%prep +%setup -q + +%build +%cmake -DCMAKE_INSTALL_PREFIX=/usr . +make %{?_smp_mflags} + +%install +make install DESTDIR=%{buildroot} + + +%files +%{_libdir}/libusrsctp.so* + +%files devel +%{_includedir}/usrsctp.h +%{_libdir}/libusrsctp*.a +%{_libdir}/libusrsctp*.so + +%files examples +%{_bindir}/chargen_server_upcall +%{_bindir}/client +%{_bindir}/client_upcall +%{_bindir}/daytime_server +%{_bindir}/daytime_server_upcall +%{_bindir}/discard_server +%{_bindir}/discard_server_upcall +%{_bindir}/echo_server +%{_bindir}/echo_server_upcall +%{_bindir}/ekr_client +%{_bindir}/ekr_loop +%{_bindir}/ekr_loop_offload +%{_bindir}/ekr_loop_upcall +%{_bindir}/ekr_peer +%{_bindir}/ekr_server +%{_bindir}/http_client +%{_bindir}/http_client_upcall +%{_bindir}/rtcweb +%{_bindir}/st_client +%{_bindir}/test_libmgmt +%{_bindir}/test_timer +%{_bindir}/tsctp +%{_bindir}/tsctp_upcall + + +%changelog +* Fri Dec 02 2016 Thomas Dreibholz 1.0.0 +- Initial RPM release diff --git a/usrsctplib/CMakeLists.txt b/usrsctplib/CMakeLists.txt index 2d95610a3..5e1379b72 100644 --- a/usrsctplib/CMakeLists.txt +++ b/usrsctplib/CMakeLists.txt @@ -59,13 +59,12 @@ endif () if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD") add_definitions(-U__FreeBSD__) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-address-of-packed-member") endif () if (CMAKE_SYSTEM_NAME MATCHES "Darwin") add_definitions(-U__APPLE__) add_definitions(-D__APPLE_USE_RFC_2292) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-address-of-packed-member -Wno-deprecated-declarations") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations") endif () if (CMAKE_SYSTEM_NAME MATCHES "DragonFly") From 65c03ea153e94a633955ac2d14c337783802d488 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Thu, 12 Sep 2019 16:38:49 +0300 Subject: [PATCH 02/37] Added missing file. --- freebsd/libusrsctp/Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 freebsd/libusrsctp/Makefile diff --git a/freebsd/libusrsctp/Makefile b/freebsd/libusrsctp/Makefile new file mode 100644 index 000000000..38174df0d --- /dev/null +++ b/freebsd/libusrsctp/Makefile @@ -0,0 +1,20 @@ +# Created by: Thomas Dreibholz +# $FreeBSD$ + +PORTNAME= libusrsctp +PORTVERSION= 1.0.0~td128 +CATEGORIES= net +MASTER_SITES= https://packages.nntb.no/software/libusrsctp/ + +MAINTAINER= dreibh@iem.uni-due.de +COMMENT= Portable SCTP Userland Stack + +LICENSE= BSD +# LICENSE_FILE= ${WRKSRC}/COPYING + +USES= cmake +USE_LDCONFIG= yes + +PLIST_SUB= VERSION=${PORTVERSION} + +.include From a2c5a72a4a9617c296c28d5dffde7cf3aa79159d Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Fri, 13 Sep 2019 10:10:48 +0300 Subject: [PATCH 03/37] Updated build scripts --- ci/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/install b/ci/install index 505a0e125..ffdb6e786 100755 --- a/ci/install +++ b/ci/install @@ -438,7 +438,7 @@ elif [ "${TRAVIS_OS_NAME}" == "linux" -a "${QEMU}" == "FreeBSD" ] ; then elif [ "${TRAVIS_OS_NAME}" == "osx" ] ; then # For MacOS, the dependencies have to be specified as parameters to "ci/install": - if [ "$@" != "" ] ; then + if [ $# -gt 0 ] ; then brew update brew install $@ fi From 30e302677b663ec9c1286d7f9d5cdb590f3266d3 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Wed, 16 Oct 2019 13:52:29 +0200 Subject: [PATCH 04/37] Updated build scripts --- ci/install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/install b/ci/install index 505a0e125..add6eb3ef 100755 --- a/ci/install +++ b/ci/install @@ -97,7 +97,7 @@ elif [ "${TRAVIS_OS_NAME}" == "linux" -a "${DOCKER}" != "" -a "${QEMU}" == "" ] else mirror="http://deb.debian.org/debian" fi - echo "mirror=$mirror" + echo "mirror=${mirror}" # ====== Ubuntu/Debian: add repositories (dreibh:ppa, backports, updates) @@ -226,9 +226,9 @@ EOF\"" arch=`sudo docker exec -t ${CONTAINER} env LANG=C.UTF-8 uname -m | sed -e "s/[^0-9a-zA-Z_+-]//g"` if ! sudo docker exec ${CONTAINER} grep "^\[copr-dreibh-ppa\]" /etc/mock/fedora-${release}-${arch}.cfg ; then shopt -s extglob - ppa="[copr-dreibh-ppa]\nname=Copr repo for ppa owned by dreibh\nbaseurl=https://copr-be.cloud.fedoraproject.org/results/dreibh/ppa/fedora-\\\$releasever-\\\$basearch/\ntype=rpm-md\nskip_if_unavailable=True\ngpgcheck=1\ngpgkey=https://copr-be.cloud.fedoraproject.org/results/dreibh/ppa/pubkey.gpg\nrepo_gpgcheck=0\nenabled=1" + ppa="config_opts['yum.conf'] += \"\"\"\n[copr-dreibh-ppa]\nname=Copr repo for ppa owned by dreibh\nbaseurl=https://copr-be.cloud.fedoraproject.org/results/dreibh/ppa/fedora-\$releasever-\$basearch/\ntype=rpm-md\nskip_if_unavailable=True\ngpgcheck=1\ngpgkey=https://copr-be.cloud.fedoraproject.org/results/dreibh/ppa/pubkey.gpg\nrepo_gpgcheck=0\nenabled=1\n\"\"\"" ppa="${ppa//+( )$/\\n}" - sudo docker exec ${CONTAINER} sed -e "s@^# repos@# repos\n${ppa}@g" -i /etc/mock/fedora-${release}-${arch}.cfg + echo -e "${ppa}" | sudo docker exec -i ${CONTAINER} tee -a /etc/mock/fedora-${release}-${arch}.cfg if ! sudo docker exec ${CONTAINER} grep "^\[copr-dreibh-ppa\]" /etc/mock/fedora-${release}-${arch}.cfg ; then echo >&2 "ERROR: Unable to inject PPA configuration into Mock configuration file /etc/mock/fedora-${release}-${arch}.cfg!" exit 1 @@ -438,7 +438,7 @@ elif [ "${TRAVIS_OS_NAME}" == "linux" -a "${QEMU}" == "FreeBSD" ] ; then elif [ "${TRAVIS_OS_NAME}" == "osx" ] ; then # For MacOS, the dependencies have to be specified as parameters to "ci/install": - if [ "$@" != "" ] ; then + if [ $# -gt 0 ] ; then brew update brew install $@ fi From 03949b67f152a0f29678e73a52ff7b0ef33eddde Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Fri, 18 Oct 2019 12:26:40 +0200 Subject: [PATCH 05/37] Updated build scripts --- make-ppa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make-ppa b/make-ppa index 74ba49d23..2017ad357 100755 --- a/make-ppa +++ b/make-ppa @@ -25,7 +25,7 @@ COPR=0 DPUT=0 # NOTE: These are the supported distributions by Ubuntu Launchpad and Debian: -DPUT_DISTRIBUTIONS="precise trusty xenial bionic disco eoan unstable" +DPUT_DISTRIBUTIONS="precise trusty xenial bionic disco eoan focal unstable" while [ $# -gt 0 ] ; do if [ "$1" == "dput" ] ; then From dcad20ef60657c2e75c46bcef3bd1f4c2e42240d Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Thu, 5 Dec 2019 12:15:10 +0100 Subject: [PATCH 06/37] Updated build scripts --- build-deb | 2 +- build-rpm | 2 +- clean-deb | 2 +- filter-empty-entries | 2 +- make-deb | 2 +- make-ppa | 2 +- make-srpm | 2 +- make-upstream-package | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build-deb b/build-deb index f098e8127..0ea01ea16 100755 --- a/build-deb +++ b/build-deb @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Debian Packaging Scripts -# Copyright (C) 2002-2019 by Thomas Dreibholz +# Copyright (C) 2002-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/build-rpm b/build-rpm index c062b8ecb..c7caa0788 100755 --- a/build-rpm +++ b/build-rpm @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Packaging Scripts -# Copyright (C) 2017-2019 by Thomas Dreibholz +# Copyright (C) 2017-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/clean-deb b/clean-deb index 075e8fa0f..372796166 100755 --- a/clean-deb +++ b/clean-deb @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Debian Packaging Scripts -# Copyright (C) 2002-2019 by Thomas Dreibholz +# Copyright (C) 2002-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/filter-empty-entries b/filter-empty-entries index 892884462..f89919c75 100755 --- a/filter-empty-entries +++ b/filter-empty-entries @@ -1,7 +1,7 @@ #!/usr/bin/perl # # Debian Packaging Scripts -# Copyright (C) 2002-2019 by Thomas Dreibholz +# Copyright (C) 2002-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/make-deb b/make-deb index 0157e04b1..d0cedb06b 100755 --- a/make-deb +++ b/make-deb @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Debian Packaging Scripts -# Copyright (C) 2002-2019 by Thomas Dreibholz +# Copyright (C) 2002-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/make-ppa b/make-ppa index 2017ad357..78d5a2d48 100755 --- a/make-ppa +++ b/make-ppa @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Packaging Scripts -# Copyright (C) 2002-2019 by Thomas Dreibholz +# Copyright (C) 2002-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/make-srpm b/make-srpm index 79b051df1..d9190aa43 100755 --- a/make-srpm +++ b/make-srpm @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Packaging Scripts -# Copyright (C) 2017-2019 by Thomas Dreibholz +# Copyright (C) 2017-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/make-upstream-package b/make-upstream-package index e7c31c433..e0e993927 100755 --- a/make-upstream-package +++ b/make-upstream-package @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Packaging Scripts -# Copyright (C) 2017-2019 by Thomas Dreibholz +# Copyright (C) 2017-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by From c6252eba62db092320247e9870e8e67fa42e232a Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Thu, 5 Dec 2019 12:15:10 +0100 Subject: [PATCH 07/37] Updated build scripts --- ci/before-install | 2 +- ci/build | 2 +- ci/enter | 2 +- ci/get-container | 2 +- ci/get-dependencies | 2 +- ci/install | 2 +- ci/monitor | 2 +- ci/retry | 2 +- ci/run-test | 2 +- ci/test | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ci/before-install b/ci/before-install index b1aa2b4c1..67388d645 100755 --- a/ci/before-install +++ b/ci/before-install @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/build b/ci/build index 59d99f472..3d25293bb 100755 --- a/ci/build +++ b/ci/build @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/enter b/ci/enter index 3056e5938..cf292a730 100755 --- a/ci/enter +++ b/ci/enter @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/get-container b/ci/get-container index 5e64d8090..9ade29509 100755 --- a/ci/get-container +++ b/ci/get-container @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/get-dependencies b/ci/get-dependencies index 303e7eb94..3eee50417 100755 --- a/ci/get-dependencies +++ b/ci/get-dependencies @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/install b/ci/install index add6eb3ef..91b306cb7 100755 --- a/ci/install +++ b/ci/install @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/monitor b/ci/monitor index 64570186f..f49cd4948 100755 --- a/ci/monitor +++ b/ci/monitor @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/retry b/ci/retry index a1be18614..39924c2a9 100755 --- a/ci/retry +++ b/ci/retry @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/run-test b/ci/run-test index c2655678f..750ff545e 100755 --- a/ci/run-test +++ b/ci/run-test @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/test b/ci/test index 181fbe686..e470d045d 100755 --- a/ci/test +++ b/ci/test @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by From badf2d66d63be0769e10dfcda7ee57089b2fca18 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Thu, 5 Dec 2019 12:19:47 +0100 Subject: [PATCH 08/37] Header updates. --- autogen.sh | 2 +- freebsd/libusrsctp/test-packaging | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autogen.sh b/autogen.sh index 6fa09bfd2..6e06943b7 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Build Scripts -# Copyright (C) 2002-2019 by Thomas Dreibholz +# Copyright (C) 2002-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/freebsd/libusrsctp/test-packaging b/freebsd/libusrsctp/test-packaging index b868dc1e7..a750cfcd6 100755 --- a/freebsd/libusrsctp/test-packaging +++ b/freebsd/libusrsctp/test-packaging @@ -1,7 +1,7 @@ #!/bin/sh # # Free Packaging Test Script -# Copyright (C) 2010-2019 by Thomas Dreibholz +# Copyright (C) 2010-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by From 2bc6d621e88adae5133ec2647cabc011892eefdd Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Thu, 5 Dec 2019 12:32:12 +0100 Subject: [PATCH 09/37] Updated Travis CI configuration: removed Fedora 29, added Fedora 31. --- .travis.yml | 45 ++++++++++++++------------------------------- 1 file changed, 14 insertions(+), 31 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1e6997449..dee607421 100644 --- a/.travis.yml +++ b/.travis.yml @@ -207,56 +207,39 @@ matrix: # ###### Fedora Linux #################################################### - ## ====== Fedora 31 ======================================================= - #- name: "Fedora 31 with GCC" - #os: linux - #dist: bionic - #group: travis_latest - #env: DOCKER="fedora:31" VARIANT="fedora" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - #- name: "Fedora 31 with Clang" - #os: linux - #dist: bionic - #group: travis_latest - #env: DOCKER="fedora:31" VARIANT="fedora" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - #- name: "Fedora 31 packaging with mock" - #os: linux - #dist: bionic - #group: travis_latest - #env: DOCKER="fedora:31" VARIANT="fedora" TOOL="mock" - - # ====== Fedora 30 ======================================================= - - name: "Fedora 30 with GCC" + # ====== Fedora 31 ======================================================= + - name: "Fedora 31 with GCC" os: linux dist: bionic group: travis_latest - env: DOCKER="fedora:30" VARIANT="fedora" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - - name: "Fedora 30 with Clang" + env: DOCKER="fedora:31" VARIANT="fedora" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + - name: "Fedora 31 with Clang" os: linux dist: bionic group: travis_latest - env: DOCKER="fedora:30" VARIANT="fedora" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - - name: "Fedora 30 packaging with mock" + env: DOCKER="fedora:31" VARIANT="fedora" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "Fedora 31 packaging with mock" os: linux dist: bionic group: travis_latest - env: DOCKER="fedora:30" VARIANT="fedora" TOOL="mock" + env: DOCKER="fedora:31" VARIANT="fedora" TOOL="mock" - # ====== Fedora 29 ======================================================= - - name: "Fedora 29 with GCC" + # ====== Fedora 30 ======================================================= + - name: "Fedora 30 with GCC" os: linux dist: bionic group: travis_latest - env: DOCKER="fedora:29" VARIANT="fedora" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - - name: "Fedora 29 with Clang" + env: DOCKER="fedora:30" VARIANT="fedora" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + - name: "Fedora 30 with Clang" os: linux dist: bionic group: travis_latest - env: DOCKER="fedora:29" VARIANT="fedora" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - - name: "Fedora 29 packaging with mock" + env: DOCKER="fedora:30" VARIANT="fedora" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "Fedora 30 packaging with mock" os: linux dist: bionic group: travis_latest - env: DOCKER="fedora:29" VARIANT="fedora" TOOL="mock" + env: DOCKER="fedora:30" VARIANT="fedora" TOOL="mock" # ====== Fedora Rawhide ================================================== # - name: "Fedora Rawhide with GCC" From b3f3b9735b238351a8e883f6be7558b3936a2b59 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Thu, 5 Dec 2019 13:19:18 +0100 Subject: [PATCH 10/37] Updated Travis CI configuration: added Ubuntu 20.04. --- .travis.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.travis.yml b/.travis.yml index dee607421..8c0bfc37e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,22 @@ matrix: # ###### Ubuntu Linux #################################################### + # ====== Ubuntu 20.04 (Focal Fossum) ===================================== + - name: "Ubuntu 20.04 (Focal Fossum) with GCC" + os: linux + dist: xenial + group: travis_latest + env: DOCKER="ubuntu:eoan" VARIANT="ubuntu" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + - name: "Ubuntu 20.04 (Focal Fossum) with Clang" + os: linux + dist: xenial + group: travis_latest + env: DOCKER="ubuntu:eoan" VARIANT="ubuntu" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "Ubuntu 20.04 (Focal Fossum) packaging with pbuilder" + dist: xenial + group: travis_latest + env: DOCKER="ubuntu:eoan" VARIANT="ubuntu" TOOL="pbuilder" + # ====== Ubuntu 19.10 (Eoan Ermine) ====================================== - name: "Ubuntu 19.10 (Eoan Ermine) with GCC" os: linux From 4bcf939417f5e20bcf6951a2d53dcbe802ee21a6 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Thu, 5 Dec 2019 13:37:12 +0100 Subject: [PATCH 11/37] Updated Travis CI configuration: updated FreeBSD releases. --- .travis.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8c0bfc37e..b7781ed59 100644 --- a/.travis.yml +++ b/.travis.yml @@ -184,6 +184,18 @@ matrix: # ###### FreeBSD ######################################################### + # ====== FreeBSD 12.1-RELEASE ============================================ + - name: "FreeBSD 12.1-RELEASE with Clang" + os: linux + dist: bionic + group: travis_latest + env: QEMU="FreeBSD" VARIANT="12.1-RELEASE" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "FreeBSD 12.1-RELEASE with GCC" + os: linux + dist: bionic + group: travis_latest + env: QEMU="FreeBSD" VARIANT="12.1-RELEASE" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + # ====== FreeBSD 12.0-RELEASE ============================================ - name: "FreeBSD 12.0-RELEASE with Clang" os: linux @@ -208,18 +220,6 @@ matrix: group: travis_latest env: QEMU="FreeBSD" VARIANT="11.3-RELEASE" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - # ====== FreeBSD 11.2-RELEASE ============================================ - - name: "FreeBSD 11.2-RELEASE with Clang" - os: linux - dist: bionic - group: travis_latest - env: QEMU="FreeBSD" VARIANT="11.2-RELEASE" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - - name: "FreeBSD 11.2-RELEASE with GCC" - os: linux - dist: bionic - group: travis_latest - env: QEMU="FreeBSD" VARIANT="11.2-RELEASE" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - # ###### Fedora Linux #################################################### From de88bcaa2751f3d59553ba5bf81617ee0856a929 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Fri, 7 Feb 2020 13:38:31 +0100 Subject: [PATCH 12/37] Updated build scripts --- make-ppa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make-ppa b/make-ppa index 78d5a2d48..c606369c8 100755 --- a/make-ppa +++ b/make-ppa @@ -114,7 +114,7 @@ if [ ${COPR} -ne 0 ] ; then fi COPR_CLI="" - for directory in /usr/bin ~/.local/bin ; do + for directory in /usr/bin /usr/local/bin ~/.local/bin ; do if [ -x "${directory}/copr-cli" ] ; then COPR_CLI="${directory}/copr-cli" break From 29dc37e3d8890abc7f0e801d42f860cd8cad2ed2 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Fri, 7 Feb 2020 13:55:07 +0100 Subject: [PATCH 13/37] Version bump. --- CMakeLists.txt | 2 +- debian/changelog | 5 +++-- debian/control | 2 +- freebsd/libusrsctp/Makefile | 2 +- rpm/libusrsctp.spec | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c9be3317..a16028647 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ project(libusrsctp C) SET(BUILD_MAJOR "1") SET(BUILD_MINOR "0") -SET(BUILD_PATCH "0~td128") +SET(BUILD_PATCH "0~td131") set(BUILD_VERSION ${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_PATCH}) diff --git a/debian/changelog b/debian/changelog index 6cdfe1368..dda5d131e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ -libusrsctp (1.0.0~td128-1ubuntu1) disco; urgency=medium +libusrsctp (1.0.0~td131-1ubuntu1) focal; urgency=medium * Initial release. + * debian/control: Updated standards version to 4.5.0.0. - -- Thomas Dreibholz Wed, 11 Sep 2019 15:55:10 +0300 + -- Thomas Dreibholz Fri, 07 Feb 2020 13:54:12 +0100 diff --git a/debian/control b/debian/control index 6d1735394..de8a334d6 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Priority: optional Build-Depends: cmake (>= 3.0.2) | cmake3, debhelper (>= 9), libfile-fcntllock-perl -Standards-Version: 4.4.0.1 +Standards-Version: 4.5.0.0 Vcs-Browser: https://github.com/sctplab/usrsctp Vcs-Git: https://github.com/sctplab/usrsctp.git Homepage: https://github.com/sctplab/usrsctp diff --git a/freebsd/libusrsctp/Makefile b/freebsd/libusrsctp/Makefile index 38174df0d..c2a1786f1 100644 --- a/freebsd/libusrsctp/Makefile +++ b/freebsd/libusrsctp/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= libusrsctp -PORTVERSION= 1.0.0~td128 +PORTVERSION= 1.0.0~td131 CATEGORIES= net MASTER_SITES= https://packages.nntb.no/software/libusrsctp/ diff --git a/rpm/libusrsctp.spec b/rpm/libusrsctp.spec index 36c6e7e01..2e9959b80 100644 --- a/rpm/libusrsctp.spec +++ b/rpm/libusrsctp.spec @@ -1,5 +1,5 @@ Name: libusrsctp -Version: 1.0.0~td128 +Version: 1.0.0~td131 Release: 1 Summary: Portable SCTP Userland Stack License: BSD From f78edcfa7e8de48a1ba1f29ba75607da652c48e5 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Fri, 7 Feb 2020 14:03:30 +0100 Subject: [PATCH 14/37] Updated build scripts --- build-deb | 2 +- build-rpm | 2 +- clean-deb | 2 +- filter-empty-entries | 2 +- make-deb | 2 +- make-ppa | 6 +++--- make-srpm | 2 +- make-upstream-package | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build-deb b/build-deb index f098e8127..0ea01ea16 100755 --- a/build-deb +++ b/build-deb @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Debian Packaging Scripts -# Copyright (C) 2002-2019 by Thomas Dreibholz +# Copyright (C) 2002-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/build-rpm b/build-rpm index c062b8ecb..c7caa0788 100755 --- a/build-rpm +++ b/build-rpm @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Packaging Scripts -# Copyright (C) 2017-2019 by Thomas Dreibholz +# Copyright (C) 2017-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/clean-deb b/clean-deb index 075e8fa0f..372796166 100755 --- a/clean-deb +++ b/clean-deb @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Debian Packaging Scripts -# Copyright (C) 2002-2019 by Thomas Dreibholz +# Copyright (C) 2002-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/filter-empty-entries b/filter-empty-entries index 892884462..f89919c75 100755 --- a/filter-empty-entries +++ b/filter-empty-entries @@ -1,7 +1,7 @@ #!/usr/bin/perl # # Debian Packaging Scripts -# Copyright (C) 2002-2019 by Thomas Dreibholz +# Copyright (C) 2002-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/make-deb b/make-deb index 0157e04b1..d0cedb06b 100755 --- a/make-deb +++ b/make-deb @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Debian Packaging Scripts -# Copyright (C) 2002-2019 by Thomas Dreibholz +# Copyright (C) 2002-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/make-ppa b/make-ppa index 74ba49d23..c606369c8 100755 --- a/make-ppa +++ b/make-ppa @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Packaging Scripts -# Copyright (C) 2002-2019 by Thomas Dreibholz +# Copyright (C) 2002-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ COPR=0 DPUT=0 # NOTE: These are the supported distributions by Ubuntu Launchpad and Debian: -DPUT_DISTRIBUTIONS="precise trusty xenial bionic disco eoan unstable" +DPUT_DISTRIBUTIONS="precise trusty xenial bionic disco eoan focal unstable" while [ $# -gt 0 ] ; do if [ "$1" == "dput" ] ; then @@ -114,7 +114,7 @@ if [ ${COPR} -ne 0 ] ; then fi COPR_CLI="" - for directory in /usr/bin ~/.local/bin ; do + for directory in /usr/bin /usr/local/bin ~/.local/bin ; do if [ -x "${directory}/copr-cli" ] ; then COPR_CLI="${directory}/copr-cli" break diff --git a/make-srpm b/make-srpm index 79b051df1..d9190aa43 100755 --- a/make-srpm +++ b/make-srpm @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Packaging Scripts -# Copyright (C) 2017-2019 by Thomas Dreibholz +# Copyright (C) 2017-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/make-upstream-package b/make-upstream-package index e7c31c433..e0e993927 100755 --- a/make-upstream-package +++ b/make-upstream-package @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Packaging Scripts -# Copyright (C) 2017-2019 by Thomas Dreibholz +# Copyright (C) 2017-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by From f779bf2ccd479ff6210dcd0363369a4db5567705 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Fri, 7 Feb 2020 14:03:30 +0100 Subject: [PATCH 15/37] Updated build scripts --- ci/before-install | 2 +- ci/build | 2 +- ci/enter | 2 +- ci/get-container | 2 +- ci/get-dependencies | 2 +- ci/install | 8 ++++---- ci/monitor | 2 +- ci/retry | 2 +- ci/run-test | 2 +- ci/test | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ci/before-install b/ci/before-install index b1aa2b4c1..67388d645 100755 --- a/ci/before-install +++ b/ci/before-install @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/build b/ci/build index 59d99f472..3d25293bb 100755 --- a/ci/build +++ b/ci/build @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/enter b/ci/enter index 3056e5938..cf292a730 100755 --- a/ci/enter +++ b/ci/enter @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/get-container b/ci/get-container index 5e64d8090..9ade29509 100755 --- a/ci/get-container +++ b/ci/get-container @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/get-dependencies b/ci/get-dependencies index 303e7eb94..3eee50417 100755 --- a/ci/get-dependencies +++ b/ci/get-dependencies @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/install b/ci/install index ffdb6e786..91b306cb7 100755 --- a/ci/install +++ b/ci/install @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -97,7 +97,7 @@ elif [ "${TRAVIS_OS_NAME}" == "linux" -a "${DOCKER}" != "" -a "${QEMU}" == "" ] else mirror="http://deb.debian.org/debian" fi - echo "mirror=$mirror" + echo "mirror=${mirror}" # ====== Ubuntu/Debian: add repositories (dreibh:ppa, backports, updates) @@ -226,9 +226,9 @@ EOF\"" arch=`sudo docker exec -t ${CONTAINER} env LANG=C.UTF-8 uname -m | sed -e "s/[^0-9a-zA-Z_+-]//g"` if ! sudo docker exec ${CONTAINER} grep "^\[copr-dreibh-ppa\]" /etc/mock/fedora-${release}-${arch}.cfg ; then shopt -s extglob - ppa="[copr-dreibh-ppa]\nname=Copr repo for ppa owned by dreibh\nbaseurl=https://copr-be.cloud.fedoraproject.org/results/dreibh/ppa/fedora-\\\$releasever-\\\$basearch/\ntype=rpm-md\nskip_if_unavailable=True\ngpgcheck=1\ngpgkey=https://copr-be.cloud.fedoraproject.org/results/dreibh/ppa/pubkey.gpg\nrepo_gpgcheck=0\nenabled=1" + ppa="config_opts['yum.conf'] += \"\"\"\n[copr-dreibh-ppa]\nname=Copr repo for ppa owned by dreibh\nbaseurl=https://copr-be.cloud.fedoraproject.org/results/dreibh/ppa/fedora-\$releasever-\$basearch/\ntype=rpm-md\nskip_if_unavailable=True\ngpgcheck=1\ngpgkey=https://copr-be.cloud.fedoraproject.org/results/dreibh/ppa/pubkey.gpg\nrepo_gpgcheck=0\nenabled=1\n\"\"\"" ppa="${ppa//+( )$/\\n}" - sudo docker exec ${CONTAINER} sed -e "s@^# repos@# repos\n${ppa}@g" -i /etc/mock/fedora-${release}-${arch}.cfg + echo -e "${ppa}" | sudo docker exec -i ${CONTAINER} tee -a /etc/mock/fedora-${release}-${arch}.cfg if ! sudo docker exec ${CONTAINER} grep "^\[copr-dreibh-ppa\]" /etc/mock/fedora-${release}-${arch}.cfg ; then echo >&2 "ERROR: Unable to inject PPA configuration into Mock configuration file /etc/mock/fedora-${release}-${arch}.cfg!" exit 1 diff --git a/ci/monitor b/ci/monitor index 64570186f..f49cd4948 100755 --- a/ci/monitor +++ b/ci/monitor @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/retry b/ci/retry index a1be18614..39924c2a9 100755 --- a/ci/retry +++ b/ci/retry @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/run-test b/ci/run-test index c2655678f..750ff545e 100755 --- a/ci/run-test +++ b/ci/run-test @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/ci/test b/ci/test index 181fbe686..e470d045d 100755 --- a/ci/test +++ b/ci/test @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Travis CI Scripts -# Copyright (C) 2018-2019 by Thomas Dreibholz +# Copyright (C) 2018-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by From 3dd0c813e2f3ac5a94e48c697a7979dadd74481c Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Fri, 7 Feb 2020 14:05:00 +0100 Subject: [PATCH 16/37] A fix. --- CMakeLists.txt | 2 +- debian/changelog | 4 +- freebsd/libusrsctp/Makefile | 2 +- meson.build | 241 ------------------------------------ rpm/libusrsctp.spec | 2 +- 5 files changed, 5 insertions(+), 246 deletions(-) delete mode 100644 meson.build diff --git a/CMakeLists.txt b/CMakeLists.txt index a16028647..279756bab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ project(libusrsctp C) SET(BUILD_MAJOR "1") SET(BUILD_MINOR "0") -SET(BUILD_PATCH "0~td131") +SET(BUILD_PATCH "0~td132") set(BUILD_VERSION ${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_PATCH}) diff --git a/debian/changelog b/debian/changelog index dda5d131e..2bff51cbe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ -libusrsctp (1.0.0~td131-1ubuntu1) focal; urgency=medium +libusrsctp (1.0.0~td132-1ubuntu1) focal; urgency=medium * Initial release. * debian/control: Updated standards version to 4.5.0.0. - -- Thomas Dreibholz Fri, 07 Feb 2020 13:54:12 +0100 + -- Thomas Dreibholz Fri, 07 Feb 2020 14:03:38 +0100 diff --git a/freebsd/libusrsctp/Makefile b/freebsd/libusrsctp/Makefile index c2a1786f1..7fdc30992 100644 --- a/freebsd/libusrsctp/Makefile +++ b/freebsd/libusrsctp/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= libusrsctp -PORTVERSION= 1.0.0~td131 +PORTVERSION= 1.0.0~td132 CATEGORIES= net MASTER_SITES= https://packages.nntb.no/software/libusrsctp/ diff --git a/meson.build b/meson.build deleted file mode 100644 index 28a1490d7..000000000 --- a/meson.build +++ /dev/null @@ -1,241 +0,0 @@ -# Project definition -project('usrsctplib', 'c', - version: '1.0.0', - default_options: ['c_std=c99'], - meson_version: '>=0.49.0') - -# Set compiler warning flags -compiler = meson.get_compiler('c') -if compiler.get_argument_syntax() == 'msvc' - compiler_args = compiler.get_supported_arguments([ - '/wd4100', # 'identifier' : unreferenced formal parameter - '/wd4127', # conditional expression is constant - '/wd4200', # nonstandard extension used : zero-sized array in struct/union - '/wd4214', # bit field types other than int - '/wd4706', # assignment within conditional expression - '/wd4245', # 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch - '/wd4389', # 'operator' : signed/unsigned mismatch - '/wd4702', # unreachable code - '/wd4701', # Potentially uninitialized local variable 'name' used - '/wd4244', # 'conversion' conversion from 'type1' to 'type2', possible loss of data - ]) -else - compiler_args = compiler.get_supported_arguments([ - '-pedantic', - '-Wall', - '-Wextra', - '-Wfloat-equal', - '-Wshadow', - '-Wpointer-arith', - '-Winit-self', - '-Wno-unused-function', - '-Wno-unused-parameter', - '-Wno-unreachable-code', - '-Wstrict-prototypes', - ]) -endif -add_project_arguments(compiler_args, language: 'c') - -# Configuration -compile_args = [] - -# Dependency: Threads -thread_dep = dependency('threads', required: true) - -# Dependencies list -dependencies = [ - thread_dep, -] - -# Global settings -add_project_arguments([ - '-D__Userspace__', - '-DSCTP_SIMPLE_ALLOCATOR', - '-DSCTP_PROCESS_LEVEL_LOCKS', -], language: 'c') - -# OS-specific settings -system = host_machine.system() -if system in ['linux', 'android'] - add_project_arguments([ - '-D__Userspace_os_Linux', - '-D_GNU_SOURCE', - ], language: 'c') -elif system == 'freebsd' - add_project_arguments([ - '-D__Userspace_os_FreeBSD', - '-U__FreeBSD__', - ] + compiler.get_supported_arguments([ - '-Wno-address-of-packed-member', - ]), language: 'c') -elif system in ['darwin', 'ios'] - add_project_arguments([ - '-D__Userspace_os_Darwin', - '-D__APPLE_USE_RFC_2292', - ] + compiler.get_supported_arguments([ - '-Wno-address-of-packed-member', - '-Wno-deprecated-declarations', - ]), language: 'c') -elif system == 'dragonfly' - add_project_arguments([ - '-D__Userspace_os_DragonFly', - '-U__DragonFly__', - ], language: 'c') -elif system == 'netbsd' - add_project_arguments([ - '-D__Userspace_os_NetBSD', - '-U__NetBSD__', - ], language: 'c') -elif system == 'openbsd' - add_project_arguments([ - '-D__Userspace_os_OpenBSD', - '-U__OpenBSD__', - ], language: 'c') -elif system == 'windows' - add_project_arguments('-D__Userspace_os_Windows', language: 'c') - dependencies += compiler.find_library('ws2_32', required: true) - dependencies += compiler.find_library('iphlpapi', required: true) - if compiler.get_id() == 'gcc' - add_project_arguments(compiler.get_supported_arguments([ - '-Wno-format', - '-D_WIN32_WINNT=0x601', # Enables inet_ntop and friends - ]), language: 'c') - endif -else - error('Unknown system: @0@'.format(system)) -endif - -# Feature: sys/queue -if compiler.has_header('sys/queue.h') - add_project_arguments('-DHAVE_SYS_QUEUE_H', language: 'c') -endif - -# Feature: sys/socket, linux/ifaddr, linux/rtnetlink -if compiler.has_header('sys/socket.h') - if compiler.has_header('linux/if_addr.h') - add_project_arguments('-DHAVE_LINUX_IF_ADDR_H', language: 'c') - endif - - if compiler.has_header('linux/rtnetlink.h') - add_project_arguments('-DHAVE_LINUX_RTNETLINK_H', language: 'c') - endif -endif - -# Feature: ICMP -have_sys_types = compiler.has_header('sys/types.h') -have_netinet_in = compiler.has_header('netinet/in.h') -have_netinet_ip = compiler.has_header('netinet/ip.h') -have_netinet_ip_icmp = compiler.has_header('netinet/ip_icmp.h') -if have_sys_types and have_netinet_in and have_netinet_ip and have_netinet_ip_icmp - add_project_arguments('-DHAVE_NETINET_IP_ICMP_H', language: 'c') -endif - -# Feature: stdatomic -if compiler.has_header('stdatomic.h') - add_project_arguments('-DHAVE_STDATOMIC_H', language: 'c') -endif - -# Feature: sockaddr.sa_len -prefix = ''' -#include -#include -''' -have_sa_len = compiler.has_member('struct sockaddr', 'sa_len', prefix: prefix) -if have_sa_len - add_project_arguments('-DHAVE_SA_LEN', language: 'c') -endif - -# Feature: sockaddr_in.sin_len / sockaddr_in6.sin6_len / sockaddr_conn.sconn_len -prefix = ''' -#include -#include -''' -have_sin_len = compiler.has_member('struct sockaddr_in', 'sin_len', prefix: prefix) -if have_sin_len - add_project_arguments('-DHAVE_SIN_LEN', language: 'c') -endif -have_sin6_len = compiler.has_member('struct sockaddr_in6', 'sin6_len', prefix: prefix) -if have_sin6_len - add_project_arguments('-DHAVE_SIN6_LEN', language: 'c') -endif -have_sconn_len = compiler.has_member('struct sockaddr_conn', 'sconn_len', prefix: '#include "usrsctp.h"', include_directories: include_directories('usrsctplib')) -if have_sconn_len - add_project_arguments('-DHAVE_SCONN_LEN', language: 'c') -endif - -# Options -if get_option('sctp_invariants') - add_project_arguments('-DINVARIANTS', language: 'c') -endif -if get_option('sctp_debug') - add_project_arguments('-DSCTP_DEBUG', language: 'c') - compile_args += '-DSCTP_DEBUG' -endif -if get_option('sctp_inet') - add_project_arguments('-DINET', language: 'c') -endif -if get_option('sctp_inet6') - add_project_arguments('-DINET6', language: 'c') -endif - -# Library -subdir('usrsctplib') - -# Build library -if compiler.get_id() == 'msvc' and get_option('default_library') == 'shared' - # Needed by usrsctp_def - find_program('dumpbin') - - usrsctp_static = static_library('usrsctp-static', sources, - dependencies: dependencies, - include_directories: include_dirs) - - usrsctp_def = custom_target('usrsctp.def', - command: [find_program('gen-def.py'), '@INPUT@'], - input: usrsctp_static, - output: 'usrsctp.def', - capture: true) - - usrsctp = shared_library('usrsctp', - link_whole: usrsctp_static, - dependencies: dependencies, - vs_module_defs: usrsctp_def, - install: true, - version: meson.project_version()) -else - usrsctp = library('usrsctp', sources, - dependencies: dependencies, - include_directories: include_dirs, - install: true, - version: meson.project_version(), - c_args: '-U__APPLE__') -endif - -# Declare dependency -usrsctp_dep = declare_dependency( - compile_args: compile_args, - include_directories: include_dirs, - link_with: usrsctp) - -# Generate pkg-config file -pkg = import('pkgconfig') -pkg.generate(usrsctp, - name: 'usrsctp', - description: 'A portable SCTP userland stack', - url: 'https://github.com/sctplab/usrsctp', - extra_cflags: compile_args) - -# Programs (optional) -if get_option('sctp_build_programs') - subdir('programs') - - # Build executables - foreach name, sources : programs - executable( - name, - programs_helper_sources + sources, - dependencies: dependencies, - link_with: usrsctp, - include_directories: include_dirs) - endforeach -endif diff --git a/rpm/libusrsctp.spec b/rpm/libusrsctp.spec index 2e9959b80..432069c0a 100644 --- a/rpm/libusrsctp.spec +++ b/rpm/libusrsctp.spec @@ -1,5 +1,5 @@ Name: libusrsctp -Version: 1.0.0~td131 +Version: 1.0.0~td132 Release: 1 Summary: Portable SCTP Userland Stack License: BSD From 431d96343a03322b3322c7c92fb83b6393f5d5cd Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Tue, 14 Apr 2020 19:13:38 +0200 Subject: [PATCH 17/37] Updated build scripts --- build-deb | 2 +- clean-deb | 2 +- filter-empty-entries | 2 +- make-deb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build-deb b/build-deb index 0ea01ea16..6ec9982bc 100755 --- a/build-deb +++ b/build-deb @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Debian Packaging Scripts +# Debian/Ubuntu Packaging Scripts # Copyright (C) 2002-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify diff --git a/clean-deb b/clean-deb index 372796166..5d07b0adf 100755 --- a/clean-deb +++ b/clean-deb @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Debian Packaging Scripts +# Debian/Ubuntu Packaging Scripts # Copyright (C) 2002-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify diff --git a/filter-empty-entries b/filter-empty-entries index f89919c75..42ec4e927 100755 --- a/filter-empty-entries +++ b/filter-empty-entries @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# Debian Packaging Scripts +# Debian/Ubuntu Packaging Scripts # Copyright (C) 2002-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify diff --git a/make-deb b/make-deb index d0cedb06b..e4bd30171 100755 --- a/make-deb +++ b/make-deb @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Debian Packaging Scripts +# Debian/Ubuntu Packaging Scripts # Copyright (C) 2002-2020 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify From a4f4873c905789ab1934d45018dd0721a9aea04c Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Tue, 14 Apr 2020 19:13:38 +0200 Subject: [PATCH 18/37] Updated build scripts --- ci/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/install b/ci/install index 91b306cb7..2f72cc404 100755 --- a/ci/install +++ b/ci/install @@ -226,7 +226,7 @@ EOF\"" arch=`sudo docker exec -t ${CONTAINER} env LANG=C.UTF-8 uname -m | sed -e "s/[^0-9a-zA-Z_+-]//g"` if ! sudo docker exec ${CONTAINER} grep "^\[copr-dreibh-ppa\]" /etc/mock/fedora-${release}-${arch}.cfg ; then shopt -s extglob - ppa="config_opts['yum.conf'] += \"\"\"\n[copr-dreibh-ppa]\nname=Copr repo for ppa owned by dreibh\nbaseurl=https://copr-be.cloud.fedoraproject.org/results/dreibh/ppa/fedora-\$releasever-\$basearch/\ntype=rpm-md\nskip_if_unavailable=True\ngpgcheck=1\ngpgkey=https://copr-be.cloud.fedoraproject.org/results/dreibh/ppa/pubkey.gpg\nrepo_gpgcheck=0\nenabled=1\n\"\"\"" + ppa="config_opts['dnf.conf'] += \"\"\"\n[copr-dreibh-ppa]\nname=Copr repo for ppa owned by dreibh\nbaseurl=https://copr-be.cloud.fedoraproject.org/results/dreibh/ppa/fedora-\$releasever-\$basearch/\ntype=rpm-md\nskip_if_unavailable=True\ngpgcheck=1\ngpgkey=https://copr-be.cloud.fedoraproject.org/results/dreibh/ppa/pubkey.gpg\nrepo_gpgcheck=0\nenabled=1\n\"\"\"" ppa="${ppa//+( )$/\\n}" echo -e "${ppa}" | sudo docker exec -i ${CONTAINER} tee -a /etc/mock/fedora-${release}-${arch}.cfg if ! sudo docker exec ${CONTAINER} grep "^\[copr-dreibh-ppa\]" /etc/mock/fedora-${release}-${arch}.cfg ; then @@ -368,7 +368,7 @@ elif [ "${TRAVIS_OS_NAME}" == "linux" -a "${QEMU}" == "FreeBSD" ] ; then sudo mount --bind `pwd` /travis sudo bash -c "echo \"/travis 192.168.100.0/24(rw,no_root_squash)\" >/etc/exports" env LANG=C.UTF-8 ci/retry -t ${RETRY_MAXTRIALS} -p ${RETRY_PAUSE} -- \ - sudo apt-get install -y qemu-kvm nfs-kernel-server + sudo env LANG=C.UTF-8 DEBIAN_FRONTEND=noninteractive apt-get install -y qemu-kvm nfs-kernel-server sudo exportfs -v sudo service nfs-kernel-server restart @@ -424,7 +424,7 @@ elif [ "${TRAVIS_OS_NAME}" == "linux" -a "${QEMU}" == "FreeBSD" ] ; then # --- "portsnap --interactive fetch extract | grep -v ^/usr/ports" # Using Git is much faster: ssh -p 8829 -oStrictHostKeyChecking=no -i ~/.ssh/id_rsa root@localhost \ - "rm -rf /usr/ports ; git clone --depth=1 --filter=tree:0 https://github.com/freebsd/freebsd-ports /usr/ports" + "rm -rf /usr/ports ; git clone --depth=1 https://github.com/freebsd/freebsd-ports /usr/ports" # Package's dependencies: ssh -p 8829 -oStrictHostKeyChecking=no -i ~/.ssh/id_rsa root@localhost \ From 77459aa4ff94b8d92db470a4229f6e6e64d98beb Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Thu, 16 Apr 2020 11:42:56 +0200 Subject: [PATCH 19/37] Updated Travis CI configuration: Ubuntu 19.04 (Disco Dingo) is now obsolete. --- .travis.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index b7781ed59..f02841676 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,22 +43,6 @@ matrix: group: travis_latest env: DOCKER="ubuntu:eoan" VARIANT="ubuntu" TOOL="pbuilder" - # ====== Ubuntu 19.04 (Disco Dingo) ====================================== - - name: "Ubuntu 19.04 (Disco Dingo) with GCC" - os: linux - dist: bionic - group: travis_latest - env: DOCKER="ubuntu:disco" VARIANT="ubuntu" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - - name: "Ubuntu 19.04 (Disco Dingo) with Clang" - os: linux - dist: bionic - group: travis_latest - env: DOCKER="ubuntu:disco" VARIANT="ubuntu" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - - name: "Ubuntu 19.04 (Disco Dingo) packaging with pbuilder" - dist: bionic - group: travis_latest - env: DOCKER="ubuntu:disco" VARIANT="ubuntu" TOOL="pbuilder" - # ====== Ubuntu 18.04 (Bionic Beaver) ==================================== - name: "Ubuntu 18.04 (Bionic Beaver) with GCC" os: linux From 776293d88d1f3aa640ab715a64ae8b010421dcff Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Fri, 17 Apr 2020 11:30:58 +0200 Subject: [PATCH 20/37] Updated Travis CI configuration for Ubuntu builds. --- .travis.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index f02841676..f16e831fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,21 +11,21 @@ matrix: # ###### Ubuntu Linux #################################################### - # ====== Ubuntu 20.04 (Focal Fossum) ===================================== - - name: "Ubuntu 20.04 (Focal Fossum) with GCC" + # ====== Ubuntu 20.04 (Focal Fossa) ====================================== + - name: "Ubuntu 20.04 (Focal Fossa) with GCC" os: linux - dist: xenial + dist: focal group: travis_latest - env: DOCKER="ubuntu:eoan" VARIANT="ubuntu" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" - - name: "Ubuntu 20.04 (Focal Fossum) with Clang" + env: DOCKER="ubuntu:focal" VARIANT="ubuntu" TOOL="compile" COMPILER_C="gcc" COMPILER_CXX="g++" + - name: "Ubuntu 20.04 (Focal Fossa) with Clang" os: linux - dist: xenial + dist: focal group: travis_latest - env: DOCKER="ubuntu:eoan" VARIANT="ubuntu" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" - - name: "Ubuntu 20.04 (Focal Fossum) packaging with pbuilder" - dist: xenial + env: DOCKER="ubuntu:focal" VARIANT="ubuntu" TOOL="compile" COMPILER_C="clang" COMPILER_CXX="clang++" + - name: "Ubuntu 20.04 (Focal Fossa) packaging with pbuilder" + dist: focal group: travis_latest - env: DOCKER="ubuntu:eoan" VARIANT="ubuntu" TOOL="pbuilder" + env: DOCKER="ubuntu:focal" VARIANT="ubuntu" TOOL="pbuilder" # ====== Ubuntu 19.10 (Eoan Ermine) ====================================== - name: "Ubuntu 19.10 (Eoan Ermine) with GCC" From 930fd56d5fb900d387fbc3b5e4ee54882abfa28f Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Wed, 6 May 2020 22:02:23 +0200 Subject: [PATCH 21/37] Updated build scripts --- make-ppa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make-ppa b/make-ppa index c606369c8..2c1b6a20a 100755 --- a/make-ppa +++ b/make-ppa @@ -25,7 +25,7 @@ COPR=0 DPUT=0 # NOTE: These are the supported distributions by Ubuntu Launchpad and Debian: -DPUT_DISTRIBUTIONS="precise trusty xenial bionic disco eoan focal unstable" +DPUT_DISTRIBUTIONS="precise trusty xenial bionic eoan focal groovy unstable" while [ $# -gt 0 ] ; do if [ "$1" == "dput" ] ; then From 47840814601b3e41b8a8cdbe469ab7427b3eb33a Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Wed, 6 May 2020 22:02:24 +0200 Subject: [PATCH 22/37] Updated build scripts --- ci/get-dependencies | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ci/get-dependencies b/ci/get-dependencies index 3eee50417..b6a5e343f 100755 --- a/ci/get-dependencies +++ b/ci/get-dependencies @@ -27,14 +27,15 @@ import subprocess import sys -# ###### Write dependency ################################################### -dep = re.compile(r'^([a-zA-Z0-9-+\.]+)[\s]*(|\|.*|\(.*)[\s]*$') +# ###### Extract dependencies ############################################### +depLine = re.compile(r'^(.*:[ \t]*)(.*)$') +depItem = re.compile(r'^([a-zA-Z0-9-+\.]+)[\s]*(|\|.*|\(.*)[\s]*$') def extractDependencies(line, system): dependencies = [] # Remove "build-depends:", etc.: - m = re.match(r'^(.*:[ \t]*)([a-zA-Z0-9-+]*)(.*)$', line) + m = depLine.match(line) if m != None: line = m.group(2) line = line.strip() @@ -42,7 +43,7 @@ def extractDependencies(line, system): # Split into segments for l in line.split(','): l = l.strip() - m = dep.match(l) + m = depItem.match(l) if m != None: dependency = m.group(1) From b55a2475c8a36ffe47601d9860a591a5c963d2d4 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Wed, 16 Feb 2022 14:48:01 +0100 Subject: [PATCH 23/37] Merged upstream changes. --- CMakeLists.txt | 10 +--------- debian/changelog | 5 +++-- debian/control | 3 ++- debian/libusrsctp-dev.install | 2 +- debian/libusrsctp-examples.install | 2 +- debian/rules | 3 +++ freebsd/libusrsctp/Makefile | 2 +- packaging.conf | 3 ++- rpm/libusrsctp.spec | 2 +- usrsctplib/CMakeLists.txt | 18 +++++++++++++----- 10 files changed, 28 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 572394f3b..db4a3ed63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ project(libusrsctp C) SET(BUILD_MAJOR "1") SET(BUILD_MINOR "0") -SET(BUILD_PATCH "0~td132") +SET(BUILD_PATCH "0~td133") set(BUILD_VERSION ${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_PATCH}) @@ -311,14 +311,6 @@ message(STATUS "Compiler flags (CMAKE_C_FLAGS): ${CMAKE_C_FLAGS}") # INCLUDE SUBDIRS ################################################# -# Enable verbose output in DEBUG mode -if (${CMAKE_BUILD_TYPE} MATCHES "DEBUG") - message(STATUS "enabling verbose outout") - set(CMAKE_VERBOSE_MAKEFILE on) -endif() - -find_package(Threads REQUIRED) - add_subdirectory(usrsctplib) if (sctp_build_programs) diff --git a/debian/changelog b/debian/changelog index 2bff51cbe..a91e166ae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ -libusrsctp (1.0.0~td132-1ubuntu1) focal; urgency=medium +libusrsctp (1.0.0~td133-1ubuntu1) focal; urgency=medium * Initial release. * debian/control: Updated standards version to 4.5.0.0. + * debian/control: Updated standards version to 4.6.0.1. - -- Thomas Dreibholz Fri, 07 Feb 2020 14:03:38 +0100 + -- Thomas Dreibholz Wed, 16 Feb 2022 14:11:24 +0100 diff --git a/debian/control b/debian/control index de8a334d6..d40525d27 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,8 @@ Priority: optional Build-Depends: cmake (>= 3.0.2) | cmake3, debhelper (>= 9), libfile-fcntllock-perl -Standards-Version: 4.5.0.0 +Standards-Version: 4.6.0.1 +Rules-Requires-Root: no Vcs-Browser: https://github.com/sctplab/usrsctp Vcs-Git: https://github.com/sctplab/usrsctp.git Homepage: https://github.com/sctplab/usrsctp diff --git a/debian/libusrsctp-dev.install b/debian/libusrsctp-dev.install index 1b01a65fe..ff673c16f 100644 --- a/debian/libusrsctp-dev.install +++ b/debian/libusrsctp-dev.install @@ -1,3 +1,3 @@ +# usr/lib/*/libusrsctp*.a usr/include/usrsctp.h -usr/lib/*/libusrsctp*.a usr/lib/*/libusrsctp*.so diff --git a/debian/libusrsctp-examples.install b/debian/libusrsctp-examples.install index 08b045a34..3cb679375 100644 --- a/debian/libusrsctp-examples.install +++ b/debian/libusrsctp-examples.install @@ -9,13 +9,13 @@ usr/bin/echo_server usr/bin/echo_server_upcall usr/bin/ekr_client usr/bin/ekr_loop -usr/bin/ekr_loop_offload usr/bin/ekr_loop_upcall usr/bin/ekr_peer usr/bin/ekr_server usr/bin/http_client usr/bin/http_client_upcall usr/bin/rtcweb +usr/bin/st_client usr/bin/test_libmgmt usr/bin/test_timer usr/bin/tsctp diff --git a/debian/rules b/debian/rules index 9c44efee5..45313263e 100644 --- a/debian/rules +++ b/debian/rules @@ -4,3 +4,6 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ --buildsystem cmake --parallel + +override_dh_auto_configure: + dh_auto_configure -- -Dsctp_build_shared_lib=1 diff --git a/freebsd/libusrsctp/Makefile b/freebsd/libusrsctp/Makefile index 7fdc30992..9ea4b9ec1 100644 --- a/freebsd/libusrsctp/Makefile +++ b/freebsd/libusrsctp/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= libusrsctp -PORTVERSION= 1.0.0~td132 +PORTVERSION= 1.0.0~td133 CATEGORIES= net MASTER_SITES= https://packages.nntb.no/software/libusrsctp/ diff --git a/packaging.conf b/packaging.conf index 3803c8b1b..82f453f4d 100644 --- a/packaging.conf +++ b/packaging.conf @@ -2,8 +2,9 @@ # --------------------------------------------------------- MAKE_DIST="./autogen.sh && make dist" -NOT_TARGET_DISTRIBUTIONS="lucid precise" # <<-- Distrubutions which are *not* supported! +NOT_TARGET_DISTRIBUTIONS="unstable lucid precise trusty" # <<-- Distrubutions which are *not* supported! MAINTAINER="Thomas Dreibholz " +MAINTAINER_KEY="21412672518D8B2D1862EFEF5CD5D12AA0877B49" DEBIAN_LAST_ENTRY="" UBUNTU_LAST_ENTRY="" SKIP_PACKAGE_SIGNING=0 # <<-- Must be set to 0 (=off) for PPA upload! diff --git a/rpm/libusrsctp.spec b/rpm/libusrsctp.spec index 432069c0a..532a38a2c 100644 --- a/rpm/libusrsctp.spec +++ b/rpm/libusrsctp.spec @@ -1,5 +1,5 @@ Name: libusrsctp -Version: 1.0.0~td132 +Version: 1.0.0~td133 Release: 1 Summary: Portable SCTP Userland Stack License: BSD diff --git a/usrsctplib/CMakeLists.txt b/usrsctplib/CMakeLists.txt index 93f6f4dde..e7133620d 100644 --- a/usrsctplib/CMakeLists.txt +++ b/usrsctplib/CMakeLists.txt @@ -91,10 +91,6 @@ endif () # MISC ################################################# -if (sctp_build_shared_lib) - set(BUILD_SHARED_LIBS 1) -endif () - find_package(Threads) ################################################# @@ -182,7 +178,19 @@ list(APPEND usrsctp_sources user_socket.c ) -add_library(usrsctp ${usrsctp_sources} ${usrsctp_headers}) +add_library(usrsctp STATIC ${usrsctp_sources} ${usrsctp_headers}) +if (sctp_build_shared_lib) + add_library(usrsctp-shared SHARED ${usrsctp_sources} ${usrsctp_headers}) + target_include_directories(usrsctp-shared PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + if(SCTP_USE_MBEDTLS_SHA1) + target_include_directories(usrsctp-shared PRIVATE ${MBEDTLS_INCLUDE_DIRS}) + endif() + target_link_libraries(usrsctp-shared ${CMAKE_THREAD_LIBS_INIT}) + set_target_properties(usrsctp-shared PROPERTIES OUTPUT_NAME "usrsctp") + set_target_properties(usrsctp-shared PROPERTIES IMPORT_SUFFIX "_import.lib") + set_target_properties(usrsctp-shared PROPERTIES SOVERSION ${SOVERSION_SHORT} VERSION ${SOVERSION_FULL}) + install(TARGETS usrsctp-shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif () target_include_directories(usrsctp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) From 29da8b9c84ee018d9b6d0abdeef86539bca5e3a8 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Wed, 16 Feb 2022 14:57:58 +0100 Subject: [PATCH 24/37] Packaging improvements. --- debian/control | 9 ++++----- debian/libusrsctp-dev.install | 2 +- debian/{libusrsctp1.install => libusrsctp2.install} | 0 3 files changed, 5 insertions(+), 6 deletions(-) rename debian/{libusrsctp1.install => libusrsctp2.install} (100%) diff --git a/debian/control b/debian/control index d40525d27..47e8efc00 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Vcs-Browser: https://github.com/sctplab/usrsctp Vcs-Git: https://github.com/sctplab/usrsctp.git Homepage: https://github.com/sctplab/usrsctp -Package: libusrsctp1 +Package: libusrsctp2 Section: libs Architecture: any Depends: ${misc:Depends}, @@ -26,9 +26,8 @@ Description: Portable SCTP Userland Stack Package: libusrsctp-dev Section: libdevel Architecture: any -Depends: libusrsctp1 (= ${binary:Version}), - ${misc:Depends}, - ${shlibs:Depends} +Depends: libusrsctp2 (= ${binary:Version}), + ${misc:Depends} Description: Portable SCTP Userland Stack (Development Files) This is a userland SCTP stack supporting FreeBSD, Linux, Mac OS X and Windows. @@ -38,7 +37,7 @@ Description: Portable SCTP Userland Stack (Development Files) Package: libusrsctp-examples Architecture: any -Depends: libusrsctp1 (= ${binary:Version}), +Depends: libusrsctp2 (= ${binary:Version}), ${misc:Depends}, ${shlibs:Depends} Description: Portable SCTP Userland Stack (Examples) diff --git a/debian/libusrsctp-dev.install b/debian/libusrsctp-dev.install index ff673c16f..1b01a65fe 100644 --- a/debian/libusrsctp-dev.install +++ b/debian/libusrsctp-dev.install @@ -1,3 +1,3 @@ -# usr/lib/*/libusrsctp*.a usr/include/usrsctp.h +usr/lib/*/libusrsctp*.a usr/lib/*/libusrsctp*.so diff --git a/debian/libusrsctp1.install b/debian/libusrsctp2.install similarity index 100% rename from debian/libusrsctp1.install rename to debian/libusrsctp2.install From 6fc4b60ebfa86d6a78fb0dd368db88a59bd56bc0 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Wed, 16 Feb 2022 16:04:13 +0100 Subject: [PATCH 25/37] RPM spec update. --- rpm/libusrsctp.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/libusrsctp.spec b/rpm/libusrsctp.spec index 532a38a2c..0202a5393 100644 --- a/rpm/libusrsctp.spec +++ b/rpm/libusrsctp.spec @@ -40,7 +40,7 @@ Requires: %{name} = %{version}-%{release} %setup -q %build -%cmake -DCMAKE_INSTALL_PREFIX=/usr . +%cmake -DCMAKE_INSTALL_PREFIX=/usr -Dsctp_build_shared_lib=1 . make %{?_smp_mflags} %install From ddb577a56d4c688f8582e5b02b351cfbc4d257c4 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Wed, 16 Feb 2022 16:32:32 +0100 Subject: [PATCH 26/37] RPM spec improvements. --- rpm/libusrsctp.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rpm/libusrsctp.spec b/rpm/libusrsctp.spec index 0202a5393..e7b400a0f 100644 --- a/rpm/libusrsctp.spec +++ b/rpm/libusrsctp.spec @@ -41,10 +41,10 @@ Requires: %{name} = %{version}-%{release} %build %cmake -DCMAKE_INSTALL_PREFIX=/usr -Dsctp_build_shared_lib=1 . -make %{?_smp_mflags} +%cmake_build %install -make install DESTDIR=%{buildroot} +%cmake_install %files @@ -67,7 +67,6 @@ make install DESTDIR=%{buildroot} %{_bindir}/echo_server_upcall %{_bindir}/ekr_client %{_bindir}/ekr_loop -%{_bindir}/ekr_loop_offload %{_bindir}/ekr_loop_upcall %{_bindir}/ekr_peer %{_bindir}/ekr_server From fc0b3923c4fb771af52d7c83e59696f454dab20d Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Wed, 16 Feb 2022 16:48:19 +0100 Subject: [PATCH 27/37] RPM spec update. --- rpm/libusrsctp.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/rpm/libusrsctp.spec b/rpm/libusrsctp.spec index e7b400a0f..953aa7208 100644 --- a/rpm/libusrsctp.spec +++ b/rpm/libusrsctp.spec @@ -54,6 +54,7 @@ Requires: %{name} = %{version}-%{release} %{_includedir}/usrsctp.h %{_libdir}/libusrsctp*.a %{_libdir}/libusrsctp*.so +%{_libdir}/pkgconfig/usrsctp.pc %files examples %{_bindir}/chargen_server_upcall From 25b359f17d53470d8628ed4a6efe98cb747847df Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Thu, 17 Feb 2022 10:25:48 +0100 Subject: [PATCH 28/37] Fix for 'error: 'cause_code' may be used uninitialized in this function' (false positive) under Fedora 34 and 35. --- usrsctplib/netinet/sctputil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usrsctplib/netinet/sctputil.c b/usrsctplib/netinet/sctputil.c index 55d3a152e..e9c56857f 100755 --- a/usrsctplib/netinet/sctputil.c +++ b/usrsctplib/netinet/sctputil.c @@ -4590,7 +4590,7 @@ sctp_abort_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb, #endif struct sctp_gen_error_cause* cause; uint32_t vtag; - uint16_t cause_code; + uint16_t cause_code = 0; if (stcb != NULL) { vtag = stcb->asoc.peer_vtag; From 9846f9fd057dc676dc1672c6f049bd4500f1ce7c Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Thu, 17 Feb 2022 10:26:28 +0100 Subject: [PATCH 29/37] Dependency fix. --- debian/control | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 47e8efc00..b4c6330c3 100644 --- a/debian/control +++ b/debian/control @@ -3,8 +3,7 @@ Maintainer: Thomas Dreibholz Section: net Priority: optional Build-Depends: cmake (>= 3.0.2) | cmake3, - debhelper (>= 9), - libfile-fcntllock-perl + debhelper (>= 9) Standards-Version: 4.6.0.1 Rules-Requires-Root: no Vcs-Browser: https://github.com/sctplab/usrsctp From 2d51cade238bd066a7c4de057aa84b23ad7c66fc Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Thu, 17 Feb 2022 10:26:43 +0100 Subject: [PATCH 30/37] Version bump. --- CMakeLists.txt | 2 +- debian/changelog | 4 ++-- freebsd/libusrsctp/Makefile | 2 +- rpm/libusrsctp.spec | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db4a3ed63..7660831cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ project(libusrsctp C) SET(BUILD_MAJOR "1") SET(BUILD_MINOR "0") -SET(BUILD_PATCH "0~td133") +SET(BUILD_PATCH "0~td134") set(BUILD_VERSION ${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_PATCH}) diff --git a/debian/changelog b/debian/changelog index a91e166ae..052c9a73f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ -libusrsctp (1.0.0~td133-1ubuntu1) focal; urgency=medium +libusrsctp (1.0.0~td134-1ubuntu1) focal; urgency=medium * Initial release. * debian/control: Updated standards version to 4.5.0.0. * debian/control: Updated standards version to 4.6.0.1. - -- Thomas Dreibholz Wed, 16 Feb 2022 14:11:24 +0100 + -- Thomas Dreibholz Thu, 17 Feb 2022 10:26:37 +0100 diff --git a/freebsd/libusrsctp/Makefile b/freebsd/libusrsctp/Makefile index 9ea4b9ec1..00e07b938 100644 --- a/freebsd/libusrsctp/Makefile +++ b/freebsd/libusrsctp/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= libusrsctp -PORTVERSION= 1.0.0~td133 +PORTVERSION= 1.0.0~td134 CATEGORIES= net MASTER_SITES= https://packages.nntb.no/software/libusrsctp/ diff --git a/rpm/libusrsctp.spec b/rpm/libusrsctp.spec index 953aa7208..832151ceb 100644 --- a/rpm/libusrsctp.spec +++ b/rpm/libusrsctp.spec @@ -1,5 +1,5 @@ Name: libusrsctp -Version: 1.0.0~td133 +Version: 1.0.0~td134 Release: 1 Summary: Portable SCTP Userland Stack License: BSD From 61d968ac1038905f32d246c9b4983b7b23583703 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Wed, 31 Aug 2022 11:20:14 +0200 Subject: [PATCH 31/37] Updated build scripts --- make-ppa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make-ppa b/make-ppa index 5dec6e7a7..2815fc3d9 100755 --- a/make-ppa +++ b/make-ppa @@ -25,7 +25,7 @@ COPR=0 DPUT=0 # NOTE: These are the supported distributions by Ubuntu Launchpad and Debian: -DPUT_DISTRIBUTIONS="precise trusty xenial bionic focal impish jammy unstable" +DPUT_DISTRIBUTIONS="precise trusty xenial bionic focal impish jammy kinetic unstable" while [ $# -gt 0 ] ; do if [ "$1" == "dput" ] ; then From 839c38d4851eb563715590b712a2d30afc2f7da0 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Wed, 31 Aug 2022 11:20:16 +0200 Subject: [PATCH 32/37] Updated CI scripts --- ci/get-dependencies | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/get-dependencies b/ci/get-dependencies index 490b9e1d8..23ca87c0b 100755 --- a/ci/get-dependencies +++ b/ci/get-dependencies @@ -83,7 +83,7 @@ for i in range(2, len(sys.argv)): dependencies = [ ] if ((system == 'debian') or (system == 'ubuntu')): if os.path.exists('debian/control'): - with open('debian/control', 'r') as fp: + with open('debian/control', 'r', encoding='utf-8') as fp: inside = False for line in fp: if not line: @@ -116,7 +116,7 @@ if ((system == 'debian') or (system == 'ubuntu')): elif system == 'fedora': specFiles = glob.glob('rpm/*.spec') if len(specFiles) == 1: - with open(specFiles[0], 'r') as fp: + with open(specFiles[0], 'r', encoding='utf-8') as fp: inside = False for line in fp: if not line: From b1e9842a19ca2d6b3709c453df2778a73d48d1d5 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Wed, 31 Aug 2022 11:47:32 +0200 Subject: [PATCH 33/37] Removed Vcs-* fields from debian/control. --- debian/control | 2 -- 1 file changed, 2 deletions(-) diff --git a/debian/control b/debian/control index b4c6330c3..10c0c3973 100644 --- a/debian/control +++ b/debian/control @@ -6,8 +6,6 @@ Build-Depends: cmake (>= 3.0.2) | cmake3, debhelper (>= 9) Standards-Version: 4.6.0.1 Rules-Requires-Root: no -Vcs-Browser: https://github.com/sctplab/usrsctp -Vcs-Git: https://github.com/sctplab/usrsctp.git Homepage: https://github.com/sctplab/usrsctp Package: libusrsctp2 From 44bde9df58c6aae69810b273c5c4d2ecee268ff0 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Wed, 15 Nov 2023 09:33:40 +0100 Subject: [PATCH 34/37] Updated build scripts --- build-deb | 4 ++-- build-rpm | 4 ++-- clean-deb | 4 ++-- fetch-debian-changelog | 2 +- filter-debian-changelog | 4 ++-- make-deb | 4 ++-- make-ppa | 6 +++--- make-srpm | 4 ++-- make-upstream-package | 4 ++-- merge-debian-changelogs | 2 +- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/build-deb b/build-deb index 6b5e21b07..dec2ce718 100755 --- a/build-deb +++ b/build-deb @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Debian/Ubuntu Packaging Scripts -# Copyright (C) 2002-2022 by Thomas Dreibholz +# Copyright (C) 2002-2024 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Contact: dreibh@iem.uni-due.de +# Contact: thomas.dreibholz@gmail.com # Bash options: set -e diff --git a/build-rpm b/build-rpm index 35ef44a86..19ac7dcbb 100755 --- a/build-rpm +++ b/build-rpm @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Packaging Scripts -# Copyright (C) 2017-2022 by Thomas Dreibholz +# Copyright (C) 2017-2024 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Contact: dreibh@iem.uni-due.de +# Contact: thomas.dreibholz@gmail.com # Bash options: set -e diff --git a/clean-deb b/clean-deb index 16fd96a80..defcd758f 100755 --- a/clean-deb +++ b/clean-deb @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Debian/Ubuntu Packaging Scripts -# Copyright (C) 2002-2022 by Thomas Dreibholz +# Copyright (C) 2002-2024 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Contact: dreibh@iem.uni-due.de +# Contact: thomas.dreibholz@gmail.com # ====== Obtain package information ========================================= diff --git a/fetch-debian-changelog b/fetch-debian-changelog index a094c143c..4d84f09b7 100755 --- a/fetch-debian-changelog +++ b/fetch-debian-changelog @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # Packaging Scripts -# Copyright (C) 2021-2022 by Thomas Dreibholz +# Copyright (C) 2021-2023 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/filter-debian-changelog b/filter-debian-changelog index 833b9af18..88ecd1e86 100755 --- a/filter-debian-changelog +++ b/filter-debian-changelog @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # Debian/Ubuntu Packaging Scripts -# Copyright (C) 2002-2022 by Thomas Dreibholz +# Copyright (C) 2002-2024 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Contact: dreibh@iem.uni-due.de +# Contact: thomas.dreibholz@gmail.com # This script filters debian/changelog entries: diff --git a/make-deb b/make-deb index 9f49913de..3566af57c 100755 --- a/make-deb +++ b/make-deb @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Debian/Ubuntu Packaging Scripts -# Copyright (C) 2002-2022 by Thomas Dreibholz +# Copyright (C) 2002-2024 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Contact: dreibh@iem.uni-due.de +# Contact: thomas.dreibholz@gmail.com # Bash options: set -e diff --git a/make-ppa b/make-ppa index 2815fc3d9..bd9a93f72 100755 --- a/make-ppa +++ b/make-ppa @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Packaging Scripts -# Copyright (C) 2002-2022 by Thomas Dreibholz +# Copyright (C) 2002-2024 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Contact: dreibh@iem.uni-due.de +# Contact: thomas.dreibholz@gmail.com # Bash options: set -e @@ -25,7 +25,7 @@ COPR=0 DPUT=0 # NOTE: These are the supported distributions by Ubuntu Launchpad and Debian: -DPUT_DISTRIBUTIONS="precise trusty xenial bionic focal impish jammy kinetic unstable" +DPUT_DISTRIBUTIONS="precise trusty xenial bionic focal jammy lunar mantic noble unstable" while [ $# -gt 0 ] ; do if [ "$1" == "dput" ] ; then diff --git a/make-srpm b/make-srpm index 635941620..3e80c0156 100755 --- a/make-srpm +++ b/make-srpm @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Packaging Scripts -# Copyright (C) 2017-2022 by Thomas Dreibholz +# Copyright (C) 2017-2024 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Contact: dreibh@iem.uni-due.de +# Contact: thomas.dreibholz@gmail.com # Bash options: set -e diff --git a/make-upstream-package b/make-upstream-package index 93aab871e..56df24fab 100755 --- a/make-upstream-package +++ b/make-upstream-package @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # Packaging Scripts -# Copyright (C) 2017-2022 by Thomas Dreibholz +# Copyright (C) 2017-2024 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Contact: dreibh@iem.uni-due.de +# Contact: thomas.dreibholz@gmail.com # Bash options: set -e diff --git a/merge-debian-changelogs b/merge-debian-changelogs index bee25218c..c7f333430 100755 --- a/merge-debian-changelogs +++ b/merge-debian-changelogs @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # Packaging Scripts -# Copyright (C) 2021-2022 by Thomas Dreibholz +# Copyright (C) 2021-2024 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by From 8a26943b9a4b8218a275b96068cf25baedeebb50 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Wed, 15 Nov 2023 09:33:42 +0100 Subject: [PATCH 35/37] Updated CI scripts --- ci/ci-build | 4 ++-- ci/ci-install | 4 ++-- ci/ci-setup | 4 ++-- ci/ci-test | 4 ++-- ci/get-dependencies | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ci/ci-build b/ci/ci-build index ee85515e3..0e18d61f1 100755 --- a/ci/ci-build +++ b/ci/ci-build @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # GitHub Actions Scripts -# Copyright (C) 2021-2022 by Thomas Dreibholz +# Copyright (C) 2021-2024 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Contact: dreibh@iem.uni-due.de +# Contact: thomas.dreibholz@gmail.com # Bash options: set -e diff --git a/ci/ci-install b/ci/ci-install index b58c6d938..8e92f65dd 100755 --- a/ci/ci-install +++ b/ci/ci-install @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # GitHub Actions Scripts -# Copyright (C) 2021-2022 by Thomas Dreibholz +# Copyright (C) 2021-2024 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Contact: dreibh@iem.uni-due.de +# Contact: thomas.dreibholz@gmail.com # Bash options: set -e diff --git a/ci/ci-setup b/ci/ci-setup index ef31c5de3..4e0a9637f 100755 --- a/ci/ci-setup +++ b/ci/ci-setup @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # GitHub Actions Scripts -# Copyright (C) 2021-2022 by Thomas Dreibholz +# Copyright (C) 2021-2024 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Contact: dreibh@iem.uni-due.de +# Contact: thomas.dreibholz@gmail.com # Bash options: set -e diff --git a/ci/ci-test b/ci/ci-test index c58b0e974..914f7a3bc 100755 --- a/ci/ci-test +++ b/ci/ci-test @@ -1,7 +1,7 @@ #!/usr/bin/env bash # # GitHub Actions Scripts -# Copyright (C) 2021-2022 by Thomas Dreibholz +# Copyright (C) 2021-2024 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Contact: dreibh@iem.uni-due.de +# Contact: thomas.dreibholz@gmail.com # Bash options: set -e diff --git a/ci/get-dependencies b/ci/get-dependencies index 23ca87c0b..3edde450a 100755 --- a/ci/get-dependencies +++ b/ci/get-dependencies @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # Travis CI Scripts -# Copyright (C) 2018-2022 by Thomas Dreibholz +# Copyright (C) 2018-2024 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . # -# Contact: dreibh@iem.uni-due.de +# Contact: thomas.dreibholz@gmail.com import glob From dd58d5f73db8b1c86b7851e5148bd724b2179738 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Wed, 15 Nov 2023 09:51:09 +0100 Subject: [PATCH 36/37] Updated build scripts --- fetch-debian-changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch-debian-changelog b/fetch-debian-changelog index 4d84f09b7..c202ffb43 100755 --- a/fetch-debian-changelog +++ b/fetch-debian-changelog @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # Packaging Scripts -# Copyright (C) 2021-2023 by Thomas Dreibholz +# Copyright (C) 2021-2024 by Thomas Dreibholz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by From cf37bc41551e49bdd967dd15cc2544302b45fae0 Mon Sep 17 00:00:00 2001 From: Thomas Dreibholz Date: Wed, 15 Nov 2023 10:53:51 +0100 Subject: [PATCH 37/37] Packaging clean-ups. --- CMakeLists.txt | 2 +- debian/changelog | 6 ++---- debian/compat | 2 +- debian/control | 6 +++--- debian/rules | 2 +- freebsd/libusrsctp/Makefile | 2 +- rpm/libusrsctp.spec | 2 +- 7 files changed, 10 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7660831cc..12287f2a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ project(libusrsctp C) SET(BUILD_MAJOR "1") SET(BUILD_MINOR "0") -SET(BUILD_PATCH "0~td134") +SET(BUILD_PATCH "0~rc1") set(BUILD_VERSION ${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_PATCH}) diff --git a/debian/changelog b/debian/changelog index 052c9a73f..f2b31a599 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,5 @@ -libusrsctp (1.0.0~td134-1ubuntu1) focal; urgency=medium +libusrsctp (1.0.0~rc1-1ubuntu1) focal; urgency=medium * Initial release. - * debian/control: Updated standards version to 4.5.0.0. - * debian/control: Updated standards version to 4.6.0.1. - -- Thomas Dreibholz Thu, 17 Feb 2022 10:26:37 +0100 + -- Thomas Dreibholz Wed, 15 Nov 2023 10:52:49 +0100 diff --git a/debian/compat b/debian/compat index ec635144f..48082f72f 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -9 +12 diff --git a/debian/control b/debian/control index 10c0c3973..21832c62a 100644 --- a/debian/control +++ b/debian/control @@ -2,9 +2,9 @@ Source: libusrsctp Maintainer: Thomas Dreibholz Section: net Priority: optional -Build-Depends: cmake (>= 3.0.2) | cmake3, - debhelper (>= 9) -Standards-Version: 4.6.0.1 +Build-Depends: cmake, + debhelper (>= 12) +Standards-Version: 4.6.2 Rules-Requires-Root: no Homepage: https://github.com/sctplab/usrsctp diff --git a/debian/rules b/debian/rules index 45313263e..7beec78ca 100644 --- a/debian/rules +++ b/debian/rules @@ -3,7 +3,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: - dh $@ --buildsystem cmake --parallel + dh $@ --buildsystem cmake override_dh_auto_configure: dh_auto_configure -- -Dsctp_build_shared_lib=1 diff --git a/freebsd/libusrsctp/Makefile b/freebsd/libusrsctp/Makefile index 00e07b938..95bfd7931 100644 --- a/freebsd/libusrsctp/Makefile +++ b/freebsd/libusrsctp/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= libusrsctp -PORTVERSION= 1.0.0~td134 +PORTVERSION= 1.0.0~rc1 CATEGORIES= net MASTER_SITES= https://packages.nntb.no/software/libusrsctp/ diff --git a/rpm/libusrsctp.spec b/rpm/libusrsctp.spec index 832151ceb..7cde3ba14 100644 --- a/rpm/libusrsctp.spec +++ b/rpm/libusrsctp.spec @@ -1,5 +1,5 @@ Name: libusrsctp -Version: 1.0.0~td134 +Version: 1.0.0~rc1 Release: 1 Summary: Portable SCTP Userland Stack License: BSD