-
Notifications
You must be signed in to change notification settings - Fork 19
/
rpmconf.spec
275 lines (224 loc) · 8.18 KB
/
rpmconf.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
%bcond_with tests
%if 0%{?rhel} == 7
%global python3_pkgversion 36
%endif
Name: rpmconf
Summary: Tool to handle rpmnew and rpmsave files
License: GPL-3.0-only
Version: 1.1.11
Release: 1%{?dist}
URL: https://github.com/xsuchy/rpmconf
# source is created by:
# git clone https://github.com/xsuchy/rpmconf.git
# cd rpmconf; tito build --tgz
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: make
BuildRequires: docbook-utils
BuildRequires: docbook-dtd31-sgml
%if 0%{?rhel} > 9 || 0%{?fedora} > 38
BuildRequires: python%{python3_pkgversion}-setuptools
%endif
BuildRequires: python%{python3_pkgversion}-sphinx
BuildRequires: python%{python3_pkgversion}-devel
Requires: %{name}-base
Requires: python%{python3_pkgversion}-rpmconf
%if 0%{?rhel} == 7
Requires: python36-rpm
BuildRequires: python36-rpm
%else
Requires: rpm-python3
BuildRequires: rpm-python3
%if %{with tests}
BuildRequires: python%{python3_pkgversion}-pylint
BuildRequires: python%{python3_pkgversion}-six
%endif
%endif
# mergetools
%if 0%{?rhel} == 7
# nothing
%else
Suggests: diffuse
Suggests: diffutils
Suggests: kdiff3
Suggests: meld
Suggests: vim-X11
Suggests: vim-enhanced
# sdiff
Suggests: diffutils
%endif
%description
This tool search for .rpmnew, .rpmsave and .rpmorig files and ask you what to do
with them:
Keep current version, place back old version, watch the diff or merge.
%package -n python%{python3_pkgversion}-rpmconf
Summary: Python interface for %{name}
BuildArch: noarch
%description -n python%{python3_pkgversion}-rpmconf
Python interface for %{name}. Mostly useful for developers only.
%package -n python%{python3_pkgversion}-rpmconf-doc
Summary: Documentation of python interface for %{name}
BuildArch: noarch
%description -n python%{python3_pkgversion}-rpmconf-doc
Documentation generated from code of python3-rpmconf.
%package base
Summary: Filesystem for %{name}
BuildArch: noarch
%description base
Directory hierarchy for installation scripts, which are handled by rpmconf.
%prep
%setup -q
%build
sed -i 's/__version__ = .*/__version__ = "%{version}"/' rpmconf/rpmconf.py
sed -i 's/version = .*,/version = "%{version}",/' setup.py
%{__python3} setup.py build
docbook2man rpmconf.sgml
%if 0%{?rhel} == 7
make -C docs html man SPHINXBUILD=sphinx-build-3.6
%else
make -C docs html man
%endif
%install
%{__python3} setup.py install --skip-build \
--install-scripts %{_sbindir} \
--root %{buildroot}
install -D -m 644 rpmconf.8 %{buildroot}%{_mandir}/man8/rpmconf.8
install -D -m 644 docs/build/man/rpmconf.3 %{buildroot}%{_mandir}/man3/rpmconf.3
mkdir -p %{buildroot}%{_datadir}/rpmconf/
%check
%if %{with tests}
pylint-3 rpmconf bin/rpmconf || :
%endif
%files
%license LICENSES/GPL-3.0-only.txt
%{_sbindir}/rpmconf
%{_mandir}/man8/rpmconf.8*
%doc README.md
%files -n python%{python3_pkgversion}-rpmconf
%license LICENSES/GPL-3.0-only.txt
%{python3_sitelib}/rpmconf/
%{python3_sitelib}/rpmconf-*.egg-info
%{_mandir}/man3/rpmconf.3*
%files -n python%{python3_pkgversion}-rpmconf-doc
%license LICENSES/GPL-3.0-only.txt
%doc docs/build/html/
%files base
%dir %{_datadir}/rpmconf
%changelog
* Thu May 09 2024 Miroslav Suchý <[email protected]> 1.1.11-1
- correct wording
- use license file from reuse
- add reuse config
* Fri Jul 07 2023 Miroslav Suchý <[email protected]> 1.1.10-1
- Use rpm.files instead of rpm.fi
- Add upper version bound for setInterruptSafety()
* Thu May 04 2023 Miroslav Suchý <[email protected]> 1.1.9-1
- Add BuildRequire on setuptools to fix distutils error on Python 3.12
- when package config does not exists use /dev/null instead
* Wed Nov 30 2022 Miroslav Suchý <[email protected]> 1.1.8-1
- use spdx license
- 2135035 - change wording to avoid confusion
* Mon Oct 10 2022 Miroslav Suchý <[email protected]> 1.1.7-1.1
- 133273] - avoid loops during clean action
* Tue Oct 04 2022 msuchy <[email protected]> - 1.1.6-2.1
- rebuilt
* Tue Oct 04 2022 msuchy <[email protected]> - 1.1.6-1.1
- rebuilt
* Mon Aug 29 2022 Miroslav Suchý <[email protected]> 1.1.6-1
- Automatic commit of package [rpmconf] release [1.1.5-1].
- Create codeql-analysis.yml
* Thu Aug 25 2022 Miroslav Suchý <[email protected]> 1.1.5-1
- typo
- add distribution buttons
- master to main in releasers
* Thu Mar 04 2021 Miroslav Suchý <[email protected]> 1.1.4-1
- 1934986 - update link
* Tue Dec 22 2020 Miroslav Suchý <[email protected]> 1.1.3-1
- Implement unattended mode.
- move init section after sleep() so it can be interrupted by Ctrl+C
* Mon Nov 30 2020 Miroslav Suchý <[email protected]> 1.1.2-1
- BR make
- Fix typo in error message
* Mon May 04 2020 Miroslav Suchý <[email protected]> 1.1.1-1
- fix version in released rpm
- fix short version of --version
- implement --root option
- initialize rpm transaction faster
- do not traceback when Ctrl+C
- do not go over all packages if neither -a or -o is set
- implement --exclude
* Tue Apr 21 2020 Miroslav Suchý <[email protected]> 1.0.22-1
- build for el7
* Thu Jan 16 2020 Miroslav Suchý <[email protected]> 1.0.21-1
- Drop the deprecated no-op "U" mode for open() to support Python 3.9
* Sun Sep 22 2019 Miroslav Suchý <[email protected]> 1.0.20-1
- remove old changelog entries
- better handle message after merging
- do not run pylint by default
- add sdiff support [GH#51]
- rpmconf.sgml: Improve readability
- include README in package
* Wed Apr 05 2017 Miroslav Suchý <[email protected]> 1.0.19-1
- implement --test
- 1350249 - correctly pass /dev/null to difflib
* Fri Jun 24 2016 Miroslav Suchý <[email protected]> 1.0.18-1
- add pylintrc
* Fri Jun 24 2016 Miroslav Suchý <[email protected]> 1.0.17-1
- set loglevel only for rpmconf logger
- standard import "import errno" comes before "from rpmconf import rpmconf"
(wrong-import-order)
- fix a typo in the /usr/bin/ls arguments
* Tue Dec 01 2015 Miroslav Suchý <[email protected]> 1.0.16-1
- temporary workaround for BZ 1287055
- 1287034 - local variable 'fromdate' referenced before assignment
* Fri Nov 27 2015 Miroslav Suchý <[email protected]> 1.0.15-1
- 1277025 - handle broken symlinks
* Tue Nov 24 2015 Miroslav Suchý <[email protected]> 1.0.14-1
- we use utf8
- call python3 directly
- 1258464 - improve error message
- 1282029 - check for root privileges
- 1283698 - clarify man page
* Fri Nov 13 2015 Miroslav Suchý <[email protected]> 1.0.13-1
- 1278134 - do TB when somebody remove file under our hand
* Tue Jun 30 2015 Miroslav Suchý <[email protected]> 1.0.12-1
- disable pylint warning
* Tue Jun 30 2015 Miroslav Suchý <[email protected]> 1.0.11-1
- disable pylint warning
* Tue Jun 30 2015 Miroslav Suchý <[email protected]> 1.0.10-1
- 1236722 - other method for stdin flush and handle Ctrl+C correctly
* Mon Jun 01 2015 Miroslav Suchý <[email protected]> 1.0.9-1
- pylint: let the logger expand params
- use soft deps
* Mon Jun 01 2015 Miroslav Suchý <[email protected]> 1.0.8-1
- 1226591 - do not flush stdin, when it is not TTY
- BR python3-six
- minor fixes
- use RPM Python API to get package name of file
* Mon Jan 12 2015 Miroslav Suchý <[email protected]> 1.0.7-1
- correctly reference tar.gz
- add / before usr/bin
- remove superfluous changelog line
* Fri Jan 09 2015 Miroslav Suchý <[email protected]> 1.0.6-1
- let tito bump up version in docs/source/conf.py
* Thu Jan 08 2015 Miroslav Suchý <[email protected]> 1.0.5-1
- add -doc subpackage
- mark LICENSE as %%license
- Split to python class and CLI
- use rpm python api to get version
* Sun Nov 23 2014 Miroslav Suchý <[email protected]> 1.0.4-1
- add BR rpm-python3
* Sun Nov 23 2014 Miroslav Suchý <[email protected]> 1.0.3-1
- Allow specification of a custom merge type via an environment variable,
$MERGE
- do not remove files on those merge tools, which does not return correct exit
code
- make pylint run mandatory
- skip /var/lib/mock when --clean
- use rpm bindings to find configfiles
- use filecmp instead of subprocessed diff
* Tue Nov 04 2014 Miroslav Suchý <[email protected]> 1.0.2-1
- require rpm-python3
* Wed Oct 29 2014 Miroslav Suchý <[email protected]> 1.0.1-1
- migrate to python3
- handle symlinks correctly