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

Update PPA #391

Closed
bilelmoussaoui opened this issue Jun 24, 2017 · 60 comments
Closed

Update PPA #391

bilelmoussaoui opened this issue Jun 24, 2017 · 60 comments

Comments

@bilelmoussaoui
Copy link
Owner

I've just pushed a new release which introduces translations and few bugs fixes
In order to get translations to work, i had to use a build system (Meson here). And I've also removed the update & update-git options as it's now easier to update the script using meson.

The PPA should be updated to use meson build system. I've added the build commands to the README.

@wa4557 Do you think that you will have some free time to take a look at this? My Debian packaging skills are close to 0

@andia89
Copy link
Collaborator

andia89 commented Jun 25, 2017

Yes. But not overly soon. I'm occupied until Thursday...

@andia89
Copy link
Collaborator

andia89 commented Jul 2, 2017

Your commands in the README don't work.

meson builddir --prefix=/usr

Error during basic setup:

[Errno 2] No such file or directory: '/home/andreas/Diverses/Hardcode-Tray/builddir'

@andia89
Copy link
Collaborator

andia89 commented Jul 2, 2017

If I create an empty folder called builddir I get a different error :

The Meson build system
Version: 0.29.0
Source dir: /home/andreas/Diverses/Hardcode-Tray
Build dir: /home/andreas/Diverses/Hardcode-Tray/builddir
Build type: native build
Build machine cpu family: x86_64
Build machine cpu: x86_64

Meson encountered an error in file meson.build, line 1, column 0:
Not enough arguments to project(). Needs at least the project name and one language

Please make sure that the commands are correct otherwise I cannot update the ppa.

@bilelmoussaoui
Copy link
Owner Author

The commands do work. I just forgot to mention that you need meson > 0.40. You can upgrade to this version using pip. sudo pip3 install --upgrade meson

@andia89
Copy link
Collaborator

andia89 commented Jul 2, 2017

Ok, got it now. There might be an issue though, ppa with meson are apparently not supported... Will further investigate

@bilelmoussaoui
Copy link
Owner Author

Thank you very much!!! I will take a look too as soon as I can

@andia89
Copy link
Collaborator

andia89 commented Jul 9, 2017

@bil-elmoussaoui

I think figured out how to do it, however on launchpad they use an older meson version. Can you change the meson.build files such that the also work with lower versions?

@bilelmoussaoui
Copy link
Owner Author

@wa4557 older versions doesn't work as expected with gettext for translations... I will take a look anyway. Launchpad is really the worst tool ever invented in the history of Linux.
I think one of the best way to fix this, is to create a deb package using Travis CI and upload it directly into the releases archives

@andia89
Copy link
Collaborator

andia89 commented Jul 9, 2017

My packaging skills are also only ...semi good...
And I have to learn everything the hard way. But I think it should be possible

@andia89
Copy link
Collaborator

andia89 commented Jul 11, 2017

As expected the packaging does not work with the provided meson.build file.

https://launchpadlibrarian.net/328244612/buildlog_ubuntu-yakkety-amd64.hardcode-tray_3.5.2.1~849~ubuntu16.10.1_BUILDING.txt.gz

If we would be able to change the meson version, I guess it would work

@bilelmoussaoui
Copy link
Owner Author

@wa4557 I will try to get this to work or at least provide a patch for the PPA

@andia89
Copy link
Collaborator

andia89 commented Jul 15, 2017

I asked on AskUbuntu

https://askubuntu.com/questions/936337/build-launchpad-ppa-packages-with-backport-version

Building on trusty won't be possible though, because in trusty there is no meson package

@varlesh
Copy link
Collaborator

varlesh commented Jul 22, 2017

i think better solution for all distros - it's appimage package - portable and worked on all distros... but only we need patched sni-qt library on deb's

@varlesh
Copy link
Collaborator

varlesh commented Jul 22, 2017

@probonopd
Copy link

Providing an AppImage would have, among others, these advantages:

  • Applications packaged as an AppImage can run on many distributions (including Ubuntu, Fedora, openSUSE, CentOS, elementaryOS, Linux Mint, and others)
  • One app = one file = super simple for users: just download one AppImage file, make it executable, and run
  • No unpacking or installation necessary
  • No root needed
  • No system libraries changed
  • Works out of the box, no installation of runtimes needed
  • Optional desktop integration with appimaged
  • Optional binary delta updates, e.g., for continuous builds (only download the binary diff) using AppImageUpdate
  • Can optionally GPG2-sign your AppImages (inside the file)
  • Works on Live ISOs
  • Can use the same AppImages when dual-booting multiple distributions

