Merge pull request #274264 from flokli/udev-rules-allow-bin-sh

nixos/udev: allow /bin/sh in udev rules
This commit is contained in:
Florian Klink 2023-12-15 13:57:35 +02:00 committed by GitHub
commit f4de47d49e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -112,7 +112,8 @@ let
echo "OK"
filesToFixup="$(for i in "$out"/*; do
grep -l '\B\(/usr\)\?/s\?bin' "$i" || :
# list all files referring to (/usr)/bin paths, but allow references to /bin/sh.
grep -P -l '\B(?!\/bin\/sh\b)(\/usr)?\/bin(?:\/.*)?' "$i" || :
done)"
if [ -n "$filesToFixup" ]; then

View File

@ -35,10 +35,6 @@ stdenv.mkDerivation rec {
"UDEVLIBDIR=${placeholder "out"}/lib/udev/"
];
preBuild = ''
sed -e "s|/bin/sh|${bash}/bin/sh|" -i *.rules
'';
preInstall = ''
mkdir -p "$out/sbin" "$out/lib/udev/rules.d" "$out/share/man/man8"
'';