On Tue, 26 Mar 2019 at 16:44, Tomasz Kłoczko <kloczko.tomasz@gmail.com> wrote:
[..] 
If above is correct IMO collecting such files  (it those files are really needed and used) should be done outside of the scope of regular "rpmbuild -ba".
Collecting and preserving some build logs always should be part of the build automation.

One more thing (and sorry again related do gcc.spec)
(again Warning: wear welder mask before start reading that file!)

I just realised that in gcc.spec at end of the %check is possible to find few funny lines which I'll quote here:


mkdir testlogs-%{_target_platform}-%{version}-%{release}
for i in `find . -name \*.log | grep -F testsuite/ | grep -v 'config.log\|acats.*/tests/'`; do
  ln $i testlogs-%{_target_platform}-%{version}-%{release}/ ||:
done
tar cf - testlogs-%{_target_platform}-%{version}-%{release} | xz -9e \
  | uuencode testlogs-%{_target_platform}.tar.xz ||:
rm -rf testlogs-%{_target_platform}-%{version}-%{release}


if it is hard to see about what this part is this is about archiving some files in build logs :o)
Just tar | uunecode and output to stdout. Pure JFDIN :)
That uuencoded part lands in gcc build logs. Funny old school .. but is it really necessary/useful?

Quick check:

[tkloczko@barrel SPECS.fedora]$ grep uuencode * -l
binutils.spec
gcc.spec
gdb.spec
ghc-dataenc.spec
nacl-arm-binutils.spec
nacl-binutils.spec
perl-Convert-UU.spec
sharutils.spec
uudeview.spec

From that list it is possible to remove last three specs.
I think that all those uuencode use cases have been done by the same person -> kind of exception.
What above says?
That probably there are some needs to preserve some files beyond regular build process and some people already started taking care of that without thinking to much.

Question only is: are those needs are really real (real-real) or only imaginary?

If yes I can propose simpler solution like create .post_build_preserve.lst file in source build root and whatever will be added to that file should be archived in some <package>-<version>-<release>.tar.xz file to be accessible over koji web interface.
If such file will be created during manually executed "rpmbuild -ba" it will not leave any garbage behind or will be no flooding stdout during build.

kloczek
-- 
Tomasz Kłoczko | LinkedIn: http://lnkd.in/FXPWxH