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
|
%global copr_common_version 0.16.4.dev
Name: copr-dist-git
Version: 0.66
Release: 1%{?dist}
Summary: Copr services for Dist Git server
License: GPL-2.0-or-later
URL: https://github.com/fedora-copr/copr
# Source is created by:
# git clone %%url && cd copr
# tito build --tgz --tag %%name-%%version-%%release
Source0: %name-%version.tar.gz
BuildArch: noarch
BuildRequires: systemd
BuildRequires: python3-devel
BuildRequires: python3-munch
BuildRequires: python3-requests
BuildRequires: python3-rpkg
BuildRequires: python3-pytest
BuildRequires: python3-copr-common >= %copr_common_version
BuildRequires: python3-oslo-concurrency
BuildRequires: python3-redis
BuildRequires: python3-setproctitle
Recommends: logrotate
Requires: systemd
Requires: httpd
Requires: coreutils
Requires: /usr/bin/crudini
Requires: dist-git
Requires: python3-copr-common >= %copr_common_version
Requires: python3-requests
Requires: python3-rpkg >= 1.63-5
Requires: python3-munch
Requires: python3-oslo-concurrency
Requires: python3-setproctitle
Requires: python3-daemon
Requires: python3-redis
Requires: findutils
Requires: (copr-selinux if selinux-policy-targeted)
Requires: crontabs
Requires: redis
Recommends: python3-copr
%{?fedora:Requires(post): policycoreutils-python-utils}
%{?rhel:Requires(post): policycoreutils-python}
%description
COPR is lightweight build system. It allows you to create new project in WebUI
and submit new builds and COPR will create yum repository from latest builds.
This package contains Copr services for Dist Git server.
%prep
%setup -q
%build
%py3_build
%pre
getent group packager >/dev/null || groupadd -r packager
getent group copr-dist-git >/dev/null || groupadd -r copr-dist-git
getent group apache >/dev/null || groupadd -r apache
getent passwd copr-dist-git >/dev/null || \
useradd -r -m -g copr-dist-git -G packager,apache -c "copr-dist-git user" copr-dist-git
/usr/bin/passwd -l copr-dist-git >/dev/null
%install
%py3_install
install -d %{buildroot}%{_datadir}/copr/dist_git
install -d %{buildroot}%{_sysconfdir}/copr
install -d %{buildroot}%{_sysconfdir}/logrotate.d/
install -d %{buildroot}%{_sysconfdir}/httpd/conf.d/
install -d %{buildroot}%{_unitdir}
install -d %{buildroot}%{_var}/log/copr-dist-git
install -d %{buildroot}%{_tmpfilesdir}
install -d %{buildroot}%{_sharedstatedir}/copr-dist-git
install -d %{buildroot}%{_sysconfdir}/cron.monthly
install -p -m 755 conf/cron.monthly/copr-dist-git %{buildroot}%{_sysconfdir}/cron.monthly/copr-dist-git
cp -a conf/copr-dist-git.conf.example %{buildroot}%{_sysconfdir}/copr/copr-dist-git.conf
cp -a conf/httpd/copr-dist-git.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/copr-dist-git.conf
cp -a conf/tmpfiles.d/* %{buildroot}/%{_tmpfilesdir}
cp -a copr-dist-git.service %{buildroot}%{_unitdir}/
cp -a conf/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/copr-dist-git
mv %{buildroot}%{_bindir}/remove_unused_sources %{buildroot}%{_bindir}/copr-prune-dist-git-sources
# for ghost files
touch %{buildroot}%{_var}/log/copr-dist-git/main.log
%py_byte_compile %{__python3} %{buildroot}%{_datadir}/copr/dist_git
%check
./run_tests.sh -vv --no-cov
%post
%systemd_post copr-dist-git.service
%preun
%systemd_preun copr-dist-git.service
%postun
%systemd_postun_with_restart copr-dist-git.service
%files
%license LICENSE
%python3_sitelib/copr_dist_git
%python3_sitelib/copr_dist_git*egg-info
%{_bindir}/*
%dir %{_datadir}/copr
%{_datadir}/copr/*
%dir %{_sysconfdir}/copr
%config(noreplace) %attr(0640, root, copr-dist-git) %{_sysconfdir}/copr/copr-dist-git.conf
%config(noreplace) %attr(0644, root, root) %{_sysconfdir}/httpd/conf.d/copr-dist-git.conf
%config(noreplace) %attr(0755, root, root) %{_sysconfdir}/cron.monthly/copr-dist-git
%dir %attr(0755, copr-dist-git, copr-dist-git) %{_sharedstatedir}/copr-dist-git/
%{_unitdir}/copr-dist-git.service
%dir %{_sysconfdir}/logrotate.d
%config(noreplace) %{_sysconfdir}/logrotate.d/copr-dist-git
%attr(0755, copr-dist-git, copr-dist-git) %{_var}/log/copr-dist-git
%attr(0644, copr-dist-git, copr-dist-git) %{_var}/log/copr-dist-git/main.log
%ghost %{_var}/log/copr-dist-git/*.log
%{_tmpfilesdir}/copr-dist-git.conf
%changelog
* Tue May 23 2023 Jakub Kadlcik <frostyx@email.cz> 0.66-1
- Skip broken tests caused by new python3-rpkg
* Mon May 22 2023 Jakub Kadlcik <frostyx@email.cz> 0.65-1
- Improve logging feedback for importing package
* Wed Apr 05 2023 Jiri Kyjovsky <j1.kyjovsky@gmail.com> 0.64-1
- Bump version for release mess
* Tue Apr 04 2023 Jiri Kyjovsky <j1.kyjovsky@gmail.com> 0.63-1
- Skip tests that python3-rpkg breaks
* Tue Apr 04 2023 Jiri Kyjovsky <j1.kyjovsky@gmail.com> 0.62-1
- Skip test_no_op_1
* Wed Mar 22 2023 Jiri Kyjovsky <j1.kyjovsky@gmail.com> 0.61-1
- Don't kill background workers for service restarts
- Log from what URL a task is being fetched
* Tue Jan 24 2023 Jakub Kadlcik <frostyx@email.cz> 0.60-1
- Drop an unused cgit_pkg_list_location option
- Use SPDX license
* Wed Nov 30 2022 Pavel Raiskup <praiskup@redhat.com> 0.59-1
- start copr-dist-git.service after redis.service
- background workers mark themselves as done (needed by the manager logic)
* Sat Nov 26 2022 Jakub Kadlcik <frostyx@email.cz> 0.58-1
- require redis.service to be started
- move to GitHub home page
- fair processing of task from multiple sandboxes
- use dispatcher and background workers
* Tue Aug 16 2022 Jiri Kyjovsky <j1.kyjovsky@gmail.com> 0.57-1
- log the URL that got us new tasks
* Tue Jul 26 2022 Jakub Kadlcik <frostyx@email.cz> 0.56-1
- Do not hold the downloaded files in memory
* Tue Jun 21 2022 Jakub Kadlcik <frostyx@email.cz> 0.55-1
- Don't setgid(apache) while importing ("uploading")
- More obvious "locking" importer proctitle
* Mon Apr 04 2022 Pavel Raiskup <praiskup@redhat.com> 0.54-1
- do not remove the PR directories too early
* Tue Mar 08 2022 Jakub Kadlcik <frostyx@email.cz> 0.53-1
- upload sources only if there are some
- update copr-fe-dev hostname
* Wed Feb 02 2022 Silvie Chlupova <schlupov@redhat.com> 0.52-1
- dist-git: python code for removing unused tarballs on dist-git server
* Tue Jun 15 2021 Pavel Raiskup <praiskup@redhat.com> 0.51-1
- add a --foreground option for importer_runner.py
- install debugging helpers for indefinite imports (rhbz#1963954)
* Tue Apr 27 2021 Jakub Kadlcik <frostyx@email.cz> 0.50-1
- dist-git: optimize cgit cache file generator
- dist-git: move everything to Python path
- backend, frontend, keygen, distgit: keep cca 3 months of logs
* Tue Mar 16 2021 Pavel Raiskup <praiskup@redhat.com> 0.49-1
- sleep and continue when frontend is not available
* Mon Nov 09 2020 Jakub Kadlcik <frostyx@email.cz> 0.48-1
- distgit: extend the timeout limit for importing packages
- distgit: allow `import_package` function to run in parallel
- distgit: require up2date python3-rpkg
- distgit: use kojiprofile instead of deprecated kojiconfig
- all: run pytest with -vv in package build
- distgit: each log entry to contain PID
- all: add Makefile symlink to sub-dirs
- pylint: run pylint in all run*tests.sh files
* Wed Dec 04 2019 Pavel Raiskup <praiskup@redhat.com> 0.47-1
- new releases done with tito again
- avoid making more than the predetermined number of workers
- require logrotate service
* Fri Jul 12 2019 Pavel Raiskup <praiskup@redhat.com> 0.46-1
- add offline argument to upload method, to fix RPM import
- add script to clear lookaside cache of old sources
* Wed Apr 24 2019 Jakub Kadlčík <frostyx@email.cz> 0.45-1
- remove old logs from cron
* Thu Jan 10 2019 Miroslav Suchý <msuchy@redhat.com> 0.44-1
- add python3-copr Recommends:
- one-shot script script to remove data for already deleted coprs
- allow blacklisting packages from chroots
* Fri Oct 19 2018 Miroslav Suchý <msuchy@redhat.com> 0.43-1
- fix SELinux
- use FailTypeEnum from copr_common
- use EnumType from copr_common
- use git_dir_archive instead of git_dir_pack
- fix `cgit_pkg_list` script
- use git_dir_archive instead of git_dir_pack
* Mon Aug 06 2018 clime <clime@redhat.com> 0.42-1
- manual byte-code compilation
- for py3 use unittest.mock, otherwise mock from python2-mock
* Fri May 18 2018 clime <clime@redhat.com> 0.41-1
- switch to python3
- rpkg deployment into COPR - containers + releng continuation
* Fri Feb 23 2018 clime <clime@redhat.com> 0.40-1
- remove Group tag
* Mon Feb 19 2018 clime <clime@redhat.com> 0.39-1
- Shebangs cleanup
- fix spec for rhel8
- escapes in changelogs
* Sun Feb 18 2018 clime <clime@redhat.com> 0.38-1
- remove old conditional in spec
- fix python requires, also trim deps down
- add source_status field for Builds
- remove no longer needed CAP_SYS_CHROOT cap
* Thu Sep 07 2017 clime <clime@redhat.com> 0.37-1
- most of the logic moved to copr-rpmbuild
* Fri Aug 25 2017 clime <clime@redhat.com> 0.36-1
- run spec parsing in an isolated manner
- Spelling fixes
* Fri Aug 04 2017 clime <clime@redhat.com> 0.35-1
- fix cvs-data ignore regular expression
* Mon Jul 31 2017 clime <clime@redhat.com> 0.34-1
- remove --global for git config in tests so that it does not
modify ~/.gitconfig
- fix #106 Renaming a spec file in a newer version causes the
build to fail
- make get_package_name more robust
- add DistGitProvider with support for multiple distgits
* Wed Jul 19 2017 clime <clime@redhat.com> 0.33-1
- remove ExclusiveArch directive
- add support for SCM Subdirectory parameter
- remove docker related stuff
- fix variable name
- add missing import in providers.py
- auto-differentiate between downstream and upstream repo in
SCMProvider
- do not include dist information in displayed version
- remove unused exceptions
- get_package_name from spec_path is now a separate method
- do not modify spec for MockScm method
- use python's tarfile instead of tar shell cmd
* Fri Jul 14 2017 clime <clime@redhat.com> 0.32-1
- srpms are now not being built on dist-git
- MockSCM and Tito methods unified into single source
* Fri Jul 07 2017 clime <clime@redhat.com> 0.31-1
- remove no longer required condition for a scm import to run
- .spec build implemented
- fedora:25 image offers the needed en_US.UTF-8 locale now
- Dockerfile with less layers
* Fri Jun 09 2017 clime <clime@redhat.com> 0.30-1
- import build task only once
- remove unsupported --depth from git svn command
- add dep on git-svn
- better exception handling in MockScmProvider
- fix 'git svn clone' and add exception handling for clone part in MockScm provider
* Thu Jun 01 2017 clime <clime@redhat.com> 0.29-1
- Bug 1457888 - Mock SCM method fails to build a package
- increase depth for git clone so that required tags that tito needs are downloaded
* Wed May 31 2017 clime <clime@redhat.com> 0.28-1
- add --depth 1 for git clone in GitProvider
- add missing 'which' for tito && git-annex builds
- arbitrary dist-git branching support
- use MockScmProvider without mock-scm to solve performance problems
- add "powerpc64le" into list of archs to allow building for
* Mon May 15 2017 clime <clime@redhat.com> 0.27-1
- Bug 1447102 - fedpkg build fail during import phase
* Wed Apr 12 2017 clime <clime@redhat.com> 0.26-1
- follow docker ExclusiveArches spec directive
- replace leftover username in lograte config
- fix README
* Mon Apr 10 2017 clime <clime@redhat.com> 0.25-1
- compatibility fixes for the latest dist-git (upstream)
- improved error logging and exception handling of external commands
- improve repo creation & srpm import logging and exception handling
- replace copr-service user by copr-dist-git and useradd the user
- Bug 1426033 - git-annex missing, cannot use tito.builder.GitAnnexBuilder
- replace fedorahosted links
- error logging of pyrpkg upload into lookaside
- update langpack hack in dist-git Dockerfile
* Thu Jan 26 2017 clime <clime@redhat.com> 0.24-1
- install mock-scm in docker image from official fedora repos
- upgrade docker image to f25
- Fixes for building COPR Backend and Dist-git on EL7
- fix copy hack for new internal pyrpkg API
* Thu Dec 01 2016 clime <clime@redhat.com> 0.23-1
- use other than epel chroot for scm building
- use newest mock
- run mock-scm inside of docker
- add README information about how docker image is built
- stripped down impl of building from dist-git
- fixed unittests
- refactor VM.run method
- remove exited containers
- add possibility to run dist-git in single thread
- refactor lookaside my_upload slightly
- Bug 1377780 - Multiple failed tasks with: Importing SRPM into Dist Git failed.
* Mon Sep 19 2016 clime <clime@redhat.com> 0.22-1
- fix Git&Tito subdirectory use-case
* Mon Sep 19 2016 clime <clime@redhat.com> 0.21-1
- Git&Tito, pyp2rpm, gem2rpm now run in docker
* Mon Aug 15 2016 clime <clime@redhat.com> 0.20-1
- try to obtain multiple tasks at once
- Add python2-psutil requirement
- inform frontend about terminated task
- log when starting and finishing workers
- log timeout value from worker
- run mock with --uniqueext
- implement timeout-based terminating
- parallelization by pool of workers
* Fri May 27 2016 clime <clime@redhat.com> 0.19-1
- strip whitespaces from the gem name
* Thu May 26 2016 clime <clime@redhat.com> 0.18-1
- implemented building from rubygems
* Fri Apr 22 2016 Miroslav Suchý <msuchy@redhat.com> 0.17-1
- support for pyrpkg-1.43
- typo in method name
- use os.listdir instead of Popen
- sort imports
- more verbose logging of exception
* Tue Apr 12 2016 Miroslav Suchý <msuchy@redhat.com> 0.16-1
- clean up after dist-git import
- assure python_versions type for pypi builds
- 1322553 - checkout specific branch
* Fri Mar 18 2016 Miroslav Suchý <msuchy@redhat.com> 0.15-1
- own /etc/logrotate.d
- own /usr/share/copr
- trailing dot in description
* Mon Mar 14 2016 Jakub Kadlčík <jkadlcik@redhat.com> 0.14-1
- per task logging for users
- don't assume the SCM repo has the same name as the package
- added policycoreutils-python-utils dependency
- do shallow git clone for mock-scm
- support building from PyPI
* Fri Jan 29 2016 Miroslav Suchý <msuchy@redhat.com> 0.13-1
- [dist-git] error handling based on subprocess return codes instead of output
to stderr (e.g. git outputs progress to stderr) + missing catch for
GitException in do_import (results in better error messages in frontend, see
bz#1295540)
* Mon Jan 25 2016 Miroslav Suchý <msuchy@redhat.com> 0.12-1
- pass --scm-option spec=foo to mock-scm (msuchy@redhat.com)
* Thu Jan 21 2016 clime <clime@redhat.com> 0.11-1
- tito added to requirements
* Sat Jan 16 2016 clime <clime@redhat.com> 0.10-1
- fixed do_import test
- workaround for BZ 1283101
* Mon Nov 16 2015 Miroslav Suchý <msuchy@redhat.com> 0.9-1
- make more abstract exceptions
- implement support for multiple Mock SCMs
- split SourceDownloader to multiple SourceProvider classes
- refactor duplicate code from GIT_AND_TITO and GIT_AND_MOCK
- require mock-scm
- implement mock support in dist-git
- do not check cert when downloading srpm
* Mon Nov 02 2015 Miroslav Suchý <msuchy@redhat.com> 0.8-1
- add Git and Tito errors
- tito support
- hotfix for resubmit button
* Tue Sep 15 2015 Valentin Gologuzov <vgologuz@redhat.com> 0.7-1
- provide build failure details
- replace urllib.urlretrieve with requests.get to catch non-200 HTTP status codes
* Fri Aug 14 2015 Valentin Gologuzov <vgologuz@redhat.com> 0.6-1
- [dist-git][rhbz: #1253335] Running rpkg in the dedicated process.
* Wed Aug 05 2015 Valentin Gologuzov <vgologuz@redhat.com> 0.5-1
- don't run tests during %%check on epel
* Wed Aug 05 2015 Valentin Gologuzov <vgologuz@redhat.com> 0.4-1
- additional BuildRequires to run tests
* Tue Aug 04 2015 Valentin Gologuzov <vgologuz@redhat.com> 0.3-1
- fixed commit message to include package name and version
- added initial tests; renamed folder with sources to use underscore instead of dash
- mark build as failed for any error during import
- don't break on the post failure to frontend
- get pkg name + version during import
- Use /var/lib/copr-dist-git/ to store pkg listing.
- refresh cgit after import
* Thu Jul 23 2015 Valentin Gologuzov <vgologuz@redhat.com> 0.2-1
- new package built with tito
* Thu Jun 25 2015 Adam Samalik <asamalik@redhat.com> 0.1
- basic package
|