Package nfs: Specfile

  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
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
Name: nfs
Version: 1.3.4
Release: alt1
Epoch: 1

Summary: The Linux NFS clients, utilities and server
License: GPL
Group: Networking/Other
Url: http://nfs.sourceforge.net/

Source0: %name-%version-%release.tar

BuildRequires: libblkid-devel libevent-devel libnfsidmap-devel >= 0.23 libwrap-devel
BuildRequires: libdevmapper-devel libkrb5-devel libsqlite3-devel
BuildRequires: libcap-devel libtirpc-devel libkeyutils-devel libmount-devel
BuildRequires: libkeyutils-devel

%package clients
Summary: The Linux NFS client
Group: Networking/Other

PreReq: shadow-utils
PreReq: %name-utils = %epoch:%version-%release
Requires(post): %post_service
Requires(preun): %preun_service
Requires: keyutils >= 1.4-alt2
Conflicts: libnfsidmap < 0.23

%package server
Summary: The Linux NFS server
Group: Networking/Other

PreReq: %name-clients = %epoch:%version-%release
Requires(post): %post_service
Requires(preun): %preun_service

%package utils
Summary: The Linux NFS services utilities
Group: Networking/Other

PreReq: control
Requires: rpcbind >= 0.2.0-alt1
Conflicts: mount < 2.12r-alt2
Conflicts: nfs-clients = 1:1.0.10-alt2

%package stats
Summary: The Linux NFS stats utilities
Group: Networking/Other
Conflicts: nfs-utils < 1:1.2.4-alt0.4

%description
This package provides the Linux NFS utilities and server.
This package replaces the old knfsd package.

%description clients
This package provides the Linux NFS clients.

%description server
This package provides the Linux NFS server.

%description utils
This package provides the Linux NFS utilities,
including mount.nfs helper.

%description stats
This package provides the Linux NFS stats utilities.

%prep
%setup

%build
[ -f ./autogen.sh ] && sh ./autogen.sh
%configure \
    --enable-mount \
    --enable-libmount-mount \
    --enable-gss \
    --enable-svcgss \
    --enable-tirpc \
    --enable-ipv6 \
    --with-statduser=rpcuser \
    --with-statdpath=%_localstatedir/nfs/statd \
    --with-systemd=%systemd_unitdir \
    #
sed -i 's/#define[[:blank:]]\+START_STATD.\+$/#undef START_STATD/' support/include/config.h
%make_build

%install
%make_install DESTDIR=%buildroot install

cp -a altlinux/etc %buildroot

ln -s nfs-blkmap.service %buildroot%systemd_unitdir/blkmapd.service
ln -s nfs-idmapd.service %buildroot%systemd_unitdir/idmapd.service
ln -s nfs-server.service %buildroot%systemd_unitdir/nfs.service
ln -s rpc-gssd.service %buildroot%systemd_unitdir/gssd.service
ln -s rpc-statd.service %buildroot%systemd_unitdir/nfslock.service
ln -s rpc-svcgssd.service %buildroot%systemd_unitdir/svcgssd.service

mkdir -p %buildroot/sbin
mv  %buildroot%_sbindir/rpc.{statd,gssd} \
    %buildroot%_sbindir/blkmapd \
    %buildroot%_sbindir/nfsidmap \
    %buildroot%_sbindir/sm-notify %buildroot/sbin/

mkdir -p %buildroot%_localstatedir/nfs/{rpc_pipefs,v4recovery}

#-------------------------------------------------------------------------------
%pre clients
%_sbindir/groupadd -r -f rpcuser &> /dev/null
%_sbindir/useradd -r -g rpcuser -d %_localstatedir/nfs -s /dev/null -c 'RPC Service User' -n rpcuser &> /dev/null ||:
%_sbindir/groupadd -r -f nfsuser &> /dev/null
%_sbindir/useradd -r -g nfsuser -d /dev/null -s /dev/null -c 'NFS Service User' -n nfsuser &> /dev/null ||:

%pre utils
[ $1 -eq 1 ] || /usr/sbin/control-dump nfsmount

%post clients
%post_service nfslock
%post_service blkmapd
%post_service gssd

%post utils
[ $1 -eq 1 ] || /usr/sbin/control-restore nfsmount

%preun clients
%preun_service nfslock
%preun_service blkmapd
%preun_service gssd

%post server
%post_service nfs
%post_service idmapd
%post_service svcgssd

%preun server
%preun_service nfs
%preun_service idmapd
%preun_service svcgssd

