Compare commits

...

6 Commits

Author SHA1 Message Date
Brian Witt fc137a63d6
Merge cb2ca58e4b into 1520ab5b98 2026-03-04 11:34:34 -08:00
Marc Kleine-Budde 1520ab5b98
Merge pull request #620 from marckleinebudde/mcp251xfd-fix-strchr
mcp251xfd: mcp251xfd_regmap_read(): don't assign return value of `strchr()` to `char *`
2026-03-04 11:38:43 +01:00
Marc Kleine-Budde aa902ae2af mcp251xfd: mcp251xfd_regmap_read(): don't assign return value of strchr() to `char *`
The `file_path` of `strchr(file_path, '/')` is a `const char *`. In this
case the `strchr()` in debian experimental returns a `const char *`,
leading to this error message:

```
mcp251xfd/mcp251xfd-regmap.c:75:13: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
   75 |         tmp = strchr(file_path, '/');
      |             ^
```

Fix the error by using the return value from `strchr()` directly in the
`if()`.

Link: https://github.com/linux-can/can-utils/actions/runs/22649777324/job/65679726209?pr=619
2026-03-04 11:35:38 +01:00
Marc Kleine-Budde a0b592178e
Merge pull request #621 from marckleinebudde/remove-mips
github-actions: remove mips for now

Closes: https://github.com/linux-can/can-utils/issues/611
2026-03-04 11:34:12 +01:00
Marc Kleine-Budde 4f2fdecfba github-actions: remove mips for now
It's being phased out on Ubuntu rolling release.
2026-03-04 11:30:14 +01:00
Brian Witt cb2ca58e4b
add minimal ubuntu deb building 2025-12-16 21:45:12 -08:00
6 changed files with 89 additions and 10 deletions

View File

@ -75,7 +75,6 @@ jobs:
gcc \ gcc \
gcc-aarch64-linux-gnu \ gcc-aarch64-linux-gnu \
gcc-arm-linux-gnueabihf \ gcc-arm-linux-gnueabihf \
gcc-mips-linux-gnu \
libgps-dev \ libgps-dev \
make make
@ -139,13 +138,6 @@ jobs:
podman exec -i stable cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=cmake/${toolchain}.cmake -DENABLE_WERROR=ON -DENABLE_GPS=${gps} -B build-${toolchain} podman exec -i stable cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=cmake/${toolchain}.cmake -DENABLE_WERROR=ON -DENABLE_GPS=${gps} -B build-${toolchain}
podman exec -i stable cmake --build build-${toolchain} podman exec -i stable cmake --build build-${toolchain}
- name: Configure & Build with mips-linux-gnu-gcc
env:
toolchain: mips-linux-gnu-gcc
run: |
podman exec -i stable cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=cmake/${toolchain}.cmake -DENABLE_WERROR=ON -B build-${toolchain}
podman exec -i stable cmake --build build-${toolchain}
- name: Configure & Build with gcc (Makefile) - name: Configure & Build with gcc (Makefile)
env: env:
cc: gcc cc: gcc

View File

@ -0,0 +1,57 @@
name: Build Deb Package
on:
release:
types: [created]
permissions:
contents: write
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
steps:
- name: Checkout source code
uses: actions/checkout@v6
with:
path: can-utils
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential devscripts debhelper cmake equivs
cd can-utils
# Install build dependencies defined in debian/control
sudo mk-build-deps -i -r -t "apt-get -y" debian/control
- name: Update changelog
run: |
cd can-utils
# Get version from tag, strip 'v' prefix if present
VERSION=${{ github.event.release.tag_name }}
VERSION=${VERSION#v}
# Add new entry to changelog
# Use the codename of the current OS (jammy or noble)
CODENAME=$(lsb_release -cs)
dch --create -v "${VERSION}-1~${CODENAME}" --package can-utils --distribution ${CODENAME} "New upstream release ${VERSION}"
dch -r ""
- name: Build package
run: |
cd can-utils
# Build binary packages only, unsigned
dpkg-buildpackage -us -uc -b
- name: Upload to Release
uses: softprops/action-gh-release@v2
with:
files: |
*.deb

5
debian/changelog vendored 100644
View File

@ -0,0 +1,5 @@
can-utils (0.0.0-1) unstable; urgency=medium
* Initial release.
-- Maintainer Name <maintainer@example.com> Thu, 01 Jan 1970 00:00:00 +0000

23
debian/control vendored 100644
View File

@ -0,0 +1,23 @@
Source: can-utils
Section: net
Priority: optional
Maintainer: GitHub Actions <actions@github.com>
Build-Depends: debhelper-compat (= 13), cmake
Standards-Version: 4.6.2
Homepage: https://github.com/linux-can/can-utils
Package: can-utils
Architecture: linux-any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: SocketCAN userspace utilities and tools
This package contains some userspace utilities for Linux SocketCAN subsystem.
Basic tools to display, record, generate and replay CAN traffic:
candump, canplayer, cansend, cangen, cansniffer, cansequence.
CAN access via IP sockets: canlogserver, bcmserver.
CAN in-kernel gateway configuration: cangw.
CAN bus measurement and testing: canbusload, can-calc-bit-timing, canfdtest, canerrsim.
ISO-TP tools: isotpsend, isotprecv, isotpsniffer, isotpdump, isotpserver, isotptun.
CAN log file converters: asc2log, log2asc, log2long.
Serial Line Discipline configuration: slcan_attach, slcand, slcanpty.
J1939 tools: j1939acd, j1939cat, j1939spy, j1939sr, testj1939.

3
debian/rules vendored 100644
View File

@ -0,0 +1,3 @@
#!/usr/bin/make -f
%:
dh $@

View File

@ -72,8 +72,7 @@ int mcp251xfd_regmap_read(struct mcp251xfd_priv *priv,
return 0; return 0;
/* maybe it's something like "spi0.0" */ /* maybe it's something like "spi0.0" */
tmp = strchr(file_path, '/'); if (strchr(file_path, '/'))
if (tmp)
return -ENOENT; return -ENOENT;
/* first try literally */ /* first try literally */