Bug 252013

Summary: [NEW PORT] net-p2p/airdcpp-webclient: Peer-to-peer file sharing application for file servers/NAS devices
Product: Ports & Packages Reporter: V <ven1m>
Component: Individual Port(s)Assignee: Yasuhiro Kimura <yasu>
Status: In Progress ---    
Severity: Affects Only Me CC: czamana, yasu
Priority: --- Keywords: feature, needs-qa
Version: LatestFlags: ven1m: maintainer-feedback+
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch
none
New diff updated to airdcpp 2.11.0
ven1m: maintainer-approval+
airdcpp 2.11.0 with fix for umask and home directory
ven1m: maintainer-approval+
Update to airdcpp 2.11.1
ven1m: maintainer-approval+
airdcpp 2.11.1
ven1m: maintainer-approval+
airdcpp-webclient 2.11.1
none
airdcpp-webclient 2.11.2
ven1m: maintainer-approval+
airdcpp-webclient_2.11.3
ven1m: maintainer-approval+
airdcpp-webclient_2.11.3
none
airdcpp-webclient_2.11.3
ven1m: maintainer-approval+
airdcpp-webclient_2.11.3
ven1m: maintainer-approval+
airdcpp-webclient_2.11.3
ven1m: maintainer-approval+
airdcpp-webclient_2.11.3 ven1m: maintainer-approval+

Description V 2020-12-21 12:05:52 UTC
Created attachment 220776 [details]
patch

net-p2p/airdcpp-webclient: <New port, initial commit>

 * Added custom rc.d to control service.
 * User and group airdcpp is created in order to avoid to run the service as root.

Some things to consider when reviewing the port:
 * Built as one package with both client and web UI in one package. Is this OK and could be split later on if this should be needed? Can be split according to https://airdcpp-web.github.io/docs/advanced/compiling-options.html
 * etc/airdcpp/ is used for both config file, but also for all other files created by the service. Should these have been located in share/airdcpp instead? It includes a mix of config, log and client files. It is not possible to split these as far as I know.
 * Could tbb be added to default options in order to be used when official packages are created, or should it be kept as a non-default option?

QA:
  * portlint: OK (WARN: Makefile: possible use of absolute pathname "/var".)
Comment 1 Zamana 2020-12-29 03:41:27 UTC
Oh my...

I should have visited this place before.

This port was submitted Dec, 21, and today, Dec, 29, I finished my port I was about to sumitt it...

