forked from amazonlinux/amazon-ec2-net-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathamazon-ec2-net-utils.spec
More file actions
127 lines (101 loc) · 3.56 KB
/
amazon-ec2-net-utils.spec
File metadata and controls
127 lines (101 loc) · 3.56 KB
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
%if 0%{?amzn} >= 2 || 0%{?fedora} >= 17 || 0%{?rhel} >= 7
%global systemd 1
%else
%global systemd 0
%endif
Name: amazon-ec2-net-utils
Summary: A set of network tools for managing ENIs
Version: 1.5
Release: 1%{?dist}
License: MIT and GPLv2
Source: https://github.com/aws/amazon-ec2-net-utils/archive/%{version}.tar.gz
URL: https://github.com/aws/amazon-ec2-net-utils
BuildArch: noarch
Requires: curl
Requires: iproute
BuildRequires: make
BuildRequires: systemd
%if %{systemd}
%{?systemd_requires}
BuildRequires: systemd-units
Requires: systemd-units
%endif # systemd
Requires: dhclient
Provides: ec2-net-utils = %{version}-%{release}
Obsoletes: ec2-net-utils < 1.5
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
%description
amazon-ec2-net-utils contains a set of utilities for managing elastic network
interfaces.
%prep
%setup -q
%build
%install
make install DESTDIR=%{buildroot} prefix=/usr udevdir=%{buildroot}/%{_udevrulesdir}
mv %{buildroot}/%{_mandir}/man8/ec2ifdown.8 %{buildroot}/%{_mandir}/man8/ec2ifdown.8.gz
%check
make test
%clean
rm -rf $RPM_BUILD_ROOT
%if %{with systemd}
%post
%systemd_post ec2net-scan.service
%systemd_post [email protected]
%preun
%systemd_preun ec2net-scan.service
%systemd_preun [email protected]
%endif # systemd
%files
%{_udevrulesdir}/53-ec2-network-interfaces.rules
%{_udevrulesdir}/75-persistent-net-generator.rules
%config(noreplace) %{_sysconfdir}/modprobe.d/ixgbevf.conf
%config(noreplace) %{_sysconfdir}/sysconfig/network-scripts/ec2net-functions
%{_sysconfdir}/sysconfig/network-scripts/ec2net.hotplug
%{_sysconfdir}/dhcp/dhclient.d/ec2dhcp.sh
%if %{systemd}
%{_sbindir}/ec2ifup
%{_sbindir}/ec2ifdown
%{_sbindir}/ec2ifscan
%attr(0644,root,root) %{_unitdir}/ec2net-scan.service
%attr(0644,root,root) %{_unitdir}/[email protected]
%attr(755, -, -) %{_prefix}/lib/udev/write_net_rules
%{_prefix}/lib/udev/rule_generator.functions
%else
/sbin/ec2ifup
/sbin/ec2ifdown
/sbin/ec2ifscan
%{_sysconfdir}/init/elastic-network-interfaces.conf
%endif # systemd
%doc %{_mandir}/man8/ec2ifup.8.gz
%doc %{_mandir}/man8/ec2ifdown.8.gz
%doc %{_mandir}/man8/ec2ifscan.8.gz
%changelog
* Mon Dec 14 2020 Noah Meyerhans <[email protected]> 1.5-1.amzn2
- Update Provides and Obsoletes to define an upgrade path from ec2-net-utils
- Use upstream Makefile during install
- Run upstream's test suite during check
- Support IP prefix delegation
* Mon Jul 13 2020 Frederick Lefebvre <[email protected]> 1.4-2
- Provides ec2-net-utils for backward compatibility
* Wed Jun 3 2020 Frederick Lefebvre <[email protected]> 1.4-1
- Rename package to match the name of the git repo
- Fix installation on non-systemd environments
- Support toggling default route through {INTERFACE} to main kernel route table [Prithvi Ramesh]
* Thu Mar 5 2020 Frederick Lefebvre <[email protected]> 1.3-2
- Fix installation on non-systemd environments
* Wed Jan 15 2020 Frederick Lefebvre <[email protected]> 1.3-1
- Add support for IMDSv2
* Wed Jan 8 2020 Frederick Lefebvre <[email protected]> 1.2-2.1
- Explicitly set the dhcp timeout for ENIs
* Tue Jul 17 2018 Frederick Lefebvre <[email protected]> 1.2-1.1
- Re-license under MIT
* Wed Jun 06 2018 Chad Miller <[email protected]>
- Loop to get correct MAC address from sysfs when it's
all 00s
* Mon Dec 04 2017 Frederick Lefebvre <[email protected]>
- Add systemd support
* Wed Sep 22 2010 Nathan Blackham <[email protected]>
- move to ec2-utils
- add udev code for symlinking xvd* devices to sd*
* Tue Sep 07 2010 Nathan Blackham <[email protected]>
- initial packaging of script as an rpm