olivierkes / manuskript

A open-source tool for writers
http://www.theologeek.ch/manuskript
GNU General Public License v3.0
1.74k stars 230 forks source link

Accentueted characters on linux #207

Closed WildCerebrus closed 6 years ago

WildCerebrus commented 6 years ago

Hi, I'm on manuskript 0.5.0 on Ubuntu 16.04

whenever I try to write an "ê"(resp. an "â", "ô" or "î") manuskript replace it by "e" (resp. "a","o","i") it's really inconvenient in french

by the way I can copy-paste those characters even if I can't write it directly

gedakc commented 6 years ago

Are you running manuskript from the binary package?

If so then this is a known issue with our PyInstaller packages, as noted in the wiki under the Install Binary section.

A few work-arounds are listed (you discovered one). The fix for now is to run manuskript from source code.

olivierkes commented 6 years ago

Hi @WildCerebrus, thanks for reporting. Unfortunately we haven't been able yet to find the cause of that bug. Et c'est pénible !

I played for a while, trying to remove as much libs as possible from package, and was unsuccessful to find the bug, but I narrowed the files down. Here is a list of all files that can be removed in the package.

For now, the easiest would be to run from source as @gedakc noted. It's not that difficult.

olivierkes commented 6 years ago

Observation: I made a simple PyQt test file with only a QPlainTextEdit (the base class I use for the text area). I packaged it with PyInstaller, and it runs fine, and accepts accentuated characters. I tried to tweak the spec file, but wasn't able to reproduce.

Conclusion: it's most probably a bug in my code, and not in PyInstaller.

BTW, can we reproduce in windows/osx packages?

Test file:

#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys
from PyQt5.QtWidgets import QApplication, QPlainTextEdit

if __name__ == '__main__':

    app = QApplication(sys.argv)

    w = QPlainTextEdit()
    w.resize(250, 150)
    w.move(300, 300)
    w.show()

    sys.exit(app.exec_())
olivierkes commented 6 years ago

Observation 2: The bug is present in every text area, even in "Open file" dialog, or native simple QLineEdit widgets that I haven't subclassed and modified.

Conclusion 2: It's most probably a bug in packaging, not in my code.

(So on average, it's most probably a bug. But we don't know where.)

WildCerebrus commented 6 years ago

I think you can't reproduce on windows (I use it finely) but I don't know about osx

Le 11 nov. 2017 23:26, "Olivier" notifications@github.com a écrit :

Observation 2: The bug is present in every text area, even in "Open file" dialog, or native simple QLineEdit widgets that I haven't subclassed and modified.

Conclusion 2: It's most probably a bug in packaging, not in my code.

(So on average, it's most probably a bug. But we don't know where.)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/olivierkes/manuskript/issues/207#issuecomment-343698367, or mute the thread https://github.com/notifications/unsubscribe-auth/AJlhZJqt1s_Eo4YX67syblwmgXZFjNb3ks5s1h8dgaJpZM4QaelJ .

olivierkes commented 6 years ago

I think you can't reproduce on windows (I use it finely) but I don't know about osx

Ok thanks !

New test

I got an idea this morning: package older versions.

Methodology

Results

Analysis and hypotheses

Not at all the expected outcome, but interresting nonetheless !

I was expecting that at some release it would stop working, but it does not. So I see three options:

  1. There is something wrong in my testing methodology
  2. The issue is on the computer creating the packages (like missing something), but what would it be?
  3. It works because it is run on the same computer as the one who created it.

Unexpected discovery

In order to test 3., I zipped the folder to post it here for testing. But I tested it before posting, and lo and behold! it doesn't work!

I'm calling that progress!!

I'll do further testing later on. (Sorry for the long post, most of it is unnecessary now, but I keep it for myself for the log)

gedakc commented 6 years ago

Wow, you've sure done lots of testing @olivierkes.

As best I can determine, the problem with not being able to enter accented characters directly from a keyboard arises with the PyInstaller binary package only.

One of the challenges with trying to determine which PyInstaller package file can be removed is that it also seems to depend upon which packages are installed in the GNU/Linux distro you are testing. In my investigations I've found that a file required in one distro might not be required in another.

Unfortunately I have not been able to discover any other clues when searching the Internet to see if other projects have encountered the same issue with accented characters.

