Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package corrosion for openSUSE:Factory 
checked in at 2026-06-30 15:10:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/corrosion (Old)
 and      /work/SRC/openSUSE:Factory/.corrosion.new.11887 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "corrosion"

Tue Jun 30 15:10:56 2026 rev:6 rq:1362258 version:0.6.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/corrosion/corrosion.changes      2026-05-21 
18:25:20.029619130 +0200
+++ /work/SRC/openSUSE:Factory/.corrosion.new.11887/corrosion.changes   
2026-06-30 15:10:58.119032423 +0200
@@ -1,0 +2,10 @@
+Sun Jun 28 20:27:07 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 0.6.1:
+  * Fix building shared libraries for iOS.
+  * Fix host linker detection for iOS and add the
+    CORROSION_HOST_TARGET_LINKER cache variable, to allow users
+    to override the linker used for the host build (required for
+    build-scripts and proc-macros).
+
+-------------------------------------------------------------------

Old:
----
  corrosion-0.6.0.tar.gz

New:
----
  corrosion-0.6.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ corrosion.spec ++++++
--- /var/tmp/diff_new_pack.6cb9RW/_old  2026-06-30 15:10:58.923059742 +0200
+++ /var/tmp/diff_new_pack.6cb9RW/_new  2026-06-30 15:10:58.927059878 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           corrosion
-Version:        0.6.0
+Version:        0.6.1
 Release:        0
 Summary:        Rust integration into existing CMake project
 License:        MIT

++++++ corrosion-0.6.0.tar.gz -> corrosion-0.6.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/corrosion-0.6.0/.github/workflows/test.yaml 
new/corrosion-0.6.1/.github/workflows/test.yaml
--- old/corrosion-0.6.0/.github/workflows/test.yaml     2025-11-23 
13:14:15.000000000 +0100
+++ new/corrosion-0.6.1/.github/workflows/test.yaml     2026-01-17 
11:46:47.000000000 +0100
@@ -310,6 +310,43 @@
         working-directory: build
         run: ctest --output-on-failure --build-config Debug -j 3
 
+  iOS:
+    name: Test iOS (simulator)
+    runs-on: macos-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        generator:
+          - "Ninja"
+          - "Xcode"
+        include:
+          - os: macos-latest
+          - cmake: 3.24.0
+          - rust: stable
+
+    steps:
+      - uses: actions/checkout@v4
+      - name: Install CMake
+        uses: lukka/get-cmake@519de0c7b4812477d74976b2523a9417f552d126
+        with:
+          cmakeVersion: "${{ matrix.cmake }}"
+          ninjaVersion: "~1.11.0"
+      # Install cbindgen before Rust to use recent default Rust version.
+      - name: Install cbindgen
+        run: cargo install cbindgen
+      - name: Install Rust
+        id: install_rust
+        uses: dtolnay/rust-toolchain@master
+        with:
+          toolchain: ${{matrix.rust}}
+          targets: aarch64-apple-ios-sim
+          components: rust-src
+      - name: Configure
+        run: cmake -S. -Bbuild --log-level=DEBUG -G "${{ matrix.generator }}" 
-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator 
-DCMAKE_OSX_ARCHITECTURES=arm64 
-DRust_TOOLCHAIN=${{steps.install_rust.outputs.name}} 
-DRust_CARGO_TARGET=aarch64-apple-ios-sim
+      - name: Run Tests
+        working-directory: build
+        run: ctest --output-on-failure --build-config Debug -j 3
+
 
   test_cxxbridge:
     name: Test cxxbridge integration
@@ -444,6 +481,7 @@
       - windows_gnullvm_msys2
       - linux_stage2
       - darwin
+      - iOS
       - test_cxxbridge
       - autoinstall_cargo_target
       - install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/corrosion-0.6.0/CMakeLists.txt 
