This repository has been archived by the owner on Nov 26, 2024. It is now read-only.
forked from candlepin/subscription-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
subscription-manager.spec
4514 lines (4199 loc) · 224 KB
/
subscription-manager.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
# Prefer systemd over sysv on Fedora and RHEL 7+
%global use_systemd 0%{?fedora} || (0%{?rhel} && 0%{?rhel} >= 7) || (0%{?suse_version} && 0%{?suse_version} >= 1315)
# For optional building of ostree-plugin sub package. Unrelated to systemd
# but the same versions apply at the moment.
%global has_ostree %use_systemd && 0%{?suse_version} == 0
%global use_initial_setup 1
%global use_firstboot 0
%global use_kitchen 1
%global use_inotify 1
# borrowed from dnf spec file & tweaked
%if (0%{?rhel} && 0%{?rhel} <= 7) || 0%{?suse_version}
%bcond_with python3
%else
%bcond_without python3
%endif
%global rhsm_plugins_dir /usr/share/rhsm-plugins
# on recent Fedora and RHEL 7, let's not use m2crypto
%global use_m2crypto (0%{?fedora} < 23 && 0%{?rhel} < 7)
%if %{use_systemd}
# Note that %gtk3 will be undefined if it's not used
%global gtk3 1
%endif
%if 0%{?rhel} == 6 || 0%{?suse_version}
%global use_initial_setup 0
%global use_firstboot 1
%global use_kitchen 0
%global use_inotify 0
%endif
%global use_dnf %{with python3} && (0%{?fedora} || (0%{?rhel}))
%global use_yum (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?suse_version})
%global use_cockpit 0%{?fedora} || 0%{?rhel} >= 7
%if %{with python3}
%global python_sitearch %python3_sitearch
%global __python %__python3
%global py_package_prefix python%{python3_pkgversion}
%global rhsm_package_name %{py_package_prefix}-subscription-manager-rhsm
%else
%global py_package_prefix python
%global rhsm_package_name subscription-manager-rhsm
%endif
%global _hardened_build 1
%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro -Wl,-z,now}
%if %{has_ostree}
%define install_ostree INSTALL_OSTREE_PLUGIN=true
%else
%define install_ostree INSTALL_OSTREE_PLUGIN=false
%endif
# makefile will guess, but be specific.
%if 0%{?gtk3}
%define gtk_version GTK_VERSION=3
%else
%define gtk_version GTK_VERSION=2
%endif
%if %{use_initial_setup}
%define post_boot_tool INSTALL_INITIAL_SETUP=true INSTALL_FIRSTBOOT=false
%else
%define post_boot_tool INSTALL_INITIAL_SETUP=false INSTALL_FIRSTBOOT=true
%endif
%if 0%{?suse_version}
%define install_zypper_plugins INSTALL_ZYPPER_PLUGINS=true
%else
%define install_zypper_plugins INSTALL_ZYPPER_PLUGINS=false
%endif
# makefile defaults to INSTALL_DNF_PLUGIN=false
%if %{use_dnf}
%define install_dnf_plugins INSTALL_DNF_PLUGINS=true
%else
%define install_dnf_plugins INSTALL_DNF_PLUGINS=false
%endif
# makefile defaults to INSTALL_DNF_PLUGIN=true
%if %{use_yum}
%define install_yum_plugins INSTALL_YUM_PLUGINS=true
%else
%define install_yum_plugins INSTALL_YUM_PLUGINS=false
%endif
%if %{use_systemd}
%define with_systemd WITH_SYSTEMD=true
%else
%define with_systemd WITH_SYSTEMD=false
%endif
Name: subscription-manager
Version: 1.21.2
Release: 3%{?dist}
Summary: Tools and libraries for subscription and repository management
Group: System Environment/Base
License: GPLv2
URL: http://www.candlepinproject.org/
# How to create the source tarball:
#
# git clone https://github.com/candlepin/subscription-manager.git
# yum install tito
# tito build --tag subscription-manager-$VERSION-$RELEASE --tgz
Source0: %{name}-%{version}.tar.gz
# this is a little different from the Source0, because of limitations in tito,
# namely that tito expects only one source tarball
Source1: %{name}-cockpit-%{version}.tar.gz
%if 0%{?suse_version}
Source2: subscription-manager-rpmlintrc
%endif
# A note about the %{?foo:bar} %{!?foo:quux} convention. The %{?foo:bar}
# syntax evaluates foo and if it is **defined**, it expands to "bar" otherwise it
# expands to nothing. The %{!?foo:quux} syntax similarily only the expansion
# occurs when foo is **undefined**. Since one and only one of the expressions will
# expand we can more concisely handle when a dependency has different names in
# SUSE versus RHEL. The traditional if syntax gets extremely confusing when
# nesting is required since RPM requires the various preamble directives to be
# at the start of a line making meaningful indentation impossible.
Requires: %{py_package_prefix}-ethtool
Requires: %{py_package_prefix}-iniparse
Requires: %{py_package_prefix}-decorator
Requires: virt-what
Requires: %{rhsm_package_name} = %{version}
Requires: %{py_package_prefix}-six
Requires: %{py_package_prefix}-dateutil
Requires: %{py_package_prefix}-setuptools
%if %{with python3}
Requires: python3-dbus
%else
Requires: %{?suse_version:dbus-1-python} %{!?suse_version:dbus-python}
%endif
%if %{use_yum}
Requires: %{?suse_version:yum} %{!?suse_version:yum >= 3.2.29-73}
%endif
%if %{use_kitchen}
Requires: %{py_package_prefix}-kitchen
%endif
# Support GTK2 and GTK3 on both SUSE and RHEL...
%if 0%{?suse_version}
Requires: %{?gtk3:python-gobject} %{!?gtk3:python-gobject2, libzypp, zypp-plugin-python, python-zypp}
%else
Requires: usermode
%if %{with python3}
Requires: python3-gobject
%else
Requires: %{?gtk3:gobject-introspection, pygobject3-base} %{!?gtk3:pygobject2}
%endif
# There's no dmi to read on these arches, so don't pull in this dep.
# Additionally, dmidecode isn't packaged at all on SUSE
%ifnarch ppc ppc64 s390 s390x
Requires: %{py_package_prefix}-dmidecode
%endif
%endif
%if %use_inotify
Requires: %{py_package_prefix}-inotify
%endif
%if %use_systemd
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%else
Requires: %{?suse_version:aaa_base} %{!?suse_version:chkconfig}
Requires(post): %{?suse_version:aaa_base} %{!?suse_version:chkconfig}
Requires(preun): %{?suse_version:aaa_base} %{!?suse_version:chkconfig, initscripts}
%endif
BuildRequires: %{?suse_version:python-devel >= 2.6} %{!?suse_version:%{py_package_prefix}-devel}
BuildRequires: openssl-devel
BuildRequires: gcc
BuildRequires: %{py_package_prefix}-setuptools
BuildRequires: gettext
BuildRequires: intltool
BuildRequires: libnotify-devel
BuildRequires: desktop-file-utils
BuildRequires: %{py_package_prefix}-six
BuildRequires: %{?suse_version:dbus-1-glib-devel} %{!?suse_version:dbus-glib-devel}
BuildRequires: %{?suse_version:lsb-release, distribution-release} %{!?suse_version:redhat-lsb}
BuildRequires: %{?suse_version:gconf2-devel} %{!?suse_version:GConf2-devel}
BuildRequires: %{?suse_version:update-desktop-files} %{!?suse_version:scrollkeeper}
BuildRequires: %{?gtk3:gtk3-devel} %{!?gtk3:gtk2-devel}
%if 0%{?suse_version}
BuildRequires: libzypp
%endif
%if 0%{?suse_version} >= 1210
BuildRequires: systemd-rpm-macros
%endif
%if %use_systemd
# We need the systemd RPM macros
BuildRequires: systemd
%endif
%description
The Subscription Manager package provides programs and libraries to allow users
to manage subscriptions and yum repositories from the Red Hat entitlement
platform.
%package -n subscription-manager-plugin-container
Summary: A plugin for handling container content
Group: System Environment/Base
Requires: %{name} = %{version}-%{release}
%description -n subscription-manager-plugin-container
Enables handling of content of type 'containerImage' in any certificates
from the server. Populates /etc/docker/certs.d appropriately.
%package -n subscription-manager-gui
Summary: A GUI interface to manage Red Hat product subscriptions
Group: System Environment/Base
Requires: %{name} = %{version}-%{release}
# We need pygtk3 and gtk2 until rhsm-icon is ported to gtk3
Requires: %{?gtk3:pygobject3, gtk3} %{!?gtk3:pygtk2, pygtk2-libglade}
Requires: usermode-gtk
Requires: gnome-icon-theme
%if 0%{?gtk3}
Requires: font(cantarell)
%else
Requires: %{?suse_version:dejavu} %{!?suse_version:dejavu-sans-fonts}
%endif
%if !0%{?suse_version}
Requires(post): scrollkeeper
Requires(postun): scrollkeeper
%endif
# Renamed from -gnome, so obsolete it properly
Obsoletes: %{name}-gnome < 1.0.3-1
Provides: %{name}-gnome = %{version}-%{release}
# Fedora can figure this out automatically, but RHEL cannot:
# See #987071
Requires: librsvg2%{?_isa}
%description -n subscription-manager-gui
This package contains a GTK+ graphical interface for configuring and
registering a system with a Red Hat Entitlement platform and manage
subscriptions.
%package -n subscription-manager-migration
Summary: Migration scripts for moving to certificate based subscriptions
Group: System Environment/Base
Requires: %{name} = %{version}-%{release}
Requires: rhnlib
# Since the migration data package is not in Fedora, we can only require it
# on RHEL.
%if 0%{?rhel}
Requires: subscription-manager-migration-data
%endif
%description -n subscription-manager-migration
This package contains scripts that aid in moving to certificate based
subscriptions
%if %use_dnf
%package -n dnf-plugin-subscription-manager
Summary: Subscription Manager plugins for DNF
Group: System Environment/Base
Requires: %{name} = %{version}-%{release}
Requires: dnf >= 1.0.0
%if %{with python3}
Requires: python3-dnf-plugins-core
%else
Requires: python2-dnf-plugins-core
%endif
%description -n dnf-plugin-subscription-manager
This package provides plugins to interact with repositories and subscriptions
from the Red Hat entitlement platform; contains subscription-manager and
product-id plugins.
%endif
%if %use_firstboot
%package -n subscription-manager-firstboot
Summary: Firstboot screens for subscription manager
Group: System Environment/Base
Requires: %{name}-gui = %{version}-%{release}
Requires: rhn-setup-gnome
# Fedora can figure this out automatically, but RHEL cannot:
Requires: librsvg2
%description -n subscription-manager-firstboot
This package contains the firstboot screens for subscription-manager.
%endif
%if %use_initial_setup
%package -n subscription-manager-initial-setup-addon
Summary: initial-setup screens for subscription-manager
Group: System Environment/Base
Requires: %{name}-gui = %{version}-%{release}
Requires: initial-setup-gui >= 0.3.9.24-1
Obsoletes: subscription-manager-firstboot < 1.15.3-1
%description -n subscription-manager-initial-setup-addon
This package contains the initial-setup screens for subscription-manager.
%endif
%if %has_ostree
%package -n subscription-manager-plugin-ostree
Summary: A plugin for handling OSTree content.
Group: System Environment/Base
Requires: pygobject3-base
# plugin needs a slightly newer version of python-iniparse for 'tidy'
Requires: %{py_package_prefix}-iniparse >= 0.4
Requires: %{name} = %{version}-%{release}
%description -n subscription-manager-plugin-ostree
Enables handling of content of type 'ostree' in any certificates
from the server. Populates /ostree/repo/config as well as updates
the remote in the currently deployed .origin file.
%endif
%package -n %{rhsm_package_name}
Summary: A Python library to communicate with a Red Hat Unified Entitlement Platform
Group: Development/Libraries
%if %use_m2crypto
Requires: %{?suse_version:python-m2crypto} %{!?suse_version:m2crypto}
%endif
Requires: %{py_package_prefix}-dateutil
Requires: %{py_package_prefix}-iniparse
# rpm-python is an old name for python2-rpm but RHEL6 uses the old name
Requires: %{py_package_prefix}-six
Requires: subscription-manager-rhsm-certificates = %{version}-%{release}
# Required by Fedora packaging guidelines
%{?python_provide:%python_provide %{py_package_prefix}-rhsm}
%if %{with python3}
Requires: python3-rpm
Provides: python3-rhsm = %{version}-%{release}
Obsoletes: python3-rhsm <= 1.20.3-1
%else
Requires: rpm-python
Provides: python-rhsm = %{version}-%{release}
Obsoletes: python-rhsm <= 1.20.3-1
%endif
%description -n %{rhsm_package_name}
A small library for communicating with the REST interface of a Red Hat Unified
Entitlement Platform. This interface is used for the management of system
entitlements, certificates, and access to content.
%package -n subscription-manager-rhsm-certificates
Summary: Certificates required to communicate with a Red Hat Unified Entitlement Platform
Group: Development/Libraries
Provides: python-rhsm-certificates = %{version}-%{release}
Obsoletes: python-rhsm-certificates <= 1.20.3-1
%description -n subscription-manager-rhsm-certificates
This package contains certificates required for communicating with the REST interface
of a Red Hat Unified Entitlement Platform, used for the management of system entitlements
and to receive access to content.
%if %use_cockpit
%package -n subscription-manager-cockpit
Summary: Subscription Manager Cockpit UI
License: LGPLv2.1+
BuildArch: noarch
Requires: subscription-manager
Requires: cockpit-bridge
Requires: cockpit-shell
%description -n subscription-manager-cockpit
Subscription Manager Cockpit UI
%endif
%prep
%setup -q
%build
make -f Makefile VERSION=%{version}-%{release} CFLAGS="%{optflags}" \
LDFLAGS="%{__global_ldflags}" OS_DIST="%{dist}" PYTHON="%{__python}" %{?gtk_version}
%install
rm -rf %{buildroot}
make -f Makefile install VERSION=%{version}-%{release} \
PYTHON=%{__python} PREFIX=%{_prefix} \
DESTDIR=%{buildroot} PYTHON_SITELIB=%{python_sitearch} \
OS_VERSION=%{?fedora}%{?rhel}%{?suse_version} OS_DIST=%{dist} \
%{?install_ostree} %{?post_boot_tool} %{?gtk_version} \
%{?install_yum_plugins} %{?install_dnf_plugins} \
%{?install_zypper_plugins} \
%{?with_systemd}
%if 0%{?suse_version}
%suse_update_desktop_file -n -r subscription-manager-gui Settings PackageManager
%endif
desktop-file-validate %{buildroot}/etc/xdg/autostart/rhsm-icon.desktop
desktop-file-validate %{buildroot}/usr/share/applications/subscription-manager-gui.desktop
%find_lang rhsm
%find_lang %{name} --with-gnome
# fix timestamps on our byte compiled files so they match across arches
find %{buildroot} -name \*.py -exec touch -r %{SOURCE0} '{}' \;
# fake out the redhat.repo file
%if %{use_yum} || %{use_dnf}
%{__mkdir} %{buildroot}%{_sysconfdir}/yum.repos.d
touch %{buildroot}%{_sysconfdir}/yum.repos.d/redhat.repo
%endif
# fake out the certificate directories
%{__mkdir_p} %{buildroot}%{_sysconfdir}/pki/consumer
%{__mkdir_p} %{buildroot}%{_sysconfdir}/pki/entitlement
# Setup cert directories for the container plugin:
%{__mkdir_p} %{buildroot}%{_sysconfdir}/docker/certs.d/
%{__mkdir} %{buildroot}%{_sysconfdir}/docker/certs.d/cdn.redhat.com
install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/redhat-entitlement-authority.pem %{buildroot}%{_sysconfdir}/docker/certs.d/cdn.redhat.com/redhat-entitlement-authority.crt
%{__mkdir_p} %{buildroot}%{_sysconfdir}/etc/rhsm/ca
install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/redhat-entitlement-authority.pem %{buildroot}/%{_sysconfdir}/rhsm/ca/redhat-entitlement-authority.pem
install -m 644 %{_builddir}/%{buildsubdir}/etc-conf/ca/redhat-uep.pem %{buildroot}/%{_sysconfdir}/rhsm/ca/redhat-uep.pem
%if %use_cockpit
# install cockpit dist targz
tar --strip-components=1 -xzf %{SOURCE1} -C %{buildroot}
%endif
# base/cli tools use the gettext domain 'rhsm', while the
# gnome-help tools use domain 'subscription-manager'
%files -f rhsm.lang
%defattr(-,root,root,-)
%if 0%{?suse_version}
%dir %{_sysconfdir}/pki
%if %{use_yum}
%dir %{_sysconfdir}/yum
%dir %{_sysconfdir}/yum/pluginconf.d
%dir %{_prefix}/lib/yum-plugins/
%endif
%if %{use_yum} || %{use_dnf}
%dir %{_sysconfdir}/yum.repos.d
%endif
%dir %{python_sitearch}/rhsmlib/candlepin
%dir %{python_sitearch}/rhsmlib/compat
%dir %{python_sitearch}/rhsmlib/dbus
%dir %{python_sitearch}/rhsmlib/dbus/facts
%dir %{python_sitearch}/rhsmlib/dbus/objects
%dir %{python_sitearch}/rhsmlib/facts
%dir %{python_sitearch}/rhsmlib/services
%dir %{python_sitearch}/subscription_manager-%{version}-*.egg-info
%dir %{python_sitearch}/subscription_manager/api
%dir %{python_sitearch}/subscription_manager/branding
%dir %{python_sitearch}/subscription_manager/model
%dir %{python_sitearch}/subscription_manager/plugin
%dir %{python_sitearch}/subscription_manager/scripts
%dir %{_var}/spool/rhsm
%dir %{_prefix}/share/polkit-1
%dir %{_prefix}/share/polkit-1/actions
%endif
%if 0%{?suse_version} && 0%{?suse_version} < 1315
%dir %{_prefix}/share/locale/ta_IN
%dir %{_prefix}/share/locale/ta_IN/LC_MESSAGES
%endif
%attr(755,root,root) %{_sbindir}/subscription-manager
# symlink to console-helper
%if !0%{?suse_version}
%{_bindir}/subscription-manager
%endif
%attr(755,root,root) %{_bindir}/rhsmcertd
%attr(755,root,root) %{_libexecdir}/rhsmcertd-worker
%attr(755,root,root) %{_libexecdir}/rhsmd
# our config dirs and files
%attr(755,root,root) %dir %{_sysconfdir}/pki/consumer
%attr(755,root,root) %dir %{_sysconfdir}/pki/entitlement
%attr(755,root,root) %dir %{_sysconfdir}/rhsm
%attr(755,root,root) %dir %{_sysconfdir}/rhsm/facts
%if 0%{?suse_version}
%attr(755,root,root) %dir %{_sysconfdir}/rhsm/zypper.repos.d
%endif
%attr(644,root,root) %config(noreplace) %{_sysconfdir}/rhsm/rhsm.conf
%config %attr(644,root,root) %{_sysconfdir}/rhsm/logging.conf
# PAM config
%if !0%{?suse_version}
%{_sysconfdir}/pam.d/subscription-manager
%{_sysconfdir}/security/console.apps/subscription-manager
%endif
%if %{use_yum} || %{use_dnf}
%ghost %{_sysconfdir}/yum.repos.d/redhat.repo
%endif
# yum plugin config
%if %{use_yum}
# remove the repo file when we are deleted
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/yum/pluginconf.d/subscription-manager.conf
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/yum/pluginconf.d/product-id.conf
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/yum/pluginconf.d/search-disabled-repos.conf
%endif
# misc system config
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/logrotate.d/subscription-manager
%attr(700,root,root) %{_sysconfdir}/cron.daily/rhsmd
%attr(755,root,root) %dir %{_var}/log/rhsm
%attr(755,root,root) %dir %{_var}/spool/rhsm/debug
%attr(755,root,root) %dir %{_var}/run/rhsm
%attr(750,root,root) %dir %{_var}/lib/rhsm
%attr(750,root,root) %dir %{_var}/lib/rhsm/facts
%attr(750,root,root) %dir %{_var}/lib/rhsm/packages
%attr(750,root,root) %dir %{_var}/lib/rhsm/cache
%attr(750,root,root) %dir %{_var}/lib/rhsm/repo_server_val
%{_sysconfdir}/bash_completion.d/subscription-manager
%{_sysconfdir}/bash_completion.d/rct
%{_sysconfdir}/bash_completion.d/rhsm-debug
%{_sysconfdir}/bash_completion.d/rhn-migrate-classic-to-rhsm
%{_sysconfdir}/bash_completion.d/rhsm-icon
%{_sysconfdir}/bash_completion.d/rhsmcertd
%dir %{python_sitearch}/subscription_manager
# code, python modules and packages
%{python_sitearch}/subscription_manager-*.egg-info/*
%{python_sitearch}/subscription_manager/*.py*
%{python_sitearch}/subscription_manager/api/*.py*
%{python_sitearch}/subscription_manager/branding/*.py*
%{python_sitearch}/subscription_manager/model/*.py*
%{python_sitearch}/subscription_manager/plugin/__init__.py*
%{python_sitearch}/subscription_manager/scripts/*.py*
%if %{with python3}
%{python_sitearch}/subscription_manager/__pycache__
%{python_sitearch}/subscription_manager/api/__pycache__
%{python_sitearch}/subscription_manager/branding/__pycache__
%{python_sitearch}/subscription_manager/model/__pycache__
%{python_sitearch}/subscription_manager/plugin/__pycache__
%{python_sitearch}/subscription_manager/scripts/__pycache__
%endif
# our gtk2/gtk3 compat modules
%dir %{python_sitearch}/subscription_manager/ga_impls
%{python_sitearch}/subscription_manager/ga_impls/__init__.py*
%if %{with python3}
%{python_sitearch}/subscription_manager/ga_impls/__pycache__
%endif
%if 0%{?gtk3}
%{python_sitearch}/subscription_manager/ga_impls/ga_gtk3.py*
%else
%dir %{python_sitearch}/subscription_manager/ga_impls/ga_gtk2
%{python_sitearch}/subscription_manager/ga_impls/ga_gtk2/*.py*
%endif
# subscription-manager plugins
%dir %{rhsm_plugins_dir}
%dir %{_sysconfdir}/rhsm/pluginconf.d
# yum plugins
# Using _prefix + lib here instead of libdir as that evaluates to /usr/lib64 on x86_64,
# but yum plugins seem to normally be sent to /usr/lib/:
%if %{use_yum}
%{_prefix}/lib/yum-plugins/subscription-manager.py*
%{_prefix}/lib/yum-plugins/product-id.py*
%{_prefix}/lib/yum-plugins/search-disabled-repos.py*
%endif
# zypper plugins
%if 0%{?suse_version}
%{_prefix}/lib/zypp/plugins/services/subscription-manager
%{_prefix}/lib/zypp/plugins/commit/product-id
%endif
# rhsmlib
%dir %{python_sitearch}/rhsmlib
%{python_sitearch}/rhsmlib/*.py*
%{python_sitearch}/rhsmlib/candlepin/*.py*
%{python_sitearch}/rhsmlib/compat/*.py*
%{python_sitearch}/rhsmlib/facts/*.py*
%{python_sitearch}/rhsmlib/services/*.py*
%{python_sitearch}/rhsmlib/dbus/*.py*
%{python_sitearch}/rhsmlib/dbus/facts/*.py*
%{python_sitearch}/rhsmlib/dbus/objects/*.py*
%if %{with python3}
%{python_sitearch}/rhsmlib/__pycache__
%{python_sitearch}/rhsmlib/candlepin/__pycache__
%{python_sitearch}/rhsmlib/compat/__pycache__
%{python_sitearch}/rhsmlib/dbus/__pycache__
%{python_sitearch}/rhsmlib/dbus/facts/__pycache__
%{python_sitearch}/rhsmlib/dbus/objects/__pycache__
%{python_sitearch}/rhsmlib/facts/__pycache__
%{python_sitearch}/rhsmlib/services/__pycache__
%endif
%{_datadir}/polkit-1/actions/com.redhat.*.policy
%{_datadir}/dbus-1/system-services/com.redhat.*.service
%attr(755,root,root) %{_libexecdir}/rhsm*-service
# Despite the name similarity dbus-1/system.d has nothing to do with systemd
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/com.redhat.*.conf
%if %use_systemd
%attr(644,root,root) %{_unitdir}/*.service
%attr(644,root,root) %{_tmpfilesdir}/%{name}.conf
%else
%attr(755,root,root) %{_initrddir}/rhsmcertd
%endif
# Incude rt CLI tool
%dir %{python_sitearch}/rct
%{python_sitearch}/rct/*.py*
%if %{with python3}
%{python_sitearch}/rct/__pycache__
%endif
%attr(755,root,root) %{_bindir}/rct
# Include consumer debug CLI tool
%dir %{python_sitearch}/rhsm_debug
%{python_sitearch}/rhsm_debug/*.py*
%if %{with python3}
%{python_sitearch}/rhsm_debug/__pycache__
%endif
%attr(755,root,root) %{_bindir}/rhsm-debug
%doc
%{_mandir}/man8/subscription-manager.8*
%{_mandir}/man8/rhsmcertd.8*
%{_mandir}/man8/rct.8*
%{_mandir}/man8/rhsm-debug.8*
%{_mandir}/man5/rhsm.conf.5*
%doc LICENSE
%files -n subscription-manager-gui -f subscription-manager.lang
%defattr(-,root,root,-)
%attr(755,root,root) %{_sbindir}/subscription-manager-gui
%if 0%{?suse_version}
%dir %{python_sitearch}/subscription_manager/gui/data
%dir %{python_sitearch}/subscription_manager/gui/data/glade
%dir %{python_sitearch}/subscription_manager/gui/data/icons
%dir %{python_sitearch}/subscription_manager/gui/data/ui
%dir %{_datadir}/appdata
%dir %{_datadir}/gnome
%dir %{_datadir}/gnome/help
%dir %{_datadir}/omf
%else
# symlink to console-helper
%{_bindir}/subscription-manager-gui
%endif
%{_bindir}/rhsm-icon
%dir %{python_sitearch}/subscription_manager/gui
%{python_sitearch}/subscription_manager/gui/*.py*
%{python_sitearch}/subscription_manager/gui/data/ui/*.ui
%{python_sitearch}/subscription_manager/gui/data/glade/*.glade
%{python_sitearch}/subscription_manager/gui/data/icons/*.svg
%if %{with python3}
%{python_sitearch}/subscription_manager/gui/__pycache__
%endif
%{_datadir}/applications/subscription-manager-gui.desktop
%{_datadir}/icons/hicolor/16x16/apps/*.png
%{_datadir}/icons/hicolor/22x22/apps/*.png
%{_datadir}/icons/hicolor/24x24/apps/*.png
%{_datadir}/icons/hicolor/32x32/apps/*.png
%{_datadir}/icons/hicolor/48x48/apps/*.png
%{_datadir}/icons/hicolor/96x96/apps/*.png
%{_datadir}/icons/hicolor/256x256/apps/*.png
%{_datadir}/icons/hicolor/scalable/apps/*.svg
%{_datadir}/appdata/subscription-manager-gui.appdata.xml
# gui system config files
%{_sysconfdir}/xdg/autostart/rhsm-icon.desktop
%if !0%{?suse_version}
%{_sysconfdir}/pam.d/subscription-manager-gui
%{_sysconfdir}/security/console.apps/subscription-manager-gui
%endif
%{_sysconfdir}/bash_completion.d/subscription-manager-gui
%doc
%{_mandir}/man8/subscription-manager-gui.8*
%{_mandir}/man8/rhsm-icon.8*
%doc LICENSE
%files -n subscription-manager-migration
%defattr(-,root,root,-)
%dir %{python_sitearch}/subscription_manager/migrate
%{python_sitearch}/subscription_manager/migrate/*.py*
%if %{with python3}
%{python_sitearch}/subscription_manager/migrate/__pycache__
%endif
%attr(755,root,root) %{_sbindir}/rhn-migrate-classic-to-rhsm
%doc
%{_mandir}/man8/rhn-migrate-classic-to-rhsm.8*
%doc LICENSE
%if 0%{?fedora}
%doc README.Fedora
%endif
%files -n subscription-manager-plugin-container
%defattr(-,root,root,-)
%if 0%{?suse_version}
%dir %{_sysconfdir}/docker
%dir %{_sysconfdir}/docker/certs.d
%dir %{_sysconfdir}/rhsm/ca
%dir %{python_sitearch}/subscription_manager/plugin
%endif
%{_sysconfdir}/rhsm/pluginconf.d/container_content.ContainerContentPlugin.conf
%{rhsm_plugins_dir}/container_content.py*
%if %{with python3}
%{rhsm_plugins_dir}/__pycache__
%endif
%{python_sitearch}/subscription_manager/plugin/container.py*
# Copying Red Hat CA cert into each directory:
%attr(755,root,root) %dir %{_sysconfdir}/docker/certs.d/cdn.redhat.com
%attr(644,root,root) %{_sysconfdir}/rhsm/ca/redhat-entitlement-authority.pem
%attr(644,root,root) %{_sysconfdir}/docker/certs.d/cdn.redhat.com/redhat-entitlement-authority.crt
%if %has_ostree
%files -n subscription-manager-plugin-ostree
%defattr(-,root,root,-)
%{_sysconfdir}/rhsm/pluginconf.d/ostree_content.OstreeContentPlugin.conf
%{rhsm_plugins_dir}/ostree_content.py*
%{python_sitearch}/subscription_manager/plugin/ostree/*.py*
%if %{with python3}
%{python_sitearch}/subscription_manager/plugin/ostree/__pycache__
%endif
%endif
%if %use_initial_setup
%files -n subscription-manager-initial-setup-addon
%defattr(-,root,root,-)
%dir %{_datadir}/anaconda/addons/com_redhat_subscription_manager/
%{_datadir}/anaconda/addons/com_redhat_subscription_manager/*.py*
%{_datadir}/anaconda/addons/com_redhat_subscription_manager/gui/*.py*
%{_datadir}/anaconda/addons/com_redhat_subscription_manager/gui/spokes/*.ui
%{_datadir}/anaconda/addons/com_redhat_subscription_manager/gui/spokes/*.py*
%{_datadir}/anaconda/addons/com_redhat_subscription_manager/categories/*.py*
%{_datadir}/anaconda/addons/com_redhat_subscription_manager/ks/*.py*
%if %{with python3}
%{_datadir}/anaconda/addons/com_redhat_subscription_manager/__pycache__
%{_datadir}/anaconda/addons/com_redhat_subscription_manager/gui/__pycache__
%{_datadir}/anaconda/addons/com_redhat_subscription_manager/gui/spokes/__pycache__
%{_datadir}/anaconda/addons/com_redhat_subscription_manager/categories/__pycache__
%{_datadir}/anaconda/addons/com_redhat_subscription_manager/ks/__pycache__
%endif
%endif
%if %use_firstboot
%files -n subscription-manager-firstboot
%defattr(-,root,root,-)
%if 0%{?suse_version}
%dir %{_datadir}/rhn
%dir %{_datadir}/rhn/up2date_client
%dir %{_datadir}/rhn/up2date_client/firstboot
%endif
%{_datadir}/rhn/up2date_client/firstboot/rhsm_login.py*
%endif
%if %use_dnf
%files -n dnf-plugin-subscription-manager
%defattr(-,root,root,-)
%{python_sitearch}/dnf-plugins/*
%endif
%files -n %{rhsm_package_name}
%defattr(-,root,root,-)
%dir %{python_sitearch}/rhsm
%{python_sitearch}/rhsm/*
%files -n subscription-manager-rhsm-certificates
%attr(755,root,root) %dir %{_sysconfdir}/rhsm
%attr(755,root,root) %dir %{_sysconfdir}/rhsm/ca
%attr(644,root,root) %{_sysconfdir}/rhsm/ca/redhat-uep.pem
%if %use_cockpit
%files -n subscription-manager-cockpit
%defattr(-,root,root,-)
%dir %{_datadir}/cockpit/subscription-manager
%{_datadir}/cockpit/subscription-manager/index.html
%{_datadir}/cockpit/subscription-manager/index.min.js.gz
%{_datadir}/cockpit/subscription-manager/subscriptions.css
%{_datadir}/cockpit/subscription-manager/manifest.json
%{_datadir}/cockpit/subscription-manager/po.*.js
%{_datadir}/cockpit/subscription-manager/po.js
%{_datadir}/cockpit/subscription-manager/node_modules/*
%{_datadir}/metainfo/org.cockpit-project.subscription-manager.metainfo.xml
%endif
%post
%if %use_systemd
%if 0%{?suse_version}
%service_add_post rhsmcertd.service
%else
%systemd_post rhsmcertd.service
%endif
%else
%if 0%{?suse_version}
%fillup_and_insserv -f rhsmcertd
%else
chkconfig --add rhsmcertd
%endif
%endif
if [ -x /bin/dbus-send ] ; then
dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig > /dev/null 2>&1 || :
fi
%if !%use_systemd
if [ "$1" -eq "2" ] ; then
/sbin/service rhsmcertd condrestart >/dev/null 2>&1 || :
fi
%endif
%post -n subscription-manager-gui
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%if !0%{?suse_version}
scrollkeeper-update -q -o %{_datadir}/omf/%{name} || :
%endif
%post -n subscription-manager-plugin-container
%{__python} %{rhsm_plugins_dir}/container_content.py || :
%preun
if [ $1 -eq 0 ] ; then
%if %use_systemd
%systemd_preun rhsmcertd.service
%else
/sbin/service rhsmcertd stop >/dev/null 2>&1
/sbin/chkconfig --del rhsmcertd
%endif
if [ -x /bin/dbus-send ] ; then
dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig > /dev/null 2>&1 || :
fi
fi
%postun
%if %use_systemd
%if 0%{?suse_version}
%service_del_postun rhsmcertd.service
%else
%systemd_postun_with_restart rhsmcertd.service
%endif
%endif
%postun -n subscription-manager-gui
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%if !0%{?suse_version}
scrollkeeper-update -q || :
%endif
fi
%posttrans -n subscription-manager-gui
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
%changelog
* Tue Feb 27 2018 Alex Wood <[email protected]> 1.21.2-3
- Add missing dist macro to release
* Mon Feb 26 2018 Alex Wood <[email protected]> 1.21.2-2
- Remove %%clean section ([email protected])
- Remove BuildRoot definition ([email protected])
* Mon Feb 26 2018 Alex Wood <[email protected]> 1.21.2-1
- 1547354: Add missing requires for python-kitchen ([email protected])
- 1528625: Prevent dmidecode failure from returning None ([email protected])
- 1543639: Properly encode package profile data ([email protected])
- 1527396: Subman cockpit plugin - fix registration using act. keys
- 1535974: Close register dialog, when status is changed ([email protected])
- Add start date to available pool listing ([email protected])
- Condition requiring --after and --all is unnecessary ([email protected])
- 1510024: Handle rhel-alt product tags properly ([email protected])
- 1540204: Raise RateLimitExceededException with headers ([email protected])
- 1533905: Remove dependency on yum and chkconfig. ([email protected])
- 1479353: Add --after option to list command ([email protected])
- 1537473: Subman rpm requires python-setuptools ([email protected])
- 1525238: Do not protect rhel prod. cert with special case
- 1526622: Do not delete product certificates in protected directory
- 1519512: Handle non-UTF8 RPM vendors ([email protected])
- 1487600: Fix registration success detection ([email protected])
- 1527813: subman-gui use new URL of Online Documentation ([email protected])
- 1527392: Clear credential data in register dialog ([email protected])
- rct cat-manifest: show Web and API urls from consumer.json ([email protected])
- Use dnf on RHEL or Fedora w/ using Python 3 ([email protected])
- 1507030: RestlibExceptions should show they originate server-side
- Package for Python 3 on Fedora ([email protected])
* Fri Feb 09 2018 Fedora Release Engineering <[email protected]> - 1.21.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Jan 11 2018 Alex Wood <[email protected]> 1.21.1-1
- Do not enable gpgcheck if the only a metadata gpg key is configured
- 1448313: Do not log error, when rhsmcertd is restarted ([email protected])
- Support configuration of a repo metadata signing key ([email protected])
- Generate bin scripts via setuptools entry_points ([email protected])
- 1304056: Fix D-Bus path of com.redhat.RHSM1.Facts ([email protected])
- 1516439: Cockpit reports error during unregister when candlepin unavailable
- 1510727: Enable starting of subman GUI, when consumer has been deleted
* Mon Dec 11 2017 Kevin Howell <[email protected]> 1.20.8-1
- Sync zanata translations ([email protected])
- Add parameter to D-Bus API to pass locale for localization of errors
- 1463765: Fix wrong Indic-language translations ([email protected])
- 1487600: Cockpit - Save configuration from register dialog
- 1464571: Improve multiple product certs errors ([email protected])
- Replace cockpit-subscriptions ([email protected])
- 1507158: Provide Host: in http CONNECT header ([email protected])
- 1319927: Remove newline from auto enable message ([email protected])
* Tue Nov 28 2017 Kevin Howell <[email protected]> 1.20.7-1
- Sync zanata translations ([email protected])
* Tue Nov 28 2017 Kevin Howell <[email protected]> 1.20.6-1
- Sync zanata translations ([email protected])
- 1514067: Call virt-what using absolute path ([email protected])
- 1487688: Load config settings for cockpit plugin ([email protected])
- Added dependencies to cockpit-bridge and cockpit-shell. ([email protected])
- 1462456: Flush stdout and stderr on more places ([email protected])
- 1491842: fixed typo in man page. ([email protected])
- 1508591: Removed python-rhsm from subscription-manager version
- 1421010: Subman-GUI shows error dialog (wrong proxy settings)
- 1500106: subscription-manager status --ondate do not ignore date
- 1506970: Fixed default custom URL in cockpit plugin ([email protected])
* Thu Nov 02 2017 Kevin Howell <[email protected]> 1.20.5-1
- Sync zanata translations ([email protected])
- Cockpit - listing of installed products using patternfly-react
- 1508457: Bump versions in python-rhsm obsoletes ([email protected])
- Implement fallback for settimeout on old m2crypto ([email protected])
- Cockpit: reconcile translated strings ([email protected])
- Cockpit: use translations from root dir ([email protected])
* Mon Oct 30 2017 Kevin Howell <[email protected]> 1.20.4-1
- Fix cockpit tgz path in spec file ([email protected])
* Mon Oct 30 2017 Kevin Howell <[email protected]> 1.20.3-1
- Cockpit: Implement modal dialog ([email protected])
- Implement bootstrap-select component ([email protected])
- Port cockpit subscriptions-client to dbus ([email protected])
- Move python-rhsm build into subscription-manager ([email protected])
- 1354667: Add identity cert detection to proxy error message generation
- 1501889: Enable yum plugins after sub-man subcommand is executed