diff options
Diffstat (limited to 'meta/recipes-core/util-linux/util-linux_2.39.3.bb')
-rw-r--r-- | meta/recipes-core/util-linux/util-linux_2.39.3.bb | 348 |
1 files changed, 348 insertions, 0 deletions
diff --git a/meta/recipes-core/util-linux/util-linux_2.39.3.bb b/meta/recipes-core/util-linux/util-linux_2.39.3.bb new file mode 100644 index 0000000000..2cd7750afc --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux_2.39.3.bb | |||
@@ -0,0 +1,348 @@ | |||
1 | require util-linux.inc | ||
2 | |||
3 | inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest gtk-doc | ||
4 | DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-libuuid" | ||
5 | |||
6 | PACKAGES =+ "${PN}-swaponoff" | ||
7 | PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', '${PN}-pylibmount', '', d)}" | ||
8 | |||
9 | python util_linux_binpackages () { | ||
10 | def pkg_hook(f, pkg, file_regex, output_pattern, modulename): | ||
11 | pn = d.getVar('PN') | ||
12 | d.appendVar('RRECOMMENDS:%s' % pn, ' %s' % pkg) | ||
13 | |||
14 | if d.getVar('ALTERNATIVE:' + pkg): | ||
15 | return | ||
16 | if d.getVarFlag('ALTERNATIVE_LINK_NAME', modulename): | ||
17 | d.setVar('ALTERNATIVE:' + pkg, modulename) | ||
18 | |||
19 | bindirs = sorted(list(set(d.expand("${base_sbindir} ${base_bindir} ${sbindir} ${bindir}").split()))) | ||
20 | for dir in bindirs: | ||
21 | do_split_packages(d, root=dir, | ||
22 | file_regex=r'(.*)', output_pattern='${PN}-%s', | ||
23 | description='${PN} %s', | ||
24 | hook=pkg_hook, extra_depends='') | ||
25 | |||
26 | # There are some symlinks for some binaries which we have ignored | ||
27 | # above. Add them to the package owning the binary they are | ||
28 | # pointing to | ||
29 | extras = {} | ||
30 | dvar = d.getVar('PKGD') | ||
31 | for root in bindirs: | ||
32 | for walkroot, dirs, files in os.walk(dvar + root): | ||
33 | for f in files: | ||
34 | file = os.path.join(walkroot, f) | ||
35 | if not os.path.islink(file): | ||
36 | continue | ||
37 | |||
38 | pkg = os.path.basename(os.readlink(file)) | ||
39 | extras.setdefault(pkg, []) | ||
40 | extras[pkg].append(file.replace(dvar, '', 1)) | ||
41 | |||
42 | pn = d.getVar('PN') | ||
43 | for pkg, links in extras.items(): | ||
44 | of = d.getVar('FILES:' + pn + '-' + pkg) | ||
45 | links = of + " " + " ".join(sorted(links)) | ||
46 | d.setVar('FILES:' + pn + '-' + pkg, links) | ||
47 | } | ||
48 | |||
49 | # we must execute before update-alternatives PACKAGE_PREPROCESS_FUNCS | ||
50 | PACKAGE_PREPROCESS_FUNCS =+ "util_linux_binpackages " | ||
51 | |||
52 | # skip libuuid as it will be packaged by the util-linux-libuuid recipe | ||
53 | python util_linux_libpackages() { | ||
54 | do_split_packages(d, root=d.getVar('UTIL_LINUX_LIBDIR'), file_regex=r'^lib(?!uuid)(.*)\.so\..*$', | ||
55 | output_pattern='${PN}-lib%s', | ||
56 | description='${PN} lib%s', | ||
57 | extra_depends='', prepend=True, allow_links=True) | ||
58 | } | ||
59 | |||
60 | PACKAGESPLITFUNCS =+ "util_linux_libpackages" | ||
61 | |||
62 | PACKAGES_DYNAMIC = "^${PN}-.*" | ||
63 | |||
64 | UTIL_LINUX_LIBDIR = "${libdir}" | ||
65 | UTIL_LINUX_LIBDIR:class-target = "${base_libdir}" | ||
66 | EXTRA_OECONF = "\ | ||
67 | --enable-libuuid --enable-libblkid \ | ||
68 | \ | ||
69 | --enable-fsck --enable-kill --enable-last --enable-mesg \ | ||
70 | --enable-mount --enable-partx --enable-rfkill \ | ||
71 | --enable-unshare --enable-write \ | ||
72 | \ | ||
73 | --disable-bfs --disable-login \ | ||
74 | --disable-makeinstall-chown --disable-minix --disable-newgrp \ | ||
75 | --disable-use-tty-group --disable-vipw --disable-raw \ | ||
76 | \ | ||
77 | --without-udev \ | ||
78 | \ | ||
79 | usrsbin_execdir='${sbindir}' \ | ||
80 | --libdir='${UTIL_LINUX_LIBDIR}' \ | ||
81 | " | ||
82 | |||
83 | EXTRA_OECONF:append:class-target = " --enable-setpriv" | ||
84 | EXTRA_OECONF:append:class-native = " --without-cap-ng --disable-setpriv" | ||
85 | EXTRA_OECONF:append:class-nativesdk = " --without-cap-ng --disable-setpriv" | ||
86 | EXTRA_OECONF:append = " --disable-hwclock-gplv3" | ||
87 | |||
88 | # enable pcre2 for native/nativesdk to match host distros | ||
89 | # this helps to keep same expectations when using the SDK or | ||
90 | # build host versions during development | ||
91 | # | ||
92 | PACKAGECONFIG ?= "pcre2" | ||
93 | PACKAGECONFIG:class-target ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'chfn-chsh pam', '', d)}" | ||
94 | # inherit manpages requires this to be present, however util-linux does not have | ||
95 | # configuration options, and installs manpages always | ||
96 | PACKAGECONFIG[manpages] = "" | ||
97 | PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam," | ||
98 | # Respect the systemd feature for uuidd | ||
99 | PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_system_unitdir}, --without-systemd --without-systemdsystemunitdir,systemd" | ||
100 | # Build python bindings for libmount | ||
101 | PACKAGECONFIG[pylibmount] = "--with-python=3 --enable-pylibmount,--without-python --disable-pylibmount,python3" | ||
102 | # Readline support | ||
103 | PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" | ||
104 | # PCRE support in hardlink | ||
105 | PACKAGECONFIG[pcre2] = ",,libpcre2" | ||
106 | PACKAGECONFIG[cryptsetup] = "--with-cryptsetup,--without-cryptsetup,cryptsetup" | ||
107 | PACKAGECONFIG[chfn-chsh] = "--enable-chfn-chsh,--disable-chfn-chsh," | ||
108 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux" | ||
109 | |||
110 | EXTRA_OEMAKE = "ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'" | ||
111 | |||
112 | ALLOW_EMPTY:${PN} = "1" | ||
113 | FILES:${PN} = "" | ||
114 | FILES:${PN}-doc += "${datadir}/getopt/getopt-*.*" | ||
115 | FILES:${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la" | ||
116 | FILES:${PN}-mount = "${sysconfdir}/default/mountall" | ||
117 | FILES:${PN}-runuser = "${sysconfdir}/pam.d/runuser*" | ||
118 | FILES:${PN}-su = "${sysconfdir}/pam.d/su-l" | ||
119 | CONFFILES:${PN}-su = "${sysconfdir}/pam.d/su-l" | ||
120 | FILES:${PN}-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \ | ||
121 | ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \ | ||
122 | ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*" | ||
123 | |||
124 | # Util-linux' blkid replaces the e2fsprogs one | ||
125 | RCONFLICTS:${PN}-blkid = "${MLPREFIX}e2fsprogs-blkid" | ||
126 | RREPLACES:${PN}-blkid = "${MLPREFIX}e2fsprogs-blkid" | ||
127 | |||
128 | RRECOMMENDS:${PN}:class-native = "" | ||
129 | RRECOMMENDS:${PN}:class-nativesdk = "" | ||
130 | RDEPENDS:${PN}:class-native = "" | ||
131 | RDEPENDS:${PN}:class-nativesdk = "" | ||
132 | |||
133 | RDEPENDS:${PN} += " util-linux-libuuid" | ||
134 | RDEPENDS:${PN}-dev += " util-linux-libuuid-dev" | ||
135 | |||
136 | RPROVIDES:${PN}-dev = "${PN}-libblkid-dev ${PN}-libmount-dev" | ||
137 | |||
138 | RDEPENDS:${PN}-bash-completion += "${PN}-lsblk" | ||
139 | RDEPENDS:${PN}-ptest += "bash bc btrfs-tools coreutils e2fsprogs findutils grep iproute2 kmod procps sed socat which xz" | ||
140 | RRECOMMENDS:${PN}-ptest += "kernel-module-scsi-debug kernel-module-sd-mod kernel-module-loop kernel-module-algif-hash" | ||
141 | RDEPENDS:${PN}-swaponoff = "${PN}-swapon ${PN}-swapoff" | ||
142 | ALLOW_EMPTY:${PN}-swaponoff = "1" | ||
143 | |||
144 | #SYSTEMD_PACKAGES = "${PN}-uuidd ${PN}-fstrim" | ||
145 | SYSTEMD_SERVICE:${PN}-uuidd = "uuidd.socket uuidd.service" | ||
146 | SYSTEMD_AUTO_ENABLE:${PN}-uuidd = "disable" | ||
147 | SYSTEMD_SERVICE:${PN}-fstrim = "fstrim.timer fstrim.service" | ||
148 | SYSTEMD_AUTO_ENABLE:${PN}-fstrim = "disable" | ||
149 | |||
150 | do_compile:append () { | ||
151 | cp ${UNPACKDIR}/fcntl-lock.c ${S}/fcntl-lock.c | ||
152 | ${CC} ${CFLAGS} ${LDFLAGS} ${S}/fcntl-lock.c -o ${B}/fcntl-lock | ||
153 | } | ||
154 | |||
155 | do_install () { | ||
156 | # with ccache the timestamps on compiled files may | ||
157 | # end up earlier than on their inputs, this allows | ||
158 | # for the resultant compilation in the install step. | ||
159 | oe_runmake 'CC=${CC}' 'LD=${LD}' \ | ||
160 | 'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install | ||
161 | |||
162 | mkdir -p ${D}${base_bindir} | ||
163 | |||
164 | sbinprogs="agetty ctrlaltdel cfdisk vipw vigr" | ||
165 | sbinprogs_a="pivot_root hwclock mkswap losetup swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root nologin" | ||
166 | binprogs_a="dmesg getopt kill more umount mount login su mountpoint" | ||
167 | |||
168 | if [ "${base_sbindir}" != "${sbindir}" ]; then | ||
169 | mkdir -p ${D}${base_sbindir} | ||
170 | for p in $sbinprogs $sbinprogs_a; do | ||
171 | if [ -f "${D}${sbindir}/$p" ]; then | ||
172 | mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p" | ||
173 | fi | ||
174 | done | ||
175 | fi | ||
176 | |||
177 | if [ "${base_bindir}" != "${bindir}" ]; then | ||
178 | mkdir -p ${D}${base_bindir} | ||
179 | for p in $binprogs_a; do | ||
180 | if [ -f "${D}${bindir}/$p" ]; then | ||
181 | mv "${D}${bindir}/$p" "${D}${base_bindir}/$p" | ||
182 | fi | ||
183 | done | ||
184 | fi | ||
185 | |||
186 | install -d ${D}${sysconfdir}/default/ | ||
187 | echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall | ||
188 | |||
189 | rm -f ${D}${bindir}/chkdupexe | ||
190 | |||
191 | install -m 0755 ${B}/fcntl-lock ${D}${bindir} | ||
192 | } | ||
193 | |||
194 | do_install:append:class-target () { | ||
195 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'pam', d)}" ]; then | ||
196 | install -d ${D}${sysconfdir}/pam.d | ||
197 | install -m 0644 ${UNPACKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser | ||
198 | install -m 0644 ${UNPACKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l | ||
199 | # Required for "su -" aka "su --login" because | ||
200 | # otherwise it uses "other", which has "auth pam_deny.so" | ||
201 | # and thus prevents the operation. | ||
202 | ln -s su ${D}${sysconfdir}/pam.d/su-l | ||
203 | fi | ||
204 | } | ||
205 | # nologin causes a conflict with shadow-native | ||
206 | # kill causes a conflict with coreutils-native (if ${bindir}==${base_bindir}) | ||
207 | do_install:append:class-native () { | ||
208 | rm -f ${D}${base_sbindir}/nologin | ||
209 | rm -f ${D}${base_bindir}/kill | ||
210 | } | ||
211 | |||
212 | # dm-verity support introduces a circular build dependency, so util-linux-libuuid is split out for target builds | ||
213 | # Need to build libuuid for uuidgen, but then delete it and let the other recipe ship it | ||
214 | do_install:append () { | ||
215 | rm -rf ${D}${includedir}/uuid ${D}${libdir}/pkgconfig/uuid.pc ${D}${libdir}/libuuid* ${D}${base_libdir}/libuuid* | ||
216 | } | ||
217 | |||
218 | ALTERNATIVE_PRIORITY = "80" | ||
219 | |||
220 | ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid" | ||
221 | ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev" | ||
222 | ALTERNATIVE_LINK_NAME[cal] = "${bindir}/cal" | ||
223 | ALTERNATIVE_LINK_NAME[chfn] = "${bindir}/chfn" | ||
224 | ALTERNATIVE_LINK_NAME[chsh] = "${bindir}/chsh" | ||
225 | ALTERNATIVE_LINK_NAME[chrt] = "${bindir}/chrt" | ||
226 | ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg" | ||
227 | ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject" | ||
228 | ALTERNATIVE_LINK_NAME[fallocate] = "${bindir}/fallocate" | ||
229 | ALTERNATIVE_LINK_NAME[fdisk] = "${base_sbindir}/fdisk" | ||
230 | ALTERNATIVE_LINK_NAME[findfs] = "${sbindir}/findfs" | ||
231 | ALTERNATIVE_LINK_NAME[flock] = "${bindir}/flock" | ||
232 | ALTERNATIVE_LINK_NAME[fsck] = "${base_sbindir}/fsck" | ||
233 | ALTERNATIVE_LINK_NAME[fsfreeze] = "${sbindir}/fsfreeze" | ||
234 | ALTERNATIVE_LINK_NAME[fstrim] = "${base_sbindir}/fstrim" | ||
235 | ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt" | ||
236 | ALTERNATIVE:${PN}-agetty = "getty" | ||
237 | ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty" | ||
238 | ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty" | ||
239 | ALTERNATIVE_LINK_NAME[hexdump] = "${bindir}/hexdump" | ||
240 | ALTERNATIVE_LINK_NAME[hwclock] = "${base_sbindir}/hwclock" | ||
241 | ALTERNATIVE_LINK_NAME[ionice] = "${bindir}/ionice" | ||
242 | ALTERNATIVE_LINK_NAME[ipcrm] = "${bindir}/ipcrm" | ||
243 | ALTERNATIVE_LINK_NAME[ipcs] = "${bindir}/ipcs" | ||
244 | ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill" | ||
245 | ALTERNATIVE:${PN}-last = "last lastb" | ||
246 | ALTERNATIVE_LINK_NAME[last] = "${bindir}/last" | ||
247 | ALTERNATIVE_LINK_NAME[lastb] = "${bindir}/lastb" | ||
248 | ALTERNATIVE_LINK_NAME[logger] = "${bindir}/logger" | ||
249 | ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup" | ||
250 | ALTERNATIVE_LINK_NAME[mesg] = "${bindir}/mesg" | ||
251 | ALTERNATIVE_LINK_NAME[mkswap] = "${base_sbindir}/mkswap" | ||
252 | ALTERNATIVE_LINK_NAME[mcookie] = "${bindir}/mcookie" | ||
253 | ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more" | ||
254 | ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount" | ||
255 | ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint" | ||
256 | ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin" | ||
257 | ALTERNATIVE_LINK_NAME[nsenter] = "${bindir}/nsenter" | ||
258 | ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root" | ||
259 | ALTERNATIVE_LINK_NAME[prlimit] = "${bindir}/prlimit" | ||
260 | ALTERNATIVE_LINK_NAME[readprofile] = "${sbindir}/readprofile" | ||
261 | ALTERNATIVE_LINK_NAME[renice] = "${bindir}/renice" | ||
262 | ALTERNATIVE_LINK_NAME[rev] = "${bindir}/rev" | ||
263 | ALTERNATIVE_LINK_NAME[rfkill] = "${sbindir}/rfkill" | ||
264 | ALTERNATIVE_LINK_NAME[rtcwake] = "${sbindir}/rtcwake" | ||
265 | ALTERNATIVE_LINK_NAME[scriptreplay] = "${bindir}/scriptreplay" | ||
266 | ALTERNATIVE_LINK_NAME[setpriv] = "${bindir}/setpriv" | ||
267 | ALTERNATIVE_LINK_NAME[setsid] = "${bindir}/setsid" | ||
268 | ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" | ||
269 | ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" | ||
270 | ALTERNATIVE_LINK_NAME[swapoff] = "${base_sbindir}/swapoff" | ||
271 | ALTERNATIVE_LINK_NAME[swapon] = "${base_sbindir}/swapon" | ||
272 | ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root" | ||
273 | ALTERNATIVE_LINK_NAME[taskset] = "${bindir}/taskset" | ||
274 | ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount" | ||
275 | ALTERNATIVE_LINK_NAME[unshare] = "${bindir}/unshare" | ||
276 | ALTERNATIVE_LINK_NAME[utmpdump] = "${bindir}/utmpdump" | ||
277 | ALTERNATIVE_LINK_NAME[uuidgen] = "${bindir}/uuidgen" | ||
278 | ALTERNATIVE_LINK_NAME[wall] = "${bindir}/wall" | ||
279 | |||
280 | ALTERNATIVE:${PN}-doc = "\ | ||
281 | blkid.8 eject.1 findfs.8 fsck.8 kill.1 last.1 lastb.1 libblkid.3 logger.1 mesg.1 \ | ||
282 | mountpoint.1 nologin.8 rfkill.8 sulogin.8 utmpdump.1 uuid.3 wall.1\ | ||
283 | " | ||
284 | ALTERNATIVE:${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'pam', 'su.1', '', d)}" | ||
285 | ALTERNATIVE:${PN}-doc += "${@bb.utils.contains('PACKAGECONFIG', 'chfn-chsh', 'chfn.1 chsh.1', '', d)}" | ||
286 | |||
287 | ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8" | ||
288 | ALTERNATIVE_LINK_NAME[chfn.1] = "${mandir}/man1/chfn.1" | ||
289 | ALTERNATIVE_LINK_NAME[chsh.1] = "${mandir}/man1/chsh.1" | ||
290 | ALTERNATIVE_LINK_NAME[eject.1] = "${mandir}/man1/eject.1" | ||
291 | ALTERNATIVE_LINK_NAME[findfs.8] = "${mandir}/man8/findfs.8" | ||
292 | ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8" | ||
293 | ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" | ||
294 | ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1" | ||
295 | ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1" | ||
296 | ALTERNATIVE_LINK_NAME[libblkid.3] = "${mandir}/man3/libblkid.3" | ||
297 | ALTERNATIVE_LINK_NAME[logger.1] = "${mandir}/man1/logger.1" | ||
298 | ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1" | ||
299 | ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1" | ||
300 | ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8" | ||
301 | ALTERNATIVE_LINK_NAME[rfkill.8] = "${mandir}/man8/rfkill.8" | ||
302 | ALTERNATIVE_LINK_NAME[setpriv.1] = "${mandir}/man1/setpriv.1" | ||
303 | ALTERNATIVE_LINK_NAME[su.1] = "${mandir}/man1/su.1" | ||
304 | ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8" | ||
305 | ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1" | ||
306 | ALTERNATIVE_LINK_NAME[uuid.3] = "${mandir}/man3/uuid.3" | ||
307 | ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1" | ||
308 | |||
309 | BBCLASSEXTEND = "native nativesdk" | ||
310 | |||
311 | PTEST_BINDIR = "1" | ||
312 | do_compile_ptest() { | ||
313 | oe_runmake buildtest-TESTS | ||
314 | } | ||
315 | |||
316 | do_install_ptest() { | ||
317 | mkdir -p ${D}${PTEST_PATH}/tests/ts | ||
318 | find . -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; | ||
319 | find ./.libs -name 'sample*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; | ||
320 | find ./.libs -name 'test*' -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \; | ||
321 | |||
322 | cp ${S}/tests/*.sh ${D}${PTEST_PATH}/tests/ | ||
323 | cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected | ||
324 | cp -pR ${S}/tests/ts ${D}${PTEST_PATH}/tests/ | ||
325 | cp ${B}/config.h ${D}${PTEST_PATH} | ||
326 | |||
327 | sed -i 's|@base_sbindir@|${base_sbindir}|g' ${D}${PTEST_PATH}/run-ptest | ||
328 | |||
329 | # chfn needs PAM | ||
330 | if ! ${@bb.utils.contains('PACKAGECONFIG', 'pam', 'true', 'false', d)}; then | ||
331 | rm -rf ${D}${PTEST_PATH}/tests/ts/chfn | ||
332 | fi | ||
333 | # remove raid tests, known failures and avoid dependency on mdadm therefore | ||
334 | # See https://github.com/util-linux/util-linux/commit/7519c3edab120b14623931d5ddb16fdc6e7cad5d | ||
335 | rm -rf ${D}${PTEST_PATH}/tests/ts/blkid/md-raid0-whole | ||
336 | rm -rf ${D}${PTEST_PATH}/tests/ts/blkid/md-raid1-part | ||
337 | rm -rf ${D}${PTEST_PATH}/tests/ts/blkid/md-raid1-whole | ||
338 | rm -rf ${D}${PTEST_PATH}/tests/ts/fdisk/align-512-4K-md | ||
339 | } | ||
340 | |||
341 | # Delete tests not working on musl | ||
342 | do_install_ptest:append:libc-musl() { | ||
343 | for t in tests/ts/col/multibyte \ | ||
344 | tests/ts/lib/timeutils \ | ||
345 | tests/ts/dmesg/limit; do | ||
346 | rm -rf ${D}${PTEST_PATH}/$t | ||
347 | done | ||
348 | } | ||