Bug 268887

Summary: devel/arcanist: collision with clamav
Product: Documentation Reporter: Matthias Fechner <mfechner>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Some People CC: carlavilla, grahamperrin, grembo
Priority: --- Flags: bugzilla: maintainer-feedback? (grembo)
Version: Latest   
Hardware: Any   
OS: Any   

Description Matthias Fechner freebsd_committer freebsd_triage 2023-01-11 12:56:55 UTC
Hi,

you cannot install devel/arcanist together with clamav as clamav depends on archivers/arc which has a name collision.

Do you think it would be possible to rename the binary to arcanist or add an option to make this rename possible?
Comment 1 Michael Gmelin freebsd_committer freebsd_triage 2023-01-11 13:05:33 UTC
Hi Matthias,

renaming arcanist is not an option, as it would break howtos etc.

But good news is that we split arcanist into two ports for that reason:

devel/arcanist-lib: This contains all of arcanist
devel/arcanist: creates a symlink /usr/local/bin/arc to
                /usr/local/lib/php/arcanist/bin/arc 

So all you need to do is only install arcanist-lib and then either
call /usr/local/lib/php/arcanist/bin/arc explicitly or do

    ln -s /usr/local/lib/php/arcanist/bin/arc /usr/local/bin/arcanist

to have the effect you asked for.

Best
Michael
Comment 2 Matthias Fechner freebsd_committer freebsd_triage 2023-01-11 15:04:48 UTC
Thanks Michael,

but it does not work, get the following error message:
```
 USAGE EXCEPTION  Toolset "archanist" is unknown. The binary should be executed so that "argv[0]" identifies a supported toolset. Rename the binary or install the library that provides the desired toolset. Current available toolsets: arc, phage.
```
Comment 3 Michael Gmelin freebsd_committer freebsd_triage 2023-01-11 15:18:08 UTC
(In reply to Matthias Fechner from comment #2)

Well, so arcanist really wants to be started as "arc".

Running

    /usr/local/lib/php/arcanist/bin/arc

should work though.

You could also do

    alias arc=/usr/local/lib/php/arcanist/bin/arc

in your user session (and if you don't happen to run "arc" with that specific user account, add that alias to ~/.profile).
Comment 4 Michael Gmelin freebsd_committer freebsd_triage 2023-01-11 15:29:34 UTC
(In reply to Michael Gmelin from comment #3)

Or you create a wrapper script:

As an unprivileged user do:

  mkdir -p ~/bin
  echo '#!/bin/sh' >~/bin/arcanist
  echo 'exec /usr/local/lib/php/arcanist/bin/arc "$@"' >>~/bin/arcanist
  chmod 755 ~/bin/arcanist

Then try:

  arcanist anoid

(assumes that your unprivileged user has ~/bin in its path, which should usually be the case)
Comment 5 Graham Perrin freebsd_committer freebsd_triage 2023-01-11 19:52:31 UTC
(In reply to Matthias Fechner from comment #0)

The name collision is acknowledged, and worked around, at <https://wiki.freebsd.org/Phabricator?highlight=%28arcanist%29#Install_Command_Line_Client>. 

It seems peculiar to have no mention of Arcanist in the documentation portal: 

% grep -R -i arcanist /usr/doc/
% 

I think, let's reopen this as a documentation bug report.
Comment 6 Graham Perrin freebsd_committer freebsd_triage 2023-01-11 19:55:22 UTC
(In reply to Graham Perrin from comment #5)

> … at 
> <https://wiki.freebsd.org/Phabricator?highlight=%28arcanist%29#Install_Command_Line_Client>. 
> …

Sorry, that was a dirty URL (remnants from performing a search). 

Cleaner: 

<https://wiki.freebsd.org/Phabricator#Install_Command_Line_Client>
Comment 7 Sergio Carlavilla Delgado freebsd_committer freebsd_triage 2023-01-28 10:52:23 UTC
What is the bug here related to the documentation?
Comment 8 Graham Perrin freebsd_committer freebsd_triage 2023-02-04 02:13:52 UTC
(In reply to Sergio Carlavilla Delgado from comment #7)

>> … no mention of Arcanist in the documentation portal: …
Comment 9 Sergio Carlavilla Delgado freebsd_committer freebsd_triage 2023-02-13 19:55:09 UTC
(In reply to Graham Perrin from comment #8)
can you please provide a patch?
Comment 10 Sergio Carlavilla Delgado freebsd_committer freebsd_triage 2023-04-09 17:32:22 UTC
I'm gonna close this as a doc bug.
If someone wants arcanist in the documentation I'll be happy to review a patch and add it to the documentation.