From f4772a95ab11da7187f7f9fcdeba459d018714cc Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Jul 01 2019 08:56:01 +0000 Subject: Update to version 0.3 --- diff --git a/.gitignore b/.gitignore index 9e959a2..a07b3a7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /minipro-0.1-484abde.tar.gz /minipro-0.1-e897666.tar.gz /minipro-57b293d.tar.gz +/minipro-0.3.tar.gz diff --git a/0001-Revert-Renamed-Debian-udev-rules-file.patch b/0001-Revert-Renamed-Debian-udev-rules-file.patch deleted file mode 100644 index 9822f67..0000000 --- a/0001-Revert-Renamed-Debian-udev-rules-file.patch +++ /dev/null @@ -1,51 +0,0 @@ -From f0a752dbb1af845c29f97a072e600eebc45335d7 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Sat, 9 Feb 2019 18:38:36 +0100 -Subject: [PATCH 1/3] Revert "Renamed Debian udev rules file" - -This is not a Debian udev rules file. It works on any reasonably recent -Linux distribution. Bring it to the original, correct location. - -See commit 88c9553cf ('udev: add uaccess tag'). - -This reverts commit 0ad5a2a01e6233f4173ed49ee19a94f1e71d805d. ---- - README.md | 2 +- - debian/rules | 2 +- - udev/{debian/60-minipro.rules => rules.d/80-minipro.rules} | 0 - 3 files changed, 2 insertions(+), 2 deletions(-) - rename udev/{debian/60-minipro.rules => rules.d/80-minipro.rules} (100%) - -diff --git a/README.md b/README.md -index c3f8ad5..320f26b 100644 ---- a/README.md -+++ b/README.md -@@ -54,7 +54,7 @@ permissions. - - #### Debian/Ubuntu - ```nohighlight --sudo cp udev/debian/60-minipro.rules /etc/udev/rules.d/ -+sudo cp udev/rules.d/80-minipro.rules /etc/udev/rules.d/ - sudo udevadm trigger - ``` - You'll also have to add your regular user to the `plugdev` system -diff --git a/debian/rules b/debian/rules -index 24e858f..dd45c1b 100755 ---- a/debian/rules -+++ b/debian/rules -@@ -16,7 +16,7 @@ override_dh_auto_install: - PREFIX=/usr - - override_dh_installudev: -- cp udev/debian/60-minipro.rules debian/minipro.udev -+ cp udev/rules.d/80-minipro.rules debian/minipro.udev - dh_installudev - rm -f debian/minipro.udev - -diff --git a/udev/debian/60-minipro.rules b/udev/rules.d/80-minipro.rules -similarity index 100% -rename from udev/debian/60-minipro.rules -rename to udev/rules.d/80-minipro.rules --- -2.20.1 - diff --git a/0001-udev-split-the-uaccess-rule-into-a-separate-file.patch b/0001-udev-split-the-uaccess-rule-into-a-separate-file.patch index dbdd65b..f46180a 100644 --- a/0001-udev-split-the-uaccess-rule-into-a-separate-file.patch +++ b/0001-udev-split-the-uaccess-rule-into-a-separate-file.patch @@ -1,4 +1,4 @@ -From b22e71ca47c685b82631effe925ed270ed76e016 Mon Sep 17 00:00:00 2001 +From 027496b5552edc8200f07764971266d43688d5f1 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Thu, 12 Jan 2017 08:54:39 +0100 Subject: [PATCH] udev: split the uaccess rule into a separate file @@ -17,10 +17,10 @@ doesn't cause any trouble. create mode 100644 udev/rules.d/60-minipro.rules diff --git a/Makefile b/Makefile -index acbe657..357bee5 100644 +index 06cbfca..4ed8fb3 100644 --- a/Makefile +++ b/Makefile -@@ -103,6 +103,7 @@ install: +@@ -119,6 +119,7 @@ install: cp man/minipro.1 $(MAN_INSTDIR)/ if [ -n "$(UDEV_DIR)" ]; then \ mkdir -p $(UDEV_RULES_INSTDIR); \ @@ -28,7 +28,7 @@ index acbe657..357bee5 100644 cp udev/rules.d/80-minipro.rules $(UDEV_RULES_INSTDIR)/; \ fi if [ -n "$(COMPLETIONS_DIR)" ]; then \ -@@ -114,6 +115,7 @@ uninstall: +@@ -130,6 +131,7 @@ uninstall: rm -f $(BIN_INSTDIR)/$(MINIPRO) rm -f $(BIN_INSTDIR)/$(MINIPROHEX) rm -f $(MAN_INSTDIR)/minipro.1 @@ -44,12 +44,15 @@ index 0000000..4b69fb4 @@ -0,0 +1 @@ +SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="e11c", TAG+="uaccess" diff --git a/udev/rules.d/80-minipro.rules b/udev/rules.d/80-minipro.rules -index 1b32040..b1976fc 100644 +index 3715d1e..ca3939b 100644 --- a/udev/rules.d/80-minipro.rules +++ b/udev/rules.d/80-minipro.rules -@@ -1,2 +1 @@ +@@ -1,5 +1,4 @@ + # TL866A/CS rules -SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="e11c", TAG+="uaccess" SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="e11c", MODE="0660", GROUP="plugdev" + + # TL866II+ rules -- -2.20.1 +2.21.0 diff --git a/0002-Revert-Added-Centos-udev-rules-and-updated-installat.patch b/0002-Revert-Added-Centos-udev-rules-and-updated-installat.patch deleted file mode 100644 index 176185c..0000000 --- a/0002-Revert-Added-Centos-udev-rules-and-updated-installat.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 12c60b3778b1cb80a3dd50f9dd3ecfa972154478 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Sat, 9 Feb 2019 18:41:10 +0100 -Subject: [PATCH 2/3] Revert "Added Centos udev rules and updated installation - instructions." - -The .rules file created a world-writable device. That is wrong. The -plugdev groups should have been used; and it actually already is in the -existing rules file. - -See also 78455b23 ('Avoid world-writable device'). - -This mostly reverts commit b2117ef0a13f1fee9132789d7e6819f1d31afc6e. -Some useful README.md changes were kept. ---- - README.md | 9 --------- - udev/centos7/80-minipro.rules | 5 ----- - 2 files changed, 14 deletions(-) - delete mode 100644 udev/centos7/80-minipro.rules - -diff --git a/README.md b/README.md -index 320f26b..2e28580 100644 ---- a/README.md -+++ b/README.md -@@ -52,7 +52,6 @@ If you want to access the programmer as a regular user, you'll have to - configure udev to recognize the programmer and set appropriate access - permissions. - --#### Debian/Ubuntu - ```nohighlight - sudo cp udev/rules.d/80-minipro.rules /etc/udev/rules.d/ - sudo udevadm trigger -@@ -65,14 +64,6 @@ sudo usermod -a -G plugdev YOUR-USER - Note that this change will only become effective after your next - login. - --#### CentOS 7 --```nohighlight --sudo cp udev/centos7/80-minipro.rules /etc/udev/rules.d/ --sudo udevadm control --reload-rules --``` --The CentOS rules file currently make the programmer device writable for --all users. -- - ### Bash completion (optional) - - Bash users may want to optionally install the provided completion file: -diff --git a/udev/centos7/80-minipro.rules b/udev/centos7/80-minipro.rules -deleted file mode 100644 -index d76fa59..0000000 ---- a/udev/centos7/80-minipro.rules -+++ /dev/null -@@ -1,5 +0,0 @@ --BUS!="usb", ACTION!="add", SUBSYSTEM!=="usb_device", GOTO="minipro_rules_end" -- --ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="e11c", MODE="0666" -- --LABEL="minipro_rules_end" --- -2.20.1 - diff --git a/0003-Revert-Remove-udev-and-bash-completion-installation-.patch b/0003-Revert-Remove-udev-and-bash-completion-installation-.patch deleted file mode 100644 index fb99ce0..0000000 --- a/0003-Revert-Remove-udev-and-bash-completion-installation-.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 205528dd3813394f9c5c3f3f38d637c9f03102f5 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Sat, 9 Feb 2019 18:38:07 +0100 -Subject: [PATCH 3/3] Revert "Remove udev and bash-completion installation from - Makefile" - -It is entirely unclear why was this removed, but it was usueful for -distribution package maintainers. Bring it back. - -This reverts commit 991615a2d715c2a84d0f5f9a0bbe1ec697c6ee91. ---- - Makefile | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git a/Makefile b/Makefile -index 2514cc8..acbe657 100644 ---- a/Makefile -+++ b/Makefile -@@ -48,6 +48,12 @@ DIST_DIR = $(MINIPRO)-$(GIT_TAG) - BIN_INSTDIR=$(DESTDIR)$(PREFIX)/bin - MAN_INSTDIR=$(DESTDIR)$(PREFIX)/share/man/man1 - -+UDEV_DIR=$(shell pkg-config --define-variable=prefix=$(PREFIX) --silence-errors --variable=udevdir udev) -+UDEV_RULES_INSTDIR=$(DESTDIR)$(UDEV_DIR)/rules.d -+ -+COMPLETIONS_DIR=$(shell pkg-config --define-variable=prefix=$(PREFIX) --silence-errors --variable=completionsdir bash-completion) -+COMPLETIONS_INSTDIR=$(DESTDIR)$(COMPLETIONS_DIR) -+ - libusb_CFLAGS := $(shell $(PKG_CONFIG) --cflags libusb-1.0) - libusb_LIBS := $(shell $(PKG_CONFIG) --libs libusb-1.0) - -@@ -95,11 +101,21 @@ install: - cp $(MINIPRO) $(BIN_INSTDIR)/ - cp $(MINIPROHEX) $(BIN_INSTDIR)/ - cp man/minipro.1 $(MAN_INSTDIR)/ -+ if [ -n "$(UDEV_DIR)" ]; then \ -+ mkdir -p $(UDEV_RULES_INSTDIR); \ -+ cp udev/rules.d/80-minipro.rules $(UDEV_RULES_INSTDIR)/; \ -+ fi -+ if [ -n "$(COMPLETIONS_DIR)" ]; then \ -+ mkdir -p $(COMPLETIONS_INSTDIR); \ -+ cp bash_completion.d/minipro $(COMPLETIONS_INSTDIR)/; \ -+ fi - - uninstall: - rm -f $(BIN_INSTDIR)/$(MINIPRO) - rm -f $(BIN_INSTDIR)/$(MINIPROHEX) - rm -f $(MAN_INSTDIR)/minipro.1 -+ if [ -n "$(UDEV_DIR)" ]; then rm -f $(UDEV_RULES_INSTDIR)/80-minipro.rules; fi -+ if [ -n "$(COMPLETIONS_DIR)" ]; then rm -f $(COMPLETIONS_INSTDIR)/minipro; fi - - dist: distclean version-info - git archive --format=tar --prefix=minipro-$(GIT_TAG)/ HEAD | tar xf - --- -2.20.1 - diff --git a/minipro.spec b/minipro.spec index 415dd27..e77c007 100644 --- a/minipro.spec +++ b/minipro.spec @@ -1,24 +1,16 @@ -%global commit 57b293d603c5dc7217c3439a88809605d09d7293 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - Name: minipro -Version: 0.2 -Release: 1.20181017git%{shortcommit}%{?dist} +Version: 0.3 +Release: 1%{?dist} Summary: Utility for MiniPro TL866A/TL866/CS programmer # From the bundled debian/copyright file, # GPLv3 text is shipped though License: GPLv2+ URL: https://gitlab.com/DavidGriffith/minipro -Source0: https://gitlab.com/DavidGriffith/minipro/-/archive/%{commit}/%{name}-%{shortcommit}.tar.gz - -# https://gitlab.com/DavidGriffith/minipro/merge_requests/126 -Patch0: 0001-Revert-Renamed-Debian-udev-rules-file.patch -Patch1: 0002-Revert-Added-Centos-udev-rules-and-updated-installat.patch -Patch2: 0003-Revert-Remove-udev-and-bash-completion-installation-.patch +Source0: https://gitlab.com/DavidGriffith/minipro/-/archive/%{version}/%{name}-%{version}.tar.gz # https://github.com/vdudouyt/minipro/pull/68 -Patch3: https://github.com/lkundrak/minipro/commit/48fb5e1a.patch#/0001-udev-split-the-uaccess-rule-into-a-separate-file.patch +Patch1: 0001-udev-split-the-uaccess-rule-into-a-separate-file.patch BuildRequires: gcc BuildRequires: pkgconfig(libusb-1.0) @@ -33,17 +25,12 @@ various BIOSes and EEPROMs). %prep -%setup -q -n %{name}-%{commit} -%patch0 -p1 +%setup -q %patch1 -p1 -%patch2 -p1 -%patch3 -p1 %build -make %{?_smp_mflags} CFLAGS='%{optflags}' BUILD_DATE_TIME='20190209.190815' \ - GIT_BRANCH=master GIT_HASH=%{commit} \ - GIT_HASH_SHORT=%{shortcommit} GIT_TAG=%{version} +make %{?_smp_mflags} CFLAGS='%{optflags}' %install @@ -70,6 +57,9 @@ udevadm trigger --subsystem-match=usb --attr-match=idVendor=04d8 --attr-match=id %changelog +* Mon Jul 01 2019 Lubomir Rintel - 0.3-1 +- Update to version 0.3 + * Sat Feb 09 2019 Lubomir Rintel - 0.2-1.20181017git57b293d - Update to a newer version diff --git a/sources b/sources index bda6baf..dbcfe5d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (minipro-57b293d.tar.gz) = 3a053a4437833cc9c0ed4f4c30cd4e74120217a77b2351d0335bf0084b3acd09c8eb80970a6b590920013458dcf527eb78410c33dbd037b2834ccaae6fa716e0 +SHA512 (minipro-0.3.tar.gz) = 6a03cd4bc5c4fc92015523ae1881e009886b428f5645a7b7e9ff0fd14934006514d295228667f6d2abfaf1e21fdbaa9a20c7ca3b0850c566afc11f731589f447