Package multipath-tools: Specfile

  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
%define _unpackaged_files_terminate_build 1
%def_enable libdmmp

%define syslibdir /%_lib
%define libmpathdir %syslibdir/multipath

Name: multipath-tools
Version: 0.9.8
Release: alt1

Summary: Tools to manage multipath devices with device-mapper
License: GPL-2.0-only
Group: System/Configuration/Hardware

Url: http://christophe.varoqui.free.fr
Vcs: https://github.com/opensvc/multipath-tools.git
Source: %name-%version.tar
Source3: multipathd.init
Source4: multipath.modules
Source5: multipath.conf
Patch1: %name-%version.patch

Provides: device-mapper-multipath = %EVR

Requires: libmultipath = %EVR
Requires: kpartx = %EVR
Requires: dmsetup
Requires: udev-rules-sgutils sg3_utils

BuildRequires: libaio-devel libdevmapper-devel libreadline-devel libudev-devel libsystemd-devel libmount-devel
BuildRequires: libuserspace-rcu-devel
%{?_enable_libdmmp:BuildRequires: libjson-c-devel}

%description
This package provides the tools to manage multipath devices by
instructing the device-mapper multipath module what to do.
The tools are:
- multipath: lists and configures multipath devices.
- multipathd: monitors paths; as paths fail and come back, it may
  initiate path group switches.

%package -n libmultipath
Summary: The %name modules and shared library
License: GPL-2.0-only AND LGPL-2.1-only AND LGPL-2.0-or-later
Group: System/Libraries
Conflicts: multipath-tools <= 0.4.9-alt3

%description -n libmultipath
The libmultipath provides the path checker
and prioritizer modules. It also contains the multipath shared library,
libmultipath.

%package -n libmultipath-devel
Summary: Development libraries and headers for %name
Group: Development/C
License: GPL-2.0-only AND LGPL-2.0-or-later
Requires: libmultipath = %EVR

%description -n libmultipath-devel
This package contains the files need to develop applications that use
multipath-tools's libmpathpersist and libmpathcmd libraries.

%package -n kpartx
Summary: Partition device manager for device-mapper devices
Group: System/Configuration/Hardware
License: GPL-2.0-only
Conflicts: multipath-tools <= 0.4.9-alt3

%description -n kpartx
kpartx manages partition creation and removal for device-mapper devices.

%package -n libdmmp
Summary: multipath-tools C API library
Group: System/Libraries
License: GPL-3.0-or-later

%description -n libdmmp
This package contains the shared library for the multipath-tools
C API library.

%package -n libdmmp-devel
Summary: device-mapper-multipath C API library headers
Group: Development/C
License: GPL-3.0-or-later
Requires: libdmmp = %EVR

%description -n libdmmp-devel
This package contains the files needed to develop applications that use
device-mapper-multipath's libdmmp C API library

%prep
%setup -q
%patch1 -p1
%ifarch %e2k
sed -i "s|-Werror -Wall|-Wall|" Makefile.inc
%endif

%build
unset RPM_OPT_FLAGS
%make_build \
    prefix=%_prefix \
    systemd_prefix="" \
    etc_prefix="" \
    bindir=/sbin \
    libudevdir=/lib/udev \
    syslibdir=%syslibdir \
    libdir=%libmpathdir \
    plugindir=%libmpathdir \
    usr_prefix=%_prefix \
    configdir=%_sysconfdir/multipath/conf.d \
    configfile=%_sysconfdir/multipath.conf \
    statedir=%_sysconfdir/multipath \
    LIB=%_lib \
    %{?_disable_libdmmp: ENABLE_LIBDMMP=0} \
    EXTRAVERSION=%release