Here is an overview of projects that are already distributing upstream-provided, official AppImages.

@bilelmoussaoui
Copy link
Owner Author

@probonopd I don't know how AppImage works internally. But the case here is the app(cli here) runs only from terminal and must have access to the user's file system. Can be this done using AppImage?

@probonopd
Copy link

Yes.

@bilelmoussaoui
Copy link
Owner Author

Alright, i will see what i can during this week/weekend. I might need some help. Do you mind if a ping you or is there an official iirc where i can get some help?

@probonopd
Copy link

Sure, either ask me here or drop by #AppImage on irc.freenode.net

@andia89
Copy link
Collaborator

andia89 commented Jul 30, 2017

Even thoug an AppImage would be great I still think that a working PPA would make sense.
I got meson to work but now I have a different problem I don't know how to solve

@bil-elmoussaoui I think the issue is that there is no "build" command in meson.build. Because the install thing is not what is needed for building the deb file. Can you look into that?

Here the logfile of the (failed) build

@bilelmoussaoui
Copy link
Owner Author

@wa4557 Sorry for the delay. I think you forgot to copy/paste the logfile content here :P

@bilelmoussaoui
Copy link
Owner Author

By taking a look at the current PPA build status, i think i might have figured out how to fix that issue. I'm forcing to install the content of the database files into /opt/HardcodeTray but that won't work for fake root. I have fixed that on my alpha branch, but there are few things to be fixed there before i can merge into the master branch. i will try to do that before the weekend and hopefully, we will get the latest release on the PPA! 👍

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

@bil-elmoussaoui Cool. But you must not update meson to 0.41 otherwise a PPA won't work! The latest version of meson in Trusty/Xenial is 0.40.1. So if your script also works with 0.40 we have to keep it

@bilelmoussaoui
Copy link
Owner Author

I will not, we don't use any new features from 0.41 (the latest thing we use the python module on Meson which was released with the 0.40 version http://mesonbuild.com/Python-3-module.html)

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

Was just looking at your commit messages. It says 0.41 :)

@bilelmoussaoui
Copy link
Owner Author

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

is the alpha branch already usable? Wanna try if packaging works

@bilelmoussaoui
Copy link
Owner Author

Yep should work as expected 👍

@bilelmoussaoui
Copy link
Owner Author

it must be libgtk3-dev

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

Got it it's libgtk-3-dev
Still get a permission error though :( PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.5/site-packages'

I don't understand why for building a package we need to put something in /usr

@bilelmoussaoui
Copy link
Owner Author

@wa4557 I think that you might need to use the --prefix argument somewhere? as I don't force installing on /usr/lib at all see
https://github.com/bil-elmoussaoui/Hardcode-Tray/blob/alpha/meson.build#L28 which all does is installing on PREFIX/python libraries location

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

So which --prefix should I use? Isn't the standard python location in usr/lib/python3.5?

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

Never mind, I get a new permission error now

Traceback (most recent call last):
  File "/usr/share/meson/meson", line 37, in <module>
    sys.exit(main())
  File "/usr/share/meson/meson", line 34, in main
    return mesonmain.run(launcher, sys.argv[1:])
  File "/usr/share/meson/mesonbuild/mesonmain.py", line 260, in run
    sys.exit(run_script_command(args[1:]))
  File "/usr/share/meson/mesonbuild/mesonmain.py", line 248, in run_script_command
    return cmdfunc(cmdargs)
  File "/usr/share/meson/mesonbuild/scripts/meson_install.py", line 306, in run
    do_install(datafilename)
  File "/usr/share/meson/mesonbuild/scripts/meson_install.py", line 124, in do_install
    install_subdirs(d) # Must be first, because it needs to delete the old subtree.
  File "/usr/share/meson/mesonbuild/scripts/meson_install.py", line 139, in install_subdirs
    os.makedirs(dst_dir)
  File "/usr/lib/python3.5/os.py", line 241, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/local/share/hardcode-tray'

@bilelmoussaoui
Copy link
Owner Author

It depends on the Python version shipped with the Ubuntu version :/ The python path is detected automatically thanks to Meson.

For the /usr/local/share i don't see what it's saying that there's a permission error :/. That shouldn't be a problem?

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

As a normal user I can't install to /usr right?

@bilelmoussaoui
Copy link
Owner Author

Nop, normal users can't install any deb file at all...

@bilelmoussaoui
Copy link
Owner Author

But for packaging, you should be able to create /usr/share/Hardcode-Tray/ without any issue as launchpad build system uses a fake root

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

But still I should be able to build the deb file. Oh boy I know so little about packaging, just trying random stuff :)

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

Can you have a look at this? They seem to have a working meson.build on launchpad

https://bazaar.launchpad.net/~ztefn/haguichi/meson-build/view/head:/meson.build

@bilelmoussaoui
Copy link
Owner Author

Hey the problem isn't on meson :P As i have switched recently Lollypop from Autotools to Meson and the build works just fine. It seems that they use something like this for the nina -C install
DESTDIR=/<<PKGBUILDDIR>>/debian/lollypop ninja -C build -v install
In our case it must be
DESTDIR=/<<PKGBUILDDIR>>/debian/hardcode-tray ninja -C builddir -v install
I don't know where this should be placed :P maybe in the rules file?
Here's the log file of the build
https://launchpadlibrarian.net/328570949/buildlog_ubuntu-artful-amd64.lollypop_0.9.244-1ppa1ubuntu1.2_BUILDING.txt.gz

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

Yes I guess you're right. Now I need to find the debian folder for lollypop somewhere to reverse engineer it...

@bilelmoussaoui
Copy link
Owner Author

@wa4557
Here's the rules file of Lollypop

#!/usr/bin/make -f

override_dh_auto_clean:
	rm -fr build

override_dh_auto_configure:
	mkdir -p build
	cd build && meson .. --prefix=/usr

override_dh_auto_build:
	cd build && ninja -v

override_dh_auto_test:
	cd build && ninja test

override_dh_auto_install:
	DESTDIR=$(CURDIR)/debian/lollypop ninja -C build -v install

%:
	dh $@

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

Got it working :) Can I change the file in the master branch?

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

Nevermind you already merged, awesome

@bilelmoussaoui
Copy link
Owner Author

What's the next step? Should i create a new release to trigger the PPA update?

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

One thing, though. It's not possible to build the package for trusty. No meson package exists in trusty...

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

@bil-elmoussaoui Already building. That's ok its adaily build anyways

@bilelmoussaoui
Copy link
Owner Author

Trusty doesn't have the needed version of Ninja either + it's not supported anymore. People should upgrade to 16.04 or build from source code by installing meson using pip3 install meson and building ninja from source code...
This can now be closed?
I will create a new issue for the AppImage as it's a completely different story....

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

Wait a moment, I get a few warnings during build. Might be worth looking into:

