# Portmaster does not accept installed openldap-sasl-client



## pvoigt (Jan 28, 2014)

Portmaster does not accept an installed openldap-sasl-client when trying to install ports depending on openldap. Instead portmaster insists on installing openldap-client instead. This is demonstrated e.g. for reinstalling the already installed port security/sudo:


```
# pkg info |grep openldap
openldap-sasl-client-2.4.38    Open source LDAP client implementation with SASL2 support
openldap-sasl-server-2.4.38_1  Open source LDAP server implementation
```

And:


```
# portmaster --no-confirm --no-term-title -D -G security/sudo
===>  Cleaning for openldap-client-2.4.38
===>>> Waiting on fetch & checksum for net/openldap24-client <<<===

===>  openldap-client-2.4.38 conflicts with installed package(s): 
      openldap-sasl-client-2.4.38

      They install files into the same place.
      You may want to stop build with Ctrl + C.


===>>> Waiting on fetch & checksum for net/openldap24-client <<<===

===>  openldap-client-2.4.38 conflicts with installed package(s): 
      openldap-sasl-client-2.4.38

      They install files into the same place.
      You may want to stop build with Ctrl + C.



===>  openldap-client-2.4.38 conflicts with installed package(s): 
      openldap-sasl-client-2.4.38

      They install files into the same place.
      You may want to stop build with Ctrl + C.
===>  License OPENLDAP accepted by the user
===>   openldap-client-2.4.38 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by openldap-client-2.4.38 for building

===>  openldap-client-2.4.38 conflicts with installed package(s): 
      openldap-sasl-client-2.4.38

      They will not build together.
      Please remove them first with pkg delete.
*** Error code 1

Stop.
make: stopped in /usr/ports/net/openldap24-client

===>>> make failed for net/openldap24-client
===>>> Aborting update

===>>> Update for net/openldap24-client failed
===>>> Aborting update

===>>> Killing background jobs
Terminated

===>>> You can restart from the point of failure with this command line:
       portmaster <flags> security/sudo net/openldap24-client 

===>>> Exiting
```

If I instead go to /usr/ports/security/sudo and do a `make install clean` all runs fine. Subsequently Portmaster does not even detect any broken openldap dependencies when doing `portmaster --check-depends` but refuses to install packages depending on openldap.

This is very annoying because it turns out that every port that I would like to build with portmaster against net/openldap24-sasl-client fails. On the other hand making with make always works correctly.

This issue has already been described in an older post: https://forums.freebsd.org/viewtopic.php?&t=16488 without giving a solution for portmaster. Instead only the workaround of using make is given.

Background information: I am using:


```
# uname -a
FreeBSD spock 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
```

Maybe I should add that I am using a fresh installation of FreeBSD.

Portmaster obviously reads different dependency information than make. What can I do to tell portmaster to use the net/openldap24-sasl-client instead of net/openldap24-client?

Regards,
Peter


----------



## nanotek (Jan 28, 2014)

*Re: Portmaster does not accept installed openldap-sasl-clien*

Try ports-mgmt/portupgrade. Portmaster's utility and reliability is waning.


----------



## Juanitou (Jan 28, 2014)

*Re: Portmaster does not accept installed openldap-sasl-clien*

There is an entry in UPDATING that seems related (not tested here):


> 20121212:
> AFFECTS: users of openldap24-client who uses SASL
> AUTHOR: Xin Li <delphij@FreeBSD.org>
> 
> ...


----------



## pvoigt (Jan 28, 2014)

*Re: Portmaster does not accept installed openldap-sasl-clien*



			
				nanotek said:
			
		

> Try ports-mgmt/portupgrade. Portmaster's utility and reliability is waning.



I've just installed ports-mgmt/portupgrade and tested an installation of sudo with LDAP=on but it fails the same way portmaster does.

Regards,
Peter


----------



## pvoigt (Jan 28, 2014)

*Re: Portmaster does not accept installed openldap-sasl-clien*



			
				Juanitou said:
			
		

> There is an entry in UPDATING that seems related (not tested here):
> 
> 
> > 20121212:
> ...



Yeah, that looks related. However, I definitely did not change the SASL option of openldap24-client as it was not offered at all:

```
# cd openldap24-client/
# make showconfig
===> The following configuration options are available for openldap-client-2.4.38:
     FETCH=off: Enable fetch(3) support
===> Use 'make config' to modify these settings
```

Therefore I am not sure, if I should run portmaster -o net/openldap24-sasl-client openldap24-client. I am afraid it could mess up portmasters information about my pkg database even more.

Regards,
Peter


----------



## pvoigt (Jan 28, 2014)

*Re: Portmaster does not accept installed openldap-sasl-clien*

Well I have just tried

```
# portmaster -o net/openldap24-sasl-client openldap24-client
===>>> The second argument to -o can be a package name,
       or a port directory from /usr/ports

       openldap24-client does not seem to be installed,
       or listed as a dependency

===>>> No valid installed port, or port directory given
===>>> Try portmaster --help

===>>> Killing background jobs
Terminated
===>>> Exiting
```

