- Add "#!BuildConstraint" to spec files for compatibility with _multibuild
OBS-URL: https://build.opensuse.org/package/show/filesystems:ceph/ceph?expand=0&rev=345
This commit is contained in:
parent
7e9869abd7
commit
2de59afc34
@ -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.
|
||||
|
18
_constraints
18
_constraints
@ -5,6 +5,21 @@
|
||||
|
||||
<!--
|
||||
|
||||
2023-05-23 - Tim Serong <tserong@suse.com>
|
||||
|
||||
The <overwrite><conditions><package>... construct only works for
|
||||
standalone packages in the build service. This was fine when ceph-test
|
||||
existed as a _link back to ceph. Now that we're using _multibuild to
|
||||
build ceph-test, the constraints specified in this file can't be applied
|
||||
correctly to ceph-test anymore, so I've removed them from this file in
|
||||
favour of "#!BuildConstraint" directives in the spec files.
|
||||
|
||||
This _constraints file remains as a source of documentation. If the
|
||||
disk and memory constraints need to be changed in future, adjust the
|
||||
two `set_build_constraints` lines at the end of pre_checkin.sh and
|
||||
rerun that script to update the spec files.
|
||||
|
||||
|
||||
2022-03-31 - Tim Serong <tserong@suse.com>
|
||||
|
||||
Builds of ceph 16.2.7 on IBS showed the following resource usage (in MB):
|
||||
@ -28,6 +43,8 @@
|
||||
|
||||
-->
|
||||
|
||||
<!-- Can't do the following anymore - see comments above
|
||||
|
||||
<hardware>
|
||||
<disk>
|
||||
<size unit="G">50</size>
|
||||
@ -51,4 +68,5 @@
|
||||
</hardware>
|
||||
</overwrite>
|
||||
|
||||
-->
|
||||
</constraints>
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 24 06:26:03 UTC 2023 - Tim Serong <tserong@suse.com>
|
||||
|
||||
- Add "#!BuildConstraint" to spec files for compatibility with _multibuild
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 11 04:24:01 UTC 2023 - Tim Serong <tserong@suse.com>
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#!BuildConstraint: hardware:memory:size unit=G 10
|
||||
#!BuildConstraint: hardware:disk:size unit=G 60
|
||||
#
|
||||
# spec file for package ceph
|
||||
#
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 24 06:26:03 UTC 2023 - Tim Serong <tserong@suse.com>
|
||||
|
||||
- Add "#!BuildConstraint" to spec files for compatibility with _multibuild
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 11 04:24:01 UTC 2023 - Tim Serong <tserong@suse.com>
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#!BuildConstraint: hardware:memory:size unit=G 8
|
||||
#!BuildConstraint: hardware:disk:size unit=G 50
|
||||
#
|
||||
# spec file for package ceph
|
||||
#
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user