Can`t install gui-ufw - missing dependencies?

You think you have found a bug? Let us know about it.
Post Reply
viva-cz
Posts: 3
Joined: 7. Oct 2016, 14:04
Location: Czechia

Can`t install gui-ufw - missing dependencies?

Post by viva-cz » 7. Oct 2016, 20:41

Salix 14.2 32-bit.
I try install gui-ufw via Sourcery and slapt-src, I get an error

Code: Select all

patching file bin/gufw
/usr/src/slapt-src/network/gui-ufw/gui-ufw-12.04.1/gufw/view/guiGufw.py:23: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, Gdk, GLib
/usr/src/slapt-src/network/gui-ufw/gui-ufw-12.04.1/gufw/view/guiGufw.py:25: PyGIWarning: Polkit was imported without specifying a version first. Use gi.require_version('Polkit', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import Polkit
ERROR: Python module view.guiGufw not found
ERROR: Python module util not found
and after install:

Code: Select all

iva[~]$ sudo /usr/bin/gufw
Heslo: 
Gufw does not appear to have been installed correctly.
Any suggestion, please?

User avatar
mimosa
Salix Warrior
Posts: 2970
Joined: 25. May 2010, 17:02
Contact:

Re: Can`t install gui-ufw - missing dependencies?

Post by mimosa » 8. Oct 2016, 08:53

I'm afraid I didn't package this this time round because it had evolved in such an Ubuntu-centric drection - and that is probably why the SLackBuild isn't working.

However, all Gufw is is a graphical wrapper for ufw, which is in the repositories.

viva-cz
Posts: 3
Joined: 7. Oct 2016, 14:04
Location: Czechia

Re: Can`t install gui-ufw - missing dependencies?

Post by viva-cz » 9. Oct 2016, 00:56

Imho missing four packages having additional dependencies.
As you said, Gufw is only a gui not so important to introduce dependency hell into Salix

chazbroam
Posts: 25
Joined: 31. Jan 2015, 09:34

Re: [Solved???] Can`t install gui-ufw - missing dependencies

Post by chazbroam » 19. Dec 2016, 10:31

viva-cz wrote:

Code: Select all

iva[~]$ sudo /usr/bin/gufw
Heslo: 
Gufw does not appear to have been installed correctly.
Starting from this, I did this:

Code: Select all

cbroam[~]$ gksu leafpad /usr/bin/gufw
While in leafpad (or whatever editor you prefer), you can see this:

Code: Select all

#!/bin/bash
LOCATIONS=(
"/usr/lib64/python2.7/site-packages/gufw/gufw.py"
"/usr/lib64/python2.6/site-packages/gufw/gufw.py"
"/usr/lib/python2.7/dist-packages/gufw/gufw.py"
"/usr/lib/python2.6/dist-packages/gufw/gufw.py"
)

for ((i = 0; i < ${#LOCATIONS[@]}; i++))
do
    if [[ -e "${LOCATIONS[${i}]}" ]]; then
        python ${LOCATIONS[${i}]}
        successful="True"
        break
    fi
done

if [ "$successful" != "True" ]; then
    echo "Gufw does not appear to have been installed correctly."
fi
Back to the command line (don't close the text editor window for GUFW executable):

Code: Select all

cbroam[~]$ slocate gufw.py
/usr/lib/python2.7/site-packages/gufw/gufw.pyc
/usr/lib/python2.7/site-packages/gufw/gufw.py
/usr/src/slapt-src/network/gui-ufw/package-gui-ufw/usr/lib/python2.7/site-packages/gufw/gufw.pyc
/usr/src/slapt-src/network/gui-ufw/package-gui-ufw/usr/lib/python2.7/site-packages/gufw/gufw.py
/usr/src/slapt-src/network/gui-ufw/gui-ufw-12.04.1/gufw/gufw.py
/usr/src/slapt-src/network/gui-ufw/gui-ufw-12.04.1/build/lib/gufw/gufw.py
Now go back to the opened window of leafpad viewing the internal executable gufw:
Add a line directly underneath: "/usr/lib64/python2.6/site-packages/gufw/gufw.py"
Fill that line with this: "/usr/lib/python2.7/site-packages/gufw/gufw.py" [or whatever slocate told you where gufw.py is found]

Hope this helps.

FYI: according to the slackbuilds.org website, you need to add this line of code to your /etc/rc.d/rc.local file:

Code: Select all

##Start UFW
if [ -x /lib/ufw/ufw-init ]; then
/lib/ufw/ufw-init start
fi
This makes sure that ufw firewall gets started upon boot.

Post Reply