-
Notifications
You must be signed in to change notification settings - Fork 2
/
fedmsg-download.spec
190 lines (145 loc) · 5.79 KB
/
fedmsg-download.spec
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
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?pyver: %global pyver %(%{__python} -c "import sys ; print sys.version[:3]")}
%global modname fedmsg_download
# Got Systemd?
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
%global with_systemd 1
%else
%global with_systemd 0
%endif
Name: fedmsg-download
Version: 0.1.21
Release: 1%{?dist}
Summary: Fedora Infrastructure real-time messaging consumer for downloads
Group: Applications/Internet
License: LGPLv2+
URL: http://github.com/p3ck/%{name}
Source0: http://github.com/p3ck/%{name}/tarball/%{name}-%{version}#/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: fedmsg >= 0.4.0
Requires: fedmsg >= 0.4.0
Requires: pexpect
Requires: python-setuptools
%if 0%{?rhel}%{?fedora} <= 6
BuildRequires: python-ordereddict
BuildRequires: python-argparse
Requires: python-ordereddict
Requires: python-argparse
%endif
%if %{with_systemd}
BuildRequires: systemd-units
Requires(post): systemd
Requires(pre): systemd
Requires(postun): systemd
%else
Requires(post): chkconfig
Requires(preun): chkconfig
# This is for /sbin/service
Requires(preun): initscripts
Requires(postun): initscripts
%endif
%description
Download Consumer which downloads latest branched and rawhide builds when a message from
fedmsg is received.
%prep
%setup -q -n %{name}-%{version}
%build
%{__python} setup.py build
%install
%{__python} setup.py install -O1 --skip-build \
--install-data=%{_datadir} --root %{buildroot}
%{__mkdir_p} %{buildroot}%{_sysconfdir}/fedmsg.d/
%{__cp} fedmsg.d/*.py %{buildroot}%{_sysconfdir}/fedmsg.d/.
%{__mkdir_p} %{buildroot}/%{_var}/run/%{modname}
%{__mkdir_p} %{buildroot}/%{_var}/log/%{modname}
%if %{with_systemd}
%{__mkdir_p} %{buildroot}%{_unitdir}
%{__install} init.d/fedmsg-download.service %{buildroot}%{_unitdir}/%{name}.service
%else
%{__mkdir_p} %{buildroot}%{_sysconfdir}/init.d
%{__install} init.d/fedmsg-download.init %{buildroot}%{_sysconfdir}/init.d/%{name}
%endif
%post
%if %{with_systemd}
%systemd_post %{name}
%endif
%preun
%if %{with_systemd}
%systemd_preun %{name}
%endif
%postun
%if %{with_systemd}
%systemd_postun_with_restart %{name}
%endif
%files
%doc LICENSE
%{_bindir}/%{name}
%if %{with_systemd}
%attr(0644, root, root)%{_unitdir}/%{name}.service
%else
%attr(0755, root, root)%{_sysconfdir}/init.d/%{name}
%endif
%{python_sitelib}/%{modname}/
%{python_sitelib}/%{modname}-%{version}-py%{pyver}.egg-info/
%config(noreplace) %{_sysconfdir}/fedmsg.d
%changelog
* Mon Apr 24 2017 Bill Peck <[email protected]> 0.1.21-1
- Add retry logic to the rsync beyond simply checking for max user connections.
- Report return code if it fails ([email protected])
* Thu Apr 06 2017 Bill Peck <[email protected]> 0.1.20-1
- Fix path passed to import command. ([email protected])
* Mon Apr 03 2017 Bill Peck <[email protected]> 0.1.19-1
- Forgot to import time module ([email protected])
* Mon Apr 03 2017 Bill Peck <[email protected]> 0.1.18-1
- Update to support pulling Secondary arches ([email protected])
* Wed May 11 2016 Bill Peck <[email protected]> 0.1.17-1
- wrap download method in try/except block. ([email protected])
* Wed May 11 2016 Bill Peck <[email protected]> 0.1.16-1
- use double quotes is easier to handle in ansible ([email protected])
* Fri May 06 2016 Bill Peck <[email protected]> 0.1.15-1
- do the main downloading in a seperate thread ([email protected])
- change logging for run command ([email protected])
- switch to using subprocess. deal with output as its generated since keeping
the entire rsync log may be quite large ([email protected])
* Mon Apr 04 2016 Bill Peck <[email protected]> 0.1.14-1
- allow more flexibility when dealing with broken .composeinfo files.
- include last 10 lines of rsync commands ([email protected])
* Wed Mar 30 2016 Bill Peck <[email protected]> 0.1.13-1
- paperbag release ([email protected])
* Wed Mar 30 2016 Bill Peck <[email protected]> 0.1.12-1
- update for systemd ([email protected])
* Fri Mar 27 2015 Bill Peck <[email protected]> 0.1.11-3
- Update spec file for newer fedora ([email protected])
* Tue Oct 28 2014 Bill Peck <[email protected]> 0.1.11-2
- Accidentally left debug level logging as the default ([email protected])
* Tue Oct 28 2014 Bill Peck <[email protected]> 0.1.11-1
- make it easier to set logging to DEBUG level ([email protected])
- allow rsyncing composes only if they have a valid .composeinfo file
* Wed Sep 17 2014 Bill Peck <[email protected]> 0.1.10-1
- fix for locking in init script ([email protected])
* Wed Feb 20 2013 Bill Peck <[email protected]> 0.1.9-1
- Update command syntax to newer fedmsg. Fix download.py to support downloading
rawhide without .composeinfo ([email protected])
- update Requires to specify newer fedmsg. fix setup.py url and authors.
- Update fedmsg_download/consumer.py ([email protected])
* Tue Oct 30 2012 Bill Peck <[email protected]> 0.1.8-1
- I will get this to work. :-) ([email protected])
* Tue Oct 30 2012 Bill Peck <[email protected]> 0.1.7-1
- last time trying to get github url to work. :-( ([email protected])
- one last update to work with github's urls ([email protected])
* Tue Oct 30 2012 Bill Peck <[email protected]> 0.1.6-1
- Updated source locations to github. ([email protected])
* Tue Oct 30 2012 Bill Peck <[email protected]> 0.1.5-1
- clean up log and run dirs. ([email protected])
* Tue Oct 30 2012 Bill Peck <[email protected]> 0.1.4-1
- updated topic filtering. ([email protected])
* Wed Oct 24 2012 Bill Peck <[email protected]> 0.1.3-1
- new package built with tito
* Wed Oct 24 2012 Bill Peck <[email protected]> - 0.1.0-1
- Initial packaging.