%triggerpostun -- nfs-server <= 1.2.5-alt1
. /etc/init.d/functions
SourceIfNotEmpty /etc/sysconfig/nfs
is_yes "$SECURE_NFS" || exit 0
touch /var/lock/subsys/rpc.svcgssd
/sbin/chkconfig svcgssd on
/sbin/service svcgssd condrestart

#-------------------------------------------------------------------------------
%files server
%_initdir/nfs
%_initdir/idmapd
%_initdir/svcgssd

%systemd_unitdir/nfs.service
%systemd_unitdir/idmapd.service
%systemd_unitdir/svcgssd.service

%systemd_unitdir/nfs-server.service
%systemd_unitdir/nfs-mountd.service
%systemd_unitdir/nfs-idmapd.service
%systemd_unitdir/rpc-svcgssd.service
%systemd_unitdir/proc-fs-nfsd.mount

/sbin/nfsdcltrack
%_sbindir/exportfs
%_sbindir/nfsstat
%_sbindir/rpc.idmapd
%_sbindir/rpc.mountd
%_sbindir/rpc.nfsd
%_sbindir/rpc.svcgssd

%_man5dir/exports.*
%_man7dir/nfsd.*
%_man8dir/exportfs.*
%_man8dir/idmapd.*
%_man8dir/rpc.idmapd.*
%_man8dir/nfsstat.*
%_man8dir/nfsdcltrack.*
%_man8dir/mountd.*
%_man8dir/rpc.mountd.*
%_man8dir/nfsd.*
%_man8dir/rpc.nfsd.*
%_man8dir/svcgssd.*
%_man8dir/rpc.svcgssd.*

%config(noreplace) %_localstatedir/nfs/xtab
%config(noreplace) %_localstatedir/nfs/etab
%config(noreplace) %_localstatedir/nfs/rmtab
%dir %_localstatedir/nfs/v4recovery

#-------------------------------------------------------------------------------
%files clients
%doc README
%dir %_localstatedir/nfs
%dir %_localstatedir/nfs/rpc_pipefs
%dir %attr(700,rpcuser,rpcuser) %_localstatedir/nfs/statd
%dir %attr(700,rpcuser,rpcuser) %_localstatedir/nfs/statd/sm
%dir %attr(700,rpcuser,rpcuser) %_localstatedir/nfs/statd/sm.bak
%ghost %attr(700,rpcuser,rpcuser) %_localstatedir/nfs/statd/state

%config(noreplace) %_sysconfdir/sysconfig/nfs

%_initdir/blkmapd
%_initdir/nfslock
%_initdir/gssd

%systemd_unitdir/blkmapd.service
%systemd_unitdir/gssd.service
%systemd_unitdir/nfslock.service

%systemd_unitdir/nfs-client.target
%systemd_unitdir/nfs-config.service
%systemd_unitdir/nfs-utils.service
%systemd_unitdir/auth-rpcgss-module.service
%systemd_unitdir/var-lib-nfs-rpc_pipefs.mount
%systemd_unitdir/nfs-blkmap.service
%systemd_unitdir/rpc-statd.service
%systemd_unitdir/rpc-statd-notify.service
%systemd_unitdir/rpc-gssd.service

/sbin/rpc.gssd
/sbin/rpc.statd
/sbin/sm-notify
/sbin/blkmapd
/sbin/nfsidmap

%_man8dir/gssd.*
%_man8dir/rpc.gssd*
%_man8dir/blkmapd.*
%_man8dir/statd.*
%_man8dir/rpc.statd.*
%_man8dir/sm-notify.*
%_man8dir/rpc.sm-notify.*
%_man8dir/nfsidmap.*

#-------------------------------------------------------------------------------
%files utils
%config %_sysconfdir/control.d/facilities/nfsmount
%attr(700,root,root) /sbin/mount.nfs
/sbin/mount.nfs4
/sbin/umount.*
/sbin/osd_login
%_bindir/showmount
%_sbindir/rpcdebug

%_man5dir/nfs.*
%_man5dir/nfsmount.conf.*
%_man8dir/rpcdebug.*
%_man8dir/showmount.*
%_man8dir/mount.nfs.*
%_man8dir/umount.nfs.*

%files stats
%_sbindir/mountstats
%_sbindir/nfsiostat
%_man8dir/mountstats.*
%_man8dir/nfsiostat.*

%changelog
* Wed Aug 31 2016 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.3.4-alt1
- 1.3.4 released

* Wed Apr 27 2016 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.3.3-alt2
- rebuilt with libtirpc-1.0.1

* Thu Oct 01 2015 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.3.3-alt1
- 1.3.3 released

* Thu Feb 05 2015 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.3.2-alt2
- use 4.0 as default nfs version for a while

* Wed Feb 04 2015 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.3.2-alt1
- 1.3.2 released

* Mon Dec 29 2014 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.3.2-alt0.4
- 1.3.2 rc4

* Thu Mar 20 2014 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.9-alt1
- 1.2.9 released

* Tue Apr 23 2013 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.8-alt1
- 1.2.8 released

* Wed Oct 31 2012 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.6-alt2
- selinux security_label exports option support added (closes: 27906)
- more systemd related changes (shaba@)

* Fri Jun 22 2012 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.6-alt1
- 1.2.6 released

* Wed Nov 23 2011 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.5-alt2
- systemd related changes (shaba@):
  + rpc.svcgssd repackaged as separate service
  + systemd service files packaged

* Sat Oct 22 2011 Vitaly Kuznetsov <vitty@altlinux.ru> 1:1.2.5-alt1.1
- Rebuild with Python-2.7

* Mon Sep 26 2011 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.5-alt1
- 1.2.5 released

* Thu Jun 30 2011 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.4-alt3
- rebuilt with fresh libgssglue

* Thu Jun 30 2011 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.4-alt2
- 1.2.4 rereleased

* Wed Jun 29 2011 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.4-alt1
- 1.2.4 released

* Wed Jun 29 2011 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.4-alt0.11
- 1.2.4-rc9 released
- CVE-2011-2500 fixed

* Wed Jun 08 2011 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.4-alt0.10
- updated from git.7235a216

* Thu May 05 2011 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.4-alt0.9
- do not use libmount for a while

* Fri Apr 22 2011 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.4-alt0.8
- 1.2.4-rc8 released

* Mon Mar 07 2011 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.4-alt0.6
- 1.2.4-rc6 released

* Mon Feb 28 2011 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.4-alt0.5
- 1.2.4-rc5 released

* Tue Nov 09 2010 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.4-alt0.4
- nfs stats utilities separated to subpackage

* Mon Nov 08 2010 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.4-alt0.3
- initscript changed

* Sat Nov 06 2010 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.4-alt0.2
- 1.2.4 rc2 released

* Fri Mar 26 2010 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.2.2-alt1
- 1.2.2 released

* Tue Apr 28 2009 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.1.6-alt1
- 1.1.6 released

* Tue Mar 31 2009 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.1.5-alt1
- 1.1.5 released

* Wed Mar  4 2009 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.1.4-alt2
- ensure all required for krb5 sec flavour modules are loaded 
- added idmapd restart after nfs

* Fri Oct 17 2008 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.1.4-alt1
- 1.1.4 released

* Mon Jul 28 2008 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.1.3-alt1
- 1.1.3 released

* Sun Mar 30 2008 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.1.2-alt1
- 1.1.2 released

* Thu Feb  7 2008 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.1.1-alt3
- occasional exportfs crashes on x86_64 fixed, i hope \#14360

* Tue Oct 23 2007 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.1.1-alt2
- use /sbin/sm-notify from statd

* Sat Oct 20 2007 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.1.1-alt1
- 1.1.1 released

* Sat Mar 24 2007 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.0.10-alt5
- do not create socket for kernel during mount, if not needed

* Sat Feb 24 2007 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.0.10-alt4
- do not mount rpc_pipefs from none, \#10896
- added conflict of utils subpackage vs clients = 1.0.10-alt2, \#10854

* Wed Dec 20 2006 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.0.10-alt3
- nhfsstone removed due unclear legal status
- mount.nfs moved from clients to utils subpackage

* Sat Dec  2 2006 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.0.10-alt2
- enabled mount.nfs build
- made no_subtree_check the default
- patches applied:
  + nfs-utils-1.0.10-alt-rh-mountd.patch
  + nfs-utils-1.0.10-rh-idmapd-scandir-leak.patch
  + nfs-utils-1.0.10-rh-idmap-dirscancb-listloop.patch
  + nfs-utils-1.0.10-rh-udp-no-connect.patch
  + nfs-utils-1.0.10-rh-export-nosubtree.patch
  + nfs-utils-1.0.10-rh-nfsmount-authnone.patch
  + nfs-utils-1.0.10-rh-mount-options-v3.patch
  + nfs-utils-1.0.10-rh-lazy-umount.patch
  + nfs-utils-1.0.10-rh-mount-sloppy.patch
  + nfs-utils-1.0.10-rh-mount-man-nfs.patch
  + nfs-utils-1.0.10-rh-return-mount-error.patch
  + nfs-utils-1.0.10-rh-mount-remount.patch
  + nfs-utils-1.0.10-rh-mount-nfsvers.patch

