]>
Commit | Line | Data |
---|---|---|
38a7b64b | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
38a7b64b BS |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = nfs-utils |
f6a0ff40 | 7 | version = 2.6.2 |
27a002f4 | 8 | release = 5 |
802ea3af MT |
9 | |
10 | groups = Networking/Tools | |
37c147af | 11 | url = https://nfs.sourceforge.net/ |
802ea3af MT |
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 | |
38a7b64b | 22 | which are mounted on that host. |
802ea3af MT |
23 | end |
24 | ||
37c147af | 25 | source_dl = https://www.kernel.org/pub/linux/utils/nfs-utils/%{version}/ |
61166a61 | 26 | sources = %{thisapp}.tar.xz |
802ea3af MT |
27 | |
28 | build | |
29 | requires | |
61166a61 MT |
30 | autoconf |
31 | automake | |
b4725ddd SS |
32 | e2fsprogs-devel |
33 | krb5-devel | |
802ea3af | 34 | libblkid-devel |
61166a61 | 35 | libdevmapper-devel |
802ea3af MT |
36 | libcap-devel |
37 | libevent-devel | |
f6a0ff40 | 38 | libkeyutils-devel |
61166a61 | 39 | libmount-devel |
454f960a | 40 | libtirpc-devel >= 1.3.3-3 |
61166a61 | 41 | libtool |
f6a0ff40 | 42 | rpcsvc-proto |
61166a61 MT |
43 | shadow-utils |
44 | sqlite-devel | |
f6a0ff40 | 45 | systemd-devel |
802ea3af MT |
46 | end |
47 | ||
48 | configure_options += \ | |
802ea3af | 49 | --without-tcp-wrappers \ |
61166a61 MT |
50 | --enable-libmount-mount \ |
51 | --enable-mountconfig \ | |
52 | --enable-ipv6 \ | |
f6a0ff40 | 53 | --enable-gss \ |
27a002f4 | 54 | --enable-caps \ |
f6a0ff40 SS |
55 | --with-statedir=/var/lib/nfs \ |
56 | --with-statdpath=/var/lib/nfs/statd \ | |
57 | --with-start-statd=/usr/bin/start-statd \ | |
58 | --with-systemd | |
61166a61 MT |
59 | |
60 | prepare_cmds | |
f6a0ff40 SS |
61 | # Install utils into correct place. |
62 | sed -i "s|sbindir = /sbin|sbindir = /usr/bin|g" utils/*/Makefile.am | |
63 | ||
61166a61 MT |
64 | sh autogen.sh |
65 | ||
66 | %{create_user} | |
67 | end | |
68 | ||
69 | install_cmds | |
70 | mkdir -pv %{BUILDROOT}%{sysconfdir} | |
71 | mkdir -pv %{BUILDROOT}/var/lib/nfs/v4recovery | |
72 | mkdir -pv %{BUILDROOT}/etc/exports.d | |
73 | ||
a8172e14 | 74 | install -m 755 tools/rpcdebug/rpcdebug %{BUILDROOT}%{sbindir} |
61166a61 MT |
75 | install -m 644 utils/mount/nfsmount.conf %{BUILDROOT}%{sysconfdir} |
76 | ||
77 | mkdir -pv %{BUILDROOT}/var/lib/nfs/rpc_pipefs | |
78 | touch %{BUILDROOT}/var/lib/nfs/rmtab | |
79 | ||
80 | mkdir -pv %{BUILDROOT}/usr/lib/nfs-utils/scripts | |
81 | install -m 755 %{DIR_SOURCE}/nfs-lock.preconfig \ | |
82 | %{BUILDROOT}/usr/lib/nfs-utils/scripts/ | |
83 | ||
84 | mkdir -pv %{BUILDROOT}/var/lib/nfs/statd/sm{,.bak} | |
85 | chown rpcuser:rpcuser -Rv %{BUILDROOT}/var/lib/nfs/statd | |
27a002f4 SS |
86 | |
87 | # Set capabilities | |
88 | chmod -v 0755 %{BUILDROOT}%{bindir}/mount.nfs | |
89 | setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/mount.nfs | |
61166a61 MT |
90 | end |
91 | end | |
92 | ||
93 | create_user | |
94 | getent passwd rpcuser >/dev/null || useradd -l -c "RPC Service User" -r \ | |
95 | -s /sbin/nologin -u 29 -d /var/lib/nfs rpcuser | |
96 | getent group rpcuser >/dev/null || groupadd -g 29 rpcuser 2>/dev/null | |
802ea3af MT |
97 | end |
98 | ||
99 | packages | |
100 | package %{name} | |
61166a61 MT |
101 | provides |
102 | rpc.idmapd = %{thisver} | |
103 | rpc.mountd = %{thisver} | |
104 | rpc.nfsd = %{thisver} | |
105 | rpc.statd = %{thisver} | |
106 | rpc.gssd = %{thisver} | |
107 | rpc.svggssd = %{thisver} | |
108 | end | |
109 | ||
802ea3af | 110 | requires |
61166a61 MT |
111 | quota |
112 | rpcbind | |
802ea3af MT |
113 | util-linux |
114 | end | |
61166a61 MT |
115 | |
116 | nfsnobody_uid = 65534 | |
117 | ||
118 | script prein | |
119 | %{create_user} | |
120 | ||
121 | getent group nfsnobody >/dev/null || groupadd -g %{nfsnobody_uid} nfsnobody | |
122 | getent passwd nfsnobody >/dev/null || useradd -l -c "Anonymous NFS User" -r \ | |
123 | -s /sbin/nologin -u %{nfsnobody_uid} -g %{nfsnobody_uid} \ | |
124 | -d /var/lib/nfs nfsnobody | |
125 | end | |
126 | ||
127 | script postin | |
128 | systemctl daemon-reload >/dev/null 2>&1 || : | |
129 | end | |
130 | ||
131 | script postup | |
132 | systemctl daemon-reload >/dev/null 2>&1 || : | |
133 | end | |
134 | ||
135 | script postun | |
136 | systemctl daemon-reload >/dev/null 2>&1 || : | |
137 | end | |
802ea3af | 138 | end |
1f9bc2f0 | 139 | |
f6a0ff40 SS |
140 | package libnfsidmap |
141 | template LIBS | |
142 | end | |
143 | ||
144 | package libnfsidmap-devel | |
145 | template DEVEL | |
146 | end | |
147 | ||
1f9bc2f0 MT |
148 | package %{name}-debuginfo |
149 | template DEBUGINFO | |
150 | end | |
802ea3af | 151 | end |