Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package opm-simulators

[ Reason ]
Package contains fixes to d/*control and d/rules files (might ease rebuilds)
and fixes the version string of the programs. Is blocked only because britney
thinks that not all autopkgtests have run, but those for official architectures
with binaries have run

[ Impact ]
Slight impact on the user if he/she build software based on opm-simulators.
Without the new version there might be issues when using alberta

[ Tests ]
All autopkgtests for architectures with binaries have run

[ Risks ]
Small, because not much code is changed

[ Checklist ]
  [X] all changes are documented in the d/changelog
  [X] I reviewed all changes and I approve them
  [X] attach debdiff against the package in testing

[ Other info ]
None

unblock opm-simulators/2022.10+ds-2
diff --git a/debian/changelog b/debian/changelog
index 1d514e256..df8054d61 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+opm-simulators (2022.10+ds-2) unstable; urgency=medium
+
+  * d/rules: Require 4GB of RAM per make process
+  * [cmake]  Work around missing imported Alberta targets.
+  * d/control: Fixed version string used in binaries.
+
+ -- Markus Blatt <mar...@dr-blatt.de>  Thu, 09 Mar 2023 13:31:04 +0100
+
 opm-simulators (2022.10+ds-1) unstable; urgency=medium
 
   * New upstream version 2022.10
diff --git a/debian/control b/debian/control
index 50cb90194..eb74c3c7c 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Maintainer: Debian Science Maintainers 
<debian-science-maintainers@lists.alioth.
 Uploaders: Arne Morten Kvarving <arne.morten.kvarv...@sintef.no>, Markus Blatt 
<mar...@dr-blatt.de>
 Build-Depends: debhelper-compat (= 12), cmake (>=3.10), quilt, dh-python,
                libboost-system-dev, libboost-date-time-dev, libboost-test-dev,
-               zlib1g-dev, gfortran, pkg-config, git, libtool, doxygen,
+               zlib1g-dev, gfortran, pkg-config, lsb-release, libtool, doxygen,
                texlive-latex-extra, texlive-latex-recommended, ghostscript,
                libopm-grid-dev (>= 2022.10), libopm-models-dev (>= 2022.10),  
mpi-default-dev, mpi-default-bin,
                python3-dev, libpython3-dev, python3-distutils, pybind11-dev
diff --git 
a/debian/patches/0003-cmake-Work-around-missing-imported-Alberta-targets.patch 
b/debian/patches/0003-cmake-Work-around-missing-imported-Alberta-targets.patch
new file mode 100644
index 000000000..e716106e5
--- /dev/null
+++ 
b/debian/patches/0003-cmake-Work-around-missing-imported-Alberta-targets.patch
@@ -0,0 +1,27 @@
+From: Markus Blatt <mar...@dr-blatt.de>
+Date: Fri, 23 Dec 2022 13:32:43 +0100
+Subject: [cmake]  Work around missing imported Alberta targets.
+
+For the autopkgtest Alberta is not searched before dune-grid and
+hence leading to errors about missing imported targets.
+
+With this workaround we make sure that Alberta is searched for before
+dune-grid to prevent this.
+---
+ opm-simulators-prereqs.cmake | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/opm-simulators-prereqs.cmake b/opm-simulators-prereqs.cmake
+index 69fb165..4640914 100644
+--- a/opm-simulators-prereqs.cmake
++++ b/opm-simulators-prereqs.cmake
+@@ -28,6 +28,9 @@ set (opm-simulators_DEPS
+   # Various runtime library enhancements
+   "Boost 1.44.0
+     COMPONENTS date_time system unit_test_framework REQUIRED"
++  # work around issue in the CMake dependecy search order
++  # We need some imported targets before the othr
++  "Alberta"
+   # DUNE prerequisites
+   "dune-common REQUIRED"
+   "dune-istl REQUIRED"
diff --git a/debian/patches/series b/debian/patches/series
index 0f35f5775..309f2d0e1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 0001-Fixed-typo-acess-access.patch
 0002-Use-SKIP_BUILD_RPATH-for-python-lib-of-simulators.patch
+0003-cmake-Work-around-missing-imported-Alberta-targets.patch
diff --git a/debian/rules b/debian/rules
index 598aeb7e3..f18fc8bbd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,10 +18,12 @@ ifneq ("$(wildcard $(OPM_LIB_DEBIAN_MK))","")
     include $(OPM_LIB_DEBIAN_MK) # for makeshlibs
 endif
 
-# Set DEBIAN_FORCE_PARALLEL to compile in parallel
-ifeq ($(strip $(DEBIAN_FORCE_PARALLEL)),)
-   DEB_PARALLEL="--max-parallel=1"
-endif
+# require 4GB of RAM per make process
+need_gb_ram_per_process=4
+free_ram=$(shell free -g | sed -n 2p| sed "s/ \+/ /g"| cut -d " " -f 2)
+max_procs=$(shell echo "$(free_ram)/$(need_gb_ram_per_process)" | bc)
+parallel_procs=$(shell if test "$(max_procs)" -lt "1"; then echo 1; else echo 
"$(max_procs)"; fi)
 
 %:
-       dh $@ --with python3 $(DEB_PARALLEL)
+       echo "ram in gb: $(free_ram), needed ram per thread: 
$(need_gb_ram_per_process), threads: $(parallel_procs)"
+       dh $@ --with python3 --max-parallel=$(parallel_procs)

Reply via email to