Skip to content

Agent only build9 -test - #2

Closed
Fantu wants to merge 5 commits into
mainfrom
agent-only-build9
Closed

Agent only build9 -test#2
Fantu wants to merge 5 commits into
mainfrom
agent-only-build9

Conversation

@Fantu

@Fantu Fantu commented Jun 9, 2026

Copy link
Copy Markdown
Owner

No description provided.

Fantu added 5 commits June 6, 2026 21:12
Native packaging that builds a stripped-down, agent-only NSClient++ for
Linux: no web frontend/HTTP server and no bundled documentation. It runs
checks locally and exposes them over NRPE/NSCA/check_mk (and can
actively submit results to a central server).

This squashes the iterative packaging history into a single commit (the
per-file/per-step commits were getting too many); later packaging
changes go on top as separate commits. The mixed CMakeLists.txt +
debian/rules change for the private libdir is kept as its own commit and
cherry-picked after this one, so this commit touches debian/ only.

debian/control: source-only "nscp" package (Multi-Arch: foreign,
Rules-Requires-Root: no, Standards-Version 4.7.3) with the agent-only
Build-Depends: cmake, pkgconf, libssl-dev, libboost-all-dev,
libprotobuf-dev, protobuf-compiler, liblua5.4-dev, libtinyxml2-dev,
libffi-dev, python3-dev, python3-protobuf, python3-jinja2,
libdbus-1-dev, libzip-dev, libcrypto++-dev, libgtest-dev, libgmock-dev,
dh-sequence-installsysusers.

debian/rules (dh, debhelper-compat 13): agent-only configure
(-DBUILD_MODULE_WEBServer=OFF to drop the whole web layer,
-DNSCP_BUILD_TESTS=ON, -DNSCP_BOOST_PYTHON_VERSION derived from the
default python3, -DCHECK_NSCLIENT_MISSING=ON), full hardening
(hardening=+all), and the upstream test suite run with
--output-on-failure. BUILD_MODULE_WEBServer matches the new "cmake:
allow disabling the web layer via BUILD_MODULE_WEBServer" patch in this
branch (build6 used the older downstream -DBUILD_WEBSERVER=OFF).

debian/ runtime bits: ship our own systemd unit (PID in /run, since the
bundled one writes its PID under read-only /usr), provision the system
user via dh-sequence-installsysusers + debian/nscp.sysusers, plus log
rotation (debian/nscp.logrotate) and postrm cleanup.

debian/copyright: Files:* default with explicit exceptions, reflecting
the upstream license harmonization; debian/TODO tracks the repack
candidates still to resolve.

Refs mickem#1278

Assisted-by: Claude Code (Opus 4.8)
Signed-off-by: Fabio Fantoni <fantonifabio@tiscali.it>
Keep the source package as nscp but ship the binary package as nsclient,
matching the service (nsclient.service), the system user (nsclient) and
the upstream project name (NSClient++); nscp stays the program/binary
name (/usr/sbin/nscp).

Rename the per-package maintainer files accordingly
(debian/nscp.{postrm,sysusers,logrotate} -> debian/nsclient.*) so
debhelper keeps auto-installing them by package name, and point the
staging paths in debian/rules at debian/nsclient/.

As a side effect debian/nsclient.service now matches dh_installsystemd's
debian/<package>.service convention, so debhelper installs it (over the
upstream unit, same path) and wires up enable/start; drop the
now-redundant manual install in execute_after_dh_auto_install, keeping
only the /var placeholder cleanup.

Verified by a binary build in a sid chroot: the package builds as
nsclient_*.deb, ships a single nsclient.service (the Debian one, with
the PID in /run), and the maintainer scripts carry the sysusers,
logrotate and systemd enable/start snippets.

Assisted-by: Claude Code (Opus 4.8)
Signed-off-by: Fabio Fantoni <fantonifabio@tiscali.it>
Build the upstream MkDocs manual into a separate Architecture: all
package, nsclient-doc, and have nsclient Suggest it. The manual covers
every module - including the Windows-only ones absent from the
agent-only nsclient build - because it is built from the committed
documentation sources rather than by introspecting the running binary.