And directly realized that this command cannot succeed, because net/openldap24-sasl-clientis already installed. I would really appreciate any advice on how to tell portmaster or portupgrade that I am going to use net/openldap24-sasl-client.

Regards,
Peter


----------



## Juanitou (Jan 28, 2014)

*Re: Portmaster does not accept installed openldap-sasl-clien*

I’m not very experienced on FreeBSD, but all recent UPDATING entries concerning a `portmaster -o` command include a port (folder/name) as a second argument (the error message above indicates it). Maybe this has changed since December 2012, so if I were you I would try `portmaster -o net/openldap24-sasl-client net/openldap24-client`.

If it doesn’t work, I hope somebody more knowledgeable will come to the rescue soon.


----------



## pvoigt (Jan 29, 2014)

*Re: Portmaster does not accept installed openldap-sasl-clien*



			
				Juanitou said:
			
		

> I’m not very experienced on FreeBSD, but all recent UPDATING entries concerning a `portmaster -o` command include a port (folder/name) as a second argument (the error message above indicates it). Maybe this has changed since December 2012, so if I were you I would try `portmaster -o net/openldap24-sasl-client net/openldap24-client`.
> 
> If it doesn’t work, I hope somebody more knowledgeable will come to the rescue soon.



Generally I agree with you. However, I conclude I cannot replace net/openldap24-client because I haven't installed it. Instead I have already net/openldap24-sasl-client installed. But that's what I would like to achieve with the above command. Nevertheless, I tried your kind suggestion and obtained the same error:

```
# portmaster -o net/openldap24-sasl-client net/openldap24-client

===>>> The second argument to -o can be a package name,
       or a port directory from /usr/ports

       net/openldap24-client does not seem to be installed,
       or listed as a dependency

===>>> No valid installed port, or port directory given
===>>> Try portmaster --help

===>>> Killing background jobs
Terminated
===>>> Exiting
```

Just for clarifying, e.g. the dependencies of currently installed port security/sudo:

```
# pkg info -d sudo
sudo-1.8.8:
        cyrus-sasl-2.1.26_4
        openldap-sasl-client-2.4.38
        gettext-0.18.3.1
```
Yeah, I am out of ideas and obviously need an expert. If only I knew, if I can do recursive updates and installation without portmaster or portupgrade I would simply forget about these tools. I am rather new to FreeBSD and right after having roughly learned about ports and packages I have just started to learn pkg which is mandatory since 10-RELEASE.

Regards,
Peter


----------



## Juanitou (Jan 29, 2014)

*Re: Portmaster does not accept installed openldap-sasl-clien*

Oh yes, I see it now. It was a silly suggestion, sorry, portmaster does not need the full category/name of an installed port to recognize it.

What baffles me is that the installed sudo is dependent on openldap24-sasl-client but updating it pulls openldap24-client, which can not coexist. So, if I understand it well, it seems that the first time you need to install a port needing LDAP client/server you can choose to build it with SASL support and all goes well, but you cannot later make understand portmaster this dependency exists…

WITH_PKGNG=yes is in /etc/make.conf and pkgng was issued before building portmaster, isn’t it? (I think this is not even needed starting from FreeBSD 10.0).

In my limited experience, when such conflicting situations appeared they have always been solved by deleting all the concerned ports (OpenLDAP, sudo…) and starting again… but I fear you’ll find yourself in the same situation again in the end, even if with an updated sudo.

Well, I’m useless here, where are those experts? 

Also, have you tried submitting the question to the port-maintainer or the freebsd-ports list?


----------



## pvoigt (Jan 29, 2014)

*Re: Portmaster does not accept installed openldap-sasl-clien*



			
				Juanitou said:
			
		

> Oh yes, I see it now. It was a silly suggestion, sorry, portmaster does not need the full category/name of an installed port to recognize it.
> 
> What baffles me is that the installed sudo is dependent on openldap24-sasl-client but updating it pulls openldap24-client, which can not coexist. So, if I understand it well, it seems that the first time you need to install a port needing LDAP client/server you can choose to build it with SASL support and all goes well, but you cannot later make understand portmaster this dependency exists…


Yes, thanks, that's exactly what I am supposing, but of cours I only suppose but do not know due to limited knowledge and experience.



			
				Juanitou said:
			
		

> WITH_PKGNG=yes is in /etc/make.conf and pkgng was issued before building portmaster, isn’t it? (I think this is not even needed starting from FreeBSD 10.0).


I have documented all installed steps and know that I first of all installed the ports tree and subsequently built portmaster as first port. After this I issued the following commands:

```
# echo 'WITH_PKGNG=yes' >> /etc/make.conf
# pkg2ng
```
Right now I monitored the ports database:

```
# pkg info
ialog4ports-0.1.5_2            Console Interface to configure ports
pkg-1.2.4_1                    New generation package manager
portmaster-3.17.3              Manage your ports without external databases or languages
```
The first installed port that depends on OpenLDAP was GnuPG. Portmaster installed openldap24-client along with security/gnupg and
security/dirmngr.

