diff --git a/.github/actions/build-deb-package/action.yml b/.github/actions/build-deb-package/action.yml index f942c098f39..30e5fbe7a48 100644 --- a/.github/actions/build-deb-package/action.yml +++ b/.github/actions/build-deb-package/action.yml @@ -35,6 +35,8 @@ runs: run: | docker run --rm \ -v "$GITHUB_WORKSPACE:/workspace" \ + -e DEBEMAIL="ci@zeroc.com" \ + -e DEBFULLNAME="CI" \ -e ICE_VERSION=${{ inputs.ice_version }} \ -e DEB_BUILD_OPTIONS="${{ inputs.deb_build_options }}" \ -e DEB_BUILD_PROFILES="${{ inputs.deb_build_profiles }}" \ diff --git a/.github/actions/build-rpm-package/action.yml b/.github/actions/build-rpm-package/action.yml index 44a1c41645c..61580a8df40 100644 --- a/.github/actions/build-rpm-package/action.yml +++ b/.github/actions/build-rpm-package/action.yml @@ -23,6 +23,7 @@ runs: docker run --rm \ -v "$GITHUB_WORKSPACE:/workspace" \ -e ICE_VERSION="${{ inputs.ice_version }}" \ + -e GIT_TAG="${{ github.ref_name }}" \ -e TARGET_ARCH="${{ inputs.arch }}" \ ice-rpm-package-builder /workspace/ice/packaging/rpm/build-package.sh shell: bash diff --git a/.github/actions/setup-dependencies/action.yml b/.github/actions/setup-dependencies/action.yml index 249be60f645..d7d28f609f6 100644 --- a/.github/actions/setup-dependencies/action.yml +++ b/.github/actions/setup-dependencies/action.yml @@ -31,6 +31,7 @@ runs: - uses: ruby/setup-ruby@v1 with: ruby-version: "3.3" + if: runner.os != 'Windows' - uses: actions/setup-node@v4 with: diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index cadec731ddc..fe1ef42f82c 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -55,7 +55,7 @@ jobs: arch: x86_64 deb_build_profiles: "no-python312" - - os: debian12 + - distribution: debian-12 arch: aarch64 deb_build_profiles: "no-python312" diff --git a/.github/workflows/build-dotnet-packages.yml b/.github/workflows/build-dotnet-packages.yml index c37be102dbc..007030f40e1 100644 --- a/.github/workflows/build-dotnet-packages.yml +++ b/.github/workflows/build-dotnet-packages.yml @@ -90,9 +90,10 @@ jobs: run: nuget restore cpp/msbuild/ice.sln - name: Pack .NET Packages - run: dotnet msbuild csharp/msbuild/ice.proj /t:Pack /p:Configuration=Release /p:Platform=x64 + run: dotnet msbuild csharp\msbuild\ice.proj /t:Pack /p:Configuration=Release /p:Platform=x64 env: - VERSION: ${{ inputs.ice_version || '' }} + Version: ${{ inputs.ice_version || '' }} + PackageVersion: ${{ inputs.ice_version || '' }} - name: Upload NuGet Packages uses: actions/upload-artifact@v4 @@ -104,5 +105,5 @@ jobs: - name: Publish NuGet Packages run: | - dotnet nuget push csharp/msbuild/zeroc.ice.net/*.nupkg --source ${{ inputs.source_url }} --api-key ${{ secrets.NUGET_API_KEY }} + dotnet nuget push csharp\msbuild\zeroc.ice.net\*.nupkg --source ${{ inputs.source_url }} --api-key ${{ secrets.NUGET_API_KEY }} if: inputs.source_url != '' diff --git a/.github/workflows/build-gem-packages.yml b/.github/workflows/build-gem-packages.yml index d072df5b7f9..819f2fae424 100644 --- a/.github/workflows/build-gem-packages.yml +++ b/.github/workflows/build-gem-packages.yml @@ -4,10 +4,10 @@ on: workflow_call: inputs: ice_version: - required: true + required: false type: string repository_url: - required: true + required: false type: string secrets: REPOSITORY_USERNAME: @@ -56,5 +56,5 @@ jobs: - name: Publish GEM Packages run: | curl -u "${REPOSITORY_USERNAME}:${REPOSITORY_PASSWORD}" \ - --upload-file "ruby/*.gem" ${{ inputs.repository_url }} + --upload-file ruby/*.gem ${{ inputs.repository_url }} if: inputs.repository_url != '' diff --git a/.github/workflows/build-maven-packages.yml b/.github/workflows/build-maven-packages.yml index 87d0d671a3b..433cbf24968 100644 --- a/.github/workflows/build-maven-packages.yml +++ b/.github/workflows/build-maven-packages.yml @@ -25,7 +25,7 @@ on: type: string jobs: - build-slice-compilers: + build-maven-packages: runs-on: ubuntu-24.04 steps: @@ -56,6 +56,7 @@ jobs: - name: Publish Maven Packages run: ./gradlew publish + working-directory: java env: MAVEN_REPOSITORY: ${{ inputs.repository_url }} MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} diff --git a/.github/workflows/build-msi-package.yml b/.github/workflows/build-msi-package.yml index 9a97472d870..7f671756ded 100644 --- a/.github/workflows/build-msi-package.yml +++ b/.github/workflows/build-msi-package.yml @@ -25,6 +25,9 @@ jobs: - name: Build MSI run: dotnet build -c Release -p:Platform=x64 working-directory: packaging/msi + env: + # TODO compute this variable see issue #3558 + VCInstallDir: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC" - name: Upload NuGet Packages uses: actions/upload-artifact@v4 diff --git a/.github/workflows/build-nightly-release-workflow.yml b/.github/workflows/build-nightly-release-workflow.yml index 314c592f5c6..98ecafbb53f 100644 --- a/.github/workflows/build-nightly-release-workflow.yml +++ b/.github/workflows/build-nightly-release-workflow.yml @@ -10,7 +10,7 @@ on: repository_url: description: "URL of the repository to publish to" required: false - default: "https://download.zeroc.com/nexus/" + default: "https://download.zeroc.com/nexus/repository" jobs: set-version: @@ -32,20 +32,20 @@ jobs: VERSION=3.8.0 # Set version variables for nightly packages according to the platform conventions: - # - DEB: 3.8.0-0.nightlyYYYYMMDD.BUILD + # - DEB: 3.8.0-0.nightly. echo "deb_version=${VERSION}-0.nightly${DATE}.${BUILD}" >> $GITHUB_OUTPUT - # - GEM: 3.8.0.pre.YYYYMMDD.BUILD + # - GEM: 3.8.0.pre.. echo "gem_version=${VERSION}.pre.${DATE}.${BUILD}" >> $GITHUB_OUTPUT - # - MAVEN: 3.8.0-nightly-YYYYMMDD.BUILD-SNAPSHOT + # - MAVEN: 3.8.0-nightly-.-SNAPSHOT echo "maven_version=${VERSION}-nightly-${DATE}.${BUILD}-SNAPSHOT" >> $GITHUB_OUTPUT - # - NPM: 3.8.0-nightly.YYYYMMDD.BUILD + # - NPM: 3.8.0-nightly.. echo "npm_version=${VERSION}-nightly.${DATE}.${BUILD}" >> $GITHUB_OUTPUT - # - NuGet: 3.8.0-nightly.YYYYMMDD.BUILD + # - NuGet: 3.8.0-nightly.. echo "nuget_version=${VERSION}-nightly.${DATE}.${BUILD}" >> $GITHUB_OUTPUT - # - PyPI: 3.8.0.devYYYYMMDD.BUILD - echo "pypi_version=${VERSION}.dev${DATE}.${BUILD}" >> $GITHUB_OUTPUT - # - RPM: 3.8.0-0.nightlyYYYYMMDD.BUILD - echo "rpm_version=${VERSION}-0.nightly${DATE}.${BUILD}" >> $GITHUB_OUTPUT + # - PyPI: 3.8.0.dev + echo "pypi_version=${VERSION}.dev${DATE}${BUILD}" >> $GITHUB_OUTPUT + # - RPM: 3.8.0~0.nightly. + echo "rpm_version=${VERSION}~0.nightly${DATE}.${BUILD}" >> $GITHUB_OUTPUT build-deb-packages: name: Build DEB Packages diff --git a/.github/workflows/build-npm-packages.yml b/.github/workflows/build-npm-packages.yml index 014e9722b82..ae54f2fdbda 100644 --- a/.github/workflows/build-npm-packages.yml +++ b/.github/workflows/build-npm-packages.yml @@ -104,8 +104,8 @@ jobs: working-directory: ice/js - name: Update Version - run: | - sed -i 's/"version":.*/"version": "${{ inputs.ice_version }}"/' package.json + working-directory: ice/js + run: npm version ${{ inputs.ice_version }} if: inputs.ice_version != '' - name: Pack npm @@ -119,10 +119,11 @@ jobs: path: ice/js/*.tgz - name: Publish NPM Packages + working-directory: ice/js run: | echo "//${{ inputs.registry_url }}/:_auth=\${NPM_AUTH_TOKEN}" > ~/.npmrc echo "always-auth=true" >> ~/.npmrc - npm publish ice/js/*.tgz --registry ${{ inputs.registry_url }} + npm publish *.tgz --registry ${{ inputs.registry_url }} env: NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} if: inputs.registry_url != '' diff --git a/.github/workflows/build-pip-packages.yml b/.github/workflows/build-pip-packages.yml index a2574b46247..ee46ae0b38c 100644 --- a/.github/workflows/build-pip-packages.yml +++ b/.github/workflows/build-pip-packages.yml @@ -45,10 +45,10 @@ jobs: run: | python3 -m pip install --upgrade pip python3 -m pip install build + python3 -m pip install toml - name: Update PYPI Version - working-directory: python - run: sed -i 's/version = .*/version = "${{ inputs.ice_version }}"/' pyproject.toml + run: python3 packaging/pypi/update_version.py ${{ inputs.ice_version }} python/pyproject.toml if: inputs.ice_version != '' - name: Build PIP Package @@ -74,7 +74,8 @@ jobs: path: artifacts - name: Publish PIP Package - run: mkdir -p ${{ github.workspace }}/dist + run: | + mkdir -p ${{ github.workspace }}/dist cp -r artifacts/pip-packages-windows-latest/*.whl ${{ github.workspace }}/dist cp -r artifacts/pip-packages-macos-latest/*.whl ${{ github.workspace }}/dist cp -r artifacts/pip-packages-macos-latest/*.tar.gz ${{ github.workspace }}/dist diff --git a/.github/workflows/build-xcframework-packages.yml b/.github/workflows/build-xcframework-packages.yml index 4d4d85ec3dd..f206892e7de 100644 --- a/.github/workflows/build-xcframework-packages.yml +++ b/.github/workflows/build-xcframework-packages.yml @@ -17,6 +17,7 @@ jobs: - name: Build XCFramework Packages run: make OPTIMIZE=yes PLATFORMS="all" CONFIGS="static" srcs + working-directory: cpp - name: Upload Artifacts uses: actions/upload-artifact@v4 diff --git a/cpp/doxygen/examples/Ice/Makefile.mk b/cpp/doxygen/examples/Ice/Makefile.mk index a882f3dfd8e..db611606006 100644 --- a/cpp/doxygen/examples/Ice/Makefile.mk +++ b/cpp/doxygen/examples/Ice/Makefile.mk @@ -1,6 +1,7 @@ # Copyright (c) ZeroC, Inc. $(project)_libraries = IceExamples +$(project)_caninstall := no IceExamples_dependencies := Ice IceExamples_targetdir := doxygen/examples/lib diff --git a/csharp/msbuild/ice.proj b/csharp/msbuild/ice.proj index 8912a64becb..0ca94aece27 100644 --- a/csharp/msbuild/ice.proj +++ b/csharp/msbuild/ice.proj @@ -8,6 +8,9 @@ + + $(IceJSONVersion) + @@ -20,7 +23,21 @@ Configuration=$(Configuration);Platform=Any CPU;CppPlatform=$(CppPlatform) + Version=$(Version) + PackageVersion=$(PackageVersion) + + + + Configuration=$(Configuration);Platform=Any CPU;AppTargetFramework=net8.0 + Version=$(Version) + PackageVersion=$(PackageVersion) + + + Configuration=$(Configuration);Platform=Any CPU;CppPlatform=$(CppPlatform) + Version=$(Version) + PackageVersion=$(PackageVersion) + @@ -51,10 +68,8 @@ - - + + @@ -68,8 +83,8 @@ $(NuGetGlobalPackages.TrimStart('global-packages: ')) - - + + diff --git a/packaging/dpkg/build-package.sh b/packaging/dpkg/build-package.sh index 8c2e96e4d12..fca62f16ceb 100755 --- a/packaging/dpkg/build-package.sh +++ b/packaging/dpkg/build-package.sh @@ -15,14 +15,17 @@ else ICE_VERSION=$(dpkg-parsechangelog --file /workspace/build/debian/changelog --show-field Version) fi -# Generate a tarball of the current repository state for the given ICE_VERSION -echo "Creating tarball for ICE_VERSION=$ICE_VERSION" +UPSTREAM_VERSION=$(echo $ICE_VERSION | cut -f1 -d'-') + +# Generate a tarball of the current repository state for the given UPSTREAM_VERSION +echo "Creating tarball for UPSTREAM_VERSION=$UPSTREAM_VERSION" cd /workspace/ice -git archive --format=tar.gz -o /workspace/zeroc-ice_${ICE_VERSION}.orig.tar.gz HEAD +git config --global --add safe.directory /workspace/ice +git archive --format=tar.gz -o /workspace/zeroc-ice_${UPSTREAM_VERSION}.orig.tar.gz HEAD # Unpack the source tarball cd /workspace/build -tar xzf ../zeroc-ice_${ICE_VERSION}.orig.tar.gz +tar xzf ../zeroc-ice_${UPSTREAM_VERSION}.orig.tar.gz # Build the source package (-S generates .dsc and .tar.gz files) dpkg-buildpackage -S diff --git a/packaging/msi/Ice.wixproj b/packaging/msi/Ice.wixproj index 7b32fd42476..d5c554a97d2 100644 --- a/packaging/msi/Ice.wixproj +++ b/packaging/msi/Ice.wixproj @@ -10,6 +10,7 @@ + diff --git a/packaging/msi/Product.wxs b/packaging/msi/Product.wxs index ddf1ceb2f13..b988a86eaf8 100644 --- a/packaging/msi/Product.wxs +++ b/packaging/msi/Product.wxs @@ -37,8 +37,8 @@ - @@ -113,7 +113,7 @@ - + diff --git a/packaging/pypi/update_version.py b/packaging/pypi/update_version.py new file mode 100644 index 00000000000..f353d63cd4d --- /dev/null +++ b/packaging/pypi/update_version.py @@ -0,0 +1,17 @@ +import toml +import sys + +if len(sys.argv) != 3: + print("Usage: update_version.py ") + sys.exit(1) + +new_version = sys.argv[1] +path = sys.argv[2] + +data = toml.load(path) +data["project"]["version"] = new_version + +with open(path, "w") as f: + toml.dump(data, f) + +print(f"Updated version to {new_version}") diff --git a/packaging/rpm/build-package.sh b/packaging/rpm/build-package.sh index 98c47780f78..fd40c4910f7 100755 --- a/packaging/rpm/build-package.sh +++ b/packaging/rpm/build-package.sh @@ -28,12 +28,16 @@ fi # Define common RPM macros RPM_MACROS=() -RPM_MACROS+=(-D "_topdir $RPM_BUILD_ROOT") -RPM_MACROS+=(-D "vendor ZeroC, Inc.") +RPM_MACROS+=(--define "_topdir $RPM_BUILD_ROOT") +RPM_MACROS+=(--define "vendor ZeroC, Inc.") + +if [[ -n "${GIT_TAG:-}" ]]; then + RPM_MACROS+=(--define "git_tag $GIT_TAG") +fi # Download sources cd "$RPM_BUILD_ROOT/SOURCES" -spectool -g "$ICE_SPEC_DEST" || { echo "Error: Failed to download sources."; exit 1; } +spectool -g "${RPM_MACROS[@]}" "$ICE_SPEC_DEST" || { echo "Error: Failed to download sources."; exit 1; } # Build source RPM rpmbuild -bs "$ICE_SPEC_DEST" "${RPM_MACROS[@]}" --target="$TARGET_ARCH" diff --git a/packaging/rpm/docker/rhel9/Dockerfile b/packaging/rpm/docker/rhel9/Dockerfile index 209b5968d67..5c177c85a2a 100644 --- a/packaging/rpm/docker/rhel9/Dockerfile +++ b/packaging/rpm/docker/rhel9/Dockerfile @@ -8,7 +8,7 @@ RUN dnf install -y https://zeroc.com/download/ice/3.7/el9/ice-repo-3.7.el9.noarc RUN dnf install --setopt=multilib_policy=all -y \ rpmdevtools \ make \ - curl \ + curl-minimal \ git \ gcc-c++ \ glibc-devel \ diff --git a/packaging/rpm/glacier2router.service b/packaging/rpm/glacier2router.service new file mode 100644 index 00000000000..034e5b5eeea --- /dev/null +++ b/packaging/rpm/glacier2router.service @@ -0,0 +1,18 @@ +# Copyright (c) ZeroC, Inc. + +[Unit] +Description=Glacier2 router daemon +Documentation=man:glacier2router(1) +Documentation=https://doc.zeroc.com/ice/latest/ice-services/glacier2 +After=syslog.target network.target + +[Service] +ExecStart=/usr/bin/glacier2router --Ice.Config=/etc/glacier2router.conf +Type=notify +NotifyAccess=main +RuntimeDirectory=glacier2router +KillMode=process +User=ice + +[Install] +WantedBy=multi-user.target diff --git a/packaging/rpm/ice.spec b/packaging/rpm/ice.spec index 3667427c054..31678a307e7 100644 --- a/packaging/rpm/ice.spec +++ b/packaging/rpm/ice.spec @@ -1,17 +1,10 @@ -# -# Copyright (c) ZeroC, Inc. All rights reserved. -# +# Copyright (c) ZeroC, Inc. -# -# git_tag, when defined, is typically a branch, for example master -# +# git_tag, when defined, is typically a branch, for example 3.7 %if 0%{?git_tag:1} %define archive_tag %{git_tag} - %define archive_dir_suffix %{git_tag} %else - # if git_tag is not defined we build the package from the main branch. - %define archive_tag main - %define archive_dir_suffix main + %define archive_tag main %endif %define shadow shadow-utils @@ -36,8 +29,8 @@ Name: %{?nameprefix}ice Version: 3.8.0~alpha0 -Summary: Comprehensive RPC framework with support for C++, Java, JavaScript, Python and more. Release: 1%{?dist} +Summary: Comprehensive RPC framework with support for C++, Java, JavaScript, Python and more. %if "%{?ice_license}" License: %{ice_license} %else @@ -120,6 +113,7 @@ Group: System Environment/Libraries Requires: %{?nameprefix}icebox%{?_isa} = %{version}-%{release} Requires: lib%{?nameprefix}icestorm3.7%{?_isa} = %{version}-%{release} %ifarch %{_host_cpu} +Requires: %{?nameprefix}dsnode%{?_isa} = %{version}-%{release} Requires: %{?nameprefix}glacier2%{?_isa} = %{version}-%{release} Requires: %{?nameprefix}icegrid%{?_isa} = %{version}-%{release} Requires: %{?nameprefix}icebridge%{?_isa} = %{version}-%{release} @@ -127,7 +121,7 @@ Requires: php-%{?nameprefix}ice%{?_isa} = %{version}-%{release} Requires: python3-%{?nameprefix}ice%{?_isa} = %{version}-%{release} Requires: lib%{?nameprefix}ice3.8-c++%{?_isa} = %{version}-%{release} Requires: %{?nameprefix}icegridgui = %{version}-%{release} -%endif # %{_host_cpu} +%endif %description -n %{?nameprefix}ice-all-runtime This is a meta package that depends on all run-time packages for Ice. @@ -351,10 +345,10 @@ with minimal effort. Ice takes care of all interactions with low-level network programming interfaces and allows you to focus your efforts on your application logic. -%endif #%{_host_cpu} +%endif %prep -%setup -q -n ice-%{archive_dir_suffix} +%setup -q -n %{name}-%{archive_tag} %build # @@ -419,7 +413,7 @@ rm -rf %{buildroot}%{_includedir} rm -rf %{buildroot}%{_mandir} rm -rf %{buildroot}%{_datadir}/ice -%endif # %{_host_cpu} +%endif %ifarch %{_host_cpu} @@ -442,7 +436,7 @@ rm -rf %{buildroot}%{_datadir}/ice %attr(755,root,root) %{_bindir}/icegridgui %{_javadir}/icegridgui.jar -%endif # %{_host_cpu} +%endif # # arch-specific packages @@ -473,6 +467,7 @@ rm -rf %{buildroot}%{_datadir}/ice %license packaging/rpm/LMDB_LICENSE %license packaging/rpm/MCPP_LICENSE %doc packaging/rpm/README +%{_libdir}/libDataStorm.so.* %{_libdir}/libGlacier2.so.* %{_libdir}/libIce.so.* %{_libdir}/libIceBox.so.* @@ -524,6 +519,7 @@ exit 0 %{_libdir}/libIceLocatorDiscovery.so %{_libdir}/libIceStorm.so %ifarch %{_host_cpu} +%{_includedir}/DataStorm %{_includedir}/Glacier2 %{_includedir}/Ice %{_includedir}/IceBox @@ -648,6 +644,20 @@ exit 0 /sbin/ldconfig exit 0 +# +# dsnode package +# +%files -n %{?nameprefix}dsnode +%license LICENSE +%license ICE_LICENSE +%doc packaging/rpm/README +%{_bindir}/dsnode +%{_mandir}/man1/dsnode.1* +%post -n %{?nameprefix}dsnode -p /sbin/ldconfig +%postun -n %{?nameprefix}dsnode +/sbin/ldconfig +exit 0 + # # glacier2 package # @@ -721,7 +731,7 @@ exit 0 %doc packaging/rpm/README %{python3_sitearch}/* -%endif #%{_host_cpu} +%endif %changelog * Wed Feb 5 2025 José Gutiérrez de la Concha 3.8a0 diff --git a/packaging/rpm/icegridnode.service b/packaging/rpm/icegridnode.service new file mode 100644 index 00000000000..de4e323aa05 --- /dev/null +++ b/packaging/rpm/icegridnode.service @@ -0,0 +1,18 @@ +# Copyright (c) ZeroC, Inc. + +[Unit] +Description=IceGrid node daemon +Documentation=man:icegridnode(1) +Documentation=https://doc.zeroc.com/ice/latest/ice-services/icegrid/icegrid-server-reference/icegridnode +After=syslog.target network.target icegridregistry.service + +[Service] +ExecStart=/usr/bin/icegridnode --Ice.Config=/etc/icegridnode.conf +Type=notify +NotifyAccess=main +RuntimeDirectory=icegridnode +KillMode=process +User=ice + +[Install] +WantedBy=multi-user.target diff --git a/packaging/rpm/icegridregistry.service b/packaging/rpm/icegridregistry.service new file mode 100644 index 00000000000..6246be54f10 --- /dev/null +++ b/packaging/rpm/icegridregistry.service @@ -0,0 +1,19 @@ +# Copyright (c) ZeroC, Inc. + +[Unit] +Description=IceGrid registry daemon +Documentation=man:icegridregistry(1) +Documentation=https://doc.zeroc.com/ice/latest/ice-services/icegrid/icegrid-server-reference/icegridregistry +Before=icegridnode.service +After=syslog.target network.target + +[Service] +ExecStart=/usr/bin/icegridregistry --Ice.Config=/etc/icegridregistry.conf +Type=notify +NotifyAccess=main +RuntimeDirectory=icegridregistry +KillMode=process +User=ice + +[Install] +WantedBy=multi-user.target