]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CONTRIB: move 51Degrees to addons/51degrees
authorWilly Tarreau <w@1wt.eu>
Fri, 2 Apr 2021 14:12:32 +0000 (16:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 2 Apr 2021 15:48:42 +0000 (17:48 +0200)
Now it's much cleaner, both 51d.c and the dummy library live together and
are easier to spot and maintain. The build howto probably ought to be moved
there as well. Makefile, docs and MAINTAINERS were updated, as well as
the github CI's build matrix, travis CI's, and coverity checks.

13 files changed:
.github/matrix.py
.github/workflows/coverity.yml
.travis.yml
MAINTAINERS
Makefile
addons/51degrees/51d.c [moved from src/51d.c with 100% similarity]
addons/51degrees/dummy/cityhash/city.c [moved from contrib/51d/src/cityhash/city.c with 100% similarity]
addons/51degrees/dummy/pattern/51Degrees.c [moved from contrib/51d/src/pattern/51Degrees.c with 100% similarity]
addons/51degrees/dummy/pattern/51Degrees.h [moved from contrib/51d/src/pattern/51Degrees.h with 100% similarity]
addons/51degrees/dummy/threading.c [moved from contrib/51d/src/threading.c with 100% similarity]
addons/51degrees/dummy/trie/51Degrees.c [moved from contrib/51d/src/trie/51Degrees.c with 100% similarity]
addons/51degrees/dummy/trie/51Degrees.h [moved from contrib/51d/src/trie/51Degrees.h with 100% similarity]
doc/51Degrees-device-detection.txt

index e31d8edd4f1bb366a94fa1c33931ab50847a58bc..9f4e1f6354efb4da5d994cdcc54c2489834e14e7 100644 (file)
@@ -83,7 +83,7 @@ for CC in ["gcc", "clang"]:
                 "DEVICEATLAS_SRC=contrib/deviceatlas",
                 "USE_PROMEX=1",
                 "USE_51DEGREES=1",
-                "51DEGREES_SRC=contrib/51d/src/pattern",
+                "51DEGREES_SRC=addons/51degrees/dummy/pattern",
             ],
         }
     )
@@ -149,7 +149,7 @@ matrix.append(
             "DEVICEATLAS_SRC=contrib/deviceatlas",
             "USE_PROMEX=1",
             "USE_51DEGREES=1",
-            "51DEGREES_SRC=contrib/51d/src/pattern",
+            "51DEGREES_SRC=addons/51degrees/dummy/pattern",
         ],
     }
 )
index 4fbe295eb456acdfa75861bd5205570ba7435556..7537ba3e4cc6b0785d8c0a43eb277cdfa42d783d 100644 (file)
@@ -17,7 +17,7 @@ jobs:
       COVERITY_SCAN_PROJECT_NAME: 'Haproxy'
       COVERITY_SCAN_BRANCH_PATTERN: '*'
       COVERITY_SCAN_NOTIFICATION_EMAIL: 'chipitsine@gmail.com'
-      COVERITY_SCAN_BUILD_COMMAND: "make CC=clang TARGET=linux-glibc USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_LUA=1 USE_OPENSSL=1 USE_SYSTEMD=1 USE_WURFL=1 WURFL_INC=contrib/wurfl WURFL_LIB=contrib/wurfl USE_DEVICEATLAS=1 DEVICEATLAS_SRC=contrib/deviceatlas USE_51DEGREES=1 51DEGREES_SRC=contrib/51d/src/pattern"
+      COVERITY_SCAN_BUILD_COMMAND: "make CC=clang TARGET=linux-glibc USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_LUA=1 USE_OPENSSL=1 USE_SYSTEMD=1 USE_WURFL=1 WURFL_INC=contrib/wurfl WURFL_LIB=contrib/wurfl USE_DEVICEATLAS=1 DEVICEATLAS_SRC=contrib/deviceatlas USE_51DEGREES=1 51DEGREES_SRC=addons/51degrees/dummy/pattern"
     steps:
     - uses: actions/checkout@v2
     - name: Install apt dependencies
index 80fddcaece23a4a75167fef236a5e431665ff955..3d2f280bb607564e91ef7b008196e53319011472 100644 (file)
@@ -13,7 +13,7 @@ env:
   global:
     - FLAGS="USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_LUA=1 USE_OPENSSL=1 USE_SYSTEMD=1 USE_WURFL=1 WURFL_INC=contrib/wurfl WURFL_LIB=contrib/wurfl USE_DEVICEATLAS=1 DEVICEATLAS_SRC=contrib/deviceatlas USE_51DEGREES=1"
     - TMPDIR=/tmp
