Closed PiotrC1 closed 7 years ago
I'll look into adding an rc script. As for the dbus issue, I think it makes sense to change user and group to "nobody", since they're definite to be on a Linux system, and we can't add our own users/groups for systems with read-only rootfs like routers.
OK, let us try. Should I do something?
I was unable to upgrade, so I have started from scratch ince again. After installing Avahi tgere is an error:
root@Tomato:/tmp/home/root# avahi-daemon
/opt/sbin/avahi-daemon: can't load library 'libavahi-core.so.7'
In the meantime I propose following /opt/etc/init.d/S42Avahi
#!/bin/sh
ENABLED=yes
PROCS=avahi-daemon
ARGS="-D"
PREARGS=""
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:
. ./opt/etc/init.d/rc.func
(taken from Avahi at entware-ng)
I was unable to upgrade, so I have started from scratch once again
Sometimes it takes a few tries to upgrade, but it's always doable.
/opt/sbin/avahi-daemon: can't load library 'libavahi-core.so.7'
Yeah, I forgot to list libavahi-core
as avahi
dependency, it's being rebuilt now. I didn't write back because I wanted to test this myself first.
In the meantime I propose following /opt/etc/init.d/S42Avahi
Thanks, but we don't need an rc script for avahi-daemon, as I found out, since it's being managed by dbus
Well, now libcap.so.2 is missing ...
I have installed libcap manually and problem is gone.
Thanks, but we don't need an rc script for avahi-daemon, as I found out, since it's being managed by dbus
Well, if I start avahi-browse -a in order to see advertisment of Avahi I get:
Failed to create client object: Deamon not running
On the other side, when I start Avahi daemon manually, it dies quickly (at least when I try to see advertisments with avahi-browse).
OK, so let's first make it work, and then decide if we need an rc script or not. libcap
dependency is indeed needed. cups
doesn't log avahi-related errors for me any more, so I thought it was OK. However, if I start it manually, it dies with this message (testing on MIPSEL tomatousb shibby mod):
[root@unknown root]$ avahi-daemon
Found user 'nobody' (UID 65534) and group 'nobody' (GID 65534).
Successfully dropped root privileges.
chroot.c: fork() failed: Resource temporarily unavailable
failed to start chroot() helper daemon.
This error led me here: https://github.com/lxc/lxc/issues/25
And indeed, if I set rlimit-nproc = 300
(I had exactly 3 processes running as nobody) in /opt/etc/avahi/avahi-daemon.conf
(see https://github.com/lxc/lxc/issues/25#issuecomment-28306663), it works fine, together with avahi-advertise
:
[root@unknown root]$ avahi-daemon
Found user 'nobody' (UID 65534) and group 'nobody' (GID 65534).
Successfully dropped root privileges.
avahi-daemon 0.6.31 starting up.
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Successfully called chroot().
Successfully dropped remaining capabilities.
Loading service file /services/sftp-ssh.service.
Loading service file /services/ssh.service.
Joining mDNS multicast group on interface br0.IPv4 with address xxx.xxx.xxx.xxx
New relevant interface br0.IPv4 for mDNS.
Network interface enumeration completed.
Registering new address record for xxx.xxx.xxx.xxx on br0.IPv4.
Registering HINFO record with values 'MIPS'/'LINUX'.
Server startup complete. Host name is unknown.local. Local service cookie is 1915423308.
Service "unknown" (/services/ssh.service) successfully established.
Service "unknown" (/services/sftp-ssh.service) successfully established.
#other session
[root@unknown root]$ avahi-browse -a
+ br0 IPv4 unknown [xx:xx:xx:xx:xx:xx] _workstation._tcp local
+ br0 IPv4 unknown _ssh._tcp local
+ br0 IPv4 unknown _sftp-ssh._tcp local
#some other slightly sensitive output
Perfectly. After increasing rlimit-nproc from 3 (as it was default) to 300 avahi works and advertises printer and other services. I still cannot print on iOS wia AirPrint as some cups filters are missing as well as mime types.
@PiotrC1
I still cannot print on iOS wia AirPrint
If you stay with me, we'll make it so you can :smiley: I don't have iOS on my setup, and cups works fine for my needs
cups filters are missing as well as mime types.
I got your point about cups filters:
lpr: Unsupported document-format "image/jpeg".
As for mime.types and mime.convs, they're simply installed to wrong location: /opt/etc/cups
, and it should be /opt/share/cups/mime
. I'll fix it too
@PiotrC1 Ive fixed libcap dependency, soon will be online. But what's the problem with mime? I discovered that mime files were already installed:
[root@unknown root]$ ls /opt/share/cups/mime/mime.*
/opt/share/cups/mime/mime.convs /opt/share/cups/mime/mime.types
[root@unknown root]$ ipkg search /opt/share/cups/mime/mime.convs
cups - 2.1.2-5
There were just older versions of this files needlessly installed to /opt/etc/cups
(which are now removed). So, what mime issues are you having exactly?
@alllexx88
If you stay with me, we'll make it so you can :smiley: I don't have iOS on my setup, and cups works fine for my needs
Thanks for your promise. If you use Cups as print server, this installation is OK (I do the same on Raspberry PI and it works like a charm). If you print form inside Linux or from iOS you need some more tweaking (again on Raspberry PI they as present as it's Debian).
As for mime.types and mime.convs, they're simply installed to wrong location: /opt/etc/cups, and it should be /opt/share/cups/mime. I'll fix it too
Be carefull - if you read cups log you will see that CUPS reads both locations (one, /opt/etc/cups id provided by CUPS itself, the other one is provided by cups-filters package). The problem with printing jpegs from inside Linux are rather missing filters - see enclosed:
E [05/Sep/2016:15:46:49 +0200] Filter \"pdftops\" not found.
E [05/Sep/2016:15:46:49 +0200] Filter \"hpgltops\" not found.
E [05/Sep/2016:15:46:49 +0200] Filter \"texttops\" not found.
E [05/Sep/2016:15:46:49 +0200] Filter \"imagetops\" not found.
E [05/Sep/2016:15:46:49 +0200] Filter \"imagetoraster\" not found.
I [05/Sep/2016:15:46:49 +0200] Loaded MIME database from "/opt/share/cups/mime" and "/opt/etc/cups": 43 types, 3 filters...
That's the reason I ask for adding cups-filters package.
@PiotrC1 I've read that for recent cups it's just share/cups/mime/mime.* that matter. If others are needed for cups-filters, then they'll be shipped with this package. I'm off for now, the next thing to do is adding cups-filters, which I'll get too as soon as I can
Bug in S68avahi-daemon:
;; missing just before stop)
@PiotrC1 Thanks, fixed. Can we close this issue now?
Yest, definitelly.
I have installed Optware-ng on ARM7 router (Tomato by shibby). I found two issues regardsing avahi: 1) There is no startup script in /opt/etc/init.d/ for Avahi, 2) After installing Avahi DBus complains during startup: