amavisd-new does not install due to unresolved dependency

FreeBSD-13.1-RELEASE

Name : amavisd-new
Version : 2.12.2,1


Attempting to install amavisd-new via pkg fails with unresolved dependency for lha.

Code:
# pkg install amavisd-new
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: amavisd-new has a missing dependency: lha
 
I seem unable to come up with a rational explaination as to why a binary package requires a custom compile of a required dependency. It seems to me that either the dependency should be available as a package or the dependency should be removed.

I am also under the impression that mixing ports and packages is not viewed with favour.
 
Contact the maintainer of security/amavisd-new and have them set LHA to OFF by default. archivers/lha cannot be packaged due to license restrictions. Or contact the maintainer of archivers/lha and ask if the license does indeed prevent it from being packaged.

Code:
PKGNAME: there is no package for this port: _LICENSE_RESTRICTED = delete-package
 
  • Like
Reactions: mer
Licence, roughly translated:

Redistribution, reprinting, and modification are permitted under the following conditions:
1. Do not remove copyright notices.
2. For distribution contents,
. . .
c. Distribution of binaries only is not allowed.
 
However, I have discovered this as well:

lha is a tool for extracting .lzh archive files. It also supports variants of the .lzh
archive, such as .lzs and .pma.

This version of the lha tool is part of Lhasa, a free implementation of the .lzh format.
. . .
Versions of the LHA tool were later ported to various different operating systems,
including the Amiga, Atari, MacOS, OS/2 and Unix. A tool for MSX-DOS named PMarc reused
the container format with a new compression algorithm (.pma extension).

The Unix version of the tool was developed by Masaru Oki, Nobutaka Watazaki and Tsugio
Okamoto, but was released under a software license that does not conform to the Free
Software or Open Source Definitions. Lhasa was developed as a drop-in replacement that is
Free Software and Open Source.
. . .

I installed lhasa but this did not satisfy the dependency:


Code:
Proceed with this action? [y/N]: y
[1/1] Fetching lhasa-0.3.1.pkg: 100%   52 KiB  53.4kB/s    00:01   
Checking integrity... done (0 conflicting)
[1/1] Installing lhasa-0.3.1...
[1/1] Extracting lhasa-0.3.1: 100%
[root@vhost01 ~ (master)]# pkg install amavisd-new
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: amavisd-new has a missing dependency: lha


If lhasa is a drop in replacement for lha then the dependency could be switched from lha to lhasa. Unless there exists some other impediment to doing so.
 
I installed lhasa but this did not satisfy the dependency:
The avavisd port specifically looks for a ${LOCALBASE}/bin/lha executable:
Code:
.if ${PORT_OPTIONS:MLHA}
RUN_DEPENDS+=	${LOCALBASE}/bin/lha:archivers/lha
.endif

If you modify the port to:
Code:
.if ${PORT_OPTIONS:MLHA}
RUN_DEPENDS+=	${LOCALBASE}/bin/lhasa:archivers/lhasa
.endif
Now it's going to depend on archivers/lhasa. That's assuming the code itself knows to use lhasa(1), it may need a patch so it calls the right executable.

In any case, that's up to the maintainer of the amavisd port, you can certainly make the case for archivers/lhasa due to license restrictions of archivers/lha.
 
From what I have read, lhasa is supposed to be a drop-in replacement for lha. However, lhasa cannot create an archives.

I tried creating a softlink to /usrlocal/bin/lhasa from /usr/local/bin/lha but that did not work; amavisd-still refused to install. I suppose that means pkg is looking for archivers/lha in the pkg db and the only way to get that updated is to install lha from a package.
 
amavisd-new just uses LHA to decompress archives for virus scans. So it does not need a LHA replacement which can create archives, unpacking is enough.
 
Back
Top