Use the mkdocs debhelper sequence via dh-sequence-mkdocs, kept in
Build-Depends-Indep so the addon is inactive in architecture-only builds
(where it would otherwise abort on the missing manual). dh_mkdocs
--theme-package mkdocs-material replaces the bundled mkdocs-material and
lunr assets with symlinks into the mkdocs-material package and fills in
${mkdocs:Depends}, so the package embeds no JavaScript/CSS copies (and
needs no copyright stanzas for them). The material theme's Google Fonts
are disabled (font: false, injected into a build-time copy of mkdocs.yml
so docs/mkdocs.yml stays untouched for upstreaming) to avoid a privacy
breach.

With two binary packages dh_auto_install now stages the CMake install
into debian/tmp, so add debian/nsclient.install to move it into nsclient
and drop the /var placeholder there. The empty override_dh_mkdocs-arch
keeps a full build's binary-arch pass from aborting.

Verified by a full binary build in a sid chroot: nsclient is unchanged;
nsclient-doc ships 88 HTML pages with 43 theme assets symlinked to
mkdocs-material, Depends: mkdocs-material (>= 9.6.4-1), no Google Fonts,
and is lintian-clean apart from the pre-existing changelog/README
skeleton tags shared with nsclient.

Assisted-by: Claude Code (Opus 4.8)
Signed-off-by: Fabio Fantoni <fantonifabio@tiscali.it>
…stream

The upstream "custom install prefix on Linux builds" change moves the
systemd
unit it installs to an absolute /lib/systemd/system
(NSCP_SYSTEMD_UNITDIR) and
keeps staging a /var/log/nsclient/nsclient.log placeholder. Neither is
captured
by the etc/usr globs in debian/nsclient.install, so dh_missing aborts
the build
on them.

We ship neither: dh_installsystemd installs our own
debian/nsclient.service
(PID in /run, systemd-managed RuntimeDirectory/LogsDirectory) to
/usr/lib/systemd/system, and the log directory is created at runtime by
the
unit's LogsDirectory with the correct ownership. List both staged files
in
debian/not-installed so dh_missing treats the omission as intentional -
the
idiomatic replacement for the previous "rm -rf debian/tmp/var" in
d/rules,
which no longer covered the relocated unit.

Verified in a sid chroot: the nsclient package ships our /run unit at
/usr/lib/systemd/system/nsclient.service, and its contents and full
lintian
tag set are identical to the previous packaging (agent-only-build8) save
for
the intended upstream changes - private libs now unversioned (no
SOVERSION)
and the new CheckDisk module.

Assisted-by: Claude Code (Opus 4.8)
Signed-off-by: Fabio Fantoni <fantonifabio@tiscali.it>
@Fantu Fantu closed this Jul 4, 2026
Fantu added a commit that referenced this pull request Jul 6, 2026
…ation

Upstream 0.14.1 completed the license migration: every source file
carries an SPDX Apache-2.0 OR GPL-2.0-only header (936 files, verified
tree-wide), REUSE.toml declares the same copyright and dual license as
project-wide fallback for headerless files (docs, images, packaging
templates, lockfiles), and LICENSES/ ships the referenced license texts.
Rework debian/copyright accordingly:

