]> git.ipfire.org Git - ipfire-3.x.git/blob - filesystem/filesystem.nm
git: Update to 2.23.0
[ipfire-3.x.git] / filesystem / filesystem.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = filesystem
7 version = 002
8 release = 2
9
10 maintainer = Michael Tremer <michael.tremer@ipfire.org>
11 groups = Base Build System/Base
12 url =
13 license = Public Domain
14 summary = The basic directory layout for a Linux system.
15
16 description
17 The filesystem package is one of the basic packages that is installed
18 on a Linux system. Filesystem contains the basic directory layout
19 for a Linux operating system, including the correct permissions for
20 the directories.
21 end
22
23 # No tarball.
24 sources =
25
26 build
27 # Pakfire supports python scriptlets since
28 # version 0.9.22.
29 requires
30 pakfire-builder >= 0.9.22
31 end
32
33 DIR_APP = %{DIR_SRC}
34
35 build
36 : # Nothing to do
37 end
38
39 install
40 cd %{BUILDROOT}
41 mkdir -pv \
42 boot \
43 dev \
44 etc/pki \
45 etc/skel \
46 etc/sysconfig \
47 home \
48 media \
49 mnt \
50 opt \
51 proc \
52 root \
53 run/lock \
54 srv \
55 sys \
56 tmp \
57 usr/bin \
58 usr/include \
59 usr/lib \
60 usr/%{lib} \
61 usr/lib/locale \
62 usr/lib/modules \
63 usr/sbin \
64 usr/share/{aclocal,dict,doc,empty,info,mime-info,misc} \
65 usr/share/man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p} \
66 usr/src \
67 usr/local/bin \
68 usr/local/etc \
69 usr/local/lib \
70 usr/local/sbin \
71 usr/local/share \
72 usr/local/share/man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x} \
73 usr/local/share/info \
74 usr/local/include \
75 var/empty \
76 var/lib \
77 var/local \
78 var/log \
79 var/nis \
80 var/preserve \
81 var/spool/{mail,lpd} \
82 var/tmp \
83 var/db \
84 var/cache
85
86 ln -snf usr/bin bin
87 ln -snf usr/sbin sbin
88 ln -snf usr/lib lib
89 [ "%{lib}" = "lib" ] || ln -snf usr/%{lib} %{lib}
90
91 ln -snf ../var/tmp usr/tmp
92 ln -snf spool/mail var/mail
93 ln -snf ../run var/run
94 ln -snf ../run/lock var/lock
95
96 # Setting correct permissions.
97 chmod 1777 %{BUILDROOT}/{,var/}tmp
98 chown root:mail %{BUILDROOT}/var/spool/mail
99 chmod 775 %{BUILDROOT}/var/spool/mail
100 end
101
102 # XXX not implemented at the moment
103 export QUALITY_AGENT_NO_DIRECTORY_CHECK = yes
104 export QUALITY_AGENT_NO_DIRECTORY_PRUNE = yes
105 end
106
107 packages
108 package %{name}
109 prerequires = setup
110
111 # We do not know, if the filesystem package is the first
112 # in the transaction, so we create the symlinks prior to running
113 # the transaction.
114 script pretransin python
115 if not os.path.exists("/usr"):
116 os.makedirs("/usr")
117
118 for dir in ("/lib", "/%{lib}", "/sbin", "/bin"):
119 usr_dir = "/usr%s" % dir
120
121 if not os.path.exists(usr_dir):
122 os.makedirs(usr_dir)
123
124 try:
125 os.lstat(dir)
126 except OSError:
127 os.symlink(usr_dir[1:], dir)
128 end
129 end
130
131 # Although this package is not noarch, it does not
132 # contain any binary data and thus has no debuginfo package.
133 end