-    - FIFTYONEDEGREES_SRC="contrib/51d/src/pattern"
+    - FIFTYONEDEGREES_SRC="addons/51degrees/dummy/pattern"
     - DEBUG_OPTIONS="DEBUG_STRICT=1"
 
 addons:
@@ -49,7 +49,7 @@ matrix:
   - os: linux
     if: type == cron
     compiler: clang
-    env: TARGET=linux-glibc OPENSSL_VERSION=1.1.0l FIFTYONEDEGREES_SRC="contrib/51d/src/trie" CC=clang-9
+    env: TARGET=linux-glibc OPENSSL_VERSION=1.1.0l FIFTYONEDEGREES_SRC="addons/51degrees/dummy/trie" CC=clang-9
     name: openssl-1.1.1 | 51d trie
   - os: linux
     env: DEBUG_OPTIONS=""
index 7f4881d385da2882bdbbe285844bae05376b0b32..144cc4253dd0e0e052df3e1ca48695f0a010a34f 100644 (file)
@@ -20,7 +20,7 @@ List of maintainers
 
 51Degrees device identification
 Maintainer: Ben Shillito <ben@51degrees.com>
-Files: src/51d.c, contrib/51d, doc/51Degrees-device-detection.txt
+Files: addons/51degrees, doc/51Degrees-device-detection.txt
 
 Cache
 Maintainer: William Lallemand <wlallemand@haproxy.com>
index 3a295c72eb74fecd3b0ce407fb2b11913b26f02b..a9e8b492a19fa0f7a4ae1b50951f8e4d16826a72 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -652,7 +652,7 @@ ifneq ($(USE_51DEGREES),)
 51DEGREES_LIB = $(51DEGREES_SRC)
 OPTIONS_OBJS    += $(51DEGREES_LIB)/../cityhash/city.o
 OPTIONS_OBJS    += $(51DEGREES_LIB)/51Degrees.o
-OPTIONS_OBJS    += src/51d.o
+OPTIONS_OBJS    += addons/51degrees/51d.o
 OPTIONS_CFLAGS  += $(if $(51DEGREES_INC),-I$(51DEGREES_INC))
 ifeq ($(USE_THREAD),)
 OPTIONS_CFLAGS  += -DFIFTYONEDEGREES_NO_THREADING
@@ -1004,6 +1004,7 @@ clean:
        $(Q)rm -f haproxy-$(VERSION) haproxy-$(VERSION)$(SUBVERS)$(EXTRAVERSION) nohup.out gmon.out
        $(Q)rm -f {admin,dev,contrib}/*/*.[oas] {admin,dev,contrib}/*/*/*.[oas] {admin,dev,contrib}/*/*/*/*.[oas]
        $(Q)rm -f addons/promex/*.[oas]
+       $(Q)rm -f addons/51degrees/*.[oas] addons/51degrees/dummy/*.[oas] addons/51degrees/dummy/*/*.[oas]
        $(Q)rm -f admin/iprange/iprange admin/iprange/ip6range admin/halog/halog
        $(Q)rm -f dev/flags/flags dev/poll/poll dev/tcploop/tcploop
        $(Q)rm -f dev/hpack/decode dev/hpack/gen-enc dev/hpack/gen-rht
similarity index 100%
rename from src/51d.c
rename to addons/51degrees/51d.c
index f0349abaa86e953a4cdb4689b81ec33cd5d23b74..8c69bb19b4bea740f1918dd1b9bb6651e8614f42 100644 (file)
@@ -54,14 +54,14 @@ Trie data. Free Hash Trie data file can be obtained by signing up for a licence
 key at https://51degrees.com/products/store/on-premise-device-detection.
 
 For HAProxy developers who need to verify that their changes didn't affect the
-51Degrees implementation, a dummy library if provided in the contrib/51d
-directory. This does not function, but implements the API such that the
-51Degrees module can be used (but not return any meaningful information). To
-test either Pattern or Hash Trie, build with:
+51Degrees implementation, a dummy library is provided in the
+"addons/51degrees/dummy" directory. This does not function, but implements the
+API such that the 51Degrees module can be used (but not return any meaningful
+information). To test either Pattern or Hash Trie, build with:
 
-    $ make TARGET=<target> USE_51DEGREES=1 51DEGREES_SRC=contrib/51d/src/pattern
+    $ make TARGET=<target> USE_51DEGREES=1 51DEGREES_SRC=addons/51degrees/dummy/pattern
 or
-    $ make TARGET=<target> USE_51DEGREES=1 51DEGREES_SRC=contrib/51d/src/trie
+    $ make TARGET=<target> USE_51DEGREES=1 51DEGREES_SRC=addons/51degrees/dummy/trie
 
 respectively.