-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathkoji.spec
2463 lines (2320 loc) · 103 KB
/
koji.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
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%bcond_without python3
%bcond_without python2
%global _python_bytecompile_extra 0
# We can build varying amounts of Koji for python2 and python3 based on
# the py[23]_support macro values. Valid values are:
# undefined or 0 -- do not build
# 1 -- build just the cli and lib
# 2 -- build everything we can
# For executable scripts, py3 wins if we build it
# The following rules tweak these settings based on options and environment
# Default to building both fully
%define py2_support 2
%define py3_support 2
%define wheel_support 1
%if 0%{?rhel} >= 8
# and no python2 on rhel8+
%define py2_support 0
%define wheel_support 1
%else
%if 0%{?rhel} >= 7
# No python3 for older rhel
%define py3_support 0
%define wheel_support 0
%else
# don't build anything for rhel6
%define py2_support 0
%define py3_support 0
%define wheel_support 0
%endif
%endif
%if 0%{?fedora} >= 33
# no py2 after F33
%define py2_support 0
%define py3_support 2
%define wheel_support 1
%else
%if 0%{?fedora} >= 30
%define py2_support 1
%define py3_support 2
%else
%if 0%{?fedora}
# match what the older Fedoras already have
%define py2_support 2
%define py3_support 1
%endif
%endif
%endif
# Lastly enforce the bcond parameters
%if %{without python2}
%define py2_support 0
%endif
%if %{without python3}
%define py3_support 0
%endif
%if ! %{py2_support}
# use python3
%define __python %{__python3}
%endif
# Compatibility with RHEL. These macros have been added to EPEL but
# not yet to RHEL proper.
# https://bugzilla.redhat.com/show_bug.cgi?id=1307190
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%{!?py2_build: %global py2_build %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} build --executable="%{__python2} -s"}}
%{!?py2_install: %global py2_install %{expand: CFLAGS="%{optflags}" %{__python2} setup.py %{?py_setup_args} install -O1 --skip-build --root %{buildroot}}}
# If the definition isn't available for python3_pkgversion, define it
%{?!python3_pkgversion:%global python3_pkgversion 3}
%define baserelease 1
#build with --define 'testbuild 1' to have a timestamp appended to release
%if "x%{?testbuild}" == "x1"
%define release %{baserelease}.%(date +%%Y%%m%%d.%%H%%M.%%S)
%else
%define release %{baserelease}
%endif
Name: koji
Version: 1.34.1
Release: %{release}%{?dist}
License: LGPL-2.1-only and GPL-2.0-or-later
# the included arch lib from yum's rpmUtils is GPLv2+
# rpmdiff lib (from rpmlint) is GPLv2+
Summary: Build system tools
Group: Applications/System
URL: https://pagure.io/koji
Source: https://releases.pagure.org/koji/koji-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
%if 0%{py3_support}
Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release}
Requires: python%{python3_pkgversion}-libcomps
%else
Requires: python2-%{name} = %{version}-%{release}
%if 0%{?fedora} || 0%{?rhel} >= 7
Requires: python-libcomps
%endif
%endif
BuildRequires: systemd
BuildRequires: pkgconfig
BuildRequires: make
BuildRequires: sed
%description
Koji is a system for building and tracking RPMS. The base package
contains shared libraries and the command-line interface.
%if 0%{py2_support}
%package -n python2-%{name}
Summary: Build system tools python library
%{?python_provide:%python_provide python2-%{name}}
%if 0%{?fedora} >= 30
BuildRequires: python2-devel
%else
BuildRequires: python-devel
%endif
%if 0%{wheel_support}
BuildRequires: python2-pip
BuildRequires: python2-wheel
%endif
%if 0%{?fedora} || 0%{?rhel} >= 8
Requires: python2-rpm
%else
Requires: rpm-python
%endif
Requires: python-requests
Requires: python-requests-gssapi
Requires: python-dateutil
Requires: python-six
Requires: python-defusedxml
%description -n python2-%{name}
desc
%endif
%if 0%{py3_support}
%package -n python%{python3_pkgversion}-%{name}
Summary: Build system tools python library
%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}}
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python3-pip
BuildRequires: python3-wheel
BuildRequires: python3-setuptools
BuildRequires: python3-six
%if 0%{?fedora} || 0%{?rhel} >= 8
Requires: python%{python3_pkgversion}-rpm
%else
Requires: rpm-python%{python3_pkgversion}
%endif
Requires: python%{python3_pkgversion}-requests
%if 0%{?fedora} >= 32 || 0%{?rhel} >= 8
Requires: python%{python3_pkgversion}-requests-gssapi > 1.2.1
%else
Requires: python%{python3_pkgversion}-requests-kerberos
%endif
Requires: python%{python3_pkgversion}-dateutil
Requires: python%{python3_pkgversion}-six
Requires: python%{python3_pkgversion}-defusedxml
# Since we don't have metadata here, provide the 'normal' python provides manually.
Provides: python%{python3_version}dist(%{name}) = %{version}
Provides: python%{python3_pkgversion}dist(%{name}) = %{version}
%description -n python%{python3_pkgversion}-%{name}
desc
%endif
%if 0%{py2_support}
%package -n python2-%{name}-cli-plugins
Summary: Koji client plugins
Group: Applications/Internet
License: LGPL-2.1-only
Requires: python2-%{name} = %{version}-%{release}
Obsoletes: python2-%{name}-sidetag-plugin-cli < %{version}-%{release}
Provides: python2-%{name}-sidetag-plugin-cli = %{version}-%{release}
%description -n python2-%{name}-cli-plugins
Plugins to the koji command-line interface
%endif
%if 0%{py3_support}
%package -n python%{python3_pkgversion}-%{name}-cli-plugins
Summary: Koji client plugins
Group: Applications/Internet
License: LGPL-2.1-only
Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release}
Obsoletes: python%{python3_pkgversion}-%{name}-sidetag-plugin-cli < %{version}-%{release}
Provides: python%{python3_pkgversion}-%{name}-sidetag-plugin-cli = %{version}-%{release}
%description -n python%{python3_pkgversion}-%{name}-cli-plugins
Plugins to the koji command-line interface
%endif
%if 0%{py3_support} > 1
%package hub
Summary: Koji XMLRPC interface
Group: Applications/Internet
License: LGPL-2.1-only
Requires: %{name} = %{version}-%{release}
Requires: %{name}-hub-code
%if 0%{?fedora} || 0%{?rhel} > 7
Suggests: python%{python3_pkgversion}-%{name}-hub
Suggests: python%{python3_pkgversion}-%{name}-hub-plugins
%endif
%description hub
koji-hub is the XMLRPC interface to the koji database
%package -n python%{python3_pkgversion}-%{name}-hub
Summary: Koji XMLRPC interface
Group: Applications/Internet
License: LGPL-2.1-only
Requires: httpd
Requires: python%{python3_pkgversion}-mod_wsgi
%if 0%{?fedora} || 0%{?rhel} >= 7
Requires: mod_auth_gssapi
%endif
Requires: python%{python3_pkgversion}-psycopg2
Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release}
# py2 xor py3
Provides: %{name}-hub-code = %{version}-%{release}
%description -n python%{python3_pkgversion}-%{name}-hub
koji-hub is the XMLRPC interface to the koji database
%package hub-plugins
Summary: Koji hub plugins
Group: Applications/Internet
License: LGPL-2.1-only
Requires: %{name}-hub-plugins-code = %{version}-%{release}
%if 0%{?fedora} || 0%{?rhel} > 7
Suggests: python%{python3_pkgversion}-%{name}-hub-plugins
%endif
%description hub-plugins
Plugins to the koji XMLRPC interface
%package -n python%{python3_pkgversion}-%{name}-hub-plugins
Summary: Koji hub plugins
Group: Applications/Internet
License: LGPL-2.1-only
Requires: python%{python3_pkgversion}-%{name}-hub = %{version}-%{release}
Requires: python%{python3_pkgversion}-qpid-proton
Requires: cpio
Provides: %{name}-hub-plugins-code = %{version}-%{release}
Obsoletes: python%{python3_pkgversion}-%{name}-sidetag-plugin-hub < %{version}-%{release}
Provides: python%{python3_pkgversion}-%{name}-sidetag-plugin-hub = %{version}-%{release}
%description -n python%{python3_pkgversion}-%{name}-hub-plugins
Plugins to the koji XMLRPC interface
%endif
%package builder-plugins
Summary: Koji builder plugins
Group: Applications/Internet
License: LGPL-2.1-only
Requires: %{name} = %{version}-%{release}
Requires: %{name}-builder = %{version}-%{release}
%description builder-plugins
Plugins for the koji build daemon
%package builder
Summary: Koji RPM builder daemon
Group: Applications/System
%if 0%{py2_support}
License: LGPL-2.1-only and GPL-2.0-or-later
#mergerepos (from createrepo) is GPLv2+
%else
License: LGPL-2.1-only
%endif
Requires: mock >= 0.9.14
Requires(pre): /usr/sbin/useradd
Requires: squashfs-tools
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires: /usr/bin/cvs
Requires: /usr/bin/svn
Requires: /usr/bin/git
Requires: createrepo_c >= 0.11.0
%if 0%{py3_support} > 1
Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release}
Requires: python%{python3_pkgversion}-librepo
Requires: python%{python3_pkgversion}-multilib
Requires: python%{python3_pkgversion}-cheetah
%else
Requires: python2-%{name} = %{version}-%{release}
Requires: python2-multilib
Requires: python-cheetah
%endif
%description builder
koji-builder is the daemon that runs on build machines and executes
tasks that come through the Koji system.
%package vm
Summary: Koji virtual machine management daemon
Group: Applications/System
License: LGPL-2.1-only
Requires: %{name} = %{version}-%{release}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%if 0%{py3_support} > 1
Requires: python%{python3_pkgversion}-libvirt
Requires: python%{python3_pkgversion}-libxml2
%else
Requires: libvirt-python
Requires: libxml2-python
%endif
Requires: /usr/bin/virt-clone
Requires: qemu-img
%description vm
koji-vm contains a supplemental build daemon that executes certain tasks in a
virtual machine. This package is not required for most installations.
%if 0%{py3_support} > 1
%package utils
Summary: Koji Utilities
Group: Applications/Internet
License: LGPL-2.1-only
Requires: %{name} = %{version}-%{release}
Requires: python%{python3_pkgversion}-psycopg2
Obsoletes: python%{python3_pkgversion}-koji-sidetag-plugin-tools < %{version}-%{release}
Provides: python%{python3_pkgversion}-koji-sidetag-plugin-tools = %{version}-%{release}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%description utils
Utilities for the Koji system
%package web
Summary: Koji Web UI
Group: Applications/Internet
License: LGPL-2.1-only
Requires: %{name} = %{version}-%{release}
Requires: %{name}-web-code = %{version}-%{release}
%if 0%{?fedora} || 0%{?rhel} > 7
Suggests: python%{python3_pkgversion}-%{name}-web
%endif
%description web
koji-web is a web UI to the Koji system.
%package -n python%{python3_pkgversion}-%{name}-web
Summary: Koji Web UI
Group: Applications/Internet
License: LGPL-2.1-only
%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}-web}
Requires: httpd
Requires: python%{python3_pkgversion}-mod_wsgi
Requires: mod_auth_gssapi
Requires: python%{python3_pkgversion}-psycopg2
Requires: python%{python3_pkgversion}-cheetah
Requires: python%{python3_pkgversion}-%{name} = %{version}-%{release}
Provides: %{name}-web-code = %{version}-%{release}
%description -n python%{python3_pkgversion}-%{name}-web
koji-web is a web UI to the Koji system.
%endif
%prep
%autosetup -p1
# we'll be packaging these separately and don't want them registered
# to the wheel we will produce.
sed -e '/util\/koji/g' -e '/koji_cli_plugins/g' -i setup.py
%build
%if 0%{wheel_support}
%if 0%{py2_support}
%py2_build_wheel
%endif
%if 0%{py3_support}
%py3_build_wheel
%endif
%endif
%install
rm -rf $RPM_BUILD_ROOT
%if 0%{py2_support} < 2 && 0%{py3_support} < 2
echo "At least one python must be built with full support"
exit 1
%endif
# python2 build
%if 0%{wheel_support}
%if 0%{py2_support}
%py2_install_wheel %{name}-%{version}-py2-none-any.whl
mkdir -p %{buildroot}/etc/koji.conf.d
cp cli/koji.conf %{buildroot}/etc/koji.conf
%endif
%if 0%{py2_support} == 1
pushd plugins
make DESTDIR=$RPM_BUILD_ROOT KOJI_MINIMAL=1 PYTHON=%{__python2} install
popd
%endif
%if 0%{py2_support} > 1
for D in builder plugins vm ; do
pushd $D
make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python2} install
popd
done
%endif
%else
%if 0%{py2_support}
make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python2} install
%endif
%endif
# python3 build
%if 0%{py3_support}
%py3_install_wheel %{name}-%{version}-py3-none-any.whl
mkdir -p %{buildroot}/etc/koji.conf.d
cp cli/koji.conf %{buildroot}/etc/koji.conf
%endif
%if 0%{py3_support} == 1
pushd plugins
make DESTDIR=$RPM_BUILD_ROOT KOJI_MINIMAL=1 PYTHON=%{__python3} install
popd
%endif
%if 0%{py3_support} > 1
for D in kojihub builder plugins util www vm schemas ; do
pushd $D
make DESTDIR=$RPM_BUILD_ROOT PYTHON=%{__python3} install
popd
done
# alter python interpreter in koji CLI
scripts='%{_bindir}/koji %{_sbindir}/kojid %{_sbindir}/kojira %{_sbindir}/koji-shadow
%{_sbindir}/koji-gc %{_sbindir}/kojivmd %{_sbindir}/koji-sweep-db
%{_sbindir}/koji-sidetag-cleanup'
for fn in $scripts ; do
sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' $RPM_BUILD_ROOT$fn
done
%endif
%if 0%{?fedora}
# handle extra byte compilation
extra_dirs='
%{_prefix}/lib/koji-builder-plugins
%{_prefix}/lib/koji-hub-plugins
%{_datadir}/koji-hub
%{_datadir}/koji-web/lib/kojiweb
%{_datadir}/koji-web/scripts'
%if 0%{py2_support} > 1
for fn in $extra_dirs ; do
%py_byte_compile %{__python2} %{buildroot}$fn
done
%endif
%if 0%{py3_support} > 1
for fn in $extra_dirs ; do
%py_byte_compile %{__python3} %{buildroot}$fn
done
%endif
%endif
# in case, we're building only py2, delete all py3 content
%if 0%{py3_support} < 1 && 0%{py2_support} > 0
rm -rf %{buildroot}%{_datadir}/koji-web
rm -rf %{buildroot}%{_datadir}/koji-hub
rm -rf %{buildroot}%{_prefix}/lib/koji-hub-plugins
rm -f %{buildroot}/etc/httpd/conf.d/kojihub.conf
rm -f %{buildroot}/etc/httpd/conf.d/kojiweb.conf
rm -f %{buildroot}/etc/koji-hub/hub.conf
rm -f %{buildroot}/etc/koji-hub/plugins/protonmsg.conf
rm -f %{buildroot}/etc/koji-hub/plugins/rpm2maven.conf
rm -f %{buildroot}/etc/koji-hub/plugins/save_failed_tree.conf
rm -f %{buildroot}/etc/koji-hub/plugins/sidetag.conf
rm -f %{buildroot}/etc/kojiweb/web.conf
rm -f %{buildroot}%{_prefix}/lib/systemd/system/koji-sweep-db.service
rm -f %{buildroot}%{_prefix}/lib/systemd/system/koji-sweep-db.timer
rm -f %{buildroot}%{_prefix}/sbin/koji-sweep-db
rm -f %{buildroot}/etc/koji-gc/email.tpl
rm -f %{buildroot}/etc/koji-gc/koji-gc.conf
rm -f %{buildroot}/etc/koji-shadow/koji-shadow.conf
rm -f %{buildroot}/etc/kojira/kojira.conf
rm -f %{buildroot}%{_prefix}/lib/systemd/system/koji-gc.service
rm -f %{buildroot}%{_prefix}/lib/systemd/system/koji-gc.timer
rm -f %{buildroot}%{_prefix}/lib/systemd/system/kojira.service
rm -f %{buildroot}%{_prefix}/sbin/koji-gc
rm -f %{buildroot}%{_prefix}/sbin/koji-shadow
rm -f %{buildroot}%{_prefix}/sbin/koji-sidetag-cleanup
rm -f %{buildroot}%{_prefix}/sbin/kojira
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%config(noreplace) /etc/koji.conf
%dir /etc/koji.conf.d
%doc docs Authors COPYING LGPL
%if 0%{py2_support}
%{_bindir}/*
%files -n python2-%{name}
%{python2_sitelib}/%{name}
%if 0%{wheel_support}
%{python2_sitelib}/%{name}-%{version}.*-info
%endif
%{python2_sitelib}/koji_cli
%endif
%if 0%{py3_support}
%{_bindir}/*
%files -n python%{python3_pkgversion}-koji
%{python3_sitelib}/%{name}
%{python3_sitelib}/%{name}-%{version}.*-info
%{python3_sitelib}/koji_cli
%{_datadir}/koji/*.sql
%endif
%if 0%{py2_support}
%files -n python2-%{name}-cli-plugins
%{python2_sitelib}/koji_cli_plugins
# we don't have config files for default plugins yet
#%%dir %%{_sysconfdir}/koji/plugins
#%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf
%endif
%if 0%{py3_support}
%files -n python%{python3_pkgversion}-%{name}-cli-plugins
%{python3_sitelib}/koji_cli_plugins
# we don't have config files for default plugins yet
#%%dir %%{_sysconfdir}/koji/plugins
#%%config(noreplace) %%{_sysconfdir}/koji/plugins/*.conf
%endif
%if 0%{py3_support} > 1
%files hub
%config(noreplace) %attr(0640, root, apache) /etc/httpd/conf.d/kojihub.conf
%dir /etc/koji-hub
%config(noreplace) %attr(0640, root, apache) /etc/koji-hub/hub.conf
%dir /etc/koji-hub/hub.conf.d
%{_sbindir}/koji-sweep-db
%{_unitdir}/koji-sweep-db.service
%{_unitdir}/koji-sweep-db.timer
%files -n python%{python3_pkgversion}-%{name}-hub
%{_datadir}/koji-hub/*.py
%{_datadir}/koji-hub/__pycache__
%{python3_sitelib}/kojihub
%files hub-plugins
%dir /etc/koji-hub/plugins
%config(noreplace) /etc/koji-hub/plugins/*.conf
%files -n python%{python3_pkgversion}-%{name}-hub-plugins
%{_prefix}/lib/koji-hub-plugins/*.py
%{_prefix}/lib/koji-hub-plugins/__pycache__
%endif
%files builder-plugins
%dir /etc/kojid/plugins
%config(noreplace) /etc/kojid/plugins/*.conf
%dir %{_prefix}/lib/koji-builder-plugins
%{_prefix}/lib/koji-builder-plugins/*.py*
%if 0%{py3_support} > 1
%{_prefix}/lib/koji-builder-plugins/__pycache__
%endif
%if 0%{py3_support} > 1
%files utils
%{_sbindir}/kojira
%{_unitdir}/koji-gc.service
%{_unitdir}/koji-gc.timer
%{_unitdir}/kojira.service
%dir /etc/kojira
%config(noreplace) /etc/kojira/kojira.conf
%{_sbindir}/koji-gc
%dir /etc/koji-gc
%config(noreplace) /etc/koji-gc/koji-gc.conf
%config(noreplace) /etc/koji-gc/email.tpl
%{_sbindir}/koji-shadow
%dir /etc/koji-shadow
%config(noreplace) /etc/koji-shadow/koji-shadow.conf
%{_sbindir}/koji-sidetag-cleanup
%endif
%if 0%{py3_support} > 1
%files web
%dir /etc/kojiweb
%config(noreplace) /etc/kojiweb/web.conf
%config(noreplace) /etc/httpd/conf.d/kojiweb.conf
%dir /etc/kojiweb/web.conf.d
%files -n python%{python3_pkgversion}-%{name}-web
%{_datadir}/koji-web
%endif
%files builder
%{_sbindir}/kojid
%if 0%{py2_support} > 1
%dir %{_libexecdir}/kojid
%{_libexecdir}/kojid/mergerepos
%endif
%{_unitdir}/kojid.service
%dir /etc/kojid
%config(noreplace) /etc/kojid/kojid.conf
%attr(-,kojibuilder,kojibuilder) /etc/mock/koji
%pre builder
/usr/sbin/useradd -r -s /usr/sbin/nologin -G mock -d /builddir -M kojibuilder 2>/dev/null ||:
%post builder
%systemd_post kojid.service
%preun builder
%systemd_preun kojid.service
%postun builder
%systemd_postun kojid.service
%files vm
%{_sbindir}/kojivmd
#dir %%{_datadir}/kojivmd
%{_datadir}/kojivmd/kojikamid
%{_unitdir}/kojivmd.service
%dir /etc/kojivmd
%config(noreplace) /etc/kojivmd/kojivmd.conf
%post vm
%systemd_post kojivmd.service
%preun vm
%systemd_preun kojivmd.service
%postun vm
%systemd_postun kojivmd.service
%if 0%{py3_support} > 1
%post utils
%systemd_post kojira.service
%preun utils
%systemd_preun kojira.service
%postun utils
%systemd_postun kojira.service
%endif
%changelog
* Mon May 6 2024 Tomas Kopecek <tkopecek at redhat.com> - 1.34.1-1
- PR#3931: web: add some handy links for module builds
- PR#3942: policy_data_from_task_args: set target to None when it doesn't exist
- PR#3975: Bandit [B411]: use defusedxml to prevent remote XML attacks
- PR#3989: Oz: don't hardcode the image size unit as 'G'
- PR#3992: Remove rpm-py-installer, update test docs and update Dockerfiles
- PR#3996: Document draft builds
- PR#3998: typo in set_refusal
- PR#3999: Have builders refuse repo tasks if they can't access /mnt/koji
- PR#4005: Fix bandit "nosec" comments
- PR#4012: rmtree: use fork
- PR#4015: provide draft flag to build policy
- PR#4018: Fix scheduler log ordering
- PR#4032: implicit task refusals
- PR#4037: Fix temporary cg_import.log file path
- PR#4041: Use host maxtasks if available
- PR#4043: --limit from scheduler-logs/info
- PR#4052: fix formatting of rpm in title
- PR#4056: avoid explicit rowlock in taskWaitCheck
- PR#4069: add requirement: defusedxml in setup.py
- PR#4088: tests: py3 versions compatibility fixes
* Wed Jan 10 2024 Tomas Kopecek <tkopecek at redhat.com> - 1.34.0-1
- PR#3537: Switch to WatchedFileHandler for logger
- PR#3726: fix docstring getTaskInfo
- PR#3761: doc: More XMLRPC-related docs
- PR#3772: Scheduler part 1
- PR#3794: Unify getSessionInfo output
- PR#3813: list-history: fix [still active] display for edit entries
- PR#3817: Remove get_sequence_value in 1.34
- PR#3818: Remove koji.AUTHTYPE_* in 1.34
- PR#3828: better handling of deleted tags in kojiweb
- PR#3830: kojira no_repo_effective_age setting
- PR#3832: fix release notes version
- PR#3835: explain _ord() method
- PR#3838: distrepo will not skip rpm stat by default
- PR#3841: create initial repo for sidetag
- PR#3842: Don't spawn createrepo if not needed
- PR#3843: Package migration scripts to koji-hub
- PR#3850: Inherit group permissions
- PR#3851: sidetag: extend is_sidetag_owner for untag ops
- PR#3855: Extend getUser to get user groups
- PR#3859: Fix user_in_group policy test
- PR#3861: tox: Don't install coverage every run
- PR#3865: fix tests/flake8
- PR#3873: disable use_bootstrap_image if bot requested
- PR#3876: fix param in createImageBuild docstring
- PR#3879: Example of how to enable a module via mock.module_setup_commands
- PR#3882: Sort image rpm components before inserting
- PR#3884: short option for watch-logs --follow
- PR#3886: Raise an error on missing build directory
- PR#3888: kojid: Fix mock_bootstrap_image parameter name in the default config
- PR#3889: cli: handle hub w/o getKojiVersion in cancel tasks
- PR#3893: Clean rpm db directory of broken symlinks
- PR#3894: Sort channels on hosts page
- PR#3895: hub: new_build: build in error should be the old one
- PR#3897: Retrieve task_id for older OSBS builds
- PR#3898: Update Containerfiles
- PR#3902: queryOpts for queryHistory
- PR#3904: Update docstring for listPackages
- PR#3905: More general CG import logging
- PR#3911: Display two decimal points for the task load in hosts page
- PR#3913: draft builds
- PR#3915: cli: fix wait-repo message when missing builds
- PR#3917: fix tests
- PR#3920: Move migration script to new location
- PR#3924: fix return type
- PR#3927: more getSessionInfo updates
- PR#3929: Read config file on image build indirection
- PR#3935: fix task_id extraction for missing extra
- PR#3938: Update the CERN koji description
- PR#3940: Remove six.configparser.SafeConfingParser from tests
- PR#3946: fix flake8 errors
- PR#3948: fix arg passing in exclusiveSession
- PR#3949: docstring typo
- PR#3957: Fix test
- PR#3960: cli: [list-permissions] backward compatibility for getUserPermsInheritance call
- PR#3965: Fix unittests for python-mock-5.x
- PR#3977: handle new task refs in clean_scratch_tasks
- PR#3980: task assign overrides
- PR#3983: test_cg_importer.py: avoid creating temp files in checkout
* Tue Jul 11 2023 Tomas Kopecek <tkopecek at redhat.com> - 1.33.1-1
- PR#3834: wait with writing timestamps after results dir is created
- PR#3836: add support for sw_64 and loongarch64
- PR#3839: basic vim syntax highlighting for hub policy
- PR#3840: doc: readTaggedRPMS/Builds API documentation
- PR#3846: cli: streamline python/json options in call command
- PR#3857: Fix duplicate build link on CG taskinfo page
- PR#3864: drop stray typing hint
* Tue May 16 2023 Tomas Kopecek <tkopecek at redhat.com> - 1.33.0-1
- PR#3775: Import koji archive types
- PR#3816: kiwi: remove tech-preview warning
- PR#3800: avoid noisy chained tracebacks when converting Faults
- PR#3782: Fix typo
- PR#3803: createTag raises error when perm ID isn't exists
- PR#3799: Increase sidetag CLI tests
- PR#3804: use fakehub as a user
- PR#3769: Add component/built archives in list-buildroot
- PR#3760: Add renewal session timeout
- PR#3798: kojira: prioritize awaited repos
- PR#3777: CG: allow reimports into failed/cancelled builds
- PR#3791: Increase hub unit tests
- PR#3788: fix syntax for tox 4.4.8
- PR#3741: vm: ignore B113: request_without_timeout
- PR#3784: remove Host.getTask method
- PR#3783: fakehub --pdb option
- PR#3780: tagNotification: user_id is int when get_user is used
- PR#3781: Set COLUMNS for tests to handle different terminals
- PR#3778: docs: Emphasize new build_from_scm hub policy
- PR#3773: Fix prune-signed-copies unit tests
- PR#3751: Save task_id correctly also in CGInitBuild
- PR#3763: Update deprecated policy comments
- PR#3771: prune-signed-copies unit tests
- PR#3754: Unify behavior when result is empty in get_maven/image/win/build
- PR#3746: Fix backward compatibility
- PR#3707: Add repoID in listBuildroots and create repoinfo command
- PR#3752: Increase hub unit tests 03-02
- PR#3747: Fix editSidetag fstring variable formats and fix test unit tests
- PR#3722: Increate sidetag hub unit tests
- PR#3745: Fix pkglist_add when extra_arches is None
- PR#3703: RawHeader improvements
- PR#3738: Increase CLI uni tests
- PR#3720: list-tagged: only check for build dir when --sigs is given
- PR#3727: Fix mtime logic for py2.x
- PR#3690: only pad header lengths for signature headers
- PR#3679: vm: Retry libvirt connection
- PR#3687: koji-gc: fail on additional arguments
- PR#3674: sidetag: allowed list for rpm macros
- PR#3712: download-build: preserve build artefacts last modification time
- PR#3716: CLI: cancel error msg
- PR#3699: Set daemon = true instead of call deaprecated setDaemon
- PR#3686: Let "--principal=" works for users using multiple TGT's
- PR#3678: Move db/auth to kojihub module
- PR#3701: Editing extra in sidetags
- PR#3695: remove debug print
- PR#3691: fix doc links
* Fri Feb 3 2023 Tomas Kopecek <tkopecek at redhat.com> - 1.32.0-1
- PR#3530: use_fast_upload=True as default everywhere
- PR#3562: rpmdiff: replace deprecated rpm call
- PR#3584: kojikamid: remove clamav scanner
- PR#3588: Move hub code to site-packages
- PR#3589: Replace _multiRow, _singleRow, _singleValue with QP
- PR#3599: Remove krbLogin API
- PR#3608: koji-gc: use history to query trashcan contents
- PR#3614: fix default archivetypes extensions
- PR#3618: handle migrated rpmdb path
- PR#3624: unify migration scripts
- PR#3632: Next rewrite Select/Update queries
- PR#3636: Deprecated get_sequence_value
- PR#3647: hub: remove print statement
- PR#3649: Remove DisableGSSAPIProxyDNFallback option on Hub
- PR#3654: replace deprecated distutils
- PR#3657: Fix callnum handling
- PR#3659: rawdata not needed for callnum update
- PR#3660: Add custom_user_metadata to build info for wrapperRPM build type
- PR#3661: Fix auth unit tests
- PR#3663: cli: improve help for call --python option
- PR#3664: Recreate timeouted session
- PR#3668: Reset build processor values with specific value only
- PR#3672: CLI download-tasks has sorted tasks in check closed/not closed tasks
* Mon Jan 9 2023 Tomas Kopecek <tkopecek at redhat.com> - 1.31.1-1
- PR#3644: www: fix target link in taskinfo page
- PR#3650: Add test cases for help
- PR#3639: doc: better wording in listTagged
- PR#3598: kiwi: upload log for failed tasks
- PR#3641: Fix typo in CLI add-tag-inheritance error msg
- PR#3630: Use old-style checkout for shortened refs
- PR#3620: fix typo preventing building docker images
- PR#3607: Change canceled icon color from red to orange
- PR#3611: Replace deprecated inspect methods
- PR#3601: Create DeleteProcessor class and use it
- PR#3604: Support deleted build tag in taskinfo.
- PR#3615: fix different PG capabilities in schema
* Mon Nov 7 2022 Tomas Kopecek <tkopecek at redhat.com> - 1.31.0-1
- PR#3407: build policy
- PR#3417: save source for wrapperRPM
- PR#3426: header-based sessions
- PR#3446: Add active sessions web page
- PR#3453: Index for rpm search
- PR#3455: www: more generic taskinfo parameter handling
- PR#3474: Move database classes and functions from kojihub.py to koji/db.py
- PR#3476: Remove login shell from kojibuilder user
- PR#3481: Fix URLs to pull requests
- PR#3488: CLI download-task more specific info for not CLOSED tasks.
- PR#3489: Rewrite DB query to Procesors
- PR#3490: Emphasize non-working image XML
- PR#3503: kojivmd: import xmlrpc.server
- PR#3504: kojivmd: narrow error handling for missing VMs
- PR#3505: kojivmd: pass "-F qcow2" to qemu-img create
- PR#3506: doc: explain waitrepo tasks in vm channel
- PR#3507: kojivmd: cleanup VMs with UNDEFINE_NVRAM
- PR#3509: Enable fetching any ref from git repo
- PR#3513: Return data when query execute asList with transform
- PR#3516: Add number and size for download-build
- PR#3521: spec: change license identifiers
- PR#3528: Increase CLI unit tests
- PR#3531: Error on list-tagged --sigs --paths without mount
- PR#3533: CLI list-hosts fix when list of channels is empty
- PR#3535: CLI edit-channel set default value for None and error msg to stderr.
- PR#3538: vm: handle waitrepo tasks in kojivmd
- PR#3540: kojid: use session correctly
- PR#3541: kojid: fix restartHosts on py 3.5+
- PR#3542: cli: fix nvr sorting in list-builds
- PR#3544: doc: use bullets for winbuild "buildrequires" syntax
- PR#3546: Increase list-tag-inheritance unit tests
- PR#3548: Increase unit tests
- PR#3550: Allow buildTagID and destTagID as string and dict in getBuildTargets
- PR#3552: Add regex --filter and --skip option for download-task
- PR#3555: fix include path
- PR#3557: Log when session ID, session key and hostip is not related
- PR#3558: kiwi: propagate --type option
- PR#3560: Rename global session in kojid
- PR#3563: Rewrite Query DB to Processors in auth.py
- PR#3565: kojira: fix docs
- PR#3566: Fix koji-sweep-db
- PR#3569: Add absolute to clean sessions in koji-sweep-db
- PR#3573: koji-gc: fix check for type cc_addr, bcc_addr
- PR#3576: kojivmd: improve topurl example and error handling
- PR#3585: kiwi: Make /dev mounting by magic
- PR#3592: Use inspect.getfullargspec instead of getargspec on hub and web
* Mon Oct 3 2022 Tomas Kopecek <tkopecek at redhat.com> - 1.30.1-1
- PR#3464: cli: allow redirects for file size checking
- PR#3469: Fix dist-repo repo.json url
- PR#3479: fix flake8 errors
- PR#3484: Use nextval function instead of query 'SELECT nextval'
- PR#3486: packaging: Block py3 compilation in py2 env
- PR#3492: Fix arch filter in list of hosts webUI
- PR#3496: kiwi: handle include protocols
- PR#3498: kiwi: Explicitly use koji-generated description
- PR#3502: Download all files, skip downloaded files
- PR#3518: doc: fix missing characters
* Thu Aug 18 2022 Tomas Kopecek <tkopecek at redhat.com> - 1.30.0-1
- PR#3308: server-side clonetag
- PR#3352: CLI: Remove --paths option from list-buildroot
- PR#3354: remove force option from groupPackageListRemove hub call
- PR#3357: Remove deprecated remove-channel/removeChannel
- PR#3359: Drop old indices
- PR#3360: proton: save messages when connection fails
- PR#3363: CLI: list-channels with specific arch
- PR#3364: Catch koji.AuthError and bail out
- PR#3380: Increase hub unit tests
- PR#3382: www: archivelist and rpmlist raise error when imageID is unknown
- PR#3383: Increase www unit tests
- PR#3385: koji download-task retry download file
- PR#3390: www: Set SameSite and Set-Cookie2
- PR#3391: Use compression_type in listArchiveFiles
- PR#3401: CLI: download-task prints "No files for download found." to stdout
- PR#3402: Correct getAverageDuration values for most GC builds
- PR#3403: Consistence pre/postPackageListChange sequence
- PR#3404: don't propagate SIGHUP ignore to child processes
- PR#3405: beautify logged commands issued by koji
- PR#3406: Add a utility function to watch builds
- PR#3422: hub: check release/version format in cg_import
- PR#3423: Fix rpm_hdr_size file closing
- PR#3425: Fix download-task all files in build/buildArch method tasks
- PR#3428: Fix arches check in kiwi plugin
- PR#3430: Fix download-task with wait option
- PR#3437: Authtype as enum and getSessionInfo prints authtype name
- PR#3438: CLI: More details when files conflict in download-task
- PR#3440: Parse_arches allows string and list of arches
- PR#3444: expect dict for chainmaven builds
- PR#3445: Don't crash in _checkImageState if there's no image.os_plugin
- PR#3450: convert data to string in escapeHTML first
- PR#3457: Fix query with LIKE string in getAverageBuildDirection
* Mon Jun 27 2022 Tomas Kopecek <tkopecek at redhat.com> - 1.29.1-1
- PR#3343 Download output for all type of task in download-task
- PR#3388 postgresql hub: date_part instead of EXTRACT
- PR#3368 Order channels at hosts page
- PR#3374 Add long description to setup.py
- PR#3411 doc: mention CGRefundBuild in CG docs
- PR#3415 Rename log to cg_import.log and add successful import log message.
- PR#3398 more verbose default policy denials
- PR#3413 Fix wrong encoding in changelog entries
* Thu May 12 2022 Tomas Kopecek <tkopecek at redhat.com> - 1.29.0-1
- PR#3349: Py3 re pattern fix
- PR#3338: Add header separaton to list-hosts and list-channels
- PR#3336: Fix list-permissions ordering and header
- PR#3325: cli: fix more users in userinfo
- PR#3355: call git rev-parse before chowning source directory
- PR#3353: Fix wrapper-rpm unit test
- PR#3326: Add tag2distrepo plugin to hub
- PR#3321: Add admin check when priority has negative value in wrapperRPM
- PR#3347: Fix input validation
- PR#3282: Add extra of builds to listTagged call result
- PR#3344: Fix age to max_age in protonmsg
- PR#3289: log content-length when we get an error reading request
- PR#3334: Add blocked option to packages page
- PR#3346: www: display load/capacity at hosts page
- PR#3278: Download-logs with nvr without task ID downloads a logs
- PR#3313: Add as_string option to showOpts for raw string or dict output
- PR#3217: Adding Driver Update Disk building support
- PR#3318: Hub, plugins and tools inputs validation
- PR#3256: add strict option to getRPMHeaders
- PR#3342: cli: document "list-signed" requires filesystem access
- PR#3257: Add log file for match_rpm warnings in cg_import
- PR#3276: Use PrivateTmp for kojid/kojira
- PR#3333: doc: winbuild documentation updates
- PR#3329: Fix number of packages without blocked
- PR#3331: doc: better description for kiwi channel requirements
- PR#3279: Skip activate_session when logged
- PR#3272: Webui: add free task for admin
- PR#3301: doc: clarify rpm imports
- PR#3306: Koji 1.28.1 release notes
- PR#3309: cli: rename "args" var for list-tags command
- PR#3248: Retry gssapi_login if it makes sense
- PR#3303: www: fix attribute test
- PR#3292: docs: Task flow diagram
- PR#3290: web: encode filename as UTF-8
- PR#3259: kojira: don't call listTags more than once
- PR#3262: Fix parsing of URLs with port numbers
- PR#3298: Use buildins.type when option is called type in readTaggedRPMS
- PR#3300: Same format output for list-builroot with verbose for py3/py2
- PR#3297: doc: fix readTaggedRPMs rpmsigs option description
- PR#3234: Check ccache size before trying to use it
- PR#3270: Increase CLI test cases
- PR#3208: hub: improve inheritance priority collision error message
- PR#3269: return 400 codes when client fails to send a full request
- PR#3265: Set dst permissions same as src permissions
- PR#3255: allow untag-build for blocked packages
- PR#3252: Fix tag and target shows as string, not as dict to string
- PR#3238: Remove koji.listFaults
- PR#3237: Remove taskReport API call
* Mon Mar 28 2022 Tomas Kopecek <tkopecek at redhat.com> - 1.28.0-1
- PR#3263: Fix syntax error
- PR#3303: www: fix attribute test
- PR#3292: docs: Task flow diagram
- PR#3290: web: encode filename as UTF-8
- PR#3259: kojira: don't call listTags more than once
- PR#3262: Fix parsing of URLs with port numbers
- PR#3298: Use buildins.type when option is called type in readTaggedRPMS
- PR#3300: Same format output for list-builroot with verbose for py3/py2
- PR#3297: doc: fix readTaggedRPMs rpmsigs option description
- PR#3270: Increase CLI test cases
- PR#3208: hub: improve inheritance priority collision error message
- PR#3265: Set dst permissions same as src permissions
- PR#3252: Fix tag and target shows as string, not as dict to string