gustavo-iniguez-goya / opensnitch

OpenSnitch is a GNU/Linux application firewall
GNU General Public License v3.0
394 stars 20 forks source link

.deb install error #57

Closed S4qFBxkFFg closed 4 years ago

S4qFBxkFFg commented 4 years ago

(Hello - first of all, this error appears not to prevent the programme running, so is not a critical issue, but is annoying as it won't go away.)

After installing (with dpkg -i) I get the following:

Errors were encountered while processing:
 python3-opensnitch-ui
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up python3-opensnitch-ui (1.0.1-1) ...
ln: failed to create symbolic link '/home/data1/.config/autostart/opensnitch_ui.desktop': File exists
ln: failed to create symbolic link '/home/user1/.config/autostart/opensnitch_ui.desktop': File exists
ln: failed to create symbolic link '/home/user2/.config/autostart/opensnitch_ui.desktop': File exists
ln: failed to create symbolic link '/home/user3/.config/autostart/opensnitch_ui.desktop': File exists
ln: failed to create symbolic link '/home/lost+found/.config/autostart/opensnitch_ui.desktop': File exists
mkdir: cannot create directory ‘/home/external/.config’: Permission denied
dpkg: error processing package python3-opensnitch-ui (--configure):
 installed python3-opensnitch-ui package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 python3-opensnitch-ui

This error now appears every time I install/update packages, even those not associated with opensnitch - the package manager keeps retrying.

I think the installer is assuming every folder in /home is a user but "data1" isn't a current user and "lost+found" is created by the filesystem (/home is a separate physical drive on this box). These just cause unnecessary links to be created, but "external" is on a separate machine entirely, so results in permissions errors even though it's running as root.

Would it work to remove the symlink creation from the installer, and make it something done when a particular user runs opensnitch?

gustavo-iniguez-goya commented 4 years ago

HI S4qFBxkFFg,

edit the following file: /var/lib/dpkg/info/python3-opensnitch-ui.postinst

and modify the 30th line: mkdir -p $path to mkdir -p $path || true

I'll add to the TODO list improve the ui deb package. Thank you !

S4qFBxkFFg commented 4 years ago

Cool - that works, thanks.