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

pdfjam fails - unable to create temp file #4823

Closed
davidpiano opened this issue Jan 22, 2020 · 7 comments
Closed

pdfjam fails - unable to create temp file #4823

davidpiano opened this issue Jan 22, 2020 · 7 comments
Labels
bug report Something is not working properly.

Comments

@davidpiano
Copy link

I tried using pdfjam to join several PDF files into one. It didn't work, apparently because pdfjam is hard-coded to create its temp files in /var/tmp , which doesn't exist in the context of Termux. Is there a known workaround for things like this?

@Hax4us
Copy link
Member

Hax4us commented Jan 22, 2020

Here you can change the directory https://github.com/DavidFirth/pdfjam/blob/9664dd92ea9385f9e60a397561ec238305fcea92/bin/pdfjam#L185
From tempfileDir='/var/tmp' to tempfileDir="$PREFIX/tmp"

@Grimler91 Grimler91 added the bug report Something is not working properly. label Jan 22, 2020
@davidpiano
Copy link
Author

Thank you! I should have known that.

At first, I didn't pay attention to single quote marks vs double ones, and I thought your solution didn't work. For any others reading, a heads-up - if you use $PREFIX inside single quotes, remember that it will be taken literally as a dollar sign and six letters rather than interpreted as the location you intended.

@davidpiano
Copy link
Author

I'm not convinced that this report is a real bug, by the way. It looks like an error on my part. However, if it's being treated as a bug to be fixed, that's fine - I guess it will save a little time in the future.

@Grimler91
Copy link
Member

Looks like the code needs to be patched (since it has hardcoded /var/tmp instead of using $TMPDIR), but if you have managed to get it working without patching it then maybe it falls back to $TMPDIR elsewhere

@davidpiano
Copy link
Author

From what I've been able to find out:

  1. The upstream developer was not interested in doing anything to his code.

  2. This is easily fixable by changing a local config file as outlined above - as long as you know you need to do that.

@Grimler91
Copy link
Member

I'll add a patch that fixes this. I'll probably wait until texlive 2020 is released though (in February) since updating texlive means that texlive and aaall subpackages are updated, and that means a lot of unnecessary downloads for just this patch

@davidpiano
Copy link
Author

I certainly agree it's better to wait - I might be the only person in the world who had this problem and didn't know how easy it was to fix. :)

Grimler91 added a commit that referenced this issue Apr 10, 2020
Grimler91 added a commit that referenced this issue Apr 12, 2020
@ghost ghost locked and limited conversation to collaborators Oct 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug report Something is not working properly.
Projects
None yet
Development

No branches or pull requests

3 participants