You are not logged in.

#1 2016-12-01 19:36:54

stevep
MX Linux Developer
Registered: 2016-08-08
Posts: 381

Packaging timeset-gui

I'm trying to create a debianized package for timeset-gui which I have for download here. (70 K) However, it's tough to know if all the runtime dependencies for Python programs like this are getting automatically installed, so I'd appreciate any testers on BL.

Offline

#2 2016-12-02 04:49:39

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,558
Website

Re: Packaging timeset-gui

Hi Steve

Installed without errors.
GUI launches from terminal without errors.
"Synchronize time from network" fails, complaining "could not find ntpdate" (I have the full ntp installed).
Some options fail because gui was launched as user, not root, while "enable/disable ntp" brings up a polkit authentication box. Could that be enabled for all system-level operations?
Maybe add an "Exit" button?

No hint of python errors, but I may well have added some libraries over the basic BL install.

Overall, very nice. smile

EDIT I just remembered that you're not the software developer, so not in a position to make those above changes! Sorry.

EDIT2 Installed and ran on an almost-new BL virtual system, pulled in no extra python dependencies, and threw no python-like errors.

EDIT3

Lintian wrote:

E: timeset-gui: python-script-but-no-python-dep usr/bin/timeset-gui

Last edited by johnraff (2016-12-02 08:51:53)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#3 2016-12-02 17:53:33

stevep
MX Linux Developer
Registered: 2016-08-08
Posts: 381

Re: Packaging timeset-gui

Thanks for the test! The .desktop file menu entry launches it as root, so that should resolve any ntp problems. If I knew how, I'd add some code to the python file that errors out if launched from the terminal as a regular user and provides a message that it must be run as sysadmin...but then I'd also have to add that message string to the .po translation files, etc, etc. 

I'm not sure adding a ${python:Depends} to the Depends would accomplish anything except make lintian happy, since it's not actually being installed like most python programs; instead the installer is just moving files into folders.

Offline

#4 2016-12-06 07:25:11

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,558
Website

Re: Packaging timeset-gui

stevep wrote:

The .desktop file menu entry launches it as root

...using 'su-to-root' I now see. That command comes from an Ubuntu package menu which AFAIK is not available on Debian (unless under some other name), but alternatives 'gksu' or 'pkexec' should both work I think.

I'm not sure adding a ${python:Depends} to the Depends would accomplish anything except make lintian happy, since it's not actually being installed like most python programs; instead the installer is just moving files into folders.

I note you've already got 'Depends: python-gobject' in debian/control which should pull in any other python dependencies, so I'm not sure what Lintian is complaining about here to be honest.

EDIT: Oh yes, what is /usr/share/timeset-gui-2.2/makefile doing in that package? Sneaked in during the build process?

Last edited by johnraff (2016-12-06 08:35:39)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#5 2016-12-06 18:50:02

stevep
MX Linux Developer
Registered: 2016-08-08
Posts: 381

Re: Packaging timeset-gui

Currently the debian package install is using the makefile that comes with the source, and that makefile installs itself for some strange reason. I fixed with a override in the debian/rules file that removes it and the folder it lives in, since the makefile is the only thing in it.  Alternate methods, both pretty easy, would be to patch the makefile to remove/disable the offending install line, or to override the dh_auto_install in the rules file to stop the install process in the makefile, instead installing the files via the instructions the Debian packager writes.  There's an example in the rules file in the upload below where I do that for the auto_clean process via an override, since the makefile build will error out if it tries to remove any nonexistent .mo files, and there aren't any of those on a clean build.

The "menu" package is in Debian--so I added that as a dependency, thanks for catching that.  I patched the desktop file to use su-to-root instead of gksu, since su-to-root will use the desktop environment's default method of gaining root access---gksu on MX Linux's xfce desktop, but the same desktop launcher will use kdesu on KDE on MX instead.  That way, it won't require gksu be installed on a DE that doesn't need it otherwise.

Revised version:  https://drive.google.com/open?id=0BxE7w … 005WURiMTg

Offline

#6 2016-12-07 02:27:48

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,558
Website

Re: Packaging timeset-gui

stevep wrote:

The "menu" package is in Debian--so I added that as a dependency

For some reason I was assuming that the Ubuntu package had to be something different and shinier than the time-honoured Debian menu, but I now see the latter does indeed ship with su-to-root (in both /usr/bin and /usr/sbin for some reason). Looks like a handy utility for making packages more portable.

...makefile installs itself... I fixed with a override in the debian/rules file that removes it and the folder it lives in, since the makefile is the only thing in it...There's an example in the rules file in the upload below...

Thanks! I'll keep that for future reference.

EDIT: Although you've added ${python:Depends} to the source debian/control, the generated .deb file's DEBIAN/control only has 'python-gobject'. I thought that would be enough, due to its python dependencies, but Lintian still complains about 'python-script-but-no-python-dep' neutral

/usr/bin/timeset-gui has a header '#!/usr/bin/python2' which might suggest that Lintian is looking for a python2 dependency in D/control, but:

Lintian page wrote:

If you are using debhelper, adding ${python:Depends} to the Depends field and ensuring dh_python2 or dh_python3 are run during the build should take care of adding the correct dependency.

Does something need to be done about running dh_python2 in the build?

Last edited by johnraff (2016-12-07 02:43:48)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#7 2016-12-07 19:36:34

stevep
MX Linux Developer
Registered: 2016-08-08
Posts: 381

Re: Packaging timeset-gui

Lintian is seeing a python script file getting installed, and bugging us about how python programs really ought to be packaged the Debian way:

https://wiki.debian.org/Python/TransitionToDHPython2

I've actually converted some older python programs to use use the dh_python build system when porting them over from a PPA.  However, it depends on the python source to come with a python-setup and egg.info files (see source for Deluge, for example), so I can't use it for this program. I know I can add lintian override files to the debian folder so it won't complain about that, but I've never used those, so will have to learn how to...

python-gobject will pull in python as a dependency down the line, so I'm not worried about that:  python-gobject depends on python-gobject-2 depends on python.

Offline

#8 2016-12-09 22:16:49

stevep
MX Linux Developer
Registered: 2016-08-08
Posts: 381

Re: Packaging timeset-gui

I went ahead and forked it as a "native" MX-Linux package to simplify changing things without having to patch everything:

  https://github.com/stevenpusser/mx-timeset-gui

I also added debian/lintian-overrides to get rid of the warnings.  Can't do anything about "mx" not being an official Debian version.  If we get more .po localization files, we can push them back to timeset-gui to improve the language support.

Offline

Board footer

Powered by FluxBB