new/corrosion-0.6.1/CMakeLists.txt
--- old/corrosion-0.6.0/CMakeLists.txt  2025-11-23 13:14:15.000000000 +0100
+++ new/corrosion-0.6.1/CMakeLists.txt  2026-01-17 11:46:47.000000000 +0100
@@ -1,6 +1,6 @@
 cmake_minimum_required(VERSION 3.22)
 project(Corrosion
-    VERSION 0.6.0
+    VERSION 0.6.1
     LANGUAGES NONE
     HOMEPAGE_URL "https://corrosion-rs.github.io/corrosion/";
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/corrosion-0.6.0/RELEASES.md 
new/corrosion-0.6.1/RELEASES.md
--- old/corrosion-0.6.0/RELEASES.md     2025-11-23 13:14:15.000000000 +0100
+++ new/corrosion-0.6.1/RELEASES.md     2026-01-17 11:46:47.000000000 +0100
@@ -1,3 +1,11 @@
+# v0.6.1 (2025-01-17)
+
+## Fixes
+
+- Fix building shared libraries for iOS.
+- Fix host linker detection for iOS and add the `CORROSION_HOST_TARGET_LINKER` 
cache variable,
+  to allow users to override the linker used for the host build (required for 
build-scripts and proc-macros).
+
 # v0.6.0 (2025-11-23)
 
 ### Breaking Changes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/corrosion-0.6.0/cmake/Corrosion.cmake 
new/corrosion-0.6.1/cmake/Corrosion.cmake
--- old/corrosion-0.6.0/cmake/Corrosion.cmake   2025-11-23 13:14:15.000000000 
+0100
+++ new/corrosion-0.6.1/cmake/Corrosion.cmake   2026-01-17 11:46:47.000000000 
+0100
@@ -31,6 +31,19 @@
     OFF
 )
 
