From 900a99328472af535e021965fe75e3586e0990f7 Mon Sep 17 00:00:00 2001 From: Phil Karn Date: Wed, 17 Jun 2026 00:20:21 -0700 Subject: [PATCH 01/10] ignore some debian cruft --- .gitignore | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index df96cb9..097b4dd 100644 --- a/.gitignore +++ b/.gitignore @@ -31,13 +31,11 @@ Doxyfile .DS_Store .tarball-version .version - .*.swp - doc/ - - CMakeCache.txt */CMakeFiles CMakeFiles *.cmake +debian/*.debhelper.log +obj-x86_64-linux-gnu From 493575a7c3f1abad7816eb02fe9ee22ea8089828 Mon Sep 17 00:00:00 2001 From: Phil Karn Date: Wed, 17 Jun 2026 00:21:05 -0700 Subject: [PATCH 02/10] more packaging stuff --- fobos-sdr.rules => 73-fobos-sdr.rules | 0 CMakeLists.txt | 6 +++++- debian/libfobos-dev-dirs | 2 -- debian/libfobos0.dirs | 1 - debian/rules | 3 +++ 5 files changed, 8 insertions(+), 4 deletions(-) rename fobos-sdr.rules => 73-fobos-sdr.rules (100%) delete mode 100644 debian/libfobos-dev-dirs delete mode 100644 debian/libfobos0.dirs diff --git a/fobos-sdr.rules b/73-fobos-sdr.rules similarity index 100% rename from fobos-sdr.rules rename to 73-fobos-sdr.rules diff --git a/CMakeLists.txt b/CMakeLists.txt index ce905b0..588c35a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,7 +98,7 @@ endif() ######################################################################## if (CMAKE_SYSTEM_NAME STREQUAL "Linux") install( - FILES fobos-sdr.rules + FILES 73-fobos-sdr.rules DESTINATION "/etc/udev/rules.d" COMPONENT "udev") endif() @@ -151,6 +151,10 @@ target_include_directories(libfobos PUBLIC set_target_properties(libfobos PROPERTIES DEFINE_SYMBOL "FOBOS_EXPORTS") set_target_properties(libfobos PROPERTIES OUTPUT_NAME fobos) +set_target_properties(libfobos PROPERTIES + VERSION 2.4.1 + SOVERSION 0 +) ######################################################################## ######################################################################## diff --git a/debian/libfobos-dev-dirs b/debian/libfobos-dev-dirs deleted file mode 100644 index 4418816..0000000 --- a/debian/libfobos-dev-dirs +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib -usr/include diff --git a/debian/libfobos0.dirs b/debian/libfobos0.dirs deleted file mode 100644 index 6845771..0000000 --- a/debian/libfobos0.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/lib diff --git a/debian/rules b/debian/rules index f1d1d25..c252a85 100755 --- a/debian/rules +++ b/debian/rules @@ -15,6 +15,9 @@ #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed +override_dh_auto_install: + dh_auto_install -- DESTDIR=$(CURDIR)/debian/tmp + %: dh $@ From 69f7899aed60dd2a1abf1f3fca36773a77c0ee5f Mon Sep 17 00:00:00 2001 From: Phil Karn Date: Wed, 17 Jun 2026 00:31:02 -0700 Subject: [PATCH 03/10] fix cmake for debian packaging --- CMakeLists.txt | 7 +++++-- debian/libfobos0.install | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 588c35a..4c14a24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,10 +97,13 @@ endif() # Install udev rules ######################################################################## if (CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(CMAKE_INSTALL_UDEVDIR "${CMAKE_INSTALL_LIBDIR}/udev/rules.d" + CACHE PATH "udev rules installation directory") + install( FILES 73-fobos-sdr.rules - DESTINATION "/etc/udev/rules.d" - COMPONENT "udev") + DESTINATION "${CMAKE_INSTALL_UDEVDIR}" + COMPONENT udev) endif() ######################################################################## diff --git a/debian/libfobos0.install b/debian/libfobos0.install index ae83260..52d2d6b 100644 --- a/debian/libfobos0.install +++ b/debian/libfobos0.install @@ -1,2 +1,2 @@ usr/lib/*/lib*.so.* -usr/lib/udev/rules.d/60-fobos-sdr.rules +usr/lib/udev/rules.d/73-fobos-sdr.rules From 1eb3e0888aaf183ee30f8531d486e5f4566ae516 Mon Sep 17 00:00:00 2001 From: Phil Karn Date: Wed, 17 Jun 2026 00:38:58 -0700 Subject: [PATCH 04/10] fix udev path, version 2.4.1-4-trixie1 --- CMakeLists.txt | 4 ++-- debian/changelog | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c14a24..a1e1113 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,12 +97,12 @@ endif() # Install udev rules ######################################################################## if (CMAKE_SYSTEM_NAME STREQUAL "Linux") - set(CMAKE_INSTALL_UDEVDIR "${CMAKE_INSTALL_LIBDIR}/udev/rules.d" + set(CMAKE_INSTALL_UDEVRULESDIR "lib/udev/rules.d" CACHE PATH "udev rules installation directory") install( FILES 73-fobos-sdr.rules - DESTINATION "${CMAKE_INSTALL_UDEVDIR}" + DESTINATION "${CMAKE_INSTALL_UDEVRULESDIR}" COMPONENT udev) endif() ######################################################################## diff --git a/debian/changelog b/debian/changelog index 14b1a1f..a19022b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libfobos (2.4.1-4-trixie1) trixie; urgency=medium + + * fixed debian packaging, set SONAME 0 + + -- Phil Karn Wed, 17 Jun 2026 00:37:45 -0700 + libfobos (2.4.1-3) trixie; urgency=medium * clean out deadwood From 0f0d57c8a87c09b88475d22c76e9fff22aadabfb Mon Sep 17 00:00:00 2001 From: Phil Karn Date: Wed, 17 Jun 2026 01:06:37 -0700 Subject: [PATCH 05/10] create fobos-tools package for command line tools, remove date/time from version string to make builds reproducible --- CMakeLists.txt | 6 ++++++ debian/control | 9 +++++++++ debian/fobos-tools.install | 2 ++ fobos/fobos.c | 4 ++-- 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 debian/fobos-tools.install diff --git a/CMakeLists.txt b/CMakeLists.txt index a1e1113..e20001a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -280,6 +280,12 @@ target_include_directories(fobos_fwloader PRIVATE ${CMAKE_SOURCE_DIR}) target_include_directories(fobos_fwloader PRIVATE ${CMAKE_SOURCE_DIR}/fobos) ######################################################################## +# install executables +install( + TARGETS fobos_fwloader fobos_recorder fobos_devinfo + RUNTIME DESTINATION bin + COMPONENT tools +) ######################################################################## # Directories diff --git a/debian/control b/debian/control index f96c80c..9037b5f 100644 --- a/debian/control +++ b/debian/control @@ -11,6 +11,15 @@ Homepage: https://rigexpert.com Vcs-Git: https://github.com/ka9q/libfobos-debian.git Vcs-Browser: https://github.com/ka9q/libfobos-debian +Package: fobos-tools +Section: utils +Priority: optional +Architecture: any +Multi-Arch: same +Depends: libfobos0 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Command line tools for RigExpert Fobos SDR + Simple test/info tools for the RigExpert Fobos SDR front end + Package: libfobos-dev Section: libdevel Architecture: any diff --git a/debian/fobos-tools.install b/debian/fobos-tools.install new file mode 100644 index 0000000..defbefe --- /dev/null +++ b/debian/fobos-tools.install @@ -0,0 +1,2 @@ +usr/bin/* + diff --git a/fobos/fobos.c b/fobos/fobos.c index f8a7248..b88ca76 100644 --- a/fobos/fobos.c +++ b/fobos/fobos.c @@ -176,7 +176,7 @@ int fobos_rx_get_api_info(char * lib_version, char * drv_version) { if (lib_version) { - strcpy(lib_version, LIB_VERSION" "__DATE__" "__TIME__); + strcpy(lib_version, LIB_VERSION); } if (drv_version) { @@ -607,7 +607,7 @@ int fobos_rffc507x_set_lo_frequency_hz(struct fobos_dev_t * dev, uint64_t lo_fre fobos_rffc507x_commit(dev, 0); #ifdef FOBOS_PRINT_DEBUG double ff = (double)freq_hz; - printf_internal("rffc507x lo_freq_mhz = %lld %f\n", lo_freq_hz, ff); + printf_internal("rffc507x lo_freq_mhz = %llu %f\n", (unsigned long long)lo_freq_hz, ff); #endif // FOBOS_PRINT_DEBUG return 0; } From 396b2cb803749d07b11c5f6afce28668cbd65236 Mon Sep 17 00:00:00 2001 From: Phil Karn Date: Wed, 17 Jun 2026 01:19:39 -0700 Subject: [PATCH 06/10] build requires libusb-1.0-0-dev --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index 9037b5f..bdabf58 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,7 @@ Rules-Requires-Root: no Build-Depends: debhelper-compat (= 13), cmake, + libusb-1.0-0-dev Standards-Version: 4.7.2 Homepage: https://rigexpert.com Vcs-Git: https://github.com/ka9q/libfobos-debian.git From 1208af567db4c1267230b427473c6319d6ea5c98 Mon Sep 17 00:00:00 2001 From: Phil Karn Date: Wed, 17 Jun 2026 01:20:25 -0700 Subject: [PATCH 07/10] ignore more debian temp dirs --- debian/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/.gitignore b/debian/.gitignore index bff7e66..764ea86 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -6,3 +6,4 @@ fobos-udev/ libfobos-dev/ libfobos0/ +fobos-tools/ From 2e6ea444d7554a72c5d51a3e8b4924c4a6b1a5f7 Mon Sep 17 00:00:00 2001 From: Phil Karn Date: Wed, 17 Jun 2026 01:23:21 -0700 Subject: [PATCH 08/10] git ignore arm64 build dir --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 097b4dd..b0d6d0b 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,5 @@ CMakeFiles *.cmake debian/*.debhelper.log obj-x86_64-linux-gnu +obj-aarch64-linux-gnu + From 7c1054d723d3580871a0c0b7d2e9d2b1d22aa5e7 Mon Sep 17 00:00:00 2001 From: Phil Karn Date: Wed, 17 Jun 2026 05:25:31 -0700 Subject: [PATCH 09/10] turn off print debugging --- fobos/fobos.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/fobos/fobos.c b/fobos/fobos.c index b88ca76..1b74f07 100644 --- a/fobos/fobos.c +++ b/fobos/fobos.c @@ -5,7 +5,7 @@ // / __ / / / / _ \ / ___/ \ \/ / / __ \ / __ \ / ___\ / _/ // / /\ \ / / / /_/ / / /___ / / / /_/ / / ___/ / / / /_ // /_ / \_\ /_/ \__ / /______/ /_/\_\ / ____/ \____/ /_/ \___/ -// /______/ /_/ +// /______/ /_/ // Fobos SDR API library // 2024.03.21 // 2024.04.08 @@ -30,7 +30,7 @@ #ifdef _WIN32 #include #include -#pragma comment(lib, "libusb-1.0.lib") +#pragma comment(lib, "libusb-1.0.lib") #define printf_internal _cprintf #else #include @@ -39,7 +39,7 @@ #define printf_internal printf #endif // !printf_internal //============================================================================== -#define FOBOS_PRINT_DEBUG +//#define FOBOS_PRINT_DEBUG //============================================================================== #define LIB_VERSION "2.4.1" #define DRV_VERSION "libusb" @@ -208,7 +208,7 @@ int fobos_rx_get_device_count(void) libusb_get_device_descriptor(list[i], &dd); #ifdef FOBOS_PRINT_DEBUG printf_internal("%04x:%04x\n", dd.idVendor, dd.idProduct); -#endif // FOBOS_PRINT_DEBUG +#endif // FOBOS_PRINT_DEBUG if ((dd.idVendor == FOBOS_VENDOR_ID) && (dd.idProduct == FOBOS_PRODUCT_ID) && (dd.bcdDevice == FOBOS_DEV_ID)) @@ -1008,7 +1008,7 @@ int fobos_rx_get_board_info(struct fobos_dev_t * dev, char * hw_revision, char * #define FOBOS_INJECT_LOW 1 #define FOBOS_INJECT_HIGH 2 //============================================================================== -typedef struct +typedef struct { uint32_t idx; uint32_t freq_mhz_min; @@ -1153,7 +1153,7 @@ int fobos_rx_set_frequency(struct fobos_dev_t * dev, double value, double * actu int result = fobos_check(dev); #ifdef FOBOS_PRINT_DEBUG printf_internal("%s(%f);\n", __FUNCTION__, value); -#endif // FOBOS_PRINT_DEBUG +#endif // FOBOS_PRINT_DEBUG if (result != FOBOS_ERR_OK) { return result; @@ -1502,7 +1502,7 @@ int fobos_rx_set_bandwidth(struct fobos_dev_t * dev, double value, double * actu if (dev->rx_bw_idx != idx) { dev->rx_bw_idx = idx; - fobos_max2830_write_reg(dev, 8, (uint16_t)(idx | 0x3020)); + fobos_max2830_write_reg(dev, 8, (uint16_t)(idx | 0x3020)); } if (dev->rx_bw_adj != adj) { @@ -1548,7 +1548,7 @@ int fobos_rx_get_samplerates(struct fobos_dev_t * dev, double * values, unsigned //============================================================================== const uint32_t fobos_p1s[] = { - 10, + 10, 16, 20, 25, 32, 40, 50, 64, 80, 100 }; //============================================================================== @@ -2160,10 +2160,10 @@ int fobos_rx_read_sync(struct fobos_dev_t * dev, float * buf, uint32_t * actual_ } result = libusb_bulk_transfer( dev->libusb_devh, - LIBUSB_BULK_IN_ENDPOINT, - dev->rx_sync_buf, - dev->transfer_buf_size, - &actual, + LIBUSB_BULK_IN_ENDPOINT, + dev->rx_sync_buf, + dev->transfer_buf_size, + &actual, LIBUSB_BULK_TIMEOUT); if (result == FOBOS_ERR_OK) { From fea4c302170933f3bcb99e7d9e7808f33b2364b3 Mon Sep 17 00:00:00 2001 From: Phil Karn Date: Wed, 17 Jun 2026 05:29:00 -0700 Subject: [PATCH 10/10] 2.4.1-5-trixie1 - turn off FOBOS_PRINT_DEBUG --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index a19022b..621d684 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libfobos (2.4.1-5-trixie1) trixie; urgency=medium + + * turn off FOBOS_PRINT_DEBUG apparently turned on upstream + + -- Phil Karn Wed, 17 Jun 2026 05:26:23 -0700 + libfobos (2.4.1-4-trixie1) trixie; urgency=medium * fixed debian packaging, set SONAME 0