-
Notifications
You must be signed in to change notification settings - Fork 139
/
ndctl.spec.in
257 lines (210 loc) · 7.19 KB
/
ndctl.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
Name: ndctl
Version: VERSION
Release: 1%{?dist}
Summary: Manage "libnvdimm" subsystem devices (Non-volatile Memory)
License: GPL-2.0-only AND LGPL-2.1-only AND CC0-1.0 AND MIT
Url: https://github.com/pmem/ndctl
Source0: https://github.com/pmem/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Requires: LNAME%{?_isa} = %{version}-%{release}
Requires: DAX_LNAME%{?_isa} = %{version}-%{release}
Requires: CXL_LNAME%{?_isa} = %{version}-%{release}
BuildRequires: autoconf
%if 0%{?rhel} && 0%{?rhel} < 9
BuildRequires: asciidoc
%define asciidoctor -Dasciidoctor=disabled
%define libtracefs -Dlibtracefs=disabled
%else
BuildRequires: rubygem-asciidoctor
BuildRequires: libtraceevent-devel
BuildRequires: libtracefs-devel
%define asciidoctor -Dasciidoctor=enabled
%define libtracefs -Dlibtracefs=enabled
%endif
BuildRequires: xmlto
BuildRequires: automake
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libkmod)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(json-c)
BuildRequires: pkgconfig(bash-completion)
BuildRequires: pkgconfig(systemd)
BuildRequires: keyutils-libs-devel
BuildRequires: systemd-rpm-macros
BuildRequires: iniparser-devel
BuildRequires: meson
%description
Utility library for managing the "libnvdimm" subsystem. The "libnvdimm"
subsystem defines a kernel device model and control message interface for
platform NVDIMM resources like those defined by the ACPI 6+ NFIT (NVDIMM
Firmware Interface Table).
%if 0%{?flatpak}
%global _udevrulesdir %{_prefix}/lib/udev/rules.d
%endif
%package -n DNAME
Summary: Development files for libndctl
License: LGPL-2.1-only
Requires: LNAME%{?_isa} = %{version}-%{release}
%description -n DNAME
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package -n daxctl
Summary: Manage Device-DAX instances
License: GPL-2.0-only
Requires: DAX_LNAME%{?_isa} = %{version}-%{release}
%description -n daxctl
The daxctl utility provides enumeration and provisioning commands for
the Linux kernel Device-DAX facility. This facility enables DAX mappings
of performance / feature differentiated memory without need of a
filesystem.
%package -n cxl-cli
Summary: Manage CXL devices
License: GPL-2.0-only
Requires: CXL_LNAME%{?_isa} = %{version}-%{release}
%description -n cxl-cli
The cxl utility provides enumeration and provisioning commands for
the Linux kernel CXL devices.
%package -n CXL_DNAME
Summary: Development files for libcxl
License: LGPL-2.1-only
Requires: CXL_LNAME%{?_isa} = %{version}-%{release}
%description -n CXL_DNAME
This package contains libraries and header files for developing applications
that use libcxl, a library for enumerating and communicating with CXL devices.
%package -n DAX_DNAME
Summary: Development files for libdaxctl
License: LGPL-2.1-only
Requires: DAX_LNAME%{?_isa} = %{version}-%{release}
%description -n DAX_DNAME
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}, a library for enumerating
"Device DAX" devices. Device DAX is a facility for establishing DAX
mappings of performance / feature-differentiated memory.
%package -n LNAME
Summary: Management library for "libnvdimm" subsystem devices (Non-volatile Memory)
License: LGPL-2.1-only AND CC0-1.0 AND MIT
Requires: DAX_LNAME%{?_isa} = %{version}-%{release}
%description -n LNAME
Libraries for %{name}.
%package -n DAX_LNAME
Summary: Management library for "Device DAX" devices
License: LGPL-2.1-only AND CC0-1.0 AND MIT
%description -n DAX_LNAME
Device DAX is a facility for establishing DAX mappings of performance /
feature-differentiated memory. DAX_LNAME provides an enumeration /
control API for these devices.
%package -n CXL_LNAME
Summary: Management library for CXL devices
License: LGPL-2.1-only AND CC0-1.0 AND MIT
%description -n CXL_LNAME
libcxl is a library for enumerating and communicating with CXL devices.
%prep
%setup -q ndctl-%{version}
%build
%meson %{?asciidoctor} %{?libtracefs} -Dversion-tag=%{version}
%meson_build
%install
%meson_install
%check
%meson_test
%ldconfig_scriptlets -n LNAME
%ldconfig_scriptlets -n DAX_LNAME
%ldconfig_scriptlets -n CXL_LNAME
%define bashcompdir %(pkg-config --variable=completionsdir bash-completion)
%pre
if [ -f %{_sysconfdir}/ndctl/monitor.conf ] ; then
if ! [ -f %{_sysconfdir}/ndctl.conf.d/monitor.conf ] ; then
cp -a %{_sysconfdir}/ndctl/monitor.conf /var/run/ndctl-monitor.conf-migration
fi
fi
%post
if [ -f /var/run/ndctl-monitor.conf-migration ] ; then
config_found=false
while read line ; do
[ -n "$line" ] || continue
case "$line" in
\#*) continue ;;
esac
config_found=true
break
done < /var/run/ndctl-monitor.conf-migration
if $config_found ; then
echo "[monitor]" > %{_sysconfdir}/ndctl.conf.d/monitor.conf
cat /var/run/ndctl-monitor.conf-migration >> %{_sysconfdir}/ndctl.conf.d/monitor.conf
fi
rm /var/run/ndctl-monitor.conf-migration
fi
%files
%defattr(-,root,root)
%license LICENSES/preferred/GPL-2.0 LICENSES/other/MIT LICENSES/other/CC0-1.0
%{_bindir}/ndctl
%{_mandir}/man1/ndctl*
%{bashcompdir}/ndctl
%{_unitdir}/ndctl-monitor.service
%dir %{_sysconfdir}/ndctl
%dir %{_sysconfdir}/ndctl/keys
%{_sysconfdir}/ndctl/keys/keys.readme
%{_sysconfdir}/modprobe.d/nvdimm-security.conf
%dir %{_sysconfdir}/ndctl.conf.d
%config(noreplace) %{_sysconfdir}/ndctl.conf.d/monitor.conf
%config(noreplace) %{_sysconfdir}/ndctl.conf.d/ndctl.conf
%files -n daxctl
%defattr(-,root,root)
%license LICENSES/preferred/GPL-2.0 LICENSES/other/MIT LICENSES/other/CC0-1.0
%{_bindir}/daxctl
%{_mandir}/man1/daxctl*
%{_datadir}/daxctl
%{bashcompdir}/daxctl
%{_unitdir}/[email protected]
%config %{_udevrulesdir}/90-daxctl-device.rules
%dir %{_sysconfdir}/daxctl.conf.d/
%config(noreplace) %{_sysconfdir}/daxctl.conf.d/daxctl.example.conf
%files -n cxl-cli
%defattr(-,root,root)
%license LICENSES/preferred/GPL-2.0 LICENSES/other/MIT LICENSES/other/CC0-1.0
%{_bindir}/cxl
%{_mandir}/man1/cxl*
%{bashcompdir}/cxl
%{_unitdir}/cxl-monitor.service
%files -n LNAME
%defattr(-,root,root)
%doc README.md
%license LICENSES/preferred/LGPL-2.1 LICENSES/other/MIT LICENSES/other/CC0-1.0
%{_libdir}/libndctl.so.*
%files -n DAX_LNAME
%defattr(-,root,root)
%doc README.md
%license LICENSES/preferred/LGPL-2.1 LICENSES/other/MIT LICENSES/other/CC0-1.0
%{_libdir}/libdaxctl.so.*
%files -n CXL_LNAME
%defattr(-,root,root)
%doc README.md
%license LICENSES/preferred/LGPL-2.1 LICENSES/other/MIT LICENSES/other/CC0-1.0
%{_libdir}/libcxl.so.*
%files -n DNAME
%defattr(-,root,root)
%license LICENSES/preferred/LGPL-2.1
%{_includedir}/ndctl/
%{_libdir}/libndctl.so
%{_libdir}/pkgconfig/libndctl.pc
%files -n DAX_DNAME
%defattr(-,root,root)
%license LICENSES/preferred/LGPL-2.1
%{_includedir}/daxctl/
%{_libdir}/libdaxctl.so
%{_libdir}/pkgconfig/libdaxctl.pc
%files -n CXL_DNAME
%defattr(-,root,root)
%license LICENSES/preferred/LGPL-2.1
%{_includedir}/cxl/
%{_libdir}/libcxl.so
%{_libdir}/pkgconfig/libcxl.pc
%{_mandir}/man3/cxl*
%{_mandir}/man3/libcxl.3*
%changelog
* Fri May 27 2016 Dan Williams <[email protected]> - 53-1
- add daxctl-libs + daxctl-devel packages
- add bash completion
* Mon Apr 04 2016 Dan Williams <[email protected]> - 52-1
- Initial rpm submission to Fedora