Bug 2326296 - Fail to build tcl package with debugedit 5.1
Summary: Fail to build tcl package with debugedit 5.1
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tcl
Version: 41
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-11-14 16:42 UTC by Petr Hruska
Modified: 2024-12-03 08:48 UTC (History)
1 user (show)

Fixed In Version: tcl-8.6.15-5.fc42
Clone Of:
Environment:
Last Closed: 2024-12-02 17:19:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.