Bug 33442

Summary: учитывать %ubt в changelog
Product: Sisyphus Reporter: Anton Farygin <rider>
Component: perl-RPM-Source-EditorAssignee: viy <viy>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P3 CC: at, cas, cronbuild, cronport, crux, ender, glebfm, lav, ldv, mike, qa_viy, rider, shaba, viy
Version: unstable   
Hardware: all   
OS: Linux   

Description Anton Farygin 2017-05-03 09:44:27 MSK
srpmnmu раскрывает тэг %ubt при добавлении Changelog:
$ srpmnmu --spec  libguestfs.spec -i --nextrel incrfirst --changelog '- rebuild with ocaml 4.04.1'

diff получается следующего вида:

diff --git a/libguestfs.spec b/libguestfs.spec
index b348d15..1933987 100644
--- a/libguestfs.spec
+++ b/libguestfs.spec
@@ -16,7 +16,7 @@
 Summary: Tools for accessing and modifying virtual machine disk images
 Name: libguestfs
 Version: 1.36.3
-Release: alt2%ubt
+Release: alt3%ubt
 License: LGPLv2+
 Group: System/Libraries
 Url: http://libguestfs.org/
@@ -641,6 +641,9 @@ rm -rf %buildroot%_mandir/ja/man{1,3}/
 %endif
 
 %changelog
+* Wed May 03 2017 Anton Farygin <rider@altlinux.ru> 1.36.3-alt3.S1
+- rebuild with ocaml 4.04.1
+
 * Thu Apr 27 2017 Anton Farygin <rider@altlinux.ru> 1.36.3-alt2%ubt
 - using /var/tmp for tmppath in virt-* tools instead of TMPDIR
 - added ubt tag


В changelog вместо alt3.S1 должна быть запись alt3%ubt

ubt-addchangelog из пакета rpm-build-ubt реализует такое поведение.
Comment 1 Repository Robot 2017-05-06 19:42:57 MSK
perl-RPM-Source-Editor-0.912-alt1 -> sisyphus:

Sat May 06 2017 Igor Vlasenko <viy@altlinux.ru> 0.912-alt1
- proper %ubt support in changelog (closes: #33442)
Comment 2 viy 2017-05-06 19:47:37 MSK
надеюсь, работает, но не тестировал.
Comment 3 Anton Farygin 2017-05-07 22:34:05 MSK
Не работает, взрывается:
$ srpmnmu --spec ocaml-findlib.spec -i --nextrel incrfirst
aborted recursion at /usr/share/perl5/RPM/Source/Macros.pm line 145.
        RPM::Source::Macros::macro_subst_inplace(RPM::Source::Macros=HASH(0x1dc97a0), SCALAR(0x1bb22b8), 0) called at /usr/share/perl5/RPM/Source/Macros.pm line 94
        RPM::Source::Macros::macro_subst(RPM::Source::Macros=HASH(0x1dc97a0), "alt5%ubt") called at /usr/share/perl5/RPM/Source/SpecSection.pm line 815
        RPM::Source::SpecSection::get_tag(RPM::Source::SpecSection=HASH(0x1dc9d10), "Release", "KEEP_UBT", 1) called at /usr/share/perl5/RPM/Source/Editor.pm line 633
        RPM::Source::Editor::add_changelog(RPM::Source::Editor=HASH(0x1dca118)) called at /usr/share/perl5/RPM/Source/Transformation/Factory/RaiseRelease.pm line 365
        __::Transform::__set_changelog(RPM::Source::Editor=HASH(0x1dca118), undef, undef, undef, undef, undef) called at /usr/share/perl5/RPM/Source/Transformation/Factory/RaiseRelease.pm line 272
        RPM::Source::Transformation::Factory::RaiseRelease::opt_handler(RPM::Source::Transformation::OptHandlerWrapper=HASH(0x64de40), RPM::Source::Editor=HASH(0x1dca118), undef, HASH(0x6e9a88), Source::Shared::ResourceContainer=HASH(0x1dc9590)) called at /usr/share/perl5/RPM/Source/Transformation/OptHandlerWrapper.pm line 22
        RPM::Source::Transformation::OptHandlerWrapper::apply(RPM::Source::Transformation::OptHandlerWrapper=HASH(0x64de40), RPM::Source::Editor=HASH(0x1dca118), undef, HASH(0x6e9a88), Source::Shared::ResourceContainer=HASH(0x1dc9590)) called at /usr/share/perl5/RPM/Source/Transformation/DefaultPlayer.pm line 21
        RPM::Source::Transformation::DefaultPlayer::apply_collection("RPM::Source::Transformation::DefaultPlayer", RPM::Source::Editor=HASH(0x1dca118), undef, HASH(0x6e9a88), Source::Shared::ResourceContainer=HASH(0x1dc9590), RPM::Source::Abstract::PriorityCollection=ARRAY(0x627410)) called at /usr/share/perl5/RPM/Source/TransformContainer.pm line 85
        RPM::Source::TransformContainer::transform_once("RPM::Source::TransformContainer", RPM::Source::Editor=HASH(0x1dca118), undef, HASH(0x6e9a88)) called at /usr/share/perl5/RPM/Source/Transformation/SRPMSpecInputHandler.pm line 70
        RPM::Source::Transform::transform(RPM::Source::Transform=HASH(0x605f48)) called at /usr/bin/srpmnmu line 14
Comment 4 Anton Farygin 2017-05-07 22:35:46 MSK
переоткрываю
Comment 5 Michael Shigorin 2017-05-10 10:45:48 MSK
(В ответ на комментарий №0)
> ubt-addchangelog из пакета rpm-build-ubt реализует такое поведение.
1) может, тогда обычный add_changelog научите?
2) такое раскрытие имеет место не только здесь, надо Глеба спросить.
Comment 6 Anton Farygin 2017-05-10 10:58:12 MSK
perl-RPM-Source-Editor не использует add_changelog.

Для меня было бы самым удобным поведением, если бы в changelog помещался ровно тот Release, который добавлялся в тэг Release.
Comment 7 Repository Robot 2017-05-11 21:29:16 MSK
perl-RPM-Source-Editor-0.913-alt1 -> sisyphus:

Thu May 11 2017 Igor Vlasenko <viy@altlinux.ru> 0.913-alt1
- %ubt changelog bugfixes (closes: #33442)