[PATCH] gnu: Add libusb-0.1

  • Done
  • quality assurance status badge
Details
2 participants
  • Jonathan Brielmaier
  • Marius Bakke
Owner
unassigned
Submitted by
Jonathan Brielmaier
Severity
normal

Debbugs page

Jonathan Brielmaier wrote 8 years ago
(address . guix-patches@gnu.org)(name . Jonathan Brielmaier)(address . jonathan.brielmaier@web.de)
1499987475-26967-1-git-send-email-jonathan.brielmaier@web.de
* gnu/packages/libusb.scm (libusb-0.1): New variable.
* gnu/packages/patches/libusb-0.1-disable-tests.patch: New file.
---
gnu/packages/libusb.scm | 14 ++++++++++++++
gnu/packages/patches/libusb-0.1-disable-tests.patch | 15 +++++++++++++++
2 files changed, 29 insertions(+)
create mode 100644 gnu/packages/patches/libusb-0.1-disable-tests.patch

Toggle diff (55 lines)
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index ffbe5b1..c6942d0 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Theodoros Foradis <theodoros.for@openmailbox.org>
+;;; Copyright © 2017 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -95,6 +96,19 @@ devices on various operating systems.")
version of libusb to run with newer libusb.")
(license lgpl2.1+)))
+(define-public libusb-0.1
+ (package (inherit libusb)
+ (version "0.1.12")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/libusb/libusb-0.1 (LEGACY)/"
+ version "/libusb-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0i4bacxkyr7xyqxbmb00ypkrv4swkgm0mghbzjsnw6blvvczgxip"))
+ (patches (search-patches "libusb-0.1-disable-tests.patch"))))))
+
(define-public libusb4java
;; There is no public release so we take the latest version from git.
(let ((commit "396d642a57678a0d9663b062c980fe100cc0ea1e")
diff --git a/gnu/packages/patches/libusb-0.1-disable-tests.patch b/gnu/packages/patches/libusb-0.1-disable-tests.patch
new file mode 100644
index 0000000..37dd8bd
--- /dev/null
+++ b/gnu/packages/patches/libusb-0.1-disable-tests.patch
@@ -0,0 +1,15 @@
+Disable tests who fail because they have to run as root.
+
+--- libusb-0.1.12/tests/Makefile.in 2006-03-04 03:54:06.000000000 +0100
++++ libusb-0.1.12/tests/Makefile.in 2017-07-13 16:17:45.201728019 +0200
+@@ -255,8 +255,8 @@
+ hub_strings_LDADD = $(top_builddir)/libusbpp.la @OSLIBS@
+ driver_name_SOURCES = driver_name.cpp
+ driver_name_LDADD = $(top_builddir)/libusbpp.la @OSLIBS@
+-TESTS = testlibusb descriptor_test id_test find_hubs find_mice \
+- get_resolution hub_strings $(OS_SPECIFIC)
++TESTS = testlibusb descriptor_test id_test find_hubs find_mice
++ #get_resolution hub_strings $(OS_SPECIFIC)
+
+ XFAIL_TESTS = get_resolution hub_strings $(OS_SPECIFIC_XFAIL)
+ all: all-am
--
2.7.4
Marius Bakke wrote 8 years ago
878tjo6pvc.fsf@fastmail.com
Jonathan Brielmaier <jonathan.brielmaier@web.de> writes:

Toggle quote (3 lines)
> * gnu/packages/libusb.scm (libusb-0.1): New variable.
> * gnu/packages/patches/libusb-0.1-disable-tests.patch: New file.

Thanks! Remember to also add patches to 'gnu/local.mk'.

The meat of this LGTM, but I do wonder why this is needed. Do you have
some other software depending on it? If so, which?

I'm hesitant to add this old and unmaintained version without a good
reason.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAllr2IcACgkQoqBt8qM6
VPpEjgf6A+tVTlhEao13dq2BoSHZ7CO7fz9M3sON/oWWLXnUmwpG9XD0BEIE8/qC
PfZbTl1NTUU9cO4y3k7ipFYdc8KxQvNQH1TJTsY4j3/oNzOen09x/GkIbtcCpKR6
TMMCUSKRw2qHYLVCuNKaXUjiboZc3yG6rkcr6uY8vQzX1Kmvynh9gtuRQ0C83lAk
wB+SXPV+xu+RxZXHWGZeiroRO3hE3qPmrvTZv7xX871OQP54PojN68BRiKyBfeEf
RC9MqcOwTIZKtDVZGsAXRR2S3kYkyFjEVUZz5gtsTFFjGzNVyS5Dj7mmDMDZnlOt
1BhHGAxEFCHA5Z5e3Zic60pmv/gZlw==
=0ZYm
-----END PGP SIGNATURE-----

Jonathan Brielmaier wrote 8 years ago
9df88aa3-525d-8ff1-d6a6-91aecc764630@web.de
Okay, I'll update the patch tomorrow.

0xffff[1] (which I already packaged local) depends on libusb-0.1.
Although it compiles fine with libusb-compat, during executing it throws
an error[2].

I hope this is a good reason :)

[2]

Am 16.07.2017 um 23:20 schrieb Marius Bakke:
Toggle quote (13 lines)
> Jonathan Brielmaier <jonathan.brielmaier@web.de> writes:
>
>> * gnu/packages/libusb.scm (libusb-0.1): New variable.
>> * gnu/packages/patches/libusb-0.1-disable-tests.patch: New file.
>
> Thanks! Remember to also add patches to 'gnu/local.mk'.
>
> The meat of this LGTM, but I do wonder why this is needed. Do you have
> some other software depending on it? If so, which?
>
> I'm hesitant to add this old and unmaintained version without a good
> reason.
>
Attachment: signature.asc
Jonathan Brielmaier wrote 8 years ago
1d91a81b-fee7-5413-9145-3bc2fffbc4d0@web.de
I attached the updated patch.

On 07/16/2017 11:29 PM, Jonathan Brielmaier wrote:
Toggle quote (27 lines)
> Okay, I'll update the patch tomorrow.
>
> 0xffff[1] (which I already packaged local) depends on libusb-0.1.
> Although it compiles fine with libusb-compat, during executing it throws
> an error[2].
>
> I hope this is a good reason :)
>
> [1] https://github.com/pali/0xFFFF
> [2]
> https://github.com/pali/0xFFFF/blob/08485a0c094cf021e5abedd001741da9d0fd1474/src/usb-device.c#L325
>
> Am 16.07.2017 um 23:20 schrieb Marius Bakke:
>> Jonathan Brielmaier <jonathan.brielmaier@web.de> writes:
>>
>>> * gnu/packages/libusb.scm (libusb-0.1): New variable.
>>> * gnu/packages/patches/libusb-0.1-disable-tests.patch: New file.
>>
>> Thanks! Remember to also add patches to 'gnu/local.mk'.
>>
>> The meat of this LGTM, but I do wonder why this is needed. Do you have
>> some other software depending on it? If so, which?
>>
>> I'm hesitant to add this old and unmaintained version without a good
>> reason.
>>
>
From e2e37f46f9476c72bdcdec51b93f1c4782ec5c46 Mon Sep 17 00:00:00 2001
From: Jonathan Brielmaier <jonathan.brielmaier@web.de>
Date: Fri, 14 Jul 2017 00:28:14 +0200
Subject: [PATCH] gnu: Add libusb-0.1

* gnu/packages/libusb.scm (libusb-0.1): New variable.
* gnu/packages/patches/libusb-0.1-disable-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/libusb.scm | 14 ++++++++++++++
gnu/packages/patches/libusb-0.1-disable-tests.patch | 15 +++++++++++++++
3 files changed, 30 insertions(+)
create mode 100644 gnu/packages/patches/libusb-0.1-disable-tests.patch

Toggle diff (67 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 199792b..d587b6e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -787,6 +787,7 @@ dist_patch_DATA = \
%D%/packages/patches/libtorrent-rasterbar-boost-compat.patch \
%D%/packages/patches/libtool-skip-tests2.patch \
%D%/packages/patches/libunwind-CVE-2015-3239.patch \
+ %D%/packages/patches/libusb-0.1-disable-tests.patch \
%D%/packages/patches/libvpx-CVE-2016-2818.patch \
%D%/packages/patches/libxcb-python-3.5-compat.patch \
%D%/packages/patches/libxml2-CVE-2016-4658.patch \
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index ffbe5b1..c6942d0 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Theodoros Foradis <theodoros.for@openmailbox.org>
+;;; Copyright © 2017 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -95,6 +96,19 @@ devices on various operating systems.")
version of libusb to run with newer libusb.")
(license lgpl2.1+)))
+(define-public libusb-0.1
+ (package (inherit libusb)
+ (version "0.1.12")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/libusb/libusb-0.1 (LEGACY)/"
+ version "/libusb-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0i4bacxkyr7xyqxbmb00ypkrv4swkgm0mghbzjsnw6blvvczgxip"))
+ (patches (search-patches "libusb-0.1-disable-tests.patch"))))))
+
(define-public libusb4java
;; There is no public release so we take the latest version from git.
(let ((commit "396d642a57678a0d9663b062c980fe100cc0ea1e")
diff --git a/gnu/packages/patches/libusb-0.1-disable-tests.patch b/gnu/packages/patches/libusb-0.1-disable-tests.patch
new file mode 100644
index 0000000..37dd8bd
--- /dev/null
+++ b/gnu/packages/patches/libusb-0.1-disable-tests.patch
@@ -0,0 +1,15 @@
+Disable tests who fail because they have to run as root.
+
+--- libusb-0.1.12/tests/Makefile.in 2006-03-04 03:54:06.000000000 +0100
++++ libusb-0.1.12/tests/Makefile.in 2017-07-13 16:17:45.201728019 +0200
+@@ -255,8 +255,8 @@
+ hub_strings_LDADD = $(top_builddir)/libusbpp.la @OSLIBS@
+ driver_name_SOURCES = driver_name.cpp
+ driver_name_LDADD = $(top_builddir)/libusbpp.la @OSLIBS@
+-TESTS = testlibusb descriptor_test id_test find_hubs find_mice \
+- get_resolution hub_strings $(OS_SPECIFIC)
++TESTS = testlibusb descriptor_test id_test find_hubs find_mice
++ #get_resolution hub_strings $(OS_SPECIFIC)
+
+ XFAIL_TESTS = get_resolution hub_strings $(OS_SPECIFIC_XFAIL)
+ all: all-am
--
2.7.4
Attachment: signature.asc
Marius Bakke wrote 8 years ago
87shhu6824.fsf@fastmail.com
Jonathan Brielmaier <jonathan.brielmaier@web.de> writes:

Toggle quote (12 lines)
> Okay, I'll update the patch tomorrow.
>
> 0xffff[1] (which I already packaged local) depends on libusb-0.1.
> Although it compiles fine with libusb-compat, during executing it throws
> an error[2].
>
> I hope this is a good reason :)
>
> [1] https://github.com/pali/0xFFFF
> [2]
> https://github.com/pali/0xFFFF/blob/08485a0c094cf021e5abedd001741da9d0fd1474/src/usb-device.c#L325

Oh, okay. I didn't know we had libusb-compat either. Thanks for
clarifying!

The last patch LGTM, but I'm still hesitant to add it without an actual
in-tree user. Will you submit the 0xFFFF package? It would be good to
have it as an explaining comment near the libusb-0.1 package definition,
so future packagers don't have to ask the same questions. Unmaintained
and (seemingly) obsolete software is also prone to sudden removal :-)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlltMrMACgkQoqBt8qM6
VPpz7ggAytA2vJpLCfWNVlVeZimVBy6WwmDSV4pKMWrJZeVvhAtYqvvikzcs/0Ui
mQvUhB6cjfVf51nIG9ClvHOYQmrALA7ZmGX7gvArOx5F2rR9dOUUIRQZbbtq1wIZ
WoDfHTuX7RWcpMQ8DxyVYdapMvtwjOsDAPAXEp6jU1NS2helpfoe6u/jaQuTVUhQ
28GKrCPSjeDO1nDDivWIdb0djbGos2lm445j+n58ya8m8NKeiTIv4RvkIHsilXDT
H3sPxS+vfPjYmzUFfXblJrColL/ezeZfbwCX4WT7umtI7eNL8Fvcu1mCkmpyI767
lKGbkFDD+9cT18HKgWdoRbK1MsXEyg==
=/rIy
-----END PGP SIGNATURE-----

Jonathan Brielmaier wrote 8 years ago
1c99a81e-fd7a-9360-ec21-3736b450ae23@web.de
I added a comment to the libusb-0.1. Also at 0xffff I explain why
libusb-0.1 is used.

On 07/17/2017 11:57 PM, Marius Bakke wrote:
Toggle quote (23 lines)
> Jonathan Brielmaier <jonathan.brielmaier@web.de> writes:
>
>> Okay, I'll update the patch tomorrow.
>>
>> 0xffff[1] (which I already packaged local) depends on libusb-0.1.
>> Although it compiles fine with libusb-compat, during executing it throws
>> an error[2].
>>
>> I hope this is a good reason :)
>>
>> [1] https://github.com/pali/0xFFFF
>> [2]
>> https://github.com/pali/0xFFFF/blob/08485a0c094cf021e5abedd001741da9d0fd1474/src/usb-device.c#L325
>
> Oh, okay. I didn't know we had libusb-compat either. Thanks for
> clarifying!
>
> The last patch LGTM, but I'm still hesitant to add it without an actual
> in-tree user. Will you submit the 0xFFFF package? It would be good to
> have it as an explaining comment near the libusb-0.1 package definition,
> so future packagers don't have to ask the same questions. Unmaintained
> and (seemingly) obsolete software is also prone to sudden removal :-)
>
From 5889e10e30f62f74a9081f61de2978bc4db19fe1 Mon Sep 17 00:00:00 2001
From: Jonathan Brielmaier <jonathan.brielmaier@web.de>
Date: Fri, 14 Jul 2017 00:28:14 +0200
Subject: [PATCH] gnu: Add libusb-0.1

