[PATCH] Debian Package Improvements

Discussion forum for the Picoscope 6 Linux software
Post Reply
genosensor
Newbie
Posts: 0
Joined: Sun Aug 26, 2018 2:49 am

[PATCH] Debian Package Improvements

Post by genosensor »

I've installed the Debian package and am now happily running my new 2206B MSO on a little Dell 3137 laptop (Intel Celeron w/4MB RAM)

Please view my comments below as constructive criticism. I decided on the picoscope over competitors because I saw that the Linux port was still in active development. Keep up the good work!

---------------

Getting the software installed was difficult.
And, once installed, the standard picoscope app startup script would not work.

Resolved Packaging Issues:
1)
The main problem that the DEBIAN/control file in the picoscope package listed it as compatible with "all" architectures. This prevented it from being recognized on a multiarch system. The package's architecture should be marked amd64 because it contains many 64-bit windows DLLs.

2)
The amd64 variant of the standard libgdiplus package needs to be made a dependency. I already had the 32-bit version installed, but picoscope needs the 64-bit package. Unfortunately, the libgdiplus package is not multiarch aware. All variants install their library binary in /usr/lib. A multiarch aware package would install libs in /usr/lib/x86_64-linux-gnu or /usr/lib/i386-linux-gnu for example.
You can't easily fix the libgdiplus package, so you must call out the amd64 variant explicitly.

3)
All the picoscope drivers are listed as required dependencies.
This is not the case. The GUI will run just fine without any drivers.
I made the drivers recommended packages so they all
should still be installed, but users can optionally choose to install just the ones they need.

Unresolved packaging issues:
1)
In the 95-pico.rules file, the MODE="664" should be "660"
Is there a reason other users need read access to the scope?

2)
The postinst script has a comment where it detects the pico group already exists about alterations being "dangerous". This is correct. In my case, the script deletes my account from the pico group, replacing it with a test account I never use. It does this every time I install a picoscope package or driver, which is quite annoying. If the pico group already exists, better to output a warning than to mess with it.
Also, you might consider using picotech as the group name, as pico is a fairly common term that may be used for other purposes.

Startup shell script issues: (/opt/picoscope/bin/picoscope)
1)
The users primary group should not be changed.
If a user is a member of the pico group, they will have all the necessary permissions. If not, they shouldn't have access to the scope.
Futher, if the primary group is changed, won't any files the app writes be owned by the pico group? This would imply that all other users in the pico group may overwrite files of others.
Am I missing something here?

2)
All output is suppressed, even stderr.
When I first ran picoscope, it just returned without any diagnostic output. (There was a notification on another laptop, but I was logged in via ssh, so I couldn't see it)
Now, only stdout is supressed.

--------

To patch the picoscope package for the above modifications you need to get the picoscope*.deb package file, unpack it, patch it, repack it and finally install the local, modified package.
Note that gdebi may need to be installed with: apt-get gdebi.

create a new empty directory.
download the attached picoscope_6_diff.txt file to it.
cd to that that directory...
$ wget https://labs.picotech.com/debian/pool/m ... 07_all.deb
$ mkdir tmp
# The commands below need to be run as the root user:
# dpkg-deb -R picoscope_6.13.7-4r707_all.deb tmp
# cd tmp
# patch -p1 < ../picoscope_6_diff.txt
# dpkg-deb -b tmp picoscope_6.13.7-4r707a_amd64.deb
# gdebi picoscope_6.13.7-4r707a_amd64.deb
Attachments
picoscope_6_diff.txt
(2.91 KiB) Downloaded 472 times

Hitesh

Re: [PATCH] Debian Package Improvements

Post by Hitesh »

Hi genosensor,

Thank you for your post.

I have added your comments to an existing issue for our Development Team to look into.

Regards,

Post Reply