Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#21300 - [texlive-bin] pdfjam requires write access to `/var/tmp` instead of `/tmp`

Attached to Project: Arch Linux
Opened by Ciprian Dorin Craciun (ciprian.craciun) - Monday, 18 October 2010, 13:40 GMT
Last edited by Rémy Oudompheng (remyoudompheng) - Tuesday, 26 October 2010, 09:38 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Rémy Oudompheng (remyoudompheng)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

It seems that `/usr/bin/pdfnup` tool (formally part of `pdfjam` AUR-parkage and now part of the `extra/texlive-bin` package) needs write access to `/var/tmp` and as a normal user doesn't have access to write there it fails.

I would expect the tool to use `/tmp` folder in order to create temporary files. (It could also take into account the `TMPDIR` environment variable.)

To reproduce it:
# pdfnup --nup 2x1 --paper a4paper --landscape --noautoscale true --vanilla --outfile ./output.pdf ./input.pdf
mkdir: cannot create directory `/var/tmp/pdfjam19910-189125': Permission denied

It seems that the following line in the `/usr/bin/pdfjam` (symlinking to `/usr/share/texmf-dist/scripts/pdfjam/pdfjam`) could be easily switched:
tempfileDir='/var/tmp' ## /var/tmp is standard on most unix systems
with:
tempfileDir="${TMPDIR:-/tmp" ## /tmp is standard on most unix systems
This task depends upon

Closed by  Rémy Oudompheng (remyoudompheng)
Tuesday, 26 October 2010, 09:38 GMT
Reason for closing:  Upstream
Additional comments about closing:  Upstream declined the change.
Comment by Rémy Oudompheng (remyoudompheng) - Monday, 18 October 2010, 13:47 GMT
A normal user should have write access to /var/tmp, it should have the sticky bit set, just like /tmp.
Comment by Ciprian Dorin Craciun (ciprian.craciun) - Monday, 18 October 2010, 14:18 GMT
From my understanding of the Linux file system hierarchy I would say that `/var/tmp` should be used by daemons and such, and not by ordinary applications. Citing from the LFSH 2.3 (at http://www.pathname.com/fhs/pub/fhs-2.3.html ):
~~~~
/tmp : Temporary files
Purpose
The /tmp directory must be made available for programs that require temporary files.
Programs must not assume that any files or directories in /tmp are preserved between invocations of the program.
~~~~
/var/tmp : Temporary files preserved between system reboots
Purpose
The /var/tmp directory is made available for programs that require temporary files or directories that are preserved between system reboots. Therefore, data stored in /var/tmp is more persistent than data in /tmp.
Files and directories located in /var/tmp must not be deleted when the system is booted. Although data stored in /var/tmp is typically deleted in a site-specific manner, it is recommended that deletions occur at a less frequent interval than /tmp.
~~~~

Even though the specification doesn't exactly point to the intended usage or access rights, I would say that the temporary files needed by `pdfjam` fit better the description of `/tmp` than of `/var/tmp`.

Anyway I think that the solution for this bug depends entirely on a "political" decision: which is the purpose of `/tmp` and which of `/var/tmp`. (I've tried to find such an answer on the ArchLinux Wiki but I came-out empty handed.)
Comment by Rémy Oudompheng (remyoudompheng) - Monday, 18 October 2010, 14:27 GMT
The files generated by pdfnup must undoubtly (in my opinion) end up in /tmp and not in /var/tmp. However, maintaining packages will be easier if we do the least number of changes to the upstream distribution: A suggestion can be made to the tex-live mailing list concerning this.

In any case, a normal installation of ArchLinux, as far as I know, would set permissions 1777 on /var/tmp.
Comment by Ciprian Dorin Craciun (ciprian.craciun) - Monday, 18 October 2010, 14:33 GMT
I admit that I'm not using the vanilla ArchLinux `fstab`, but instead I use `/var/tmp` with 0755 mode. (I don't remember what was the reason for this decision. Maybe I've inherited it from my Debian installation.)

I'll try to suggest this to the `texlive` upstream. As I've seen that you (Remy) are the maintainer of this package, could you provide me with the contact details for the texlive team?
Comment by Rémy Oudompheng (remyoudompheng) - Monday, 18 October 2010, 14:46 GMT
As TeXLive is in sync with new releases of packages on CTAN, it is probably more convenient to contact the author of pdfjam directly, his email address is on the homepage
http://www2.warwick.ac.uk/fac/sci/statistics/staff/academic/firth/software/pdfjam
Comment by Ciprian Dorin Craciun (ciprian.craciun) - Monday, 18 October 2010, 15:50 GMT
Thanks for the pointer. I've written to the developer and explained him the problem / feature. I'm waiting for his feedback.
Comment by Ciprian Dorin Craciun (ciprian.craciun) - Tuesday, 19 October 2010, 04:43 GMT
Well I've asked the developer and he declined the change stating that the package was shipped with `/var/tmp` for more than 8 years and I was the only one to complain.

So I give up. I'll not press this any longer.

Loading...