Skip to content

Comments

ebusd: update to 24.1 and add new log facility option ("device")#391842

Merged
happysalada merged 2 commits intoNixOS:masterfrom
bobrippling:feat/ebusd-upgrade
Mar 25, 2025
Merged

ebusd: update to 24.1 and add new log facility option ("device")#391842
happysalada merged 2 commits intoNixOS:masterfrom
bobrippling:feat/ebusd-upgrade

Conversation

@bobrippling
Copy link
Contributor

@bobrippling bobrippling commented Mar 21, 2025

This updates ebusd to 24.1 - changelog available upstream, config changes now include the "device" log level.

🗒️ Will be away for a few days - wanted to get this ready, will test basic functionality on my return

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Mar 21, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Mar 21, 2025
@bobrippling
Copy link
Contributor Author

bobrippling commented Mar 24, 2025

@nathan-gs do you have a way I can use for testing this from a github PR/patch? Other than that it's ready to go

for instance, this gives me errors with nix-shell, short of duplicating the whole lambda I think:

nix-shell -E '
let
  pkgs = import <nixpkgs> {};
  lib = pkgs.lib;
  stdenv = pkgs.stdenv;
  ebusd = import (pkgs.fetchurl {
    url = "https://raw.githubusercontent.com/NixOS/nixpkgs/91f58b6bb0a235331afd831e10f34e9e9fc542a5/pkgs/by-name/eb/ebusd/package.nix";
    sha256 = "sha256-Pbg8+qfJ6suqTguEoipCgb6HwqeXFTuUxs2sSmh25DI="; #pkgs.lib.fakeSha256;
  }) { inherit pkgs lib stdenv; };
in
pkgs.mkShell {
  buildInputs = [ ebusd ];
}
'

@nathan-gs
Copy link
Member

for me it fails on the patch (copy & pasted the code into my local repo), unfortunately without the patch it fails the build with:

warning: Git tree '/etc/nixos/nix-conf' is dirty
building the system configuration...
warning: Git tree '/etc/nixos/nix-conf' is dirty
error: builder for '/nix/store/9s9x9gwdd83jaq6n6kfh4ls2frm304fj-ebusd-24.1.drv' failed with exit code 2;
       last 25 log lines:
       > [ 88%] Building CXX object src/ebusd/CMakeFiles/ebusd.dir/main_args.cpp.o
       > [ 90%] Building CXX object src/ebusd/CMakeFiles/ebusd.dir/mqtthandler.cpp.o
       > [ 93%] Building CXX object src/ebusd/CMakeFiles/ebusd.dir/mqttclient.cpp.o
       > [ 95%] Building CXX object src/ebusd/CMakeFiles/ebusd.dir/mqttclient_mosquitto.cpp.o
       > [ 97%] Building CXX object src/ebusd/CMakeFiles/ebusd.dir/knxhandler.cpp.o
       > [100%] Linking CXX executable ebusd
       > [100%] Built target ebusd
       > buildPhase completed in 31 seconds
       > Running phase: installPhase
       > install flags: -j2 SHELL=/nix/store/8vpg72ik2kgxfj05lc56hkqrdrfl8xi9-bash-5.2p37/bin/bash install
       > [  4%] Built target knx
       > [ 23%] Built target utils
       > [ 30%] Built target ebuscontrib
       > [ 58%] Built target ebus
       > [ 65%] Built target ebuspicloader
       > [ 69%] Built target ebusctl
       > [100%] Built target ebusd
       > Install the project...
       > -- Install configuration: "Release"
       > CMake Error at cmake_install.cmake:54 (file):
       >   file cannot create directory: /etc/ebusd.  Maybe need administrative
       >   privileges.
       >
       >
       > make: *** [Makefile:100: install] Error 1
       For full logs, run 'nix log /nix/store/9s9x9gwdd83jaq6n6kfh4ls2frm304fj-ebusd-24.1.drv'.
error: 1 dependencies of derivation '/nix/store/fmly7fl62f79k7r1qqr2qwc7dk43m8dg-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/92hnv1n64pba1np37wmkawvqag8k01si-unit-ebusd.service.drv' failed to build
error: 1 dependencies of derivation '/nix/store/xk96ga6cymffm5m6z0vga2f8whpmpyny-nixos-system-nhtpc-24.11.20250320.7105ae3.drv' failed to build

@nathan-gs
Copy link
Member

