# Strange dependencies



## ever (Apr 3, 2015)

Guys,
First, a few words about me:
I was quite familiar with FreeBSD back in past. Let's say in version 6 or so. For a few years I haven't worked with FreeBSD at all. Now I inherited a FreeBSD 9.1 server from one of my co-workers and I'm little confused with ports dependencies.

Because it is 9.1 and it is no longer supported i'd like to upgrade it to 9.3 releng. Before that I need to upgrade some packages which are vulnerable.  And there are troubles.  For example I want to upgrade wget. Pretty simple isn't it?  Not exactly:

```
[root@deamon ~]# pkg upgrade wget
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (6 conflicting)
Checking integrity... done (0 conflicting)
The following 7 packages will be affected (of 0 checked):

Installed packages to be REMOVED:
        p5-Mail-SpamAssassin-3.3.2_6

New packages to be INSTALLED:
        gettext-runtime: 0.19.4
        gettext-tools: 0.19.4

Installed packages to be UPGRADED:
        wget: 1.14 -> 1.16.2_1
        libiconv: 1.14 -> 1.14_6
        gettext: 0.18.1.1 -> 0.19.4
        libidn: 1.26 -> 1.29
```

It is WGET! It has no connection to Spamassasin. Why did pkg want to deinstall SpamAssassin?

There are more: when I want to install spamassassin (not p5-mail-spamassasin), pkg wanted to deinstall... apache, mc or postgrey!

I can't reinstall whole server and install the newest version because there is no time for that. It has to be running for now. And I want it to be updated and safe. But I can't. Right now all vulnerable services are disabled but it is only a temporary solution.

Could you please help me? What to do? How to upgrade only one package or how to remove those strange dependencies?

Best,

Ev.


----------



## talsamon (Apr 3, 2015)

/usr/ports/UPDATING


```
20140310:
  AFFECTS: users of mail/p5-Mail-SpamAssassin and japanese/p5-Mail-SpamAssassin
  AUTHOR: ohauer@FreeBSD.org

  The port mail/p5-Mail-SpamAssassin was renamed to mail/spamassassin and
  the port japanese/p5-Mail-SpamAssassin was renamed to japanese/spamassassin.
  To ease upgrading run the following set of commands:

  pkgng users:

  # pkg set -o mail/p5-Mail-SpamAssassin:mail/spamassassin
  # pkg set -o japanese/p5-Mail-SpamAssassin:japanese/spamassassin
```


----------



## ever (Apr 3, 2015)

Yup - I did it. Before tried to upgrade wget.


----------



## talsamon (Apr 3, 2015)

What said `pkg info p5-Mail-SpamAssassin` and `pkg info mail/spamassassin`?
Maybe, you have to put `WITH_PKGNG=yes` in your /etc/make.conf.
I am not sure if it's necessaire to run `pkg2ng` now on a new 9.3 system.


----------



## ever (Apr 3, 2015)

```
[root@deamon ~]# pkg info p5-Mail-SpamAssassin
p5-Mail-SpamAssassin-3.3.2_6
Name           : p5-Mail-SpamAssassin
Version        : 3.3.2_6
Installed on   : Fri Oct 31 19:27:16 CET 2014
Origin         : mail/spamassassin
Architecture   : freebsd:9:x86:32
Prefix         : /usr/local
Categories     :
Licenses       :
Maintainer     : unknown
WWW            : http://spamassassin.apache.org/
Comment        : A highly efficient mail filter for identifying spam
Shared Libs required:
        libssl.so.8
        libcrypto.so.8
Shared Libs provided:
        libsslspamc.so.0
        libspamc.so.0
Annotations    :
Flat size      : 2.59MiB
Description    :
SpamAssassin is a mail filter which attempts to identify spam using text
analysis and several internet-based realtime blacklists.

Using its rule base, it uses a wide range of heuristic tests on mail
headers and body text to identify "spam", also known as unsolicited
commercial email.

Once identified, the mail can then be optionally tagged as spam for later
filtering using the user's own mail user-agent application.

Additional drop-in rule sets are available at
http://wiki.apache.org/spamassassin/CustomRulesets

WWW:    http://spamassassin.apache.org/

[root@deamon ~]# pkg info mail/spamassassin
p5-Mail-SpamAssassin-3.3.2_6
Name           : p5-Mail-SpamAssassin
Version        : 3.3.2_6
Installed on   : Fri Oct 31 19:27:16 CET 2014
Origin         : mail/spamassassin
Architecture   : freebsd:9:x86:32
Prefix         : /usr/local
Categories     :
Licenses       :
Maintainer     : unknown
WWW            : http://spamassassin.apache.org/
Comment        : A highly efficient mail filter for identifying spam
Shared Libs required:
        libssl.so.8
        libcrypto.so.8
Shared Libs provided:
        libsslspamc.so.0
        libspamc.so.0
Annotations    :
Flat size      : 2.59MiB
Description    :
SpamAssassin is a mail filter which attempts to identify spam using text
analysis and several internet-based realtime blacklists.

Using its rule base, it uses a wide range of heuristic tests on mail
headers and body text to identify "spam", also known as unsolicited
commercial email.

Once identified, the mail can then be optionally tagged as spam for later
filtering using the user's own mail user-agent application.

Additional drop-in rule sets are available at
http://wiki.apache.org/spamassassin/CustomRulesets

WWW:    http://spamassassin.apache.org/
```


----------



## ever (Apr 3, 2015)

BTW spamassassin is only an example. There are more strange dependencies out there.


----------



## talsamon (Apr 3, 2015)

Did you try `pkg check -d`?


----------



## ever (Apr 3, 2015)

Nope. Btw thanks for your attention.


```
Checking all packages:  11%irc/epic5 has a missing dependency: lang/tcl84
Checking all packages:  58%mail/spamassassin has a missing dependency: mail/p5-Mail-SPF
Checking all packages: 100%

>>> Missing package dependencies were detected.
>>> Found 2 issue(s) in the package database.

pkg: No packages available to install matching 'tcl' have been found in the repositories
>>> Summary of actions performed:

tcl dependency failed to be fixed
p5-Mail-SPF dependency failed to be fixed

>>> There are still missing dependencies.
>>> You are advised to try fixing them manually.
```


----------



## talsamon (Apr 3, 2015)

Maybe, this could helpful:
https://www.freebsd.org/doc/handbook/pkgng-intro.html

```
Note:
When changing package origins, it is important to reinstall packages that are dependent on the package with the modified origin. To force a reinstallation of dependent packages, run:

e.g..# pkg install -Rf graphics/freeglut
```


----------



## ever (Apr 3, 2015)

Thanks. I'll try it.


----------

