Bug 2229907

Summary: chkconfig fails to upgrade giving an error
Product: [Fedora] Fedora Reporter: Sameh Attia <sattia>
Component: chkconfigAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 38CC: jamacku, lnykryn, msekleta
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-08 12:29:21 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 Sameh Attia 2023-08-08 07:37:48 UTC
When upgrading chkconfig to version 1.25-1 it fails with 'Error: Transaction failed'

chkconfig-1.24-1.fc38.x86_64                                                                                         chkconfig-1.25-1.fc38.x86_64                                                                                        




Reproducible: Always

Steps to Reproduce:
1.make sure chkconfig version prior to 1.25-1 is installed
2.try to upgrade to 1.25-1
3.
Actual Results:  
Failed:
  chkconfig-1.24-1.fc38.x86_64                                                                                         chkconfig-1.25-1.fc38.x86_64                                                                                        

Error: Transaction failed


Expected Results:  
chkconfig upgrades to 1.25

When attempted to do it with rpm command I got the below error:

[root@sattia ~]# rpm -Uvh chkconfig-1.25-1.fc38.x86_64.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:chkconfig-1.25-1.fc38            ################################# [ 50%]
error: unpacking of archive failed on file /etc/init.d;64d1f0a8: cpio: File from package already exists as a directory in system
error: chkconfig-1.25-1.fc38.x86_64: install failed
error: chkconfig-1.24-1.fc38.x86_64: erase skipped

Comment 1 Lukáš Nykrýn 2023-08-08 10:45:12 UTC
Unfortunately, this is not a problem in chkconfig. Something else created the /etc/init.d directory. On Fedora, /etc/init.d should be a symlink to /etc/rc.d/init.d.

[lnykryn@notas ~]$ readlink /etc/init.d
rc.d/init.d


But you can fix it manually.
Move the content of /etc/init.d to  /etc/rc.d/init.d, delete the directory and create the symlink.

Comment 2 Sameh Attia 2023-08-08 12:29:21 UTC
Thanks..I did it as per your suggestion and it worked. It was also breaking Plasma Discover to complete the upgrade and it worked like a charm also.