GNU bug report logs - #35640
Make USB modems just work on Guix

Previous Next

Package: guix;

Reported by: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>

Date: Wed, 8 May 2019 18:27:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 35640 <at> debbugs.gnu.org (full text, mbox):

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 35640 <at> debbugs.gnu.org, Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: bug#35640: Make USB modems just work on Guix
Date: Tue, 14 May 2019 22:56:48 +0200
[Message part 1 (text/plain, inline)]
On Tue, May 14, 2019 at 10:35:55AM +0200, Danny Milosavljevic wrote:
> Should be
> 
>    (inputs `(("libusb" ,libusb)
>              ("tcl" ,tcl:tcl)))
> 

Yes I did mean that with comma, sorry.

> But I guess you meant that anyway.
> 
> The problem is there's a use-modules cycle somewhere.
> Try putting usb-modeswitch in another module (a new one if necessary).
>

Using a new module helps, thank you!  Now I also do not need a prefix
tcl: anymore.  @Ludo: without that prefix, I got errors because 'zip
was redefined or something, I do not remember now.

Now only packaging issues remain.  When I use trivial-build-system,

       #:builder
       (begin
         (use-modules (guix build utils)
                      (guix packages))
         (let ((source (assoc-ref %build-inputs "source"))
               (tar (assoc-ref %build-inputs "tar"))
               (bzip2 (assoc-ref %build-inputs "bzip2"))
               (share-dir (string-append %output "/share")))
           (copy-file source "data.tar.bz2")
           (invoke (string-append bzip2 "/bin/bzip2") "-d" "data.tar.bz2")
           (invoke (string-append tar "/bin/tar") "xvf" "data.tar")
           (install-file (string-append "usb-modeswitch-data-"
                                        (package-version this-package)
                                        "/usb_modeswitch.d") share-dir))
         #t)))

this package-version call seems not to work (at least not without more
adding more modules).  Is this the right approach?  Also I forgot, do
I need this #t at the end?


> Also, does it really require tcl?  Sounds kinda weird to me.

TCL is not needed for command-line mode switching, but there is a TCL
script called usb_modeswitch_dispatcher that gets called by the UDEV
rule and by the systemd service file shipped with USB_ModeSwitch.
This dispatcher automatically modeswitches USB devices that are
plugged in, I believe.

Regards,
Florian
[0001-Add-USB_ModeSwitch.patch (text/plain, attachment)]

This bug report was last modified 5 years and 339 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.