+if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_NAME STREQUAL 
"iOS")
+    if(DEFINED CORROSION_HOST_TARGET_LINKER)
+        set(_corrosion_host_linker "${CORROSION_HOST_TARGET_LINKER}")
+        message(DEBUG "Using user provided CORROSION_HOST_TARGET_LINKER: 
${CORROSION_HOST_TARGET_LINKER}")
+    else()
+        set(_corrosion_host_linker "/usr/bin/cc")
+    endif()
+    set(CORROSION_HOST_TARGET_LINKER "${_corrosion_host_linker}"
+        CACHE STRING
+        "The linker-driver corrosion will use to compile host-targets. 
Currently only used when cross-compiling for iOS."
+        FORCE)
+endif()
+
 find_package(Rust REQUIRED)
 
 if(CMAKE_GENERATOR MATCHES "Visual Studio"
@@ -408,6 +421,7 @@
     set(is_windows_gnu "")
     set(is_windows_msvc "")
     set(is_macos "")
+    set(is_ios "")
     if(Rust_CARGO_TARGET_OS STREQUAL "windows")
         set(is_windows TRUE)
         if(Rust_CARGO_TARGET_ENV STREQUAL "msvc")
@@ -417,6 +431,8 @@
         endif()
     elseif(Rust_CARGO_TARGET_OS STREQUAL "darwin")
         set(is_macos TRUE)
+    elseif(Rust_CARGO_TARGET_OS STREQUAL "ios")
+        set(is_ios true)
     endif()
 
     # target file names
@@ -430,7 +446,7 @@
 
     if(is_windows)
         set(dynamic_lib_name "${lib_name}.dll")
-    elseif(is_macos)
+    elseif(is_macos OR is_ios)
         set(dynamic_lib_name "lib${lib_name}.dylib")
     else()
         set(dynamic_lib_name "lib${lib_name}.so")
@@ -787,26 +803,19 @@
         list(APPEND corrosion_cc_rs_flags 
"AR_${stripped_target_triple}=${CMAKE_AR}")
     endif()
 
-    # Todo: use a cache variable to avoid rechecking
     # When using XCode to target iOS / iOSSimulator, `cc` will be a compiler 
that targets iOS.
     # (Presumably this is because XCode modifies PATH).
     # This causes linker errors, because Rust compiles build-scripts and 
proc-macros for the host-platform, and
     # assumes `cc` is a valid linker driver for the host platform (but in this 
case `cc` targets iOS).
-    # To work around this we explicitly set the linker for the host platform, 
and use a dummy CMake project
-    # to determine a suitable C compiler.
+    # To work around this we explicitly set the linker for the host platform.
     unset(cargo_host_target_linker)
     if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_NAME STREQUAL 
"iOS")
-        message(CHECK_START "Determining linker for host architecture 
(${Rust_CARGO_HOST_TARGET_CACHED})")
-        string(TOUPPER Rust_CARGO_HOST_TARGET_CACHED host_target_upper)
-        string(REPLACE "-" "_" host_target_upper host_target_upper_underscore)
-        unset(corrosion_host_c_compiler)
-        _corrosion_determine_host_compiler(corrosion_host_c_compiler 
cor_error_info)
-        if(DEFINED corrosion_host_c_compiler)
-            message(CHECK_PASS "${corrosion_host_c_compiler}")
-            set(cargo_host_target_linker 
"CARGO_TARGET_${host_target_upper_underscore}_LINKER=${corrosion_host_c_compiler}")
-        else()
-            message(CHECK_FAIL "Failed - ${cor_error_info}")
-        endif()
+        string(TOUPPER "${Rust_CARGO_HOST_TARGET_CACHED}" host_target_upper)
+        string(REPLACE "-" "_" host_target_upper_underscore 
"${host_target_upper}")
+        set(cargo_host_target_linker 
"CARGO_TARGET_${host_target_upper_underscore}_LINKER=$CACHE{CORROSION_HOST_TARGET_LINKER}")
+        message(DEBUG "Setting `${cargo_host_target_linker}` for target 
${target_name} to workaround a hostbuild"
+            " issue when building targets for iOS."
+        )
     endif()
 
     # Since we instruct cc-rs to use the compiler found by CMake, it is likely 
one that requires also
@@ -2300,48 +2309,6 @@
     endif()
 endfunction()
 
-function(_corrosion_determine_host_compiler host_c_compiler_out error_out)
-    # Create minimal CMakeLists.txt to be generated for the host.
-    set(package_dir "${CMAKE_BINARY_DIR}/corrosion/host_compiler")
-    file(REMOVE_RECURSE "${package_dir}")
-    file(MAKE_DIRECTORY "${package_dir}")
-    set(lists "cmake_minimum_required(VERSION 3.10)\n")
-    string(APPEND lists "project(CorrosionDetermineHostCompiler LANGUAGES 
C)\n")
-    # We add a `:` after the compiler so we can easily match the end, since 
`:` is
-    # invalid in filenames.
-    string(APPEND lists "message(STATUS 
\"HOST_C_COMPILER=\${CMAKE_C_COMPILER}:\")\n")
-    file(WRITE "${package_dir}/CMakeLists.txt" "${lists}")
-
-    # Generate the CMake project.
-    execute_process(
-            COMMAND ${CMAKE_COMMAND}
-            -DCMAKE_CROSSCOMPILING=OFF
-            "${package_dir}"
-            WORKING_DIRECTORY "${package_dir}"
-            OUTPUT_VARIABLE host_detection_output
-            ERROR_VARIABLE host_detection_error
-            RESULT_VARIABLE host_detection_result
-            OUTPUT_STRIP_TRAILING_WHITESPACE
-            ERROR_STRIP_TRAILING_WHITESPACE
-    )
-
-    # Check if configuring the dummy CMake project failed.
-    if(NOT host_detection_result EQUAL 0)
-        message(WARNING "Failed to detect host compiler. Result: 
${host_detection_result}\n"
-                "Output: ${host_detection_output}\n"
-                "Error: ${host_detection_result}")
-        return()
-    endif()
-
-    # Extract C compiler from the output.
-    string(REGEX MATCH "HOST_C_COMPILER=([^:\r\n]*):" host_c_compiler_match 
"${host_detection_output}")
-    if(host_c_compiler_match)
-        set("${host_c_compiler_out}" "${CMAKE_MATCH_1}" PARENT_SCOPE)
-    else()
-        set("${error_out}" "Regex match failure: ${host_detection_output}")
-    endif()
-endfunction()
-
 function(_corrosion_initialize_properties target_name)
     # Initialize the `<XYZ>_OUTPUT_DIRECTORY` properties based on 
`CMAKE_<XYZ>_OUTPUT_DIRECTORY`.
     foreach(output_var RUNTIME_OUTPUT_DIRECTORY ARCHIVE_OUTPUT_DIRECTORY 
LIBRARY_OUTPUT_DIRECTORY PDB_OUTPUT_DIRECTORY)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/corrosion-0.6.0/doc/src/usage.md 
new/corrosion-0.6.1/doc/src/usage.md
--- old/corrosion-0.6.0/doc/src/usage.md        2025-11-23 13:14:15.000000000 
+0100
+++ new/corrosion-0.6.1/doc/src/usage.md        2026-01-17 11:46:47.000000000 
+0100
@@ -183,6 +183,11 @@
 - `CORROSION_TOOLS_RUST_TOOLCHAIN:STRING`: Specify a different toolchain (e.g. 
`stable`) to use for compiling helper 
    tools such as `cbindgen` or `cxxbridge`. This can be useful when you want 
to compile your project with an 
    older rust version (e.g. for checking the MSRV), but you can build 
build-tools with a newer installed rust version.
+- `CORROSION_HOST_TARGET_LINKER`: This cache variable is currently **only used 
when targeting iOS** and allows the user
+    to select a linker-driver (e.g. `/usr/bin/cc`) for linking artifacts for 
the host target. This option is useful
+   when the build contains build-scripts or proc-macros (which run on the host 
target) and the default value is not
+   working.
+
 
 #### Enable Convenience Options
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/corrosion-0.6.0/test/CMakeLists.txt 
new/corrosion-0.6.1/test/CMakeLists.txt
--- old/corrosion-0.6.0/test/CMakeLists.txt     2025-11-23 13:14:15.000000000 
+0100
+++ new/corrosion-0.6.1/test/CMakeLists.txt     2026-01-17 11:46:47.000000000 
+0100
@@ -109,6 +109,9 @@
     if(CMAKE_OSX_ARCHITECTURES)
         list(APPEND configure_cmake_args OSX_ARCHITECTURES 
"${CMAKE_OSX_ARCHITECTURES}")
     endif()
+    if(CMAKE_OSX_SYSROOT)
+        list(APPEND configure_cmake_args OSX_SYSROOT "${CMAKE_OSX_SYSROOT}")
+    endif()
     if(CMAKE_TOOLCHAIN_FILE)
         list(APPEND configure_cmake_args TOOLCHAIN_FILE 
"${CMAKE_TOOLCHAIN_FILE}")
     endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/corrosion-0.6.0/test/ConfigureAndBuild.cmake 
new/corrosion-0.6.1/test/ConfigureAndBuild.cmake
--- old/corrosion-0.6.0/test/ConfigureAndBuild.cmake    2025-11-23 
13:14:15.000000000 +0100
+++ new/corrosion-0.6.1/test/ConfigureAndBuild.cmake    2026-01-17 
11:46:47.000000000 +0100
@@ -22,6 +22,7 @@
     SYSTEM_NAME
     CARGO_PROFILE
     OSX_ARCHITECTURES
+    OSX_SYSROOT
     TOOLCHAIN_FILE
 )
 set(multiValueArgs "PASS_THROUGH_ARGS")