* gnu/packages/libusb.scm (libusb-0.1): New variable.
* gnu/packages/patches/libusb-0.1-disable-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/libusb.scm | 16 ++++++++++++++++
gnu/packages/patches/libusb-0.1-disable-tests.patch | 15 +++++++++++++++
3 files changed, 32 insertions(+)
create mode 100644 gnu/packages/patches/libusb-0.1-disable-tests.patch

Toggle diff (69 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 199792b..d587b6e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -787,6 +787,7 @@ dist_patch_DATA = \
%D%/packages/patches/libtorrent-rasterbar-boost-compat.patch \
%D%/packages/patches/libtool-skip-tests2.patch \
%D%/packages/patches/libunwind-CVE-2015-3239.patch \
+ %D%/packages/patches/libusb-0.1-disable-tests.patch \
%D%/packages/patches/libvpx-CVE-2016-2818.patch \
%D%/packages/patches/libxcb-python-3.5-compat.patch \
%D%/packages/patches/libxml2-CVE-2016-4658.patch \
diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index ffbe5b1..ed97ed9 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Theodoros Foradis <theodoros.for@openmailbox.org>
+;;; Copyright © 2017 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -95,6 +96,21 @@ devices on various operating systems.")
version of libusb to run with newer libusb.")
(license lgpl2.1+)))
+;; required by 0xffff, which compiles with libusb-compat, but executes only
+;; with libusb-0.1
+(define-public libusb-0.1
+ (package (inherit libusb)
+ (version "0.1.12")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/libusb/libusb-0.1 (LEGACY)/"
+ version "/libusb-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0i4bacxkyr7xyqxbmb00ypkrv4swkgm0mghbzjsnw6blvvczgxip"))
+ (patches (search-patches "libusb-0.1-disable-tests.patch"))))))
+
(define-public libusb4java
;; There is no public release so we take the latest version from git.
(let ((commit "396d642a57678a0d9663b062c980fe100cc0ea1e")
diff --git a/gnu/packages/patches/libusb-0.1-disable-tests.patch b/gnu/packages/patches/libusb-0.1-disable-tests.patch
new file mode 100644
index 0000000..37dd8bd
--- /dev/null
+++ b/gnu/packages/patches/libusb-0.1-disable-tests.patch
@@ -0,0 +1,15 @@
+Disable tests who fail because they have to run as root.
+
+--- libusb-0.1.12/tests/Makefile.in 2006-03-04 03:54:06.000000000 +0100
++++ libusb-0.1.12/tests/Makefile.in 2017-07-13 16:17:45.201728019 +0200
+@@ -255,8 +255,8 @@
+ hub_strings_LDADD = $(top_builddir)/libusbpp.la @OSLIBS@
+ driver_name_SOURCES = driver_name.cpp
+ driver_name_LDADD = $(top_builddir)/libusbpp.la @OSLIBS@
+-TESTS = testlibusb descriptor_test id_test find_hubs find_mice \
+- get_resolution hub_strings $(OS_SPECIFIC)
++TESTS = testlibusb descriptor_test id_test find_hubs find_mice
++ #get_resolution hub_strings $(OS_SPECIFIC)
+
+ XFAIL_TESTS = get_resolution hub_strings $(OS_SPECIFIC_XFAIL)
+ all: all-am
--
2.7.4
From 0b4de4afd871fd52755f9132c6fff86f91817c7c Mon Sep 17 00:00:00 2001
From: Jonathan Brielmaier <jonathan.brielmaier@web.de>
Date: Fri, 14 Jul 2017 00:28:14 +0200
Subject: [PATCH] gnu: Add 0xffff.

* gnu/packages/flashing-tools.scm (0xffff): New variable.
---
gnu/packages/flashing-tools.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Toggle diff (44 lines)
diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index f25c25f..2ce00d5 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -82,6 +82,37 @@ network/graphics/storage controller cards, and various other
programmer devices.")
(license gpl2)))
+(define-public 0xffff
+ (package
+ (name "0xffff")
+ (version "0.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/pali/0xffff/archive/"
+ version ".tar.gz"))
+ (file-name (string-append "0xFFFF" version ".tar.gz" ))
+ (sha256
+ (base32
+ "1g4032c81wkk37wvbg1dxcqq6mnd76y9x7f2crmzqi6z4q9jcxmj"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("libusb",libusb-0.1))) ; doesn't work with libusb-compat
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)) ; no configure
+ #:make-flags (list (string-append "PREFIX=" %output))
+ #:tests? #f)) ; no 'check' target
+ (home-page "https://github.com/pali/0xFFFF")
+ (synopsis "Flashes FIASCO images on Maemo devices")
+ (description
+ "The Open Free Fiasco Firmware Flasher (0xFFFF) is a flashing tool
+for FIASCO images. It supports generating, unpacking, editing and
+flashing of FIASCO images for Maemo devices. Use it with care. It can
+brick your device.")
+ (license gpl3+)))
+
(define-public avrdude
(package
(name "avrdude")
--
2.7.4
Attachment: signature.asc
Marius Bakke wrote 8 years ago
87a8405957.fsf@fastmail.com
Jonathan Brielmaier <jonathan.brielmaier@web.de> writes:

Toggle quote (3 lines)
> I added a comment to the libusb-0.1. Also at 0xffff I explain why
> libusb-0.1 is used.

Thanks! I added a copyright line for you in flashing-tools.scm and did
s/Flashes/Flash in the synopsis. Also changed to tabs in gnu/local.mk.

Pushed as 29ac89a6355303118bd119fa68bbeb13206bf519.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAllv43QACgkQoqBt8qM6
VPqIzgf+Px8AJd3lqZi+bgvd2JgdN+lVz7mQzPc5j9+b4uEFTqeykfNEd5rwSkUG
Fdpd+ejSzDtpb94RD2cEH4kgi9xwsbIktdqghIudGXF3u2XDqIpZbb0J9fDofHoB
ckTHC9Ei9GxymMFoe18sAvfLsMmN7NsbBd5E2FSwgJzmwx43cP2fWNUJkQxfMrqc
WIEnhTkhEgJxE9cn2e57KVylYwLulHZs6ZwYMB271z4COXTouIT07lYftPwMSiMg
tk9WqRqvwDRki90G1l+sNHkNYznyKF/cNyy6ylcIQdXd86a5lPnpYui462uniiBM
BbwfogKE4Es3/1t9fTJe/jZOt5GqGg==
=QTos
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 27685@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 27685
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help