* Mon Oct  9 2006 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.0.10-alt1
- 1.0.10 released
- patches applied:
  + nfs-utils-1.0.9-statd-all.patch
  + nfs-utils-1.0.9-idmapd-pidfile.patch
  + nfs-utils-1.0.9-idmapd-conffile.patch
  + nfs-utils-1.0.9-gssd-pidfile.patch
  + nfs-utils-1.0.9-alt-krb5.patch
  + nfs-utils-1.0.9-alt-rh-zerostats.patch
  + nfs-utils-1.0.9-rh-gssd-mixed-case.patch

* Tue Jul 18 2006 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.0.9-alt1
- 1.0.9 released

* Mon Jan 16 2006 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.0.7-alt5
- fixed build on x86_64

* Sat Oct 15 2005 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.0.7-alt4
- rebuilt with GSSAPI enabled

* Sat Apr  2 2005 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.0.7-alt3
- dropped quota requirement, see #6327

* Mon Mar  7 2005 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.0.7-alt2
- #6177 fixed

* Tue Feb 22 2005 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.0.7-alt1
- 1.0.7
- partial support for NFSv4 added (no gssapi yet)

* Sat Nov 27 2004 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.0.6-alt3
- statd fixes
- exports(5) manpage updated

* Thu Feb 12 2004 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.0.6-alt2
- redundant kernel requirement dropped

* Sat Oct 11 2003 Sergey Bolshakov <sbolshakov@altlinux.ru> 1:1.0.6-alt1
- 1.0.6
- black magic for kernels < 2.4.20pre4 dropped

* Wed Jul  9 2003 Sergey Bolshakov <s.bolshakov@sam-solutions.net> 1:1.0.3-alt3
- fixed xlog off-by-one bug

* Sat Jul  5 2003 Sergey Bolshakov <s.bolshakov@sam-solutions.net> 1:1.0.3-alt2
- statd patches from CVS head
- initscripts
- don't obsolete nfs-utils

* Fri Mar 28 2003 Sergey Bolshakov <s.bolshakov@sam-solutions.net> 1:1.0.3-alt1
- 1.0.3
- support for kernels < 2.2.19 dropped

* Sat Oct 19 2002 Sergey Bolshakov <s.bolshakov@belcaf.com> 1:1.0.1-alt2
- rebuilt in new env

* Wed Jul 24 2002 Sergey Bolshakov <s.bolshakov@belcaf.com> 1.0.1-alt1
- 1.0.1

* Sat Mar  2 2002 Sergey Bolshakov <s.bolshakov@belcaf.com> 0.3.3-alt2
- rpc.statd fixed

* Wed Feb 27 2002 Sergey Bolshakov <s.bolshakov@belcaf.com> 0.3.3-alt1
- readopted for ALT
- UID/GID mapping disabled by default

* Thu Feb 21 2002 Grigory Milev <week@altlinux.ru> 0.3.3-2aw
- fixed run levels in nfs.init script
- cleaunup post and preun install scripts

* Wed Jan 16 2002 Grigory Milev <week@altlinux.ru> 0.3.3-1aw
- spec cleanup for compatible with bte

* Tue Dec 04 2001 Alexander Bokovoy <a.bokovoy@sam-solutions.net> 0.3.3-1aw
- 0.3.3
- AW integration
- Updated:
  + drop-privs patch
  + syslog patch removed [already in upstream]
- Added:
  + UID/GID mapping [enabled by default]

* Mon May 28 2001 Dmitry V. Levin <ldv@altlinux.ru> 0.3.1-alt2
- Added rquotad to nfs-server prereq list.

* Fri May 25 2001 Dmitry V. Levin <ldv@altlinux.ru> 0.3.1-alt1
- 0.3.1
- Merged RH patches.

* Wed Apr 04 2001 Dmitry V. Levin <ldv@altlinux.ru> 0.2.1-ipl5mdk
- Moved %_sbindir/showmount to %_bindir/showmount.

* Tue Jan 23 2001 Dmitry V. Levin <ldv@fandra.org> 0.2.1-ipl4mdk
- Merged RH fixes.

* Sun Jan 21 2001 Dmitry V. Levin <ldv@fandra.org> 0.2.1-ipl3mdk
- RE adaptions.
- Renamed packages to %name-server and %name-clients.
- Rewritten init scripts.
- Added more documentation.
- Merged RH patches.