I am also unable to recreate the accent test because I only have US Keyboards. :(

  1. The issue is on the computer creating the packages (like missing something), but what would it be?

Reading your point 2 made me think about checking for base language support in the 64-bit Debian 8 Jessie VM I use to build the PyInstaller packages.

I came across the following link on Debian and keyboards:

Debian - Keyboard

In this article the example /etc/default/keyboard file indicates multiple languages with the line:

XKBLAYOUT="us,de,fr,ua,ru"

On my VM I only have one language listed:

XKBLAYOUT="us"

This led me to try adding additional keyboard layouts, and then create the PyInstaller package.

Add a foreign keyboard layout to Gnome in Debian 8

I ran the following command:

sudo apt-get install keyboard-configuration

And my distro said it was already installed.

I also looked at the following man page for information about XKBLAYOUT:

keyboard(5)

I edited my line to be the same as the example line above:

XKBLAYOUT="us,de,fr,ua,ru"

Then I rebooted (in case it only takes effect after a reboot).

Next I created a PyInstaller package and then compared the contents with the previous manuskript-0.5.0-linux64.zip package using meld.

Two files were listed as being different: base_library.zip and the manuskript executable.

I don't know if these differences are material, or if I need to run any additional commands.

Request for Help

Would someone be able to download and test manuskript-0.5.0-linux64-accent-test.zip with a non-US keyboard to see if accented characters can be directly entered?

olivierkes commented 6 years ago

Thanks for those tests ! I tried your package, and it still doesn't work. :( By the way, I also have only XKBLAYOUT="us".

I am also unable to recreate the accent test because I only have US Keyboards. :(

You can try using the compose key. In my test, it also fails. Those accentuated characters we're talking about are "two-steps" chars, for example é works because it's a single touch. But É doesn't work, because I have to type ´ then E. Do you have also "two-steps" characters on US keyboards? I think it's the same effect than the compose key, so in my tests I also try compose+--- and it should output .

I tried to reproduce my tests of this morning, and wasn't able to get a faulty package..!?! So here is one that works on my computer. Can somebody else try it?

gedakc commented 6 years ago

When running from source code, I can use the compose key (right windows key in my case) to generate accented characters.

The compose+--- combination did not work for me and instead simply output ---.

These key combinations do not work with my manuskript-0.5.0-linux64.zip file. These key combinations do not work with my manuskript-0.5.0-linux64-accent-test.zip file.

These key combinations do work with your manuskript-0.5.0-linux64-1.zip file!

I wonder what is different with how you created your PyInstaller package?

gedakc commented 6 years ago

Whoa, now I'm able to get the compose+--- combination to work with your manuskript-0.5.0-linux64-1.zip file.

Why didn't this work the first time I tried it???

olivierkes commented 6 years ago

Good, so now we have a way for you to test that bug. And we also have a package that works, though we don't know why.

I really can't reproduce the faulty package I got this morning... I'm trying to think of everything that I might have changed:

I see two main differences between your manuskript-0.5.0-linux64.zip and my manuskript-0.5.0-linux64-1.zip:

  1. The python version: 3.4 in yours, 3.5 in mine.
  2. The way qt/pyqt is bundled: in a qt5_plugins folder in yours, in a PyQt5/Qt/plugins folder in mine.
  3. Edit: the Qt/PyQt version: 5.3.2 vs 5.5.1

I'll try to see what causes the difference in (2.). Can you try maybe to test packaging with a different python version? (pyenv is version convenient for that)

gedakc commented 6 years ago

I tried with Python 3.5.4 and PyQt 5.8.2, but no luck. I am still unable to enter accented characters in the package I built. :(

Which exact versions of Python did you use?

For reference the steps I used to install pyenv on my 64-bit Debian 8 GNOME VM were as follows:

# pyenv and PyInstaller
#
# https://github.com/pyinstaller/pyinstaller/wiki/Development

# clone pyenv repository
git clone https://github.com/yyuu/pyenv.git ~/.pyenv

# git clone virtualenv plugin
git clone https://github.com/yyuu/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv

# add to .bashrc or .zshrc or .bash_pyenv:
#----- 8< -----
# Add 'pyenv' to PATH.
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"

# Enable shims and autocompletion for pyenv.
eval "$(pyenv init -)"
# Load pyenv-virtualenv automatically by adding
# # the following to ~/.zshrc:
#
eval "$(pyenv virtualenv-init -)"
#----- >8 -----

# Add pyenv environment vars
. ~/.bash_pyenv

#
#    Install python version with shared libpython (necessary for PyInstaller to work)
#
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.5.4

# virtualenv
pyenv virtualenv 3.5.4 pyenv354

# activate virtualenv
pyenv activate pyenv354

# deactivate virtualenv
#pyenv deactivate

#
# Install manuskript python modules
#
pip3 install pyqt5==5.8.2
pip3 install lxml markdown pyenchant

#
# Test manuskript works
#
bin/manuskript

#
# Install pyinstaller
#
pip3 install pyinstaller

#
# Build pyinstaller package
#
python3 /home/user/.pyenv/versions/3.5.4/envs/pyenv354/bin/pyinstaller manuskript.spec
olivierkes commented 6 years ago

This could quickly get very frustrating :)

Which exact versions of Python did you use?

3.5.2 and 3.6.0

What's your version of pyinstaller? (mine is 3.3)

Can you see in your packages if it uses the qt5_plugins folder structure, or PyQt5/Qt/plugins?

gedakc commented 6 years ago

In the package I created it uses PyQt5/Qt/plugins.

I believe this occurs because I used pip3 to install the pyqt5 wheel, whereas normally I just use sudo apt-get install pyqt5.

Using my 64-bit Debian 8 VM, I built another package manuskript-0.5.0-linux64-accent-test352.zip to try to mirror your package built with python 3.5.2. I installed the following versions:

Unfortunately this package also fails to support entry of accented characters. :(

Taking a different approach, I thought I'd try using your manuskript-0.5.0-linux64-1.zip package on some other distros. I tried Fedora 25 first. Unfortunately this distro failed with the following message:

$ ./manuskript/manuskript 
Debug: Web rendering engine used: QWebView
This application failed to start because it could not find or load the Qt platform plugin "xcb".

Reinstalling the application may fix this problem.
Fatal Python error: Aborted

Current thread 0x00007f515ba7eb40 (most recent call first):
  File "manuskript/main.py", line 19 in run
  File "manuskript", line 13 in <module>
Aborted (core dumped)

This happens both with and without the manuskript/libdrm.so.2 file.

This could quickly get very frustrating :)

Agreed. This PyInstaller packaging seems to be tricky business. For the moment the best compromise appears to be to have manuskript work on the majority of distros, but unfortunately not support entry of accented characters.

Hopefully we can figure out what is unique about your packaged version that permits entry of accented characters.

In the meantime, running from source code is the only method that supports all the functionality of manuskript.

Questions

How did you install pyqt5?
Did you use pip3 or sudo apt install?

What distro are you using when you build the package?

olivierkes commented 6 years ago

Taking a different approach, I thought I'd try using your manuskript-0.5.0-linux64-1.zip package on some other distros. I tried Fedora 25 first. Unfortunately this distro failed with the following message: (…) This happens both with and without the manuskript/libdrm.so.2 file.

Too bad! Maybe if you've still some will left for that, could you try removing other files? Maybe starting from the list of "necessary" libs I posted as report from my tests?

Other direction we could go: trying to contact an experienced packager. If we only had a .deb package, we would already go a long way. I spent 2 hours yesterday trying to build something, but no luck.

How did you install pyqt5? Did you use pip3 or sudo apt install?

apt

What distro are you using when you build the package?

Ubuntu xenial, recently upgraded from trusty (so not a clean xenial, but little bit of a mess).

gedakc commented 6 years ago

@olivierkes: Maybe if you've still some will left for that, could you try removing other files?

From my past experimentation I've found that sometimes I have success by removing files, but the solution does not work for all the distros I'm trying to support. Hence I don't think that this is a sustainable path to take.

@olivierkes: Other direction we could go: trying to contact an experienced packager. If we only had a .deb package, we would already go a long way. I spent 2 hours yesterday trying to build something, but no luck.

If you know an experienced packager then please do feel free to contact them.

I tried to build a .deb package, but kept hitting a road block with the PyQt5 requirement.

@gedakc: What distro are you using when you build the package?

@olivierkes: Ubuntu xenial, recently upgraded from trusty (so not a clean xenial, but little bit of a mess).

Ah, that explains why it will not likely run on all distros. Ubuntu 16.04 is too new. We need to use the oldest distro for Making Linux apps forward compatible.

gedakc commented 6 years ago

@olivierkes did you have an experienced packager in mind?

If not then I have another thought on how to approach creating a .deb file. I'm going to see if I can more closely mirror a source code installation using the package dependencies and pre and post install scripts. It may take me several days to figure this out because I am new to creating .deb files, but I think it should be possible.

olivierkes commented 6 years ago

@olivierkes did you have an experienced packager in mind?

No unfortunately :(

If not then I have another thought on how to approach creating a .deb file. …

That's a good idea, thanks!

olivierkes commented 6 years ago

I filed a "needs-packaging" bug report following Ubuntu's guidelines. Will see what that does :)

gedakc commented 6 years ago

@olivierkes I've been making good progress building a .deb file from scratch. Next I'm looking into adding a menu item with icon.

Do you have a Scalable Vector Graphic .svg file for Manuskript?

I noticed some .png files under icons/Manuskript that contain the manuskript icon in various pixel sizes, but did not observe a .svg file.

EDIT: I now have the menu icon with the 512px icon working. :-)
The entire package has been built manually so I'll need to look into how to automate building the .deb. One big plus is that it appears to work on both 32-bit and 64-bit Debian based GNU/Linux distributions.

olivierkes commented 6 years ago

That's great news, good job !!

I added the .svg icon if you need: https://github.com/olivierkes/manuskript/blob/develop/icons/Manuskript/manuskript.svg

gedakc commented 6 years ago

Thanks for the .svg file @olivierkes. I'll make a note to include it with our next official release of manuskript.

Testing Needed

Please test the following .deb package for installing Manuskript.

  1. Download manuskript-0.5.0-1.deb.
  2. Install with the following commands:

    sudo apt update
    sudo dpkg -i manuskript-0.5.0-1.deb
    sudo apt install -f
    # Above line installs missing dependencies

In my testing it has worked on both 32-bit and 64-bit GNU/Linux distros based on Debian (except for Ubuntu 14.04). It also permitted entry of Accented characters. :-)

The .deb package can be removed with:

sudo apt purge manuskript
sudo apt autoremove

EDIT I also included pandoc as a dependency for manuskript.

olivierkes commented 6 years ago

Tested it on Ubuntu 16.04.3 LTS Xenial: works like a charm !!! Good job, that's really awesome !

Question: why the need for sudo apt install -f? dpkg does not resolve dependencies?

The entire package has been built manually so I'll need to look into how to automate building the .deb.

Is it the one built manually?

gedakc commented 6 years ago

Thanks @olivierkes for testing.

why the need for sudo apt install -f? dpkg does not resolve dependencies?

Yes, that is correct. The dpkg command does not resolve dependencies, but does mark these dependencies as needed in the repository. The sudo apt install -f command forces the installation of the dependencies.

On some new distros one can use the following command:

sudo apt install /path-to-file/manuskript-0.5.0-1.deb

Unfortunately this command fails with lots of error messages on older distros like Debian 8 Jessie.

Is it the one built manually?

Yes. Originally I was trying to get an automated procedure that would work on Ubuntu 14.04 so that we could use Travis CI to build the packages. Unfortunately all of the packages I built in Ubuntu 14.04 would fail to run when installed.

Now I am investigating an automated build using something like make deb. I need to also look into building a .rpm package for Fedora based distros.

I have placed these manual instructions in our wiki at Package Manuskript for Linux with dpkg.

gedakc commented 6 years ago

I have successfully created a .rpm package for Fedora based distros. I placed the manual instructions in our wiki at Package Manuskript for Linux with rpm.

I still need to investigate automating the creation of these .deb and .rpm packages.

olivierkes commented 6 years ago

Wow you've been productive! Congrats!

Are you planning on releasing those packages here in github and on the website, or do you wait for more feedback?

Also, do you know why the packages created with Ubuntu 14.04 would fail to run?

gedakc commented 6 years ago

Are you planning on releasing those packages here in github and on the website, or do you wait for more feedback?

I would like to get more feedback, but failing that I need to try the packages on each distro we're been trying to support. So far I've only had time for minimal testing.

Also, do you know why the packages created with Ubuntu 14.04 would fail to run?

That's a great question and it still puzzles me. The packages are not architecture specific. They are fairly simple in that they include the source code, a launch script, a desktop icon, and a list of dependencies (including pandoc), so in theory it should be possible to build these on any distro.

In the interest of speed I simply switched to Debian 8 Jessie for building the packages due to the issues we've had with Ubuntu 14.04 in the past.

When I have more time to investigate I will.

olivierkes commented 6 years ago

I'll try later to build one deb package from here (16.04), and one from SemaphoreCI (14.04, i have ssh access that i use to run tests).

Just to be sure for what to test, what exactly would fail on 14.04? Is it when running dpkg -b, when installing, or when running?

gedakc commented 6 years ago

The .deb package installs okay. The issue is that manuskript does not run from the package.

Currently I'm testing the .deb with various distros and even the .deb I created with Debian 8 Jessie does not run when installed on Ubuntu 14.04. I'm going to try running from source on 14.04 next.

gedakc commented 6 years ago

Wow, manuskript doesn't even run from source on 64-bit Ubuntu 14.04! The messages are as follows:

user@ubuntu1404:~/manuskript-0.5.0$ bin/manuskript 
Debug: Web rendering engine used: QWebView
Running manuskript version 0.5.0.
Note: No translator found or loaded for locale en_CA.
Traceback (most recent call last):
  File "bin/manuskript", line 13, in <module>
    main.run()
  File "/home/user/manuskript-0.5.0/bin/../manuskript/main.py", line 64, in run
    launch()
  File "/home/user/manuskript-0.5.0/bin/../manuskript/main.py", line 70, in launch
    main = MainWindow()
  File "/home/user/manuskript-0.5.0/bin/../manuskript/mainWindow.py", line 63, in __init__
    self.welcome.updateValues()
  File "/home/user/manuskript-0.5.0/bin/../manuskript/ui/welcome.py", line 47, in updateValues
    autoLoad, last = self.getAutoLoadValues()
  File "/home/user/manuskript-0.5.0/bin/../manuskript/ui/welcome.py", line 69, in getAutoLoadValues
    autoLoad = sttgns.value("autoLoad", type=bool)
TypeError: unable to convert a QVariant of type 0 to a QMetaType of type 1
user@ubuntu1404:~/manuskript-0.5.0$ 

Strangely all three methods (source, PyInstaller, deb) run correctly on 64-bit Xubuntu 14.04.

EDIT: I'm going to try updating my Ubuntu 14.04 to see if it is a problem that is fixed in a more recent system package.

EDIT 2: Even with an up-to-date 64-bit Ubuntu 14.04, it fails to run manuskript from any of the three methods (source, PyInstaller, deb). I wonder what is causing the issue with Ubuntu 14.04 but not Xubuntu 14.04.

olivierkes commented 6 years ago

Wow… this line is getting me crazy… Can you please:

  1. Check in the manuskript settings file what the autoLoad value is (probably in ~/.config/manuskript/manuskript.conf)
  2. Remove the the config file and run manuskript again
gedakc commented 6 years ago

Strangely there is no ~/.config/manuskript/manuskript.conf file or even the ~/.config/manuskript/ folder.

Next I tried to find the manuskript files and stumbled on a permission denied issue that I fixed.

user@ubuntu1404:~$ find ~ -name "*manuskript*" -print
<snip>
find: `/home/user/.gvfs': Permission denied
<snip>
user@ubuntu1404:~$ ls -ld .gvfs
drwx------ 2 root root 4096 Nov 21 10:46 .gvfs
user@ubuntu1404:~$ sudo chown user.user ~/.gvfs
user@ubuntu1404:~$ ls -ld .gvfs
drwx------ 2 user user 4096 Nov 21 10:46 .gvfs
user@ubuntu1404:~$ 

Next I tried to find manuskript.conf anywhere on the file system, but none found:

user@ubuntu1404:~$ find / -name "manuskript.conf" -print 2>/dev/null
user@ubuntu1404:~$ 

Unfortunately manuskript still fails to run on my 64-bit Ubuntu 14.04.

If you have any other suggestions I'm all ears.

olivierkes commented 6 years ago

Use following patch to print the location of the settings file:

diff --git a/manuskript/main.py b/manuskript/main.py
index b407bb9..21dce1e 100644
--- a/manuskript/main.py
+++ b/manuskript/main.py
@@ -32,6 +32,7 @@ def run():

     # Load style from QSettings
     settings = QSettings(app.organizationName(), app.applicationName())
+    print("Location of setting file:", settings.fileName())
     if settings.contains("applicationStyle"):
         style = settings.value("applicationStyle")
         app.setStyle(style)

Apply the following patch, and run manuskript. It will print the location of settings file:

olivier:.../manuskript$ make run
bin/manuskript
Debug: Web rendering engine used: QWebEngineView
Running manuskript version 0.5.0.
Location of setting file: /home/olivier/.config/manuskript/manuskript.conf
olivierkes commented 6 years ago

Question: why is there an indent in the wiki in DEBIAN/control?

Depends: python3, python3-pyqt5, python3-pyqt5.qtwebkit, libqt5svg5, python3-lxml, zlib1g, python3-enchant, python3-markdown, pandoc
        Suggests: texlive-latex-recommended

Is that a typo? I see it's not in the control that is gzip in the .deb.

gedakc commented 6 years ago

why is there an indent in the wiki in DEBIAN/control?

Good catch @olivierkes. It must have slipped in when I was copy/pasting. I have removed the indent in front of the "Suggests:" field in the DEBIAN/control file.

I'll try your code suggestion soon.

gedakc commented 6 years ago

After applying the "print" patch to manuskript/main.py, I see the following when running manuskript.

user@ubuntu1404:~/manuskript-0.5.0$ bin/manuskript 
Debug: Web rendering engine used: QWebView
Running manuskript version 0.5.0.
Location of setting file: /home/user/.config/manuskript/manuskript.conf
Note: No translator found or loaded for locale en_CA.
Traceback (most recent call last):
  File "bin/manuskript", line 13, in <module>
    main.run()
  File "/home/user/manuskript-0.5.0/bin/../manuskript/main.py", line 65, in run
    launch()
  File "/home/user/manuskript-0.5.0/bin/../manuskript/main.py", line 71, in launch
    main = MainWindow()
  File "/home/user/manuskript-0.5.0/bin/../manuskript/mainWindow.py", line 63, in __init__
    self.welcome.updateValues()
  File "/home/user/manuskript-0.5.0/bin/../manuskript/ui/welcome.py", line 47, in updateValues
    autoLoad, last = self.getAutoLoadValues()
  File "/home/user/manuskript-0.5.0/bin/../manuskript/ui/welcome.py", line 69, in getAutoLoadValues
    autoLoad = sttgns.value("autoLoad", type=bool)
TypeError: unable to convert a QVariant of type 0 to a QMetaType of type 1
user@ubuntu1404:~/manuskript-0.5.0$ ls -l ~/.config/m*
-rw-rw-r-- 1 user user 845 Nov 16 10:52 /home/user/.config/monitors.xml
user@ubuntu1404:~/manuskript-0.5.0$ 

As far as I can tell, the ~/.config/manuskript/manusrkipt.conf file never gets created.

olivierkes commented 6 years ago

I moved the Ubuntu 14.04 fail conversation away to stay here on packaging.

I successfully created a .deb using your detailed description. I've written a small script to automate it. Next I'm gonna try it in a CI.

Fews remarks / questions:

gedakc commented 6 years ago

Good job creating the .deb. It would be fantastic if you can automate it using CI.

Using the .svg image, icon is blank. I reverted to the png.

I've never tried the .svg. I recall reading that the .svg was preferred for icons in the .desktop file but have not tested it myself.

Since it's root-owned, the sample project cannot be saved (with only the small warning, cf. #160)

This is as expected. Since the sample project is part of the package. It might make more sense to move the sample project out of the source code tree and bundle the sample project as a separate downloadable zip file.

By the way, why the root ownership? Is that necessary?

I'd read that root ownership was the proper way to create the .deb file. If you don't have access to the root account you might investigate using fakeroot.

When purging, I get lots of warning:

Interesting. I do not recall encountering that issue. Are you running manuskript as root?
That might explain it creating pycache files under the /usr/share/manuskript directories. Otherwise a normal user should not be able to write under /usr/share/manuskript.

olivierkes commented 6 years ago

Since it's root-owned, the sample project cannot be saved (with only the small warning, cf. #160)

This is as expected. Since the sample project is part of the package. It might make more sense to move the sample project out of the source code tree and bundle the sample project as a separate downloadable zip file.

Right. Maybe I should simply display a warning once, saying something like "This is a readonly project, you can play all the want with it, but it won't be saved." ?

Are you running manuskript as root?

Right, when I build the first package I forgot the root thing, and so I ran it once as user when /usr/share/manuskript had user permissions. I cleaned that, and now everything works as excepted. And that answers my questions about the root ownership :)

olivierkes commented 6 years ago

So I added a script to generate the deb package with your method. With it, I was able to build package on SemaphoreCI (14.04) that works on 16.04. (I used ssh to call the script and download the result, so the process is not automated yet.)

gedakc commented 6 years ago

That is way cool. Great work!

Since you are setting this up to run automatically on SemaphoreCI (14.04), you might wish to change to Origin: Ubuntu 14.04 Trusty Tahr in the package/create_deb/control file.

In theory we should be able to similarly build the .rpm package too.

olivierkes commented 6 years ago

I set up SemaphoreCI in a not-very-good-but-working way: it builds every times a commit is pushed on develop, and uploads a deb package here: http://www.theologeek.ch/manuskript/releases/manuskript-develop-latest.deb.