You are not logged in.

#1 2013-05-21 10:15:25

ebal
Member
From: Athens, GReece
Registered: 2009-05-26
Posts: 213
Website

PKGBUILD & tmpdir

I would like your input on this:

i am using noexec on my /tmp for security reasons

tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec,relatime)

I struggle every time that I build a package using makepkg from a PKGBUILD (custom, abs or AUR)
and forgetting to change my TMPDIR shell variable to something else, like `pwd -P/tmpdir`

I've changed the BUILDDIR at my makepkg.conf

BUILDDIR=./tmpdir/makepkg

but pretty fast i 've realized that this was wrong


Would it be a sanity feature request to ask for pacman (makepkg) to create a ./tmpdir and use it as TMPDIR with an option like -t (or something).
or is just me


http://Ευάγγελος.Μπαλάσκας.gr
Unix System Engineer - Registered Linux User #420129

Offline

#2 2013-05-21 10:51:46

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,231

Re: PKGBUILD & tmpdir

As far as I know, makepkg doesn't use /tmp, unless you save the PKGBUILD to /tmp and call makepkg there.

EDIT, tell a lie, I just saw several temporary files appear in there while building a package. I don't think this is makepkg's fault though, it's more likely to be the compiler. 'man gcc' says that:

       TMPDIR
           If TMPDIR is set, it specifies the directory to use for temporary files.  GCC uses
           temporary files to hold the output of one stage of compilation which is to be used as
           input to the next stage: for example, the output of the preprocessor, which is the
           input to the compiler proper.

You could try setting TMPDIR to something like /dev/shm.

Last edited by WorMzy (2013-05-21 11:05:18)


Sakura:-
Mobo: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Online

#3 2013-05-21 11:16:36

ebal
Member
From: Athens, GReece
Registered: 2009-05-26
Posts: 213
Website

Re: PKGBUILD & tmpdir

No, it isnt makepkg fault this behaviour

yes it is the configuration step that use TMPDIR

eg. i want to enable-spice on qemu so

./configure: line 1358: /tmp/qemu-conf-5543-27601-13933.exe: Permission denied

but it would be nice to do this :

mkdir -pv ./tmpdir
export TMPDIR=./tmpdir

transparently, with an option on makepkg


i wanted to discuss with you people if it make sense to ask for something like that


http://Ευάγγελος.Μπαλάσκας.gr
Unix System Engineer - Registered Linux User #420129

Offline

#4 2013-05-21 12:12:55

progandy
Member
Registered: 2012-05-17
Posts: 2,151

Re: PKGBUILD & tmpdir

try to add  export to your makepkg.conf. This file gets sourced, so this should be possible. Don't use mkdir, but use an existing absolute path. Otherwise you will get the directory in the wrong places each time you call makepkg.

Last edited by progandy (2013-05-21 12:19:43)

Offline

Board footer

Powered by FluxBB