This repository has been archived by the owner on Jun 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 254
/
rhn-client-tools.spec
1518 lines (1243 loc) · 47.8 KB
/
rhn-client-tools.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
%if 0%{?fedora} || 0%{?suse_version} > 1320 || 0%{?rhel} >= 8 || 0%{?mageia}
%global build_py3 1
%global default_py3 1
%endif
%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8 || 0%{?mageia}
%global py3_deps 1
%endif
%if ( 0%{?fedora} && 0%{?fedora} < 28 ) || ( 0%{?rhel} && 0%{?rhel} < 8 )
%global build_py2 1
%endif
%{!?_presetdir:%global _presetdir /lib/systemd/system-preset}
%if %{_vendor} == "debbuild"
# Bash constructs in scriptlets don't play nice with Debian's default shell, dash
%global _buildshell /bin/bash
%endif
%{!?__python2:%global __python2 /usr/bin/python2}
%{!?__python3:%global __python3 /usr/bin/python3}
%if %{undefined python2_version}
%global python2_version %(%{__python2} -Esc "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))")
%endif
%if %{undefined python3_version}
%global python3_version %(%{__python3} -Ic "import sys; sys.stdout.write(sys.version[:3])")
%endif
%if %{undefined python2_sitelib}
%global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%endif
%if %{undefined python3_sitelib}
%global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%endif
%if %{_vendor} == "debbuild"
# For making sure we can set the right args for deb distros
%global is_deb 1
%endif
%define pythonX %{?default_py3: python3}%{!?default_py3: python2}
Summary: Support programs and libraries for Red Hat Satellite or Spacewalk
Name: rhn-client-tools
Version: 2.10.3
Release: 1%{?dist}
%if %{_vendor} == "debbuild"
Group: admin
Packager: Spacewalk Project <spacewalk-devel@redhat.com>
%endif
License: GPLv2
Source0: %{name}-%{version}.tar.gz
URL: https://github.com/spacewalkproject/spacewalk
BuildArch: noarch
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
%if %{_vendor} != "debbuild"
Requires: rpm >= 4.2.3-24_nonptl
Requires: /usr/bin/gpg
Requires: coreutils
%if 0%{?suse_version}
Requires: zypper
%else
%if 0%{?fedora} || 0%{?rhel} >= 8 || 0%{?mageia} >= 6
Requires: dnf
%else
Requires: yum
%endif # 0%{?fedora}
%endif # 0%{?suse_version}
%endif
%if %{_vendor} == "debbuild"
Requires: apt
%if 0%{?ubuntu} >= 1804
Requires: gpg
%else
Requires: gnupg
%endif
Requires: coreutils
%endif
BuildRequires: rpm
Requires: %{pythonX}-%{name} = %{version}-%{release}
Conflicts: up2date < 5.0.0
Conflicts: yum-rhn-plugin < 1.6.4-1
Conflicts: rhncfg < 5.9.23-1
Conflicts: spacewalk-koan < 0.2.7-1
Conflicts: rhn-kickstart < 5.4.3-1
Conflicts: rhn-virtualization-host < 5.4.36-2
BuildRequires: gettext
BuildRequires: intltool
BuildRequires: desktop-file-utils
%if 0%{?fedora}
BuildRequires: fedora-logos
BuildRequires: dnf
%endif
%if 0%{?mageia} >= 6
BuildRequires: dnf
%endif
%if 0%{?rhel}
BuildRequires: redhat-logos
%if 0%{?rhel} >= 8
BuildRequires: dnf
%else
BuildRequires: yum
%endif
%endif
%description
Red Hat Satellite Client Tools provides programs and libraries to allow your
system to receive software updates from Red Hat Satellite or Spacewalk.
%if 0%{?build_py2}
%package -n python2-%{name}
Summary: Support programs and libraries for Red Hat Satellite or Spacewalk
%{?python_provide:%python_provide python2-%{name}}
%if %{_vendor} == "debbuild"
Group: python
%endif
Requires: %{name} = %{version}-%{release}
Requires: rhnlib >= 2.5.78
%if %{_vendor} != "debbuild"
%if 0%{?fedora} || 0%{?rhel} >= 8
Requires: pygobject2
Requires: libgudev
%else
%if 0%{?suse_version} >= 1140
Requires: python-pyudev
%else
Requires: python-gudev
%endif # 0%{?suse_version} >= 1140
%endif # 0%{?fedora}
%if 0%{?rhel} || 0%{?fedora}
%if 0%{?py3_deps}
Requires: python2-newt
%else
Requires: newt-python
%endif
%endif
%if 0%{?suse_version}
Requires: dbus-1-python
Requires: python-newt
%else
%if 0%{?mageia}
Requires: python-dbus
%else
%if 0%{?py3_deps}
Requires: python2-dbus
%else
Requires: dbus-python
%endif
%endif # 0%{?mageia}
%endif # 0%{?suse_version}
%if 0%{?py3_deps}
Requires: python2-rpm
BuildRequires: python2-devel
BuildRequires: python2-rpm
%if 0%{?mageia}
Requires: python-dmidecode
Requires: python-ethtool >= 0.4
Requires: python-hwdata
BuildRequires: python-coverage
%else
Requires: python2-dmidecode
Requires: python2-ethtool >= 0.4
Requires: python2-hwdata
BuildRequires: python2-coverage
%endif
%else
Requires: rpm-python
Requires: python-dmidecode
Requires: python-ethtool >= 0.4
BuildRequires: python-devel
Requires: python-hwdata
BuildRequires: rpm-python
BuildRequires: python-coverage
%endif
%endif
%if %{_vendor} == "debbuild"
Requires: python-rpm
Requires: python-dmidecode
Requires: python-ethtool >= 0.4
BuildRequires: python-dev
Requires: python2-hwdata
BuildRequires: python-rpm
BuildRequires: python-coverage
Requires: gir1.2-gudev-1.0
Requires: python-gi
Requires: python-pyudev
Requires: python-dbus
Requires: python-newt
Requires(preun): python-minimal
Requires(post): python-minimal
%endif
# The following BuildRequires are for check only
Requires: rhnlib >= 2.5.78
%description -n python2-%{name}
Python 2 specific files of %{name}.
%endif
%if 0%{?build_py3}
%package -n python3-%{name}
Summary: Support programs and libraries for Red Hat Satellite or Spacewalk
%{?python_provide:%python_provide python3-%{name}}
%if %{_vendor} == "debbuild"
Group: python
%endif
Requires: %{name} = %{version}-%{release}
%if %{_vendor} != "debbuild"
%if 0%{?suse_version} >= 1140
Requires: python3-dbus-python
Requires: python3-newt
Requires: python3-pyudev
%else
Requires: libgudev
Requires: python3-dbus
%if 0%{?mageia}
Requires: python3-newt
Requires: python3-gobject3
%else
Requires: newt-python3
Requires: python3-gobject-base
%endif # 0%{?mageia}
%endif # 0%{?suse_version} >= 1140
BuildRequires: python3-devel
%endif
Requires: python3-rpm
Requires: python3-dmidecode
Requires: python3-netifaces
Requires: python3-hwdata
Requires: python3-rhnlib >= 2.5.78
%if %{_vendor} == "debbuild"
BuildRequires: python3-dev
Requires: python3-dbus
Requires: python3-newt
Requires: gir1.2-gudev-1.0
Requires: python3-pyudev
Requires: python3-gi
Requires(preun): python3-minimal
Requires(post): python3-minimal
%endif
# The following BuildRequires are for check only
BuildRequires: python3-coverage
BuildRequires: python3-rpm
Requires: python3-rhnlib >= 2.5.78
%description -n python3-%{name}
Python 3 specific files of %{name}.
%endif
%package -n rhn-check
Summary: Check for RHN actions
Requires: %{name} = %{version}-%{release}
Requires: %{pythonX}-rhn-check = %{version}-%{release}
%if %{_vendor} != "debbuild"
%if 0%{?suse_version}
Requires: zypp-plugin-spacewalk
%else
%if 0%{?fedora} || 0%{?rhel} >= 8 || 0%{?mageia} >= 6
Requires: dnf-plugin-spacewalk >= 2.4.0
%else
Requires: yum-rhn-plugin >= 1.6.4-1
%endif
%endif
%endif
%if %{_vendor} == "debbuild"
Requires: apt-transport-spacewalk
%endif
%description -n rhn-check
rhn-check polls a Red Hat Satellite or Spacewalk server to find and execute
scheduled actions.
%if 0%{?build_py2}
%package -n python2-rhn-check
Summary: Check for RHN actions
%{?python_provide:%python_provide python2-rhn-check}
Requires: rhn-check = %{version}-%{release}
%if %{_vendor} == "debbuild"
Requires(preun): python-minimal
Requires(post): python-minimal
%endif
%description -n python2-rhn-check
Python 2 specific files for rhn-check.
%endif
%if 0%{?build_py3}
%package -n python3-rhn-check
Summary: Support programs and libraries for Red Hat Satellite or Spacewalk
%{?python_provide:%python_provide python3-rhn-check}
Requires: rhn-check = %{version}-%{release}
%if %{_vendor} == "debbuild"
Requires(preun): python3-minimal
Requires(post): python3-minimal
%endif
%description -n python3-rhn-check
Python 3 specific files for rhn-check.
%endif
%package -n rhn-setup
Summary: Configure and register an RHN/Spacewalk client
Requires: %{pythonX}-rhn-setup = %{version}-%{release}
%if 0%{?fedora} || 0%{?rhel} || 0%{?debian} || 0%{?ubuntu}
Requires: usermode >= 1.36
%endif
%if 0%{?mageia}
Requires: usermode-consoleonly >= 1.36
%endif
Requires: %{name} = %{version}-%{release}
Requires: rhnsd
%description -n rhn-setup
rhn-setup contains programs and utilities to configure a system to use
Red Hat Satellite or Spacewalk, and to register a system with a Red Hat Satellite or Spacewalk server.
%if 0%{?build_py2}
%package -n python2-rhn-setup
Summary: Configure and register an RHN/Spacewalk client
%{?python_provide:%python_provide python2-rhn-setup}
Requires: rhn-setup = %{version}-%{release}
%if 0%{?fedora} || 0%{?rhel}
Requires: newt-python
%endif
%if 0%{?mageia} || 0%{?debian} || 0%{?ubuntu}
Requires: python-newt
%endif
%if %{_vendor} == "debbuild"
Requires(preun): python-minimal
Requires(post): python-minimal
%endif
%description -n python2-rhn-setup
Python 2 specific files for rhn-setup.
%endif
%if 0%{?build_py3}
%package -n python3-rhn-setup
Summary: Configure and register an RHN/Spacewalk client
%{?python_provide:%python_provide python3-rhn-setup}
Requires: rhn-setup = %{version}-%{release}
%if 0%{?mageia} || 0%{?debian} || 0%{?ubuntu} || 0%{?suse_version} >= 1140
Requires: python3-newt
%else
Requires: newt-python3
%endif
%if %{_vendor} == "debbuild"
Requires(preun): python3-minimal
Requires(post): python3-minimal
%endif
%description -n python3-rhn-setup
Python 3 specific files for rhn-setup.
%endif
%package -n rhn-setup-gnome
Summary: A GUI interface for RHN/Spacewalk Registration
Requires: %{name} = %{version}-%{release}
Requires: %{pythonX}-rhn-setup = %{version}-%{release}
Requires: %{pythonX}-rhn-setup-gnome = %{version}-%{release}
Requires: rhn-setup = %{version}-%{release}
%if %{_vendor} == "debbuild"
Requires: libpam0g
Requires: libpam-modules
Requires: libpam-runtime
Requires: libpam-gnome-keyring
%else
Requires: pam >= 0.72
%endif
%description -n rhn-setup-gnome
rhn-setup-gnome contains a GTK+ graphical interface for configuring and
registering a system with a Red Hat Satellite or Spacewalk server.
%if 0%{?build_py2}
%package -n python2-rhn-setup-gnome
Summary: Configure and register an RHN/Spacewalk client
%{?python_provide:%python_provide python2-rhn-setup-gnome}
Requires: rhn-setup-gnome = %{version}-%{release}
%if %{_vendor} != "debbuild"
%if 0%{?suse_version}
Requires: python-gnome python-gtk
%else
%if 0%{?mageia}
Requires: pygtk2.0 pygtk2.0-libglade
Requires: usermode
%else
Requires: pygtk2 pygtk2-libglade
Requires: usermode-gtk
%endif
%endif
%if 0%{?rhel} || 0%{?fedora}
Requires: liberation-sans-fonts
%endif
%if 0%{?mageia}
Requires: fonts-ttf-liberation
%endif
%if 0%{?suse_version}
Requires: liberation-fonts
%endif
%endif
%if %{_vendor} == "debbuild"
Requires: python-gnome2
Requires: python-gtk2
Requires: python-glade2
Requires: usermode
Requires: fonts-liberation
Requires(preun): python-minimal
Requires(post): python-minimal
%endif
%description -n python2-rhn-setup-gnome
Python 2 specific files for rhn-setup-gnome.
%endif
%if 0%{?build_py3}
%package -n python3-rhn-setup-gnome
Summary: Configure and register an RHN/Spacewalk client
%{?python_provide:%python_provide python3-rhn-setup-gnome}
Requires: rhn-setup-gnome = %{version}-%{release}
# gtk-builder-convert
%if %{_vendor} != "debbuild"
BuildRequires: gtk2-devel
BuildRequires: python2
Requires: gtk3
%if 0%{?suse_version}
Requires: python3-gobject
BuildRequires: python2-xml
%else
%if 0%{?mageia}
Requires: python3-gobject3
%else
Requires: python3-gobject-base
%endif
%endif
%if 0%{?rhel} || 0%{?fedora}
Requires: liberation-sans-fonts
%endif
%if 0%{?mageia}
Requires: fonts-ttf-liberation
%endif
%if 0%{?suse_version}
Requires: liberation-fonts
%endif
%endif
%if %{_vendor} == "debbuild"
BuildRequires: libgtk2.0-dev
Requires: libgtk-3-bin
Requires: gir1.2-gtk-3.0
Requires: python3-gi
Requires: fonts-liberation
Requires(preun): python3-minimal
Requires(post): python3-minimal
%endif
%description -n python3-rhn-setup-gnome
Python 3 specific files for rhn-setup-gnome.
%endif
%prep
%setup -q
%build
make -f Makefile.rhn-client-tools %{?is_deb:PLATFORM=deb}
%install
%if 0%{?build_py2}
make -f Makefile.rhn-client-tools install VERSION=%{version}-%{release} \
PYTHONPATH=%{python2_sitelib} PYTHONVERSION=%{python2_version} \
PREFIX=$RPM_BUILD_ROOT MANPATH=%{_mandir} %{?is_deb:PLATFORM=deb}
%endif
%if 0%{?build_py3}
sed -i 's|#!/usr/bin/python2|#!/usr/bin/python3|' src/actions/*.py src/bin/*.py test/*.py
make -f Makefile.rhn-client-tools %{?is_deb:PLATFORM=deb}
for g in data/*.glade ; do
mv $g $g.old
python2 /usr/bin/gtk-builder-convert $g.old $g
done
sed -i 's/GTK_PROGRESS_LEFT_TO_RIGHT/horizontal/' data/progress.glade
sed -i 's/GtkComboBox/GtkComboBoxText/; /property name="has_separator"/ d;' data/rh_register.glade
sed -i '/class="GtkVBox"/ {
s/GtkVBox/GtkBox/;
a \ \ \ \ \ \ \ \ <property name="orientation">vertical</property\>
}' data/gui.glade
make -f Makefile.rhn-client-tools install VERSION=%{version}-%{release} \
PYTHONPATH=%{python3_sitelib} PYTHONVERSION=%{python3_version} \
PREFIX=$RPM_BUILD_ROOT MANPATH=%{_mandir} %{?is_deb:PLATFORM=deb}
%endif
ln -sf consolehelper $RPM_BUILD_ROOT%{_bindir}/rhn_register
ln -s spacewalk-channel $RPM_BUILD_ROOT%{_sbindir}/rhn-channel
mkdir -p $RPM_BUILD_ROOT/var/lib/up2date
mkdir -pm700 $RPM_BUILD_ROOT%{_localstatedir}/spool/up2date
touch $RPM_BUILD_ROOT%{_localstatedir}/spool/up2date/loginAuth.pkl
%if 0%{?fedora} || 0%{?mageia} || 0%{?debian} >= 8 || 0%{?ubuntu} >= 1504
mkdir -p $RPM_BUILD_ROOT/%{_presetdir}
install 50-spacewalk-client.preset $RPM_BUILD_ROOT/%{_presetdir}
%endif
%if 0%{?build_py2}
%if 0%{?fedora} || 0%{?rhel} || 0%{?suse_version} >= 1140 || 0%{?mageia} || 0%{?debian} || 0%{?ubuntu}
rm $RPM_BUILD_ROOT%{python2_sitelib}/up2date_client/hardware_hal.*
%else
rm $RPM_BUILD_ROOT%{python2_sitelib}/up2date_client/hardware_gudev.*
rm $RPM_BUILD_ROOT%{python2_sitelib}/up2date_client/hardware_udev.*
%endif
%endif
%if 0%{?rhel} == 6
rm -rf $RPM_BUILD_ROOT%{_datadir}/firstboot/modules/rhn_*_*.*
%endif
%if ! 0%{?rhel} || 0%{?rhel} > 6
%if 0%{?build_py2}
rm -rf $RPM_BUILD_ROOT%{python2_sitelib}/up2date_client/firstboot
%endif
rm -rf $RPM_BUILD_ROOT%{_datadir}/firstboot/
%endif
%if 0%{?build_py3}
rm -rf $RPM_BUILD_ROOT%{python3_sitelib}/up2date_client/firstboot
%endif
desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications --vendor=rhn rhn_register.desktop
mkdir -p $RPM_BUILD_ROOT/usr/share/metainfo/
install rhn_register.appdata.xml $RPM_BUILD_ROOT/usr/share/metainfo/
%if 0%{?suse_version}
%suse_update_desktop_file -r rhn_register "Settings;System;SystemSetup;"
# no usermod on SUSE
rm -f $RPM_BUILD_ROOT%{_bindir}/rhn_register
%endif
%if %{_vendor} != "debbuild"
%find_lang %{name}
%endif
# create links to default script version
%define default_suffix %{?default_py3:-%{python3_version}}%{!?default_py3:-%{python2_version}}
for i in \
/usr/sbin/rhn-profile-sync \
/usr/sbin/rhn_check \
/usr/sbin/rhn_register \
/usr/sbin/rhnreg_ks \
/usr/sbin/spacewalk-channel \
; do
ln -s $(basename "$i")%{default_suffix} "$RPM_BUILD_ROOT$i"
done
%if 0%{?suse_version}
%if 0%{?build_py2}
%py_compile -O %{buildroot}/%{python2_sitelib}
%endif
%if 0%{?build_py3}
%py3_compile -O %{buildroot}/%{python3_sitelib}
%endif
%endif
%post
rm -f %{_localstatedir}/spool/up2date/loginAuth.pkl
%if ! 0%{?build_py3}
%post -n rhn-setup-gnome
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
# See posttrans section below
%if %{_vendor} == "debbuild"
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif
%postun -n rhn-setup-gnome
%if %{_vendor} != "debbuild"
if [ $1 -eq 0 ] ; then
%endif
%if %{_vendor} == "debbuild"
if [[ "$1" == "purge" || "$1" == "remove" ]]; then
%endif
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
# This macro doesn't exist for debbuild. I'm shoving this into post instead.
%if %{_vendor} != "debbuild"
%posttrans -n rhn-setup-gnome
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif
%endif
%if 0%{?fedora}
%check
make -f Makefile.rhn-client-tools test
%endif
%if %{_vendor} == "debbuild"
%files
# No find_lang on Debian systems
%{_datadir}/locale/
/var/lib/up2date/
%else
%files -f %{name}.lang
%endif
# some info about mirrors
%doc doc/mirrors.txt
%doc doc/AUTHORS
%doc doc/LICENSE
%{_mandir}/man8/rhn-profile-sync.8*
%{_mandir}/man5/up2date.5*
%dir %{_sysconfdir}/sysconfig/rhn
%dir %{_sysconfdir}/sysconfig/rhn/clientCaps.d
%dir %{_sysconfdir}/sysconfig/rhn/allowed-actions
%dir %{_sysconfdir}/sysconfig/rhn/allowed-actions/configfiles
%dir %{_sysconfdir}/sysconfig/rhn/allowed-actions/script
%verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/sysconfig/rhn/up2date
%config(noreplace) %{_sysconfdir}/logrotate.d/up2date
# dirs
%dir %{_datadir}/rhn
%dir %{_localstatedir}/spool/up2date
%{_sbindir}/rhn-profile-sync
%ghost %attr(600,root,root) %verify(not md5 size mtime) %{_localstatedir}/spool/up2date/loginAuth.pkl
#public keys and certificates
%{_datadir}/rhn/RHNS-CA-CERT
%if 0%{?fedora} || 0%{?mageia} || 0%{?debian} >= 8 || 0%{?ubuntu} >= 1504
%{_presetdir}/50-spacewalk-client.preset
%endif
%if 0%{?build_py2}
%files -n python2-%{name}
%{_sbindir}/rhn-profile-sync-%{python2_version}
%dir %{python2_sitelib}/up2date_client/
%{python2_sitelib}/up2date_client/__init__.*
%{python2_sitelib}/up2date_client/config.*
%{python2_sitelib}/up2date_client/haltree.*
%{python2_sitelib}/up2date_client/hardware*
%{python2_sitelib}/up2date_client/up2dateUtils.*
%{python2_sitelib}/up2date_client/up2dateLog.*
%{python2_sitelib}/up2date_client/up2dateErrors.*
%{python2_sitelib}/up2date_client/up2dateAuth.*
%{python2_sitelib}/up2date_client/rpcServer.*
%{python2_sitelib}/up2date_client/rhnserver.*
%{python2_sitelib}/up2date_client/pkgUtils.*
%{python2_sitelib}/up2date_client/rpmUtils.*
%{python2_sitelib}/up2date_client/debUtils.*
%{python2_sitelib}/up2date_client/rhnPackageInfo.*
%{python2_sitelib}/up2date_client/rhnChannel.*
%{python2_sitelib}/up2date_client/rhnHardware.*
%{python2_sitelib}/up2date_client/transaction.*
%{python2_sitelib}/up2date_client/clientCaps.*
%{python2_sitelib}/up2date_client/capabilities.*
%{python2_sitelib}/up2date_client/rhncli.*
%{python2_sitelib}/up2date_client/pkgplatform.*
%endif
%if 0%{?build_py3}
%files -n python3-%{name}
%{_sbindir}/rhn-profile-sync-%{python3_version}
%dir %{python3_sitelib}/up2date_client/
%{python3_sitelib}/up2date_client/__init__.*
%{python3_sitelib}/up2date_client/config.*
%{python3_sitelib}/up2date_client/haltree.*
%{python3_sitelib}/up2date_client/hardware*
%{python3_sitelib}/up2date_client/up2dateUtils.*
%{python3_sitelib}/up2date_client/up2dateLog.*
%{python3_sitelib}/up2date_client/up2dateErrors.*
%{python3_sitelib}/up2date_client/up2dateAuth.*
%{python3_sitelib}/up2date_client/rpcServer.*
%{python3_sitelib}/up2date_client/rhnserver.*
%{python3_sitelib}/up2date_client/pkgUtils.*
%{python3_sitelib}/up2date_client/rpmUtils.*
%{python3_sitelib}/up2date_client/debUtils.*
%{python3_sitelib}/up2date_client/rhnPackageInfo.*
%{python3_sitelib}/up2date_client/rhnChannel.*
%{python3_sitelib}/up2date_client/rhnHardware.*
%{python3_sitelib}/up2date_client/transaction.*
%{python3_sitelib}/up2date_client/clientCaps.*
%{python3_sitelib}/up2date_client/capabilities.*
%{python3_sitelib}/up2date_client/rhncli.*
%{python3_sitelib}/up2date_client/pkgplatform.*
%if %{_vendor} != "debbuild"
%dir %{python3_sitelib}/up2date_client/__pycache__/
%{python3_sitelib}/up2date_client/__pycache__/__init__.*
%{python3_sitelib}/up2date_client/__pycache__/config.*
%{python3_sitelib}/up2date_client/__pycache__/haltree.*
%{python3_sitelib}/up2date_client/__pycache__/hardware*
%{python3_sitelib}/up2date_client/__pycache__/up2dateUtils.*
%{python3_sitelib}/up2date_client/__pycache__/up2dateLog.*
%{python3_sitelib}/up2date_client/__pycache__/up2dateErrors.*
%{python3_sitelib}/up2date_client/__pycache__/up2dateAuth.*
%{python3_sitelib}/up2date_client/__pycache__/rpcServer.*
%{python3_sitelib}/up2date_client/__pycache__/rhnserver.*
%{python3_sitelib}/up2date_client/__pycache__/pkgUtils.*
%{python3_sitelib}/up2date_client/__pycache__/rpmUtils.*
%{python3_sitelib}/up2date_client/__pycache__/debUtils.*
%{python3_sitelib}/up2date_client/__pycache__/rhnPackageInfo.*
%{python3_sitelib}/up2date_client/__pycache__/rhnChannel.*
%{python3_sitelib}/up2date_client/__pycache__/rhnHardware.*
%{python3_sitelib}/up2date_client/__pycache__/transaction.*
%{python3_sitelib}/up2date_client/__pycache__/clientCaps.*
%{python3_sitelib}/up2date_client/__pycache__/capabilities.*
%{python3_sitelib}/up2date_client/__pycache__/rhncli.*
%{python3_sitelib}/up2date_client/__pycache__/pkgplatform.*
%endif
%endif
%files -n rhn-check
%{_mandir}/man8/rhn_check.8*
%{_sbindir}/rhn_check
%if 0%{?build_py2}
%files -n python2-rhn-check
%{_sbindir}/rhn_check-%{python2_version}
%dir %{python2_sitelib}/rhn
%dir %{python2_sitelib}/rhn/actions/
%{python2_sitelib}/up2date_client/getMethod.*
# actions for rhn_check to run
%{python2_sitelib}/rhn/actions/__init__.*
%{python2_sitelib}/rhn/actions/hardware.*
%{python2_sitelib}/rhn/actions/systemid.*
%{python2_sitelib}/rhn/actions/reboot.*
%{python2_sitelib}/rhn/actions/rhnsd.*
%{python2_sitelib}/rhn/actions/up2date_config.*
%endif
%if 0%{?build_py3}
%files -n python3-rhn-check
%{_sbindir}/rhn_check-%{python3_version}
%dir %{python3_sitelib}/rhn
%dir %{python3_sitelib}/rhn/actions/
%{python3_sitelib}/up2date_client/getMethod.*
%{python3_sitelib}/rhn/actions/__init__.*
%{python3_sitelib}/rhn/actions/hardware.*
%{python3_sitelib}/rhn/actions/systemid.*
%{python3_sitelib}/rhn/actions/reboot.*
%{python3_sitelib}/rhn/actions/rhnsd.*
%{python3_sitelib}/rhn/actions/up2date_config.*
%if %{_vendor} != "debbuild"
%dir %{python3_sitelib}/rhn/actions/__pycache__/
%{python3_sitelib}/up2date_client/__pycache__/getMethod.*
%{python3_sitelib}/rhn/actions/__pycache__/__init__.*
%{python3_sitelib}/rhn/actions/__pycache__/hardware.*
%{python3_sitelib}/rhn/actions/__pycache__/systemid.*
%{python3_sitelib}/rhn/actions/__pycache__/reboot.*
%{python3_sitelib}/rhn/actions/__pycache__/rhnsd.*
%{python3_sitelib}/rhn/actions/__pycache__/up2date_config.*
%endif
%endif
%files -n rhn-setup
%{_mandir}/man8/rhnreg_ks.8*
%{_mandir}/man8/rhn_register.8*
%{_mandir}/man8/spacewalk-channel.8*
%{_mandir}/man8/rhn-channel.8*
%config(noreplace) %{_sysconfdir}/security/console.apps/rhn_register
%config(noreplace) %{_sysconfdir}/pam.d/rhn_register
%if 0%{?fedora} || 0%{?rhel} || 0%{?mageia}
%{_bindir}/rhn_register
%endif
%{_sbindir}/rhn_register
%{_sbindir}/rhnreg_ks
%{_sbindir}/spacewalk-channel
%{_sbindir}/rhn-channel
%{_datadir}/setuptool/setuptool.d/99rhn_register
%if 0%{?suse_version}
# on SUSE directories not owned by any package
%dir %{_sysconfdir}/security/console.apps
%dir %{_datadir}/setuptool
%dir %{_datadir}/setuptool/setuptool.d
%endif
%if 0%{?build_py2}
%files -n python2-rhn-setup
%{_sbindir}/rhn_register-%{python2_version}
%{_sbindir}/rhnreg_ks-%{python2_version}
%{_sbindir}/spacewalk-channel-%{python2_version}
%{python2_sitelib}/up2date_client/rhnreg.*
%{python2_sitelib}/up2date_client/pmPlugin.*
%{python2_sitelib}/up2date_client/tui.*
%{python2_sitelib}/up2date_client/rhnreg_constants.*
%endif
%if 0%{?build_py3}
%files -n python3-rhn-setup
%{_sbindir}/rhn_register-%{python3_version}
%{_sbindir}/rhnreg_ks-%{python3_version}
%{_sbindir}/spacewalk-channel-%{python3_version}
%{python3_sitelib}/up2date_client/rhnreg.*
%{python3_sitelib}/up2date_client/pmPlugin.*
%{python3_sitelib}/up2date_client/tui.*
%{python3_sitelib}/up2date_client/rhnreg_constants.*
%if %{_vendor} != "debbuild"
%{python3_sitelib}/up2date_client/__pycache__/rhnreg.*
%{python3_sitelib}/up2date_client/__pycache__/pmPlugin.*
%{python3_sitelib}/up2date_client/__pycache__/tui.*
%{python3_sitelib}/up2date_client/__pycache__/rhnreg_constants.*
%endif
%endif
%files -n rhn-setup-gnome
%{_datadir}/pixmaps/*png
%{_datadir}/icons/hicolor/16x16/apps/up2date.png
%{_datadir}/icons/hicolor/24x24/apps/up2date.png
%{_datadir}/icons/hicolor/32x32/apps/up2date.png
%{_datadir}/icons/hicolor/48x48/apps/up2date.png
%if 0%{?rhel} > 6 || 0%{?fedora}
%{_datadir}/icons/hicolor/22x22/apps/up2date.png
%{_datadir}/icons/hicolor/256x256/apps/up2date.png
%endif
/usr/share/metainfo/rhn_register.appdata.xml
%{_datadir}/applications/rhn_register.desktop
%{_datadir}/rhn/up2date_client/gui.glade
%{_datadir}/rhn/up2date_client/progress.glade
%{_datadir}/rhn/up2date_client/rh_register.glade
%if 0%{?suse_version}
# on SUSE these directories are part of packages not installed
# at buildtime. OBS failed with not owned by any package
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/16x16
%dir %{_datadir}/icons/hicolor/16x16/apps
%dir %{_datadir}/icons/hicolor/24x24
%dir %{_datadir}/icons/hicolor/24x24/apps
%dir %{_datadir}/icons/hicolor/32x32
%dir %{_datadir}/icons/hicolor/32x32/apps
%dir %{_datadir}/icons/hicolor/48x48
%dir %{_datadir}/icons/hicolor/48x48/apps
%dir %{_datadir}/rhn/up2date_client
%endif
%if 0%{?build_py2}
%files -n python2-rhn-setup-gnome
%{python2_sitelib}/up2date_client/messageWindow.*
%{python2_sitelib}/up2date_client/rhnregGui.*
%{python2_sitelib}/up2date_client/gtk_compat.*
%{python2_sitelib}/up2date_client/gui.*
%{python2_sitelib}/up2date_client/progress.*
%if 0%{?rhel} == 6
%{_datadir}/firstboot/modules/rhn_register.*
%{python2_sitelib}/up2date_client/firstboot/rhn_login_gui.*
%{python2_sitelib}/up2date_client/firstboot/rhn_start_gui.*
%{python2_sitelib}/up2date_client/firstboot/rhn_choose_server_gui.*
%{python2_sitelib}/up2date_client/firstboot/rhn_choose_channel.*
%{python2_sitelib}/up2date_client/firstboot/rhn_provide_certificate_gui.*
%{python2_sitelib}/up2date_client/firstboot/rhn_create_profile_gui.*
%{python2_sitelib}/up2date_client/firstboot/rhn_review_gui.*
%{python2_sitelib}/up2date_client/firstboot/rhn_finish_gui.*
%endif
%endif
%if 0%{?build_py3}
%files -n python3-rhn-setup-gnome
%{python3_sitelib}/up2date_client/messageWindow.*
%{python3_sitelib}/up2date_client/rhnregGui.*
%{python3_sitelib}/up2date_client/gtk_compat.*
%{python3_sitelib}/up2date_client/gui.*
%{python3_sitelib}/up2date_client/progress.*
%if %{_vendor} != "debbuild"
%{python3_sitelib}/up2date_client/__pycache__/messageWindow.*
%{python3_sitelib}/up2date_client/__pycache__/rhnregGui.*
%{python3_sitelib}/up2date_client/__pycache__/gtk_compat.*
%{python3_sitelib}/up2date_client/__pycache__/gui.*
%{python3_sitelib}/up2date_client/__pycache__/progress.*
%endif
%endif
%if %{_vendor} == "debbuild"
%if 0%{?build_py2}
%post -n python2-%{name}
# Do late-stage bytecompilation, per debian policy
pycompile -p python2-%{name} -V -3.0
%preun -n python2-%{name}
# Ensure all *.py[co] files are deleted, per debian policy
pyclean -p python2-%{name}
%post -n python2-rhn-check
# Do late-stage bytecompilation, per debian policy
pycompile -p python2-rhn-check -V -3.0
%preun -n python2-rhn-check
# Ensure all *.py[co] files are deleted, per debian policy
pyclean -p python2-rhn-check
%post -n python2-rhn-setup
# Do late-stage bytecompilation, per debian policy
pycompile -p python2-rhn-setup -V -3.0
%preun -n python2-rhn-setup
# Ensure all *.py[co] files are deleted, per debian policy
pyclean -p python2-rhn-setup
%post -n python2-rhn-setup-gnome
# Do late-stage bytecompilation, per debian policy
pycompile -p python2-rhn-setup-gnome -V -3.0
%preun -n python2-rhn-setup-gnome
# Ensure all *.py[co] files are deleted, per debian policy
pyclean -p python2-rhn-setup-gnome
%endif
%if 0%{?build_py3}
%post -n python3-%{name}
# Do late-stage bytecompilation, per debian policy
py3compile -p python3-%{name} -V -4.0
%preun -n python3-%{name}
# Ensure all *.py[co] files are deleted, per debian policy
py3clean -p python3-%{name}
%post -n python3-rhn-check
# Do late-stage bytecompilation, per debian policy
py3compile -p python3-rhn-check -V -4.0
%preun -n python3-rhn-check
# Ensure all *.py[co] files are deleted, per debian policy
py3clean -p python3-rhn-check
%post -n python3-rhn-setup
# Do late-stage bytecompilation, per debian policy
py3compile -p python3-rhn-setup -V -4.0
%preun -n python3-rhn-setup
# Ensure all *.py[co] files are deleted, per debian policy
py3clean -p python3-rhn-setup
%post -n python3-rhn-setup-gnome
# Do late-stage bytecompilation, per debian policy
py3compile -p python3-rhn-setup-gnome -V -4.0
%preun -n python3-rhn-setup-gnome
# Ensure all *.py[co] files are deleted, per debian policy
py3clean -p python3-rhn-setup-gnome
%endif
%endif
%changelog
* Wed Dec 19 2018 Michael Mraka <michael.mraka@redhat.com> 2.10.3-1
- xml.dom is not in python2-libs on opensuse
* Wed Dec 19 2018 Michael Mraka <michael.mraka@redhat.com> 2.10.2-1
- still needs python2 for rhn_register gui in build
* Wed Dec 19 2018 Michael Mraka <michael.mraka@redhat.com> 2.10.1-1
- 1627438 - don't build python2 packages on new Fedoras
* Fri Nov 23 2018 Michael Mraka <michael.mraka@redhat.com> 2.9.33-1
- updated copyright years
- Regenerating .po and .pot files for rhn-client-tools
- Updating .po translations from Zanata