Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package hdf5 for openSUSE:Factory checked in at 2021-01-30 13:56:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/hdf5 (Old) and /work/SRC/openSUSE:Factory/.hdf5.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "hdf5" Sat Jan 30 13:56:49 2021 rev:72 rq:867822 version:1.10.7 Changes: -------- --- /work/SRC/openSUSE:Factory/hdf5/hdf5.changes 2020-11-29 12:23:48.745722062 +0100 +++ /work/SRC/openSUSE:Factory/.hdf5.new.28504/hdf5.changes 2021-01-30 13:57:50.546404649 +0100 @@ -1,0 +2,5 @@ +Fri Jan 29 22:05:44 UTC 2021 - Egbert Eich <e...@suse.com> + +- Fix update_so_version.sh, write so versions to file being included. + +------------------------------------------------------------------- New: ---- so_versions ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hdf5.spec ++++++ --- /var/tmp/diff_new_pack.sSEwZT/_old 2021-01-30 13:57:51.250405836 +0100 +++ /var/tmp/diff_new_pack.sSEwZT/_new 2021-01-30 13:57:51.254405843 +0100 @@ -1,7 +1,7 @@ # # spec file for package hdf5 # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -412,14 +412,8 @@ %define vname %{pname} %endif -# TODO: The so numbers autodetected by update_so_version.sh -# do not match the so numbers that are actually built. -%define sonum 103 -%define sonum_CXX 103 -%define sonum_F 102 -%define sonum_HL 100 -%define sonum_HL_CXX 100 -%define sonum_HL_F 100 +# Run 'sh ./update_so_version.sh' when updating hdf5! +%include %{_sourcedir}/so_versions Name: %{package_name} Version: %vers @@ -429,7 +423,7 @@ Group: Productivity/Scientific/Other URL: https://www.hdfgroup.org/HDF5/ Source0: https://www.hdfgroup.org/ftp/HDF5/releases/%{pname}-%{short_ver}/%{pname}-%{src_ver}/src/%{pname}-%{src_ver}.tar.bz2 -Source100: _multibuild +Source100: so_versions Source1000: update_so_version.sh Patch0: hdf5-LD_LIBRARY_PATH.patch # not really needed but we want to get noticed if hdf5 doesn' t know our host ++++++ so_versions ++++++ %define sonum 103 %define sonum_CXX 103 %define sonum_F 102 %define sonum_HL 100 %define sonum_HL_CXX 100 %define sonum_HL_F 100 ++++++ update_so_version.sh ++++++ --- /var/tmp/diff_new_pack.sSEwZT/_old 2021-01-30 13:57:51.338405984 +0100 +++ /var/tmp/diff_new_pack.sSEwZT/_new 2021-01-30 13:57:51.342405991 +0100 @@ -6,15 +6,10 @@ exit 1 } -dbg() -{ - echo "dbg: $@" >&2 -} - cleanup() { - rm -f lt_vers.sh sonum_spec.sed - rm -f hdf5.spec.tmp + rm -f ${spectmp} + rm -f ${shtmp} } ## We are going to parse these variables from tarball: @@ -24,47 +19,46 @@ # LT_HL_VERS_INTERFACE # LT_HL_CXX_VERS_INTERFACE # LT_HL_F_VERS_INTERFACE -# LT_TOOLS_VERS_INTERFACE cleanup -VER="$(grep -m1 "^Version:" hdf5.spec)" || exit_error "can't grep version" +spectmp=$(mktemp hdf-XXXX.spec) +shtmp=$(mktemp lt-XXXX.sh) +outtmp=$(mktemp so-XXXX) +sed -e "s/@BUILD_FLAVOR@/standard/" hdf5.spec > ${spectmp} +VER="$(rpmspec --define "_sourcedir $(pwd)" -P ${spectmp} | grep -m1 "^Version:")" || \ + exit_error "can't grep version" read x VER <<<$VER -SRC="$(grep -m1 "^Source0:" hdf5.spec)" || exit_error "can't grep source" +SRC="$(rpmspec --define "_sourcedir $(pwd)" -P ${spectmp} | grep -m1 "^Source0:")" || \ + exit_error "can't grep source" read x SRC <<<$SRC SRC=$(basename "$SRC" | sed "s/%{version}/$VER/") test -f "$SRC" || exit_error "tarball '$SRC' does not exist" -dbg "inspecting $SRC" tar --wildcards -x -O -f "$SRC" "*/config/lt_vers.am" \ | tr -d ' \t' \ - | grep "^LT_.*INTERFACE=" \ - > lt_vers.sh \ + | grep -E "^LT_.*INTERFACE=|^LT_.*AGE=" \ + > ${shtmp} \ || exit_error "can't grep interface versions" -# we expect exactly 7 variables -. lt_vers.sh || exit_error "can't source lt_vers.sh" -test $(wc -l < lt_vers.sh) -le "7" \ - || exit_error "more than 7 vars found, update this script!" - -for infix in "" _CXX _F _HL _HL_CXX _HL_F _TOOLS; do - var="LT${infix}_VERS_INTERFACE" - test "${!var}" -gt 0 || exit_error "$var='${!var}' bad or undefined" - dbg "update $var=${!var}" - def_sonum="sonum${infix}" - # create sed scripts for spec file - echo "s/^%define $def_sonum .*/%define $def_sonum ${!var}/" >> sonum_spec.sed -done +source ./${shtmp} || exit_error "can't source ${shtmp}" -# update spec file if needed -sed -f sonum_spec.sed hdf5.spec > hdf5.spec.tmp -if diff -q hdf5.spec.tmp hdf5.spec &>/dev/null; then - dbg "hdf5.spec was up-to-date" -else - mv hdf5.spec.tmp hdf5.spec - echo "hdf5.spec updated" >&2 -fi +for infix in "" _CXX _F _HL _HL_CXX _HL_F; do + current="LT${infix}_VERS_INTERFACE" + age="LT${infix}_VERS_AGE" + currv=$(eval "echo \$$current") + agev=$(eval "echo \$$age") + if [ -n "$currv" -a -n "$agev" ]; then + echo %define sonum${infix} $((currv - agev)) >> ${outtmp} + else + rm -f ${outtmp} + cleanup + exit 1 + fi +done +[ -e ${outtmp} ] && mv ${outtmp} so_versions + cleanup