/
libblockdev.spec.in
1880 lines (1619 loc) · 74.8 KB
/
libblockdev.spec.in
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
%define with_python2 @WITH_PYTHON2@
%define with_python3 @WITH_PYTHON3@
%define with_gtk_doc @WITH_GTK_DOC@
%define with_bcache @WITH_BCACHE@
%define with_btrfs @WITH_BTRFS@
%define with_crypto @WITH_CRYPTO@
%define with_dm @WITH_DM@
%define with_loop @WITH_LOOP@
%define with_lvm @WITH_LVM@
%define with_lvm_dbus @WITH_LVM_DBUS@
%define with_mdraid @WITH_MDRAID@
%define with_mpath @WITH_MPATH@
%define with_swap @WITH_SWAP@
%define with_kbd @WITH_KBD@
%define with_part @WITH_PART@
%define with_fs @WITH_FS@
%define with_nvdimm @WITH_NVDIMM@
%define with_vdo @WITH_VDO@
%define with_gi @WITH_GI@
%define with_escrow @WITH_ESCROW@
%define with_dmraid @WITH_DMRAID@
# python2 is not available on RHEL > 7 and not needed on Fedora > 28
%if 0%{?rhel} > 7 || 0%{?fedora} > 28 || %{with_python2} == 0
%define with_python2 0
%define python2_copts --without-python2
%endif
# python3 is not available on older RHEL
%if (! 0%{?fedora} && 0%{?rhel} <= 7) || %{with_python3} == 0
%define with_python3 0
%define python3_copts --without-python3
%endif
# bcache is not available on older RHEL
%if (! 0%{?fedora} && 0%{?rhel} <= 7) || %{with_bcache} == 0
%define with_bcache 0
%define bcache_copts --without-bcache
%endif
# lvm_dbus is not available on older RHEL
%if (! 0%{?fedora} && 0%{?rhel} <= 7) || %{with_lvm_dbus} == 0
%define with_lvm_dbus 0
%define lvm_dbus_copts --without-lvm-dbus
%endif
# vdo is not available on Fedora
%if (0%{?fedora}) || %{with_vdo} == 0
%define with_vdo 0
%define vdo_copts --without-vdo
%endif
%if %{with_btrfs} != 1
%define btrfs_copts --without-btrfs
%endif
%if %{with_crypto} != 1
%define crypto_copts --without-crypto
%else
%if %{with_escrow} != 1
%define crypto_copts --without-escrow
%endif
%endif
%if %{with_dm} != 1
%define dm_copts --without-dm
%else
%if %{with_dmraid} != 1
%define dm_copts --without-dmraid
%endif
%endif
%if %{with_loop} != 1
%define loop_copts --without-loop
%endif
%if %{with_lvm} != 1
%define lvm_copts --without-lvm
%endif
%if %{with_lvm_dbus} != 1
%define lvm_dbus_copts --without-lvm_dbus
%endif
%if %{with_mdraid} != 1
%define mdraid_copts --without-mdraid
%endif
%if %{with_mpath} != 1
%define mpath_copts --without-mpath
%endif
%if %{with_swap} != 1
%define swap_copts --without-swap
%endif
%if %{with_kbd} != 1
%define kbd_copts --without-kbd
%endif
%if %{with_part} != 1
%define part_copts --without-part
%endif
%if %{with_fs} != 1
%define fs_copts --without-fs
%endif
%if %{with_nvdimm} != 1
%define nvdimm_copts --without-nvdimm
%endif
%if %{with_vdo} != 1
%define vdo_copts --without-vdo
%endif
%if %{with_gi} != 1
%define gi_copts --disable-introspection
%endif
%define configure_opts %{?python2_copts} %{?python3_copts} %{?bcache_copts} %{?lvm_dbus_copts} %{?btrfs_copts} %{?crypto_copts} %{?dm_copts} %{?loop_copts} %{?lvm_copts} %{?lvm_dbus_copts} %{?mdraid_copts} %{?mpath_copts} %{?swap_copts} %{?kbd_copts} %{?part_copts} %{?fs_copts} %{?nvdimm_copts} %{vdo_copts} %{?gi_copts}
Name: libblockdev
Version: 2.18
Release: 1%{?dist}
Summary: A library for low-level manipulation with block devices
License: LGPLv2+
URL: https://github.com/storaged-project/libblockdev
Source0: https://github.com/storaged-project/libblockdev/releases/download/%{version}-%{release}/%{name}-%{version}.tar.gz
BuildRequires: glib2-devel
%if %{with_gi}
BuildRequires: gobject-introspection-devel
%endif
%if %{with_python2}
BuildRequires: python2-devel
%endif
%if %{with_python3}
BuildRequires: python3-devel
%endif
%if %{with_gtk_doc}
BuildRequires: gtk-doc
%endif
BuildRequires: glib2-doc
# Needed for the escrow tests in tests/crypto_test.py, but not used to build
# BuildRequires: volume_key
# BuildRequires: nss-tools
# Needed for python 2 vs. 3 compatibility in the tests, but not used to build
# BuildRequires: python2-six
# BuildRequires: python3-six
%description
The libblockdev is a C library with GObject introspection support that can be
used for doing low-level operations with block devices like setting up LVM,
BTRFS, LUKS or MD RAID. The library uses plugins (LVM, BTRFS,...) and serves as
a thin wrapper around its plugins' functionality. All the plugins, however, can
be used as standalone libraries. One of the core principles of libblockdev is
that it is stateless from the storage configuration's perspective (e.g. it has
no information about VGs when creating an LV).
%package devel
Summary: Development files for libblockdev
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: glib2-devel
%description devel
This package contains header files and pkg-config files needed for development
with the libblockdev library.
%if %{with_python2}
%package -n python2-blockdev
Summary: Python2 gobject-introspection bindings for libblockdev
Requires: %{name}%{?_isa} = %{version}-%{release}
%if 0%{?fedora} <= 26 || 0%{?rhel} <= 7
Requires: pygobject3-base
%else
Requires: python2-gobject-base
%endif
%{?python_provide:%python_provide python2-blockdev}
%description -n python2-blockdev
This package contains enhancements to the gobject-introspection bindings for
libblockdev in Python2.
%endif
%if %{with_python3}
%package -n python3-blockdev
Summary: Python3 gobject-introspection bindings for libblockdev
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python3-gobject-base
%{?python_provide:%python_provide python3-blockdev}
%description -n python3-blockdev
This package contains enhancements to the gobject-introspection bindings for
libblockdev in Python3.
%endif
%package utils
BuildRequires: kmod-devel
Summary: A library with utility functions for the libblockdev library
%description utils
The libblockdev-utils is a library providing utility functions used by the
libblockdev library and its plugins.
%package utils-devel
Summary: Development files for libblockdev-utils
Requires: %{name}-utils%{?_isa} = %{version}-%{release}
Requires: glib2-devel
%description utils-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-utils library.
%if %{with_btrfs}
%package btrfs
BuildRequires: libbytesize-devel
Summary: The BTRFS plugin for the libblockdev library
Requires: %{name}-utils%{?_isa} >= 0.11
Requires: btrfs-progs
%description btrfs
The libblockdev library plugin (and in the same time a standalone library)
providing the BTRFS-related functionality.
%package btrfs-devel
Summary: Development files for the libblockdev-btrfs plugin/library
Requires: %{name}-btrfs%{?_isa} = %{version}-%{release}
Requires: glib2-devel
Requires: %{name}-utils-devel%{?_isa}
%description btrfs-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-btrfs plugin/library.
%endif
%if %{with_crypto}
%package crypto
BuildRequires: cryptsetup-devel
%if %{with_escrow}
BuildRequires: volume_key-devel >= 0.3.9-7
BuildRequires: nss-devel
%endif
Summary: The crypto plugin for the libblockdev library
%description crypto
The libblockdev library plugin (and in the same time a standalone library)
providing the functionality related to encrypted devices (LUKS).
%package crypto-devel
Summary: Development files for the libblockdev-crypto plugin/library
Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
Requires: glib2-devel
%description crypto-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-crypto plugin/library.
%endif
%if %{with_dm}
%package dm
BuildRequires: device-mapper-devel
%if %{with_dmraid}
BuildRequires: dmraid-devel
%endif
BuildRequires: systemd-devel
Summary: The Device Mapper plugin for the libblockdev library
Requires: %{name}-utils%{?_isa} >= 0.11
Requires: device-mapper
Requires: dmraid
%description dm
The libblockdev library plugin (and in the same time a standalone library)
providing the functionality related to Device Mapper.
%package dm-devel
Summary: Development files for the libblockdev-dm plugin/library
Requires: %{name}-dm%{?_isa} = %{version}-%{release}
Requires: glib2-devel
Requires: device-mapper-devel
Requires: systemd-devel
%if %{with_dmraid}
Requires: dmraid-devel
%endif
Requires: %{name}-utils-devel%{?_isa}
%description dm-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-dm plugin/library.
%endif
%if %{with_fs}
%package fs
BuildRequires: parted-devel
BuildRequires: libblkid-devel
BuildRequires: libmount-devel
Summary: The FS plugin for the libblockdev library
Requires: %{name}-utils%{?_isa} >= 0.11
Requires: device-mapper-multipath
%description fs
The libblockdev library plugin (and in the same time a standalone library)
providing the functionality related to operations with file systems.
%package fs-devel
Summary: Development files for the libblockdev-fs plugin/library
Requires: %{name}-fs%{?_isa} = %{version}-%{release}
Requires: %{name}-utils-devel%{?_isa}
Requires: glib2-devel
Requires: xfsprogs
Requires: dosfstools
%description fs-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-fs plugin/library.
%endif
%if %{with_kbd}
%package kbd
BuildRequires: libbytesize-devel
Summary: The KBD plugin for the libblockdev library
Requires: %{name}-utils%{?_isa} >= 0.11
%if %{with_bcache}
Requires: bcache-tools >= 1.0.8
%endif
%description kbd
The libblockdev library plugin (and in the same time a standalone library)
providing the functionality related to kernel block devices (namely zRAM and
Bcache).
%package kbd-devel
Summary: Development files for the libblockdev-kbd plugin/library
Requires: %{name}-kbd%{?_isa} = %{version}-%{release}
Requires: %{name}-utils-devel%{?_isa}
Requires: glib2-devel
%description kbd-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-kbd plugin/library.
%endif
%if %{with_loop}
%package loop
Summary: The loop plugin for the libblockdev library
Requires: %{name}-utils%{?_isa} >= 0.11
%description loop
The libblockdev library plugin (and in the same time a standalone library)
providing the functionality related to loop devices.
%package loop-devel
Summary: Development files for the libblockdev-loop plugin/library
Requires: %{name}-loop%{?_isa} = %{version}-%{release}
Requires: %{name}-utils-devel%{?_isa}
Requires: glib2-devel
%description loop-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-loop plugin/library.
%endif
%if %{with_lvm}
%package lvm
BuildRequires: device-mapper-devel
Summary: The LVM plugin for the libblockdev library
Requires: %{name}-utils%{?_isa} >= 0.11
Requires: lvm2
# for thin_metadata_size
Requires: device-mapper-persistent-data
%description lvm
The libblockdev library plugin (and in the same time a standalone library)
providing the LVM-related functionality.
%package lvm-devel
Summary: Development files for the libblockdev-lvm plugin/library
Requires: %{name}-lvm%{?_isa} = %{version}-%{release}
Requires: %{name}-utils-devel%{?_isa}
Requires: glib2-devel
%description lvm-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-lvm plugin/library.
%endif
%if %{with_lvm_dbus}
%package lvm-dbus
BuildRequires: device-mapper-devel
Summary: The LVM plugin for the libblockdev library
Requires: %{name}-utils%{?_isa} >= 1.4
Requires: lvm2-dbusd >= 2.02.156
# for thin_metadata_size
Requires: device-mapper-persistent-data
%description lvm-dbus
The libblockdev library plugin (and in the same time a standalone library)
providing the LVM-related functionality utilizing the LVM DBus API.
%package lvm-dbus-devel
Summary: Development files for the libblockdev-lvm-dbus plugin/library
Requires: %{name}-lvm-dbus%{?_isa} = %{version}-%{release}
Requires: %{name}-utils-devel%{?_isa} >= 1.4
Requires: glib2-devel
%description lvm-dbus-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-lvm-dbus plugin/library.
%endif
%if %{with_mdraid}
%package mdraid
BuildRequires: libbytesize-devel
Summary: The MD RAID plugin for the libblockdev library
Requires: %{name}-utils%{?_isa} >= 0.11
Requires: mdadm
%description mdraid
The libblockdev library plugin (and in the same time a standalone library)
providing the functionality related to MD RAID.
%package mdraid-devel
Summary: Development files for the libblockdev-mdraid plugin/library
Requires: %{name}-mdraid%{?_isa} = %{version}-%{release}
Requires: %{name}-utils-devel%{?_isa}
Requires: glib2-devel
%description mdraid-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-mdraid plugin/library.
%endif
%if %{with_mpath}
%package mpath
BuildRequires: device-mapper-devel
Summary: The multipath plugin for the libblockdev library
Requires: %{name}-utils%{?_isa} >= 0.11
Requires: device-mapper-multipath
%description mpath
The libblockdev library plugin (and in the same time a standalone library)
providing the functionality related to multipath devices.
%package mpath-devel
Summary: Development files for the libblockdev-mpath plugin/library
Requires: %{name}-mpath%{?_isa} = %{version}-%{release}
Requires: %{name}-utils-devel%{?_isa}
Requires: glib2-devel
%description mpath-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-mpath plugin/library.
%endif
%if %{with_nvdimm}
%package nvdimm
BuildRequires: ndctl-devel
BuildRequires: libuuid-devel
Summary: The NVDIMM plugin for the libblockdev library
Requires: %{name}-utils%{?_isa} >= 0.11
Requires: ndctl
%description nvdimm
The libblockdev library plugin (and in the same time a standalone library)
providing the functionality related to operations with NVDIMM devices.
%package nvdimm-devel
Summary: Development files for the libblockdev-nvdimm plugin/library
Requires: %{name}-nvdimm%{?_isa} = %{version}-%{release}
Requires: %{name}-utils-devel%{?_isa}
Requires: glib2-devel
%description nvdimm-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-nvdimm plugin/library.
%endif
%if %{with_part}
%package part
BuildRequires: parted-devel
Summary: The partitioning plugin for the libblockdev library
Requires: %{name}-utils%{?_isa} >= 0.11
Requires: device-mapper-multipath
Requires: gdisk
Requires: util-linux
%description part
The libblockdev library plugin (and in the same time a standalone library)
providing the functionality related to partitioning.
%package part-devel
Summary: Development files for the libblockdev-part plugin/library
Requires: %{name}-part%{?_isa} = %{version}-%{release}
Requires: %{name}-utils-devel%{?_isa}
Requires: glib2-devel
%description part-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-part plugin/library.
%endif
%if %{with_swap}
%package swap
Summary: The swap plugin for the libblockdev library
Requires: %{name}-utils%{?_isa} >= 0.11
Requires: util-linux
%description swap
The libblockdev library plugin (and in the same time a standalone library)
providing the functionality related to swap devices.
%package swap-devel
Summary: Development files for the libblockdev-swap plugin/library
Requires: %{name}-swap%{?_isa} = %{version}-%{release}
Requires: %{name}-utils-devel%{?_isa}
Requires: glib2-devel
%description swap-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-swap plugin/library.
%endif
%if %{with_vdo}
%package vdo
BuildRequires: libbytesize-devel
BuildRequires: libyaml-devel
Summary: The vdo plugin for the libblockdev library
Requires: %{name}-utils%{?_isa} >= 0.11
Requires: vdo
Requires: kmod-kvdo
%description vdo
The libblockdev library plugin (and in the same time a standalone library)
providing the functionality related to VDO devices.
%package vdo-devel
Summary: Development files for the libblockdev-vdo plugin/library
Requires: %{name}-vdo%{?_isa} = %{version}-%{release}
Requires: %{name}-utils-devel%{?_isa}
Requires: glib2-devel
%description vdo-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-vdo plugin/library.
%endif
%ifarch s390 s390x
%package s390
Summary: The s390 plugin for the libblockdev library
Requires: s390utils
%description s390
The libblockdev library plugin (and in the same time a standalone library)
providing the functionality related to s390 devices.
%package s390-devel
Summary: Development files for the libblockdev-s390 plugin/library
Requires: %{name}-s390%{?_isa} = %{version}-%{release}
Requires: %{name}-utils-devel%{?_isa}
Requires: glib2-devel
%description s390-devel
This package contains header files and pkg-config files needed for development
with the libblockdev-s390 plugin/library.
%endif
%package plugins-all
Summary: Meta-package that pulls all the libblockdev plugins as dependencies
Requires: %{name}%{?_isa} = %{version}-%{release}
%if %{with_btrfs}
Requires: %{name}-btrfs%{?_isa} = %{version}-%{release}
%endif
%if %{with_crypto}
Requires: %{name}-crypto%{?_isa} = %{version}-%{release}
%endif
%if %{with_dm}
Requires: %{name}-dm%{?_isa} = %{version}-%{release}
%endif
%if %{with_fs}
Requires: %{name}-fs%{?_isa} = %{version}-%{release}
%endif
%if %{with_kbd}
Requires: %{name}-kbd%{?_isa} = %{version}-%{release}
%endif
%if %{with_loop}
Requires: %{name}-loop%{?_isa} = %{version}-%{release}
%endif
%if %{with_lvm}
Requires: %{name}-lvm%{?_isa} = %{version}-%{release}
%endif
%if %{with_mdraid}
Requires: %{name}-mdraid%{?_isa} = %{version}-%{release}
%endif
%if %{with_mpath}
Requires: %{name}-mpath%{?_isa} = %{version}-%{release}
%endif
%if %{with_nvdimm}
Requires: %{name}-nvdimm%{?_isa} = %{version}-%{release}
%endif
%if %{with_part}
Requires: %{name}-part%{?_isa} = %{version}-%{release}
%endif
%if %{with_swap}
Requires: %{name}-swap%{?_isa} = %{version}-%{release}
%endif
%if %{with_vdo}
Requires: %{name}-vdo%{?_isa} = %{version}-%{release}
%endif
%ifarch s390 s390x
Requires: %{name}-s390%{?_isa} = %{version}-%{release}
%endif
%description plugins-all
A meta-package that pulls all the libblockdev plugins as dependencies.
%prep
%setup -q -n %{name}-%{version}
%build
%configure %{?configure_opts}
%{__make} %{?_smp_mflags}
%install
%{make_install}
find %{buildroot} -type f -name "*.la" | xargs %{__rm}
%ldconfig_scriptlets
%ldconfig_scriptlets utils
%if %{with_btrfs}
%ldconfig_scriptlets btrfs
%endif
%if %{with_crypto}
%ldconfig_scriptlets crypto
%endif
%if %{with_dm}
%ldconfig_scriptlets dm
%endif
%if %{with_fs}
%ldconfig_scriptlets fs
%endif
%if %{with_loop}
%ldconfig_scriptlets loop
%endif
%if %{with_lvm}
%ldconfig_scriptlets lvm
%endif
%if %{with_lvm_dbus}
%ldconfig_scriptlets lvm-dbus
%endif
%if %{with_mdraid}
%ldconfig_scriptlets mdraid
%endif
%if %{with_mpath}
%ldconfig_scriptlets mpath
%endif
%if %{with_nvdimm}
%ldconfig_scriptlets nvdimm
%endif
%if %{with_part}
%ldconfig_scriptlets part
%endif
%if %{with_swap}
%ldconfig_scriptlets swap
%endif
%if %{with_vdo}
%ldconfig_scriptlets vdo
%endif
%ifarch s390 s390x
%ldconfig_scriptlets s390
%endif
%if %{with_kbd}
%ldconfig_scriptlets kbd
%endif
%files
%{!?_licensedir:%global license %%doc}
%license LICENSE
%{_libdir}/libblockdev.so.*
%if %{with_gi}
%{_libdir}/girepository*/BlockDev*.typelib
%endif
%dir %{_sysconfdir}/libblockdev
%dir %{_sysconfdir}/libblockdev/conf.d
%config %{_sysconfdir}/libblockdev/conf.d/00-default.cfg
%files devel
%doc features.rst specs.rst
%{_libdir}/libblockdev.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/blockdev.h
%{_includedir}/blockdev/plugins.h
%{_libdir}/pkgconfig/blockdev.pc
%if %{with_gtk_doc}
%{_datadir}/gtk-doc/html/libblockdev
%endif
%if %{with_gi}
%{_datadir}/gir*/BlockDev*.gir
%endif
%if %{with_python2}
%files -n python2-blockdev
%{python2_sitearch}/gi/overrides/*
%endif
%if %{with_python3}
%files -n python3-blockdev
%{python3_sitearch}/gi/overrides/BlockDev*
%{python3_sitearch}/gi/overrides/__pycache__/BlockDev*
%endif
%files utils
%{_libdir}/libbd_utils.so.*
%{_libdir}/libbd_part_err.so.*
%files utils-devel
%{_libdir}/libbd_utils.so
%{_libdir}/libbd_part_err.so
%{_libdir}/pkgconfig/blockdev-utils.pc
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/utils.h
%{_includedir}/blockdev/sizes.h
%{_includedir}/blockdev/exec.h
%{_includedir}/blockdev/extra_arg.h
%{_includedir}/blockdev/dev_utils.h
%{_includedir}/blockdev/module.h
%if %{with_btrfs}
%files btrfs
%{_libdir}/libbd_btrfs.so.*
%files btrfs-devel
%{_libdir}/libbd_btrfs.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/btrfs.h
%endif
%if %{with_crypto}
%files crypto
%{_libdir}/libbd_crypto.so.*
%files crypto-devel
%{_libdir}/libbd_crypto.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/crypto.h
%endif
%if %{with_dm}
%files dm
%{_libdir}/libbd_dm.so.*
%files dm-devel
%{_libdir}/libbd_dm.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/dm.h
%endif
%if %{with_fs}
%files fs
%{_libdir}/libbd_fs.so.*
%files fs-devel
%{_libdir}/libbd_fs.so
%dir %{_includedir}/blockdev
%dir %{_includedir}/blockdev/fs
%{_includedir}/blockdev/fs.h
%{_includedir}/blockdev/fs/*.h
%endif
%if %{with_kbd}
%files kbd
%{_libdir}/libbd_kbd.so.*
%files kbd-devel
%{_libdir}/libbd_kbd.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/kbd.h
%endif
%if %{with_loop}
%files loop
%{_libdir}/libbd_loop.so.*
%files loop-devel
%{_libdir}/libbd_loop.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/loop.h
%endif
%if %{with_lvm}
%files lvm
%{_libdir}/libbd_lvm.so.*
%files lvm-devel
%{_libdir}/libbd_lvm.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/lvm.h
%endif
%if %{with_lvm_dbus}
%files lvm-dbus
%{_libdir}/libbd_lvm-dbus.so.*
%config %{_sysconfdir}/libblockdev/conf.d/10-lvm-dbus.cfg
%files lvm-dbus-devel
%{_libdir}/libbd_lvm-dbus.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/lvm.h
%endif
%if %{with_mdraid}
%files mdraid
%{_libdir}/libbd_mdraid.so.*
%files mdraid-devel
%{_libdir}/libbd_mdraid.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/mdraid.h
%endif
%if %{with_mpath}
%files mpath
%{_libdir}/libbd_mpath.so.*
%files mpath-devel
%{_libdir}/libbd_mpath.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/mpath.h
%endif
%if %{with_nvdimm}
%files nvdimm
%{_libdir}/libbd_nvdimm.so.*
%files nvdimm-devel
%{_libdir}/libbd_nvdimm.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/nvdimm.h
%endif
%if %{with_part}
%files part
%{_libdir}/libbd_part.so.*
%files part-devel
%{_libdir}/libbd_part.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/part.h
%endif
%if %{with_swap}
%files swap
%{_libdir}/libbd_swap.so.*
%files swap-devel
%{_libdir}/libbd_swap.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/swap.h
%endif
%if %{with_vdo}
%files vdo
%{_libdir}/libbd_vdo.so.*
%files vdo-devel
%{_libdir}/libbd_vdo.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/vdo.h
%endif
%ifarch s390 s390x
%files s390
%{_libdir}/libbd_s390.so.*
%files s390-devel
%{_libdir}/libbd_s390.so
%dir %{_includedir}/blockdev
%{_includedir}/blockdev/s390.h
%endif
%files plugins-all
%changelog
* Wed Jun 20 2018 Vojtech Trefny <vtrefny@redhat.com> - 2.18-1
- Add VDO to features.rst (vtrefny)
- Remove roadmap.rst (vtrefny)
- vdo: Add tests for bd_vdo_grow_physical() (tbzatek)
- Do not try to build VDO plugin on Fedora (vtrefny)
- Introduce reporting function per thread (kailueke)
- vdo: Implement bd_vdo_grow_physical() (tbzatek)
- Correct arguments for ext4 repair with progress (kailueke)
- Clarify that checking an RW-mounted XFS file system is impossible (v.podzimek)
- vdo: Resolve real device file path (tbzatek)
- Adjust to new NVDIMM namespace modes (vtrefny)
- Use xfs_repair instead of xfs_db in bd_fs_xfs_check() (v.podzimek)
- Allow compiling libblockdev without libdmraid (vtrefny)
- Only require plugins we really need in LVM dbus tests (vtrefny)
- Add tests for VDO plugin (vtrefny)
- Add decimal units definition to utils/sizes.h (vtrefny)
- Add basic VDO plugin functionality (vtrefny)
- Add the VDO plugin (vtrefny)
- Always check for error when (un)mounting (vtrefny)
- Fix off-by-one error when counting TCRYPT keyfiles (segfault)
- Add 'bd_dm_is_tech_avail' to header file (vtrefny)
- Fix release number in NEWS.rst (vtrefny)
- Update specs.rst and features.rst (vtrefny)
* Tue Apr 24 2018 Vojtech Trefny <vtrefny@redhat.com> - 2.17-1
- Redirect cryptsetup log to libblockdev log (vtrefny)
- Add a generic logging function for libblockdev (vtrefny)
- Add functions to resize LUKS 2 (vtrefny)
- Add function to get information about LUKS 2 integrity devices (vtrefny)
- Add function to get information about a LUKS device (vtrefny)
- Add a basic test for creating LUKS 2 format (vtrefny)
- Use libblockdev function to create LUKS 2 in tests (vtrefny)
- Add support for creating LUKS 2 format (vtrefny)
- Skip bcache tests on Rawhide (vtrefny)
- Allow building libblockdev without Python 2 support (vtrefny)
- Allow compiling libblockdev crypto plugin without escrow support (vtrefny)
- Require at least libndctl 58.4 (vtrefny)
- New function for luks metadata size (japokorn)
- Add functions to backup and restore LUKS header (vtrefny)
- Add function for killing keyslot on a LUKS device (vtrefny)
- Add functions to suspend and resume a LUKS device (vtrefny)
- Use '=' instead of '==' to compare using 'test' (v.podzimek)
- lvm-dbus: Check returned job object for error (vtrefny)
- Get sector size for non-block NVDIMM namespaces too (vtrefny)
- Fix memory leaks discovered by clang (vtrefny)
- Add new functions to docs/libblockdev-sections.txt (segfault)
- Make a link point to the relevant section (segfault)
- Don't use VeraCrypt PIM if compiled against libcryptsetup < 2.0 (segfault)
- Make keyfiles parameter to bd_crypto_tc_open_full zero terminated (segfault)
- Add function bd_crypto_device_seems_encrypted (segfault)
- Support VeraCrypt PIM (segfault)
- Support TCRYPT system volumes (segfault)
- Support TCRYPT hidden containers (segfault)
- Support TCRYPT keyfiles (segfault)
- Support unlocking VeraCrypt volumes (segfault)
- Enforce ZERO_INIT gcc backwards compatibility (bjornpagen)
- Add function for getting NVDIMM namespace name from devname or path (vtrefny)
- Add --without-xyz to DISTCHECK_CONFIGURE_FLAGS for disabled plugins (vtrefny)
- Add tests for the NVDIMM plugin (vtrefny)
- Add the NVDIMM plugin (vtrefny)
- Fix build with clang (bjornpagen)
- s390: don't hardcode paths, search PATH (flokli)
- Fix build against musl libc (bjornpagen)
- Fix python2-gobject-base dependency on Fedora 26 and older (vtrefny)
- Sync the spec file with downstream (vtrefny)
* Thu Feb 08 2018 Vojtech Trefny <vtrefny@redhat.com> - 2.16-1