Description of problem: dnf system-upgrade download --releasever=23 aborts with error Version-Release number of selected component (if applicable): dnf-1.1.1-2.fc22.noarch dnf-plugin-system-upgrade-0.4.1-1.fc22.noarch squid-3.4.12-2.fc22.x86_64 How reproducible: always on my system Steps to Reproduce: 1. Fedora 22 Workstation having squid-3.4.12-2.fc22.x86_64 installed 2. dnf system-upgrade download --releasever=23 3. Actual results: Error: Transaction check error: file /usr/share/squid/errors/zh-cn from install of squid-7:3.5.3-5.fc23.x86_64 conflicts with file from package squid-7:3.4.12-2.fc22.x86_64 file /usr/share/squid/errors/zh-tw from install of squid-7:3.5.3-5.fc23.x86_64 conflicts with file from package squid-7:3.4.12-2.fc22.x86_64 Error Summary ------------- Expected results: no error Additional info: Workaround is to remove squid-7:3.4.12-2.fc22.x86_64 before the system upgrade.
That's a problem with the squid package, then.
What versions of squid package do you have installed? (rpm -q squid)
squid-3.4.12-2.fc22.x86_64 was the only installed squid package. I removed it and then continued the system upgrade. After completion of the upgrade I used 'dnf install squid' to install squid-3.5.3-5.fc23.x86_64 with any problems.
This is actually easily reproduced on an F22 system: 1. dnf install squid 2. rpm -q squid squid-3.4.12-2.fc22.x86_64 3. dnf upgrade --releasever=23 squid Dependencies resolved. ======================================================================== Package Arch Version Repository Size ======================================================================== Upgrading: libecap x86_64 1.0.0-3.fc23 fedora 25 k squid x86_64 7:3.5.3-5.fc23 fedora 3.0 M Transaction Summary ======================================================================== Upgrade 2 Packages Total size: 3.0 M ... Running transaction test The downloaded packages were saved in cache till the next successful transaction. You can remove cached packages by executing 'dnf clean packages'. Error: Transaction check error: file /usr/share/squid/errors/zh-cn from install of squid-7:3.5.3-5.fc23.x86_64 conflicts with file from package squid-7:3.4.12-2.fc22.x86_64 file /usr/share/squid/errors/zh-tw from install of squid-7:3.5.3-5.fc23.x86_64 conflicts with file from package squid-7:3.4.12-2.fc22.x86_64 Why would dnf complain about a conflict with a package it is about to uninstall?
I don't see any reason, why it should be problem with Squid RPM package. I checked SPEC file, and it contains in %files section whole directory /usr/share/squid/ (which is containing sub-directories and also conflicting files). In squid-3.4.12 are present directories zh-cn and zh-tw, but in package squid-3.5.3 directories are not. %files section in SPEC file is following: %files %defattr(-,root,root,-) %license COPYING. %doc CONTRIBUTORS README ChangeLog QUICKSTART src/squid.conf.documented %doc contrib/url-normalizer.pl contrib/rredir.* contrib/user-agents.pl %{_unitdir}/squid.service %attr(755,root,root) %dir %{_libexecdir}/squid %attr(755,root,root) %{_libexecdir}/squid/cache_swap.sh %attr(755,root,root) %dir %{_sysconfdir}/squid %attr(755,root,root) %dir %{_libdir}/squid %attr(750,squid,squid) %dir %{_localstatedir}/log/squid %attr(750,squid,squid) %dir %{_localstatedir}/spool/squid %config(noreplace) %attr(644,root,root) %{_sysconfdir}/httpd/conf.d/squid.conf %config(noreplace) %attr(640,root,squid) %{_sysconfdir}/squid/squid.conf %config(noreplace) %attr(644,root,squid) %{_sysconfdir}/squid/cachemgr.conf %config(noreplace) %{_sysconfdir}/squid/mime.conf %config(noreplace) %{_sysconfdir}/squid/errorpage.css %config(noreplace) %{_sysconfdir}/sysconfig/squid # These are not noreplace because they are just sample config files %config %{_sysconfdir}/squid/squid.conf.default %config %{_sysconfdir}/squid/mime.conf.default %config %{_sysconfdir}/squid/errorpage.css.default %config %{_sysconfdir}/squid/cachemgr.conf.default %config(noreplace) %{_sysconfdir}/pam.d/squid %config(noreplace) %{_sysconfdir}/logrotate.d/squid %dir %{_datadir}/squid %attr(-,root,root) %{_datadir}/squid/errors %attr(755,root,root) %{_sysconfdir}/NetworkManager/dispatcher.d/20-squid %{_datadir}/squid/icons %{_sbindir}/squid %{_bindir}/squidclient %{_bindir}/purge %{_mandir}/man8/* %{_mandir}/man1/* %{_libdir}/squid/* %{_datadir}/snmp/mibs/SQUID-MIB.txt So I suppose, this is a problem of dnf, not a problem of RPM, therefore I'm setting component as dnf-plugin-system-upgrade.
So, rpm bug #447156 strikes again: $ rpm -Uvh \ /var/cache/dnf/fedora-fe3d2f0c91e9b65c/packages/squid-3.5.3-5.fc23.x86_64.rpm \ /var/cache/dnf/fedora-fe3d2f0c91e9b65c/packages/libecap-1.0.0-3.fc23.x86_64.rpm Preparing... ################################# [100%] file /usr/share/squid/errors/zh-cn from install of squid-7:3.5.3-5.fc23.x86_64 conflicts with file from package squid-7:3.4.12-2.fc22.x86_64 file /usr/share/squid/errors/zh-tw from install of squid-7:3.5.3-5.fc23.x86_64 conflicts with file from package squid-7:3.4.12-2.fc22.x86_64 # In squid-3.4.12-2.fc22.x86_64 drwxr-xr-x. 2 root root 4096 Aug 30 21:08 /usr/share/squid/errors/zh-cn drwxr-xr-x. 2 root root 4096 Aug 30 21:08 /usr/share/squid/errors/zh-tw # In squid-3.5.3-5.fc23.x86_64.rpm lrwxrwxrwx. 1 root root 7 Jun 18 22:04 /usr/share/squid/errors/zh-cn -> zh-hans lrwxrwxrwx. 1 root root 7 Jun 18 22:04 /usr/share/squid/errors/zh-tw -> zh-hant rpm is unable to replace a directory with a symlink, and you have to provide a scriptlet in %pretrans to help it. Please see https://fedoraproject.org/wiki/Packaging:Directory_Replacement#Scriptlet_to_replace_a_directory. Raising priority because this will bite anyone who has squid installed and tries to upgrade.
Hi Zbigniew, thanks about the information, I didn't know about this bug. I added the scriptlet you mentioned in comment #6, but I also made the scriptlet a little bit more universal: %pretrans -p <lua> -- Due to a bug #447156 paths = {"/usr/share/squid/errors/zh-cn", "/usr/share/squid/errors/zh-tw"} for key,path in ipairs(paths) do st = posix.stat(path) if st and st.type == "directory" then status = os.rename(path, path .. ".rpmmoved") if not status then suffix = 0 while not status do suffix = suffix + 1 status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) end os.rename(path, path .. ".rpmmoved") end end end Can I replace original scriptlet in https://fedoraproject.org/wiki/Packaging:Directory_Replacement#Scriptlet_to_replace_a_directory. to this version, which is using array of directories, instead of only one variable? If you want to use it only for one directory, you can just left there one string in that array. I will add newly build RPM to Bodhi, as soon as build is finished. I tested an update on scratch build package, and it works fine without any error.
squid-3.5.9-7.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-8d643c4d18
(In reply to Luboš Uhliarik from comment #7) > Can I replace original scriptlet in > https://fedoraproject.org/wiki/Packaging: > Directory_Replacement#Scriptlet_to_replace_a_directory. to this version, > which is using array of directories, instead of only one variable? If you > want to use it only for one directory, you can just left there one string in > that array. I don't think you can, because edit privileges to the Packaging: subspace are limited to the FPC. You'd have to file a ticker for the FPC to update the page. I'd rather see rpm being fixed to do this on its own... > I will add newly build RPM to Bodhi, as soon as build is finished. Thanks!
squid-3.5.9-7.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'dnf --enablerepo=updates-testing update squid' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-8d643c4d18
Running the commands as described in comment #4 on a Fedora 22 system still reports an issue: 1. dnf install squid 2. rpm -q squid squid-3.4.12-2.fc22.x86_64 3. dnf upgrade --releasever=23 squid ... Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Upgrading: libecap x86_64 1.0.0-3.fc23 fedora 25 k squid x86_64 7:3.5.3-5.fc23 fedora 3.0 M Transaction Summary ================================================================================ Upgrade 2 Packages Total download size: 3.0 M ... Running transaction check Transaction check succeeded. Running transaction test Error: Transaction check error: file /usr/share/squid/errors/zh-cn from install of squid-7:3.5.3-5.fc23.x86_64 conflicts with file from package squid-7:3.4.12-2.fc22.x86_64 file /usr/share/squid/errors/zh-tw from install of squid-7:3.5.3-5.fc23.x86_64 conflicts with file from package squid-7:3.4.12-2.fc22.x86_64 This is not really surprising as squid 3.5.3-5.fc23 is still the package that is attempted to be installed. How can I mimic the upgrade behavior that would be observed by a user after squid-3.5.9-7.fc23 has been moved from testing to production? I tried "dnf upgrade --releasever=23-testing" squid but that doesn't seem to be right: Error: Failed to synchronize cache for repo 'fedora' from 'https://mirrors.fedoraproject.org/metalink?repo=fedora-23-testing&arch=x86_64': Cannot prepare internal mirrorlist: file "repomd.xml" was not found in metalink
The upgrade of squid my Fedora 23 test system seems to work fine and creates the symlinks: # dnf upgrade ... $ rpm -q squid squid-3.5.9-7.fc23.x86_64 $ ls -l /usr/share/squid/errors/zh-cn lrwxrwxrwx. 1 root root 7 Oct 6 15:10 /usr/share/squid/errors/zh-cn -> zh-hans $ ls -l /usr/share/squid/errors/zh-tw lrwxrwxrwx. 1 root root 7 Oct 6 15:10 /usr/share/squid/errors/zh-tw -> zh-hant
(In reply to Roland Hermans from comment #11) > Upgrading: > libecap x86_64 1.0.0-3.fc23 fedora > 25 k > squid x86_64 7:3.5.3-5.fc23 fedora > 3.0 M The fix is squid-3.5.9-7.fc23 which is in updates-testing. You probably need to enable the updates-testing repo (--enablerepo=updatest-testing) if you want to the installation to succeed, or uninstall squid temporarily, and reinstall it after the upgrade.
You're right, adding --enablerepo=updates-testing did the trick. Here's a log of the upgrade test I performed on my Fedora 22 system. # rpm -q squid squid-3.4.12-2.fc22.x86_64 # ll -d /usr/share/squid/errors/zh* drwxr-xr-x. 2 root root 4096 Oct 18 10:22 /usr/share/squid/errors/zh-cn lrwxrwxrwx. 1 root root 5 Mar 23 2015 /usr/share/squid/errors/zh-hk -> zh-tw lrwxrwxrwx. 1 root root 5 Mar 23 2015 /usr/share/squid/errors/zh-mo -> zh-tw lrwxrwxrwx. 1 root root 5 Mar 23 2015 /usr/share/squid/errors/zh-sg -> zh-cn drwxr-xr-x. 2 root root 4096 Oct 18 10:22 /usr/share/squid/errors/zh-tw # dnf --enablerepo=updates-testing upgrade --releasever=23 squid ... Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Upgrading: libecap x86_64 1.0.0-3.fc23 fedora 25 k squid x86_64 7:3.5.9-7.fc23 updates-testing 3.2 M Transaction Summary ================================================================================ Upgrade 2 Packages Total download size: 3.2 M ... Running transaction test Transaction test succeeded. Running transaction Upgrading : libecap-1.0.0-3.fc23.x86_64 1/4 Upgrading : squid-7:3.5.9-7.fc23.x86_64 2/4 Cleanup : squid-7:3.4.12-2.fc22.x86_64 3/4 Cleanup : libecap-0.2.0-10.fc22.x86_64 4/4 Verifying : squid-7:3.5.9-7.fc23.x86_64 1/4 Verifying : libecap-1.0.0-3.fc23.x86_64 2/4 Verifying : libecap-0.2.0-10.fc22.x86_64 3/4 Verifying : squid-7:3.4.12-2.fc22.x86_64 4/4 Upgraded: libecap.x86_64 1.0.0-3.fc23 squid.x86_64 7:3.5.9-7.fc23 Complete! # ll -d /usr/share/squid/errors/zh* lrwxrwxrwx. 1 root root 7 Oct 6 15:10 /usr/share/squid/errors/zh-cn -> zh-hans drwxr-xr-x. 2 root root 4096 Oct 18 10:22 /usr/share/squid/errors/zh-cn.rpmmoved drwxr-xr-x. 2 root root 4096 Oct 18 19:40 /usr/share/squid/errors/zh-hans lrwxrwxrwx. 1 root root 7 Oct 6 15:10 /usr/share/squid/errors/zh-hans-cn -> zh-hans lrwxrwxrwx. 1 root root 7 Oct 6 15:10 /usr/share/squid/errors/zh-hans-sg -> zh-hans drwxr-xr-x. 2 root root 4096 Oct 18 19:40 /usr/share/squid/errors/zh-hant lrwxrwxrwx. 1 root root 7 Oct 6 15:10 /usr/share/squid/errors/zh-hant-hk -> zh-hant lrwxrwxrwx. 1 root root 7 Oct 6 15:10 /usr/share/squid/errors/zh-hant-mo -> zh-hant lrwxrwxrwx. 1 root root 7 Oct 6 15:10 /usr/share/squid/errors/zh-hant-tw -> zh-hant lrwxrwxrwx. 1 root root 7 Oct 6 15:10 /usr/share/squid/errors/zh-hk -> zh-hant lrwxrwxrwx. 1 root root 7 Oct 6 15:10 /usr/share/squid/errors/zh-mo -> zh-hant lrwxrwxrwx. 1 root root 7 Oct 6 15:10 /usr/share/squid/errors/zh-sg -> zh-hans lrwxrwxrwx. 1 root root 7 Oct 6 15:10 /usr/share/squid/errors/zh-tw -> zh-hant drwxr-xr-x. 2 root root 4096 Oct 18 10:22 /usr/share/squid/errors/zh-tw.rpmmoved # ls -l /usr/share/squid/errors/zh-cn.rpmmoved total 172 -rw-r--r--. 1 root root 929 Mar 23 2015 ERR_ACCESS_DENIED -rw-r--r--. 1 root root 1085 Mar 23 2015 ERR_ACL_TIME_QUOTA_EXCEEDED -rw-r--r--. 1 root root 1424 Mar 23 2015 ERR_AGENT_CONFIGURE -rw-r--r--. 1 root root 1379 Mar 23 2015 ERR_AGENT_WPAD -rw-r--r--. 1 root root 940 Mar 23 2015 ERR_CACHE_ACCESS_DENIED -rw-r--r--. 1 root root 1136 Mar 23 2015 ERR_CACHE_MGR_ACCESS_DENIED -rw-r--r--. 1 root root 1242 Mar 23 2015 ERR_CANNOT_FORWARD -rw-r--r--. 1 root root 1156 Mar 23 2015 ERR_CONFLICT_HOST -rw-r--r--. 1 root root 910 Mar 23 2015 ERR_CONNECT_FAIL -rw-r--r--. 1 root root 868 Mar 23 2015 ERR_DIR_LISTING -rw-r--r--. 1 root root 1010 Mar 23 2015 ERR_DNS_FAIL -rw-r--r--. 1 root root 949 Mar 23 2015 ERR_ESI -rw-r--r--. 1 root root 936 Mar 23 2015 ERR_FORWARDING_DENIED -rw-r--r--. 1 root root 823 Mar 23 2015 ERR_FTP_DISABLED -rw-r--r--. 1 root root 897 Mar 23 2015 ERR_FTP_FAILURE -rw-r--r--. 1 root root 898 Mar 23 2015 ERR_FTP_FORBIDDEN -rw-r--r--. 1 root root 1055 Mar 23 2015 ERR_FTP_NOT_FOUND -rw-r--r--. 1 root root 510 Mar 23 2015 ERR_FTP_PUT_CREATED -rw-r--r--. 1 root root 981 Mar 23 2015 ERR_FTP_PUT_ERROR -rw-r--r--. 1 root root 510 Mar 23 2015 ERR_FTP_PUT_MODIFIED -rw-r--r--. 1 root root 892 Mar 23 2015 ERR_FTP_UNAVAILABLE -rw-r--r--. 1 root root 1040 Mar 23 2015 ERR_GATEWAY_FAILURE -rw-r--r--. 1 root root 983 Mar 23 2015 ERR_ICAP_FAILURE -rw-r--r--. 1 root root 1587 Mar 23 2015 ERR_INVALID_REQ -rw-r--r--. 1 root root 966 Mar 23 2015 ERR_INVALID_RESP -rw-r--r--. 1 root root 1154 Mar 23 2015 ERR_INVALID_URL -rw-r--r--. 1 root root 869 Mar 23 2015 ERR_LIFETIME_EXP -rw-r--r--. 1 root root 854 Mar 23 2015 ERR_NO_RELAY -rw-r--r--. 1 root root 1140 Mar 23 2015 ERR_ONLY_IF_CACHED_MISS -rw-r--r--. 1 root root 854 Mar 23 2015 ERR_PRECONDITION_FAILED -rw-r--r--. 1 root root 921 Mar 23 2015 ERR_READ_ERROR -rw-r--r--. 1 root root 968 Mar 23 2015 ERR_READ_TIMEOUT -rw-r--r--. 1 root root 1123 Mar 23 2015 ERR_SECURE_CONNECT_FAIL -rw-r--r--. 1 root root 837 Mar 23 2015 ERR_SHUTTING_DOWN -rw-r--r--. 1 root root 989 Mar 23 2015 ERR_SOCKET_FAILURE -rw-r--r--. 1 root root 1094 Mar 23 2015 ERR_TOO_BIG -rw-r--r--. 1 root root 828 Mar 23 2015 ERR_UNSUP_HTTPVERSION -rw-r--r--. 1 root root 940 Mar 23 2015 ERR_UNSUP_REQ -rw-r--r--. 1 root root 827 Mar 23 2015 ERR_URN_RESOLVE -rw-r--r--. 1 root root 914 Mar 23 2015 ERR_WRITE_ERROR -rw-r--r--. 1 root root 857 Mar 23 2015 ERR_ZERO_SIZE_OBJECT -rw-r--r--. 1 root root 7284 Mar 23 2015 error-details.txt The existing directories are now being renamed with an .rpmmoved suffix. I see that after upgrade even unmodified files of the previous squid rpm are kept. I assume this is expected behavior?
squid-3.5.9-7.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.