amazon-efs-utils.spec 6.05 KB
Newer Older
Max Beckett's avatar
Max Beckett committed
1
2
3
4
5
6
7
8
9
#
# Copyright 2017-2018 Amazon.com, Inc. and its affiliates. All Rights Reserved.
#
# Licensed under the MIT License. See the LICENSE accompanying this file
# for the specific language governing permissions and limitations under
# the License.
#

%if 0%{?amzn1}
10
%global python_requires python36
11
12
13
14
%else
%global python_requires python3
%endif

Ian Patel's avatar
Ian Patel committed
15
16
17
%if 0%{?amzn1} || 0%{?rhel} == 6
%global with_systemd 0
%else
Max Beckett's avatar
Max Beckett committed
18
19
20
%global with_systemd 1
%endif

21
22
23
%if 0%{?is_opensuse}
%global platform .opensuse
%else
24
25
26
27

%if 0%{?sle_version}
%global platform .suse
%else
28
29
30
%global platform %{dist}
%endif

31
32
%endif

Max Beckett's avatar
Max Beckett committed
33
Name      : amazon-efs-utils
34
Version   : 1.30.1
35
Release   : 1%{platform}
Max Beckett's avatar
Max Beckett committed
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Summary   : This package provides utilities for simplifying the use of EFS file systems

Group     : Amazon/Tools
License   : MIT
URL       : https://aws.amazon.com/efs

Packager  : Amazon.com, Inc. <http://aws.amazon.com>
Vendor    : Amazon.com

BuildArch : noarch

Requires  : nfs-utils
Requires  : stunnel >= 4.56
Requires  : %{python_requires}
50
51
Requires  : openssl >= 1.0.2
Requires  : util-linux
52
Requires  : which
Max Beckett's avatar
Max Beckett committed
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

%if %{with_systemd}
BuildRequires    : systemd
%{?systemd_requires}
%else
Requires(post)   : /sbin/chkconfig
Requires(preun)  : /sbin/service /sbin/chkconfig
Requires(postun) : /sbin/service
%endif

Source    : %{name}.tar.gz

%description
This package provides utilities for simplifying the use of EFS file systems

%prep
%setup -n %{name}

%install
mkdir -p %{buildroot}%{_sysconfdir}/amazon/efs
%if %{with_systemd}
mkdir -p %{buildroot}%{_unitdir}
install -p -m 644 %{_builddir}/%{name}/dist/amazon-efs-mount-watchdog.service %{buildroot}%{_unitdir}
%else
mkdir -p %{buildroot}%{_sysconfdir}/init
install -p -m 644 %{_builddir}/%{name}/dist/amazon-efs-mount-watchdog.conf %{buildroot}%{_sysconfdir}/init
%endif

mkdir -p %{buildroot}/sbin
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_localstatedir}/log/amazon/efs
84
mkdir -p  %{buildroot}%{_mandir}/man8
Max Beckett's avatar
Max Beckett committed
85
86

install -p -m 644 %{_builddir}/%{name}/dist/efs-utils.conf %{buildroot}%{_sysconfdir}/amazon/efs
Ian Patel's avatar
Ian Patel committed
87
install -p -m 444 %{_builddir}/%{name}/dist/efs-utils.crt %{buildroot}%{_sysconfdir}/amazon/efs
Max Beckett's avatar
Max Beckett committed
88
89
install -p -m 755 %{_builddir}/%{name}/src/mount_efs/__init__.py %{buildroot}/sbin/mount.efs
install -p -m 755 %{_builddir}/%{name}/src/watchdog/__init__.py %{buildroot}%{_bindir}/amazon-efs-mount-watchdog
90
install -p -m 644 %{_builddir}/%{name}/man/mount.efs.8 %{buildroot}%{_mandir}/man8
Max Beckett's avatar
Max Beckett committed
91
92
93
94
95
96
97
98

%files
%defattr(-,root,root,-)
%if %{with_systemd}
%{_unitdir}/amazon-efs-mount-watchdog.service
%else
%config(noreplace) %{_sysconfdir}/init/amazon-efs-mount-watchdog.conf
%endif
Ian Patel's avatar
Ian Patel committed
99
%{_sysconfdir}/amazon/efs/efs-utils.crt
Max Beckett's avatar
Max Beckett committed
100
101
102
/sbin/mount.efs
%{_bindir}/amazon-efs-mount-watchdog
/var/log/amazon
103
%{_mandir}/man8/mount.efs.8.gz
Max Beckett's avatar
Max Beckett committed
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