E: hardcode-tray source: source-contains-unsafe-symlink HardcodeTray
E: hardcode-tray source: source-contains-unsafe-symlink README.md
E: hardcode-tray source: source-contains-unsafe-symlink const.py.in
E: hardcode-tray source: source-contains-unsafe-symlink data
E: hardcode-tray source: source-contains-unsafe-symlink debian
E: hardcode-tray source: source-contains-unsafe-symlink hardcode-tray.py.in
E: hardcode-tray source: source-contains-unsafe-symlink license
E: hardcode-tray source: source-contains-unsafe-symlink meson.build
E: hardcode-tray source: source-contains-unsafe-symlink po
E: hardcode-tray source: source-contains-unsafe-symlink screenshots
E: hardcode-tray source: source-contains-unsafe-symlink src
E: hardcode-tray source: build-depends-on-build-essential build-depends
W: hardcode-tray source: ancient-standards-version 3.9.3 (current is 3.9.7)
W: hardcode-tray: copyright-without-copyright-notice
E: hardcode-tray: extended-description-is-empty
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/ usr/lib/python3/dist-packages/HardcodeTray/
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/app.py usr/lib/python3/dist-packages/HardcodeTray/app.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/const.py usr/lib/python3/dist-packages/HardcodeTray/const.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/decorators.py usr/lib/python3/dist-packages/HardcodeTray/decorators.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/enum.py usr/lib/python3/dist-packages/HardcodeTray/enum.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/ usr/lib/python3/dist-packages/HardcodeTray/modules/
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/applications/ usr/lib/python3/dist-packages/HardcodeTray/modules/applications/
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/applications/application.py usr/lib/python3/dist-packages/HardcodeTray/modules/applications/application.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/applications/electron.py usr/lib/python3/dist-packages/HardcodeTray/modules/applications/electron.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/applications/helpers/ usr/lib/python3/dist-packages/HardcodeTray/modules/applications/helpers/
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/applications/helpers/asar.py usr/lib/python3/dist-packages/HardcodeTray/modules/applications/helpers/asar.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/applications/helpers/binary.py usr/lib/python3/dist-packages/HardcodeTray/modules/applications/helpers/binary.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/applications/helpers/data_pack.py usr/lib/python3/dist-packages/HardcodeTray/modules/applications/helpers/data_pack.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/applications/helpers/extract.py usr/lib/python3/dist-packages/HardcodeTray/modules/applications/helpers/extract.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/applications/nwjs.py usr/lib/python3/dist-packages/HardcodeTray/modules/applications/nwjs.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/applications/pak.py usr/lib/python3/dist-packages/HardcodeTray/modules/applications/pak.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/applications/qt.py usr/lib/python3/dist-packages/HardcodeTray/modules/applications/qt.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/applications/zip.py usr/lib/python3/dist-packages/HardcodeTray/modules/applications/zip.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/backup.py usr/lib/python3/dist-packages/HardcodeTray/modules/backup.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/config/ usr/lib/python3/dist-packages/HardcodeTray/modules/config/
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/config/arguments.py usr/lib/python3/dist-packages/HardcodeTray/modules/config/arguments.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/config/json.py usr/lib/python3/dist-packages/HardcodeTray/modules/config/json.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/config/system.py usr/lib/python3/dist-packages/HardcodeTray/modules/config/system.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/icon.py usr/lib/python3/dist-packages/HardcodeTray/modules/icon.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/log.py usr/lib/python3/dist-packages/HardcodeTray/modules/log.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/parser.py usr/lib/python3/dist-packages/HardcodeTray/modules/parser.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/path.py usr/lib/python3/dist-packages/HardcodeTray/modules/path.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/svg/ usr/lib/python3/dist-packages/HardcodeTray/modules/svg/
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/svg/cairosvg.py usr/lib/python3/dist-packages/HardcodeTray/modules/svg/cairosvg.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/svg/imagemagick.py usr/lib/python3/dist-packages/HardcodeTray/modules/svg/imagemagick.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/svg/inkscape.py usr/lib/python3/dist-packages/HardcodeTray/modules/svg/inkscape.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/svg/rsvgconvert.py usr/lib/python3/dist-packages/HardcodeTray/modules/svg/rsvgconvert.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/svg/svg.py usr/lib/python3/dist-packages/HardcodeTray/modules/svg/svg.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/svg/svgexport.py usr/lib/python3/dist-packages/HardcodeTray/modules/svg/svgexport.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/modules/theme.py usr/lib/python3/dist-packages/HardcodeTray/modules/theme.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/path.py usr/lib/python3/dist-packages/HardcodeTray/path.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/tools.py usr/lib/python3/dist-packages/HardcodeTray/tools.py
W: hardcode-tray: python-module-in-wrong-location usr/lib/python3.5/site-packages/HardcodeTray/utils.py usr/lib/python3/dist-packages/HardcodeTray/utils.py
W: hardcode-tray: extra-license-file usr/share/hardcode-tray/license/BSD
W: hardcode-tray: extra-license-file usr/share/hardcode-tray/license/GPL
W: hardcode-tray: binary-without-manpage usr/bin/hardcode-tray
W: hardcode-tray: executable-not-elf-or-script usr/lib/python3.5/site-packages/HardcodeTray/modules/applications/helpers/data_pack.py

@bilelmoussaoui
Copy link
Owner Author

W: hardcode-tray: executable-not-elf-or-script usr/lib/python3.5/site-packages/HardcodeTray/modules/applications/helpers/data_pack.py Fixed that on master
I think somehow it complains about installing some files in usr instead of /usr

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

What about the location of the python module?

@bilelmoussaoui
Copy link
Owner Author

I've just downloaded the latest deb, extracted it and everything seems to be okey. I don't have an Ubuntu machine at the moment to try it

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

It's not ok. Ubuntu does not recognize the installed python module...

@bilelmoussaoui
Copy link
Owner Author

i've tried the latest package in elementary OS and everything is installed correctly except the executable file...

@bilelmoussaoui
Copy link
Owner Author

@wa4557 Should be fixed now 5250d09

@andia89
Copy link
Collaborator

andia89 commented Aug 3, 2017

Cool, I'll check it out. I don't know why the executable is not installed, though...

@bilelmoussaoui
Copy link
Owner Author

Thanks for your work on this @wa4557. We have finally got a working PPA again :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants