From 2de59afc34a49c4f4b8afc2c5d15c49df0a44ec5d1e0b8476999d5f62c32b87d Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Wed, 24 May 2023 06:31:23 +0000 Subject: [PATCH] - Add "#!BuildConstraint" to spec files for compatibility with _multibuild OBS-URL: https://build.opensuse.org/package/show/filesystems:ceph/ceph?expand=0&rev=345 --- README-ceph-test.txt | 6 ++++++ _constraints | 18 ++++++++++++++++++ ceph-test.changes | 5 +++++ ceph-test.spec | 2 ++ ceph.changes | 5 +++++ ceph.spec | 2 ++ pre_checkin.sh | 11 +++++++++++ 7 files changed, 49 insertions(+) diff --git a/README-ceph-test.txt b/README-ceph-test.txt index 3338b5a..4f3092f 100644 --- a/README-ceph-test.txt +++ b/README-ceph-test.txt @@ -23,3 +23,9 @@ files for Ceph would be tricky, error-prone, and labor-intensive. Nathan Cutler April 17, 2017 + + +Addendum: ceph-test also requires more disk space to build than ceph. +The pre_checkin.sh script writes #!BuildConstraint lines to both spec +files to set things up correctly. See the comments in _constraints for +more details. diff --git a/_constraints b/_constraints index e9facd1..e0676a9 100644 --- a/_constraints +++ b/_constraints @@ -5,6 +5,21 @@ + diff --git a/ceph-test.changes b/ceph-test.changes index 673681d..8bebb52 100644 --- a/ceph-test.changes +++ b/ceph-test.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 24 06:26:03 UTC 2023 - Tim Serong + +- Add "#!BuildConstraint" to spec files for compatibility with _multibuild + ------------------------------------------------------------------- Thu May 11 04:24:01 UTC 2023 - Tim Serong diff --git a/ceph-test.spec b/ceph-test.spec index 947e1f9..80aa943 100644 --- a/ceph-test.spec +++ b/ceph-test.spec @@ -1,3 +1,5 @@ +#!BuildConstraint: hardware:memory:size unit=G 10 +#!BuildConstraint: hardware:disk:size unit=G 60 # # spec file for package ceph # diff --git a/ceph.changes b/ceph.changes index 673681d..8bebb52 100644 --- a/ceph.changes +++ b/ceph.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 24 06:26:03 UTC 2023 - Tim Serong + +- Add "#!BuildConstraint" to spec files for compatibility with _multibuild + ------------------------------------------------------------------- Thu May 11 04:24:01 UTC 2023 - Tim Serong diff --git a/ceph.spec b/ceph.spec index 3ec9372..f5615bb 100644 --- a/ceph.spec +++ b/ceph.spec @@ -1,3 +1,5 @@ +#!BuildConstraint: hardware:memory:size unit=G 8 +#!BuildConstraint: hardware:disk:size unit=G 50 # # spec file for package ceph # diff --git a/pre_checkin.sh b/pre_checkin.sh index 7e10a7d..980647c 100644 --- a/pre_checkin.sh +++ b/pre_checkin.sh @@ -271,6 +271,15 @@ function copy_changes_file { cp ceph.changes ${dest_pkg}.changes } +function set_build_constraints { + local FILE=$1 + shift + sed -i -e '/#!BuildConstraint/d' $FILE + for constraint in "$@"; do + sed -i -e "1s/^/#!BuildConstraint: $constraint\n/" $FILE + done +} + PACKAGE="ceph-test" SPEC_FILE="ceph.spec" @@ -293,3 +302,5 @@ insert_line_before "$PACKAGE.spec" "Source96: pre_checkin.sh" "^Source97:" insert_line_before "$PACKAGE.spec" "Source95: checkin.sh" "^Source96:" insert_line_before "$PACKAGE.spec" "Source94: ceph-rpmlintrc" "^Source95:" copy_changes_file $PACKAGE +set_build_constraints $SPEC_FILE "hardware:disk:size unit=G 50" "hardware:memory:size unit=G 8" +set_build_constraints "$PACKAGE.spec" "hardware:disk:size unit=G 60" "hardware:memory:size unit=G 10"