@@ -56,6 +57,9 @@
 if(TEST_OSX_ARCHITECTURES)
     list(APPEND configure_args 
"-DCMAKE_OSX_ARCHITECTURES=${TEST_OSX_ARCHITECTURES}")
 endif()
+if(TEST_OSX_SYSROOT)
+    list(APPEND configure_args "-DCMAKE_OSX_SYSROOT=${TEST_OSX_SYSROOT}")
+endif()
 if(TEST_TOOLCHAIN_FILE)
     list(APPEND configure_args "-DCMAKE_TOOLCHAIN_FILE=${TEST_TOOLCHAIN_FILE}")
 endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/corrosion-0.6.0/test/output 
directory/CMakeLists.txt" "new/corrosion-0.6.1/test/output 
directory/CMakeLists.txt"
--- "old/corrosion-0.6.0/test/output directory/CMakeLists.txt"  2025-11-23 
13:14:15.000000000 +0100
+++ "new/corrosion-0.6.1/test/output directory/CMakeLists.txt"  2026-01-17 
11:46:47.000000000 +0100
@@ -17,6 +17,9 @@
 if(CMAKE_OSX_ARCHITECTURES)
     list(APPEND configure_cmake_args OSX_ARCHITECTURES 
"${CMAKE_OSX_ARCHITECTURES}")
 endif()
+if(CMAKE_OSX_SYSROOT)
+    list(APPEND configure_cmake_args OSX_SYSROOT "${CMAKE_OSX_SYSROOT}")
+endif()
 if(CMAKE_TOOLCHAIN_FILE)
     list(APPEND configure_cmake_args TOOLCHAIN_FILE "${CMAKE_TOOLCHAIN_FILE}")
 endif()

Reply via email to