On Mon, 17 Mar 2025 19:53:39 +0000
Stuart Henderson <s...@spacehopper.org> wrote:

> adding port maintainer to CCs;
> 
> On 2025/03/18 00:35, emu...@disroot.org wrote:
> > I would like to try and enable the Bonjour/mDNS protocol for net/pidgin, to 
> > trial it as a serverless instant messaging solution for a deployment of 
> > diskless OpenBSD clients. 
> > 
> > Looking back through the archives, it seems Bonjour was disabled in the 
> > port as long ago as 2008 (when 2.4.2 was committed), though no reason was 
> > mentioned in the commit message.
> > 
> > I naively tried to remove the --disable-avahi line in the CONFIGURE_ARGS, 
> > and adding avahi-client and avahi-glib to WANTLIBS for libpurple, as this 
> > is what the configure script seems to look for:
> 
> WANTLIB updates are normally done based on "make port-lib-depends-check"
> but you'll need to take care of PLISTs fiiii.
> 
> > $ diff Makefile.orig Makefile 
> > 43c43
> > < WANTLIB-libpurple= crypto gadu meanwhile ssl silc silcclient ${WANTLIB}
> > ---
> > > , = avahi-glib avahi-client crypto gadu meanwhile ssl silc silcclient 
> > > ${WANTLIB}
> > 64a65
> > >                       net/avahi \
> > 76,77c77
> > < CONFIGURE_ARGS+= --disable-avahi \
> > <                --disable-cap \
> > ---
> > > CONFIGURE_ARGS+= --disable-cap \
> > 
> > The Bonjour plugin gets built, and there are no build errors. But on 
> > launching Pidgin, and attempting to create a new account, Bonjour is absent 
> > from the list of protocols. Avahi is installed and avahi-daemon is running. 
> > 
> > No doubt this is because I have left out something essential in the 
> > Makefile due to lack of porting experience. Can anyone assist with advice 
> > on how to proceed?
> 
> A new plugin module is built, libbonjour.so, this needs adding to the
> relevant PLIST. "make uodate-plist" is the normal way to update this but
> it sometimes needs tweaking - in this case it ends up in the wrong PLIST
> by default. So you'd need to add
> 
> @so lib/purple-2/libbonjour.so
> 
> to PLIST-libpurple, and then update wantlib as mentioned above.
> 
> > Is there a particular reason for disabling Bonjour in Pidgin, such as 
> > security concerns? The protocol won't be used by Pidgin unless an account 
> > is added with that protocol, as I understand it. If it can be simply 
> > re-enabled and there are no blocking concerns, can Bonjour support be added 
> > back to the port?
> 
> Prior to that the port would have picked up avahi and built the extra
> plugin if avahi was present during configure, but it wouldn't be
> included in the package. This causes problems during bulk builds where
> other packages are added/removed all the time. So that commit didn't
> change anything for packages, just fix a sporadic problem.
> 
> Regarding adding it, the question would be about whether the extra
> runtime dependency is wanted. Over to the maintainer for that.
> 
> > thanks in advance for all assistance
> > 
> > -- 
> > Chris Billington 
> > 

Thanks for the help Stuart.
I added avahi-common avahiclient and avahi-glib to WANTLIB-libpurple
make port-lib-depends-check   gives:

libpurple-2.14.13p1(net/pidgin,-libpurple):
Bogus WANTLIB: avahi-glib.0 (/usr/local/lib/purple-2/libbonjour.so) (NOT 
REACHABLE)
*** Error 1 in target 'port-lib-depends-check' (ignored)

But if I remove avahi-glib from WANTLIB, it complains:

libpurple-2.14.13p1(net/pidgin,-libpurple):
Missing lib: avahi-glib.0 (/usr/local/lib/purple-2/libbonjour.so) (NOT 
REACHABLE)
*** Error 1 in target 'port-lib-depends-check' (ignored)

But the package avahi-glib is installed and is used in the build below.
I haven't been able to work out why this happens.

Trying to follow the steps in the Porters Guide, I made the manual changes to 
PLIST as described, then

make fake (libbonjour.so gets built)

make update-plist (and confirmed @so lib/purple-2/libbonjour.so still exists in 
pkg/PLIST-libpurple:

grep bonjour pkg/*                                                              
             
pkg/PLIST-libpurple:@so lib/purple-2/libbonjour.so
pkg/PLIST-libpurple.orig:@so lib/purple-2/libbonjour.so

But doing amake clean,  'make build' followed by 'doas make install', 
libbonjour.so doesn't get installed in /usr/local/lib/purple-2, so there is 
still no bonjour protocol available when the application is run.

No doubt I am doing something silly...? But what?


-- 
Chris Billington

Reply via email to