Summary: | [NEW PORT] devel/kconfig-frontends | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Tomasz "CeDeROM" CEDRO <tomek> |
Component: | Individual Port(s) | Assignee: | Yasuhiro Kimura <yasu> |
Status: | Closed FIXED | ||
Severity: | Affects Some People | CC: | diizzy, hondareyte.luc, loader, pi, yasu |
Priority: | --- | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any | ||
Attachments: |
Created attachment 228820 [details]
new port shar (v2)
1. Added missing gperf dependency.
2. Simplified GTK and QT dependencies.
Created attachment 228821 [details]
new port shar (v3)
* Needs verification on a clean system.
* Updated GTK dependencies.
Created attachment 228823 [details]
new port shar (v4)
Also verified Qt build on a clean system + dependencies update.
Ready for testing :-)
Hey Yasu could you please also take a look at this one? :-) (In reply to Tomasz "CeDeROM" CEDRO from comment #4) Some comments about attachment 228823 [details]. 1. Use DISTVERSION rather than PORTVERSION when the version only contains numbers separated by dots, dashes or underscores (ref. section 5.2.2 of Porter's Handbook). 2. 'Created by' header in Makefile is obsolete. 3. There is an empty line at the end of pkg-plist. 4. Before submitting new port or patch to update existing port, please check it with portlint, portclippy and portfmt as is explained in section 10.2 and 10.3 of Porter's Handbook. For example, my 3rd comment is detected by portlint. Thank you Yasu :-) Portlint did not report any issues. I have applied your remarks. Portlint does not show issues too: root@hexagon:/usr/ports/devel/kconfig-frontends # portlint looks fine. Created attachment 231042 [details]
version 20220116 with Yasu remarks implemented
(In reply to Tomasz "CeDeROM" CEDRO from comment #6) As is written in section 10.3 of Porter's Handbook, use `portlint -A` for a new port and `portlint -C` for for an existing one. root@hexagon:/usr/ports/devel/kconfig-frontends # portlint -A WARN: Consider to set DEVELOPER=yes in /etc/make.conf 0 fatal errors and 1 warning found. root@hexagon:/usr/ports/devel/kconfig-frontends # portlint -C WARN: Consider to set DEVELOPER=yes in /etc/make.conf 0 fatal errors and 1 warning found. root@hexagon:/usr/ports/devel/kconfig-frontends # echo DEVELOPER=yes >> /etc/make.conf root@hexagon:/usr/ports/devel/kconfig-frontends # portlint -C looks fine. root@hexagon:/usr/ports/devel/kconfig-frontends # portlint -A looks fine. root@hexagon:/usr/ports/devel/kconfig-frontends # make /!\ kconfig-frontends-4.11.0.1: Makefile errors /!\ PORTDOCS does not do anything unless the DOCS option is present. *** Error code 1 Stop. make[1]: stopped in /usr/ports/devel/kconfig-frontends *** Error code 1 Stop. :-) Comments about attachment 231042 [details] * 'USES=tar.bz2' sets EXTRACT_SUFFIX to '.tar.bz2'. So 'EXTRACT_SUFFIX=.tar.bz2' in Makefile is unnecessary. * Add DOCS option as you wrote in comment #10. * Check Makefile with portclippy and portfmt. Created attachment 231105 [details]
make.conf:DEVELOPER=yes Q/A hints applied
root@hexagon:/usr/ports/devel/kconfig-frontends # portlint -A
looks fine.
root@hexagon:/usr/ports/devel/kconfig-frontends # portlint -C
looks fine.
I have applied all hints from Q/A after make with DEVELOPER=yes enabled in /etc/make.conf. This new DEVELOPER feature is really nice and helpful! :-)
The only thing I cannot guess is DOCS part for some reason auto pkg-static wants to take files from ${DOCSDIR}/docs/ not from the ${DOCSDIR} because some of the documentation is placed in the source tree under docs/. Please help :-)
root@hexagon:/usr/ports/devel/kconfig-frontends # make
(..)
====> Compressing man pages (compress-man)
====> Running Q/A tests (stage-qa)
root@hexagon:/usr/ports/devel/kconfig-frontends # make package
===> Building package for kconfig-frontends-4.11.0.1
pkg-static: Unable to access file /usr/ports/devel/kconfig-frontends/work/stage/usr/local/share/doc/kconfig-frontends/docs/kconfig.txt:No such file or directory
pkg-static: Unable to access file /usr/ports/devel/kconfig-frontends/work/stage/usr/local/share/doc/kconfig-frontends/docs/kconfig-language.txt:No such file or directory
*** Error code 1
Stop.
make[1]: stopped in /usr/ports/devel/kconfig-frontends
*** Error code 1
Stop.
make: stopped in /usr/ports/devel/kconfig-frontends
Created attachment 231106 [details]
processed by portclippy and portfmt
The only thing left seems to be PORTDOCS? Please help :-)
(In reply to Tomasz "CeDeROM" CEDRO from comment #13) If you set 'PORTDOCS=docs/kconfig-language.txt', it means '%%DOCSDIR%%/docs/kconfig-language.txt'. However, post-install target installs kconfig-language.txt under ${STAGEDIR}${DOCSDIR}. Then check-plist error happens. You should set PORTDOCS as following. PORTDOCS= AUTHORS COPYING README kconfig-language.txt kconfig.txt In addition to it, there are 2 points. * Use 'post-install-DOCS-on' instead of 'post-install' to install files listed in PORTDOCS as they should be installed only when DOCS option is enabled. * In general, targets should be placed after variable assignments in Makefile. Created attachment 231254 [details]
fixed docs in package problem
1. The solution to various docs is to define DOCS and then using them as PORTDOCS=${DOCS:T}, as well as using the `do-install-DOCS-on` target, as described in [1]. This solution really should be presented in Porter's Handbook.
2. portfmt and clippy done.
4. portlint -A all looks fine.
Take. Let me check one point. Does this port works fine even if all frontend options are disabled? Build fails if either GCONF or QCONF option is enabled. https://people.freebsd.org/~yasu/poudriere/data/logs/bulk/130amd64-committer-kconfig-frontends/2022-01-25_04h08m42s/logs/kconfig-frontends-4.11.0.1.log https://people.freebsd.org/~yasu/poudriere/data/logs/bulk/130amd64-committer-kconfig-frontends/2022-01-25_04h09m31s/logs/kconfig-frontends-4.11.0.1.log Thank you Yasu for your time and patience :-) Builds fine for me with all options selected.. QA and portlint does not complain.. probably some dependencies missing? Will try to build on a fresh VM to verify.. also none options selected as requested :-) Any additional hints welcome :-) When no option selected these binaries are built: kconfig kconfig-conf kconfig-diff kconfig-merge kconfig-tweak Hi, For your convenience, I have a working port for kconfig-frontends here: https://github.com/lhondareyte/ports/tree/master/kconfig-frontends I never dared to submit it since it's Linux centric :). But like CeDeRom, I use it to build NuttX. Hey Luc :-) It also works for me with no problem. We just need to tune some stuff to make it fully ports compliant and safe to install on FreeBSD. Then we could just install it with `pkg install kconfig-frontends`. If you have some spare time and could help here that would be great! :-) Yes, the kconfig-package project is abandoned, but it is also critical dependency for NuttX. There was a long discussion on this subject on the dev list. When NuttX becomes fully Apache compliant (it is in Incubation mode now) we will host new official repo for the kconfig-frontends project as part of NuttX. Note there is a fork for Debian, and Espressif has its own fork but it has diverged a lot from the origin towards IDF. Original author does not respond so putting it as part of NuttX seems most reasonable, then probably include patches from Debian and Espressif IDF. There is also a version of kconfig using Python but that was considered unwanted additional dependency in NuttX so decision is to stay with kconfig-frontends. My board configuration patches are in NuttX upstream, 10.3 is just coming out, it will configure out-of-the box on FreeBSD! Please take a looks and verify, if that works please give +1 on the dev list in the release voting process :-) Thanks! :-) Tomek ps/2: Some RISC-V compiler stuff still needs to be adjusted for NuttX in order to work with FreeBSD packages. Do you play with these cores (i.e. ESP32-C3) and would like to play? Created attachment 236546 [details] New port with only terminal interface. I have removed the GCONF and QCONF options as they cause build problems, pulls lots of dependencies, while mostly only ncurses interface is used anyway. In a free moment we may add GTK/QT interface if necessary. Mostly important is to have this port as mandatory dependency for NuttX RTOS development on FreeBSD. Updated SHAR is attached. I have also testes GitHub pull request: https://github.com/freebsd/freebsd-ports/pull/131 (In reply to Tomasz "CeDeROM" CEDRO from comment #23) Two feedbacks for attachment 236546 [details]. * `portfmt Makefile| diff -u Makefile -` gets following result. -------------------------------------------------------------------- --- Makefile 2022-09-15 18:17:53.481485000 +0900 +++ - 2022-09-15 19:20:12.595552000 +0900 @@ -12,7 +12,8 @@ USES= gmake gperf libtool python shebangfix tar:bz2 SHEBANG_FILES= utils/kconfig-diff utils/kconfig-tweak.in GNU_CONFIGURE= yes -CONFIGURE_ARGS= --disable-gconf --disable-qconf +CONFIGURE_ARGS= --disable-gconf \ + --disable-qconf INSTALL_TARGET= install-strip DOCS= AUTHORS COPYING README docs/kconfig-language.txt \ docs/kconfig.txt -------------------------------------------------------------------- * Isn't "https://bitbucket.org/nuttx/tools/src/master/kconfig-frontends/" better than "https://bitbucket.org/nuttx/tools/downloads/" as the value of WWW? There's no point making new and traditional interfaces an option if you can have both using the same dependency. Remove options and depend on ncurses from the start. I think in general that we should avoid doing cd and use direct paths instead. See https://bugs.freebsd.org/bugzilla/attachment.cgi?id=236575 at the end. Best regards, Daniel Created attachment 236615 [details] Only ncurses frontend as default, no options. Only ncurses frontend is enabled by default, no options. Also updated https://github.com/freebsd/freebsd-ports/pull/131 Created attachment 236616 [details] Only ncurses frontend, no options, no cd in post-install. Also updated https://github.com/freebsd/freebsd-ports/pull/131. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=8c1a20b75018df72c4a5bd36c5eef2466ccf268e commit 8c1a20b75018df72c4a5bd36c5eef2466ccf268e Author: Tomek CEDRO <tomek@cedro.info> AuthorDate: 2022-10-03 07:19:29 +0000 Commit: Kurt Jaeger <pi@FreeBSD.org> CommitDate: 2022-10-03 07:19:29 +0000 devel/kconfig-frontends: Kconfig files parser and frontend Kconfig frontends and parser. Port created for NuttX RTOS development. Kconfig is the configuration language used by the Linux kernel. This package is a simple copy of the frontends and the parser found in the Linux kernel source tree, with very minor changes to adapt them to being built out of the kernel build infrastructure. Kconfig is also used in embedded development. This program has currently no upstream maintainer. NuttX copy is used. There are two forks: Debian based on 4.11, Espressif based on version 4.6. PR: 259256 devel/Makefile | 1 + devel/kconfig-frontends/Makefile (new) | 27 ++++++++++++++++++++++ devel/kconfig-frontends/distinfo (new) | 3 +++ .../files/patch-libs_parser_hconf.c (new) | 11 +++++++++ devel/kconfig-frontends/pkg-descr (new) | 7 ++++++ devel/kconfig-frontends/pkg-plist (new) | 19 +++++++++++++++ 6 files changed, 68 insertions(+) Committed, thanks. TANK U PI !! :-) |
Created attachment 228817 [details] new port shar Hello world :-) Here goes the new port for devel/kconfig-frontends, a Kconfig file parser, created for NuttX RTOS (core dependency) development on FreeBSD. Please verify if all is fine :-) Tomek