From 8c71238d60832bef1fdc4b9b8e5d44b8f523f500 Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Wed, 22 Dec 2021 13:13:12 +0200 Subject: [PATCH 01/10] Initial attempt at debian packaging, modified hyperscan packaging --- CMakeLists.txt | 2 +- debian/changelog | 5 + debian/control | 60 +++++++++++ debian/copyright | 127 ++++++++++++++++++++++++ debian/gbp.conf | 3 + debian/libvectorscan-dev.examples | 1 + debian/libvectorscan-dev.install | 4 + debian/libvectorscan5.install | 1 + debian/libvectorscan5.lintian-overrides | 5 + debian/libvectorscan5.preinst | 35 +++++++ debian/rules | 18 ++++ debian/source/format | 1 + debian/tests/build-lib | 21 ++++ debian/tests/control | 2 + debian/tests/simplegrep.result | 3 + debian/upstream/metadata | 5 + debian/watch | 4 + 17 files changed, 296 insertions(+), 1 deletion(-) create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/gbp.conf create mode 100644 debian/libvectorscan-dev.examples create mode 100644 debian/libvectorscan-dev.install create mode 100644 debian/libvectorscan5.install create mode 100644 debian/libvectorscan5.lintian-overrides create mode 100755 debian/libvectorscan5.preinst create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100755 debian/tests/build-lib create mode 100644 debian/tests/control create mode 100644 debian/tests/simplegrep.result create mode 100644 debian/upstream/metadata create mode 100644 debian/watch diff --git a/CMakeLists.txt b/CMakeLists.txt index 76bca8134..823844aca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ project (vectorscan C CXX) set (HS_MAJOR_VERSION 5) set (HS_MINOR_VERSION 4) -set (HS_PATCH_VERSION 5) +set (HS_PATCH_VERSION 6) set (HS_VERSION ${HS_MAJOR_VERSION}.${HS_MINOR_VERSION}.${HS_PATCH_VERSION}) set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..27c3bbe0d --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +vectorscan (5.4.6-1) UNRELEASED; urgency=medium + + * Initial release. (Closes: #XXXXXX) + + -- Konstantinos Margaritis Wed, 15 Dec 2021 13:20:38 +0200 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..ad14c3dae --- /dev/null +++ b/debian/control @@ -0,0 +1,60 @@ +Source: vectorscan +Priority: optional +Maintainer: Konstantinos Margaritis +Build-Depends: cmake (>=2.8.11), + debhelper-compat (=12), + libboost-dev (>=1.57), + libpcap-dev, + pkg-config, + po-debconf, + python3, + ragel (>=6.9) +Standards-Version: 4.5.1 +Section: libs +Rules-Requires-Root: no +Homepage: https://vectorcamp.gr/vectorscan +Vcs-Git: https://salsa.debian.org/debian/hyperscan.git +Vcs-Browser: https://salsa.debian.org/debian/vectorscan + +Package: libvectorscan-dev +Section: libdevel +Architecture: any-amd64 arm64 ppc64el +Replaces: libhyperscan-dev +Conflicts: libhyperscan-dev +Provides: libhyperscan-dev +Depends: libvectorscan5 (= ${binary:Version}), ${misc:Depends} +Description: Development files for the Vectorscan library + Vectorscan is a portable fork of Intel's Hyperscan project. It is a drop-in + replacement that promises to be API/ABI compatible with the original project, + while allowing it to run on other architectures such as AArch64 and Power9. + . + This package contains development libraries, header files and documentation for + the regular expression matching library libhyperscan. You can either use the + supplied shared or static library. + . + libvectorscan only runs on CPUs with a SIMD unit. On the Intel side, the minimum + requirement is SSE4.2, AArch64 ISA already implies Advanced SIMD/NEON and Power9 + already implies VSX. + +Package: libvectorscan5 +Architecture: any-amd64 arm64 ppc64el +Depends: ${misc:Depends}, ${shlibs:Depends} +Pre-Depends: debconf +Replaces: libhyperscan5 +Conflicts: libhyperscan5 +Provides: libhyperscan5 +Description: High-performance regular expression matching library + Vectorscan is a portable fork of Intel's Hyperscan project. It is a drop-in + replacement that promises to be API/ABI compatible with the original project, + while allowing it to run on other architectures such as AArch64 and Power9. + . + Hyperscan is a high-performance multiple regex matching library. + It follows the regular expression syntax of the commonly-used libpcre library, + but is a standalone library with its own C API. Hyperscan uses hybrid automata + techniques to allow simultaneous matching of large numbers (up to tens of + thousands) of regular expressions and for the matching of regular expressions + across streams of data. Hyperscan is typically used in a DPI library stack. + . + libvectorscan only runs on CPUs with a SIMD unit. On the Intel side, the minimum + requirement is SSE4.2, AArch64 ISA already implies Advanced SIMD/NEON and Power9 + already implies VSX. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..3c2604cba --- /dev/null +++ b/debian/copyright @@ -0,0 +1,127 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: hyperscan +Source: https://github.com/intel/hyperscan + +Files: * +Copyright: 2015 Intel Corporation +License: BSD-3-Clause-Intel + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. 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. + 3. Neither the name of Intel Corporation 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 HOLDERS 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. + +Files: src/crc32.c +Copyright: 2004-2006 Intel Corporation +License: BSD-2-Clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. 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. + . + 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 HOLDERS 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. + +Files: include/boost-patched/graph/dominator_tree.hpp +Copyright: 2005-2009 Jongsoo Park +License: BSL-1.0 + Permission is hereby granted, free of charge, to any person or organization + obtaining a copy of the software and accompanying documentation covered by + this license (the "Software") to use, reproduce, display, distribute, + execute, and transmit the Software, and to prepare derivative works of the + Software, and to permit third-parties to whom the Software is furnished to + do so, all subject to the following: + . + The copyright notices in the Software and this entire statement, including + the above license grant, this restriction and the following disclaimer, + must be included in all copies of the Software, in whole or in part, and + all derivative works of the Software, unless such copies or derivative + works are solely in the form of machine-executable object code generated by + a source language processor. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT + SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE + FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + +Files: unit/gtest/* +Copyright: 2008 Google Inc. +License: BSD-3-Clause-Google + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. 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. + 3. Neither the name of Google Inc. 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 HOLDERS 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. + +Files: debian/* +Copyright: 2016 Robert Haist + 2016 Hilko Bengen + 2016 SZLin +License: GPL-2+ + This package 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 2 of the License, or + (at your option) any later version. + . + This package 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 + . + On Debian systems, the complete text of the GNU General + Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 000000000..d87d655de --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,3 @@ +[DEFAULT] + +pristine-tar=True diff --git a/debian/libvectorscan-dev.examples b/debian/libvectorscan-dev.examples new file mode 100644 index 000000000..00af7c3c2 --- /dev/null +++ b/debian/libvectorscan-dev.examples @@ -0,0 +1 @@ +usr/share/doc/vectorscan/examples/* diff --git a/debian/libvectorscan-dev.install b/debian/libvectorscan-dev.install new file mode 100644 index 000000000..76f28fa26 --- /dev/null +++ b/debian/libvectorscan-dev.install @@ -0,0 +1,4 @@ +usr/include/* +usr/lib/*/lib*.a +usr/lib/*/lib*.so +usr/lib/*/pkgconfig/* diff --git a/debian/libvectorscan5.install b/debian/libvectorscan5.install new file mode 100644 index 000000000..3ddde5841 --- /dev/null +++ b/debian/libvectorscan5.install @@ -0,0 +1 @@ +usr/lib/*/lib*.so.* diff --git a/debian/libvectorscan5.lintian-overrides b/debian/libvectorscan5.lintian-overrides new file mode 100644 index 000000000..18e4807d4 --- /dev/null +++ b/debian/libvectorscan5.lintian-overrides @@ -0,0 +1,5 @@ +# Rationale: +# The original library name libhs4 is to short and could +# be mistaken. So we changed it to libhyperscan5 for Debian. + +libvectorscan5: package-name-doesnt-match-sonames diff --git a/debian/libvectorscan5.preinst b/debian/libvectorscan5.preinst new file mode 100755 index 000000000..682bdf2a3 --- /dev/null +++ b/debian/libvectorscan5.preinst @@ -0,0 +1,35 @@ +#!/bin/sh + +set -e + +case "$1" in + install|upgrade) + if [ "$DEBIAN_FRONTEND" != noninteractive ] && \ + [ -f /proc/cpuinfo ] && \ + ! grep -q '^flags[[:space:]]*:.*[[:space:]]sse4_2[[:space:]]' /proc/cpuinfo + then + . /usr/share/debconf/confmodule + db_version 2.0 + db_input critical libvectorscan/cpu-sse4_2 || true + db_go + db_get libhyperscan/cpu-sse42 + if [ "$RET" = 'false' ]; then + echo 'Aborting installation because of missing SSE4.2 extension.' >&2 + db_purge + exit 1 + fi + fi + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..daf8f430d --- /dev/null +++ b/debian/rules @@ -0,0 +1,18 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + + +export DEB_CMAKE_FLAGS = -DBUILD_AVX2=on -DBUILD_AVX512=on -DBUILD_AVX512VBMI=off + +%: + dh $@ + +override_dh_auto_configure: + dh_auto_configure -- \ + -DBUILD_STATIC_AND_SHARED=1 \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + ${DEB_CMAKE_FLAGS} + +override_dh_missing: + dh_missing --fail-missing 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/build-lib b/debian/tests/build-lib new file mode 100755 index 000000000..037651ca1 --- /dev/null +++ b/debian/tests/build-lib @@ -0,0 +1,21 @@ +#!/bin/sh +# autopkgtest check: Build a program against libhyperscan and check whether a +# runnable binary is produced. +# Author: Sascha Steinbiss +set -e + +SRC=$(pwd)/examples/simplegrep.c +RES=$(pwd)/debian/tests/simplegrep.result +WORKDIR=$(mktemp -d) + +trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM +cd $WORKDIR + +gcc -o simplegrep $SRC $(pkg-config --cflags --libs libhs) +[ -x simplegrep ] +echo "build: OK" + +echo "barbaz" > 1 +./simplegrep ba 1 > 2 +diff 2 $RES +echo "run: OK" diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 000000000..dfde0b207 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,2 @@ +Tests: build-lib +Depends: build-essential, pkg-config, @ diff --git a/debian/tests/simplegrep.result b/debian/tests/simplegrep.result new file mode 100644 index 000000000..de95bb237 --- /dev/null +++ b/debian/tests/simplegrep.result @@ -0,0 +1,3 @@ +Scanning 7 bytes with Hyperscan +Match for pattern "ba" at offset 2 +Match for pattern "ba" at offset 5 diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 000000000..9675c2313 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,5 @@ +--- +Bug-Database: https://github.com/vectorcamp/vectorscan/issues +Bug-Submit: https://github.com/vectorcamp/vectorscan/issues/new +Repository: https://github.com/vectorcamp/vectorscan.git +Repository-Browse: https://github.com/vectorcamp/vectorscan diff --git a/debian/watch b/debian/watch new file mode 100644 index 000000000..6a53d339d --- /dev/null +++ b/debian/watch @@ -0,0 +1,4 @@ +version=4 +opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%-$1.tar.gz%" \ + https://github.com/vectorcamp/vectorscan/releases \ + (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate From a315fae243079018cd4862a240de4119780c4cd1 Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Wed, 22 Dec 2021 13:25:29 +0200 Subject: [PATCH 02/10] fix DEB_CMAKE_FLAGS depending on DEB_HOST_ARCH --- debian/rules | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index daf8f430d..72eda2110 100755 --- a/debian/rules +++ b/debian/rules @@ -2,8 +2,9 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all - +ifeq ($(DEB_HOST_ARCH),amd64) export DEB_CMAKE_FLAGS = -DBUILD_AVX2=on -DBUILD_AVX512=on -DBUILD_AVX512VBMI=off +endif %: dh $@ From 4fdfb8c7f42fce59e6f32138dee3dcdabd4c349e Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Tue, 18 Jan 2022 20:32:22 +0200 Subject: [PATCH 03/10] enable FAT_RUNTIME --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 72eda2110..98c419e77 100755 --- a/debian/rules +++ b/debian/rules @@ -3,7 +3,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all ifeq ($(DEB_HOST_ARCH),amd64) -export DEB_CMAKE_FLAGS = -DBUILD_AVX2=on -DBUILD_AVX512=on -DBUILD_AVX512VBMI=off +export DEB_CMAKE_FLAGS = -DBUILD_AVX2=on -DBUILD_AVX512=on -DBUILD_AVX512VBMI=off -DFAT_RUNTIME=on endif %: From f304c3e7e147b411fee997c99e30aba68a4edcff Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Tue, 18 Jan 2022 20:34:45 +0200 Subject: [PATCH 04/10] defer setting arch/tune flags for FAT_RUNTIME --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 823844aca..57a540333 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,8 +236,14 @@ if (ARCH_AARCH64) endif () endif(ARCH_AARCH64) -set(ARCH_C_FLAGS "-${ARCH_FLAG}=${GNUCC_ARCH} -mtune=${TUNE_FLAG} ${ARCH_C_FLAGS}") -set(ARCH_CXX_FLAGS "-${ARCH_FLAG}=${GNUCC_ARCH} -mtune=${TUNE_FLAG} ${ARCH_CXX_FLAGS}") + +message(STATUS "ARCH_C_FLAGS : ${ARCH_C_FLAGS}") +message(STATUS "ARCH_CXX_FLAGS : ${ARCH_CXX_FLAGS}") + +if (NOT FAT_RUNTIME) + set(ARCH_C_FLAGS "-${ARCH_FLAG}=${GNUCC_ARCH} -mtune=${TUNE_FLAG} ${ARCH_C_FLAGS}") + set(ARCH_CXX_FLAGS "-${ARCH_FLAG}=${GNUCC_ARCH} -mtune=${TUNE_FLAG} ${ARCH_CXX_FLAGS}") +endif() #if (ARCH_IA32 OR ARCH_X86_64 OR ARCH_ARM32 OR ARCH_AARCH64) # if (NOT CMAKE_C_FLAGS MATCHES .*march.* AND NOT CMAKE_C_FLAGS MATCHES .*mtune.*) From 1155a9219ccafeebf3378c153bea6349d0c45406 Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Wed, 19 Jan 2022 14:31:59 +0200 Subject: [PATCH 05/10] add our copyrights, minor fixes --- debian/copyright | 7 +++++-- debian/gbp.conf | 3 --- debian/upstream/metadata | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 debian/gbp.conf diff --git a/debian/copyright b/debian/copyright index 3c2604cba..487f46c3c 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,9 +1,11 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: hyperscan -Source: https://github.com/intel/hyperscan +Upstream-Name: vectorscan +Source: https://github.com/VectorCamp/vectorscan Files: * Copyright: 2015 Intel Corporation + 2019-2022 VectorCamp PC + 2021-2022 Arm Limited License: BSD-3-Clause-Intel Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -109,6 +111,7 @@ Files: debian/* Copyright: 2016 Robert Haist 2016 Hilko Bengen 2016 SZLin + 2021-2022 VectorCamp PC License: GPL-2+ This package 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/debian/gbp.conf b/debian/gbp.conf deleted file mode 100644 index d87d655de..000000000 --- a/debian/gbp.conf +++ /dev/null @@ -1,3 +0,0 @@ -[DEFAULT] - -pristine-tar=True diff --git a/debian/upstream/metadata b/debian/upstream/metadata index 9675c2313..58b351e71 100644 --- a/debian/upstream/metadata +++ b/debian/upstream/metadata @@ -1,5 +1,5 @@ --- -Bug-Database: https://github.com/vectorcamp/vectorscan/issues -Bug-Submit: https://github.com/vectorcamp/vectorscan/issues/new -Repository: https://github.com/vectorcamp/vectorscan.git -Repository-Browse: https://github.com/vectorcamp/vectorscan +Bug-Database: https://github.com/VectorCamp/vectorscan/issues +Bug-Submit: https://github.com/VectorCamp/vectorscan/issues/new +Repository: https://github.com/VectorCamp/vectorscan.git +Repository-Browse: https://github.com/VectorCamp/vectorscan From 4c32b36f536d6bcd1437654233817cf78e50bae7 Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Wed, 19 Jan 2022 15:08:04 +0200 Subject: [PATCH 06/10] remove preinst script, not needed as we bumped our deps --- debian/libvectorscan5.preinst | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100755 debian/libvectorscan5.preinst diff --git a/debian/libvectorscan5.preinst b/debian/libvectorscan5.preinst deleted file mode 100755 index 682bdf2a3..000000000 --- a/debian/libvectorscan5.preinst +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -set -e - -case "$1" in - install|upgrade) - if [ "$DEBIAN_FRONTEND" != noninteractive ] && \ - [ -f /proc/cpuinfo ] && \ - ! grep -q '^flags[[:space:]]*:.*[[:space:]]sse4_2[[:space:]]' /proc/cpuinfo - then - . /usr/share/debconf/confmodule - db_version 2.0 - db_input critical libvectorscan/cpu-sse4_2 || true - db_go - db_get libhyperscan/cpu-sse42 - if [ "$RET" = 'false' ]; then - echo 'Aborting installation because of missing SSE4.2 extension.' >&2 - db_purge - exit 1 - fi - fi - ;; - - abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 From 312ae895b4423091c8673f7dee111c1f7716e367 Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Wed, 19 Jan 2022 15:08:52 +0200 Subject: [PATCH 07/10] add sse4.2-support package to enforce such dependency --- debian/control | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index ad14c3dae..2cedf11eb 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,8 @@ Build-Depends: cmake (>=2.8.11), pkg-config, po-debconf, python3, - ragel (>=6.9) + ragel (>=6.9), + sse4.2-support Standards-Version: 4.5.1 Section: libs Rules-Requires-Root: no From f5960c81d91cbe9a94fa22ffac9a4c31bf86db17 Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Thu, 20 Jan 2022 21:02:30 +0200 Subject: [PATCH 08/10] add ITP bug report --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 27c3bbe0d..0a60a5b37 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -vectorscan (5.4.6-1) UNRELEASED; urgency=medium +vectorscan (5.4.6.1) unstable; urgency=medium - * Initial release. (Closes: #XXXXXX) + * Initial release. (Closes: #1004079) -- Konstantinos Margaritis Wed, 15 Dec 2021 13:20:38 +0200 From 2eaf6e5d319863b288dbc80f2f6450069075f17c Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Thu, 20 Jan 2022 21:02:46 +0200 Subject: [PATCH 09/10] fix description, remove sse4.2-support from b-depends --- debian/control | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/debian/control b/debian/control index 2cedf11eb..938682fc3 100644 --- a/debian/control +++ b/debian/control @@ -8,8 +8,7 @@ Build-Depends: cmake (>=2.8.11), pkg-config, po-debconf, python3, - ragel (>=6.9), - sse4.2-support + ragel (>=6.9) Standards-Version: 4.5.1 Section: libs Rules-Requires-Root: no @@ -24,7 +23,7 @@ Replaces: libhyperscan-dev Conflicts: libhyperscan-dev Provides: libhyperscan-dev Depends: libvectorscan5 (= ${binary:Version}), ${misc:Depends} -Description: Development files for the Vectorscan library +Description: Portable fork of Intel's Hyperscan library (development files) Vectorscan is a portable fork of Intel's Hyperscan project. It is a drop-in replacement that promises to be API/ABI compatible with the original project, while allowing it to run on other architectures such as AArch64 and Power9. @@ -33,18 +32,18 @@ Description: Development files for the Vectorscan library the regular expression matching library libhyperscan. You can either use the supplied shared or static library. . - libvectorscan only runs on CPUs with a SIMD unit. On the Intel side, the minimum - requirement is SSE4.2, AArch64 ISA already implies Advanced SIMD/NEON and Power9 - already implies VSX. + Vectorscan only runs on CPUs with a SIMD unit. On x86 CPUs, the minimum + requirement is SSE4.2, AArch64 ISA already implies Advanced SIMD/NEON and + ppc64le (Power8/Power9) already implies VSX enabled by default. Package: libvectorscan5 Architecture: any-amd64 arm64 ppc64el -Depends: ${misc:Depends}, ${shlibs:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends}, sse4.2-support [any-amd64] Pre-Depends: debconf Replaces: libhyperscan5 Conflicts: libhyperscan5 Provides: libhyperscan5 -Description: High-performance regular expression matching library +Description: Portable fork of Intel's Hyperscan library Vectorscan is a portable fork of Intel's Hyperscan project. It is a drop-in replacement that promises to be API/ABI compatible with the original project, while allowing it to run on other architectures such as AArch64 and Power9. @@ -56,6 +55,6 @@ Description: High-performance regular expression matching library thousands) of regular expressions and for the matching of regular expressions across streams of data. Hyperscan is typically used in a DPI library stack. . - libvectorscan only runs on CPUs with a SIMD unit. On the Intel side, the minimum - requirement is SSE4.2, AArch64 ISA already implies Advanced SIMD/NEON and Power9 - already implies VSX. + Vectorscan only runs on CPUs with a SIMD unit. On x86 CPUs, the minimum + requirement is SSE4.2, AArch64 ISA already implies Advanced SIMD/NEON and + ppc64le (Power8/Power9) already implies VSX enabled by default. From 0949576693dbc08a337468dc7b9c84f9815e76b0 Mon Sep 17 00:00:00 2001 From: Konstantinos Margaritis Date: Thu, 20 Jan 2022 21:03:02 +0200 Subject: [PATCH 10/10] change source format to native, as we include debian folder --- debian/source/format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/source/format b/debian/source/format index 163aaf8d8..89ae9db8f 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -3.0 (quilt) +3.0 (native)