%install
mkdir -p %buildroot{/sbin,%_libdir,%_man8dir,%_initdir,%_unitdir,%_udevrulesdir,%_modulesloaddir,%_sysconfdir/multipath}
%makeinstall_std \
    prefix=%_prefix \
    systemd_prefix="" \
    DESTDIR=%buildroot \
    %{?_disable_libdmmp: ENABLE_LIBDMMP=0} \
    LIB=%_lib \
    bindir=/sbin \
    syslibdir=%syslibdir \
    libdir=%libmpathdir \
    plugindir=%libmpathdir \
    usr_prefix=%_prefix \
    configdir=%_sysconfdir/multipath/conf.d \
    rcdir=%_initrddir \
    udevrulesdir=%_udevrulesdir \
    unitdir=%_unitdir \
    libudevdir=/lib/udev \
    tmpfilesdir=%_tmpfilesdir \
    modulesloaddir=%_modulesloaddir \
    EXTRAVERSION=%release

install -pm755 %SOURCE3 %buildroot%_initdir/multipathd
install -pm644 %SOURCE5 %buildroot%_sysconfdir/multipath.conf

%post
%post_service multipathd

%preun
%preun_service multipathd

%files
%doc README.md
/sbin/multipath
/sbin/multipathd
#/sbin/mpathconf
/sbin/mpathpersist
/sbin/multipathc
%_udevrulesdir/*
%exclude %_udevrulesdir/*kpartx.rules
%_modulesloaddir/*
%dir %_sysconfdir/multipath
%config(noreplace) %attr(644,root,root) %_sysconfdir/multipath.conf
%_initdir/*
%_unitdir/*
%_tmpfilesdir/*
%_man5dir/*
%_man8dir/*
%exclude %_man8dir/kpartx.8.*

%files -n libmultipath
/%_lib/libmultipath.so.*
/%_lib/libmpathcmd.so.*
/%_lib/libmpathpersist.so.*
/%_lib/libmpathvalid.so.*
/%_lib/libmpathutil.so.*
%dir %libmpathdir
%libmpathdir/*

%files -n libmultipath-devel
/%_lib/libmultipath.so
/%_lib/libmpathpersist.so
/%_lib/libmpathcmd.so
/%_lib/libmpathvalid.so
/%_lib/libmpathutil.so
%_includedir/mpath_cmd.h
%_includedir/mpath_persist.h
%_includedir/mpath_valid.h
%_man3dir/mpath_*

%files -n kpartx
%_udevrulesdir/*kpartx.rules
/sbin/kpartx
/lib/udev/kpartx_id
%_man8dir/kpartx.8.*

%files -n libdmmp
%_libdir/libdmmp.so.*

%files -n libdmmp-devel
%_libdir/libdmmp.so
%dir %_includedir/libdmmp
%_includedir/libdmmp/*
%_man3dir/dmmp_*
%_man3dir/libdmmp.h.3.*
%_pkgconfigdir/libdmmp.pc

%changelog
* Thu Mar 07 2024 Alexey Shabalin <shaba@altlinux.org> 0.9.8-alt1
- 0.9.8

* Thu Nov 30 2023 Alexey Shabalin <shaba@altlinux.org> 0.9.7-alt1
- 0.9.7

* Thu Sep 07 2023 Alexey Shabalin <shaba@altlinux.org> 0.9.6-alt1
- 0.9.6

* Fri Mar 24 2023 Alexey Shabalin <shaba@altlinux.org> 0.9.4-alt1
- 0.9.4

* Fri Dec 02 2022 Alexey Shabalin <shaba@altlinux.org> 0.9.3-alt2
- fixed plugin path (ALT #44524)
- fixed configdir path

* Fri Nov 25 2022 Alexey Shabalin <shaba@altlinux.org> 0.9.3-alt1
- 0.9.3 (Fexes: CVE-2022-41973, CVE-2022-41974) (ALT #44440)

* Tue Sep 27 2022 Alexey Shabalin <shaba@altlinux.org> 0.9.1-alt1
- 0.9.1

* Thu Aug 25 2022 Alexey Shabalin <shaba@altlinux.org> 0.9.0-alt1
- 0.9.0

* Mon Oct 11 2021 Alexey Shabalin <shaba@altlinux.org> 0.8.7-alt1
- 0.8.7

* Mon Sep 27 2021 Ilya Kurdyukov <ilyakurdyukov@altlinux.org> 0.8.6-alt2
- fixed build for Elbrus

* Sun Apr 11 2021 Alexey Shabalin <shaba@altlinux.org> 0.8.6-alt1
- 0.8.6

* Sat Apr 10 2021 Andrew A. Vasilyev <andy@altlinux.org> 0.8.3-alt3
- fix build with gcc-10

* Mon May 11 2020 Alexey Shabalin <shaba@altlinux.org> 0.8.3-alt2
- fixed build with json-c 0.14.0

* Mon Feb 03 2020 Alexey Shabalin <shaba@altlinux.org> 0.8.3-alt1
- 0.8.3

* Mon Jul 08 2019 Alexey Shabalin <shaba@altlinux.org> 0.8.2-alt1
- 0.8.2
- do not package %%_modulesloaddir/multipath.conf,
  because ExecPre loaded kernel modules

* Tue May 07 2019 Alexey Shabalin <shaba@altlinux.org> 0.8.1-alt1
- 0.8.1
- fixed udev rules

* Mon Apr 01 2019 Alexey Shabalin <shaba@altlinux.org> 0.8.0-alt1
- 0.8.0
- removed ALT glibc functions from util, since ALT build glibc has its own
  implementation of the strlcat, strlcpy and strnlen functions (closes: #36411)

* Mon Sep 03 2018 Michael Shigorin <mike@altlinux.org> 0.7.4-alt2
- applied patches suggested by Alex Moskalenko
  (closes: #35286, #35287)

* Fri Dec 15 2017 Alexey Shabalin <shaba@altlinux.ru> 0.7.4-alt1
- 0.7.4
- add devel packages

* Sun Nov 12 2017 Vitaly Lipatov <lav@altlinux.ru> 0.6.4-alt1.1
- autorebuild with libuserspace-rcu.git=0.10.0-alt1

* Thu Mar 23 2017 Alexey Shabalin <shaba@altlinux.ru> 0.6.4-alt1
- 0.6.4

* Tue Nov 08 2016 Alexey Shabalin <shaba@altlinux.ru> 0.6.1-alt2
- fix work inside initrd (shrek@)

* Fri Jun 17 2016 Alexey Shabalin <shaba@altlinux.ru> 0.6.1-alt1
- 0.6.1
- use upstream udev rules

* Wed Apr 06 2016 Valery Inozemtsev <shrek@altlinux.ru> 0.5.0-alt3
- updated multipath.rules

* Tue Jul 14 2015 Alexey Shabalin <shaba@altlinux.ru> 0.5.0-alt2
- upstream snapshot (770e6d0da035deaced82885939161c2b69225e10)
- add patches from suse

* Thu Mar 05 2015 Alexey Shabalin <shaba@altlinux.ru> 0.5.0-alt1
- 0.5.0

* Tue May 27 2014 Michael Shigorin <mike@altlinux.org> 0.4.9-alt5
- added missing Conflicts: to facilitate upgrade (closes: #30092)

* Fri Nov 16 2012 Alexey Shabalin <shaba@altlinux.ru> 0.4.9-alt4
- upstream snapshot 2012-10-01
- update udev rules
- add systemd unit file
- split packages libmultipath and kpartx
- Apply fedora patches:
  0025-RH-fix-systemd-start-order.patch
  0024-RH-start-multipathd-service-before-lvm.patch
  0023-RHBZ-866291-update-documentation.patch
  0022-RHBZ-864368-disable-libdm-failback.patch
  0021-RH-fix-oom-adj.patch
  0020-RH-netapp-config.patch
  0019-RH-detect-prio.patch
  0018-RH-remove-config-dups.patch
  0016-RH-retain_hwhandler.patch
  0015-RH-selector_change.patch
  0014-RH-dm_reassign.patch
  0013-RH-kpartx-msg.patch
  0012-RH-change-configs.patch
  0011-RH-use-sync-support.patch
  0009-RH-dont-remove-map-on-enomem.patch
  0007-RH-add-hp_tur-checker.patch
  0006-RH-add-find-multipaths.patch
  0005-RH-add-mpathconf.patch
  0004-RH-multipathd-blacklist-all-by-default.patch
  0002-RH-multipath.rules.patch
  0001-RH-dont_start_with_no_config.patch

* Tue Feb 15 2011 Vitaly Kuznetsov <vitty@altlinux.ru> 0.4.9-alt3
- rebuild with new libdevmapper versioning

* Mon Mar 01 2010 Konstantin Pavlov <thresh@altlinux.org> 0.4.9-alt2
- Rebase to 0.4.9 b68400c7.
- Apply 0012-RH-udev-sync-support.patch from Fedora devel (fixes #23041).
- Apply 0022-RHBZ-557845-RHEL5-style-partitions.patch from Fedora devel.
- Install udev rules to /lib/udev/rules.d instead of /etc/udev/rules.d.

* Wed Oct 14 2009 Pavlov Konstantin <thresh@altlinux.ru> 0.4.9-alt1
- Rebase to 0.4.9 aa0a885e1.
- Remove devmap_name (redundant with dmsetup, following upstream).
- Blacklist all devices by default (closes #21769).

* Thu Sep 24 2009 Pavlov Konstantin <thresh@altlinux.ru> 0.4.8-alt3
- Fix another wrong scsi_id invocation in libmultipath.

* Wed Aug 26 2009 Pavlov Konstantin <thresh@altlinux.ru> 0.4.8-alt2
- Apply a bunch of Fedora patches, notable changes are:
  + kpartx now works with logical partitions
  + fix for CVE-2009-0115
  + support for newer scsi_id invocation scheme.
- Some cosmetic spec file changes (spelling, descriptions rewrite).
- Added cciss_id utility.
- Added default configuration file.
- Added init script for multipathd.

* Tue Apr 07 2009 Michael Shigorin <mike@altlinux.org> 0.4.8-alt1
- 0.4.8: please see the site for changes that may require
  you altering your config file
- built with libaio
- added kpartx to main package
- buildreq
- NB: I don't have multipath-capable hardware, maintainer wanted

* Tue Sep 02 2008 Michael Shigorin <mike@altlinux.org> 0.4.7-alt4
- BR: glibc-kernheaders instead
- exclude devmap_name from main subpackage

* Mon Sep 01 2008 Michael Shigorin <mike@altlinux.org> 0.4.7-alt3
- BR: kernel-headers-std-def (provides broke?)

* Mon Apr 09 2007 Michael Shigorin <mike@altlinux.org> 0.4.7-alt2
- fixed build
- spec cleanup
- added %%_sysconfdir/udev/rules.d/multipath.rules

* Thu Mar 30 2006 Eugene Prokopiev <enp@altlinux.ru> 0.4.7-alt1
- build with new version and without external patches

* Wed Aug 31 2005 Nick S. Grechukh <gns@altlinux.ru> 0.4.4-alt0.18
- initial build for ALT Linux Sisyphus

* Thu Jun 16 2005 - lmb@suse.de
- Remove stray newline character from /dev/disk/by-name/ entries
  (#85798, #86763)
- Clear /dev/disk/by-name/ on boot. (#85978)
- scsi_id now handles EMC Symmetrix; remove work-around for #86760.
* Tue Jun 07 2005 - lmb@suse.de
- Import fixes from upstream.
- Hardware table updates for IBM ESS and EMC CX (#81688).
- Reinstate paths correctly after failure/restore cycle (#85781,
  [#86444]).
- Create map names again and fix segfault in devmap_name (#85798).
* Tue May 24 2005 - hare@suse.de
- Fix segmentation fault with EMC Symmetrix (#85614).
- Update EMC Symmetrix entry in hwtable.
* Mon May 23 2005 - hare@suse.de
- Add hwtable entry for IBM DS6000. (#63903)
- Do a rescan for devices if multipath command line option is set.
* Fri May 20 2005 - hare@suse.de
- Fix devmap_name to use mapname and return proper status (#84748).
* Thu May 12 2005 - lmb@suse.de
- Don't complain about default prio callout command (#81695).
- Reflect recent changes in boot.multipath as well as multipathd init
  scripts.
- Actually fail paths when they are detected to be failed by multipathd
  (#81679).
- killproc/startproc/checkproc can't be used with multipathd because of
  the way the daemon switches to its own namespace (#80443).
* Mon May 09 2005 - hare@suse.de
- Use proper path checker for SGI TPC arrays.
- Update hwtable entries for SGI TP9400 and SGI TP9500.
- Write correct PID file (#80443).
* Mon Apr 25 2005 - lmb@suse.de
- Update to 0.4.4: pp_alua now licensed as GPL (#78628).
- multipath-tools-oom-adj.patch: oom_adj to a valid value.
* Thu Apr 21 2005 - lmb@suse.de
- Update to 0.4.4-pre18 which fixes the multipathd to initialize
  correctly in the absence of a configuration file (79239).
* Wed Apr 20 2005 - lmb@suse.de
- Put multipath cache back into /dev because /var might not be mounted.
- Correct hwtable entry SGI TP9400, TP9500 and IBM 3542.
* Wed Apr 20 2005 - lmb@suse.de
- Update to 0.4.4-pre16
- Build against device-mapper.1.01.xx correctly.
* Tue Apr 19 2005 - lmb@suse.de
- Build w/o device-mapper update again.
* Mon Apr 18 2005 - lmb@suse.de
- Update to 0.4.4-pre14
- Build versus device-mapper-1.01.01 to prevent deadlocks in
  kernel-space.
- Fix devmap_name to work with udev.
- Fix startup of multipathd w/o configuration file present.
* Fri Apr 15 2005 - lmb@suse.de
- Add path priority checker for EMC CLARiiON and make necessary
  adjustments so that it gets called by default (#62491).
- Set the default udev dir to '/dev'
* Fri Apr 15 2005 - hare@suse.de
- Fix to allocate default strings (#78056)
- Fix default entry for TPC9500.
* Wed Apr 13 2005 - hare@suse.de
- Added pp_alua path priority checker.
- Update to multipath-tools-0.4.4-pre12.
* Mon Apr 11 2005 - hare@suse.de
- Update to multipath-tools-0.4.4-pre10.
* Fri Apr 08 2005 - hare@suse.de
- Update multipath to handle only true multipath devices (#62491).
- Update kpartx to use the device mapper target name if available.
- Add boot.multipath script for early set up of multipath targets.
* Thu Mar 31 2005 - hare@suse.de
- Update devmap_name to select targets by table type (#62493).
* Tue Jan 25 2005 - lmb@suse.de
- Update to 0.4.2 and fix some bugs + add support for the extended DM
  multipath kernel module. (#47491)
* Thu Nov 11 2004 - hare@suse.de
- Fix bugs to make it work on S/390 (#47491).
* Fri Nov 05 2004 - hare@suse.de
- Update to version 0.3.6 (#47491).
- Fix multipath init script
- Install configuration file example.
- Install multipathd in /sbin instead of /usr/bin.
* Tue Jul 20 2004 - fehr@suse.de
- updated README mp-tools-issues.pdf (see #40640)
* Wed Jun 09 2004 - fehr@suse.de
- added pdf with README to package (see #40640)
* Thu Jun 03 2004 - fehr@suse.de
- updated to version 0.2.1
- removed patches zero-currpath.patch and rm-newline-in-name.patch
  already contained in 0.2.1
* Thu Jun 03 2004 - fehr@suse.de
- added patch zero-currpath.patch (see bugzilla #40640)
* Wed May 26 2004 - uli@suse.de
- fixed to build on s390x
* Wed May 26 2004 - fehr@suse.de
- added patch rm-newline-in-name.patch (see bugzilla #40640)
* Tue May 25 2004 - fehr@suse.de
- created initial version of a SuSE package from version 0.2.0 of
  multipath tools