Bug 2361481

Summary: installation 'tmpwatch' failed due to unifying bin and sbin
Product: [Fedora] Fedora Reporter: kdg1955 <kdg1955>
Component: tmpwatchAssignee: Jiri Kucera <jkucera>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 42CC: anders.blomdell, jkucera, kdg1955, kv, marek.gresko, ondrejj, ppisar, yselkowi
Target Milestone: ---Keywords: Regression, Upgrades
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-07-17 11:10:51 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:
Attachments:
Description Flags
This patch for SPECS/tmpwatch.spec fixes the described issue. none

Description kdg1955 2025-04-21 17:23:15 UTC
Errors installing 'tmpwatch'

This is more than likely because in Fedora 42 the directories '/usr/sbin' and '/usr/bin' have been inufied, and there is no fc42 for tmpwatch in the repositories. Only fc41. See also 'https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin'.



Reproducible: Always

Steps to Reproduce:
1.install fresh Fedora 42
2.update all packages 'sudo dnf update'
3.install 'sudo dnf install tmpwatch'
Actual Results:
$ sudo dnf install tmpwatch 
Updating and loading repositories: 
Repositories loaded. 
gpg: directory '/root/.gnupg' created 
gpg: /root/.gnupg/trustdb.gpg: trustdb created 
Package                                           Arch         Version                                           Repository                     Size 
Installing: 
tmpwatch                                         x86_64       2.11-27.fc41                                      fedora                     65.8 KiB 

Transaction Summary: 
Installing:         1 package 

Total size of inbound packages is 35 KiB. Need to download 35 KiB. 
After this operation, 66 KiB extra will be used (install 66 KiB, remove 0 B). 
Is this ok [y/N]: y 
[1/1] tmpwatch-0:2.11-27.fc41.x86_64                                                                        100% | 128.9 KiB/s |  34.7 KiB |  00m00s 
---------------------------------------------------------------------------------------------------------------------------------------------------- 
[1/1] Total                                                                                                 100% |  76.5 KiB/s |  34.7 KiB |  00m00s 
Running transaction 
Transaction failed: Rpm transaction failed. 
 - file /usr/sbin/tmpwatch conflicts between attempted installs of tmpwatch-2.11-27.fc41.x86_64 and tmpwatch-2.11-27.fc41.x86_64

Expected Results:
$> sudo dnf install tmpwatch
Updating and loading repositories:
Repositories loaded.
Package                             Arch      Version                             Repository              Size
Installing:
 tmpwatch                          x86_64    2.11-27.fc41                       fedora             65.8 KiB

Transaction Summary:
 Installing:         1 package

Total size of inbound packages is 35 KiB. Need to download 35 KiB. 
After this operation, 66 KiB extra will be used (install 66 KiB, remove 0 B). 
Is this ok [y/N]: y 
[1/1] tmpwatch-0:2.11-27.fc41.x86_64                                                                        100% | 128.9 KiB/s |  34.7 KiB |  00m00s 
---------------------------------------------------------------------------------------------------------------------------------------------------- 
[1/1] Total                                                                                                 100% |  76.5 KiB/s |  34.7 KiB |  00m00s 
Running transaction
[1/3] Verify package files                                            100% |   0.0   B/s |   1.0   B |  00m00s
[2/3] Prepare transaction                                             100% | ...   B/s |   1.0   B |  00m00s
[3/3] Installing tmpwatch-0:2.11-27.fc41.x86_64                       100% | ... KiB/s | ... KiB |  00m00s
Complete!


Additional Information:
There no no fc42 version of 'tmpwatch' in the repository of Fedora 42, but still the version of fc41!
The rpm 'tmpwatch-2.11-27.fc41.x86_64.rpm' will install the file 'tmpwatch' in '/usr/sbin/' and a link to this file in '/usr/bin'. What gives an error in Fedora 42.

'tmpwatch' is used in my cron job, and I use it daily. This is why I think it's a 'High' severity.

Comment 1 kdg1955 2025-04-22 09:28:57 UTC
See also Bug 2356903

Comment 2 kdg1955 2025-04-23 21:25:25 UTC
Created attachment 2086811 [details]
This patch for SPECS/tmpwatch.spec fixes the described issue.

No more symbolic link in '/usr/bin'.
Copies 'tempwatch' only in '/usr/bin' instead of '/usr/sbin'.

I didn't change the version and release, because I don't have any experience with that. I also didn't add anything to the changelog.

Short tests on an x86_64 architecture.

Comment 3 kdg1955 2025-04-24 11:03:43 UTC
Another thing I didn't think of before: what about an update from fc41 or earlier? Is the symbolic link removed before the update of package 'tmpwatch' is performed?

Maybe I will do an test with an update from fc41 where 'tmpwatch' is installed and see if the link is removed?  I think yes because otherwise the update should have crashed. And next question is this link removed before 'tmpwatch' is updated? 
Is it better to add a line in the 'SPECS/tmpwatch.spec' where we removed de symbolic link if exist, in pre-build?
What other people with more experience think?

Comment 4 Marek Greško 2025-04-24 18:02:57 UTC
When you do an upgrade, the directory /usr/sbin exists. Binaries from the fc42 packages are installed into /usr/bin and there exists a symlink for the binary itself in the /usr/sbin. For tmpwatch the result is opposite. The binary is installed into /usr/sbin and the symlink is created in /usr/bin also in upgraded fc42.

Comment 5 kdg1955 2025-04-24 20:06:12 UTC
Thanks Marek Greško,
so then there is a difference between fc42 that was upgraded and a new installed fc42. A new fc42 have a symbolic link at the level of the directory '/usr/sbin'.

I suggest to remove the symbolic link of '/usr/bin/tmpwatch' if it exist. Then there can be no conflicts and add this remove command in 'SPECS/tmpwatch.spec'. I will make a new patch later and upload it here.

Comment 6 Anders Blomdell 2025-04-25 08:01:54 UTC
(In reply to kdg1955 from comment #1)
> See also Bug 2356903
Se also Bug 2341446 which seems to have caught that problem in the mass rebuild

Comment 7 Jan ONDREJ 2025-07-15 05:44:03 UTC
Looks like @yselkowi fixed this in F43/rawhide.
Can you please build this for F42 too? This bug breaks bin/sbin merge in existing installs and breaks new installs with tmpwatch selected.

Comment 8 Petr Pisar 2025-07-17 11:10:51 UTC

*** This bug has been marked as a duplicate of bug 2356903 ***

Comment 9 Red Hat Bugzilla 2025-11-15 04:25:03 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days