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

Create Tectonic #1025

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Create Tectonic #1025

wants to merge 15 commits into from

Conversation

@probonopd
Copy link
Member Author

Why are we getting AppRun: Permission denied? Might be a bug in our test setup?

@pkgw
Copy link

pkgw commented Dec 30, 2018

@probonopd
Copy link
Member Author

FATAL: Key Categories is not in .desktop file exactly once

Please see #2.

@probonopd
Copy link
Member Author

probonopd commented Dec 30, 2018

Is this a command line app? If yes, the desktop file also needs Terminal=true.

me@host:~$ Downloads/Tectonic-0.1.11-x86_64.AppImage 
error: The following required arguments were not provided:
    <INPUT>

USAGE:
    Tectonic-0.1.11-x86_64(1).AppImage <INPUT> --chatter <LEVEL> --format <PATH> --outfmt <FORMAT> --pass <PASS>

For more information try --help

@pkgw
Copy link

pkgw commented Dec 30, 2018

Thanks @probonopd . I've updated the AppImage — does it lint now?

@probonopd
Copy link
Member Author

probonopd commented Dec 30, 2018

Unfortunately no, so let's have a look by hand:

me@host:~$ ./Tectonic-0.1.11-x86_64.AppImage --appimage-extract '*.desktop'
squashfs-root/tectonic.desktop
TODO: Implement inode.base.inode_type 10
me@host:~$ ./Tectonic-0.1.11-x86_64.AppImage --appimage-version
Version: d185526

Oops, we have (hopefully) fixed this in the meantime.

d185526 is very old (from October), why are you not using the latest continuous appimagetool?

Anyway, on to analyzing:

# Mount it
me@host:~$ ./Tectonic-0.1.11-x86_64.AppImage --appimage-mount &
[1] 13474
me@host:~$ /tmp/.mount_Tectonf5hZp2

# Check its desktop file
me@host:~$ cat /tmp/.mount_Tectonf5hZp2/tectonic.desktop 
[Desktop Entry]
Version=1.0
Type=Application
Name=Tectonic
Comment=Tectonic is a modernized, complete, self-contained TeX/LaTeX engine, powered by XeTeX and TeXLive.
TryExec=tectonic
Exec=tectonic %F
Icon=tectonic
MimeType=image/svg+xml;

No Categories=...; there.

@pkgw
Copy link

pkgw commented Dec 30, 2018

OK. I think the problem is that I made the image with an old AppDir. What's the expected usage of the AppDir — should I basically be recreating it every time I make an image? I was thinking maybe it would be a long-lived directory that stored any extra resource files we'd need, but I'm getting the impression I should just be making it with mktemp -d.

I don't know anything about AppImage so I'm just using the tooling that @xtaniguchimasaya had:

linuxdeploy-x86_64.AppImage:
	wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/$@ -O $(MAKEFILEDIR)/$@
	chmod +x $(MAKEFILEDIR)/$@

Should this become https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage instead? Looks like the command line options are different but presumably I can figure out how to adapt ...

@probonopd
Copy link
Member Author

probonopd commented Dec 30, 2018

What's the expected usage of the AppDir — should I basically be recreating it every time I make an image?

Yes.

Using linuxdeploy is fine, I have opened an issue there so that they will hopefully update their appimagetool soon which will make the --appimage-extract work as intended.

@pkgw
Copy link

pkgw commented Dec 30, 2018

@probonopd Thanks, OK, I've been reading a bit more and learning more how this system works. Take 3 imminent.

@pkgw
Copy link

pkgw commented Dec 30, 2018

@probonopd Is there a fixed URL to download an AppImage of zsync2? There are continuous releases available on GitHub but the filenames contain the commit hash, so I can't hardcode a simple URL to pull down the AppImage. (I'm envisioning a script that will use zsync2 to pull down the latest linuxdeploy before making the Tectonic appimage.)

Edit Never mind, it's not too hard to use the GitHub API. This script is going to be a bit silly, but hey.

@probonopd
Copy link
Member Author

What do you need zsync2 for? The linuxdeploy AppImage comes with zsyncmake which is all that is needed.

@pkgw
Copy link

pkgw commented Dec 30, 2018

I'm using zsync2 to efficiently pull down the latest linuxdeploy AppImage. Here's the script I put together.

Anyway, I've uploaded another new AppImage. I think this one should have a good desktop file.

@probonopd
Copy link
Member Author

That doesn't make sense, at least not if you want to generate the AppImages as part of your Travis CI builds (as would make most sense). The entire Travis CI build system gets "thrown away" after each run anyway. So just download it from scratch each time.

@pkgw
Copy link

pkgw commented Dec 30, 2018

That's a good point. I'm running the script manually a lot right now, but hopefully that won't be the case going forward ...

@pkgw
Copy link

pkgw commented Jan 14, 2019

There is now a "continuous" release: https://github.com/tectonic-typesetting/tectonic/releases/tag/continuous . Hopefully the AppImage passes all lints but I haven't checked personally.

@probonopd
Copy link
Member Author

Bug in worker.sh? Or Firejail?

@probonopd
Copy link
Member Author

Permission denied. Why?

@pkgw
Copy link

pkgw commented Apr 19, 2019

@probonopd I don't know anything about the infrastructure here — is this problem likely to be something about how we create our AppImage, or unrelated?

@probonopd
Copy link
Member Author

To be honest, I don't know yet. May well have to do with firejail which I am using, but I am not sure yet.

On which kind of system are you producing your AppImage? Which filesystem is that system using? (ext4/btrfs?)

@pkgw
Copy link

pkgw commented Apr 19, 2019

On which kind of system are you producing your AppImage? Which filesystem is that system using? (ext4/btrfs?)

We're generating it in Travis CI (script here), and it looks like that means ext4.

@probonopd
Copy link
Member Author

This is strange... don't know what is causing this. The issue is most likely not on your end.

@probonopd
Copy link
Member Author

probonopd commented May 11, 2019

I can confirm that this is related to running in Firejail:

me@host:~$ wget -c -q "https://github.com/AppImage/AppImageHub/releases/download/deps/firejail.tar.gz" ; sudo tar xf firejail.tar.gz -C /
me@host:~$ sudo chown root:root /usr/bin/firejail ; sudo chmod u+s /usr/bin/firejail # suid
me@host:~$ firejail --quiet --noprofile --net=none --appimage Downloads/tectonic-continuous-x86_64.AppImage 
/bin/bash: /run/firejail/appimage/.appimage-10595/AppRun: Permission denied

# Without Firejail it works:

me@host:~$ Downloads/tectonic-continuous-x86_64.AppImage 
error: The following required arguments were not provided:
    <INPUT>

USAGE:
    tectonic-continuous-x86_64.AppImage <INPUT> --chatter <LEVEL> --format <PATH> --outfmt <FORMAT> --pass <PASS>

For more information try --help

Does the application need any unusual/special permissions? If not, we might need to ask the Firejail team how to debug this.

@pkgw
Copy link

pkgw commented May 12, 2019

@probonopd No, Tectonic should not need anything at all unusual. It accesses the network and saves files in a cache directory in $HOME, I guess?

@probonopd
Copy link
Member Author

I think this is a Firejail issue not related to Tectonic. Let's see to which conclusion the discussion in netblue30/firejail#2690 will come.

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

Successfully merging this pull request may close these issues.

2 participants