Thanks alot! 
It is compiling successfully now, the trouble was in  %scl_files macros, it was 
wrong to call it, thanks again!

The duplicated lines were because of incorrect copy-pasting, so I have fixed 
spec file (by direct file coping from SPECS directory),
 and attach it to this mail. May be it would could be helpful for someone who 
decide to recompile SNMP perl module for perl SCL.

Petr, many thanks again, and sorry for bothering. 

--
Best regards,
Alexander  
________________________________________
От: sclorg-boun...@redhat.com [sclorg-boun...@redhat.com] от 
имени Petr Pisar [ppi...@redhat.com]
Отправлено: 20 октября 2021 г. 11:28
Кому: sclorg@redhat.com
Тема: Re: [scl.org] scl bin path into package

V Tue, Oct 19, 2021 at 03:47:54PM +0000, Чернович Александр napsal(a):
> I have corrected scl_prefix a you said, and additionally some small
> mistakes. I prepared my system in the way I could successfully compile any
> of rh-perl524 SCL packages. Then I tried to compile net-snmp package agin,
> now it seems that all path are correct and have valid collection prefix
> without hard-coding it. But compilation is falling on the last stage
> (Processing files: rh-perl524-net-snmp-5.7.2-49.el7.1.x86_64) :
> error: File not found: 
> /home/rpmbuild/rpmbuild/BUILDROOT/rh-perl524-net-snmp-5.7.2-49.el7.1.x86_64/opt/rh/rh-perl524/enable
> error: File not found: 
> /home/rpmbuild/rpmbuild/BUILDROOT/rh-perl524-net-snmp-5.7.2-49.el7.1.x86_64/etc/scl/prefixes/rh-perl524
> error: File not found: 
> /home/rpmbuild/rpmbuild/BUILDROOT/rh-perl524-net-snmp-5.7.2-49.el7.1.x86_64/opt/rh/rh-perl524/root/bin
> error: File not found: 
> /home/rpmbuild/rpmbuild/BUILDROOT/rh-perl524-net-snmp-5.7.2-49.el7.1.x86_64/opt/rh/rh-perl524/root/boot
> error: File not found: 
> /home/rpmbuild/rpmbuild/BUILDROOT/rh-perl524-net-snmp-5.7.2-49.el7.1.x86_64/opt/rh/rh-perl524/root/dev
> error: File not found: 
> /home/rpmbuild/rpmbuild/BUILDROOT/rh-perl524-net-snmp-5.7.2-49.el7.1.x86_64/etc/opt/rh/rh-perl524/X11
> etc...
>
That's because of "%{?scl: %scl_files}" you put in all %files sections.
%scl_files should only be used at runtime subpackages. See
"rpm -ql rh-perl524-runtime". The runtime package is a top-level package of
a collection and delivers basic definition of the collection. Becuase you are
not creating a new collection, you don't need to package that files.
I recommend you removing the "%{?scl: %scl_files}" lines from net-snmp.spec.

I also noticed that your spec file has duplicate content from line 646:

   641  %changelog
   642  * Mon Oct 18 2021 Alexander <m...@mail.net> - 1:5.7.2-49.2
   643  - add net-snmp to rh-perl524 SCL
   644
   645
   646  [rpmbuild@stand_vm SPECS]$ cat net-snmp.spec
   647  %{?scl:%scl_package net-snmp}
   648  %{!?scl:%global pkg_name %{name}}
   649


--- Petr

Attachment: net-snmp-v2.tar.gz
Description: net-snmp-v2.tar.gz

_______________________________________________
SCLorg mailing list
SCLorg@redhat.com
https://listman.redhat.com/mailman/listinfo/sclorg

Reply via email to