1 |
# $Id: smeserver-devtools.spec,v 1.7 2017/05/25 15:48:49 unnilennium Exp $ |
# $Id: smeserver-mock.spec,v 1.25 2023/05/04 05:54:26 terryfage Exp $ |
2 |
|
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') |
3 |
Summary: smeserver-mock tools for building RPMs |
Summary: smeserver-mock tools for building RPMs |
4 |
%define name e-smith-devtools |
%define name smeserver-mock |
5 |
Name: %{name} |
Name: %{name} |
6 |
%define version 1.0 |
%define version 1.0 |
7 |
%define release 1 |
%define release 21 |
8 |
Version: %{version} |
Version: %{version} |
9 |
Release: %{release}%{?dist} |
Release: %{release}%{?dist} |
10 |
License: GPL |
License: GPL |
11 |
Group: Networking/Daemons |
Group: Networking/Daemons |
12 |
Source: %{name}-%{version}.tgz |
Source: %{name}-%{version}.tgz |
13 |
|
Patch0: smeserver-mock-1.0-updates_values.patch |
14 |
|
Patch1: smeserver-mock-1.0-sme10599-spamassassin.patch |
15 |
|
Patch2: smeserver-mock-1.0-sme10600-video.patch |
16 |
|
Patch3: smeserver-mock-1.0-ocaml.patch |
17 |
|
Patch4: smeserver-mock-1.0-sme10946-mock.patch |
18 |
|
Patch5: smeserver-mock-1.0-sme10924-bins.patch |
19 |
|
Patch6: smeserver-mock-1.0-sme10993-kmodtool.patch |
20 |
|
Patch7: smeserver-mock-1.0-sme11005-mojo-jwt.patch |
21 |
|
Patch8: smeserver-mock-1.0-sme11203-spamassassin.patch |
22 |
|
Patch9: smeserver-mock-1.0-sme11005-mojo-jwt-2.patch |
23 |
|
Patch10: smeserver-mock-1.0-20220630.patch |
24 |
|
Patch11: smeserver-mock-1.0-change-log.patch |
25 |
|
Patch12: smeserver-mock-1.0-20230412.patch |
26 |
|
Patch13: smeserver-mock-1.0-bg12350-cvm.patch |
27 |
|
Patch14: smeserver-mock-1.0-add-pkgs-bz12350.patch |
28 |
|
Patch15: smeserver-mock-1.0-extra-pkgs-bz12350.patch |
29 |
|
|
30 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
31 |
BuildArchitectures: noarch |
BuildArchitectures: noarch |
32 |
Requires: e-smith-devtools |
Requires: e-smith-devtools |
33 |
Requires: mock |
Requires: mock |
|
Requires: python-ctypes |
|
34 |
Requires: glances |
Requires: glances |
35 |
Requires: make rpm-build rpm-sign wget |
Requires: make rpm-build rpm-sign wget |
36 |
Requires: cmake automake libtool |
Requires: cmake automake libtool |
37 |
Buildrequires: e-smith-devtools |
Buildrequires: e-smith-devtools |
38 |
# needed for scl |
# needed for scl |
39 |
Requires: scl-utils scl-utils-build centos-release-scl centos-release-scl-rh |
#Requires: scl-utils scl-utils-build centos-release-scl centos-release-scl-rh |
40 |
|
#Requires: python27-build |
41 |
AutoReqProv: no |
AutoReqProv: no |
42 |
|
|
43 |
%changelog |
%changelog |
44 |
|
* Mon Jun 05 2023 TerryFage <terry.fage@gmail.com> 1.0-21.sme |
45 |
|
- add to mock*.cfg facilitate build with external packages [SME: 12350] |
46 |
|
- attribute solutions Trevor Batley, Terry Fage |
47 |
|
|
48 |
|
* Thu May 04 2023 TerryFage <terry.fage@gmail.com> 1.0-20.sme |
49 |
|
- add to mock*.cfg facilitate build with external packages [SME: 12350] |
50 |
|
- attribute solutions Trevor Batley, Terry Fage |
51 |
|
|
52 |
|
* Sun Apr 30 2023 TerryFage <terry.fage@gmail.com> 1.0-19.sme |
53 |
|
- add package to mock*.cfg facilitate cvm build [SME: 12350] |
54 |
|
- attribute solution to Trevor batley |
55 |
|
|
56 |
|
* Thu Apr 13 2023 Jean-Philippe Pialasse <tests@pialasse.com> 1.0-18.sme |
57 |
|
- fixpost scriptled not working [SME: 12349] |
58 |
|
- add smeos and smeupdates in mock file |
59 |
|
|
60 |
|
* Wed Apr 12 2023 Jean-Philippe Pialasse <tests@pialasse.com> 1.0-17.sme |
61 |
|
- fix change-log [SME: 12340] |
62 |
|
- update smeserver 10 base mockfile |
63 |
|
- perl.prov workaround in mock file |
64 |
|
|
65 |
|
* Fri Nov 18 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.0-16.sme |
66 |
|
- fix change-log not handling tab for version or release |
67 |
|
|
68 |
|
* Thu Jun 30 2022 Jean-Philippe Pialasse <tests@pialasse.com> 1.0-15.sme |
69 |
|
- update sme10 mock files [SME: 12089] |
70 |
|
- remove python scl dependencies blocks a lot from using the rpm |
71 |
|
almost never needed [SME: 12090] |
72 |
|
- cleaning remove sme8 and sme9 mock files |
73 |
|
- added workaround to perl.prov not working [SME: 11958] |
74 |
|
added mock plugin copy.py and an updated perl.prov |
75 |
|
- update embded bins |
76 |
|
|
77 |
|
* Mon Dec 27 2021 Michel Begue <mab974@misouk.com> 1.0-13.sme |
78 |
|
- fix build deps for Mojo::JWT [SME: 11005] |
79 |
|
|
80 |
|
* Thu Nov 26 2020 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-12.sme |
81 |
|
- fix build deps for spamassassin [SME: 11203] |
82 |
|
|
83 |
|
* Fri Sep 04 2020 Michel Begue <mab974@gmail.com> 1.0-11.sme |
84 |
|
- update dependencies to build Mojo::JWT package [SME: 11005] |
85 |
|
|
86 |
|
* Tue Aug 18 2020 Michel Begue <mab974@gmail.com> 1.0-10.sme |
87 |
|
- update dependencies to build kmod packages [SME: 10993] |
88 |
|
|
89 |
|
* Thu May 14 2020 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-9.sme |
90 |
|
- fix nspawn and package_manager set to yum [SME: 10946] |
91 |
|
- updating list of included packages for SME10 and SME9 repo |
92 |
|
- updating the attached bins to help building [SME: 10924] |
93 |
|
|
94 |
|
* Mon Sep 30 2019 Michel Begue <mab974@gmail.com> 1.0-8.sme |
95 |
|
- added include pkg ocaml, camlp5 [SME: 10809] |
96 |
|
|
97 |
|
* Tue Nov 13 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-7.sme |
98 |
|
- fix non needed Requires python-ctypes [SME: 10647] |
99 |
|
|
100 |
|
* Wed Jun 20 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-6.sme |
101 |
|
- added include pkg for video tools [SME: 1600] |
102 |
|
- applied patch for previous bug fix [SME: 10599] |
103 |
|
|
104 |
|
* Tue Jun 19 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-5.sme |
105 |
|
- update dependencies to build spamassassin [SME: 10599] |
106 |
|
|
107 |
|
* Sun Mar 18 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-4.sme |
108 |
|
- update include package values according to buildsys |
109 |
|
|
110 |
|
* Sat Mar 17 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-3.sme |
111 |
|
- set %config on mock config files |
112 |
|
- a rpmsave of the previous version will be created if modified. |
113 |
|
- fix typo in filename |
114 |
|
|
115 |
|
* Sun Mar 11 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-2.sme |
116 |
|
- update of site-default.cfg via post script [SME: 10537] |
117 |
|
- removed e-smith-devtools of requirements |
118 |
|
- added Requires python27-build |
119 |
|
|
120 |
* Sat Mar 10 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-1.sme |
* Sat Mar 10 2018 Jean-Philipe Pialasse <tests@pialasse.com> 1.0-1.sme |
121 |
- Initial release with SME Server mock config files |
- Initial release with SME iServer mock config files [SME: 10537] |
122 |
- tools added : BogusDateBot.sh change-log clog createBuildDir prepa tagbuild |
- tools added : BogusDateBot.sh change-log clog createBuildDir prepa tagbuild |
123 |
|
|
|
|
|
|
|
|
124 |
%description |
%description |
125 |
Tools for use in building RPMs for the Koozali SME server and gateway. |
Tools for use in building RPMs for the Koozali SME server and gateway. |
126 |
|
|
128 |
|
|
129 |
%prep |
%prep |
130 |
%setup |
%setup |
131 |
|
%patch0 -p1 |
132 |
|
%patch1 -p1 |
133 |
|
%patch2 -p1 |
134 |
|
%patch3 -p1 |
135 |
|
%patch4 -p1 |
136 |
|
%patch5 -p1 |
137 |
|
%patch6 -p1 |
138 |
|
%patch7 -p1 |
139 |
|
%patch8 -p1 |
140 |
|
%patch9 -p1 |
141 |
|
%patch10 -p1 |
142 |
|
%patch11 -p1 |
143 |
|
%patch12 -p1 |
144 |
|
%patch13 -p1 |
145 |
|
%patch14 -p1 |
146 |
|
%patch15 -p1 |
147 |
|
|
148 |
%build |
%build |
149 |
|
|
158 |
--file /usr/bin/createBuildDir '%attr(0755,root,root)' \ |
--file /usr/bin/createBuildDir '%attr(0755,root,root)' \ |
159 |
--file /usr/bin/prepa '%attr(0755,root,root)' \ |
--file /usr/bin/prepa '%attr(0755,root,root)' \ |
160 |
--file /usr/bin/tagbuild '%attr(0755,root,root)' \ |
--file /usr/bin/tagbuild '%attr(0755,root,root)' \ |
161 |
--file /etc/mock/* '%attr(0754,root,mock)' \ |
--file /etc/mock/perl.prov '%attr(0755,root,root)' \ |
162 |
|
--ignoredir /usr/lib/python3.6/site-packages/mockbuild/plugins \ |
163 |
|
--ignoredir /usr/lib/python3.6/site-packages/mockbuild \ |
164 |
|
--ignoredir /usr/lib/python3.6/site-packages \ |
165 |
|
--ignoredir /usr/lib/python3.6 \ |
166 |
|
--ignoredir /etc/mock \ |
167 |
|
| grep -v copy.pyc \ |
168 |
|
| grep -v copy.pyo \ |
169 |
> %{name}-%{version}-filelist |
> %{name}-%{version}-filelist |
170 |
|
|
171 |
%clean |
%clean |
173 |
|
|
174 |
%pre |
%pre |
175 |
%preun |
%preun |
176 |
%post |
%post -p /bin/bash |
177 |
|
|
178 |
|
# updates sme site defaults |
179 |
|
main=/etc/mock/site-defaults.cfg |
180 |
|
tmp=/tmp/site-defaults.cfg |
181 |
|
gen=/etc/mock/sme-site-defaults.cfg |
182 |
|
|
183 |
|
# position of the tags |
184 |
|
BEGIN_GEN=$(cat $main | grep -n '### KOOZALI SME SERVER BEGIN GENERATED CONTENT' | sed 's/\(.*\):.*/\1/g' ) |
185 |
|
END_GEN=$(cat $main | grep -n '### KOOZALI SME SERVER END GENERATED CONTENT' | sed 's/\(.*\):.*/\1/g' ) |
186 |
|
#if tag is absent set first to 0 |
187 |
|
if [[ "$BEGIN_GEN" -eq "" ]]; then BEGIN_GEN=0; fi |
188 |
|
if [[ "$END_GEN" -eq "" ]]; then |
189 |
|
# if second tag is absent just concatenate |
190 |
|
cat <(head -n $(expr $BEGIN_GEN - 1) $main) $gen >$tmp; |
191 |
|
|
192 |
|
else |
193 |
|
# if both tags are present replace content |
194 |
|
cat <(head -n $(expr $BEGIN_GEN - 1) $main) $gen <(tail -n +$(expr $END_GEN + 1) $main) >$tmp; |
195 |
|
|
196 |
|
fi |
197 |
|
# mv tmp file to main file |
198 |
|
mv $tmp $main |
199 |
|
|
200 |
|
|
201 |
%postun |
%postun |
202 |
|
|
203 |
%files-f %{name}-%{version}-filelist |
%files -f %{name}-%{version}-filelist |
204 |
%defattr(-,root,root,-) |
%defattr(-,root,root,-) |
205 |
|
/etc/mock/* %config %attr(0755,root,mock) |