Skip to content

libs/faux, utils/klish3: add new packages#29192

Open
dhrm1k wants to merge 2 commits intoopenwrt:masterfrom
dhrm1k:klish3-faux-master
Open

libs/faux, utils/klish3: add new packages#29192
dhrm1k wants to merge 2 commits intoopenwrt:masterfrom
dhrm1k:klish3-faux-master

Conversation

@dhrm1k
Copy link
Copy Markdown

@dhrm1k dhrm1k commented Apr 19, 2026

📦 Package Details

Maintainer: : N/A (new packages in this PR)
Description:

This PR adds 2 new packages:

  • libs/faux:

    • libfaux shared library
    • faux-utils helper tools
    • Build/InstallDev support so dependent packages can compile against faux headers/libs
  • utils/klish3:

    • adds Klish v3 (klish, klishd) as a separate package from legacy klish (v2)
    • has OpenWrt default runtime files under /etc/klish
    • installs XML schema under /usr/share/klish/klish.xsd
    • includes one build-fix patch for stdio macro collision (stdin/stdout/stderr) with OpenWrt toolchain

klish3 is intentionally packaged separately because v3 has major architecture/runtime differences and is not a drop-in replacement for klish (v2).


🧪 Run Testing Details

  • OpenWrt Version: 24.10.4
  • OpenWrt Target/Subtarget: x86/64
  • OpenWrt Device: Generic x86_64 VM

Built IPKs:

  • libfaux_2.2.1-r1_x86_64.ipk
  • faux-utils_2.2.1-r1_x86_64.ipk
  • klish3_3.2.0-r1_x86_64.ipk

Basic runtime check on VM:

  • klishd starts
  • klish starts and reads XML config from /etc/klish/xml

✅ Formalities

  • I have reviewed the CONTRIBUTING.md file for detailed contributing guidelines.

If your PR contains a patch:

  • It can be applied using git am
  • It has been refreshed to avoid offsets, fuzzes, etc., using
    make package/feeds/packages/klish3/refresh V=s

dhrm1k added 2 commits April 19, 2026 18:09
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>
@BKPepe BKPepe requested a review from Copilot April 21, 2026 20:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/faux package with libfaux, faux-utils, and Build/InstallDev for headers/libs.
  • Introduces utils/klish3 package with runtime configs under /etc/klish and installs klish.xsd under /usr/share/klish/.
  • Adds a patch to fix stdin/stdout/stderr macro 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">
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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\".

Suggested change
xsi:schemaLocation="https://src.libcode.org/pkun/klish/src/master/klish.xsd">
xsi:schemaLocation="https://klish.libcode.org/klish3 /usr/share/klish/klish.xsd">

Copilot uses AI. Check for mistakes.
Comment thread utils/klish3/Makefile
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Shells
TITLE:=Kommand Line Interface SHell v3
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title contains a capitalization typo: SHell should be Shell.

Suggested change
TITLE:=Kommand Line Interface SHell v3
TITLE:=Kommand Line Interface Shell v3

Copilot uses AI. Check for mistakes.
Comment thread utils/klish3/Makefile
Comment on lines +62 to +68
$(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/
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines +42 to +43
echo ""
ls ""
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
echo ""
ls ""
echo "${path}"
ls "${path}"

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +5
# 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.
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
# 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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants