]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CONTRIB: move src/wurfl.c and contrib/wurfl to addons/wurfl
authorWilly Tarreau <w@1wt.eu>
Fri, 2 Apr 2021 14:39:44 +0000 (16:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 2 Apr 2021 15:48:42 +0000 (17:48 +0200)
Both the source file and the dummy library are now at the same place.
Maybe the build howto could be moved there as well to make things even
cleaner.

The Makefile, MAINTAINERS, doc, and vtest matrix were updated.

.github/matrix.py
.github/workflows/coverity.yml
.github/workflows/vtest.yml
.travis.yml
MAINTAINERS
Makefile
addons/wurfl/dummy/Makefile [moved from contrib/wurfl/Makefile with 100% similarity]
addons/wurfl/dummy/dummy-wurfl.c [moved from contrib/wurfl/dummy-wurfl.c with 100% similarity]
addons/wurfl/dummy/wurfl/wurfl.h [moved from contrib/wurfl/wurfl/wurfl.h with 100% similarity]
addons/wurfl/wurfl.c [moved from src/wurfl.c with 100% similarity]
doc/WURFL-device-detection.txt

index 4db876710b7119a3bbab3d5a422c2ec56cec9fa4..22c33f0dfafed3b753c570badd63bf7c9cdcd240 100644 (file)
@@ -77,8 +77,8 @@ for CC in ["gcc", "clang"]:
                 "USE_OPENSSL=1",
                 "USE_SYSTEMD=1",
                 "USE_WURFL=1",
-                "WURFL_INC=contrib/wurfl",
-                "WURFL_LIB=contrib/wurfl",
+                "WURFL_INC=addons/wurfl/dummy",
+                "WURFL_LIB=addons/wurfl/dummy",
                 "USE_DEVICEATLAS=1",
                 "DEVICEATLAS_SRC=addons/deviceatlas/dummy",
                 "USE_PROMEX=1",
@@ -143,8 +143,8 @@ matrix.append(
             "USE_OPENSSL=1",
             "USE_SYSTEMD=1",
             "USE_WURFL=1",
-            "WURFL_INC=contrib/wurfl",
-            "WURFL_LIB=contrib/wurfl",
+            "WURFL_INC=addons/wurfl/dummy",
+            "WURFL_LIB=addons/wurfl/dummy",
             "USE_DEVICEATLAS=1",
             "DEVICEATLAS_SRC=addons/deviceatlas/dummy",
             "USE_PROMEX=1",
index 12d08e6ce4700bb9b04fe064c261f12f6329f453..fd5a0e2d2e32d84f3979a010e46421632f29891c 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=addons/deviceatlas/dummy USE_51DEGREES=1 51DEGREES_SRC=addons/51degrees/dummy/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=addons/wurfl/dummy WURFL_LIB=addons/wurfl/dummy USE_DEVICEATLAS=1 DEVICEATLAS_SRC=addons/deviceatlas/dummy USE_51DEGREES=1 51DEGREES_SRC=addons/51degrees/dummy/pattern"
     steps:
     - uses: actions/checkout@v2
     - name: Install apt dependencies
@@ -33,7 +33,7 @@ jobs:
         # quoting into account.
         sed -i 's/^DEBUG =$/DEBUG = -DDEBUG_STRICT=1 -DDEBUG_USE_ABORT=1/' Makefile
     - name: Build WURFL
-      run: make -C contrib/wurfl
+      run: make -C addons/wurfl/dummy
     - name: Run Coverity Scan
       env:
         COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
index 6d42db8fff18dc0ffbf165e9cb538d8002e4e680..fc6eb5529a662e1c241750f776a1bcba021ded89 100644 (file)
@@ -78,7 +78,7 @@ jobs:
       run: env ${{ matrix.ssl }} scripts/build-ssl.sh
     - name: Build WURFL
       if: ${{ contains(matrix.FLAGS, 'USE_WURFL=1') }}
-      run: make -C contrib/wurfl
+      run: make -C addons/wurfl/dummy
     - name: Compile HAProxy with ${{ matrix.CC }}
       run: |
         make -j$(nproc) all \
index 645f7e644c67cf335ff43a39a669465339c2648b..db114b7c4aec47836be1250cc4b0357f3d174996 100644 (file)
@@ -11,7 +11,7 @@ branches:
 
 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=addons/deviceatlas/dummy USE_51DEGREES=1"
+    - 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=addons/wurfl/dummy WURFL_LIB=addons/wurfl/dummy USE_DEVICEATLAS=1 DEVICEATLAS_SRC=addons/deviceatlas/dummy USE_51DEGREES=1"
     - TMPDIR=/tmp
     - FIFTYONEDEGREES_SRC="addons/51degrees/dummy/pattern"
     - DEBUG_OPTIONS="DEBUG_STRICT=1"
@@ -60,7 +60,7 @@ matrix:
   - os: linux
     if: type == cron
     compiler: clang
-    env: TARGET=linux-glibc FLAGS="USE_SLZ=1 USE_PCRE2=1 USE_PCRE2_JIT=1 USE_LUA=1 USE_OPENSSL=1 USE_SYSTEMD=1 USE_WURFL=1 WURFL_INC=contrib/wurfl WURFL_LIB=contrib/wurfl USE_51DEGREES=1" CC=clang-9
+    env: TARGET=linux-glibc FLAGS="USE_SLZ=1 USE_PCRE2=1 USE_PCRE2_JIT=1 USE_LUA=1 USE_OPENSSL=1 USE_SYSTEMD=1 USE_WURFL=1 WURFL_INC=addons/wurfl/dummy WURFL_LIB=addons/wurfl/dummy USE_51DEGREES=1" CC=clang-9
     before_script:
       - git clone https://github.com/wtarreau/libslz
       - cd libslz && make && make PREFIX=${HOME}/opt install && cd ..
@@ -81,7 +81,7 @@ install:
 
 script:
   - if [ "${CC%-*}"  = "clang" ]; then export FLAGS="$FLAGS USE_OBSOLETE_LINKER=1" DEBUG_CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ASAN_OPTIONS="log_path=asan.log"; fi
-  - make -C contrib/wurfl
+  - make -C addons/wurfl/dummy
   - make -j3 CC=$CC CPU_CFLAGS.generic="-O1" V=1 ERR=1 TARGET=$TARGET $FLAGS DEBUG_CFLAGS="$DEBUG_CFLAGS" LDFLAGS="$LDFLAGS" ADDLIB="$ADDLIB" SSL_LIB="$SSL_LIB" SSL_INC="$SSL_INC" SLZ_LIB="$SLZ_LIB" SLZ_INC="$SLZ_INC" 51DEGREES_SRC="$FIFTYONEDEGREES_SRC" EXTRA_OBJS="$EXTRA_OBJS" $DEBUG_OPTIONS
   - ./haproxy -vv
   - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ldd haproxy; fi
index ff09b0881683ab489af72d5011943fdb2671eb7f..878d7e3d1684b780b1d0595c1c65ae4508807d4d 100644 (file)
@@ -127,7 +127,7 @@ Note: William is the referent regarding Prometheus. He should be consulted for
 
 ScientiaMobile WURFL Device Detection
 Maintainer: Paul Borile, Massimiliano Bellomi <wurfl-haproxy-support@scientiamobile.com>
-Files: src/wurfl.c, contrib/wurfl, doc/WURFL-device-detection.txt
+Files: addons/wurfl, doc/WURFL-device-detection.txt
 
 SPOE
 Maintainer: Christopher Faulet <cfaulet@haproxy.com>
index b0cfe23c8f16cd50b844f5707624b4da6d4a5f47..46adef09a57eda36cb389209e866ba3956d28fb5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -669,7 +669,7 @@ ifneq ($(USE_WURFL),)
 WURFL_SRC =
 WURFL_INC = $(WURFL_SRC)
 WURFL_LIB = $(WURFL_SRC)
-OPTIONS_OBJS    += src/wurfl.o
+OPTIONS_OBJS    += addons/wurfl/wurfl.o
 OPTIONS_CFLAGS  += $(if $(WURFL_INC),-I$(WURFL_INC))
 ifneq ($(WURFL_DEBUG),)
 OPTIONS_CFLAGS  += -DWURFL_DEBUG
@@ -1006,6 +1006,7 @@ clean:
        $(Q)rm -f addons/promex/*.[oas]
        $(Q)rm -f addons/51degrees/*.[oas] addons/51degrees/dummy/*.[oas] addons/51degrees/dummy/*/*.[oas]
        $(Q)rm -f addons/deviceatlas/*.[oas] addons/deviceatlas/dummy/*.[oas]
+       $(Q)rm -f addons/wurfl/*.[oas] addons/wurfl/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/wurfl.c
rename to addons/wurfl/wurfl.c
index 3c28d19e46f525f67cca6b4a1e7b6dc7caeb8e6e..4786e2238f36b7ce07ea1a94fb29d7b79c308f86 100644 (file)
@@ -19,13 +19,13 @@ Optionally WURFL_DEBUG=1 may be set to increase logs verbosity
 
 For HAProxy developers who need to verify that their changes didn't accidentally
 break the WURFL code, it is possible to build a dummy library provided in the
-contrib/wurfl directory and to use it as an alternative for the full library.
+addons/wurfl/dummy directory and to use it as an alternative for the full library.
 This will not provide the full functionalities, it will just allow haproxy to
 start with a wurfl configuration, which generally is enough to validate API
 changes :
 
-    $ make -C contrib/wurfl
-    $ make TARGET=<target> USE_WURFL=1 WURFL_INC=$PWD/contrib/wurfl WURFL_LIB=$PWD/contrib/wurfl
+    $ make -C addons/wurfl/dummy
+    $ make TARGET=<target> USE_WURFL=1 WURFL_INC=$PWD/addons/wurfl/dummy WURFL_LIB=$PWD/addons/wurfl/dummy
 
 These are the supported WURFL directives (see doc/configuration.txt) :
 - wurfl-data-file <path to WURFL data file>