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: Closed Overcome By Events
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: 2024-06-23 11:17 UTC (History)
1 user (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
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
rkdeveloptool.shar (1.36 KB, text/plain)
2022-10-02 11:44 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 freebsd_triage 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 freebsd_committer freebsd_triage 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 freebsd_committer freebsd_triage 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 freebsd_committer freebsd_triage 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 freebsd_committer freebsd_triage 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 freebsd_committer freebsd_triage 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
Comment 17 Martin Filla 2022-10-02 11:44:24 UTC
Created attachment 237001 [details]
rkdeveloptool.shar

Hi,
update to v1.32
I tested in poudriere 

====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
=>> Checking for staging violations... done
=======================<phase: package        >============================
===>  Building package for rkdeveloptool-1.32
===========================================================================
=>> Recording filesystem state for preinst... done
=======================<phase: install        >============================
===>  Installing for rkdeveloptool-1.32
===>  Checking if rkdeveloptool is already installed
===>   Registering installation for rkdeveloptool-1.32
[freebsd13x64-default] Installing rkdeveloptool-1.32...
===========================================================================
=>> Checking shared library dependencies
 0x0000000000000001 NEEDED               Shared library: [libc++.so.1]
 0x0000000000000001 NEEDED               Shared library: [libc.so.7]
 0x0000000000000001 NEEDED               Shared library: [libcxxrt.so.1]
 0x0000000000000001 NEEDED               Shared library: [libgcc_s.so.1]
 0x0000000000000001 NEEDED               Shared library: [libm.so.5]
 0x0000000000000001 NEEDED               Shared library: [libusb.so.3]
=======================<phase: deinstall      >============================
===>  Deinstalling for rkdeveloptool
===>   Deinstalling rkdeveloptool-1.32
Updating database digests format: .......... done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	rkdeveloptool: 1.32

Number of packages to be removed: 1
[freebsd13x64-default] [1/1] Deinstalling rkdeveloptool-1.32...
[freebsd13x64-default] [1/1] Deleting files for rkdeveloptool-1.32: .... done
===========================================================================
=>> Checking for extra files and directories
[00:00:39] Installing from package
[freebsd13x64-default] Installing rkdeveloptool-1.32...
[freebsd13x64-default] Extracting rkdeveloptool-1.32: .... done