Project

General

Profile

Bug #2070

Updated by Benjamin Papillon about 11 years ago

error: unpacking of archive failed on file /usr/share/foreman/public: cpio: rename 

 

 This error is caused by following the instructions on this link and then updating foreman via yum. 
 
 http://theforeman.org/projects/foreman/wiki/Setting_up_Nginx_+_Passenger_ 

 

 The solution is simple, leave the default symlink /usr/share/foreman/public alone, but that breaks Nginx which doesn't like the symlink as a root folder. 

 

 So the work around (for me) to upgrade foreman via yum was 
 
 1. Backup old public folder (just in case). 
 
 mv /usr/share/foreman/public /usr/share/foreman/public.<version> 
 
 2. Re-create the symlink 
 
 ln -s /var/lib/foreman/public /usr/share/foreman/public 
 
 3. Remove any failed symlinks from the RPM install. 
 
 rm /usr/share/foreman/public\;50d7629d 
 
 4. Perform the RPM update 
 
 yum update foreman 
 
 5. Revert the public folder back for Nginx (as per the instructions in the above link) 
 
 rm /usr/share/foreman/public 
 
 cp -rp /var/lib/forman/public /usr/share/foreman/ 
 
 6. Restart your services 
 
 service nginx restart 
 
 service foreman restart 

 

 Maybe there is a way to make Nginx operate happily from a symlink rootdir, if so then someone please update the document in the link above. 
 

Back