libs/faux, utils/klish3: add new packages#29192
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds new OpenWrt packages for libfaux (library + utils) and klish3 (Klish v3 client/daemon), including default runtime configuration and a build patch to address stdio macro collisions.
Changes:
- Introduces
libs/fauxpackage withlibfaux,faux-utils, andBuild/InstallDevfor headers/libs. - Introduces
utils/klish3package with runtime configs under/etc/klishand installsklish.xsdunder/usr/share/klish/. - Adds a patch to fix
stdin/stdout/stderrmacro collisions with the OpenWrt toolchain.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/klish3/patches/100-fix-stdio-macro-collision.patch | Undefines stdin/stdout/stderr macros to avoid collisions during build. |
| utils/klish3/files/etc/klish/xml/example.xml | Adds a default example KLISH XML configuration loaded by default. |
| utils/klish3/files/etc/klish/klishd.conf | Adds default klishd configuration pointing to /etc/klish/xml/. |
| utils/klish3/files/etc/klish/klish.conf | Adds default client config (pager defaults). |
| utils/klish3/Makefile | New klish3 package recipe, installs binaries, shared libs, config, and XSD. |
| libs/faux/Makefile | New libfaux and faux-utils package recipes including InstallDev. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <KLISH | ||
| xmlns="https://klish.libcode.org/klish3" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="https://src.libcode.org/pkun/klish/src/master/klish.xsd"> |
There was a problem hiding this comment.
xsi:schemaLocation must contain pairs of (namespaceURI, schemaLocation). As written it only provides a single URI, which is invalid and can break schema-aware tooling. Fix by providing both the namespace (xmlns) and a schema location (ideally pointing to the locally installed /usr/share/klish/klish.xsd, or a stable URL), e.g. xsi:schemaLocation=\"https://klish.libcode.org/klish3 /usr/share/klish/klish.xsd\".
| xsi:schemaLocation="https://src.libcode.org/pkun/klish/src/master/klish.xsd"> | |
| xsi:schemaLocation="https://klish.libcode.org/klish3 /usr/share/klish/klish.xsd"> |
| $(INSTALL_DIR) $(1)/usr/lib | ||
| $(CP) $(PKG_INSTALL_DIR)/usr/lib/libklish.so* $(1)/usr/lib/ | ||
| $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtinyrl.so* $(1)/usr/lib/ | ||
| $(CP) $(PKG_INSTALL_DIR)/usr/lib/libklish-db-ischeme.so* $(1)/usr/lib/ | ||
| $(CP) $(PKG_INSTALL_DIR)/usr/lib/libklish-db-libxml2.so* $(1)/usr/lib/ | ||
| $(CP) $(PKG_INSTALL_DIR)/usr/lib/libklish-plugin-klish.so* $(1)/usr/lib/ | ||
| $(CP) $(PKG_INSTALL_DIR)/usr/lib/libklish-plugin-script.so* $(1)/usr/lib/ |
There was a problem hiding this comment.
klish3 currently ships multiple shared libraries/plugins in the main utilities package. In OpenWrt packaging, shared libs are typically split into dedicated lib* packages (e.g., libklish3, potentially libtinyrl3, and plugin subpackages) so other packages can depend on them without pulling in the CLI/daemon, and to reduce image footprint. Consider introducing separate library/plugin packages and having Package/klish3 depend on them.
| echo "" | ||
| ls "" |
There was a problem hiding this comment.
The ls command declares a path parameter but the script ignores it (ls \"\"). This makes the example misleading. Either use the parameter in the script (per klish variable substitution rules) or remove the unused <PARAM> to keep the example coherent.
| echo "" | |
| ls "" | |
| echo "${path}" | |
| ls "${path}" |
| # Template for config file /etc/klish/klishd.conf. It's used by klishd daemon. | ||
|
|
||
| # The klishd uses UNIX domain socket to receive connections. It will create an | ||
| # filesystem entry to allow clients to find connection point. By default klishd | ||
| # uses /tmp/klish-unix-socket path. |
There was a problem hiding this comment.
Minor grammar issues in comments reduce clarity (e.g., It's used by klishd daemon and The klishd uses UNIX domain socket). Consider adjusting to It is used by the klishd daemon and klishd uses a UNIX domain socket.
| # Template for config file /etc/klish/klishd.conf. It's used by klishd daemon. | |
| # The klishd uses UNIX domain socket to receive connections. It will create an | |
| # filesystem entry to allow clients to find connection point. By default klishd | |
| # uses /tmp/klish-unix-socket path. | |
| # Template for config file /etc/klish/klishd.conf. It is used by the klishd daemon. | |
| # klishd uses a UNIX domain socket to receive connections. It will create a | |
| # filesystem entry to allow clients to find the connection point. By default, | |
| # klishd uses the /tmp/klish-unix-socket path. |
|
I have addressed the feedback in the latest push:
I also rebuilt the packages and tested installation/runtime on an x86/64 OpenWrt VM. Happy to adjust further if you prefer a different package split or naming. |
|
That last klish3 commit should be squashed with the previous one. |
|
Yes, sorry for that. I have squashed the latest commit with the previous one. |
dda95ba to
5a3ccfc
Compare
|
I changed the source fetching for both Posted an updated version of the PR. I squashed the these new changes into the original previous commit as well. |
|
how does this look now? |
5d1f57c to
86178af
Compare
|
The CI checks are passing now. I refreshed the patch into the expected openwrt format and fixed the commit |
|
@GeorgeSapkin Gentle ping on this. The branch has been rebased and CI is passing. Could a reviewer take another look when convenient? |
|
Last two klish commits should be squashed and CI issues 1 addressed. Check other projects that add version check overrides (i.e. Footnotes |
Add packaging for faux 2.2.1 as a dependency provider for klish3. Package libfaux and faux-utils, and stage headers and libraries via Build/InstallDev. Signed-off-by: Dharmik Parmar <dharmikparmar2004@yahoo.com>
86178af to
1a9af71
Compare
Thanks, that makes sense. I squashed the two klish3 commits into a single commit, keeping the I also added a test-version.sh override for klish3. The klish client does not The override now explicitly handles the |
1a9af71 to
6f2c8ac
Compare
Add klish3 3.2.0 as a separate package from legacy klish v2. Klish v3 has major architecture and runtime changes. It is not a drop-in replacement. Package the binaries, shared libraries, database backends, and plugins. Install default config under /etc/klish and the XML schema under /usr/share/klish. Also add a build-fix patch for the stdio macro collision with the OpenWrt toolchain. Add a minimal test-version.sh override because klish does not expose the package release version. Its help output reports 'Version : 1.0.0', while this package tracks upstream release 3.2.0. Signed-off-by: Dharmik Parmar <dharmikparmar2004@yahoo.com>
6f2c8ac to
d46d5b3
Compare
📦 Package Details
Maintainer: : N/A (new packages in this PR)
Description:
This PR adds 2 new packages:
libs/faux:libfauxshared libraryfaux-utilshelper toolsBuild/InstallDevsupport so dependent packages can compile against faux headers/libsutils/klish3:klish,klishd) as a separate package from legacyklish(v2)/etc/klish/usr/share/klish/klish.xsdstdin/stdout/stderr) with OpenWrt toolchainklish3is intentionally packaged separately because v3 has major architecture/runtime differences and is not a drop-in replacement forklish(v2).🧪 Run Testing Details
Built IPKs:
libfaux_2.2.1-r1_x86_64.ipkfaux-utils_2.2.1-r1_x86_64.ipkklish3_3.2.0-r1_x86_64.ipkBasic runtime check on VM:
klishdstartsklishstarts and reads XML config from/etc/klish/xml✅ Formalities
If your PR contains a patch:
git am