From 9be9eb9bc9bb5c30d6752a13074223d9b1ae04f7 Mon Sep 17 00:00:00 2001 From: Robert Burger Date: Thu, 17 Jul 2025 10:12:10 +0200 Subject: [PATCH 1/5] add: debian build --- .github/workflows/build-deb.yaml | 102 +++++++++++ configure.ac => configure.ac.in | 23 +-- debian/changelog | 285 ++++++++++++++++++++++++++++++- 3 files changed, 385 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/build-deb.yaml rename configure.ac => configure.ac.in (62%) diff --git a/.github/workflows/build-deb.yaml b/.github/workflows/build-deb.yaml new file mode 100644 index 0000000..914c473 --- /dev/null +++ b/.github/workflows/build-deb.yaml @@ -0,0 +1,102 @@ +name: Build and Publish Debian Package + +on: + push: + +jobs: + build: + runs-on: ubuntu-latest + env: + DEB_BUILD_OPTIONS: nocheck # or whatever options you need + strategy: + matrix: + distro: [debian-bookworm, debian-bullseye, ubuntu-24.04, ubuntu-22.04] + include: + - distro: debian-bookworm + image: debian:bookworm + os: debian + version: bookworm + - distro: debian-bullseye + image: debian:bullseye + os: debian + version: bullseye + - distro: ubuntu-24.04 + image: ubuntu:24.04 + os: ubuntu + version: noble + - distro: ubuntu-22.04 + image: ubuntu:22.04 + os: ubuntu + version: jammy + container: + image: ${{ matrix.image }} + steps: + - name: Setup dependencies + run: | + apt-get update + apt-get install -y build-essential devscripts debhelper autotools-dev autoconf-archive pkg-config fakeroot sed git tar gzip python3-pip python3-venv curl jq libyaml-cpp-dev + + curl -1sLf 'https://dl.cloudsmith.io/basic/robertburger/robotkernel/setup.deb.sh' | bash + apt-get update + apt-get install -y robotkernel-service-helper robotkernel-dev service-provider-process-data-inspection-dev + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Mark working directory as safe + run: git config --global --add safe.directory $GITHUB_WORKSPACE + + - name: update branch name + run: | + VERSION=$(dpkg-parsechangelog | sed -n 's/^Version: //p') + sed "s|PACKAGE_VERSION|$VERSION|" configure.ac.in > configure.ac + env: + GITHUB_REF_NAME: ${{ github.ref_name }} + + - name: Build .deb package + run: | + # baue mit dpkg-buildpackage (ohne signieren) + dpkg-buildpackage -us -uc -d + + - name: Collect .deb artifact + run: | + mkdir -p artifacts/${{ matrix.os }}/${{ matrix.version }} + mv ../module-posix-timer*.deb artifacts/${{ matrix.os }}/${{ matrix.version }} + + - name: Set sanitized image name + id: sanitize + run: | + version=$(dpkg-parsechangelog | sed -n 's/^Version: //p') + echo "sanitized_image=$(echo "$version-$IMAGE" | tr '/:' '--')" >> $GITHUB_OUTPUT + env: + IMAGE: ${{ matrix.image }} + + - name: Upload .deb package + uses: actions/upload-artifact@v4 + with: + name: module-posix-timer-${{ steps.sanitize.outputs.sanitized_image }}.deb + path: artifacts/${{ matrix.os }}/${{ matrix.version }}/*.deb + + - name: Upload to Cloudsmith (${{ matrix.os }}/${{ matrix.version }}) + env: + CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} + shell: bash + run: | + VERSION=$(dpkg-parsechangelog | sed -n 's/^Version: //p') + FILENAME="artifacts/${{ matrix.os }}/${{ matrix.version }}/module-posix-timer_${VERSION}_amd64.deb" + FILENAME_DEV="artifacts/${{ matrix.os }}/${{ matrix.version }}/module-posix-timer-dev_${VERSION}_amd64.deb" + + python3 -m venv cloudsmith + cd cloudsmith + source bin/activate + + python3 -m pip install --upgrade pip + pip3 install cloudsmith-cli + + cloudsmith push deb robertburger/robotkernel/${{ matrix.os }}/${{ matrix.version }} ../${FILENAME} \ + --republish \ + --api-key "$CLOUDSMITH_API_KEY" + + cloudsmith push deb robertburger/robotkernel/${{ matrix.os }}/${{ matrix.version }} ../${FILENAME_DEV} \ + --republish \ + --api-key "$CLOUDSMITH_API_KEY" diff --git a/configure.ac b/configure.ac.in similarity index 62% rename from configure.ac rename to configure.ac.in index 51eb721..afc5e77 100644 --- a/configure.ac +++ b/configure.ac.in @@ -2,10 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT( - [module_posix_timer], - m4_esyscmd_s([cat project.properties | grep VERSION | cut -d'=' -f2 | xargs printf "%s"]), - m4_esyscmd_s([cat project.properties | grep MAINTAINER | cut -d'=' -f2 | xargs printf "%s"])) +AC_INIT([module_posix_timer], [PACKAGE_VERSION], [Robert Burger ]) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) AC_CONFIG_HEADERS([config.h]) @@ -41,24 +38,6 @@ AC_CHECK_FUNCS([strdup]) AC_CHECK_LIB(dl, dlopen) AC_CHECK_LIB(rt, timer_delete) -# Platform specific setup -# Check for which host we are on and setup a few things -# specifically based on the host -case $target in - *arm* ) - AC_DEFINE([ARCH_ARM], [], [Defined if the target CPU is arm]) - ;; - *amd64* ) - AC_DEFINE([ARCH_INTEL], [], [Defined if the target CPU is intel]) - ;; - *i?86* ) - AC_DEFINE([ARCH_INTEL], [], [Defined if the target CPU is intel]) - ;; - *x86_64* ) - AC_DEFINE([ARCH_INTEL], [], [Defined if the target CPU is intel]) - ;; -esac - AC_CONFIG_FILES([Makefile src/Makefile module_posix_timer.pc]) AC_OUTPUT diff --git a/debian/changelog b/debian/changelog index eadda3b..d475c7d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,284 @@ -robotkernel-module-posix-timer (6.0.0) unstable; urgency=medium +module-posix-timer (6.0.0~pre1) unstable; urgency=low - * Initial Release. + * prep: 6.0.0 + + -- Robert Burger Wed, 22 Jan 2025 10:29:08 +0100 + +module-posix-timer (5.1.0) unstable; urgency=low + + * bump: version to 5.1.0 + * add: busywait mode + * Merge pull request #8 from robotkernel/feat/anti-catch-up + * change: splitted skip_missed into two modes: 'normal' and 'strict' + * feat: added option to skip missed cycles with 'skip_missed: true' option + + -- Robert Burger Wed, 22 Jan 2025 10:29:08 +0100 + +module-posix-timer (5.0.11) unstable; urgency=low + + * Merge pull request #7 from raff-an/patch-1 + * fix: conan2 compatibility + + -- Mühlbauer, Maximilian Sebastian Tue, 14 May 2024 16:41:34 +0200 + +module-posix-timer (5.0.10) unstable; urgency=low + + * Merge pull request #6 from robotkernel/feat/use_build_profiles + * feat: build with build profiles + * chore: black format + * feat: port to conan2 syntax + + -- Burger, Robert Tue, 21 Nov 2023 06:08:00 +0100 + +module-posix-timer (5.0.9) unstable; urgency=low + + * switched to conan_template + + -- Robert Burger Thu, 26 Jan 2023 16:54:07 +0100 + +module-posix-timer (5.0.8) unstable; urgency=low + + * add: check rt library for timer_delete + * cleanup: code reorder + * FIX: build warnings + + -- Robert Burger Tue, 22 Nov 2022 15:50:39 +0100 + +module-posix-timer (5.0.7) unstable; urgency=low + + * CHANGE: switched to new template and python_require + * CHANGE: debian version + * FIX: debian deps + * ADD: debian build files + + -- Robert Burger Fri, 3 Dec 2021 06:28:43 +0100 + +module-posix-timer (5.0.6) unstable; urgency=low + + * removed state machine log, done by robotkernel for all modules + + -- Robert Burger Mon, 23 Mar 2020 07:13:54 +0100 + +module-posix-timer (5.0.5) unstable; urgency=low + + * added log output to state machine + + -- Robert Burger Fri, 20 Mar 2020 08:02:13 +0100 + +module-posix-timer (5.0.4) unstable; urgency=low + + * disabled set rate on posix timer mode, use nanosleep instead + * Delete README.wiki + * Update README.md + * Create README.md + * added example config + * added example config file + * switching to defaults + + -- Robert Burger Wed, 19 Feb 2020 14:30:58 +0100 + +module-posix-timer (5.0.3) unstable; urgency=low + + * using conan_template now + + -- Robert Burger Tue, 26 Nov 2019 12:49:00 +0100 + +module-posix-timer (5.0.2) unstable; urgency=low + + * added test + + -- Robert Burger Mon, 11 Nov 2019 13:39:41 +0100 + +module-posix-timer (5.0.1) unstable; urgency=low + + * changes targets + * Merge branch 'release/5.0.1' + * added architectures + * added architectures + * fixed jenkinsfile + * fixed jenkinsfile + * added architectures + * added architectures + * build: updated build/ci files for cissy 1.0->2.0 + * build: updated build/ci files for cissy 1.0->2.0 + * build: updated build/ci files for cissy 1.0->2.0 + * build: updated build/ci files for cissy 1.0->2.0 + * build: updated build/ci files for cissy 1.0->2.0 + * build: updated build/ci files for cissy 1.0->2.0 + * fixed destruction of posix timer + * added license + * fixed new conan recipe + * new conan recipe + * renamed trigger device + * updated jenkins file + * added dep to service_provider_process_data_inspection + * readded sled + * fixed requires + * added missing m4 macro + * updated requiers + * chore: conan support + * added jenkins, conan + * fix: dependency version ranges + * fixed arch for lnc include + + -- Robert Burger Thu, 24 Oct 2019 13:27:19 +0200 + +module-posix-timer (5.0.0) unstable; urgency=low + + * fixed lang to c++ + * Prep 5.0.0 release + * typo + * fixed wiki url + * chaned README to wiki format + * empty README.wiki + * added pd provider + * auto commit + * fixed version + * Merge remote-tracking branch 'origin/master' into robotkernel-5 + * added generated inc.lnc to ignores + * fixed lnc include file + * fixed nanosleep mode + * fixed install rule of lnc include file + * switched to c++11 chrono + * fixed lnc include file bulid + * fixed lnc include file generation + * fix: dependencies + * inc version + * fixed for pt release + * switched to triple_buffer impl + * style fix + * changes for triple buffer + * fixed device class name + * removed copying doc in ptfile + * deleted old doc dir + * Rename # module-posix-timer The **module-posix-timer** is used to as a generic trigger generator. It supports two different modes. In *posix_timer* mode a POSIX per-process timer is created. Otherwise in 'nanosleep' mode the timer increments are slept with the nanosleep function. ## robotkernel devices The **module-posix-timer** creates two **robotkernel** devices: * trigger device: .posix_timer.trigger * process data device: .inputs.pd ## config file example This example loads the posix timer module and sets up a nanosleep trigger with 3kHz. - name: timer so_file: libmodule-posix-timer.so config: loglevel: info interval: 0.000333333 mode: nanosleep prio: 90 affinity: 1 power_up: op README.md to README.md + * Create README.md + * device changes + * code cleanup + * mods for new trigger classes + * fixed process_data namespace + * added process data for interval + * make posix timer interval be adjustable via trigger device + * added rate to trigger_base construction + * switched to named trigger device + * Merge branch 'robotkernel-5' of rmc-github.robotic.dlr.de:robotkernel/module-posix-timer into robotkernel-5 + * removed wrong libdir + * removed reference to scripts m4 + * added new dependency resolution + * Merge branch 'robotkernel-5' of rmc-github.robotic.dlr.de:robotkernel/module-posix-timer into robotkernel-5 + * changed set_state to use transitions + * removed autogen.sh + * removed scripts and makefile link + * added install rule for pc-file + * autotools build + * autotools build + * switched to robotkernel-5 branch + * switched to yaml-cpp-rmc + + -- Robert Burger Mon, 12 Mar 2018 09:51:44 +0100 + +module-posix-timer (4.1.0) unstable; urgency=low + + * 'automated_commit' + * 'scripts_updated' + * 'scripts_updated' + * commit scripts + * fixed + * fixed build + * 'scripts_updated' + * 'replaced_with_default' + * 'scripts_updated' + * 'scripts_updated' + * 'scripts_updated' + * 'scripts_updated' + * "transforming" + * 'scripts_updated' + * 'scripts_updated' + * added gradle props + * updated scripts + + -- Robert Burger Wed, 30 Nov 2016 10:28:13 +0100 + +module-posix-timer (4.0.2) unstable; urgency=low + + * prep 4.0.2 + * added getpdin call + * interval & shift + * new scripts + * added submodule scripts + + -- Robert Burger Mon, 21 Mar 2016 10:32:32 +0100 + +module-posix-timer (4.0.1) unstable; urgency=low + + * prep 4.0.1, rebuild + + -- Robert Burger Thu, 15 Oct 2015 08:48:03 +0000 + +module-posix-timer (4.0.0) unstable; urgency=low + + * added ignores + * prep 4.0.0 added documentation key in ptfile + * modified loglevel for rk 4.0.0 yaml-cpp 0.5.2 switch prep 4.0.0 + * prep 3.2.0 + + -- Robert Burger Tue, 15 Sep 2015 07:02:05 +0000 + +module-posix-timer (3.1.2) unstable; urgency=low + + * prep 3.1.2 + * cleaned up code, now using module_base + + -- Robert Burger Tue, 4 Aug 2015 09:27:40 +0000 + +module-posix-timer (3.1.1) unstable; urgency=low + + * added missing archs file + * fixed loglevels, fixed supported archs + * modified build system + * fixed indenting + + -- Robert Burger Wed, 8 Jul 2015 11:13:40 +0000 + +module-posix-timer (3.1.0) unstable; urgency=low + + * prep 3.1.0 + * added release target + + -- Robert Burger Mon, 2 Feb 2015 13:37:13 +0000 + +module-posix-timer (3.0.3) unstable; urgency=low + + * signo is now optional + * call AM_PROG_AR macro only on newser automakes + * made signo optional + * using trigger_modules instead of triggering manually here + + -- Florian Schmidt Tue, 23 Sep 2014 16:06:53 +0000 + +module-posix-timer (3.0.2) unstable; urgency=low + + * release with nanosleep and timer mode + * implemented nanosleep and timer mode for posix_timer m odule + * fixed ln include file for local release + * added install rule for ln include fiel + + -- Robert Burger Mon, 8 Sep 2014 11:03:48 +0000 + +module-posix-timer (3.0.1) unstable; urgency=low + + * fixed arch name + * bugfix release of posix timer + * added generation of ptfile, added inc.lnc + + -- Robert Burger Tue, 5 Aug 2014 11:05:33 +0000 + +module-posix-timer (3.0.0) unstable; urgency=low + + * fixed doc + * fixed build + * imported from: https://rmsvn01.robotic.dlr.de/repos/f_soft_src/robotkernel/trunk/src/modules/posix_timer rev: 43477 + * creating svn directory 'https://rmsvn01.robotic.dlr.de/software/robotkernel/src/module-posix-timer/trunk' [rmpm admintool (burger_r, 2014-08-01-08-56-06)] + + -- Robert Burger Fri, 1 Aug 2014 07:08:27 +0000 - -- Robert Burger Thu, 01 Apr 2021 13:35:27 +0200 From 70066dd0e93c92562cdd9d8e2663fc083600febc Mon Sep 17 00:00:00 2001 From: Robert Burger Date: Thu, 17 Jul 2025 10:18:14 +0200 Subject: [PATCH 2/5] add: debian build --- .github/workflows/build-deb.yaml | 5 ----- debian/control | 9 +++++---- ...osix-timer-docs.docs => module-posix-timer-docs.docs} | 0 ...osix-timer.cron.d.ex => module-posix-timer.cron.d.ex} | 0 ...-timer.doc-base.EX => module-posix-timer.doc-base.EX} | 0 debian/module-posix-timer.install | 1 + 6 files changed, 6 insertions(+), 9 deletions(-) rename debian/{robotkernel-module-posix-timer-docs.docs => module-posix-timer-docs.docs} (100%) rename debian/{robotkernel-module-posix-timer.cron.d.ex => module-posix-timer.cron.d.ex} (100%) rename debian/{robotkernel-module-posix-timer.doc-base.EX => module-posix-timer.doc-base.EX} (100%) create mode 100644 debian/module-posix-timer.install diff --git a/.github/workflows/build-deb.yaml b/.github/workflows/build-deb.yaml index 914c473..e46b9ea 100644 --- a/.github/workflows/build-deb.yaml +++ b/.github/workflows/build-deb.yaml @@ -84,7 +84,6 @@ jobs: run: | VERSION=$(dpkg-parsechangelog | sed -n 's/^Version: //p') FILENAME="artifacts/${{ matrix.os }}/${{ matrix.version }}/module-posix-timer_${VERSION}_amd64.deb" - FILENAME_DEV="artifacts/${{ matrix.os }}/${{ matrix.version }}/module-posix-timer-dev_${VERSION}_amd64.deb" python3 -m venv cloudsmith cd cloudsmith @@ -96,7 +95,3 @@ jobs: cloudsmith push deb robertburger/robotkernel/${{ matrix.os }}/${{ matrix.version }} ../${FILENAME} \ --republish \ --api-key "$CLOUDSMITH_API_KEY" - - cloudsmith push deb robertburger/robotkernel/${{ matrix.os }}/${{ matrix.version }} ../${FILENAME_DEV} \ - --republish \ - --api-key "$CLOUDSMITH_API_KEY" diff --git a/debian/control b/debian/control index 84c45c8..52358db 100644 --- a/debian/control +++ b/debian/control @@ -1,16 +1,17 @@ -Source: robotkernel-module-posix-timer +Source: module-posix-timer Section: unknown Priority: optional Maintainer: Robert Burger -Build-Depends: debhelper-compat (= 13), robotkernel (>=6), robotkernel-service-provider-process-data-inspection (>=6) +Build-Depends: debhelper-compat (= 13), robotkernel-dev (>=6), service-provider-process-data-inspection-dev (>=6) Standards-Version: 4.5.1 Homepage: #Vcs-Browser: https://salsa.debian.org/debian/robotkernel-module-posix-timer #Vcs-Git: https://salsa.debian.org/debian/robotkernel-module-posix-timer.git Rules-Requires-Root: no -Package: robotkernel-module-posix-timer +Package: module-posix-timer Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Multi-Arch: same +Depends: robotkernel ${misc:Depends} Description: diff --git a/debian/robotkernel-module-posix-timer-docs.docs b/debian/module-posix-timer-docs.docs similarity index 100% rename from debian/robotkernel-module-posix-timer-docs.docs rename to debian/module-posix-timer-docs.docs diff --git a/debian/robotkernel-module-posix-timer.cron.d.ex b/debian/module-posix-timer.cron.d.ex similarity index 100% rename from debian/robotkernel-module-posix-timer.cron.d.ex rename to debian/module-posix-timer.cron.d.ex diff --git a/debian/robotkernel-module-posix-timer.doc-base.EX b/debian/module-posix-timer.doc-base.EX similarity index 100% rename from debian/robotkernel-module-posix-timer.doc-base.EX rename to debian/module-posix-timer.doc-base.EX diff --git a/debian/module-posix-timer.install b/debian/module-posix-timer.install new file mode 100644 index 0000000..fdffd49 --- /dev/null +++ b/debian/module-posix-timer.install @@ -0,0 +1 @@ +/usr/lib/*/*.so From 3842ce5ec922d401f39cf964708c4c5957969745 Mon Sep 17 00:00:00 2001 From: Robert Burger Date: Thu, 17 Jul 2025 10:20:13 +0200 Subject: [PATCH 3/5] fix: install rule --- debian/module-posix-timer.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/module-posix-timer.install b/debian/module-posix-timer.install index fdffd49..012244d 100644 --- a/debian/module-posix-timer.install +++ b/debian/module-posix-timer.install @@ -1 +1 @@ -/usr/lib/*/*.so +usr/lib/*/*.so From b7788f6e8898c362c0f12585d13afe98bcc69c28 Mon Sep 17 00:00:00 2001 From: Robert Burger Date: Thu, 17 Jul 2025 10:45:12 +0200 Subject: [PATCH 4/5] change: del install file on single binary package --- debian/module-posix-timer.install | 1 - 1 file changed, 1 deletion(-) delete mode 100644 debian/module-posix-timer.install diff --git a/debian/module-posix-timer.install b/debian/module-posix-timer.install deleted file mode 100644 index 012244d..0000000 --- a/debian/module-posix-timer.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/*/*.so From 2326df9add546ddc5342f83f2252045cfc163c57 Mon Sep 17 00:00:00 2001 From: Robert Burger Date: Thu, 17 Jul 2025 12:20:10 +0200 Subject: [PATCH 5/5] fix: AC_INIT generation --- conanfile.py | 4 ++++ project.properties | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 project.properties diff --git a/conanfile.py b/conanfile.py index 8532b2a..0e3c3a0 100644 --- a/conanfile.py +++ b/conanfile.py @@ -11,3 +11,7 @@ class MainProject(ConanFile): description = "module_posix_timer is used to generate deterministic triggers for other modules." exports_sources = ["*", "!.gitignore"] requires = ["robotkernel/[~6]@robotkernel/unstable", "service_provider_process_data_inspection/[~6]@robotkernel/unstable"] + + def source(self): + self.run(f"sed 's/AC_INIT(.*/AC_INIT([robotkernel], [{self.version}], [{self.author}])/' configure.ac.in > configure.ac") + diff --git a/project.properties b/project.properties deleted file mode 100644 index 226bc32..0000000 --- a/project.properties +++ /dev/null @@ -1,2 +0,0 @@ -MAINTAINER = Robert Burger -VERSION = 5.1.0