Use 'sed' to update udev.rules instead of a patch
The patch needs to updated every time the udev.rules change, whereas using sed during the build is automatic, and less error prone.
This commit is contained in:
parent
c44f1b4389
commit
d40416e566
@ -1,87 +0,0 @@
|
||||
From: Peter Lemenkov <lemenkov@gmail.com>
|
||||
Date: Wed, 8 Mar 2017 20:21:16 +0300
|
||||
Subject: [PATCH] Switch to uaccess
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
|
||||
diff --git a/util/z60_flashrom.rules b/util/z60_flashrom.rules
|
||||
index cfe553e..ed4f633 100644
|
||||
--- a/util/z60_flashrom.rules
|
||||
+++ b/util/z60_flashrom.rules
|
||||
@@ -34,60 +34,60 @@ SUBSYSTEM!="usb|usb_device", GOTO="flashrom_rules_end"
|
||||
|
||||
# Amontec JTAGkey(2)
|
||||
# http://www.amontec.com/jtagkey.shtml
|
||||
-ATTRS{idVendor}=="0403", ATTRS{idProduct}=="cff8", MODE="664", GROUP="plugdev"
|
||||
+ATTRS{idVendor}=="0403", ATTRS{idProduct}=="cff8", TAG+="uaccess"
|
||||
|
||||
# Buspirate
|
||||
# http://dangerousprototypes.com/2009/10/08/bus-pirate-raw-spi-mode/
|
||||
-ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="664", GROUP="plugdev"
|
||||
+ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", TAG+="uaccess"
|
||||
|
||||
# Dediprog SF100
|
||||
# http://www.dediprog.com/SPI-flash-in-circuit-programming/SF100
|
||||
-ATTRS{idVendor}=="0483", ATTRS{idProduct}=="dada", MODE="664", GROUP="plugdev"
|
||||
+ATTRS{idVendor}=="0483", ATTRS{idProduct}=="dada", TAG+="uaccess"
|
||||
|
||||
# DLP Design DLP-USB1232H
|
||||
# http://www.dlpdesign.com/usb/usb1232h.shtml
|
||||
-ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="664", GROUP="plugdev"
|
||||
+ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", TAG+="uaccess"
|
||||
|
||||
# FIC OpenMoko Neo1973 Debug board (V2+)
|
||||
# http://wiki.openmoko.org/wiki/Neo1973_Debug_Board_v2
|
||||
-ATTRS{idVendor}=="1457", ATTRS{idProduct}=="5118", MODE="664", GROUP="plugdev"
|
||||
+ATTRS{idVendor}=="1457", ATTRS{idProduct}=="5118", TAG+="uaccess"
|
||||
|
||||
# FTDI FT4232H Mini-Module
|
||||
# http://www.ftdichip.com/Products/EvaluationKits/FT4232H_MiniModule.htm
|
||||
-ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", MODE="664", GROUP="plugdev"
|
||||
+ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", TAG+="uaccess"
|
||||
|
||||
# GOEPEL PicoTAP
|
||||
# http://www.goepel.com/jtagboundary-scan/hardware/picotap.html
|
||||
-ATTRS{idVendor}=="096c", ATTRS{idProduct}=="1449", MODE="664", GROUP="plugdev"
|
||||
+ATTRS{idVendor}=="096c", ATTRS{idProduct}=="1449", TAG+="uaccess"
|
||||
|
||||
# Google servo debug board
|
||||
# https://www.chromium.org/chromium-os/servo
|
||||
-ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="5001", MODE="664", GROUP="plugdev"
|
||||
-ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="5002", MODE="664", GROUP="plugdev"
|
||||
-ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="5003", MODE="664", GROUP="plugdev"
|
||||
+ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="5001", TAG+="uaccess"
|
||||
+ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="5002", TAG+="uaccess"
|
||||
+ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="5003", TAG+="uaccess"
|
||||
|
||||
# Olimex ARM-USB-OCD
|
||||
# http://olimex.com/dev/arm-usb-ocd.html
|
||||
-ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="0003", MODE="664", GROUP="plugdev"
|
||||
+ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="0003", TAG+="uaccess"
|
||||
|
||||
# Olimex ARM-USB-OCD-H
|
||||
# http://olimex.com/dev/arm-usb-ocd-h.html
|
||||
-ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="002b", MODE="664", GROUP="plugdev"
|
||||
+ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="002b", TAG+="uaccess"
|
||||
|
||||
# Olimex ARM-USB-TINY
|
||||
# http://olimex.com/dev/arm-usb-tiny.html
|
||||
-ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="0004", MODE="664", GROUP="plugdev"
|
||||
+ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="0004", TAG+="uaccess"
|
||||
|
||||
# Olimex ARM-USB-TINY-H
|
||||
# http://olimex.com/dev/arm-usb-tiny-h.html
|
||||
-ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="002a", MODE="664", GROUP="plugdev"
|
||||
+ATTRS{idVendor}=="15ba", ATTRS{idProduct}=="002a", TAG+="uaccess"
|
||||
|
||||
# TIAO/DIYGADGET USB Multi-Protocol Adapter (TUMPA)
|
||||
# http://www.diygadget.com/tiao-usb-multi-protocol-adapter-jtag-spi-i2c-serial.html
|
||||
-ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8a98", MODE="664", GROUP="plugdev"
|
||||
+ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8a98", TAG+="uaccess"
|
||||
|
||||
# TIAO/DIYGADGET USB Multi-Protocol Adapter (TUMPA) Lite
|
||||
# http://www.tiaowiki.com/w/TIAO_USB_Multi_Protocol_Adapter_Lite_User's_Manual
|
||||
-ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8a99", MODE="664", GROUP="plugdev"
|
||||
+ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8a99", TAG+="uaccess"
|
||||
|
||||
LABEL="flashrom_rules_end"
|
@ -1,12 +1,11 @@
|
||||
Summary: Simple program for reading/writing flash chips content
|
||||
Name: flashrom
|
||||
Version: 0.9.9
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
License: GPLv2
|
||||
URL: http://flashrom.org
|
||||
|
||||
Source0: http://download.flashrom.org/releases/%{name}-%{version}.tar.bz2
|
||||
Patch1: flashrom-0001-Switch-to-uaccess.patch
|
||||
|
||||
BuildRequires: pciutils-devel
|
||||
BuildRequires: libftdi-devel
|
||||
@ -33,7 +32,8 @@ other programmer devices.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1 -b .uaccess
|
||||
# Replace GROUP="plugdev" specifiers with TAG+="uaccess"
|
||||
sed -e 's/MODE="[0-9]*", GROUP="plugdev"/TAG=+"uaccess"/g' util/z60_flashrom.rules -i
|
||||
|
||||
%ifarch %{ix86} x86_64
|
||||
# 'internal' programmer is only supported on x86 platforms
|
||||
@ -62,6 +62,9 @@ install -D -p -m 0644 util/z60_flashrom.rules %{buildroot}/%{_udevrulesdir}/z60_
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Oct 04 2017 mrnuke <mr.nuke.me@gmail.com> - 0.9.9-6
|
||||
- Drop uaccess.patch in favor of sed script
|
||||
|
||||
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.9-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user