Browse code

Added finger package

Change-Id: I104553de389d4a2df330b8344becb80511137baa
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/1884
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>

DheerajSShetty authored on 2016/12/17 07:03:36
Showing 6 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,36 @@
0
+/*
1
+ * Copyright (c) 1989 The Regents of the University of California.
2
+ * All rights reserved.
3
+ *
4
+ * This code is derived from software contributed to Berkeley by
5
+ * Tony Nardo of the Johns Hopkins University/Applied Physics Lab.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following conditions
9
+ * are met:
10
+ * 1. Redistributions of source code must retain the above copyright
11
+ *    notice, this list of conditions and the following disclaimer.
12
+ * 2. Redistributions in binary form must reproduce the above copyright
13
+ *    notice, this list of conditions and the following disclaimer in the
14
+ *    documentation and/or other materials provided with the distribution.
15
+ * 3. All advertising materials mentioning features or use of this software
16
+ *    must display the following acknowledgement:
17
+ *      This product includes software developed by the University of
18
+ *      California, Berkeley and its contributors.
19
+ * 4. Neither the name of the University nor the names of its contributors
20
+ *    may be used to endorse or promote products derived from this software
21
+ *    without specific prior written permission.
22
+ *
23
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33
+ * SUCH DAMAGE.
34
+ */
35
+
0 36
new file mode 100644
... ...
@@ -0,0 +1,24 @@
0
+diff -rupr b/finger/lprint.c c/finger/lprint.c
1
+--- b/finger/lprint.c	1999-09-14 03:51:11.000000000 -0700
2
+@@ -48,7 +48,7 @@ char lprint_rcsid[] =
3
+ #include <sys/types.h>
4
+ #include <sys/file.h>
5
+ #include <sys/stat.h>
6
+-#include <sys/time.h>
7
++#include <time.h>
8
+ #include "finger.h"
9
+ 
10
+ static void lprint(PERSON *pn);
11
+diff -rupr b/finger/sprint.c c/finger/sprint.c
12
+--- b/finger/sprint.c	1999-12-12 10:59:33.000000000 -0800
13
+@@ -40,7 +40,7 @@ char sprint_rcsid[] = "$Id: sprint.c,v 1
14
+ #endif /* not lint */
15
+ 
16
+ #include <sys/types.h>
17
+-#include <sys/time.h>
18
++#include <time.h>
19
+ #include <stdio.h>
20
+ #include <stdlib.h>
21
+ #include <string.h>
0 22
new file mode 100644
... ...
@@ -0,0 +1,9 @@
0
+[Unit]
1
+Description=Finger Socket
2
+
3
+[Socket]
4
+ListenStream=79
5
+Accept=yes
6
+
7
+[Install]
8
+WantedBy=sockets.target
0 9
new file mode 100644
... ...
@@ -0,0 +1,87 @@
0
+Summary:	The finger client
1
+Name:		finger
2
+Version:	0.17
3
+Release:	1%{?dist}
4
+License:	BSD/
5
+Group:		Applications/Internet
6
+Vendor:		VMware, Inc.
7
+Distribution:   Photon
8
+Source0:	ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/bsd-finger-%{version}.tar.gz
9
+%define sha1 bsd-finger=cc0ab33494c618cf6f75d3e91c744bd36628cfe5
10
+Source1:	finger.socket
11
+Source2:	finger@.service
12
+Source3:	LICENSE
13
+Patch0:		bsd-finger-time.patch
14
+Patch1:		fix-manpage-typo.patch
15
+BuildRequires:	systemd
16
+
17
+%description
18
+Finger is a utility that allows users to see information about system users
19
+(login name, home directory, name, and more) on local and remote systems.
20
+
21
+%package server
22
+License:        	BSD
23
+Summary:        	A Server for Showing User Information
24
+Group:          	System Environment/Daemons
25
+Requires:       	finger
26
+Requires:		systemd
27
+Requires(post):		systemd
28
+Requires(preun):	systemd
29
+Requires(postun):	systemd
30
+
31
+%description server
32
+The finger daemon implements a simple protocol based on RFC1196 that provides an
33
+interface to the Name and Finger programs at several network sites. The program
34
+is supposed to return a friendly human-oriented status report on either the
35
+system at the moment or a person.
36
+
37
+%prep
38
+%setup -q -n bsd-finger-%{version}
39
+%patch0 -p1
40
+%patch1 -p1
41
+
42
+%build
43
+./configure \
44
+	--prefix=%{_prefix}
45
+
46
+make %{?_smp_mflags}
47
+
48
+%install
49
+mkdir -p %{buildroot}%{_bindir}
50
+mkdir -p %{buildroot}%{_mandir}/man{1,8}
51
+mkdir -p %{buildroot}%{_sbindir}
52
+
53
+mkdir -p %{buildroot}%{_unitdir}
54
+install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
55
+install -m 644 %{SOURCE2} %{buildroot}%{_unitdir}
56
+install -m 644 %{SOURCE3} LICENSE
57
+make INSTALLROOT=%{buildroot} MANDIR=/usr/share/man install
58
+
59
+%check
60
+make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
61
+
62
+%post server
63
+%systemd_post finger.socket
64
+
65
+%preun server
66
+%systemd_preun finger.socket
67
+
68
+%postun server
69
+%systemd_postun_with_restart finger.socket
70
+
71
+%files
72
+%license LICENSE
73
+%attr(0755,root,root) %{_bindir}/finger
74
+%{_mandir}/man1/finger.1*
75
+
76
+%files server
77
+%license LICENSE
78
+%{_unitdir}/finger.socket
79
+%{_unitdir}/finger@.service
80
+%attr(0755,root,root) %{_sbindir}/in.fingerd
81
+%{_mandir}/man8/in.fingerd.8*
82
+%{_mandir}/man8/fingerd.8*
83
+
84
+%changelog
85
+*	Wed Dec 7 2016 Dheeraj Shetty <dheerajs@vmware.com> 0.17-1
86
+-	initial version
0 87
new file mode 100644
... ...
@@ -0,0 +1,7 @@
0
+[Unit]
1
+Description=Finger Per-Connection Daemon
2
+
3
+[Service]
4
+ExecStart=-/usr/bin/in.fingerd
5
+StandardInput=socket
6
+StandardError=syslog
0 7
new file mode 100644
... ...
@@ -0,0 +1,11 @@
0
+--- bsd-finger-0.17/finger/finger.1~	2012-02-21 07:18:46.236600851 +0000
1
+@@ -169,7 +169,7 @@
2
+ must be able to see the
3
+ .Pa .nofinger
4
+ file. This generally means that the home directory containing the file
5
+-must have the other-users-execute bit set (o+w). See
6
++must have the other-users-execute bit set (o+x). See
7
+ .Xr chmod 1 .
8
+ If you use this feature for privacy, please test it with ``finger
9
+ @localhost'' before relying on it, just in case.