Github messages for voidlinux
 help / color / mirror / Atom feed
From: motorto <motorto@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] hackrf: fix udev rules directory
Date: Tue, 04 Oct 2022 22:49:51 +0200	[thread overview]
Message-ID: <20221004204951.1WbeEjB1nJ_hJdyv6tV1x302RELbPOK4DYo32KO6OKQ@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39633@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 734 bytes --]

There is an updated pull request by motorto against master on the void-packages repository

https://github.com/motorto/void-packages hackrf
https://github.com/void-linux/void-packages/pull/39633

hackrf: fix udev rules directory
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - armv6l

[39083](https://github.com/void-linux/void-packages/issues/39083)

A patch file from https://github.com/void-linux/void-packages/pull/39633.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-hackrf-39633.patch --]
[-- Type: text/x-diff, Size: 4365 bytes --]

From 0e204744782a1ad8b1cedd9be32d1791d888fc78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Cerqueira?= <acerqueira021@gmail.com>
Date: Tue, 4 Oct 2022 10:33:36 +0100
Subject: [PATCH] hckrf: remove duplicate udev rule;fix udev dir

Fix fail, because it installs rules on /etc/udev/rules.d which is
forbidden use /usr/lib/udev/rules.d instead.

```
=> hackrf-2021.03.1_1: running pre-pkg hook: 99-pkglint ...
=> ERROR: /etc/udev/rules.d is forbidden. Use /usr/lib/udev/rules.d.
=> ERROR: cannot continue with installation!
```
---
 .../fix-device-acess-via-elogind.patch        | 24 +++++++++++++++++++
 srcpkgs/hackrf/template                       | 11 ++++-----
 2 files changed, 28 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/hackrf/patches/fix-device-acess-via-elogind.patch

diff --git a/srcpkgs/hackrf/patches/fix-device-acess-via-elogind.patch b/srcpkgs/hackrf/patches/fix-device-acess-via-elogind.patch
new file mode 100644
index 000000000000..769397760a6c
--- /dev/null
+++ b/srcpkgs/hackrf/patches/fix-device-acess-via-elogind.patch
@@ -0,0 +1,24 @@
+enable device access via elogind
+
+--- a/host/libhackrf/53-hackrf.rules.in
++++ b/host/libhackrf/53-hackrf.rules.in
+@@ -1,13 +1,13 @@
+ # HackRF Jawbreaker
+-ATTR{idVendor}=="1d50", ATTR{idProduct}=="604b", SYMLINK+="hackrf-jawbreaker-%k", MODE="660", GROUP="@HACKRF_GROUP@"
++ATTR{idVendor}=="1d50", ATTR{idProduct}=="604b", SYMLINK+="hackrf-jawbreaker-%k", MODE="660", GROUP="@HACKRF_GROUP@", TAG+="uaccess"
+ # HackRF One
+-ATTR{idVendor}=="1d50", ATTR{idProduct}=="6089", SYMLINK+="hackrf-one-%k", MODE="660", GROUP="@HACKRF_GROUP@"
++ATTR{idVendor}=="1d50", ATTR{idProduct}=="6089", SYMLINK+="hackrf-one-%k", MODE="660", GROUP="@HACKRF_GROUP@", TAG+="uaccess"
+ # rad1o
+-ATTR{idVendor}=="1d50", ATTR{idProduct}=="cc15", SYMLINK+="rad1o-%k", MODE="660", GROUP="@HACKRF_GROUP@"
++ATTR{idVendor}=="1d50", ATTR{idProduct}=="cc15", SYMLINK+="rad1o-%k", MODE="660", GROUP="@HACKRF_GROUP@", TAG+="uaccess"
+ # NXP Semiconductors DFU mode (HackRF and rad1o)
+-ATTR{idVendor}=="1fc9", ATTR{idProduct}=="000c", SYMLINK+="nxp-dfu-%k", MODE="660", GROUP="@HACKRF_GROUP@"
++ATTR{idVendor}=="1fc9", ATTR{idProduct}=="000c", SYMLINK+="nxp-dfu-%k", MODE="660", GROUP="@HACKRF_GROUP@", TAG+="uaccess"
+ # rad1o "full flash" mode
+-KERNEL=="sd?", SUBSYSTEM=="block", ENV{ID_VENDOR_ID}=="1fc9", ENV{ID_MODEL_ID}=="0042", SYMLINK+="rad1o-flash-%k", MODE="660", GROUP="@HACKRF_GROUP@"
++KERNEL=="sd?", SUBSYSTEM=="block", ENV{ID_VENDOR_ID}=="1fc9", ENV{ID_MODEL_ID}=="0042", SYMLINK+="rad1o-flash-%k", MODE="660", GROUP="@HACKRF_GROUP@", TAG+="uaccess"
+ # rad1o flash disk
+-KERNEL=="sd?", SUBSYSTEM=="block", ENV{ID_VENDOR_ID}=="1fc9", ENV{ID_MODEL_ID}=="0082", SYMLINK+="rad1o-msc-%k", MODE="660", GROUP="@HACKRF_GROUP@"
++KERNEL=="sd?", SUBSYSTEM=="block", ENV{ID_VENDOR_ID}=="1fc9", ENV{ID_MODEL_ID}=="0082", SYMLINK+="rad1o-msc-%k", MODE="660", GROUP="@HACKRF_GROUP@", TAG+="uaccess"
+ #
diff --git a/srcpkgs/hackrf/template b/srcpkgs/hackrf/template
index 9e756967f44c..0fe613838e85 100644
--- a/srcpkgs/hackrf/template
+++ b/srcpkgs/hackrf/template
@@ -1,9 +1,10 @@
 # Template file for 'hackrf'
 pkgname=hackrf
 version=2021.03.1
-revision=1
+revision=2
 build_wrksrc=host
 build_style=cmake
+configure_args="-DUDEV_RULES_PATH=/usr/lib/udev/rules.d/ -Wno-dev"
 hostmakedepends="pkg-config"
 makedepends="libusb-devel fftw-devel"
 _desc="Low cost software defined radio (SDR) platform"
@@ -11,13 +12,9 @@ short_desc="${_desc} - tools"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://greatscottgadgets.com/hackrf/"
-distfiles="https://github.com/mossmann/hackrf/releases/download/v${version}/${pkgname}-${version}.tar.xz"
+distfiles="https://github.com/greatscottgadgets/hackrf/releases/download/v${version}/${pkgname}-${version}.tar.xz"
 checksum=a43e5080c11efdfe69ddebcc35a02b018e30e820de0e0ebdc7948cf7b0cd93a3
 
-pre_configure() {
-	vsed -i 's|MODE="660", GROUP="plugdev"|TAG+="uaccess"|g' libhackrf/53-hackrf.rules
-}
-
 post_install() {
 	for f in ../firmware-bin/*.{bin,dfu}; do
 		vinstall "$f" 644 usr/share/hackrf/
@@ -28,7 +25,7 @@ libhackrf_package() {
 	short_desc="${_desc} - library"
 	pkg_install() {
 		vmove usr/lib/*.so.*
-		vinstall libhackrf/53-hackrf.rules 644 usr/lib/udev/rules.d/
+		vmove usr/lib/udev/rules.d
 	}
 }
 

  parent reply	other threads:[~2022-10-04 20:49 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-02 20:21 [PR PATCH] " motorto
2022-10-02 20:25 ` [PR PATCH] [Updated] " motorto
2022-10-02 20:36 ` motorto
2022-10-02 21:32 ` Piraty
2022-10-02 21:34 ` Piraty
2022-10-02 21:56 ` paper42
2022-10-03  5:57 ` motorto
2022-10-03  6:00 ` [PR PATCH] [Updated] " motorto
2022-10-03 12:33 ` classabbyamp
2022-10-03 15:40 ` Piraty
2022-10-04  9:40 ` motorto
2022-10-04  9:40 ` [PR PATCH] [Updated] " motorto
2022-10-04  9:42 ` motorto
2022-10-04 11:02 ` motorto
2022-10-04 11:08 ` Piraty
2022-10-04 11:14 ` [PR PATCH] [Updated] " motorto
2022-10-04 17:32 ` classabbyamp
2022-10-04 17:33 ` classabbyamp
2022-10-04 19:37 ` [PR PATCH] [Updated] " motorto
2022-10-04 19:41 ` motorto
2022-10-04 19:46 ` motorto
2022-10-04 19:50 ` [PR PATCH] [Updated] " motorto
2022-10-04 20:46 ` classabbyamp
2022-10-04 20:49 ` motorto [this message]
2022-10-04 20:56 ` [PR PATCH] [Updated] " motorto
2022-10-04 21:01 ` [PR PATCH] [Merged]: " classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221004204951.1WbeEjB1nJ_hJdyv6tV1x302RELbPOK4DYo32KO6OKQ@z \
    --to=motorto@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).