libs/faux, utils/klish3: add new packages#29192
libs/faux, utils/klish3: add new packages#29192dhrm1k wants to merge 2 commits intoopenwrt:masterfrom
Conversation
Add packaging for faux 2.2.1 as a dependency provider for klish3. ALso has libfaux and faux-utils, and stage headers/libs via Build/InstallDev. Signed-off-by: Dharmik Parmar <dharmikparmar2004@yahoo.com>
Add klish3 3.2.0 as a separate package from legacy klish (v2). Klish v3 has major architecture/runtime changes and is not a drop-in replacement. Added some example config/XML files and add stdio macro collision build fix patch. Signed-off-by: Dharmik Parmar <dharmikparmar2004@yahoo.com>
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"> |
| SECTION:=utils | ||
| CATEGORY:=Utilities | ||
| SUBMENU:=Shells | ||
| TITLE:=Kommand Line Interface SHell v3 |
There was a problem hiding this comment.
The title contains a capitalization typo: SHell should be Shell.
| TITLE:=Kommand Line Interface SHell v3 | |
| TITLE:=Kommand Line Interface Shell v3 |
| $(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. |
📦 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