You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pe...@apache.org on 2023/11/04 08:35:01 UTC

(celix) branch support/2.4 updated (2dda7b30 -> a64da317)

This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a change to branch support/2.4
in repository https://gitbox.apache.org/repos/asf/celix.git


    from 2dda7b30 Add missing header include.
     new 00cefa24 Upgrade ccache to 4.7.4.
     new 51aa7165 Update the default conan profile to C++17.
     new 397cb921 Upgrade Conan version to 1.61.0 in workflows
     new 927a5409 Use Conan2 for mac-build of conan_create.yml.
     new e81bf41c Turn off unsupported module for mac-build of conan_create.yml.
     new b2193a1f Fix `conan remove` to use Conan2 syntax.
     new 4095b5dc Update macos-build-conan of macos.yml to use Conan2.
     new a4bf4a9e Fix `conan build` in macos.yml.
     new a64da317 #647: Fix use-after-free in celix_framework_scheduleEvent.

The 9 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/conan_create.yml | 20 +++++++++----------
 .github/workflows/macos.yml        | 39 +++++++++++++++++---------------------
 conanfile.py                       |  2 +-
 libs/framework/src/framework.c     |  7 ++++---
 4 files changed, 32 insertions(+), 36 deletions(-)


(celix) 06/09: Fix `conan remove` to use Conan2 syntax.

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch support/2.4
in repository https://gitbox.apache.org/repos/asf/celix.git

commit b2193a1f0ae0c4d6ee2e5f6e3623834516bdd540
Author: PengZheng <ho...@gmail.com>
AuthorDate: Fri Nov 3 11:41:50 2023 +0800

    Fix `conan remove` to use Conan2 syntax.
    
    (cherry picked from commit 97b81f28c65c1c6061d81081d3eae4da585902ef)
---
 .github/workflows/conan_create.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/conan_create.yml b/.github/workflows/conan_create.yml
