forked from sclorg/softwarecollections
-
Notifications
You must be signed in to change notification settings - Fork 0
/
softwarecollections.spec
491 lines (451 loc) · 21.5 KB
/
softwarecollections.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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
%global scls_statedir %{_localstatedir}/scls
%global scls_confdir %{_sysconfdir}/softwarecollections
%global cron_confdir %{_sysconfdir}/cron.d
%global httpd_confdir %{_sysconfdir}/httpd/conf.d
%global httpd_group apache
%global guide_name packaging-guide
%global guide_version 1
Name: softwarecollections
Version: 0.9
Release: 1%{?dist}
Summary: Software Collections Management Website and Utils
Group: System Environment/Daemons
License: BSD
URL: http://softwarecollections.org/
Source0: http://github.srcurl.net/misli/%{name}/%{version}/%{name}-%{version}.tar.gz
# Additional sources are not yet supported by tito
# TODO: uncomment next line
#Source1: %{guide_name}-%{guide_version}.tar.gz
BuildArch: noarch
BuildRequires: publican
BuildRequires: python3-devel
BuildRequires: python3-setuptools
Requires: createrepo_c
Requires: cronie
Requires: flite
Requires: httpd
Requires: memcached
Requires: mod_ssl
Requires: python3-django >= 1.6
Requires: python3-django-markdown2
Requires: python3-django-sekizai
Requires: python3-django-simple-captcha
Requires: python3-django-south
Requires: python3-django-tagging
Requires: python3-flock
Requires: python3-memcached
Requires: python3-mod_wsgi
Requires: python3-openid
Requires: python3-pillow
Requires: python3-pylibravatar
Requires: python3-requests
Requires: rpm-build
Requires: yum-utils
Requires: MTA
%description
Software Collections Management Website and Utils
%prep
%setup -q
# Additional sources are not yet supported by tito
# TODO: uncomment next line
#%setup -qn %{name}-%{version} -D -T -a 1
%build
rm %{name}/localsettings-development.py
mv %{name}/localsettings-production.py localsettings
mv %{name}/wsgi.py htdocs/
# Additional sources are not yet supported by tito
# TODO: remove next line
tar -xzf %{guide_name}-%{guide_version}.tar.gz
./guide-build %{guide_name}-%{guide_version}
./guide-import %{guide_name}-%{guide_version}
%{__python3} setup.py build
%install
# install python package
%{__python3} setup.py install --skip-build --root %{buildroot}
# install conf file as target of localsettings.py symlink
install -p -D -m 0644 localsettings \
%{buildroot}%{scls_confdir}/localsettings
ln -s %{scls_confdir}/localsettings \
%{buildroot}%{python3_sitelib}/%{name}/localsettings.py
# install commandline interface with bash completion
install -p -D -m 0755 manage.py %{buildroot}%{_bindir}/%{name}
install -p -D -m 0644 %{name}_bash_completion \
%{buildroot}%{_sysconfdir}/bash_completion.d/%{name}_bash_completion
# install httpd config file and wsgi config file
install -p -D -m 0644 conf/httpd/%{name}.conf \
%{buildroot}%{httpd_confdir}/%{name}.conf
install -p -D -m 0644 htdocs/wsgi.py \
%{buildroot}%{scls_statedir}/htdocs/wsgi.py
# install directories for static content and site media
install -p -d -m 0775 htdocs/static \
%{buildroot}%{scls_statedir}/htdocs/static
install -p -d -m 0775 htdocs/media \
%{buildroot}%{scls_statedir}/htdocs/media
install -p -d -m 0775 htdocs/repos \
%{buildroot}%{scls_statedir}/htdocs/repos
# install separate directory for sqlite db
install -p -d -m 0775 data \
%{buildroot}%{scls_statedir}/data
# install crontab
install -p -D -m 0644 conf/cron/%{name} \
%{buildroot}%{cron_confdir}/%{name}
# remove .po files
find %{buildroot} -name "*.po" | xargs rm -f
# create file list
(cd %{buildroot}; find *) | egrep -v '\.mo$' | \
sed -r -e 's|\.py[co]?$|.py*|' -e 's|__pycache__.*$|__pycache__/*|' | sort -u | \
while read FILE; do
[ -d "%{buildroot}/$FILE" ] && echo "%dir /$FILE" || echo "/$FILE"
done | grep %{python3_sitelib} > %{name}.files
%post
# create secret key
if [ ! -e %{scls_statedir}/secret_key ]; then
touch %{scls_statedir}/secret_key
chown apache %{scls_statedir}/secret_key
chgrp apache %{scls_statedir}/secret_key
chmod 0400 %{scls_statedir}/secret_key
dd bs=1k of=%{scls_statedir}/secret_key if=/dev/urandom count=5
fi
# link default certificate
if [ ! -e %{_sysconfdir}/pki/tls/certs/softwarecollections.org.crt ]; then
ln -s localhost.crt %{_sysconfdir}/pki/tls/certs/softwarecollections.org.crt
fi
# link default private key
if [ ! -e %{_sysconfdir}/pki/tls/private/softwarecollections.org.key ]; then
ln -s localhost.key %{_sysconfdir}/pki/tls/private/softwarecollections.org.key
fi
# link default chain file
if [ ! -e %{_sysconfdir}/pki/tls/certs/softwarecollections.org.CA.crt ]; then
ln -s localhost.crt %{_sysconfdir}/pki/tls/certs/softwarecollections.org.CA.crt
fi
service httpd condrestart
if [ -e %{scls_statedir}/data/db.sqlite3 ]; then
# update database
softwarecollections syncdb --migrate --noinput || :
else
# install database
softwarecollections syncdb --all --noinput || :
softwarecollections migrate --fake || :
fi
softwarecollections collectstatic --noinput || :
softwarecollections makeerrorpages || :
%files -f %{name}.files
%doc LICENSE README.md
%{_bindir}/%{name}
%{_sysconfdir}/bash_completion.d/%{name}_bash_completion
%config(noreplace) %{cron_confdir}/%{name}
%config(noreplace) %{httpd_confdir}/%{name}.conf
%config(noreplace) %{scls_confdir}/localsettings
%{scls_statedir}/htdocs/wsgi.py*
%attr(775,root,%{httpd_group}) %dir %{scls_statedir}/htdocs/repos
%attr(775,root,%{httpd_group}) %dir %{scls_statedir}/htdocs/static
%attr(775,root,%{httpd_group}) %dir %{scls_statedir}/htdocs/media
%attr(775,root,%{httpd_group}) %dir %{scls_statedir}/data
%changelog
* Wed Apr 23 2014 Jakub Dorňák <[email protected]> 0.9-1
- command sclprovides ([email protected])
- list related collections on collection detail ([email protected])
- find related collections ([email protected])
- dummy migration related to 0c75cfcbf9c093554db748fea872c80339a6e044
- sclsync with multiprocessing generates lists of RPM provides
- share yum.config for all repos in one collection ([email protected])
- fix workaround to really work ([email protected])
- delete synced RPMs on repo.delete() ([email protected])
- do not display browse link until synced ([email protected])
- _new => _blank ([email protected])
- rpmbuild params for EPEL5 packages ([email protected])
- menu item active for all subpages ([email protected])
- nice index header and current year in footer ([email protected])
- fix chain file path ([email protected])
- AddIcon rpm.png .rpm ([email protected])
* Wed Apr 09 2014 Miroslav Suchý <[email protected]> 0.8-1
- add google analytics code ([email protected])
- license ([email protected])
- add SSLCertificateChainFile to the config file ([email protected])
* Tue Apr 08 2014 Miroslav Suchý <[email protected]> 0.7-1
- add Licensing Guidelines ([email protected])
- redirect scl.org to www.scl.org, which better corresponds to the certificate
values ([email protected])
- yet again fix policies ([email protected])
- fix typo ([email protected])
- ServerAlias *, ServerAdmin [email protected] ([email protected])
- invalid syntax in policy texts ([email protected])
- nice, branded directory listing ([email protected])
- change policy texts one more time ([email protected])
- filter by distro, distro-version, arch ([email protected])
- Revert "send email as [email protected]" ([email protected])
- Bluehost logo ([email protected])
- send email as [email protected] ([email protected])
- use a temp dir for storing/accessing yum-cache ([email protected])
- workaround BZ 1079387 ([email protected])
- make debugging easier ([email protected])
- Links to mailing list ([email protected])
- Pretty pagination ([email protected])
- do not include insecure content ([email protected])
- copyright year adjusted to current year ([email protected])
- drop www subdomain and unnecessary SSL directives ([email protected])
- add redirection of softwarecollections.org without www ([email protected])
- Requires: python3-django-simple-captcha ([email protected])
- change policy labels ([email protected])
- move scls related commands to the right place ([email protected])
- sync request after the import ([email protected])
- we should not call the maintainer "Author" ([email protected])
- add captcha to ComplainForm ([email protected])
- use form's self.object ([email protected])
- allow user to mark "bad content" ([email protected])
- Redesigned collections list + added download count ([email protected])
- allow + in the name ([email protected])
- Mailing list mention on home page ([email protected])
- Code indentation on home page ([email protected])
- DeveloperWeek Award ([email protected])
- merge scls/static/scls/style.css to static/stylesheets/custom.css
- always sync all repos, user may enable / disable repos any time
- use truncate tag instead of truncate filter ([email protected])
- truncate_tags ([email protected])
- new command sclrpms ([email protected])
- just comments ([email protected])
- also add username to rpmname ([email protected])
- allow more repos of the same collection to be installed ([email protected])
- truncating markdown text may lead to wrong markdown parsing, truncate the
final html instead ([email protected])
- notify managers on approval request ([email protected])
- Fixed the voting stars appearance ([email protected])
- Approved collections show as such ([email protected])
- display message about success after any action ([email protected])
- do not limit the lenght of tags ([email protected])
- safe markdown ([email protected])
- fixed scls:download reverse ([email protected])
- Don't refresh copr projects list if it's already loaded ([email protected])
- validate_name ([email protected])
- Refactor JS for importing/editing SCL: ([email protected])
- always order by 'approved' flag, default order by download_count
- Merge pull request #31 from sochotnicky/feature-docs-rework
- End the repo file download url with rpm name ([email protected])
- [docs] Rework documentation and quickstart ([email protected])
- rename scls/preview.html to scls/softwarecollection_preview.html
- class page-header in forms ([email protected])
- auto_sync help_text ([email protected])
- collaborators explanation text (TODO) ([email protected])
- move button 'delete' from the beginning to the end ([email protected])
- fix title in sync_req.html ([email protected])
- review_req form ([email protected])
- sync_req form ([email protected])
- scl.get_copr_url() ([email protected])
- use repo.disro.title() in ReposForm ([email protected])
- Use jQuery for stars manipulation ([email protected])
- Merge pull request #25 from bkabrda/master ([email protected])
- Truncated description in listing ([email protected])
- Removed stray div ([email protected])
- Fix Dockerfile to properly create 'test' user ([email protected])
- display tags on collection detail only ([email protected])
- Add Dockerfile for development and some instructions on how to build/run it
- Fixed fonts ([email protected])
- less auto tags ([email protected])
- fix obj / scl renaming ([email protected])
- default policy DEV ([email protected])
- remove back button from import form ([email protected])
- allow user to leave all edit forms without saving ([email protected])
- Use form for deleting ([email protected])
- help_texts ([email protected])
- allow user to enable / disable particular repos ([email protected])
- do not process language files (we do not provide translations yet)
- Beautified the Collaborators form ([email protected])
- Repo URL in detail ([email protected])
- Fixed fonts ([email protected])
- featured scl forms ([email protected])
- fix error messages in scl forms ([email protected])
- sample doc text for import (TODO) ([email protected])
- copr > Copr (and spaces) ([email protected])
- collaborators.add.help_text ([email protected])
- drop locale files (containing bad translation) ([email protected])
- Filtering by policies ([email protected])
- Pretty policy table ([email protected])
- Typo in repo list ([email protected])
- Button colours changed to grey ([email protected])
- configure logging ([email protected])
- apache must be able to manage repos ([email protected])
- add ADMINS and SERVER_EMAIL to localsettings.py ([email protected])
- generate unique SECURE_KEY during installation ([email protected])
- Polishing ([email protected])
- Merge remote-tracking branch 'origin/master' ([email protected])
- Polishing ([email protected])
- New Collection form ([email protected])
- New Collection form ([email protected])
- add collaborator by username (select may be too long) ([email protected])
- rework deleting, allow copr change, help_texts ([email protected])
- New Collection page ([email protected])
- SCL toolbar ([email protected])
- Collections ([email protected])
- Sticky footer ([email protected])
- CSS fixes ([email protected])
- FAQ bug ([email protected])
- Top menu + Jumbotron fixed ([email protected])
- Link to Manage collaborators ([email protected])
- Allow managing comaintainers ([email protected])
- Fix edit collection title ([email protected])
- Markup fix in quick_start ([email protected])
- Replaced old Bootstrap with 3.1.1 ([email protected])
- acquire exclusive lock on repos while syncing repos ([email protected])
- delete repo in scl.delete() ([email protected])
- cronjob for deleting files ([email protected])
- command to delete collections marked for deletion ([email protected])
- delete possible zombie scl when creating new ([email protected])
- mark collections for deletion by delete field ([email protected])
- allow user to delete collection ([email protected])
- fix dangling links on homepage ([email protected])
- drop last_sync_date, use last_modified from copr ([email protected])
- createrepo_c is MUCH better ([email protected])
- require cron ([email protected])
- 5 per page was just for testing ([email protected])
- fix order option names ([email protected])
- add ordering ([email protected])
- drop unused configuration option ([email protected])
- use nice url using srcurl.net ([email protected])
- scl.download_count: increment on download, recalculate on sync
- error pages ([email protected])
- pagination ([email protected])
- attach style to list of collections ([email protected])
- simple search / filter form ([email protected])
- distro icons for epel and fedora ([email protected])
- fixed migration ([email protected])
- [doc] Update documentation by sclo-build package. ([email protected])
- count downloads ([email protected])
- distro version as part of RPM name - it may be string ('rawhide')
- add field repo.slug ([email protected])
- print name of collection when starting sync ([email protected])
- create yum config RPMs ([email protected])
- sclsync to provide some error information ([email protected])
- shorter /var/scls instead of /var/lib/softwarecollections
- we do not need createsamplecollections any more ([email protected])
- Improve yum cache handling ([email protected])
- [doc] Update content of quick-start. ([email protected])
- Document distribution. ([email protected])
- auto tags ([email protected])
- macro is called scl_basedir and not _scl_basedir ([email protected])
- macro is called scl_vendor and not _scl_vendor ([email protected])
- browser does not import the font definition, until it is secure
- "addtoblock" must be inside "block" ([email protected])
- nice alt texts for stars ([email protected])
- scl-toolbar (needs icons) ([email protected])
- render score input as form field ([email protected])
- use sekizai for page specific javascripts and styles ([email protected])
- new urls ([email protected])
- move form logic from views to forms ([email protected])
- tags really editable ([email protected])
- avoid double / in copr request url ([email protected])
- copr_project with choices ([email protected])
- destdir is part of configuration ([email protected])
- Add support for adding and editing tags in owned collections
- another big bang ([email protected])
- added scl.repos, some dates and flags ([email protected])
- %%post syncdb and collectstatic ([email protected])
- List user's coprs when creating new scl ([email protected])
- enabled markdown in text fields ([email protected])
- import cleanup ([email protected])
- updated star rating ([email protected])
- add star rating system for collections ([email protected])
- use correct class name ([email protected])
- require Django 1.6 ([email protected])
- display yum repository in details ([email protected])
- production repos are in /var/scl-repos ([email protected])
- add command to manage.py in cron ([email protected])
- maintainer is always collaborator ([email protected])
- renamed 'directory' to 'collections' ([email protected])
- edit view with per object permissions ([email protected])
- softwarecollections.auth handles per object permissions and provides template
tag 'allowed' ([email protected])
- add real policy texts ([email protected])
- new create form ([email protected])
- single text field for policy, new flag 'accepted' ([email protected])
- requires python3-django-south ([email protected])
- updated README ([email protected])
- cron file under conf dir ([email protected])
- added data directory for the development instance to be more like the
production one ([email protected])
- repos under the document_root ([email protected])
- added missing requirements ([email protected])
- using messages (need some styles) ([email protected])
- updated README ([email protected])
- start usgin south ([email protected])
- username and name unique ([email protected])
- [spec] restart apache after upgrade ([email protected])
- own /var/scl-repos ([email protected])
- [doc] Make must for /opt/sclo more readable. ([email protected])
- [doc] In development documentation are now mentioned macros, which can
redefine installation path. ([email protected])
- Make the example of metapackage more readable. Add link to documentation
maintained by documentation guys from Fedora. ([email protected])
- Update README.md with needed packages. ([email protected])
- even better handling of scl.copr ([email protected])
- Add cron job ([email protected])
- Initial version of django command for synchronizing with copr repos
- Add "need_sync" column to the scls_softwarecollection table ([email protected])
- Add missing Requires to spec file ([email protected])
- ensure scl.copr is available if possible ([email protected])
- SoftwareCollection connected with Copr ([email protected])
- cool copr submodule ([email protected])
- SoftwareCollection fields: -name, -version, +copr_user, +copr_project
- require login for view scls:list_my ([email protected])
- FAS login without django-social ([email protected])
- tuple urls with namespaces ([email protected])
- unique score for each collection and user ([email protected])
- more on views ([email protected])
- Move DEFAULT_COPR_API_URL to settings.py ([email protected])
- Exception.args is supposed to be list, not str ([email protected])
- more on views ([email protected])
- use User instead of UserModel ([email protected])
- initial views: detail, create ([email protected])
- new property scl.slug ([email protected])
- validate scl.version ([email protected])
- always include softwarecollections/* ([email protected])
- missing __init__.py in pages submodule ([email protected])
- utils do not need to be executable ([email protected])
- use separate application for collections management ([email protected])
- use separated submodule and template dir for pages ([email protected])
- Add cli subcommand for syncing COPR repos ([email protected])
- note about makesuperuser and createsamplecollections in README.md
- pagination in softwarecollections_list.html ([email protected])
- temporary script for creating sample set of collections in database
- get username from openid.sreg.nickname ([email protected])
- new fields and relations: update_freq, rebase_policy, maturity, score,
maintainer, collaborators ([email protected])
- SoftwareCollection.tags ([email protected])
- cli subcommand to make user a superuser ([email protected])
* Fri Nov 29 2013 Jakub Dorňák <[email protected]> 0.6-1
- Document definition of _scl_prefix in For Developers and link it from Quick
start. ([email protected])
- fas authentication ([email protected])
* Thu Nov 28 2013 Jakub Dorňák <[email protected]> 0.5-1
- fixed BuildRequires to build in copr (mock) ([email protected])
- minimized dependencies ([email protected])
- fix README format ([email protected])
- updated README ([email protected])
- use version in setup.py directly ([email protected])
* Thu Nov 28 2013 Jakub Dorňák <[email protected]> 0.4-1
- changed deployment to httpd and mod_wsgi-python3 ([email protected])
- rel-eng releasers ([email protected])
* Wed Nov 27 2013 Jakub Dorňák <[email protected]> 0.3-1
- new package built with tito
* Tue Nov 26 2013 Jakub Dorňák <[email protected]> - 0.1-2
- use python3 and django-1.6
- use static pages instead of django-cms
* Thu Nov 21 2013 Jakub Dorňák <[email protected]> - 0.1-1
- Initial commit