- flip the Files: * default from LGPL-2.1+ to Apache-2.0 or GPL-2 and
drop the stanzas that now converge onto it: nscapi (relicensed from the
old NSClient++ Authors Apache-2.0 headers), own test sources, Windows
resource files, AssemblyInfo metadata, packaging templates
(chocolatey/winget/scoop), base64, clr_scoped_ptr, mongoose-cpp
non-derived files and the npm lockfiles.
- drop the UNKNOWN/FIXME stanza for the binary assets
(PNG/BMP/PSD/VSDX): the REUSE.toml fallback annotation now provides the
missing upstream declaration (Medin, dual license).
- add the previously missing stanza for include/simpleini/simpleini.h
(Brodie Thiesfield, 2006-2008, Expat; verified against the embedded MIT
text). The upstream modification notice records that the Unicode, Inc.
ConvertUTF code was removed, so no stanza is needed for it.
- WiX UI fragments: drop the FIXME, upstream confirmed the bundled WiX
is 2.0.5325.0 whose sources are CPL-1.0; include the full CPL-1.0 text
(from LICENSES/) instead of a URL pointer, and the full BSL-1.0 text as
a standalone License paragraph.
- wixca.dll / Google.Protobuf.dll: keep the Binary-no-source DFSG marker
but record the now-confirmed licenses (CPL-1.0, BSD-3-Clause) and
holders.
- flip debian/* to the same dual license to keep matching the upstream
default; drop the now-unused LGPL-2.1+ and GPL-2+ License paragraphs.
- annotate every License paragraph with its verified SPDX identifier
reference (Expat->MIT, GPL-2->GPL-2.0-only, the rest map 1:1).

Verified with licensecheck over the whole tree (no uncovered third-party
holders remain: cmake AssemblyInfo attributes are upstream's own,
GDCM/Ange/Kohlhoff/Passault unchanged) and with cme check dpkg-copyright
(clean).

debian/TODO: drop the completed license-harmonization section; the +dfsg
repack entry stays (DFSG #2 is about the missing source form, the DLL
licenses themselves are now confirmed).

Assisted-by: Claude Code:claude-fable-5
Signed-off-by: Fabio Fantoni <fantonifabio@tiscali.it>
Fantu added a commit that referenced this pull request Jul 6, 2026
…ation

Upstream 0.14.1 completed the license migration: every source file
carries an SPDX Apache-2.0 OR GPL-2.0-only header (936 files, verified
tree-wide), REUSE.toml declares the same copyright and dual license as
project-wide fallback for headerless files (docs, images, packaging
templates, lockfiles), and LICENSES/ ships the referenced license texts.
Rework debian/copyright accordingly:

- flip the Files: * default from LGPL-2.1+ to Apache-2.0 or GPL-2 and
drop the stanzas that now converge onto it: nscapi (relicensed from the
old NSClient++ Authors Apache-2.0 headers), own test sources, Windows
resource files, AssemblyInfo metadata, packaging templates
(chocolatey/winget/scoop), base64, clr_scoped_ptr, mongoose-cpp
non-derived files and the npm lockfiles.
- drop the UNKNOWN/FIXME stanza for the binary assets
(PNG/BMP/PSD/VSDX): the REUSE.toml fallback annotation now provides the
missing upstream declaration (Medin, dual license).
- add the previously missing stanza for include/simpleini/simpleini.h
(Brodie Thiesfield, 2006-2008, Expat; verified against the embedded MIT
text). The upstream modification notice records that the Unicode, Inc.
ConvertUTF code was removed, so no stanza is needed for it.
- WiX UI fragments: drop the FIXME, upstream confirmed the bundled WiX
is 2.0.5325.0 whose sources are CPL-1.0; include the full CPL-1.0 text
(from LICENSES/) instead of a URL pointer, and the full BSL-1.0 text as
a standalone License paragraph.
- wixca.dll / Google.Protobuf.dll: keep the Binary-no-source DFSG marker
but record the now-confirmed licenses (CPL-1.0, BSD-3-Clause) and
holders.
- flip debian/* to the same dual license to keep matching the upstream
default; drop the now-unused LGPL-2.1+ and GPL-2+ License paragraphs.
- annotate every License paragraph with its verified SPDX identifier
reference (Expat->MIT, GPL-2->GPL-2.0-only, the rest map 1:1).

Verified with licensecheck over the whole tree (no uncovered third-party
holders remain: cmake AssemblyInfo attributes are upstream's own,
GDCM/Ange/Kohlhoff/Passault unchanged) and with cme check dpkg-copyright
(clean).

debian/TODO: drop the completed license-harmonization section; the +dfsg
repack entry stays (DFSG #2 is about the missing source form, the DLL
licenses themselves are now confirmed).

Assisted-by: Claude Code:claude-fable-5
Signed-off-by: Fabio Fantoni <fantonifabio@tiscali.it>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant