Bug 249510 - [NEW PORT] sysutils/rkdeveloptool: Rkdeveloptool is a tool from Rockchip to communicate with Rockusb devices.
Summary: [NEW PORT] sysutils/rkdeveloptool: Rkdeveloptool is a tool from Rockchip to c...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-21 17:12 UTC by Martin Filla
Modified: 2020-09-24 22:29 UTC (History)
2 users (show)

See Also:


Attachments
rkdeveloptool.shar (1.29 KB, text/plain)
2020-09-21 17:12 UTC, Martin Filla
no flags Details
rkdeveloptool.shar (1.45 KB, text/plain)
2020-09-21 17:33 UTC, Martin Filla
no flags Details
rkdeveloptool.shar (1.45 KB, text/plain)
2020-09-21 18:37 UTC, Martin Filla
no flags Details
rkdeveloptool.shar (1.45 KB, text/plain)
2020-09-21 18:39 UTC, Martin Filla
no flags Details
Alternative patch for rkdeveloptool (2.96 KB, patch)
2020-09-22 01:52 UTC, daniel.engberg.lists
no flags Details | Diff
rkdeveloptool.shar (2.04 KB, text/plain)
2020-09-22 08:48 UTC, Martin Filla
no flags Details
rkdeveloptool.shar (2.05 KB, text/plain)
2020-09-22 08:50 UTC, Martin Filla
no flags Details
rkdeveloptool.shar (2.06 KB, text/plain)
2020-09-22 20:46 UTC, Martin Filla
no flags Details
rkdeveloptool.shar (2.06 KB, text/plain)
2020-09-23 08:21 UTC, Martin Filla
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Filla 2020-09-21 17:12:34 UTC
Created attachment 218149 [details]
rkdeveloptool.shar

hi,
this new port rkdeveloptool for rockchip.
M.
Comment 1 Martin Filla 2020-09-21 17:33:06 UTC
Created attachment 218151 [details]
rkdeveloptool.shar
Comment 2 Li-Wen Hsu freebsd_committer 2020-09-21 17:58:00 UTC
Configure error in poudriere: https://gist.github.com/088538e8cd5c2ffc11dfda53689ce284
Comment 3 Martin Filla 2020-09-21 18:37:08 UTC
Created attachment 218153 [details]
rkdeveloptool.shar
Comment 4 Martin Filla 2020-09-21 18:39:32 UTC
Created attachment 218154 [details]
rkdeveloptool.shar
Comment 5 daniel.engberg.lists 2020-09-21 22:55:17 UTC
Hi,

What's the pre-configure stuff for? Compiles fine without pre-configure and also without gmake in USES=.
I don't see any reference of pkgconf(ig) being used so you can also remove that from USES=.

Compile tested on FreeBSD 13.0-CURRENT #0 r364979 (AMD64)

I think you should also refrain from referring to speculations in pkg-descr

"consider to be a opensource version of upgrade_tool with very little difference." --> This is an open source alternative to upgrade_tool with some minor differences in functionality.

Best regards,
Daniel
Comment 6 daniel.engberg.lists 2020-09-22 01:52:50 UTC
Created attachment 218166 [details]
Alternative patch for rkdeveloptool

The tool itself identifies itself as version 1.3 so keep that version for the package and use the date of the last commit in upstream repo.
This is also how OpenMandriva handles version number for this project.

Drop iconv dependency (needs patch), nothing in the code uses iconv.
https://github.com/rockchip-linux/rkdeveloptool/blob/master/main.cpp#L146

Remove gmake dependency, not needed

Remove pre-configure, not needed

Rephrase descriptions

Tested on FreeBSD 13.0-CURRENT #0 r358620 (AMD64) (rkdeveloptool -v  and -h)
Poudriere testport OK 12.1-RELEASE (amd64)
Comment 7 daniel.engberg.lists 2020-09-22 02:00:57 UTC
A few notes:

pkgconfig is used for libusb detection, not for the project itself (my bad, sorry).

This should probably go into sysutils rather than devel? At least that's how NetBSD categorizes it and that's also where you'll find flashrom and similar utils.

I'm don't know the reason behind it but the program automatically createa a log directory with a log each time being run. Like the one below, this needs to be changed. (rkdeveloptool -v)

log/log2020-09-22.txt
03:57:06        Error: failed to stat config.ini, err=2
Comment 8 Martin Filla 2020-09-22 08:21:23 UTC
(In reply to daniel.engberg.lists from comment #5)

Preconfigure is according to readme. You must sometime documentation from vendor :-)
Comment 9 Martin Filla 2020-09-22 08:48:19 UTC
Created attachment 218170 [details]
rkdeveloptool.shar

New shar file with patch.
Comment 10 Martin Filla 2020-09-22 08:48:57 UTC
(In reply to daniel.engberg.lists from comment #6)

I added new shar file with fixes.
Comment 11 Martin Filla 2020-09-22 08:50:26 UTC
Created attachment 218171 [details]
rkdeveloptool.shar
Comment 12 daniel.engberg.lists 2020-09-22 11:34:49 UTC
DISTVERSION is wrong

https://www.freebsd.org/doc/en/books/porters-handbook/makefile-distfiles.html --> Example 5.11

If you insist on using gXXXXX versioning please patch the code accordingly although I don't think it's a good idea to diverge from upstream in that regard.
Comment 13 Martin Filla 2020-09-22 20:31:38 UTC
(In reply to daniel.engberg.lists from comment #12)
I used example 5.13. Using USE_GITHUB When Upstream Does Not Use Version
Comment 14 Martin Filla 2020-09-22 20:46:37 UTC
Created attachment 218191 [details]
rkdeveloptool.shar

I updated shar file according to last comment.
Comment 15 daniel.engberg.lists 2020-09-23 05:46:09 UTC
You still have the incorrect date if you follow the tip (which I would recommend that you do) in the example.

"20140411 is the date of the commit referenced in GH_TAGNAME, not the date the Makefile is edited, or the date the commit is made." - in the example

https://github.com/rockchip-linux/rkdeveloptool/commit/1e890c4fcfca3a91cb4fb7a7b107b050aceeda17 -->  "31 Aug 2020, 08:24 CEST" --> 1.3.20200831

The binary still needs to be fixed so it doesn't create directories when being run imho before getting committed.
Comment 16 Martin Filla 2020-09-23 08:21:54 UTC
Created attachment 218207 [details]
rkdeveloptool.shar