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

Mimetype task on Ubuntu 14.04 #58

Closed
tresf opened this issue Nov 6, 2015 · 1 comment
Closed

Mimetype task on Ubuntu 14.04 #58

tresf opened this issue Nov 6, 2015 · 1 comment

Comments

@tresf
Copy link

tresf commented Nov 6, 2015

The symptom is that the update-desktop-database utility is not working properly with makeself on Ubuntu 14.04. What does that have to do with makeself? I'm not entirely sure, but please read on...

This is an extremely strange bug and I'd like some help isolating the cause. I'll start by explaining my use-case... and the downstream bug report.

  1. Script echos a foo.desktop file to /usr/share/applications/foo.desktop

    foo-install.sh

    #!/bin/bash
    
    # CREATE MIMETYPE FILE
    echo "[Desktop Entry]
    Type=Application
    Name=Foo
    Exec=x-terminal-emulator
    Path=/
    Icon=utilities-terminal
    MimeType=application/x-foo;x-scheme-handler/foo;
    Terminal=false
    Comment=Foo Comment" > /usr/share/applications/foo.desktop
    chmod 755 /usr/share/applications/foo.desktop
    
    # REGISTER MIMETYPE FILE
    update-desktop-database


    ... then...

    makeself . foo-1.0.0.run "Foo Installer" "./foo-install.sh"
  2. Test results

    xdg-open foo:bar
    Ubuntu Version Makeself Version Test Results
    12.04 x64 2.1.5 ✅ Pass
    14.04 x64 2.2.0 ⛔ Fail

Now I've tried many, many different test scenarios, such as using install, nohup, spawning a new process, etc, but the only thing that seems to fix the bug is to build the .run package from Ubuntu 12.04.

The expected behavior is that xdg-open foo:bar attempts to open x-terminal-emulator with the parameter bar, which is a registered URI/Mimetype for a web browser to use (similar in how Ubuntu registers apt:// for the Software Center).

The actual behavior is that the update-desktop-database command executes properly (I can pipe its output to a file and see it is executing) but the Ubuntu desktop doesn't register the command properly.

  1. If a user manually runs sudo update-desktop-database from an interactive terminal after install, the Mimetype is registered properly, every single time.
  2. To revert the mimetype installation for subsequent testing, remove /usr/share/applications/foo.desktop and run update-desktop-database again which will unregister the foo: mimetype.

So my question is... how does one begin troubleshooting a bug like this?

Again, the packages created on 12.04 don't experience this problem, even when being run on 14.04, so this leads me to believe it is a packaging bug somewhere, but I'm not sure how to debug further.

tresf added a commit to qzind/qz-print that referenced this issue Nov 6, 2015
Fixes packaging on Ubuntu 14.04 via #94
Closes upstream bug report megastep/makeself#58
@tresf
Copy link
Author

tresf commented Nov 6, 2015

Seems to be a umask problem introduced with 842dedf so Ubuntu 12.04 hadn't had it yet.

Somewhat related e75285d.

Created work-around downstream via qzind/qz-print@ba51664.

Closing as invalid since this could be fixed downstream. Hopefully this will help out others using update-desktop-database with makeself.

@tresf tresf closed this as completed Nov 6, 2015
klabarge pushed a commit to klabarge/qz-print that referenced this issue Dec 2, 2015
Fixes packaging on Ubuntu 14.04 via qzind#94
Closes upstream bug report megastep/makeself#58
gpo-geo pushed a commit to orfeotoolbox/OTB that referenced this issue Aug 23, 2017
the current version is makeself has some issue on running linux
particulary on Ubuntu 14.04. I suspect this is the issue on
test passed (but actually failed) only on linux.

Linux (passed with no output messages):
https://dash.orfeo-toolbox.org/testDetails.php?test=59547315&build=287532
OSX (passed with proper messages):
https://dash.orfeo-toolbox.org/testDetails.php?test=60023362&build=287444

lurking on makeself's bug tracker, it could be a umask issue
megastep/makeself#58
megastep/makeself@842dedf
megastep/makeself@e75285d
I am not sure if this is the exact problem and upgrade will fix
issue for us. Because we are not able to reproduce this bug on same
machine executed under same constraints.
Only change is that one is running via crontab and other directly from
terminal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant