Update Firewalld needs manual intervention

The firewalld package prior to version 0.8.1-2 was missing the compiled python modules. This has been fixed in 0.8.1-2, so the upgrade will need to overwrite the untracked pyc files created. If you get errors like these

firewalld: /usr/lib/python3.8/site-packages/firewall/__pycache__/__init__.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/__pycache__/client.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/__pycache__/dbus_utils.cpython-38.pyc exists in filesystem
...many more...

when updating, use

pacman -Suy --overwrite /usr/lib/python3.8/site-packages/firewall/\*

to perform the upgrade.

6 Likes

Thanks for help.

2 Likes

As a learning point, does the * need to be escaped in this command or is it just a precautionary measure?

That’s what the dev’s have suggested…

https://www.archlinux.org/

1 Like

First I tried a normal update using yay -Syu because I thought it might work even given that advice. For sure it didn’t work. :grinning: Then I did a system update using pamac (all packages except firewalld). Then I updated firewalld like suggested. Worked perfectly.

As far as I understand and know the syntax of bash it is necessary to escape it. Otherwise you would have to use space which might result in an error. That’s my idea. I didn’t test it.

As a friend wrote me, we have updates (btrfs, timeshift/-autosnap) just do

sudo pacman -Syu --overwrite "*"

:wink:

That would be correct, if firewalld was the only package to update. But because that is most unlikely they have given the absolute path. So you need to escape the * because of the / at the end. I’m not sure if your version was safe in the case there are more packages. But maybe someone who is more experienced than we are can give us a deeper insight.

I forget what I read (yesterday? or I give the heart today???) here :wink: and do it with

sudo rm -R /usr/lib/python3.8/site-packages/firewall

and you get a list which files are involved.

checking for file conflicts                                                                                                                                           [###########################################################################################################] 100%
error: failed to commit transaction (conflicting files)
firewalld: /usr/lib/python3.8/site-packages/firewall/__pycache__/__init__.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/__pycache__/client.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/__pycache__/dbus_utils.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/__pycache__/errors.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/__pycache__/functions.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/__pycache__/fw_types.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/config/__pycache__/__init__.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/config/__pycache__/dbus.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/__init__.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/base.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/ebtables.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/fw.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/fw_config.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/fw_direct.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/fw_helper.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/fw_icmptype.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/fw_ifcfg.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/fw_ipset.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/fw_nm.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/fw_policies.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/fw_service.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/fw_transaction.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/fw_zone.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/icmp.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/ipXtables.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/ipset.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/logger.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/modules.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/nftables.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/prog.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/rich.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/__pycache__/watcher.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/io/__pycache__/__init__.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/io/__pycache__/direct.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/io/__pycache__/firewalld_conf.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/io/__pycache__/functions.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/io/__pycache__/helper.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/io/__pycache__/icmptype.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/io/__pycache__/ifcfg.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/io/__pycache__/io_object.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/io/__pycache__/ipset.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/io/__pycache__/lockdown_whitelist.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/io/__pycache__/service.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/core/io/__pycache__/zone.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/server/__pycache__/__init__.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/server/__pycache__/config.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/server/__pycache__/config_helper.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/server/__pycache__/config_icmptype.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/server/__pycache__/config_ipset.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/server/__pycache__/config_service.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/server/__pycache__/config_zone.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/server/__pycache__/decorators.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/server/__pycache__/firewalld.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/server/__pycache__/server.cpython-38.pyc exists in filesystem
Errors occurred, no packages were upgraded.

What I learned today is

pacman: option '--overwrite' requires an argument

the argument is the path to the files which must be deleted.


As always, backup, backup, backup :wink:

1 Like

This is the best explanation that i can find:

This doesn’t have anything to do with your program.

The * is a wildcard in Bash, it means “all files in the current directory”. If you want to pass an asterisk as an argument to your program, you do it the same way you do it with every other program: you escape it with a backslash or quote it.

So since the * is being passed to pacman as an argument it has to be escaped to keep bash from expanding it.