That's life.
Comment 2 V 2020-12-29 07:28:13 UTC
(In reply to Zamana from comment #1)

That’s unfortunate! Do you have any feedback to give? Did you solve it differently? 

This port needs qa. I was not able to successfully set up poudriere in a jail and have only tested the port with FreeBSD 12.2 and amd64.
Comment 3 Zamana 2020-12-29 12:12:23 UTC
Hello Ven1m!

I made the port by using my own article:
https://gist.github.com/Zamana/4b8021d79f626d5cf656926aa465a652

and the FreeBSD ports documentaion (the easy one).

I didn't use poudriere or qa (what is qa anyway?).

Everything was made in a jail in FreeNAS 11.3 and it is working just fine, exactly the same way my official jail with AirDC++ 2.10.1 is running.

No errors or warnings.

Thanks.
Comment 4 V 2021-01-09 19:29:17 UTC
Created attachment 221428 [details]
New diff updated to airdcpp 2.11.0

Updated to latest version, 2.11.0.

Tested on FreeBSD 12.2 amd64
Comment 5 V 2021-02-12 12:43:49 UTC
I have been running this port for a while now with no major issues. I realized that the airdcpp_umask is not working after reboot, but if I restart the service the correct umask is applied.

I have found out that _umask does not seem to be supported by FreeBSD yet, can't find it in the documentation. Still it seems to work, at least when restarting the service. But maybe there is something else in play here.

As a temporary solution I've added a line with umask ${airdcpp_umask} before the run_rc_command.
Comment 6 V 2021-02-12 12:57:10 UTC
Created attachment 222387 [details]
airdcpp 2.11.0 with fix for umask and home directory
Comment 7 V 2021-07-30 14:21:31 UTC
Created attachment 226798 [details]
Update to airdcpp 2.11.1

Updated to airdcpp 2.11.1

Changelog

Web Client 2.11.1
    Portable builds: improve performance for encrypted transfers when using a CPU that supports AES instruction set (buildroot issue #13751)
    Fix crashes and other issues caused by local files with non-valid UTF-8 names (#382)
    Fix saving of the port configuration when running the initial configuration wizard (#391)
    Fix filelist-related crashes
    Fix a crash when stopping extensions that have performed searches
    Remove code references to the ADL search feature (#381)
    Print a better error message when updating the country database fails
    Fix interception warnings when hubs are blocking direct private messages (shown only when messaging with other AirDC++ users)

Web UI 2.11.1
    Fix various keyboard events when using numpad keys (PR #18)

Tested on FreeBSD 12.2 amd64
Comment 8 V 2021-07-31 05:34:22 UTC
Created attachment 226812 [details]
airdcpp 2.11.1

Previous diff did not include the changes
Comment 9 V 2021-08-04 06:00:56 UTC
Created attachment 226934 [details]
airdcpp-webclient 2.11.1

Fix airdcpp version string after ports collection switched to git. Since the source is located inside the ports directory the airdcpp build script falsely identifies the source as a git repository and fetch the version from the freebsd ports collection instead of using its own version.
Comment 10 V 2021-09-26 11:19:38 UTC
Created attachment 228193 [details]
airdcpp-webclient 2.11.2

+ Reviesed Makefile
    - Dynamically create parts of the plist to make updating the port easier.
    - General cleanup
+ Updated to airdcpp-webclient 2.11.2
    - Web Client 2.11.2
        * Fix filelist-related crashes
        * Fix a possible crash when uploading files (#405)
        * Search API: match the file extension for incoming NMDC results (#406)
        * Search API: fix owner IDs for search instances created by basic auth sessions
        * Filesystem API: avoid socket timeouts when listing directory content
        * API: fix an incorrectly returned error status code when removing hooks
        * API: fix a missing error message when removing non-existing subscriptions
        * SOCKS5: fix sending of UDP data when connecting to the SOCKS server via IPv4
        * Print more information in console when the application crashes
    - Web UI 2.11.2
        * Fix moving of widgets
Comment 11 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-10-31 16:35:22 UTC
Take.
Comment 12 Yasuhiro Kimura freebsd_committer freebsd_triage 2021-10-31 17:41:28 UTC
(In reply to V from comment #10)

I tried your latest patch with poudriere and 13.0-RELEASE amd64 jail and unfortunately build failed as following.

https://www.utahime.org/FreeBSD/poudriere/data/logs/bulk/130amd64-committer/2021-11-01_02h19m39s/logs/airdcpp-webclient-2.11.2.log

According to it. build fails because network access failed at build stage. It happens because poudriere disables network access after fetch stage has completed. I don't know why network access is necessary. But anyway you need to change this port so network access is necessary only at fetch stage as official packages are build with poudriere.
Comment 13 V 2022-12-09 13:21:43 UTC
Created attachment 238658 [details]
airdcpp-webclient_2.11.3

(In reply to Yasuhiro Kimura from comment #12)
The reason for the network access requirement was because the web UI was fetched during the build process. I have disabled this and added the web UI as a separate port instead.

The airdcpp-webui port have a custom do-fetch in order to fetch the files with npm.

I hope I got it right this time. Tried to look into how to properly fetch the files several times the last year, but did not find a solution before now when a new version was released and I had another go at solving the problem.
Comment 14 V 2022-12-09 16:36:32 UTC
Created attachment 238666 [details]
airdcpp-webclient_2.11.3

minor changes to rc-file
Comment 15 V 2022-12-09 16:42:51 UTC
Created attachment 238667 [details]
airdcpp-webclient_2.11.3

Cleanup
Comment 16 V 2022-12-10 11:10:26 UTC
Created attachment 238687 [details]
airdcpp-webclient_2.11.3

Modified the Makefiles in order to more properly adress the dependencies.
Comment 17 Yasuhiro Kimura freebsd_committer freebsd_triage 2022-12-10 21:37:13 UTC
Feedback to latest patch:

* net-p2p/airdcpp-webui depends on net-p2p/airdcpp-webclient. On the other hand, net-p2p/airdcpp-webclient depends on net-p2p/airdcpp-webui when WEBUI option is on. And WEBUI option is on by default. As a result there is dependency loop between them and either of them can't be built.
* In net-p2p/airdcpp-webui/Makefile you specify RUN_DEPENDS as following.

----------------------------------------------------------------------
RUN_DEPENDS=    npm>=3:www/npm \
                airdcpp-webclient>=2:net-p2p/airdcpp-webclient \
                airdcpp-webclient<3:net-p2p/airdcpp-webclient  
----------------------------------------------------------------------

  Do you want to specify that version of airdcpp-webclient must be 2 or greater but less than 3? If so, use following sytax.
  
----------------------------------------------------------------------
RUN_DEPENDS=    npm>=3:www/npm \
                airdcpp-webclient>=2<3:net-p2p/airdcpp-webclient 
----------------------------------------------------------------------

* Both 'Created by:' line and '$FreeBSD$' tag are obsolete. So remove them.
* Recently rule is changed so 'WWW:' should be specified in Makefile instead of pkg-descr. So move it to the next of COMMENT in Makefile.
Comment 18 Yasuhiro Kimura freebsd_committer freebsd_triage 2022-12-10 21:55:19 UTC
(In reply to V from comment #13)

With following steps you can download distfile of web UI and install it without dividing one port into two,

1. Add www/npm to FETCH_DEPENDS.
2. Download distfile of web UI by using npm at 'post-fetch' target.
3. Install web UI at 'post-install' target.
Comment 19 V 2022-12-11 14:55:25 UTC
Created attachment 238709 [details]
airdcpp-webclient_2.11.3

(In reply to Yasuhiro Kimura from comment #18)
Thanks for the great feedback. I was thinking of doing that but had troubles to find out how I should add the second source in a good way. By adding it to pre-fetch I can download it before any other scripts is looking somewhere else. Please advise how I should do it. Should I use LOCAL as master site for the webui? It was still looking for files online on freebsd's servers.

At first I kept the webui as an optional install, but decided to include it since it's really not meant to be used without it.
Comment 20 V 2022-12-11 15:01:24 UTC
Created attachment 238710 [details]
airdcpp-webclient_2.11.3

Added wrong version of the file
Comment 21 V 2023-02-21 05:36:17 UTC
(In reply to Yasuhiro Kimura from comment #18)
There has been 2 months since my last update. Did I do something wrong or did life come in the way?
Comment 22 V 2023-05-23 15:16:08 UTC
Now it’s 6 months and nothing happened after initial feedback. This is to long and a waste of my time when asking me to make changes. Can we change who is assigned to this so something happens?