-
Notifications
You must be signed in to change notification settings - Fork 4
/
koji.spec
2078 lines (1949 loc) · 84.7 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.27.1
Release: %{release}%{?dist}
License: LGPLv2 and GPLv2+
# the included arch lib from yum's rpmUtils 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
%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
%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
# 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: LGPLv2
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: LGPLv2
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: LGPLv2
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: LGPLv2 and GPLv2
# rpmdiff lib (from rpmlint) is GPLv2 (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: LGPLv2
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: LGPLv2
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: LGPLv2
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
License: LGPLv2 and GPLv2+
#mergerepos (from createrepo) is GPLv2+
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 >= 0.9.2
%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: LGPLv2
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: LGPLv2
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
%endif
%if 0%{py3_support} > 1
%package web
Summary: Koji Web UI
Group: Applications/Internet
License: LGPLv2
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: LGPLv2
%{?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 hub builder plugins util www 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 hub builder plugins util www vm ; 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
%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__
%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 /bin/bash -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
* Tue Dec 21 2021 Tomas Kopecek <tkopecek at redhat.com> - 1.27.1-1
- PR#3098: Add all options to hub_conf.rst
- PR#3104: Make setup.py executable
- PR#3113: error function instead of print with sys.exit in CLI commands
- PR#3115: Add and update CLI unit tests
- PR#3118: handle dictionary parameter in get_tag()
- PR#3138: doc: improve protonmsg SSL parameter descriptions
- PR#3139: www: style channelinfo hosts table
- PR#3142: devtools: print fakeweb listening URL
- PR#3150: Rewrite Acceptable keys to Requested keys in missing_signatures log
- PR#3157: Pytest instead of nose in unittest
- PR#3161: hub: fix spelling in comments for archive handling
- PR#3164: [hub] only raise error when authtype is not proxyauthtype
- PR#3166: kojira: don't fail on deleted items
- PR#3172: Return mistakenly dropped option (--keytab)
- PR#3174: hub: document getBuildLogs method
- PR#3180: Add unit test for get_options
- PR#3186: Don't fail on missing buildroot tag
- PR#3189: buildtag_inherits_from docs
* Mon Jun 21 2021 Tomas Kopecek <tkopecek at redhat.com> - 1.25.1-1
- PR#2849 hub: replace with py3 exception
- PR#2881 update .coveragerc to ignore p3 code
- PR#2888 web: docs for KojiHubCA/ClientCA
- PR#2889 kojihub - Use parse_task_params rather than manual task parsing
- PR#2890 tests - Add support for running tox with specific test(s)
- PR#2896 Drop download link from deleted build
- PR#2898 hub: fix SQL condition
- PR#2900 kojiweb - Fix getting tag ID for buildMaven taskinfo page.
- PR#2906 lib: return taskLabel for unknown tasks
- PR#2916 [policy] use "name" in result of lookup_name for CGs
* Mon May 10 2021 Tomas Kopecek <tkopecek at redhat.com> - 1.25.0-1
- PR#2844: protonmsg: use consistent data format for messages
- PR#2764: kojira: faster startup
- PR#2831: Add wait/nowait to tag-build, image-build-indirection
- PR#2827: web: don't use count(*) on first tasks page
- PR#2833: Add squashfs-only and compress-arg options to livemedia
- PR#2828: web: additional info on API page
- PR#2826: Add kerberos debug message
- PR#2821: Python egginfo
- PR#2843: update dockerfiles for f34
- PR#2824: lib: is_conn_error catch more exceptions
- PR#2823: Add default task ID to prep_repo_init/done
- PR#2816: koji-gc: Allow specifying all CLI options in config
- PR#2817: koji-gc: Implement hastag policy for koji-gc
- PR#2771: lib: use parse_task_params for taskLabel
- PR#2829: fix tests for changed helpstring
- PR#2688: cli: list-api method
- PR#2791: with_owners options for readPackageList and readTaggedBuilds
- PR#2802: Repo info with task id
- PR#2803: unify warn messages
- PR#2808: cli: multicalls for write-signed-rpm
- PR#2796: api: getVolume with strict
- PR#2792: cli: mock-config check arch
- PR#2790: cli: list-builds sort-key warning
- PR#2756: Show VCS and DistURL tags as links when appropriate
- PR#2819: lib: more portable BadStatusLine checking
- PR#2818: hub: Fix typo in postRepoInit callback from distRepo
- PR#2779: 1.24.1 release notes
- PR#2810: cli: fix multicall usage in list_hosts
- PR#2798: Fix list-hosts and hostinfo for older hub
- PR#2773: unify error messages for web
- PR#2799: kojid.conf: fix linewrapped comment
- PR#2794: lib: set sinfo=None for failed ssl_login
- PR#2689: lib: missing default values in read_config
- PR#2784: Tolerate floats in metadata timestamps
- PR#2787: Revert "requests exception"
- PR#2770: cli: buildinfo returns error for non exist build
- PR#2766: api getLastHostUpdate returns timestamp
- PR#2735: lib: more verbose conn AuthError for ssl/gssapi
- PR#2782: Be tolerant with duplicate parents in _writeInheritanceData
- PR#2615: cli: catch koji.ParameterError in list_task_output_all_volumes
- PR#2749: web: optional KojiHubCA usage
- PR#2753: drop PyOpenSSL usage
- PR#2765: kojira: check repo.json before deleting
- PR#2777: docs: fix Fedora's koji URL
- PR#2722: cli: use multicall for cancel command
- PR#2772: Fix small documentation typo
- PR#2699: Fix race handling in rmtree
- PR#2755: kojira: check rm queue before adding new path
- PR#2769: cli: hostinfo with non-exist host
- PR#2768: tests: fix locale setting
- PR#2721: API: createWinBuild with wrong win/build info
- PR#2761: cli: rpminfo with non-exist rpm
- PR#2736: api: createMavenBuild wrong buildinfo/maveninfo
- PR#2732: api: createImageBuild non-existing build wrong buildinfo
- PR#2733: Unify error messages
- PR#2759: tests: stop mock in DBQueryTest
- PR#2754: doc: jenkins fedora -> centos migration
- PR#2744: devtools: updated Dockerfiles
- PR#2715: acquire logging locks before forking
- PR#2747: Escape vcs and disturl
- PR#2705: cli: show connection exception
- PR#2703: cli: list-untagged returns error non-exist package
- PR#2738: cli: fix help message formatting
- PR#2737: plugins: fix typo
- PR#2734: cli: --no-auth for 'call' command
- PR#2711: Task priority policy
- PR#2730: configurable sidetags suffixes
- PR#2678: support modules and other btypes in download-build
- PR#2731: web: set WSGIProcessGroup inside Directory
- PR#2727: Fix progname
- PR#2717: doc: Additional docs for CVE-CVE-2020-15856
- PR#2723: better ssl_login() error message when cert is None
- PR#2725: doc: remove "ca" option from server howto
- PR#2724: doc: update kojid steps in server howto
- PR#2692: adding check for the license header key
- PR#2702: cli: list-history error non-exist channel, host
- PR#2706: hub: document getNextRelease method
- PR#2709: cli: mock-config error for non existing buildroot
- PR#2694: adding invalid target name error message
- PR#2713: set correct import_type for volume policy in completeImageBuild
* Thu Feb 4 2021 Tomas Kopecek <tkopecek at redhat.com> - 1.24.0-1
- PR#2637: plugin hooks for repo modification
- PR#2680: fix the mode of tarfile.open
- PR#2608: cli: support download-build --type=remote-sources
- PR#2674: cli: fix tests
- PR#2667: spec: pythonic provides
- PR#2671: fix typo
- PR#2651: make policy test thread safe
- PR#2664: requires python[23]-requests-gssapi for rhel[78]
- PR#2655: readFullInheritance stops/jumps deprecation
- PR#2589: history query by key
- PR#2633: handle plugins and generator results in count and countAndFilterResults
- PR#2649: kojid: backward compatible hub call
- PR#2647: explicit encoding for text file operations
- PR#2661: web: add comment explaining null start_time values
- PR#2639: web: return correct content-length
- PR#2654: cli: hide import-sig --write option
- PR#2644: Lower default multicall batch values
- PR#2584: require gssapi-requests 1.22
- PR#2576: db: add debian package archivetype
- PR#2627: hub: remove global SSLVerifyClient option
- PR#2605: cli: return error if add/remove-tag-inheritance can't be applied
- PR#2630: fix nightly getNextReelase format
- PR#2610: cli: raise NotImplementedError with btype name
- PR#2598: lib: better print with debug_xmlrpc
- PR#2621: docs: mention the final destination for new dist-repos
- PR#2617: docs: link to tag2distrepo hub plugin
- PR#2609: hub: doc listArchive types param for content generators
- PR#2595: unify sql case
- PR#2566: cli: list-task --after/--before/--all
- PR#2574: hub: limit CGImport to allow only one CG per import
- PR#2564: external repos can have specified arch list
- PR#2562: cli: list-hosts can display description/comment
- PR#2529: remove deprecated --ca option
- PR#2555: hub: [listBuilds] add nvr glob pattern support
- PR#2560: cli: allow removal of unused external repo even with --alltags
- PR#2571: Add option to use repos from kickstart for livemedia builds
- PR#2559: web: order methods by name in select box
- PR#2540: Add nomacboot option for spin-livemedia
- PR#2561: hub: fix tests
* Mon Jan 4 2021 Tomas Kopecek <tkopecek at redhat.com> - 1.23.1-1
- PR#2603: hub: fix py2-like 'stop' usage in getFullInheritance
- PR#2593: docs: assign multicall to "m" in code example
- PR#2586: cli: some options are not supplied in all _list_tasks calls
- PR#2579: Install into /usr/lib rather than /usr/lib64/
- PR#2569: Revert "timezones for py 2.7"
- PR#2547: builder: mergerepo uses workdir as tmpdir
- PR#2558: web: disable links to deleted tags
- PR#2548: kojira: don't expire ignored tags with targets
- PR#2567: hub: use CTE for build_references
- PR#2533: kojira: cache external repo timestamps by arch_url
- PR#2515: to_list is not needed in py3 code
- PR#2517: lib: better argument checking for eventFromOpts
- PR#2504: Only redirect back to HTTP_REFERER if it points to kojiweb
- PR#2526: sidetag: remove double "usage"
- PR#2577: fix not found build id error for list-builds
- PR#2509: doc: api docs
- PR#2528: doc: python support matrix
* Tue Jul 28 2020 Mike McLean <mikem at redhat.com> - 1.22.0-1
- PR#2404: release bump and changelog
- PR#2393: release notes - 1.22
- PR#2397: kojira: remove unused delete_batch_size
- PR#2401: kojira: drop reference to krb_login
- PR#2280: Use requests_gssapi instead of requests_kerberos
- PR#2244: remove deprecated krbV support
- PR#2340: kojira: threaded repo deletion
- PR#2337: align option naming with mock
- PR#2363: sphinx formatting fixes for hub policy doc
- PR#2377: hub: document listBType return value when query matches no entries
- PR#2123: Pass buildroot to preSCMCheckout and postSCMCheckout where applicable.
- PR#2257: BuildSRPMFromSCMTask: Support auto-selecting a matching specfile name
- PR#2387: cli: list-tags: fall back to old behavior on ParameterError
- PR#2353: turn off dnf_warning in mock.cfg
- PR#2385: doc: exporting repositories
- PR#2372: TaskManager: clean both result and results dirs
- PR#2376: kojid: use mergerepo_c for all merge modes
- PR#2359: hub: importImage doesn't honor volume
- PR#2364: cli clone-tag - get srctag info with event
- PR#2347: cli: fix image-build-indirection --wait
- PR#2366: upgrade-sql: fix backward compatibility
- PR#2369: hub: make sure checksum_type is int for DB
- PR#2306: Provide task-based data to volume policy
- PR#2346: cli: --wait for download-task
- PR#2342: fix simple_error_message encoding
- PR#2358: web: remove "GssapiLocalName off" setting
- PR#2354: fix error message
- PR#2351: hub: remove "GssapiLocalName off" setting
- PR#2350: doc: improve hub selinux instructions
- PR#2352: doc: update test suite dependency list for py3
- PR#2348: fix option order
- PR#2339: kojira: drop kojira.sysconfig
- PR#2320: hub: allow glob matching for listTags
- PR#2344: runroot: basic docs
- PR#2345: builder: document plugin callbacks
- PR#2327: koji-gc: fix py3 compare behaviour for dicts
- PR#2338: hub: fix typo
- PR#2334: hub: fix index so it gets used by planner
- PR#2137: more debug info for un/tracked tasks in kojira
- PR#2161: doc: update documentation for SSLCACertificateFile
- PR#2162: hub: remove "GssapiSSLonly Off" option
- PR#2287: doc: rewrite PostgreSQL authorization instructions
- PR#2290: vm: clone mac address via xml
- PR#2317: md5: try the best to use sha256 instead of md5 and ignore FIPS in other parts
- PR#2263: improve race condition for getNextRelease / images
- PR#2085: hide local --debug options
- PR#2301: avoid redundant clauses and joins in query_buildroots()
- PR#2237: db: use timestamps with timezone
- PR#2329: docs: align "Hub" text in diagram
- PR#2330: clean_old option was duplicated on clean_empty
- PR#2331: hub: document listChannels arguments
- PR#2318: make mock depsolver policy configurable
- PR#1932: per-tag settings for mock's sign plugin
- PR#2328: koji-gc: fix flake8
- PR#2218: Drop py2 support for hub/web
- PR#2316: kojira: replace deprecated Thread.isAlive()
- PR#2309: hub: simplify recipients condition in build_notification()
- PR#2326: sidetag: parenthesis typo
- PR#2322: Side tags: allow admin ops and misc fixes
- PR#2323: kojira: Fix logic detecting directories
- PR#2276: document merge modes
- PR#2310: hub: fix "opt-outs" comment in get_notification_recipients()
- PR#2256: Don't break on deleted tag
- PR#2154: kojira: swap first_seen with latest mtime for repo
- PR#2275: hub: default policy allow packagelist changes with 'tag' permission
- PR#2255: cli: output extra['rpm.macro.*'] to mock-config
- PR#2253: koji-gc: set smtp_host to localhost by default
- PR#2308: hub: return empty list in get_notification_recipients()
- PR#2293: disable notifications by default in [un]tagBuildBypass calls
- PR#2303: hub: query_buildroots fix query behaviour
- PR#2299: hub: query_buildroots have to return ASAP
- PR#2166: mock's boostrap + image support
- PR#2295: Koji 1.21.1 release notes
- PR#2278: koji-gc: fix cc/bcc e-mail handling
- PR#2212: kojid: remove bootstrap dir
- PR#2254: openRemoteFile retries and checks downloaded content
- PR#2225: hub: log tracebacks for multicalls
- PR#2279: koji-gc: fix query order
- PR#2064: Support tag specific environment variables
- PR#2153: koji-gc: various typos in maven path
- PR#2193: www: repoinfo page
- PR#2268: don't decode signature headers
- PR#2214: cli: drop unneeded activate_session
- PR#2266: Correctly identify "hostname doesn't match" errors
- PR#2228: cli: flush stdout during watch-logs
- PR#2264: replace deprecated function with logging
- PR#2262: Pass bootloader append option to livemedia builds
- PR#2195: koji-gc: allow specifying CC and BCC address for email notifications
- PR#2141: kojiweb: update for mod_auth_gssapi configuration
- PR#2238: hub: deprecate host.getTask call
- PR#2224: cli: fix variable name
- PR#2245: cli: extend docs for --before/--after options
- PR#2246: deprecated warning for cli option --ca as well
- PR#2248: doc: links to copr builds
- PR#2223: cli: fix un/lock-tag permission handling
- PR#2241: hub: API docs
- PR#2242: hub: additional API docs
- PR#2199: koji-gc: add systemd unit files
- PR#2157: kojira: use cached getTag for external repos
- PR#2226: cli: deprecate --ca
- PR#2197: Use %autosetup (fixes #2196)
- PR#2235: doc: update postgresql-setup command for el8 and Fedora
- PR#2236: fix additional flake8 problems
- PR#2233: fix flake8 errors
- PR#2151: koji-gc: support request_kerberos
- PR#2211: koji-gc: test existence of trashcan tag
- PR#2132: listSideTags returns also user info
- PR#2187: koji-sweep-db: use "Type=oneshot" for systemd
- PR#2213: Correct docstring about deleting inheritance rules
- PR#2209: koji-utils: only requires /usr/bin/python2 on rhel<=7
- PR#2205: doc: fix koji-sweep-db filename typo
- PR#2206: doc: indent SQL query for user ID discovery
- PR#2207: cli: improve grant-permission --new --help message
- PR#2203: hub: admin can't force tag now
- PR#2194: remove obsoleted note
- PR#2158: hub: document addExternalRepoToTag arguments
- PR#2172: hub: document createUser arguments
- PR#2180: cli: fix "list-history --help" text for "--cg"
- PR#2044: Unify error messages in CLI
- fix flake8
- PR#2024: queue log file for kojira
- PR#2136: replace logging.warn with warning
- PR#2038: Don't use listTagged(tag, *) for untag-build
- PR#2103: fix list-signed --tag memory issues
- PR#2150: translate exceptions to GenericError
- PR#2176: hub: document editUser method
- PR#2175: kojira: remove duplicate Kerberos configuration boilerplate
- Merge #2173 `hub: document getTagExternalRepos`
- PR#2177: doc: "koji build" requires a target
- PR#2178: docs: Fix sidetag enablement typo
- PR#2174: hub: document removeExternalRepoFromTag arguments
- hub: document getTagExternalRepos
- fix docs
- missing file from 1.21 docs
* Wed Jun 03 2020 Tomas Kopecek <tkopecek at redhat.com> - 1.21.1-1
- PR#2279: koji-gc: fix query order
- PR#2038: Don't use listTagged(tag, *) for untag-build
- PR#2245: cli: extend docs for --before/--after options
- PR#2103: fix list-signed --tag memory issues
- PR#2241: hub: API docs
- PR#2242: hub: additional API docs
- PR#2136: replace logging.warn with warning
- PR#2141: kojiweb: update for mod_auth_gssapi configuration
- PR#2153: koji-gc: various typos in maven path
- PR#2157: kojira: use cached getTag for external repos
- PR#2158: hub: document addExternalRepoToTag arguments
- PR#2194: remove obsoleted note
- PR#2211: koji-gc: test existence of trashcan tag
- PR#2203: hub: admin can't force tag now
- PR#2224: cli: fix variable name
- PR#2223: cli: fix un/lock-tag permission handling
- PR#2268: don't decode signature headers
- PR#2248: doc: links to copr builds
- PR#2178: docs: Fix sidetag enablement typo
- PR#2174: hub: document removeExternalRepoFromTag arguments
- fix docs
- missing file from 1.21 docs
* Tue Apr 14 2020 Tomas Kopecek <tkopecek at redhat.com> - 1.21-1
- PR#2057: update docs on httpd configuration
- PR#1385: Add --no-delete option to clone-tag
- PR#2054: editSideTag API call
- PR#2081: new policy for dist-repo
- PR#2129: hub: document deleteExternalRepo arguments
- PR#2128: hub: document getExternalRepo arguments
- PR#2127: fix sanity check in merge_scratch
- PR#2125: Set default keytab for kojira
- PR#2071: Better help for build/latest-build
- PR#516: kojira monitors external repos changes
- PR#2121: kojira: be tolerant of old with_src configuration option
- PR#2105: always set utf8 pg client encoding
- PR#2106: kojira: Allow using Kerberos without krbV
- PR#2088: fix missing /lib/ in hub-plugins path
- PR#2097: display merge mode for external repos
- PR#2098: move admin force usage to assert_policy
- PR#1990: allow debuginfo for sidetag repos
- PR#2082: delete oldest failed buildroot, when there is no space
- PR#2115: Correct json.dumps usage