Build the packages with CPack instead of source packages - #64
Draft
AnHeuermann wants to merge 1 commit into
Draft
AnHeuermann wants to merge 1 commit into
AnHeuermann wants to merge 1 commit into
Conversation
The Linux packages are now built with CMake and CPack straight from a git checkout of OpenModelica. No more source packages: no .dsc, no debian/rules, no RPM spec. What goes into which package is defined once, in OpenModelica's cmake/packaging/, where the same definition also serves the Windows installer. This repository keeps only what decides how OpenModelica is *built* for a package. cpack/build-packages.sh configures, builds and installs OpenModelica, downloads the Modelica library cache with the staged omc, and runs `cpack -G DEB` or `-G RPM`. The build policy is the one the debhelper rules and the spec carried: clang when installed, Qt 6 where its WebEngine is installed and Qt 5 elsewhere, no C++ runtime on armhf, OMOptim and encryption off, and the testsuite off so omc-diff stays out of the omc package. It checks up front that the checkout has a version to package, so a shallow clone fails in seconds instead of after the build. cpack/test-packages.sh installs packages into a clean system from a local apt or dnf repository, so the dependencies between them are resolved the way a user's package manager resolves them, and then compiles and simulates a model. Installing the files by name is how an omc that could not find the simulation runtime went unnoticed before. CI follows: packaging.yml shellchecks the scripts, since the metadata it used to check is gone, and build-deb.yml becomes build-packages.yml, which builds in the ubuntu-24.04 build-deps image and runs the install test in a clean ubuntu:24.04. Removed: debian/, rpm/, .ci/, and the standalone OMPlot, OMOptim and OpenModelica-doc source packages no pipeline built. The README lists what OpenModelica's CPack definition still has to take over from them (old package names, /usr prefix, desktop and mime files, copyright, stripping, the RPM layout) and what was obsolete. Verified end to end on Ubuntu 26.04: build-packages.sh built all 14 packages (version 1.28.0~dev-767-g7e8f9a2110), and test-packages.sh, installing only openmodelica-omc into a clean ubuntu:26.04, pulled in openmodelica-simrt and simulated a model. Running it caught a bug review had not: under pipefail, find exiting 1 on an unreadable directory made a Qt 6 system look like Qt 5. Do not merge before apt-build stops copying debian/ and fetching the RPM spec from this repository's master. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Member
Author
|
Testing new workflow |
Member
Author
|
I'm not sure if there is a lot left in this repository when this is merged. We delegate most if not all task to CMake + CPack. We might be better of including the scripts needed for CPack directly into OpenModelica. |
AnHeuermann
added a commit
to OpenModelica/build-deps
that referenced
this pull request
Sep 17, 2026
OpenModelica's OMEdit needs Qt Quick 3D when OM_OMEDIT_ENABLE_ANIMATION is on, and on the ubuntu-24.04 image that find_package fails: Qt6Quick3D could not be found because dependency Qt6Quick3DRuntimeRender could not be found. Qt6Quick3DRuntimeRender's CMake config requires ShaderTools, and noble's qt6-quick3d-dev does not pull in qt6-shadertools-dev. The comment on QT_PKGS said 24.04+ does; that is true of 26.04 and Trixie only. Jammy and Bookworm already name ShaderTools in their own Qt lists. Found by the full package build of OpenModelica/OpenModelicaBuildScripts#64, which builds in ubuntu-24.04 and stopped at OMEdit's configure. Verified in the published ubuntu-24.04 image: find_package(Qt6 COMPONENTS Quick Quick3D Qml QuickWidgets) fails as it is and succeeds with qt6-shadertools-dev, and OpenModelica master then configures completely with OpenModelicaBuildScripts' cpack/build-packages.sh. On 26.04 and Trixie the package is already installed as a dependency, so adding it to the shared list changes nothing there. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
OpenModelica/OpenModelica#16377
Changes
The Linux packages are now built with CMake and CPack straight from a git checkout of OpenModelica. No more source packages: no .dsc, no debian/rules, no RPM spec. What goes into which package is defined once, in OpenModelica's cmake/packaging/, where the same definition also serves the Windows installer. This repository keeps only what decides how OpenModelica is built for a package.
cpack/build-packages.sh configures, builds and installs OpenModelica, downloads the Modelica library cache with the staged omc, and runs
cpack -G DEBor-G RPM. The build policy is the one the debhelper rules and the spec carried: clang when installed, Qt 6 where its WebEngine is installed and Qt 5 elsewhere, no C++ runtime on armhf, OMOptim and encryption off, and the testsuite off so omc-diff stays out of the omc package. It checks up front that the checkout has a version to package, so a shallow clone fails in seconds instead of after the build.cpack/test-packages.sh installs packages into a clean system from a local apt or dnf repository, so the dependencies between them are resolved the way a user's package manager resolves them, and then compiles and simulates a model. Installing the files by name is how an omc that could not find the simulation runtime went unnoticed before.
CI follows: packaging.yml shellchecks the scripts, since the metadata it used to check is gone, and build-deb.yml becomes build-packages.yml, which builds in the ubuntu-24.04 build-deps image and runs the install test in a clean ubuntu:24.04.
Removed: debian/, rpm/, .ci/, and the standalone OMPlot, OMOptim and OpenModelica-doc source packages no pipeline built. The README lists what OpenModelica's CPack definition still has to take over from them (old package names, /usr prefix, desktop and mime files, copyright, stripping, the RPM layout) and what was obsolete.
Verified end to end on Ubuntu 26.04: build-packages.sh built all 14 packages (version 1.28.0~dev-767-g7e8f9a2110), and test-packages.sh, installing only openmodelica-omc into a clean ubuntu:26.04, pulled in openmodelica-simrt and simulated a model. Running it caught a bug review had not: under pipefail, find exiting 1 on an unreadable directory made a Qt 6 system look like Qt 5.
Do not merge before apt-build stops copying debian/ and fetching the RPM spec from this repository's master.