]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
debian: mark "make check" deps with "pkg.ceph.check" build pacific-makecheck 45650/head
authorKefu Chai <kchai@redhat.com>
Wed, 2 Dec 2020 07:31:41 +0000 (15:31 +0800)
committerDavid Galloway <dgallowa@redhat.com>
Mon, 11 Apr 2022 17:30:21 +0000 (13:30 -0400)
instead of inventing our way for defining "make check" dependencies, use
build profile for adding "make check" specific dependencies. see
https://wiki.debian.org/BuildProfileSpec

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit c0fad448e98d58fc977631a086a91c3decfef0ce)

Fixes: https://tracker.ceph.com/issues/55059
debian/control
install-deps.sh

index cb31919afa7cb5a715d5be4565b42d193df61fa7..50a59e6d628b4245d0c949cd1d5207ae17eba67b 100644 (file)
@@ -37,7 +37,7 @@ Build-Depends: automake,
                libcurl4-openssl-dev,
 # Jaeger       libevent-dev,
                libexpat1-dev,
-# Make-Check   libffi-dev [!amd64],
+               libffi-dev [!amd64] <pkg.ceph.check>,
                libfuse-dev,
                libgoogle-perftools-dev [i386 amd64 arm64],
 # Crimson      libgnutls28-dev,
@@ -68,44 +68,44 @@ Build-Depends: automake,
                librabbitmq-dev,
                librdkafka-dev,
                luarocks,
-# Make-Check   libxmlsec1,
-# Make-Check   libxmlsec1-nss,
-# Make-Check   libxmlsec1-openssl,
-# Make-Check   libxmlsec1-dev,
+               libxmlsec1 <pkg.ceph.check>,
+               libxmlsec1-nss <pkg.ceph.check>,
+               libxmlsec1-openssl <pkg.ceph.check>,
+               libxmlsec1-dev <pkg.ceph.check>,
 # Crimson      libyaml-cpp-dev,
 # Jaeger       nlohmann-json-dev | nlohmann-json3-dev,
                parted,
                patch,
                pkg-config,
-# Make-Check   prometheus,
+               prometheus <pkg.ceph.check>,
 # Crimson      protobuf-compiler,
                python3-all-dev,
                python3-cherrypy3,
-# Make-Check   python3-jwt,
-# Make-Check   python3-nose,
-# Make-Check   python3-pecan,
-# Make-Check   python3-bcrypt,
-# Make-Check   tox,
-# Make-Check   python3-coverage,
-# Make-Check   python3-dateutil,
-# Make-Check   python3-openssl,
-# Make-Check   python3-prettytable,
-# Make-Check   python3-requests,
-# Make-Check   python3-scipy,
+               python3-jwt <pkg.ceph.check>,
+               python3-nose <pkg.ceph.check>,
+               python3-pecan <pkg.ceph.check>,
+               python3-bcrypt <pkg.ceph.check>,
+               tox <pkg.ceph.check>,
+               python3-coverage <pkg.ceph.check>,
+               python3-dateutil <pkg.ceph.check>,
+               python3-openssl <pkg.ceph.check>,
+               python3-prettytable <pkg.ceph.check>,
+               python3-requests <pkg.ceph.check>,
+               python3-scipy <pkg.ceph.check>,
                python3-setuptools,
                python3-sphinx,
-# Make-Check   python3-werkzeug,
+               python3-werkzeug <pkg.ceph.check>,
                python3-setuptools,
                python3-venv,
 # Crimson      ragel,
-# Make-Check   socat,
+               socat <pkg.ceph.check>,
 # Crimson      systemtap-sdt-dev,
-# Make-Check   uuid-dev,
+               uuid-dev <pkg.ceph.check>,
                uuid-runtime,
                valgrind,
                xfslibs-dev,
-# Make-Check   xfsprogs,
-# Make-Check   xmlstarlet,
+               xfsprogs <pkg.ceph.check>,
+               xmlstarlet <pkg.ceph.check>,
                nasm [amd64],
                zlib1g-dev,
 # Jaeger       Built-Using:   libyaml-cpp-dev (>= 0.6),
@@ -1249,3 +1249,4 @@ Description: prometheus alerts for the ceph dashboard
  .
  This package contains alerts used for prometheus to interact with the
  Ceph Dashboard.
+
index cd2138bca7f9ccca11abbbc30fb2a76a3e991135..e861de57479893505e1fade8a47a89da2e1c1a49 100755 (executable)
@@ -56,8 +56,6 @@ function munge_debian_control {
     shift
     local with_seastar=$1
     shift
-    local for_make_check=$1
-    shift
     local control=$1
     case "$version" in
         *squeeze*|*wheezy*)
@@ -72,9 +70,6 @@ function munge_debian_control {
        sed -i -e 's/^# Jaeger[[:space:]]//g' $control
        sed -i -e 's/^# Crimson      libyaml-cpp-dev,/d' $control
     fi
-    if $for_make_check; then
-        sed -i 's/^# Make-Check[[:space:]]/             /g' $control
-    fi
     echo $control
 }
 
@@ -336,7 +331,7 @@ else
 
         in_jenkins && echo "CI_DEBUG: Running munge_debian_control() in install-deps.sh"
        backports=""
-       control=$(munge_debian_control "$VERSION" "$with_seastar" "$for_make_check" "debian/control")
+       control=$(munge_debian_control "$VERSION" "$with_seastar" "debian/control")
         case "$VERSION" in
             *squeeze*|*wheezy*)
                 backports="-t $codename-backports"
@@ -346,8 +341,15 @@ else
        # make a metapackage that expresses the build dependencies,
        # install it, rm the .deb; then uninstall the package as its
        # work is done
+       build_profiles=""
+       if $for_make_check; then
+           build_profiles+=",pkg.ceph.check"
+       fi
         in_jenkins && echo "CI_DEBUG: Running mk-build-deps in install-deps.sh"
-       $SUDO env DEBIAN_FRONTEND=noninteractive mk-build-deps --install --remove --tool="apt-get -y --no-install-recommends $backports" $control || exit 1
+       $SUDO env DEBIAN_FRONTEND=noninteractive mk-build-deps \
+             --build-profiles "${build_profiles#,}" \
+             --install --remove \
+             --tool="apt-get -y --no-install-recommends $backports" $control || exit 1
         in_jenkins && echo "CI_DEBUG: Removing ceph-build-deps"
        $SUDO env DEBIAN_FRONTEND=noninteractive apt-get -y remove ceph-build-deps
        if [ "$control" != "debian/control" ] ; then rm $control; fi