%config(noreplace) %{_sysconfdir}/amazon/efs/efs-utils.conf

%if %{with_systemd}
%post
%systemd_post amazon-efs-mount-watchdog.service

%preun
%systemd_preun amazon-efs-mount-watchdog.service

%postun
%systemd_postun_with_restart amazon-efs-mount-watchdog.service

%else

%preun
if [ $1 -eq 0 ]; then
   /sbin/stop amazon-efs-mount-watchdog &> /dev/null || true
fi

%postun
if [ $1 -eq 1 ]; then
    /sbin/restart amazon-efs-mount-watchdog &> /dev/null || true
fi

%endif

%clean
132
133

%changelog
134
135
136
137
* Mon Mar 22 2021 Yuan Gao <ygaochn@amazon.com> - 1.30.1
- Support new option: az, enable mount file system to specific availability zone mount target
- Merge PR #84 on Github. Fix to use regional AWS STS endpoints instead of the global endpoint to reduce latency

138
139
140
141
* Mon Jan 25 2021 Yuan Gao <ygaochn@amazon.com> - 1.29.1
- Update the python dependency to python3
- Support SLES and OpenSUSE

142
143
144
* Thu Oct 8 2020 Yuan Gao <ygaochn@amazon.com> - 1.28.2
- Fix an issue where fs cannot be mounted with iam using instance profile when IMDSv2 is enabled

145
146
147
148
* Fri Sep 18 2020 Yuan Gao <ygaochn@amazon.com> - 1.28.1
- Introduce botocore to publish mount success/failure notification to cloudwatch log
- Revert stop emitting unrecognized init system supervisord if the watchdog daemon has already been launched by supervisor check

149
150
151
* Tue Aug 4 2020 Karthik Basavaraj <kbbasav@amazon.com> - 1.27.1
- Merge PR #60 on GitHub. Adds support for AssumeRoleWithWebIdentity

152
153
154
* Wed Jul 1 2020 Yuan Gao <ygaochn@amazon.com> - 1.26.3
- Fix an issue where watchdog crashed during restart because stunnel was killed and pid key was removed from state file

155
156
157
158
159
* Tue Jun 16 2020 Karthik Basavaraj <kbbasav@amazon.com> - 1.26.2
- Clean up stunnel PIDs in state files persisted by previous efs-csi-driver to ensure watchdog spawns a new stunnel after driver restarts.
- Fix an issue where fs cannot be mounted with tls using systemd.automount-units due to mountpoint check

* Tue May 26 2020 Yuan Gao <ygaochn@amazon.com> - 1.25.3
160
161
162
- Fix an issue where subprocess was not killed successfully
- Stop emitting unrecognized init system supervisord if the watchdog daemon has already been launched by supervisor
- Support Fedora
163
- Check if mountpoint is already mounted beforehand for tls mount
164

165
* Tue May 05 2020 Yuan Gao <ygaochn@amazon.com> - 1.25.2
166
167
168
- Fix the issue that IAM role name format is not correctly encoded in python3
- Add optional override for stunnel debug log output location

169
* Mon Apr 20 2020 Yuan Gao <ygaochn@amazon.com> - 1.25.1
170
171
- Create self-signed certificate for tls-only mount

172
* Tue Apr 7 2020 Yuan Gao <ygaochn@amazon.com> - 1.24.4
Yuan Gao's avatar
Yuan Gao committed
173
174
- Fix the malformed certificate info

175
* Fri Mar 27 2020 Yuan Gao <ygaochn@amazon.com> - 1.24.3
176
177
- Use IMDSv1 by default, and use IMDSv2 where required

178
* Tue Mar 10 2020 Yuan Gao <ygaochn@amazon.com> - 1.24.2
179
180
- List which as dependency

181
* Tue Mar 10 2020 Yuan Gao <ygaochn@amazon.com> - 1.24.1
182
183
184
- Enable efs-utils to source region from config file for sigv4 auth
- Fix the issue that stunnel bin exec cannot be found in certain linux distributions

185
* Tue Mar 03 2020 Yuan Gao <ygaochn@amazon.com> - 1.23.2
186
187
188
- Support new option: netns, enable file system to mount in given network namespace
- Support new option: awscredsuri, enable sourcing iam authorization from aws credentials relative uri
- List openssl and util-linux as package dependency for IAM/AP authorization and command nsenter to mount file system to given network namespace