File: sandbox

package info (click to toggle)
acr 2.2.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 712 kB
  • sloc: sh: 4,738; makefile: 41
file content (48 lines) | stat: -rw-r--r-- 1,472 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
ACR sandbox
===========

ACR implements --sandbox-prefix flag to allow users to install programs in a
sandbox-way.


For example:

Suppose you have a chroot/jailed environment for some users on your box in
/home/jailed/ directory. In this directory you have another system installed
(/usr,/home,/etc...).

If you use --prefix=/home/jailed/ you'll probably have problems when running
the target application into the jailed environment. Because program will find
their files in /home/jailed/usr/share/data/... And this directory only exists
out of the box.

Another scene could be: I want to install a program in /usr directory, like
all the rest of the system. But I want to know the /PLIST/, the list of all
files installed, generate a MD5 checksum and reinstall the application to the
properly path (or just cp -Ra).

To solve this kind of problems, ACR implements a new flag called
--sandbox-prefix, that allows you to specify the directory where all files
will be installed.

SPREFIX (sandbox-prefix) points by default to PREFIX. Logically your Makefiles
will require some new stuff, this is an example:

----------------------------8<-----------------------
# pfx stf
PREFIX=@PREFIX@
SPREFIX=@SPREFIX@
SPREFIX?=${PREFIX}

# oth stf
VPATH=@VPATH@
INSTALL=@INSTALL@
INSTALL_DIR=@INSTALL_DIR@
INSTALL_SCRIPT=@INSTALL_SCRIPT@

(...)

install:
	${INSTALL_DIR} ${SPREFIX}/bin
	${INSTALL_SCRIPT} bin/hello ${SPREFIX}/bin
------------------>8---------------------------------