When I saw that not the right openldap client was installed I deinstalled security/dirmngr and installed net/openldap24-server with SASL=on but without portmaster, e.g. manually with `make config install clean`.

At this point portmaster problems started, e.g I could not re-install security/dirmngr using portmaster and had to do it manually with `make config install clean`. The same holds for all subsequent ports depending on openldap24-sasl-client.



			
				Juanitou said:
			
		

> In my limited experience, when such conflicting situations appeared they have always been solved by deleting all the concerned ports (OpenLDAP, sudo…) and starting again… but I fear you’ll find yourself in the same situation again in the end, even if with an2 updated sudo.



sudo is just an arbitrary port to demonstrate the situation. Indeed all dependecies are corrent, e.g. if I issue

```
# pkg check -dnv
```
there are not reported problems. And more: With manual installation I could so far install all desired ports which depend on openldap24-sasl-client but I could never do it with portmaster or portupgrade. So dependencies of all installed ports are OK but portmaster just ignores the installed openldap24-sasl-client when upgrading or installing new ports.



			
				Juanitou said:
			
		

> Well, I’m useless here, where are those experts?
> 
> Also, have you tried submitting the question to the port-maintainer or the freebsd-ports list?


As all ports depending on openldap24-sasl-client  are affected I do not know which port maintainer to contact. Furthermore, I do not know the right way to do so, e.g. is email the best? And were do I get the right email from? Should I use it from the first line in the Makefile of a port?

Would this be the right mailing list to address my issue: http://lists.freebsd.org/mailman/listinfo/freebsd-ports?

In the end I am wondering, if I am the only one that has run into this portmaster issue. Did I make something generally wrong?

Regards,
Peter


----------



## Juanitou (Jan 29, 2014)

*Re: Portmaster does not accept installed openldap-sasl-clien*

I’d do both: send an email to the maintainer of the OpenLDAP ports (`make maintainer` or look in net/openldap24-server) and subscribe to the list and provide this thread for reference. I think expert users and developers are more present there.


----------



## pvoigt (Jan 29, 2014)

*Re: Portmaster does not accept installed openldap-sasl-clien*



			
				Juanitou said:
			
		

> I’d do both: send an email to the maintainer of the OpenLDAP ports (`make maintainer` or look in net/openldap24-server) and subscribe to the list and provide this thread for reference. I think expert users and developers are more present there.



I would like to test still one more idea:


```
# cd /usr/ports/net/openldap24-sasl-client
# make deinstall
# cd /usr/ports/net/openldap24-client
# make install clean
```
And then I am going to follow the /usr/ports/UPDATING advice:

```
# portmaster -o net/openldap24-sasl-client openldap24-client
```
hoping to convince portmaster to use net/openldap24-sasl-client whenever a port to be installed or upgraded depends on OpenLDAP.

I that fails I am going to address this issue to OpenLDAP port maintainer and to the freebsd-ports list.

Thank your very much for your advice so far.

Regards,
Peter


----------



## pvoigt (Jan 29, 2014)

*Re: Portmaster does not accept installed openldap-sasl-clien*

Well, I've just executed my plan, with one small change: To replace openldap24-client I  need this command:

```
# portmaster -o net/openldap24-sasl-client net/openldap24-client
```
Portmaster finished correctly

```
# pkg version |grep ldap
nss_ldap-1.265_8                   =
openldap-sasl-client-2.4.38        =
openldap-sasl-server-2.4.38_1      =
pam_ldap-1.8.6_2                   =
```
and a subsequent dependency check with

```
# pkg check -dnv
```
did not reveal any problem.

However, when I tried to install an arbitrary openldap depended port like security/sudo, I obtained exactly the same problem as before:

```
# portmaster --no-confirm --no-term-title -D -G security/sudo
...
===>  License OPENLDAP accepted by the user
===>  Found saved configuration for openldap-client-2.4.38
===>   openldap-client-2.4.38 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by openldap-client-2.4.38 for building

===>  openldap-client-2.4.38 conflicts with installed package(s): 
      openldap-sasl-client-2.4.38

      They will not build together.
      Please remove them first with pkg delete.
*** Error code 1

Stop.
make: stopped in /usr/ports/net/openldap24-client

===>>> make failed for net/openldap24-client
===>>> Aborting update

===>>> Update for net/openldap24-client failed
===>>> Aborting update

===>>> Killing background jobs
Terminated

===>>> You can restart from the point of failure with this command line:
       portmaster <flags> security/sudo net/openldap24-client 

===>>> Exiting
```

Now I am going to report this to the list and the port maintainer.

Regards,
Peter


----------



## pvoigt (Jan 30, 2014)

*Re: Portmaster does not accept installed openldap-sasl-clien*

I have received feedback from the maintainer of the OpenLDAP port: This is a known and already solved issue. It will be fixed with the next version of pkg.

Unfortunately, I cannot mark this thread as solved without shortening the original topic.

Thanks to all who contributed to this thread,
Peter


----------

