Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Linux packages #328

Open
AlexandraTrifan opened this issue Jan 12, 2018 · 13 comments
Open

Create Linux packages #328

AlexandraTrifan opened this issue Jan 12, 2018 · 13 comments
Assignees
Labels
enhancement general TBD to be determined/decided - needs more definition
Milestone

Comments

@AlexandraTrifan
Copy link
Contributor

Since Scopy is building on Travis-CI, we need to create packages. (.deb, .rpm)

@rgetz
Copy link

rgetz commented Jan 12, 2018

how easy will this be, since we are using patched versions of all the prerequisites?

@AlexandraTrifan
Copy link
Contributor Author

I am still working on finding a good approach. One option would be to statically link some of the prerequisites (i'm not sure if it's recommended). Or maybe we could create .deb packages for the patched dependencies, and use those.

Another idea I found is AppImage. (https://github.com/AppImage/AppImageKit/wiki/Creating-AppImages).
If we would want to use this, it should work on all the common Linux distributions.

@balbirthomas
Copy link

balbirthomas commented Apr 30, 2018

Hi,
I am trying to create a deb source package for scopy. I already have source packages for current git versions of its dependencies (listed below) to build against

  1. libiio
  2. libad9361-iio (Current official debian version is much too old)
  3. gr-iio
  4. libqwt-qt5-dev (experimental multiaxes branch)
  5. libqwtpolar-dev (>= 1.1.1)

Further the following dependencies are already available as deb packages for Debian/Ubuntu

  1. libglibmm-2.4-dev
  2. libsigrok-dev (>= 0.5)
  3. libsigrokcxx-dev (>= 0.5)
  4. libsigrokdecode-dev (>= 0.5)
  5. libvolk (1.3)
  6. gnuradio (3.7.10)
  7. cmake
  8. libzip-dev
  9. autoconf
  10. libtool
  11. libxml2-dev
  12. libmatio-dev
  13. python-dev
  14. python3-dev
  15. python-cheetah
  16. libfftw3-dev
  17. libffi-dev
  18. libmount-dev
  19. libpcre3-dev
  20. libglib2.0-dev
  21. libsigc++-2.0-dev
  22. libglu1-mesa-dev
  23. libusb-1.0-0-dev
  24. flex
  25. bison

The versions refer to current Debian/Stable (Stretch) on which I am now building except sigrok (which is a backport with no changes) Only scopy itself remains to be packaged. I hope to get this done shortly using your patched gnuradio. I will try and apply the patch to Debian/Stretch version of gnuradio and rebuild deb.

IMHO it will make maintaining the source package (build dependencies) much easier if any custom patches (libqwt-qt5-dev multiaxes and gnuradio) can be upstreamed and mainlined. Further if at all, conditional compilation could be supported for features not available in older dependency packages, building on current official distribution releases, may become easier without having to wait for their next release. This is presuming, the desire is to obtain build dependencies, as much as possible from official distribution packages so that some day have scopy can be available from the distribution's own package repositories (which would be the most convenient option for those distribution users). Till such time it may be possible to create a convenient apt-get'able repository for Debian/Ubuntu for instance using reprepro once source and binary packages can be built on those respective distribution versions, in order to minimize replacing the user's installed official dependency packages with non official ones as much as possible. I can can create pull request for debian packaging but can not host deb respository for built packages. Will be happy to help in any other way I can. Look forward to hearing from you.

@balbirthomas
Copy link

Good News. Scopy builds and compiles easily on Debian/Stretch with

  1. Three packages from Debian Testing/Unstable

    • libiio
    • gr-iio (libgnuradio-iio0)
    • libad9361
  2. Two patched Debian package

    • gnuradio 3.7.10 (with patches of Adrian Suciu )
    • libqwt 6.1 (with multiaxes patch)
  3. A custom Debian package for Qwt Polar (not part of Debian)

All the other dependencies are available within Debian Stretch (and later versions). Scopy itself was easy to package. However I am unable to fully test since though since scopy runs and detects my ADALM2000 but it is not able to "identify" the device and asks for a firmware update for which I am lacking instructions.

@mhennerich
Copy link
Contributor

That's really good news. For updating the unit you can follow the Pluto docs here:
https://wiki.analog.com/university/tools/pluto/users/firmware.

Use the latest release from here: https://github.com/analogdevicesinc/m2k-fw/releases
And simply copy the m2k.frm file onto the mass storage drive and then eject the drive.

It might be the case that latest scopy requires a calibration file.
If that's the case I can provide you an firmware build...

@rgetz
Copy link

rgetz commented May 2, 2018

Latest release requires a cal file for the power supplies to work.

@AlexandraTrifan
Copy link
Contributor Author

The "Identify" functionality will not work with the latest M2K firmware release (https://github.com/analogdevicesinc/m2k-fw/releases), because this will be added in the next release. But you should be able to use Scopy with ADALM2000. You can connect to the board and use the instruments without the "Identify" functionality (which would only blink a led on your board).

@mhennerich
Copy link
Contributor

I will create an new release today or tomorrow. Things got a bit delayed since we want to create a new libiio release prior in releasing a new m2k firmware.

@mhennerich
Copy link
Contributor

m2k-fw-v0.19-1-g7ce2-dirty.zip

Here is a firmware build that should have all the required features

@balbirthomas
Copy link

Thank you for your help. I can confirm that with firmware 0.19 I am able to connect with device, generate a signal and capture in the oscilloscope. (Still same problem with identify - Not an issue that bothers me)

For whatever it is worth I am attaching two zip files that contain the "debian" folders for building qwtpolar and scopy debian packages. As mentioned above all others are already packaged for Debian/Ubuntu. Please replace "NAME" and "EMAIL" in Changelog, control, copyright, README and scopy.man if you use them. The build depends are intentionally broad and generic, you may want to fine tune.

Attach:
scopy-debian.zip
qwtpolar-debian.zip

@rgetz
Copy link

rgetz commented May 4, 2018

Thanks for your help / assistance.

@adisuciu adisuciu added the TBD to be determined/decided - needs more definition label Aug 17, 2018
@adisuciu adisuciu added this to the backlog milestone Aug 17, 2018
@greyltc
Copy link

greyltc commented Nov 15, 2021

I've packaged[1] scopy for Arch Linux. It was a mildly painful process. The package builds the latest from the master branch of this repo. I'm not a power user (just got my ADALM2000 hardware for the first time a few days ago), so I haven't tried out all the various bells and whistles yet, but everything I've tested works so far. Really neat project! :-D

Initially my package seems to have a bit more functionality than the 1.3.0 flatpak-based install I tired (which needs over 1.5GiB of drive space to work, ouch!). The USB connected m2k of popped right up in the UI but that didn't happen with flatpak (permissions issue there maybe).

Is there any real desire to get scopy working with the latest stable upstream releases of gnuradio and qwt? I think those two deps needing special builds/not working with the standard distro-provided packages are the biggest pain points right now. Other minor inconveniences with achieving stable packaging is that a number of the deps lack proper releases/tags (https://github.com/analogdevicesinc/gr-m2k for example).

[1]: https://aur.archlinux.org/packages/scopy-git/

@adisuciu
Copy link
Contributor

That's awesome !

We can probably create releases for the packages that are missing them. However latest upstream for qwt is a problem because upstream doesn't include stuff from qwt-multiaxis branch which we use. The maintainer of qwt mentioned that the mainline and this branch will go in parallel for a while.

As for gnuradio, we will probably wait for gnuradio 3.10, and then port it.

-Adrian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement general TBD to be determined/decided - needs more definition
Projects
None yet
Development

No branches or pull requests

6 participants