ufw seems to be broken in archlinux arm

This forum is for topics specific to the Raspberry Pi and Arch Linux ARM

ufw seems to be broken in archlinux arm

Postby elementz » Sun Jun 02, 2013 4:24 pm

I've just installed ufw and when running ufw status I get: ERROR: Couldn't determine iptables version

As per this bug https://bugs.archlinux.org/task/35430, the problem seems to be that iptables moved from /usr/sbin/iptables to /sbin/iptables.

I've tried softlinking iptables , iptables-restore and iptables-save to /usr/sbin/ but it still breaks.
The system itself is up to date

$this->bbcode_second_pass_code('', 'uname -r
3.6.11-11-ARCH+
')

$this->bbcode_second_pass_code('', 'ufw --version
ufw 0.33
')

$this->bbcode_second_pass_code('', 'iptables --version
iptables v1.4.18
')

I am able to start iptables via systemctl:

$this->bbcode_second_pass_code('', '
[~]# systemctl start iptables.service
[~]# systemctl status iptables.service
iptables.service - Packet Filtering Framework
Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled)
Active: active (exited) since Sun 2013-06-02 18:06:30 CEST; 23min ago
Process: 342 ExecStart=/usr/bin/iptables-restore /etc/iptables/iptables.rules (code=exited, status=0/SUCCESS)
')
elementz
 
Posts: 8
Joined: Tue May 31, 2011 10:23 pm

Re: ufw seems to be broken in archlinux arm

Postby sdjf » Sun Jun 02, 2013 7:14 pm

how about starting ufw from command line with strace to see what system calls are happening? It will show you whether it is finding iptables, for one thing. strace is available in the repositories, you can specify max output string length you want for each line with -s and where to put output with -o

strace -s 100 -o vfwstraceoutput.txt vfw &

change the string length and name of output file to your liking, of course you can add options to the call to ufw.
sdjf
 
Posts: 178
Joined: Wed May 08, 2013 1:55 pm

Re: ufw seems to be broken in archlinux arm

Postby kmihelich » Mon Jun 03, 2013 8:38 pm

This should be fixed in the latest version of ufw in the repos now.

And as a side note: DO NOT, UNDER ANY CIRCUMSTANCES, EVER AGAIN POST ABOUT ARCH LINUX ARM BUGS ON THE ARCH LINUX (READ: X86) BUG TRACKER. Even if the bug here is because of a bug in x86 Arch, do not do it. If you can replicate it on x86, then you can file a bug report there as it will actually belong there. If you can't replicate it, don't want to replicate it, DO NOT POST ABOUT IT THERE. I'm really getting tired of seeing this. These are two separate distributions, and we have our own systems for reporting bugs.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: ufw seems to be broken in archlinux arm

Postby elementz » Wed Jun 05, 2013 6:21 pm

Thanks kmihelich. Will do better next time. :)

Anyways, just tried to update, and I get:

$this->bbcode_second_pass_code('', '
pacman -Syu
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
alarm is up to date
aur is up to date
:: Starting full system upgrade...
warning: couchpotato-git: local (9db1f34-1) is newer than aur (5c0d8a7-1)
resolving dependencies...
looking for inter-conflicts...

Packages (46): autofs-5.0.7-3 bash-4.2.045-4 bridge-utils-1.5-2 coreutils-8.21-2 cryptsetup-1.6.1-2 dash-0.5.7-4
device-mapper-2.02.98-4 dhcpcd-5.6.8-3 e2fsprogs-1.42.7-2 filesystem-2013.05-2 fuse-2.9.2-3
glibc-2.17-5.1 gnutls-3.2.1-1 inetutils-1.9.1-6 iproute2-3.9.0-2 iptables-1.4.19.1-1 kmod-13-2
libogg-1.3.1-1 libsasl-2.1.26-4 libx11-1.6.0-1 libxext-1.3.2-1 libxml2-2.9.1-2 libxtst-1.2.2-1
libxxf86vm-1.1.3-1 localepurge-0.6.3-3 lsof-4.87-2 lvm2-2.02.98-4 net-tools-1.60.20130531git-1
netctl-1.1-1.1 openresolv-3.5.4-3 pacman-mirrorlist-20130603-1 ppp-2.4.5-6 rtmpdump-20121203-2
ruby-2.0.0_p195-1 sabnzbd-0.7.12-1 sed-4.2.2-3 shadow-4.1.5.1-6 systemd-204-3 systemd-sysvcompat-204-3
sysvinit-tools-2.88-11 tar-1.26-4 ufw-0.33-3 util-linux-2.23.1-2 v4l-utils-0.9.5-2 wpa_actiond-1.4-2
wpa_supplicant-2.0-4

Total Installed Size: 144.04 MiB
Net Upgrade Size: -13.62 MiB

:: Proceed with installation? [Y/n] y
(46/46) checking keys in keyring [###########################################] 100%
(46/46) checking package integrity [###########################################] 100%
(46/46) loading package files [###########################################] 100%
(46/46) checking for file conflicts [###########################################] 100%
error: failed to commit transaction (conflicting files)
filesystem: /bin exists in filesystem
filesystem: /sbin exists in filesystem
filesystem: /usr/sbin exists in filesystem
Errors occurred, no packages were upgraded.
')

Why would pacman want to replace /bin /sbin and /usr/sbin? This is a bit confusing to me...
elementz
 
Posts: 8
Joined: Tue May 31, 2011 10:23 pm

Re: ufw seems to be broken in archlinux arm

Postby kmihelich » Wed Jun 05, 2013 6:22 pm

Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm

Re: ufw seems to be broken in archlinux arm

Postby elementz » Wed Jun 05, 2013 6:32 pm

Yes. Erm. Just found it...

$this->bbcode_second_pass_code('', 'pacman -Qqo /bin /sbin /usr/sbin | pacman -Qm -') just sits there, and returns nothing.
The last lines of strace:

$this->bbcode_second_pass_code('', 'lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
munmap(0xb688a000, 200704) = 0
brk(0xe11000) = 0xe11000
write(1, "bash\ncoreutils\ndash\nfuse\ninetutils\nnet-tools\nsed\nshadow\nsysvinit-tools\ntar\nutil-linux\ndhcpcd\ne2fspro"..., 412) = 412
exit_group(0) = ?
+++ exited with 0 +++
')

Edit: Exit status is 0, but the command does not drop back to the shell upon "completion". So should i assume that 1) from https://www.archlinux.org/news/binaries-move-to-usrbin-requiring-update-intervention/ does not apply for my system?

Edit 2: Ok, I was able to update after removing two packages from /usr/sbin. Strangely those were not listed by any of the methods recommended in aforementioned howto.

Ufw works now! Thread can be closed. Thx.
elementz
 
Posts: 8
Joined: Tue May 31, 2011 10:23 pm


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 8 guests