index e199dd8c..575cab42 100644
--- a/.github/workflows/conan_create.yml
+++ b/.github/workflows/conan_create.yml
@@ -116,4 +116,4 @@ jobs:
           conan inspect .  | awk 'BEGIN { FS="[\t:]+"; output=0 } /build/ && !/build_all/ && !/build_rsa_remote_service_admin_shm_v2/ && !/build_rsa_discovery_zeroconf/ { if(output) print $1} /^options/ {output=1} /^options_definitions/ {output=0}' | while read option; do conan build . -c tools.cmake.cmaketoolchain:generator=Ninja -b missing -o celix/*:${option}=True  -pr:b default -pr:h default -s:b build_type=Release -s:h build_type=Release -of  ${option}_dir -o celix/*:celix_cxx17=Tru [...]
       - name: Remove Celix
         run: |
-          conan remove -f 'celix/*'
+          conan remove -c celix/* 


(celix) 01/09: Upgrade ccache to 4.7.4.

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch support/2.4
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 00cefa24190a41f62db591a4ce102037d1b49e7f
Author: PengZheng <ho...@gmail.com>
AuthorDate: Tue Oct 31 12:27:45 2023 +0800

    Upgrade ccache to 4.7.4.
    
    (cherry picked from commit 96acf4d2b83c5560482f64ee0d744feb37e8515e)
---
 conanfile.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/conanfile.py b/conanfile.py
index 30f1f3f2..c32241cc 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -158,7 +158,7 @@ class CelixConan(ConanFile):
             self.test_requires("gtest/1.10.0")
             self.test_requires("cpputest/4.0")
         if self.options.enable_ccache:
-            self.build_requires("ccache/4.6")
+            self.build_requires("ccache/4.7.4")
 
     def configure(self):
         # copy options to options, fill in defaults if not set


(celix) 05/09: Turn off unsupported module for mac-build of conan_create.yml.

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch support/2.4
in repository https://gitbox.apache.org/repos/asf/celix.git

commit e81bf41c3a98c7131ffe1eaaf2b3c3953b7a09d5
Author: PengZheng <ho...@gmail.com>
AuthorDate: Fri Nov 3 11:15:41 2023 +0800

    Turn off unsupported module for mac-build of conan_create.yml.
    
    (cherry picked from commit d64478daf4e60e3b1e5cd71dffc74c830d2882e0)
---
 .github/workflows/conan_create.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/conan_create.yml b/.github/workflows/conan_create.yml
index 21d0523c..e199dd8c 100644
--- a/.github/workflows/conan_create.yml
+++ b/.github/workflows/conan_create.yml
@@ -113,7 +113,7 @@ jobs:
           conan create . -c tools.cmake.cmaketoolchain:generator=Ninja -b missing -o celix/*:build_all=True  -o celix/*:enable_ccache=True -pr:b default -pr:h default -s:b build_type=Release -s:h build_type=Release -tf examples/conan_test_package_v2 -o celix/*:celix_cxx17=True -o celix/*:celix_install_deprecated_api=True
       - name: Dependency Deduction Test
         run: |
-          conan inspect .  | awk 'BEGIN { FS="[\t:]+"; output=0 } /build/ && !/build_all/ { if(output) print $1} /^options/ {output=1} /^options_definitions/ {output=0}' | while read option; do conan build . -c tools.cmake.cmaketoolchain:generator=Ninja -b missing -o celix/*:${option}=True  -pr:b default -pr:h default -s:b build_type=Release -s:h build_type=Release -of  ${option}_dir -o celix/*:celix_cxx17=True -o celix/*:enable_ccache=True -o celix/*:celix_install_deprecated_api=True || [...]
+          conan inspect .  | awk 'BEGIN { FS="[\t:]+"; output=0 } /build/ && !/build_all/ && !/build_rsa_remote_service_admin_shm_v2/ && !/build_rsa_discovery_zeroconf/ { if(output) print $1} /^options/ {output=1} /^options_definitions/ {output=0}' | while read option; do conan build . -c tools.cmake.cmaketoolchain:generator=Ninja -b missing -o celix/*:${option}=True  -pr:b default -pr:h default -s:b build_type=Release -s:h build_type=Release -of  ${option}_dir -o celix/*:celix_cxx17=Tru [...]
       - name: Remove Celix
         run: |
           conan remove -f 'celix/*'


(celix) 02/09: Update the default conan profile to C++17.

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch support/2.4
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 51aa7165e6b25129a278c81a5532d9ee0a32c5fa
Author: PengZheng <ho...@gmail.com>
AuthorDate: Tue Oct 31 12:43:50 2023 +0800

    Update the default conan profile to C++17.
    
    (cherry picked from commit afedd68c0a395742ab39e0d50d81d515d7cee57f)
---
 .github/workflows/conan_create.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/conan_create.yml b/.github/workflows/conan_create.yml
index c93bf7e8..460607f3 100644
--- a/.github/workflows/conan_create.yml
+++ b/.github/workflows/conan_create.yml
@@ -38,6 +38,7 @@ jobs:
         run: |
           # build profile
           conan profile detect -f
+          sed -i 's/compiler.cppstd=gnu14/compiler.cppstd=gnu17/g' `conan profile path default`
       - name: Conan Cache
         id: cache-conan
         uses: actions/cache@v3


(celix) 09/09: #647: Fix use-after-free in celix_framework_scheduleEvent.

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch support/2.4
in repository https://gitbox.apache.org/repos/asf/celix.git

commit a64da317a25cf8389fe4864c85140165dc40f87c
Author: PengZheng <ho...@gmail.com>
AuthorDate: Fri Nov 3 14:36:09 2023 +0800

    #647: Fix use-after-free in celix_framework_scheduleEvent.
    
    (cherry picked from commit e98a6ec0942bc4c0ee660f68191bd300993565c1)
---
 libs/framework/src/framework.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libs/framework/src/framework.c b/libs/framework/src/framework.c
index fc61a53b..812b7799 100644
--- a/libs/framework/src/framework.c
+++ b/libs/framework/src/framework.c
@@ -2531,21 +2531,22 @@ long celix_framework_scheduleEvent(celix_framework_t* fw,
         return -1L; //error logged by celix_scheduledEvent_create
     }
 
+    long id = celix_scheduledEvent_getId(event);
     fw_log(fw->logger,
            CELIX_LOG_LEVEL_DEBUG,
            "Added scheduled event '%s' (id=%li) for bundle '%s' (id=%li).",
            celix_scheduledEvent_getName(event),
-           celix_scheduledEvent_getId(event),
+           id,
            celix_bundle_getSymbolicName(bndEntry->bnd),
            bndId);
     celix_framework_bundleEntry_decreaseUseCount(bndEntry);
 
     celixThreadMutex_lock(&fw->dispatcher.mutex);
-    celix_longHashMap_put(fw->dispatcher.scheduledEvents, celix_scheduledEvent_getId(event), event);
+    celix_longHashMap_put(fw->dispatcher.scheduledEvents, id, event);
     celixThreadCondition_broadcast(&fw->dispatcher.cond); //notify dispatcher thread for newly added scheduled event
     celixThreadMutex_unlock(&fw->dispatcher.mutex);
 
-    return celix_scheduledEvent_getId(event);
+    return id;
 }
 
 celix_status_t celix_framework_wakeupScheduledEvent(celix_framework_t* fw, long scheduledEventId) {


(celix) 08/09: Fix `conan build` in macos.yml.

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch support/2.4
in repository https://gitbox.apache.org/repos/asf/celix.git

commit a4bf4a9e84ea6dc23bbbd7c8371e3f8693b625e1
Author: PengZheng <ho...@gmail.com>
AuthorDate: Fri Nov 3 11:50:22 2023 +0800

    Fix `conan build` in macos.yml.
    
    (cherry picked from commit 456ae02f5560580b3c2397b6576ce5d6432d7373)
---
 .github/workflows/macos.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index c61b0773..54b9f9e7 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -62,7 +62,7 @@ jobs:
             -o celix/*:enable_testing_dependency_manager_for_cxx11=True
         run: |
           #force require libcurl 7.64.1, due to a sha256 verify issue in libcurl/7.87.0
-          conan build . celix/ci -c tools.cmake.cmaketoolchain:generator=Ninja -pr:b default -pr:h default -s:b build_type=Release -s:h build_type=Release -of build ${CONAN_BUILD_OPTIONS} -b missing -b cpputest
+          conan build .  -c tools.cmake.cmaketoolchain:generator=Ninja -pr:b default -pr:h default -s:b build_type=Release -s:h build_type=Release -of build ${CONAN_BUILD_OPTIONS} -b missing -b cpputest
       - name: Test
         run: |
           cd build


(celix) 03/09: Upgrade Conan version to 1.61.0 in workflows

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch support/2.4
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 397cb92190bf46d257a12b89d2928dd1f78297fb
Author: PengZheng <ho...@gmail.com>
AuthorDate: Fri Nov 3 10:25:17 2023 +0800

    Upgrade Conan version to 1.61.0 in workflows
    
    (cherry picked from commit 11210fdd440119d77db23389b13e5d95d32cb37b)
---
 .github/workflows/conan_create.yml | 2 +-
 .github/workflows/macos.yml        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/conan_create.yml b/.github/workflows/conan_create.yml
index 460607f3..dcfa317c 100644
--- a/.github/workflows/conan_create.yml
+++ b/.github/workflows/conan_create.yml
@@ -84,7 +84,7 @@ jobs:
       - name: Install build dependencies
         run: |
           brew install python ninja
-          pip3 install -U conan==1.59.0
+          pip3 install -U conan==1.61.0
       - name: Setup Conan Profile
         run: |
           conan profile new default --detect
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 5c989809..3914dbd2 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -24,7 +24,7 @@ jobs:
       - name: Install conan
         run: |
           brew install python ninja
-          pip3 install -U conan==1.59.0
+          pip3 install -U conan==1.61.0
       - name: Setup Conan Profile
         run: |
           conan profile new default --detect


(celix) 07/09: Update macos-build-conan of macos.yml to use Conan2.

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch support/2.4
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 4095b5dc644da495fa954824ce0e7783d728b14f
Author: PengZheng <ho...@gmail.com>
AuthorDate: Fri Nov 3 11:46:49 2023 +0800

    Update macos-build-conan of macos.yml to use Conan2.
    
    (cherry picked from commit c6bc814a98222e635965283766c38a982aa53ea4)
---
 .github/workflows/macos.yml | 39 +++++++++++++++++----------------------
 1 file changed, 17 insertions(+), 22 deletions(-)

diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 3914dbd2..c61b0773 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -24,20 +24,19 @@ jobs:
       - name: Install conan
         run: |
           brew install python ninja
-          pip3 install -U conan==1.61.0
+          pip3 install -U conan
       - name: Setup Conan Profile
         run: |
-          conan profile new default --detect
-          conan profile update settings.build_type=Release default
+          conan profile detect -f
       - name: Conan Cache
         id: cache-conan
         uses: actions/cache@v3
         env:
-          cache-name: cache-conan-modules
+          cache-name: cache-conan2-modules
         with:
-          path: ${{ env.CONAN_USER_HOME }}
-          key: ${{ runner.os }}-test-builder-${{ env.cache-name }}-${{ hashFiles('conanfile.py') }}
-          restore-keys: ${{ runner.os }}-test-builder-${{ env.cache-name }}-
+          path: ${{ env.CONAN_HOME }}
+          key: ${{ runner.os }}-test-builder-${{ env.cache-name }}-Release-${{ hashFiles('conanfile.py') }}
+          restore-keys: ${{ runner.os }}-test-builder-${{ env.cache-name }}-Release-
       - name: Prepare ccache timestamp
         id: ccache_cache_timestamp
         run: |
@@ -49,25 +48,21 @@ jobs:
           key: ${{ runner.os }}-test-ccache-Release-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
           restore-keys: |
             ${{ runner.os }}-test-ccache-Release-
-      - name: Install Dependencies
+      - name: Install Dependencies and Build
         env:
           CONAN_BUILD_OPTIONS: |
-            -o celix:enable_testing=True
-            -o celix:enable_address_sanitizer=True
-            -o celix:build_all=True
-            -o celix:enable_testing_for_cxx14=True
-            -o celix:enable_testing_dependency_manager_for_cxx11=True
-            -o celix:enable_cmake_warning_tests=True
-            -o celix:enable_testing_on_ci=True
-            -o celix:framework_curlinit=False
-            -o celix:enable_ccache=True
+            -o celix/*:enable_testing=True
+            -o celix/*:enable_address_sanitizer=True
+            -o celix/*:build_all=True
+            -o celix/*:enable_cmake_warning_tests=True
+            -o celix/*:enable_testing_on_ci=True
+            -o celix/*:framework_curlinit=False
+            -o celix/*:enable_ccache=True
+            -o celix/*:enable_testing_for_cxx14=True
+            -o celix/*:enable_testing_dependency_manager_for_cxx11=True
         run: |
           #force require libcurl 7.64.1, due to a sha256 verify issue in libcurl/7.87.0
-          conan install . celix/ci -c tools.cmake.cmaketoolchain:generator=Ninja -pr:b default -pr:h default -if build ${CONAN_BUILD_OPTIONS} -b missing -b cpputest --require-override=libcurl/7.64.1 --require-override=openssl/1.1.1s
-      - name: Build
-        run: |
-          conan build . -bf build
-
+          conan build . celix/ci -c tools.cmake.cmaketoolchain:generator=Ninja -pr:b default -pr:h default -s:b build_type=Release -s:h build_type=Release -of build ${CONAN_BUILD_OPTIONS} -b missing -b cpputest
       - name: Test
         run: |
           cd build


(celix) 04/09: Use Conan2 for mac-build of conan_create.yml.

Posted by pe...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pengzheng pushed a commit to branch support/2.4
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 927a54091daa845dfaf384f9b617d20ba54841d6
Author: PengZheng <ho...@gmail.com>
AuthorDate: Fri Nov 3 10:46:32 2023 +0800

    Use Conan2 for mac-build of conan_create.yml.
    
    (cherry picked from commit c3cf1132e89581357e4de86a8e25fb7f212a5605)
---
 .github/workflows/conan_create.yml | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/conan_create.yml b/.github/workflows/conan_create.yml
index dcfa317c..21d0523c 100644
--- a/.github/workflows/conan_create.yml
+++ b/.github/workflows/conan_create.yml
@@ -84,20 +84,19 @@ jobs:
       - name: Install build dependencies
         run: |
           brew install python ninja
-          pip3 install -U conan==1.61.0
+          pip3 install -U conan
       - name: Setup Conan Profile
         run: |
-          conan profile new default --detect
-          conan profile update settings.build_type=Release default
+          conan profile detect -f
       - name: Conan Cache
         id: cache-conan
         uses: actions/cache@v3
         env:
-          cache-name: cache-conan-modules
+          cache-name: cache-conan2-modules
         with:
-          path: ${{ env.CONAN_USER_HOME }}
-          key: ${{ runner.os }}-builder-${{ env.cache-name }}-${{ hashFiles('conanfile.py') }}
-          restore-keys: ${{ runner.os }}-builder-${{ env.cache-name }}-
+          path: ${{ env.CONAN_HOME }}
+          key: ${{ runner.os }}-builder-${{ env.cache-name }}-Release-${{ hashFiles('conanfile.py') }}
+          restore-keys: ${{ runner.os }}-builder-${{ env.cache-name }}-Release-
       - name: Prepare ccache timestamp
         id: ccache_cache_timestamp
         run: |
@@ -111,10 +110,10 @@ jobs:
             ${{ runner.os }}-ccache-Release-
       - name: Create Celix
         run: |
-          conan create . -c tools.cmake.cmaketoolchain:generator=Ninja -b missing -o celix:build_all=True  -o celix:enable_ccache=True -pr:b default -pr:h default -tf examples/conan_test_package -tbf test-build -o celix:celix_cxx17=True -o celix:celix_install_deprecated_api=True --require-override=libcurl/7.64.1 --require-override=openssl/1.1.1s --require-override=zlib/1.2.13
+          conan create . -c tools.cmake.cmaketoolchain:generator=Ninja -b missing -o celix/*:build_all=True  -o celix/*:enable_ccache=True -pr:b default -pr:h default -s:b build_type=Release -s:h build_type=Release -tf examples/conan_test_package_v2 -o celix/*:celix_cxx17=True -o celix/*:celix_install_deprecated_api=True
       - name: Dependency Deduction Test
         run: |
-          conan inspect . -a options | awk 'BEGIN { FS="[\t:]+" } /build/ && !/build_all/ { print $1}' | while read option; do conan install . -c tools.cmake.cmaketoolchain:generator=Ninja -b missing -o celix:${option}=True  -pr:b default -pr:h default -if ${option}_dir -o celix:celix_cxx17=True -o celix:celix_install_deprecated_api=True -o celix:enable_ccache=True --require-override=libcurl/7.64.1 --require-override=openssl/1.1.1s --require-override=zlib/1.2.13 || exit 1; conan build .  [...]
+          conan inspect .  | awk 'BEGIN { FS="[\t:]+"; output=0 } /build/ && !/build_all/ { if(output) print $1} /^options/ {output=1} /^options_definitions/ {output=0}' | while read option; do conan build . -c tools.cmake.cmaketoolchain:generator=Ninja -b missing -o celix/*:${option}=True  -pr:b default -pr:h default -s:b build_type=Release -s:h build_type=Release -of  ${option}_dir -o celix/*:celix_cxx17=True -o celix/*:enable_ccache=True -o celix/*:celix_install_deprecated_api=True || [...]
       - name: Remove Celix
         run: |
           conan remove -f 'celix/*'