Bug 2326296

Summary: Fail to build tcl package with debugedit 5.1
Product: [Fedora] Fedora Reporter: Petr Hruska <petr.hruska>
Component: tclAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 41CC: jskarvad
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: tcl-8.6.15-5.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-12-02 17:19:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Hruska 2024-11-14 16:42:03 UTC
libtcl8.6.so do not have write permission for owner. That is required for striping debug info with new debugedit 5.1 version. Following error is visible in logs.
find-debuginfo: starting
Extracting debug info from 2 files
objcopy: unable to copy file '/builddir/build/BUILD/tcl-8.6.14-build/BUILDROOT/usr/lib64/libtcl8.6.so'; reason: Permission denied

Similar problem was detected by nfs-utils where mount.nfs also don't have write permission for owner. https://src.fedoraproject.org/rpms/nfs-utils/blob/rawhide/f/nfs-utils.2.8.2-rc1.patch 


Reproducible: Always

Steps to Reproduce:
1.fedpkg mockbuild --target f41
2.
3.
Actual Results:  
rpm build failed

Expected Results:  
rpm build is successful.

After adding following change, build is ok.
@@ -94,6 +94,8 @@ ln -s tclsh%{majorver} %{buildroot}%{_bindir}/tclsh
 
 # for linking with -lib%%{name}
 ln -s lib%{name}%{majorver}.so %{buildroot}%{_libdir}/lib%{name}.so
+# set write permission for allowing stripping debug symbols
+chmod +w %{buildroot}%{_libdir}/lib%{name}.so
 
 mkdir -p %{buildroot}/%{_libdir}/%{name}%{majorver}
 
@@ -125,7 +127,7 @@ ln -s %{_bindir}/tclsh %{_bindir}/tclsh%{majorver} %{buildroot}%{_usr}/bin/
 %{_datadir}/%{name}%{majorver}
 %exclude %{_datadir}/%{name}%{majorver}/tclAppInit.c
 %{_datadir}/%{name}8
-%{_libdir}/lib%{name}%{majorver}.so
+%attr(555, root, root) %{_libdir}/lib%{name}%{majorver}.so
 %{_mandir}/man1/*
 %if 0%{?flatpak}
 %{_usr}/bin/tclsh*

Comment 1 Jaroslav Škarvada 2024-12-02 17:19:42 UTC
It should be fixed now in f41 (tcl-8.6.14-4.fc41 in testing) - f42, the library is installed RW there. Nice trick with the %attr, I will probably use it to make the library read-only.

Comment 2 Fedora Update System 2024-12-02 17:53:13 UTC
FEDORA-2024-3aa91d694b (tcl-8.6.15-5.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-3aa91d694b

Comment 3 Fedora Update System 2024-12-03 08:48:21 UTC
FEDORA-2024-3aa91d694b (tcl-8.6.15-5.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.