]>
Commit | Line | Data |
---|---|---|
db79035b | 1 | Summary: A restricted shell for assigning scp- or sftp-only access |
24d3f99d | 2 | Summary(pl.UTF-8): Okrojona powłoka dająca dostęp tylko do scp i/lub sftp |
db79035b | 3 | Name: rssh |
4850fc78 AG |
4 | Version: 2.3.4 |
5 | Release: 1 | |
64976b0f | 6 | License: BSD-like |
55a072cf | 7 | Group: Applications/Shells |
c116513d | 8 | Source0: http://downloads.sourceforge.net/rssh/%{name}-%{version}.tar.gz |
4850fc78 | 9 | # Source0-md5: 5211f5fe206704f813a3cec61f487042 |
725d2557 | 10 | Patch0: %{name}-userbuild.patch |
dde01ed5 | 11 | Patch1: %{name}-mkchroot.patch |
5b91b1f1 | 12 | Patch2: %{name}-rsync-protocol.patch |
6e71b8e1 | 13 | URL: http://www.pizzashack.org/rssh/ |
21e6cdf7 PG |
14 | BuildRequires: autoconf |
15 | BuildRequires: automake | |
fbbf0c3f | 16 | BuildRequires: openssh-clients >= 3.5p1 |
8f117bf2 ER |
17 | Requires(post): grep |
18 | Requires(preun): sed >= 4.0 | |
5b514173 | 19 | Conflicts: openssh-server < 3.5p1 |
db79035b PG |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
21 | ||
8f117bf2 | 22 | %undefine with_ccache |
07af00d7 | 23 | |
db79035b PG |
24 | %description |
25 | rssh is a small shell that provides the ability for system | |
26 | administrators to give specific users access to a given system via scp | |
27 | or sftp only. | |
28 | ||
72edc327 JR |
29 | %description -l pl.UTF-8 |
30 | rssh jest małym shellem, który pozwala administratorowi ograniczyć | |
31 | dostęp na danym koncie tylko do scp i/lub sftp. | |
db79035b PG |
32 | |
33 | %prep | |
32c38a6e | 34 | %setup -q |
725d2557 | 35 | %patch0 -p1 |
dde01ed5 | 36 | %patch1 |
5b91b1f1 | 37 | %patch2 -p1 |
db79035b PG |
38 | |
39 | %build | |
16283df4 | 40 | %{__aclocal} |
41 | %{__automake} | |
42 | %{__autoconf} | |
e17cda7c | 43 | %configure \ |
0b23ec24 | 44 | --with-scp=/usr/bin/scp \ |
53d76ec4 | 45 | --with-sftp-server=/usr/%{_lib}/openssh/sftp-server |
e17cda7c PG |
46 | |
47 | %{__make} | |
db79035b PG |
48 | |
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
8f117bf2 | 51 | install -d $RPM_BUILD_ROOT/bin |
db79035b | 52 | |
16283df4 | 53 | %{__make} install \ |
54 | DESTDIR=$RPM_BUILD_ROOT | |
55a072cf | 55 | |
c116513d | 56 | %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/rssh.conf{.default,} |
7be41473 | 57 | ln -sf rssh $RPM_BUILD_ROOT%{_bindir}/scpsh |
58 | ln -sf rssh $RPM_BUILD_ROOT%{_bindir}/sftpsh | |
21e6cdf7 | 59 | |
8f117bf2 ER |
60 | # legacy |
61 | ln -s %{_bindir}/%{name} $RPM_BUILD_ROOT/bin/%{name} | |
62 | ln -s %{_bindir}/scpsh $RPM_BUILD_ROOT/bin/scpsh | |
63 | ln -s %{_bindir}/sftpsh $RPM_BUILD_ROOT/bin/sftpsh | |
64 | ||
db79035b PG |
65 | %clean |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | ||
55a072cf PG |
68 | %post |
69 | if [ ! -f /etc/shells ]; then | |
8f117bf2 | 70 | umask 022 |
55a072cf PG |
71 | echo "%{_bindir}/%{name}" > /etc/shells |
72 | echo "%{_bindir}/scpsh" >> /etc/shells | |
73 | echo "%{_bindir}/sftpsh" >> /etc/shells | |
74 | else | |
75 | if ! grep -q '^%{_bindir}/%{name}$' /etc/shells; then | |
76 | echo "%{_bindir}/%{name}" >> /etc/shells | |
77 | fi | |
78 | if ! grep -q '^%{_bindir}/scpsh$' /etc/shells; then | |
79 | echo "%{_bindir}/scpsh" >> /etc/shells | |
80 | fi | |
81 | if ! grep -q '^%{_bindir}/sftpsh$' /etc/shells; then | |
82 | echo "%{_bindir}/sftpsh" >> /etc/shells | |
83 | fi | |
84 | fi | |
85 | ||
86 | %preun | |
87 | if [ "$1" = "0" ]; then | |
8f117bf2 | 88 | %{__sed} -i -e '/^%(echo %{_bindir} | sed -e 's,/,\\/,g')\/\(%{name}\|scpsh\|sftpsh\)$/d' /etc/shells |
55a072cf PG |
89 | fi |
90 | ||
8f117bf2 | 91 | %triggerpostun -- %{name} < 2.3.2-0.6 |
3905b4b6 | 92 | # make compat symlinks, the symlinks are discarded using %ghost on package uninstall |
8f117bf2 ER |
93 | ln -sf %{_bindir}/%{name} /bin/%{name} |
94 | ln -sf %{_bindir}/scpsh /bin/scpsh | |
95 | ln -sf %{_bindir}/sftpsh /bin/sftpsh | |
96 | ||
db79035b PG |
97 | %files |
98 | %defattr(644,root,root,755) | |
dde01ed5 | 99 | %doc AUTHORS ChangeLog README CHROOT SECURITY mkchroot.sh |
532352a3 | 100 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rssh.conf |
fbbf0c3f | 101 | %attr(755,root,root) %{_bindir}/%{name} |
55a072cf PG |
102 | %attr(755,root,root) %{_bindir}/scpsh |
103 | %attr(755,root,root) %{_bindir}/sftpsh | |
4850fc78 | 104 | %attr(4755,root,root) %{_libexecdir}/rssh_chroot_helper |
725d2557 | 105 | %{_mandir}/man?/* |
8f117bf2 ER |
106 | # legacy |
107 | %ghost /bin/%{name} | |
108 | %ghost /bin/scpsh | |
109 | %ghost /bin/sftpsh |