From owner at bugs.debian.org Wed Oct 7 08:39:03 2026 From: owner at bugs.debian.org (Debian Bug Tracking System) Date: Wed, 07 Oct 2026 07:39:03 +0000 Subject: [Pkg-raspi-maintainers] Processed: Bug#1009654: fixed: patch attached (udev rule command truncation) References: <6ac5f6d5.aec4f0e4.21b6cb.4577@mx.google.com> <164986775845.27605.5000005601467311368.reportbug@swintlab-xbrr-1> Message-ID: Processing control commands: > tags 1009654 + patch Bug #1009654 [rpi.gpio-common] rpi.gpio-common: udev rule gets truncated for long device paths Added tag(s) patch. -- 1009654: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009654 Debian Bug Tracking System Contact owner at bugs.debian.org with problems From 2014.stefanandreiionut at gmail.com Wed Oct 7 08:37:57 2026 From: 2014.stefanandreiionut at gmail.com (2014.stefanandreiionut at gmail.com) Date: Wed, 07 Oct 2026 00:37:57 -0700 (PDT) Subject: [Pkg-raspi-maintainers] Bug#1009654: fixed: patch attached (udev rule command truncation) References: <164986775845.27605.5000005601467311368.reportbug@swintlab-xbrr-1> Message-ID: <6ac5f6d5.aec4f0e4.21b6cb.4577@mx.google.com> Control: tags 1009654 + patch Attached is a patch fixing the udev rule truncation. Root cause: the PROGRAM= value in debian/rpi.gpio-common.udev's third rule substitutes %p eight separate times (four in the chown arguments, four in the chmod arguments). udev performs this substitution into the rule text before invoking /bin/sh, so a deeply nested device path (e.g. reached through a chain of USB hubs) gets multiplied by 8x in the final command string, which is what overruns udev's ~1023-character internal limit on PROGRAM values and produces the truncation described in the original report. Fix: substitute %p once into a shell variable ($p, escaped as $$p so udev itself doesn't try to interpret it as one of its own $-prefixed specifiers) and reuse that variable for all eight references instead of re-substituting %p each time. This cuts the multiplier from 8x to 1x. Verified: - udevadm verify reports the patched rule file as syntactically valid - Simulated against a realistic deeply-nested USB-hub sysfs path: the original rule produces a 1515-character command (over the limit, reproducing the reported truncation); the patched rule produces a 310-character command for the same path (comfortably under it) - Patch applies cleanly against a fresh pristine 0.7.1~a4-1.2 source tree The reporter's own suggested alternative (splitting into multiple shorter PROGRAM rules) would also work but only reduces the multiplier by a constant factor rather than addressing why the substitution happens repeatedly in the first place; this patch is a smaller diff with a larger safety margin. Changes: - debian/rpi.gpio-common.udev (one line changed) - debian/changelog -------------- next part -------------- A non-text attachment was scrubbed... Name: rpigpio-udev-truncation.patch Type: text/x-diff Size: 1615 bytes Desc: not available URL: