| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Let's use a proper unicode copyright symbol where we can, it's prettier.
This important patch is very important.
|
|
|
|
|
|
|
|
|
|
| |
Files which are installed as-is (any .service and other unit files, .conf
files, .policy files, etc), are left as is. My assumption is that SPDX
identifiers are not yet that well known, so it's better to retain the
extended header to avoid any doubt.
I also kept any copyright lines. We can probably remove them, but it'd nice to
obtain explicit acks from all involved authors before doing that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A runaway string should still be returned by the code that splits on
commas, so add a '?' to the regex so that the last '"?' in a string
still produces a valid block for the split code.
Tested:
ACTION=="remove\"GOTO=""
Which then produced:
$ test/rule-syntax-check.py src/login/70-uaccess.rules
# looking at src/login/70-uaccess.rules
Invalid line src/login/70-uaccess.rules:10: ACTION=="remove\"GOTO=""
clause: ACTION=="remove\"GOTO=""
|
|
|
|
|
|
|
|
|
|
|
| |
Using a regex to match the groups is smarter than the split(',') that
would break in those cases.
Tested:
SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*,*:070202:*", TAG+="uaccess"
Rule checker doesn't break there after this commit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support to backslash-escaped double quote inside a string.
Tested by modifying src/login/70-uaccess.rules to include:
ACTION=="remove" it", GOTO="uaccess_end"
And had the rule checker complain about it:
$ test/rule-syntax-check.py src/login/70-uaccess.rules
# looking at src/login/70-uaccess.rules
Invalid line src/login/70-uaccess.rules:10: ACTION=="remove" it", GOTO="uaccess_end"
clause: ACTION=="remove" it"
|
|
|
|
|
|
|
|
|
| |
This is true since commit 7e760b79ad143b26a5c937afa7666a7c40508f85.
Note that the changes in the regex expressions relies on the fact that the
script assumes that the comma separator is mandatory.
Add a comment in the script to clarify this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In udev man page, "PROGRAM" key is part of the keys which are used for
matching purposes so it should only be used with the compare operator "==".
Actually it doesn't really make sense to assign it a value.
udev code allows both "=" and "==" for PROGRAM and both are handled the same
way but for consistencies it's better to have only the compare operator allowed
by the rule syntax checker.
No rules shipped by systemd use PROGRAM key so nothing need to be changed in
our rule files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
39/248 rule-syntax-check OK 0.07 s
--- command ---
/home/zbyszek/src/systemd-work/test/rule-syntax-check.py \
/home/zbyszek/src/systemd-work/build/../rules/60-block.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-cdrom_id.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-drm.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-evdev.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-input-id.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-persistent-alsa.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-persistent-input.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-persistent-storage.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-persistent-storage-tape.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-persistent-v4l.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-sensor.rules \
/home/zbyszek/src/systemd-work/build/../rules/60-serial.rules \
/home/zbyszek/src/systemd-work/build/../rules/70-joystick.rules \
/home/zbyszek/src/systemd-work/build/../rules/70-mouse.rules \
/home/zbyszek/src/systemd-work/build/../rules/70-touchpad.rules \
/home/zbyszek/src/systemd-work/build/../rules/75-net-description.rules \
/home/zbyszek/src/systemd-work/build/../rules/75-probe_mtd.rules \
/home/zbyszek/src/systemd-work/build/../rules/78-sound-card.rules \
/home/zbyszek/src/systemd-work/build/../rules/80-drivers.rules \
/home/zbyszek/src/systemd-work/build/../rules/80-net-setup-link.rules \
/home/zbyszek/src/systemd-work/build/rules/50-udev-default.rules \
/home/zbyszek/src/systemd-work/build/rules/64-btrfs.rules \
/home/zbyszek/src/systemd-work/build/rules/99-systemd.rules
--- stdout ---
...
-------
It got dropped by mistake in 72cdb3e783174dcf9223a49f03e3b0e2ca95ddb8.
|
| |
|
| |
|
|
|
|
|
| |
This is useful on systems like NixOS, where python3 is not in
/usr/bin/python3 as well as for people using alternative ways to
install python such as virtualenv/pyenv.
|
|
|
|
|
| |
Behaviour is not changed, because "unknown" escapes like \s or \d were not
substituted, but it's much nicer to use raw strings to avoid ambiguity.
|
| |
|
|
|
|
|
|
| |
This facility was never a proper solution, but only papered over
real bugs in the kernel. There are no known sysfs "timing bugs"
since a long time.
|
|
|
|
|
|
|
|
|
| |
Drop globbing of rules/*.rules in the rules-test.sh wrapper and move that logic
into the actual test rule-syntax-check.py. This can still be called with
individual rules files, but when being called without arguments it will now
process all top_builddir/rules/*.rules.
Preparation for dropping the shell wrappers altogether.
|
|
|
|
| |
Don't hardcode "python" or /usr/bin/python, but use the configured $(PYTHON).
|
|
|
|
| |
Make this work with both Python 2 and 3.
|
|
|
|
| |
Checked with and got OK from Martin.
|
|
|
|
| |
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=57206
|
| |
|
|
|