]>
Commit | Line | Data |
---|---|---|
1 | ############################################################################### | |
2 | # IPFire.org - An Open Source Firewall Solution # | |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
4 | ############################################################################### | |
5 | ||
6 | name = nfs-utils | |
7 | version = 2.6.2 | |
8 | release = 4 | |
9 | ||
10 | groups = Networking/Tools | |
11 | url = http://nfs.sourceforge.net/ | |
12 | license = MIT and GPLv2 and GPLv2+ | |
13 | summary = NFS utilities and supporting clients and daemons for the NFS server. | |
14 | ||
15 | description | |
16 | The nfs-utils package provides a daemon for the kernel NFS server | |
17 | and related tools, which provides a much higher level of performance | |
18 | than the traditional Linux NFS server used by most users. This | |
19 | package also contains the showmount program. Showmount queries the | |
20 | mount daemon on a remote host for information about the NFS server | |
21 | on the remote host. For example, showmount can display the clients | |
22 | which are mounted on that host. | |
23 | end | |
24 | ||
25 | source_dl = http://www.kernel.org/pub/linux/utils/nfs-utils/%{version}/ | |
26 | sources = %{thisapp}.tar.xz | |
27 | ||
28 | build | |
29 | requires | |
30 | autoconf | |
31 | automake | |
32 | e2fsprogs-devel | |
33 | krb5-devel | |
34 | libblkid-devel | |
35 | libdevmapper-devel | |
36 | libcap-devel | |
37 | libevent-devel | |
38 | libkeyutils-devel | |
39 | libmount-devel | |
40 | libtirpc-devel >= 1.3.3-3 | |
41 | libtool | |
42 | rpcsvc-proto | |
43 | shadow-utils | |
44 | sqlite-devel | |
45 | systemd-devel | |
46 | end | |
47 | ||
48 | configure_options += \ | |
49 | --without-tcp-wrappers \ | |
50 | --enable-libmount-mount \ | |
51 | --enable-mountconfig \ | |
52 | --enable-ipv6 \ | |
53 | --enable-gss \ | |
54 | --with-statedir=/var/lib/nfs \ | |
55 | --with-statdpath=/var/lib/nfs/statd \ | |
56 | --with-start-statd=/usr/bin/start-statd \ | |
57 | --with-systemd | |
58 | ||
59 | prepare_cmds | |
60 | # Install utils into correct place. | |
61 | sed -i "s|sbindir = /sbin|sbindir = /usr/bin|g" utils/*/Makefile.am | |
62 | ||
63 | sh autogen.sh | |
64 | ||
65 | %{create_user} | |
66 | end | |
67 | ||
68 | install_cmds | |
69 | mkdir -pv %{BUILDROOT}%{sysconfdir} | |
70 | mkdir -pv %{BUILDROOT}/var/lib/nfs/v4recovery | |
71 | mkdir -pv %{BUILDROOT}/etc/exports.d | |
72 | ||
73 | install -m 755 tools/rpcdebug/rpcdebug %{BUILDROOT}%{sbindir} | |
74 | install -m 644 utils/mount/nfsmount.conf %{BUILDROOT}%{sysconfdir} | |
75 | ||
76 | mkdir -pv %{BUILDROOT}/var/lib/nfs/rpc_pipefs | |
77 | touch %{BUILDROOT}/var/lib/nfs/rmtab | |
78 | ||
79 | mkdir -pv %{BUILDROOT}/usr/lib/nfs-utils/scripts | |
80 | install -m 755 %{DIR_SOURCE}/nfs-lock.preconfig \ | |
81 | %{BUILDROOT}/usr/lib/nfs-utils/scripts/ | |
82 | ||
83 | mkdir -pv %{BUILDROOT}/var/lib/nfs/statd/sm{,.bak} | |
84 | chown rpcuser:rpcuser -Rv %{BUILDROOT}/var/lib/nfs/statd | |
85 | end | |
86 | end | |
87 | ||
88 | create_user | |
89 | getent passwd rpcuser >/dev/null || useradd -l -c "RPC Service User" -r \ | |
90 | -s /sbin/nologin -u 29 -d /var/lib/nfs rpcuser | |
91 | getent group rpcuser >/dev/null || groupadd -g 29 rpcuser 2>/dev/null | |
92 | end | |
93 | ||
94 | packages | |
95 | package %{name} | |
96 | provides | |
97 | rpc.idmapd = %{thisver} | |
98 | rpc.mountd = %{thisver} | |
99 | rpc.nfsd = %{thisver} | |
100 | rpc.statd = %{thisver} | |
101 | rpc.gssd = %{thisver} | |
102 | rpc.svggssd = %{thisver} | |
103 | end | |
104 | ||
105 | requires | |
106 | quota | |
107 | rpcbind | |
108 | util-linux | |
109 | end | |
110 | ||
111 | nfsnobody_uid = 65534 | |
112 | ||
113 | script prein | |
114 | %{create_user} | |
115 | ||
116 | getent group nfsnobody >/dev/null || groupadd -g %{nfsnobody_uid} nfsnobody | |
117 | getent passwd nfsnobody >/dev/null || useradd -l -c "Anonymous NFS User" -r \ | |
118 | -s /sbin/nologin -u %{nfsnobody_uid} -g %{nfsnobody_uid} \ | |
119 | -d /var/lib/nfs nfsnobody | |
120 | end | |
121 | ||
122 | script postin | |
123 | systemctl daemon-reload >/dev/null 2>&1 || : | |
124 | end | |
125 | ||
126 | script postup | |
127 | systemctl daemon-reload >/dev/null 2>&1 || : | |
128 | end | |
129 | ||
130 | script postun | |
131 | systemctl daemon-reload >/dev/null 2>&1 || : | |
132 | end | |
133 | end | |
134 | ||
135 | package libnfsidmap | |
136 | template LIBS | |
137 | end | |
138 | ||
139 | package libnfsidmap-devel | |
140 | template DEVEL | |
141 | end | |
142 | ||
143 | package %{name}-debuginfo | |
144 | template DEBUGINFO | |
145 | end | |
146 | end |