The patch should be:

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -179,16 +179,11 @@
 add_subdirectory(src/lib/knx)
 add_subdirectory(src/tools)
 
-if(EXISTS "${ROOT}/etc/debian_version")
-  install(FILES ${CMAKE_SOURCE_DIR}/contrib/debian/default/ebusd DESTINATION /etc/default/)
-  install(FILES ${CMAKE_SOURCE_DIR}/contrib/debian/init.d/ebusd DESTINATION /etc/init.d/)
-  install(FILES ${CMAKE_SOURCE_DIR}/contrib/debian/systemd/ebusd.service DESTINATION /lib/systemd/system/)
-endif()
 if(HAVE_MQTT)
   FILE(GLOB MQTT_CFG_FILES "${CMAKE_SOURCE_DIR}/contrib/etc/ebusd/mqtt-*.cfg")
-  install(FILES ${MQTT_CFG_FILES} DESTINATION /etc/ebusd/)
+  install(FILES ${MQTT_CFG_FILES} DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/ebusd/)
 endif(HAVE_MQTT)
 if(HAVE_KNX)
   FILE(GLOB KNX_CFG_FILES "${CMAKE_SOURCE_DIR}/contrib/etc/ebusd/knx*.cfg")
-  install(FILES ${KNX_CFG_FILES} DESTINATION /etc/ebusd/)
+  install(FILES ${KNX_CFG_FILES} DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/ebusd/)
 endif(HAVE_KNX)

Then it builds and ebusd works for me

@bobrippling
Copy link
Contributor Author

bobrippling commented Mar 24, 2025

Sweet - so with that patch (same as the existing one, this PR just drops the gcc patch), then I think we're ok.


I haven't been able to build ebusd on my nix machine to test it - is this what you execute?

nix-shell -E '
let
  pkgs = import <nixpkgs> {};
  lib = pkgs.lib;
  stdenv = pkgs.stdenv;


  fetchFromGitHub = pkgs.fetchFromGitHub;
  fetchpatch = pkgs.fetchpatch;
  argparse = pkgs.python3Packages.argparse;
  mosquitto = pkgs.mosquitto;
  cmake = pkgs.cmake;
  autoconf = pkgs.autoconf;
  automake = pkgs.automake;
  libtool = pkgs.libtool;
  pkg-config = pkgs.pkg-config;
  openssl = pkgs.openssl;


  ebusd = import ./ebusd.nix {
    inherit lib stdenv pkgs fetchFromGitHub fetchpatch argparse mosquitto cmake autoconf automake libtool pkg-config openssl;
  };
in
  ebusd
'

as I receive an error about argparse (error: attribute 'argparse' missing)

@nathan-gs
Copy link
Member

the patch is slightly different. I tested it by manually copying the changes to my local nix-conf (a bit cheating)

@nathan-gs
Copy link
Member

nathan-gs/nix-conf@3aad271 is more or less how I got it working.

@bobrippling
Copy link
Contributor Author

Thanks - that helped, got ebusd 24.1 running, tested with the new device log area and confirmed it still connects to my ebus setup, PR's ready to go

@bobrippling bobrippling marked this pull request as ready for review March 25, 2025 08:27
@nathan-gs
Copy link
Member

@bobrippling can fix the patch? That one breaks on my side

@nix-owners nix-owners bot requested a review from nathan-gs March 25, 2025 08:35
@bobrippling
Copy link
Contributor Author

Sure, how's that?

@nathan-gs nathan-gs self-assigned this Mar 25, 2025
@nathan-gs
Copy link
Member

@jleeuwes care to review this one? As it solves #380997

@nathan-gs nathan-gs requested a review from happysalada March 25, 2025 17:26
@wegank wegank added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Mar 25, 2025
@happysalada happysalada merged commit f2a90a4 into NixOS:master Mar 25, 2025
27 of 29 checks passed
@bobrippling bobrippling deleted the feat/ebusd-upgrade branch March 26, 2025 07:22
@jleeuwes
Copy link
Contributor

@nathan-gs @wegank @happysalada could one of you review #380997 please? It changes the default configpath because the current one is set to stop working at some time soon.

@jleeuwes jleeuwes mentioned this pull request Mar 26, 2025
13 tasks
@nathan-gs
Copy link
Member

Thx @bobrippling for the contrib!

@bobrippling
Copy link
Contributor Author

My pleasure, thanks for the review and guidance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants