Magellan Linux

Contents of /trunk/dracut/patches/dracut-059-busybox.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3745 - (show annotations) (download)
Fri Jul 28 08:50:35 2023 UTC (9 months, 4 weeks ago) by niro
File size: 51368 byte(s)
-merged with busybox-fsfreeze patch too
1 diff -Naur dracut-059/dracut-init.sh dracut-059-busybox/dracut-init.sh
2 --- dracut-059/dracut-init.sh 2022-12-24 17:49:27.000000000 +0100
3 +++ dracut-059-busybox/dracut-init.sh 2023-07-28 10:10:36.579594976 +0200
4 @@ -20,9 +20,9 @@
5 export LC_MESSAGES=C
6
7 if [[ $EUID == "0" ]] && ! [[ $DRACUT_NO_XATTR ]]; then
8 - export DRACUT_CP="cp --reflink=auto --sparse=auto --preserve=mode,timestamps,xattr,links -dfr"
9 + export DRACUT_CP="cp -dfrp"
10 else
11 - export DRACUT_CP="cp --reflink=auto --sparse=auto --preserve=mode,timestamps,links -dfr"
12 + export DRACUT_CP="cp -dfrp"
13 fi
14
15 # is_func <command>
16 @@ -1167,7 +1167,7 @@
17 return $_ret
18 }
19
20 -if [[ "$(ln --help)" == *--relative* ]]; then
21 +if [[ "$(ln --help &> /dev/null)" == *--relative* ]]; then
22 ln_r() {
23 ln -sfnr "${initdir}/$1" "${initdir}/$2"
24 }
25 diff -Naur dracut-059/dracut.sh dracut-059-busybox/dracut.sh
26 --- dracut-059/dracut.sh 2022-12-24 17:49:27.000000000 +0100
27 +++ dracut-059-busybox/dracut.sh 2023-07-28 10:49:16.847062633 +0200
28 @@ -343,7 +343,7 @@
29 printf "%s\n" "${i##*/}"
30 fi
31 done
32 - done | sort -Vu | {
33 + done | sort -u | {
34 readarray -t files
35
36 for f in "${files[@]}"; do
37 @@ -1227,7 +1227,7 @@
38 fi
39
40 # shellcheck disable=SC2155
41 -readonly TMPDIR="$(realpath -e "$tmpdir")"
42 +readonly TMPDIR="$(realpath "$tmpdir")"
43 [ -d "$TMPDIR" ] || {
44 printf "%s\n" "dracut: Invalid tmpdir '$tmpdir'." >&2
45 exit 1
46 @@ -1254,7 +1254,7 @@
47 ret=$?;
48 [[ $keep ]] && echo "Not removing $DRACUT_TMPDIR." >&2 || { [[ $DRACUT_TMPDIR ]] && rm -rf -- "$DRACUT_TMPDIR"; };
49 if [[ ${FSFROZEN} ]]; then
50 - fsfreeze -u "${FSFROZEN}"
51 + fsfreeze --unfreeze "${FSFROZEN}"
52 fi
53 exit $ret;
54 ' EXIT
55 @@ -2216,11 +2216,12 @@
56 if ! [[ -e $object_destdir ]]; then
57 # shellcheck disable=SC2174
58 mkdir -m 0755 -p "$object_destdir"
59 - chmod --reference="$objectname" "$object_destdir"
60 + chmod $(stat -c %a "$objectname") "$object_destdir"
61 fi
62 - $DRACUT_CP -t "$object_destdir" "$dracutsysrootdir$objectname"/.
63 + $DRACUT_CP "$dracutsysrootdir$objectname"/. "$object_destdir"
64 +
65 else
66 - $DRACUT_CP -t "$destdir" "$dracutsysrootdir$objectname"
67 + $DRACUT_CP "$dracutsysrootdir$objectname" "$destdir"
68 fi
69 done
70 eval "$reset_dotglob"
71 @@ -2653,7 +2654,7 @@
72 exit 1
73 fi
74 else
75 - if cp --reflink=auto "${uefi_outdir}/linux.efi" "$outfile"; then
76 + if cp "${uefi_outdir}/linux.efi" "$outfile"; then
77 dinfo "*** Creating UEFI image file '$outfile' done ***"
78 fi
79 fi
80 @@ -2663,7 +2664,7 @@
81 exit 1
82 fi
83 else
84 - if cp --reflink=auto "${DRACUT_TMPDIR}/initramfs.img" "$outfile"; then
85 + if cp "${DRACUT_TMPDIR}/initramfs.img" "$outfile"; then
86 dinfo "*** Creating initramfs image file '$outfile' done ***"
87 else
88 rm -f -- "$outfile"
89 @@ -2726,7 +2727,7 @@
90 # use fsfreeze only if we're not writing to /
91 if [[ "$(stat -c %m -- "$outfile")" != "/" ]] && freeze_ok_for_fstype "$outfile"; then
92 FSFROZEN="$(dirname "$outfile")"
93 - if ! (fsfreeze -f "${FSFROZEN}" 2> /dev/null && fsfreeze -u "${FSFROZEN}" 2> /dev/null); then
94 + if ! (fsfreeze --freeze "${FSFROZEN}" 2> /dev/null && fsfreeze --unfreeze "${FSFROZEN}" 2> /dev/null); then
95 dwarn "Could not fsfreeze $(dirname "$outfile")"
96 fi
97 unset FSFROZEN
98 diff -Naur dracut-059/install.d/50-dracut.install dracut-059-busybox/install.d/50-dracut.install
99 --- dracut-059/install.d/50-dracut.install 2022-12-24 17:49:27.000000000 +0100
100 +++ dracut-059-busybox/install.d/50-dracut.install 2023-07-28 08:54:07.290756944 +0200
101 @@ -25,7 +25,7 @@
102 if [[ -f ${INITRD_IMAGE_PREGENERATED} ]]; then
103 # we found an initrd at the same place as the kernel
104 # use this and don't generate a new one
105 - cp --reflink=auto "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/$INITRD" \
106 + cp "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/$INITRD" \
107 && chown root:root "$BOOT_DIR_ABS/$INITRD" \
108 && chmod 0600 "$BOOT_DIR_ABS/$INITRD" \
109 && exit 0
110 diff -Naur dracut-059/install.d/51-dracut-rescue.install dracut-059-busybox/install.d/51-dracut-rescue.install
111 --- dracut-059/install.d/51-dracut-rescue.install 2022-12-24 17:49:27.000000000 +0100
112 +++ dracut-059-busybox/install.d/51-dracut-rescue.install 2023-07-28 10:09:25.388366518 +0200
113 @@ -18,7 +18,7 @@
114 [[ -f $i ]] && echo "${i##*/}"
115 done
116 shift
117 - done | sort -Vu
118 + done | sort -u
119 )
120
121 for f in $files; do
122 @@ -91,7 +91,7 @@
123
124 [[ -d "$BOOT_DIR_ABS" ]] || mkdir -p "$BOOT_DIR_ABS"
125
126 - if ! cp --reflink=auto "$KERNEL_IMAGE" "$BOOT_DIR_ABS/$KERNEL"; then
127 + if ! cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS/$KERNEL"; then
128 echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/$KERNEL'!" >&2
129 fi
130
131 diff -Naur dracut-059/Makefile dracut-059-busybox/Makefile
132 --- dracut-059/Makefile 2022-12-24 17:49:27.000000000 +0100
133 +++ dracut-059-busybox/Makefile 2023-07-28 10:21:13.264146283 +0200
134 @@ -168,7 +168,7 @@
135 ln -fs dracut-functions.sh $(DESTDIR)$(pkglibdir)/dracut-functions
136 install -m 0755 dracut-logger.sh $(DESTDIR)$(pkglibdir)/dracut-logger.sh
137 install -m 0755 dracut-initramfs-restore.sh $(DESTDIR)$(pkglibdir)/dracut-initramfs-restore
138 - cp -arx modules.d $(DESTDIR)$(pkglibdir)
139 + cp -ar modules.d $(DESTDIR)$(pkglibdir)
140 ifneq ($(enable_documentation),no)
141 for i in $(man1pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man1/$${i##*/}; done
142 for i in $(man5pages); do install -m 0644 $$i $(DESTDIR)$(mandir)/man5/$${i##*/}; done
143 diff -Naur dracut-059/modules.d/10i18n/module-setup.sh dracut-059-busybox/modules.d/10i18n/module-setup.sh
144 --- dracut-059/modules.d/10i18n/module-setup.sh 2022-12-24 17:49:27.000000000 +0100
145 +++ dracut-059-busybox/modules.d/10i18n/module-setup.sh 2023-07-28 10:22:10.381843073 +0200
146 @@ -141,7 +141,7 @@
147
148 for _src in "${KBDSUBDIRS[@]}"; do
149 inst_dir "${kbddir}/$_src"
150 - $DRACUT_CP -L -t "${initdir}/${kbddir}/$_src" "${dracutsysrootdir}${kbddir}/$_src"/*
151 + $DRACUT_CP -L "${initdir}/${kbddir}/$_src" "${dracutsysrootdir}${kbddir}/$_src"/*
152 done
153
154 # remove unnecessary files
155 diff -Naur dracut-059/modules.d/30convertfs/convertfs.sh dracut-059-busybox/modules.d/30convertfs/convertfs.sh
156 --- dracut-059/modules.d/30convertfs/convertfs.sh 2022-12-24 17:49:27.000000000 +0100
157 +++ dracut-059-busybox/modules.d/30convertfs/convertfs.sh 2023-07-28 10:23:08.902894291 +0200
158 @@ -110,11 +110,11 @@
159 [[ -d "$ROOT/$dir" ]] || continue
160 echo "Make a copy of \`$ROOT/usr/$dir'."
161 [[ -d "$ROOT/usr/$dir" ]] \
162 - && cp -ax -l "$ROOT/usr/$dir" "$ROOT/usr/${dir}.usrmove-new"
163 + && cp -a -l "$ROOT/usr/$dir" "$ROOT/usr/${dir}.usrmove-new"
164 echo "Merge the copy with \`$ROOT/$dir'."
165 [[ -d "$ROOT/usr/${dir}.usrmove-new" ]] \
166 || mkdir -p "$ROOT/usr/${dir}.usrmove-new"
167 - cp -axT $CP_HARDLINK --backup --suffix=.usrmove~ "$ROOT/$dir" "$ROOT/usr/${dir}.usrmove-new"
168 + cp -aT $CP_HARDLINK --backup --suffix=.usrmove~ "$ROOT/$dir" "$ROOT/usr/${dir}.usrmove-new"
169 echo "Clean up duplicates in \`$ROOT/usr/$dir'."
170 # delete all symlinks that have been backed up
171 find "$ROOT/usr/${dir}.usrmove-new" -type l -name '*.usrmove~' -delete || :
172 diff -Naur dracut-059/modules.d/45url-lib/module-setup.sh dracut-059-busybox/modules.d/45url-lib/module-setup.sh
173 --- dracut-059/modules.d/45url-lib/module-setup.sh 2022-12-24 17:49:27.000000000 +0100
174 +++ dracut-059-busybox/modules.d/45url-lib/module-setup.sh 2023-07-28 10:25:36.055521769 +0200
175 @@ -32,9 +32,9 @@
176 for _lib in "$dracutsysrootdir$_dir"/libcurl.so.* "$dracutsysrootdir$_dir"/libcrypto.so.*; do
177 [[ -e $_lib ]] || continue
178 if ! [[ $_nssckbi ]]; then
179 - read -r -d '' _nssckbi < <(grep -F --binary-files=text -z libnssckbi "$_lib")
180 + read -r -d '' _nssckbi < <(grep -F libnssckbi "$_lib")
181 fi
182 - read -r -d '' _crt < <(grep -E --binary-files=text -z "\.(pem|crt)" "$_lib" | sed 's/\x0//g')
183 + read -r -d '' _crt < <(grep -E "\.(pem|crt)" "$_lib" | sed 's/\x0//g')
184 [[ $_crt ]] || continue
185 [[ $_crt == /*/* ]] || continue
186 if [[ -e $_crt ]]; then
187 @@ -62,7 +62,7 @@
188 for _dir in $libdirs; do
189 [[ -e $dracutsysrootdir$_dir/libnssckbi.so ]] || continue
190 # this looks for directory-ish strings in the file
191 - grep -z -o --binary-files=text '/[[:alpha:]][[:print:]]*' "${dracutsysrootdir}${_dir}"/libnssckbi.so \
192 + grep -o '/[[:alpha:]][[:print:]]*' "${dracutsysrootdir}${_dir}"/libnssckbi.so \
193 | while read -r -d '' _p11roots || [[ $_p11roots ]]; do
194 IFS=":" read -r -a _p11roots <<< "$_p11roots"
195 # the string can be a :-separated list of dirs
196 @@ -77,7 +77,7 @@
197 # so now we know it's really a p11-kit trust dir;
198 # install everything in it
199 mkdir -p -- "${initdir}/${_p11root}"
200 - if ! $DRACUT_CP -L -t "${initdir}/${_p11root}" "${dracutsysrootdir}${_p11root}"/*; then
201 + if ! $DRACUT_CP -L "${initdir}/${_p11root}" "${dracutsysrootdir}${_p11root}"/*; then
202 dwarn "Couldn't install from p11-kit trust dir '${_p11root#$dracutsysrootdir}'; HTTPS might not work."
203 fi
204 done
205 diff -Naur dracut-059/modules.d/90kernel-modules-extra/module-setup.sh dracut-059-busybox/modules.d/90kernel-modules-extra/module-setup.sh
206 --- dracut-059/modules.d/90kernel-modules-extra/module-setup.sh 2022-12-24 17:49:27.000000000 +0100
207 +++ dracut-059-busybox/modules.d/90kernel-modules-extra/module-setup.sh 2023-07-28 10:14:03.196492119 +0200
208 @@ -178,7 +178,7 @@
209 | tr -d ':' \
210 | (
211 cd "$depmod_module_dir" || exit
212 - xargs -r realpath -se --
213 + xargs -r realpath --
214 ) \
215 | instmods || return 1
216
217 diff -Naur dracut-059/modules.d/95terminfo/module-setup.sh dracut-059-busybox/modules.d/95terminfo/module-setup.sh
218 --- dracut-059/modules.d/95terminfo/module-setup.sh 2022-12-24 17:49:27.000000000 +0100
219 +++ dracut-059-busybox/modules.d/95terminfo/module-setup.sh 2023-07-28 10:21:55.874915175 +0200
220 @@ -11,7 +11,7 @@
221 if [[ -d $dracutsysrootdir${_terminfodir} ]]; then
222 for i in "l/linux" "v/vt100" "v/vt102" "v/vt220"; do
223 inst_dir "$_terminfodir/${i%/*}"
224 - $DRACUT_CP -L -t "${initdir}/${_terminfodir}/${i%/*}" "$dracutsysrootdir$_terminfodir/$i"
225 + $DRACUT_CP -L "${initdir}/${_terminfodir}/${i%/*}" "$dracutsysrootdir$_terminfodir/$i"
226 done
227 fi
228 }
229 diff -Naur dracut-059/modules.d/99base/dracut-lib.sh dracut-059-busybox/modules.d/99base/dracut-lib.sh
230 --- dracut-059/modules.d/99base/dracut-lib.sh 2022-12-24 17:49:27.000000000 +0100
231 +++ dracut-059-busybox/modules.d/99base/dracut-lib.sh 2023-07-28 10:37:33.264805685 +0200
232 @@ -645,7 +645,7 @@
233 dest=$(readlink -e -q "$dest") || return 1
234 (
235 cd "$src" || exit 1
236 - cp -af . -t "$dest"
237 + cp -af . "$dest"
238 )
239 }
240
241 diff -Naur dracut-059/src/install/dracut-install.c dracut-059-busybox/src/install/dracut-install.c
242 --- dracut-059/src/install/dracut-install.c 2022-12-24 17:49:27.000000000 +0100
243 +++ dracut-059-busybox/src/install/dracut-install.c 2023-07-28 08:56:43.416757905 +0200
244 @@ -332,7 +332,7 @@
245 const char *preservation = (geteuid() == 0
246 && no_xattr == false) ? "--preserve=mode,xattr,timestamps,ownership" : "--preserve=mode,timestamps,ownership";
247 if (pid == 0) {
248 - execlp("cp", "cp", "--reflink=auto", "--sparse=auto", preservation, "-fL", src, dst, NULL);
249 + execlp("cp", "cp", "-pfL", src, dst, NULL);
250 _exit(errno == ENOENT ? 127 : 126);
251 }
252
253 @@ -344,7 +344,7 @@
254 }
255 ret = WIFSIGNALED(ret) ? 128 + WTERMSIG(ret) : WEXITSTATUS(ret);
256 if (ret != 0)
257 - log_error("ERROR: 'cp --reflink=auto --sparse=auto %s -fL %s %s' failed with %d", preservation, src, dst, ret);
258 + log_error("ERROR: 'cp %s -pfL %s %s' failed with %d", preservation, src, dst, ret);
259 log_debug("cp ret = %d", ret);
260 return ret;
261 }
262 diff -Naur dracut-059/test/TEST-01-BASIC/create-root.sh dracut-059-busybox/test/TEST-01-BASIC/create-root.sh
263 --- dracut-059/test/TEST-01-BASIC/create-root.sh 2022-12-24 17:49:27.000000000 +0100
264 +++ dracut-059-busybox/test/TEST-01-BASIC/create-root.sh 2023-07-28 10:42:40.336828493 +0200
265 @@ -15,7 +15,7 @@
266 mkfs.ext3 -L ' rdinit=/bin/sh' /dev/disk/by-id/ata-disk_root
267 mkdir -p /root
268 mount /dev/disk/by-id/ata-disk_root /root
269 -cp -a -t /root /source/*
270 +cp -a /source/* /root
271 mkdir -p /root/run
272 umount /root
273 echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker
274 diff -Naur dracut-059/test/TEST-01-BASIC/test.sh dracut-059-busybox/test/TEST-01-BASIC/test.sh
275 --- dracut-059/test/TEST-01-BASIC/test.sh 2022-12-24 17:49:27.000000000 +0100
276 +++ dracut-059-busybox/test/TEST-01-BASIC/test.sh 2023-07-28 10:35:07.372254772 +0200
277 @@ -20,7 +20,7 @@
278 -append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot \"root=LABEL= rdinit=/bin/sh\" rw systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.debug console=ttyS0,115200n81 rd.shell=0 $DEBUGFAIL" \
279 -initrd "$TESTDIR"/initramfs.testing || return 1
280
281 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img
282 + grep -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img
283 }
284
285 test_setup() {
286 @@ -60,7 +60,7 @@
287 "${disk_args[@]}" \
288 -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
289 -initrd "$TESTDIR"/initramfs.makeroot || return 1
290 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
291 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
292 rm -- "$TESTDIR"/marker.img
293
294 # make sure --omit-drivers does not filter out drivers using regexp to test for an earlier regression (assuming there is no one letter linux kernel module needed to run the test)
295 diff -Naur dracut-059/test/TEST-02-SYSTEMD/create-root.sh dracut-059-busybox/test/TEST-02-SYSTEMD/create-root.sh
296 --- dracut-059/test/TEST-02-SYSTEMD/create-root.sh 2022-12-24 17:49:27.000000000 +0100
297 +++ dracut-059-busybox/test/TEST-02-SYSTEMD/create-root.sh 2023-07-28 10:39:41.883717589 +0200
298 @@ -14,7 +14,7 @@
299 mkfs.ext3 -L dracut /dev/disk/by-id/ata-disk_root
300 mkdir -p /root
301 mount /dev/disk/by-id/ata-disk_root /root
302 -cp -a -t /root /source/*
303 +cp -a /source/* /root
304 mkdir -p /root/run
305 umount /root
306 echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker
307 diff -Naur dracut-059/test/TEST-02-SYSTEMD/test.sh dracut-059-busybox/test/TEST-02-SYSTEMD/test.sh
308 --- dracut-059/test/TEST-02-SYSTEMD/test.sh 2022-12-24 17:49:27.000000000 +0100
309 +++ dracut-059-busybox/test/TEST-02-SYSTEMD/test.sh 2023-07-28 10:33:04.210096830 +0200
310 @@ -22,7 +22,7 @@
311 -append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=dracut rw loglevel=77 systemd.log_level=debug systemd.log_target=console rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 init=/sbin/init rd.shell=0 $DEBUGFAIL" \
312 -initrd "$TESTDIR"/initramfs.testing || return 1
313
314 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img
315 + grep -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img
316 }
317
318 test_setup() {
319 @@ -62,7 +62,7 @@
320 "${disk_args[@]}" \
321 -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
322 -initrd "$TESTDIR"/initramfs.makeroot || return 1
323 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
324 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
325 rm -- "$TESTDIR"/marker.img
326
327 # systemd-analyze.sh calls man indirectly
328 diff -Naur dracut-059/test/TEST-03-USR-MOUNT/create-root.sh dracut-059-busybox/test/TEST-03-USR-MOUNT/create-root.sh
329 --- dracut-059/test/TEST-03-USR-MOUNT/create-root.sh 2022-12-24 17:49:27.000000000 +0100
330 +++ dracut-059-busybox/test/TEST-03-USR-MOUNT/create-root.sh 2023-07-28 10:38:33.125851024 +0200
331 @@ -23,7 +23,7 @@
332 btrfs subvolume create /root/usr/usr
333 umount /root/usr
334 mount -t btrfs -o subvol=usr /dev/disk/by-id/ata-disk_usr /root/usr
335 -cp -a -t /root /source/*
336 +cp -a /source/* /root
337 mkdir -p /root/run
338 btrfs filesystem sync /root/usr
339 btrfs filesystem sync /root
340 diff -Naur dracut-059/test/TEST-03-USR-MOUNT/test.sh dracut-059-busybox/test/TEST-03-USR-MOUNT/test.sh
341 --- dracut-059/test/TEST-03-USR-MOUNT/test.sh 2022-12-24 17:49:27.000000000 +0100
342 +++ dracut-059-busybox/test/TEST-03-USR-MOUNT/test.sh 2023-07-28 10:34:17.234710195 +0200
343 @@ -28,7 +28,7 @@
344 -append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts loglevel=7 rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
345 -initrd "$TESTDIR"/initramfs.testing || return 1
346
347 - if ! grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img; then
348 + if ! grep -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img; then
349 echo "CLIENT TEST END: $test_name [FAILED]"
350 return 1
351 fi
352 @@ -84,7 +84,7 @@
353 -append "root=/dev/dracut/root rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \
354 -initrd "$TESTDIR"/initramfs.makeroot || return 1
355
356 - if ! grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img; then
357 + if ! grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img; then
358 echo "Could not create root filesystem"
359 return 1
360 fi
361 diff -Naur dracut-059/test/TEST-04-FULL-SYSTEMD/create-root.sh dracut-059-busybox/test/TEST-04-FULL-SYSTEMD/create-root.sh
362 --- dracut-059/test/TEST-04-FULL-SYSTEMD/create-root.sh 2022-12-24 17:49:27.000000000 +0100
363 +++ dracut-059-busybox/test/TEST-04-FULL-SYSTEMD/create-root.sh 2023-07-28 10:38:49.622805655 +0200
364 @@ -23,7 +23,7 @@
365 btrfs subvolume create /root/usr/usr
366 umount /root/usr
367 mount -t btrfs -o subvol=usr /dev/disk/by-id/ata-disk_usr /root/usr
368 -cp -a -t /root /source/*
369 +cp -a /source/* /root
370 mkdir -p /root/run
371 btrfs filesystem sync /root/usr
372 btrfs filesystem sync /root
373 diff -Naur dracut-059/test/TEST-04-FULL-SYSTEMD/test.sh dracut-059-busybox/test/TEST-04-FULL-SYSTEMD/test.sh
374 --- dracut-059/test/TEST-04-FULL-SYSTEMD/test.sh 2022-12-24 17:49:27.000000000 +0100
375 +++ dracut-059-busybox/test/TEST-04-FULL-SYSTEMD/test.sh 2023-07-28 10:33:32.477259187 +0200
376 @@ -32,7 +32,7 @@
377 -append "systemd.unit=testsuite.target systemd.mask=systemd-firstboot panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=dracut $client_opts rd.retry=3 console=ttyS0,115200n81 selinux=0 $DEBUGOUT rd.shell=0 $DEBUGFAIL" \
378 -initrd "$TESTDIR"/initramfs.testing || return 1
379
380 - if ! grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img; then
381 + if ! grep -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img; then
382 echo "CLIENT TEST END: $test_name [FAILED]"
383 return 1
384 fi
385 @@ -146,7 +146,7 @@
386 -append "root=/dev/fakeroot rw rootfstype=btrfs quiet console=ttyS0,115200n81 selinux=0" \
387 -initrd "$TESTDIR"/initramfs.makeroot || return 1
388
389 - if ! grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img; then
390 + if ! grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img; then
391 echo "Could not create root filesystem"
392 return 1
393 fi
394 diff -Naur dracut-059/test/TEST-10-RAID/create-root.sh dracut-059-busybox/test/TEST-10-RAID/create-root.sh
395 --- dracut-059/test/TEST-10-RAID/create-root.sh 2022-12-24 17:49:27.000000000 +0100
396 +++ dracut-059-busybox/test/TEST-10-RAID/create-root.sh 2023-07-28 10:42:29.543307117 +0200
397 @@ -25,7 +25,7 @@
398 mke2fs -L root /dev/dracut/root
399 mkdir -p /sysroot
400 mount /dev/dracut/root /sysroot
401 -cp -a -t /sysroot /source/*
402 +cp -a /source/* /sysroot
403 mkdir -p /sysroot/run
404 umount /sysroot
405 lvm lvchange -a n /dev/dracut/root
406 diff -Naur dracut-059/test/TEST-10-RAID/test.sh dracut-059-busybox/test/TEST-10-RAID/test.sh
407 --- dracut-059/test/TEST-10-RAID/test.sh 2022-12-24 17:49:27.000000000 +0100
408 +++ dracut-059-busybox/test/TEST-10-RAID/test.sh 2023-07-28 10:35:18.399114427 +0200
409 @@ -22,7 +22,7 @@
410 -append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rd.auto rw rd.retry=10 console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
411 -initrd "$TESTDIR"/initramfs.testing || return 1
412
413 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img
414 + grep -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img
415 }
416
417 test_setup() {
418 @@ -100,7 +100,7 @@
419 "${disk_args[@]}" \
420 -append "root=/dev/cannotreach rw rootfstype=ext2 console=ttyS0,115200n81 selinux=0" \
421 -initrd "$TESTDIR"/initramfs.makeroot || return 1
422 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
423 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
424 eval "$(grep -F -a -m 1 ID_FS_UUID "$TESTDIR"/marker.img)"
425
426 (
427 diff -Naur dracut-059/test/TEST-11-LVM/create-root.sh dracut-059-busybox/test/TEST-11-LVM/create-root.sh
428 --- dracut-059/test/TEST-11-LVM/create-root.sh 2022-12-24 17:49:27.000000000 +0100
429 +++ dracut-059-busybox/test/TEST-11-LVM/create-root.sh 2023-07-28 10:41:26.805547160 +0200
430 @@ -21,7 +21,7 @@
431 mke2fs /dev/dracut/root
432 mkdir -p /sysroot
433 mount /dev/dracut/root /sysroot
434 -cp -a -t /sysroot /source/*
435 +cp -a /source/* /sysroot
436 umount /sysroot
437 lvm lvchange -a n /dev/dracut/root
438 echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker
439 diff -Naur dracut-059/test/TEST-11-LVM/test.sh dracut-059-busybox/test/TEST-11-LVM/test.sh
440 --- dracut-059/test/TEST-11-LVM/test.sh 2022-12-24 17:49:27.000000000 +0100
441 +++ dracut-059-busybox/test/TEST-11-LVM/test.sh 2023-07-28 10:35:47.506290363 +0200
442 @@ -23,7 +23,7 @@
443 -append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
444 -initrd "$TESTDIR"/initramfs.testing || return 1
445
446 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img
447 + grep -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img
448 }
449
450 test_setup() {
451 @@ -100,7 +100,7 @@
452 "${disk_args[@]}" \
453 -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \
454 -initrd "$TESTDIR"/initramfs.makeroot || return 1
455 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
456 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
457
458 (
459 # shellcheck disable=SC2031
460 diff -Naur dracut-059/test/TEST-12-RAID-DEG/create-root.sh dracut-059-busybox/test/TEST-12-RAID-DEG/create-root.sh
461 --- dracut-059/test/TEST-12-RAID-DEG/create-root.sh 2022-12-24 17:49:27.000000000 +0100
462 +++ dracut-059-busybox/test/TEST-12-RAID-DEG/create-root.sh 2023-07-28 10:40:12.927592411 +0200
463 @@ -25,7 +25,7 @@
464 mke2fs -L root /dev/dracut/root
465 mkdir -p /sysroot
466 mount /dev/dracut/root /sysroot
467 -cp -a -t /sysroot /source/*
468 +cp -a /source/* /sysroot
469 mkdir -p /sysroot/run
470 umount /sysroot
471 lvm lvchange -a n /dev/dracut/root
472 diff -Naur dracut-059/test/TEST-12-RAID-DEG/test.sh dracut-059-busybox/test/TEST-12-RAID-DEG/test.sh
473 --- dracut-059/test/TEST-12-RAID-DEG/test.sh 2022-12-24 17:49:27.000000000 +0100
474 +++ dracut-059-busybox/test/TEST-12-RAID-DEG/test.sh 2023-07-28 10:32:18.045953364 +0200
475 @@ -27,7 +27,7 @@
476 -append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot $* systemd.log_target=kmsg root=LABEL=root rw rd.retry=10 rd.info console=ttyS0,115200n81 log_buf_len=2M selinux=0 rd.shell=0 $DEBUGFAIL " \
477 -initrd "$TESTDIR"/initramfs.testing
478
479 - if ! grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img; then
480 + if ! grep -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img; then
481 echo "CLIENT TEST END: $* [FAIL]"
482 return 1
483 fi
484 @@ -131,11 +131,11 @@
485 -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \
486 -initrd "$TESTDIR"/initramfs.makeroot || return 1
487
488 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
489 - eval "$(grep -F --binary-files=text -m 1 MD_UUID "$TESTDIR"/marker.img)"
490 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
491 + eval "$(grep -F -m 1 MD_UUID "$TESTDIR"/marker.img)"
492 eval "$(grep -F -a -m 1 ID_FS_UUID "$TESTDIR"/marker.img)"
493 echo "$ID_FS_UUID" > "$TESTDIR"/luksuuid
494 - eval "$(grep -F --binary-files=text -m 1 MD_UUID "$TESTDIR"/marker.img)"
495 + eval "$(grep -F -m 1 MD_UUID "$TESTDIR"/marker.img)"
496 echo "$MD_UUID" > "$TESTDIR"/mduuid
497
498 (
499 diff -Naur dracut-059/test/TEST-13-ENC-RAID-LVM/create-root.sh dracut-059-busybox/test/TEST-13-ENC-RAID-LVM/create-root.sh
500 --- dracut-059/test/TEST-13-ENC-RAID-LVM/create-root.sh 2022-12-24 17:49:27.000000000 +0100
501 +++ dracut-059-busybox/test/TEST-13-ENC-RAID-LVM/create-root.sh 2023-07-28 10:39:59.714028615 +0200
502 @@ -31,7 +31,7 @@
503 mke2fs /dev/dracut/root
504 mkdir -p /sysroot
505 mount /dev/dracut/root /sysroot
506 -cp -a -t /sysroot /source/*
507 +cp -a /source/* /sysroot
508 umount /sysroot
509 lvm lvchange -a n /dev/dracut/root
510 mdadm -W /dev/md0 || :
511 diff -Naur dracut-059/test/TEST-13-ENC-RAID-LVM/test.sh dracut-059-busybox/test/TEST-13-ENC-RAID-LVM/test.sh
512 --- dracut-059/test/TEST-13-ENC-RAID-LVM/test.sh 2022-12-24 17:49:27.000000000 +0100
513 +++ dracut-059-busybox/test/TEST-13-ENC-RAID-LVM/test.sh 2023-07-28 10:32:48.883161273 +0200
514 @@ -28,7 +28,7 @@
515 "${disk_args[@]}" \
516 -append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto rd.retry=20 console=ttyS0,115200n81 selinux=0 rd.debug rootwait $LUKSARGS rd.shell=0 $DEBUGFAIL" \
517 -initrd "$TESTDIR"/initramfs.testing
518 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img || return 1
519 + grep -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img || return 1
520 echo "CLIENT TEST END: [OK]"
521
522 dd if=/dev/zero of="$TESTDIR"/marker.img bs=1MiB count=1
523 @@ -38,7 +38,7 @@
524 "${disk_args[@]}" \
525 -append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rw quiet rd.auto rd.retry=20 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL" \
526 -initrd "$TESTDIR"/initramfs.testing
527 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img || return 1
528 + grep -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img || return 1
529 echo "CLIENT TEST END: [OK]"
530
531 dd if=/dev/zero of="$TESTDIR"/marker.img bs=1MiB count=1
532 @@ -48,7 +48,7 @@
533 "${disk_args[@]}" \
534 -append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rw quiet rd.auto rd.retry=10 rd.info console=ttyS0,115200n81 selinux=0 rd.debug $DEBUGFAIL rd.luks.uuid=failme" \
535 -initrd "$TESTDIR"/initramfs.testing
536 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img && return 1
537 + grep -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img && return 1
538 echo "CLIENT TEST END: [OK]"
539
540 return 0
541 @@ -127,8 +127,8 @@
542 "${disk_args[@]}" \
543 -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \
544 -initrd "$TESTDIR"/initramfs.makeroot || return 1
545 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
546 - cryptoUUIDS=$(grep -F --binary-files=text -m 3 ID_FS_UUID "$TESTDIR"/marker.img)
547 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
548 + cryptoUUIDS=$(grep -F -m 3 ID_FS_UUID "$TESTDIR"/marker.img)
549 for uuid in $cryptoUUIDS; do
550 eval "$uuid"
551 printf ' rd.luks.uuid=luks-%s ' "$ID_FS_UUID"
552 diff -Naur dracut-059/test/TEST-14-IMSM/create-root.sh dracut-059-busybox/test/TEST-14-IMSM/create-root.sh
553 --- dracut-059/test/TEST-14-IMSM/create-root.sh 2022-12-24 17:49:27.000000000 +0100
554 +++ dracut-059-busybox/test/TEST-14-IMSM/create-root.sh 2023-07-28 10:39:04.493065182 +0200
555 @@ -62,7 +62,7 @@
556 mke2fs -L root /dev/dracut/root
557 mkdir -p /sysroot
558 mount /dev/dracut/root /sysroot
559 -cp -a -t /sysroot /source/*
560 +cp -a /source/* /sysroot
561 umount /sysroot
562 lvm lvchange -a n /dev/dracut/root
563 udevadm settle
564 diff -Naur dracut-059/test/TEST-14-IMSM/test.sh dracut-059-busybox/test/TEST-14-IMSM/test.sh
565 --- dracut-059/test/TEST-14-IMSM/test.sh 2022-12-24 17:49:27.000000000 +0100
566 +++ dracut-059-busybox/test/TEST-14-IMSM/test.sh 2023-07-28 10:33:54.894318776 +0200
567 @@ -24,7 +24,7 @@
568 -append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot $* root=LABEL=root rw debug rd.retry=5 rd.debug console=ttyS0,115200n81 selinux=0 rd.info rd.shell=0 $DEBUGFAIL" \
569 -initrd "$TESTDIR"/initramfs.testing || return 1
570
571 - if ! grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img; then
572 + if ! grep -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img; then
573 echo "CLIENT TEST END: $* [FAIL]"
574 return 1
575 fi
576 @@ -123,8 +123,8 @@
577 "${disk_args[@]}" \
578 -append "root=/dev/dracut/root rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \
579 -initrd "$TESTDIR"/initramfs.makeroot || return 1
580 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
581 - eval "$(grep -F --binary-files=text -m 1 MD_UUID "$TESTDIR"/marker.img)"
582 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
583 + eval "$(grep -F -m 1 MD_UUID "$TESTDIR"/marker.img)"
584
585 if [[ -z $MD_UUID ]]; then
586 echo "Setup failed"
587 diff -Naur dracut-059/test/TEST-15-BTRFSRAID/create-root.sh dracut-059-busybox/test/TEST-15-BTRFSRAID/create-root.sh
588 --- dracut-059/test/TEST-15-BTRFSRAID/create-root.sh 2022-12-24 17:49:27.000000000 +0100
589 +++ dracut-059-busybox/test/TEST-15-BTRFSRAID/create-root.sh 2023-07-28 10:42:51.777027789 +0200
590 @@ -20,7 +20,7 @@
591
592 mkdir -p /sysroot
593 mount -t btrfs /dev/disk/by-id/ata-disk_raid4 /sysroot
594 -cp -a -t /sysroot /source/*
595 +cp -a /source/* /sysroot
596 umount /sysroot
597
598 echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker
599 diff -Naur dracut-059/test/TEST-15-BTRFSRAID/test.sh dracut-059-busybox/test/TEST-15-BTRFSRAID/test.sh
600 --- dracut-059/test/TEST-15-BTRFSRAID/test.sh 2022-12-24 17:49:27.000000000 +0100
601 +++ dracut-059-busybox/test/TEST-15-BTRFSRAID/test.sh 2023-07-28 10:34:54.378693987 +0200
602 @@ -21,7 +21,7 @@
603 "${disk_args[@]}" \
604 -append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=LABEL=root rw rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.shell=0 $DEBUGFAIL" \
605 -initrd "$TESTDIR"/initramfs.testing
606 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img || return 1
607 + grep -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img || return 1
608 }
609
610 test_setup() {
611 @@ -107,7 +107,7 @@
612 -append "root=/dev/fakeroot rw quiet console=ttyS0,115200n81 selinux=0" \
613 -initrd "$TESTDIR"/initramfs.makeroot || return 1
614
615 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
616 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
617
618 (
619 # shellcheck disable=SC2031
620 diff -Naur dracut-059/test/TEST-16-DMSQUASH/create-root.sh dracut-059-busybox/test/TEST-16-DMSQUASH/create-root.sh
621 --- dracut-059/test/TEST-16-DMSQUASH/create-root.sh 2022-12-24 17:49:27.000000000 +0100
622 +++ dracut-059-busybox/test/TEST-16-DMSQUASH/create-root.sh 2023-07-28 10:40:36.761341381 +0200
623 @@ -23,7 +23,7 @@
624 mkdir -p /root
625 mount /dev/disk/by-id/ata-disk_root-part1 /root
626 mkdir -p /root/run /root/testdir
627 -cp -a -t /root /source/*
628 +cp -a /source/* /root
629 echo "Creating squashfs"
630 mksquashfs /source /root/testdir/rootfs.img -quiet
631 umount /root
632 diff -Naur dracut-059/test/TEST-16-DMSQUASH/test.sh dracut-059-busybox/test/TEST-16-DMSQUASH/test.sh
633 --- dracut-059/test/TEST-16-DMSQUASH/test.sh 2022-12-24 17:49:27.000000000 +0100
634 +++ dracut-059-busybox/test/TEST-16-DMSQUASH/test.sh 2023-07-28 10:31:31.628471313 +0200
635 @@ -33,7 +33,7 @@
636 -append "rd.live.image rd.live.overlay.overlayfs=1 rd.live.dir=testdir root=LABEL=dracut console=ttyS0,115200n81 quiet selinux=0 rd.info rd.shell=0 panic=1 oops=panic softlockup_panic=1 $DEBUGFAIL" \
637 -initrd "$TESTDIR"/initramfs.testing
638
639 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success -- "$TESTDIR"/marker.img || return 1
640 + grep -F -m 1 -q dracut-root-block-success -- "$TESTDIR"/marker.img || return 1
641
642 rootPartitions=$(sfdisk -d "$TESTDIR"/root.img | grep -c 'root\.img[0-9]')
643 [ "$rootPartitions" -eq 1 ] || return 1
644 @@ -53,7 +53,7 @@
645
646 # Verify that the string "dracut-autooverlay-success" occurs in the second partition in the image file.
647 dd if="$TESTDIR"/root.img bs=1MiB skip=80 status=none \
648 - | grep -U --binary-files=binary -F -m 1 -q dracut-autooverlay-success
649 + | grep -F -m 1 -q dracut-autooverlay-success
650 ) || return 1
651 }
652
653 @@ -95,7 +95,7 @@
654 -append "root=/dev/dracut/root rw rootfstype=ext4 quiet console=ttyS0,115200n81 selinux=0" \
655 -initrd "$TESTDIR"/initramfs.makeroot || return 1
656
657 - if ! grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img; then
658 + if ! grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img; then
659 echo "Could not create root filesystem"
660 return 1
661 fi
662 diff -Naur dracut-059/test/TEST-17-LVM-THIN/create-root.sh dracut-059-busybox/test/TEST-17-LVM-THIN/create-root.sh
663 --- dracut-059/test/TEST-17-LVM-THIN/create-root.sh 2022-12-24 17:49:27.000000000 +0100
664 +++ dracut-059-busybox/test/TEST-17-LVM-THIN/create-root.sh 2023-07-28 10:41:16.422032836 +0200
665 @@ -22,7 +22,7 @@
666 mke2fs /dev/dracut/root
667 mkdir -p /sysroot
668 mount /dev/dracut/root /sysroot
669 -cp -a -t /sysroot /source/*
670 +cp -a /source/* /sysroot
671 umount /sysroot
672 lvm lvchange -a n /dev/dracut/root
673
674 diff -Naur dracut-059/test/TEST-17-LVM-THIN/test.sh dracut-059-busybox/test/TEST-17-LVM-THIN/test.sh
675 --- dracut-059/test/TEST-17-LVM-THIN/test.sh 2022-12-24 17:49:27.000000000 +0100
676 +++ dracut-059-busybox/test/TEST-17-LVM-THIN/test.sh 2023-07-28 10:36:02.039877899 +0200
677 @@ -21,7 +21,7 @@
678 "${disk_args[@]}" \
679 -append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot root=/dev/dracut/root rw rd.auto=1 quiet rd.retry=3 rd.info console=ttyS0,115200n81 selinux=0 rd.debug rd.shell=0 $DEBUGFAIL" \
680 -initrd "$TESTDIR"/initramfs.testing || return 1
681 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img || return 1
682 + grep -F -m 1 -q dracut-root-block-success "$TESTDIR"/marker.img || return 1
683 }
684
685 test_setup() {
686 @@ -98,7 +98,7 @@
687 "${disk_args[@]}" \
688 -append "root=/dev/fakeroot rw rootfstype=ext2 quiet console=ttyS0,115200n81 selinux=0" \
689 -initrd "$TESTDIR"/initramfs.makeroot || return 1
690 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
691 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
692
693 (
694 # shellcheck disable=SC2031
695 diff -Naur dracut-059/test/TEST-20-NFS/create-root.sh dracut-059-busybox/test/TEST-20-NFS/create-root.sh
696 --- dracut-059/test/TEST-20-NFS/create-root.sh 2022-12-24 17:49:27.000000000 +0100
697 +++ dracut-059-busybox/test/TEST-20-NFS/create-root.sh 2023-07-28 10:40:25.931152518 +0200
698 @@ -15,7 +15,7 @@
699 mkfs.ext3 -L dracut /dev/disk/by-id/ata-disk_root
700 mkdir -p /root
701 mount /dev/disk/by-id/ata-disk_root /root
702 -cp -a -t /root /source/*
703 +cp -a /source/* /root
704 mkdir -p /root/run
705 umount /root
706 echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker
707 diff -Naur dracut-059/test/TEST-20-NFS/test.sh dracut-059-busybox/test/TEST-20-NFS/test.sh
708 --- dracut-059/test/TEST-20-NFS/test.sh 2022-12-24 17:49:27.000000000 +0100
709 +++ dracut-059-busybox/test/TEST-20-NFS/test.sh 2023-07-28 10:31:49.172112922 +0200
710 @@ -75,7 +75,7 @@
711 -initrd "$TESTDIR"/initramfs.testing
712
713 # shellcheck disable=SC2181
714 - if [[ $? -ne 0 ]] || ! grep -U --binary-files=binary -F -m 1 -q nfs-OK "$TESTDIR"/marker.img; then
715 + if [[ $? -ne 0 ]] || ! grep -F -m 1 -q nfs-OK "$TESTDIR"/marker.img; then
716 echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
717 return 1
718 fi
719 @@ -381,7 +381,7 @@
720 "${disk_args[@]}" \
721 -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
722 -initrd "$TESTDIR"/initramfs.makeroot || return 1
723 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
724 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
725
726 # Make an overlay with needed tools for the test harness
727 (
728 diff -Naur dracut-059/test/TEST-30-ISCSI/create-client-root.sh dracut-059-busybox/test/TEST-30-ISCSI/create-client-root.sh
729 --- dracut-059/test/TEST-30-ISCSI/create-client-root.sh 2022-12-24 17:49:27.000000000 +0100
730 +++ dracut-059-busybox/test/TEST-30-ISCSI/create-client-root.sh 2023-07-28 10:43:32.794408900 +0200
731 @@ -15,7 +15,7 @@
732 mkfs.ext3 -j -L singleroot -F /dev/disk/by-id/ata-disk_singleroot
733 mkdir -p /sysroot
734 mount /dev/disk/by-id/ata-disk_singleroot /sysroot
735 -cp -a -t /sysroot /source/*
736 +cp -a /source/* /sysroot
737 umount /sysroot
738 mdadm --create /dev/md0 --run --auto=yes --level=stripe --raid-devices=2 /dev/disk/by-id/ata-disk_raid0-1 /dev/disk/by-id/ata-disk_raid0-2
739 mdadm -W /dev/md0 || :
740 @@ -25,7 +25,7 @@
741 lvm vgchange -ay
742 mkfs.ext3 -j -L sysroot /dev/dracut/root
743 mount /dev/dracut/root /sysroot
744 -cp -a -t /sysroot /source/*
745 +cp -a /source/* /sysroot
746 umount /sysroot
747 lvm lvchange -a n /dev/dracut/root
748 echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker
749 diff -Naur dracut-059/test/TEST-30-ISCSI/create-server-root.sh dracut-059-busybox/test/TEST-30-ISCSI/create-server-root.sh
750 --- dracut-059/test/TEST-30-ISCSI/create-server-root.sh 2022-12-24 17:49:27.000000000 +0100
751 +++ dracut-059-busybox/test/TEST-30-ISCSI/create-server-root.sh 2023-07-28 10:43:44.041271427 +0200
752 @@ -13,7 +13,7 @@
753 mkfs.ext3 -L dracut /dev/disk/by-id/ata-disk_root
754 mkdir -p /root
755 mount /dev/disk/by-id/ata-disk_root /root
756 -cp -a -t /root /source/*
757 +cp -a /source/* /root
758 mkdir -p /root/run
759 umount /root
760 echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker
761 diff -Naur dracut-059/test/TEST-30-ISCSI/test.sh dracut-059-busybox/test/TEST-30-ISCSI/test.sh
762 --- dracut-059/test/TEST-30-ISCSI/test.sh 2022-12-24 17:49:27.000000000 +0100
763 +++ dracut-059-busybox/test/TEST-30-ISCSI/test.sh 2023-07-28 10:34:32.098303864 +0200
764 @@ -70,7 +70,7 @@
765 -initrd "$TESTDIR"/initramfs.testing
766
767 # shellcheck disable=SC2181
768 - if [[ $? -ne 0 ]] || ! grep -U --binary-files=binary -F -m 1 -q iscsi-OK "$TESTDIR"/marker.img; then
769 + if [[ $? -ne 0 ]] || ! grep -F -m 1 -q iscsi-OK "$TESTDIR"/marker.img; then
770 echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
771 return 1
772 fi
773 @@ -203,7 +203,7 @@
774 "${disk_args[@]}" \
775 -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
776 -initrd "$TESTDIR"/initramfs.makeroot || return 1
777 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
778 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
779 rm -- "$TESTDIR"/marker.img
780
781 # shellcheck disable=SC2031
782 @@ -291,7 +291,7 @@
783 "${disk_args[@]}" \
784 -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
785 -initrd "$TESTDIR"/initramfs.makeroot || return 1
786 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
787 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
788 rm -- "$TESTDIR"/marker.img
789
790 # Make an overlay with needed tools for the test harness
791 diff -Naur dracut-059/test/TEST-35-ISCSI-MULTI/create-client-root.sh dracut-059-busybox/test/TEST-35-ISCSI-MULTI/create-client-root.sh
792 --- dracut-059/test/TEST-35-ISCSI-MULTI/create-client-root.sh 2022-12-24 17:49:27.000000000 +0100
793 +++ dracut-059-busybox/test/TEST-35-ISCSI-MULTI/create-client-root.sh 2023-07-28 10:42:02.266165167 +0200
794 @@ -15,7 +15,7 @@
795 mkfs.ext3 -j -L singleroot -F /dev/disk/by-id/ata-disk_singleroot
796 mkdir -p /sysroot
797 mount /dev/disk/by-id/ata-disk_singleroot /sysroot
798 -cp -a -t /sysroot /source/*
799 +cp -a /source/* /sysroot
800 umount /sysroot
801 mdadm --create /dev/md0 --run --auto=yes --level=stripe --raid-devices=2 /dev/disk/by-id/ata-disk_raid0-1 /dev/disk/by-id/ata-disk_raid0-2
802 mdadm -W /dev/md0 || :
803 @@ -25,7 +25,7 @@
804 lvm vgchange -ay
805 mkfs.ext3 -j -L sysroot /dev/dracut/root
806 mount /dev/dracut/root /sysroot
807 -cp -a -t /sysroot /source/*
808 +cp -a /source/* /sysroot
809 umount /sysroot
810 lvm lvchange -a n /dev/dracut/root
811 echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker
812 diff -Naur dracut-059/test/TEST-35-ISCSI-MULTI/create-server-root.sh dracut-059-busybox/test/TEST-35-ISCSI-MULTI/create-server-root.sh
813 --- dracut-059/test/TEST-35-ISCSI-MULTI/create-server-root.sh 2022-12-24 17:49:27.000000000 +0100
814 +++ dracut-059-busybox/test/TEST-35-ISCSI-MULTI/create-server-root.sh 2023-07-28 10:41:04.975166625 +0200
815 @@ -13,7 +13,7 @@
816 mkfs.ext3 -L dracut /dev/disk/by-id/ata-disk_root
817 mkdir -p /root
818 mount /dev/disk/by-id/ata-disk_root /root
819 -cp -a -t /root /source/*
820 +cp -a /source/* /root
821 mkdir -p /root/run
822 umount /root
823 echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker
824 diff -Naur dracut-059/test/TEST-35-ISCSI-MULTI/test.sh dracut-059-busybox/test/TEST-35-ISCSI-MULTI/test.sh
825 --- dracut-059/test/TEST-35-ISCSI-MULTI/test.sh 2022-12-24 17:49:27.000000000 +0100
826 +++ dracut-059-busybox/test/TEST-35-ISCSI-MULTI/test.sh 2023-07-28 10:36:15.340110493 +0200
827 @@ -66,7 +66,7 @@
828 -net socket,connect=127.0.0.1:12331 \
829 -append "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot rw rd.auto rd.retry=50 console=ttyS0,115200n81 selinux=0 rd.debug=0 rd.shell=0 $DEBUGFAIL $*" \
830 -initrd "$TESTDIR"/initramfs.testing
831 - if ! grep -U --binary-files=binary -F -m 1 -q iscsi-OK "$TESTDIR"/marker.img; then
832 + if ! grep -F -m 1 -q iscsi-OK "$TESTDIR"/marker.img; then
833 echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
834 return 1
835 fi
836 @@ -215,7 +215,7 @@
837 "${disk_args[@]}" \
838 -append "root=/dev/fakeroot rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
839 -initrd "$TESTDIR"/initramfs.makeroot || return 1
840 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
841 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
842 rm -- "$TESTDIR"/marker.img
843
844 # shellcheck disable=SC2031
845 @@ -303,7 +303,7 @@
846 "${disk_args[@]}" \
847 -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
848 -initrd "$TESTDIR"/initramfs.makeroot || return 1
849 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
850 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
851 rm -- "$TESTDIR"/marker.img
852
853 # Make an overlay with needed tools for the test harness
854 diff -Naur dracut-059/test/TEST-40-NBD/create-client-root.sh dracut-059-busybox/test/TEST-40-NBD/create-client-root.sh
855 --- dracut-059/test/TEST-40-NBD/create-client-root.sh 2022-12-24 17:49:27.000000000 +0100
856 +++ dracut-059-busybox/test/TEST-40-NBD/create-client-root.sh 2023-07-28 10:41:49.165936874 +0200
857 @@ -14,7 +14,7 @@
858 mkfs.ext3 -L dracut /dev/disk/by-id/ata-disk_root
859 mkdir -p /root
860 mount /dev/disk/by-id/ata-disk_root /root
861 -cp -a -t /root /source/*
862 +cp -a /source/* /root
863 mkdir -p /root/run
864 umount /root
865 {
866 diff -Naur dracut-059/test/TEST-40-NBD/create-encrypted-root.sh dracut-059-busybox/test/TEST-40-NBD/create-encrypted-root.sh
867 --- dracut-059/test/TEST-40-NBD/create-encrypted-root.sh 2022-12-24 17:49:27.000000000 +0100
868 +++ dracut-059-busybox/test/TEST-40-NBD/create-encrypted-root.sh 2023-07-28 10:41:38.455750218 +0200
869 @@ -24,7 +24,7 @@
870 mkfs.ext3 -L dracut -j /dev/dracut/root
871 mkdir -p /sysroot
872 mount /dev/dracut/root /sysroot
873 -cp -a -t /sysroot /source/*
874 +cp -a /source/* /sysroot
875 umount /sysroot
876 sleep 1
877 lvm lvchange -a n /dev/dracut/root
878 diff -Naur dracut-059/test/TEST-40-NBD/create-server-root.sh dracut-059-busybox/test/TEST-40-NBD/create-server-root.sh
879 --- dracut-059/test/TEST-40-NBD/create-server-root.sh 2022-12-24 17:49:27.000000000 +0100
880 +++ dracut-059-busybox/test/TEST-40-NBD/create-server-root.sh 2023-07-28 10:42:13.233022933 +0200
881 @@ -15,7 +15,7 @@
882 mkfs.ext3 -L dracut /dev/disk/by-id/ata-disk_root
883 mkdir -p /root
884 mount /dev/disk/by-id/ata-disk_root /root
885 -cp -a -t /root /source/*
886 +cp -a /source/* /root
887 mkdir -p /root/run
888 umount /root
889 {
890 diff -Naur dracut-059/test/TEST-40-NBD/test.sh dracut-059-busybox/test/TEST-40-NBD/test.sh
891 --- dracut-059/test/TEST-40-NBD/test.sh 2022-12-24 17:49:27.000000000 +0100
892 +++ dracut-059-busybox/test/TEST-40-NBD/test.sh 2023-07-28 10:35:35.212741965 +0200
893 @@ -89,7 +89,7 @@
894 -initrd "$TESTDIR"/initramfs.testing
895
896 # shellcheck disable=SC2181
897 - if [[ $? -ne 0 ]] || ! grep -U --binary-files=binary -F -m 1 -q nbd-OK "$TESTDIR"/marker.img; then
898 + if [[ $? -ne 0 ]] || ! grep -F -m 1 -q nbd-OK "$TESTDIR"/marker.img; then
899 echo "CLIENT TEST END: $test_name [FAILED - BAD EXIT]"
900 return 1
901 fi
902 @@ -267,7 +267,7 @@
903 "${disk_args[@]}" \
904 -append "root=/dev/fakeroot rw quiet console=ttyS0,115200n81 selinux=0" \
905 -initrd "$TESTDIR"/initramfs.makeroot || return 1
906 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
907 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
908 grep -F -a -m 1 ID_FS_UUID "$TESTDIR"/marker.img > "$TESTDIR"/luks.uuid
909 }
910
911 @@ -347,7 +347,7 @@
912 "${disk_args[@]}" \
913 -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
914 -initrd "$TESTDIR"/initramfs.makeroot || return 1
915 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
916 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
917 rm -fr "$TESTDIR"/overlay
918 }
919
920 @@ -446,7 +446,7 @@
921 "${disk_args[@]}" \
922 -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
923 -initrd "$TESTDIR"/initramfs.makeroot || return 1
924 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
925 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
926 rm -fr "$TESTDIR"/overlay
927 }
928
929 diff -Naur dracut-059/test/TEST-50-MULTINIC/create-root.sh dracut-059-busybox/test/TEST-50-MULTINIC/create-root.sh
930 --- dracut-059/test/TEST-50-MULTINIC/create-root.sh 2022-12-24 17:49:27.000000000 +0100
931 +++ dracut-059-busybox/test/TEST-50-MULTINIC/create-root.sh 2023-07-28 10:39:28.586818942 +0200
932 @@ -15,7 +15,7 @@
933 mkfs.ext3 -L dracut /dev/disk/by-id/ata-disk_root
934 mkdir -p /root
935 mount /dev/disk/by-id/ata-disk_root /root
936 -cp -a -t /root /source/*
937 +cp -a /source/* /root
938 mkdir -p /root/run
939 umount /root
940 echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/disk/by-id/ata-disk_marker
941 diff -Naur dracut-059/test/TEST-50-MULTINIC/test.sh dracut-059-busybox/test/TEST-50-MULTINIC/test.sh
942 --- dracut-059/test/TEST-50-MULTINIC/test.sh 2022-12-24 17:49:27.000000000 +0100
943 +++ dracut-059-busybox/test/TEST-50-MULTINIC/test.sh 2023-07-28 10:33:16.100305368 +0200
944 @@ -328,7 +328,7 @@
945 "${disk_args[@]}" \
946 -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
947 -initrd "$TESTDIR"/initramfs.makeroot || return 1
948 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
949 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/marker.img || return 1
950
951 # Make an overlay with needed tools for the test harness
952 (
953 diff -Naur dracut-059/test/TEST-60-BONDBRIDGEVLANIFCFG/create-root.sh dracut-059-busybox/test/TEST-60-BONDBRIDGEVLANIFCFG/create-root.sh
954 --- dracut-059/test/TEST-60-BONDBRIDGEVLANIFCFG/create-root.sh 2022-12-24 17:49:27.000000000 +0100
955 +++ dracut-059-busybox/test/TEST-60-BONDBRIDGEVLANIFCFG/create-root.sh 2023-07-28 10:43:02.510548098 +0200
956 @@ -20,7 +20,7 @@
957 mkfs.ext3 -L dracut /dev/sda2
958 mkdir -p /root
959 mount /dev/sda2 /root
960 -cp -a -t /root /source/*
961 +cp -a /source/* /root
962 mkdir -p /root/run
963 umount /root
964 echo "dracut-root-block-created" | dd oflag=direct,dsync of=/dev/sda1
965 diff -Naur dracut-059/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh dracut-059-busybox/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh
966 --- dracut-059/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh 2022-12-24 17:49:27.000000000 +0100
967 +++ dracut-059-busybox/test/TEST-60-BONDBRIDGEVLANIFCFG/test.sh 2023-07-28 10:34:42.121812722 +0200
968 @@ -346,7 +346,7 @@
969 -drive format=raw,index=0,media=disk,file="$TESTDIR"/server.ext3 \
970 -append "root=/dev/dracut/root rw rootfstype=ext3 quiet console=ttyS0,115200n81 selinux=0" \
971 -initrd "$TESTDIR"/initramfs.makeroot || return 1
972 - grep -U --binary-files=binary -F -m 1 -q dracut-root-block-created "$TESTDIR"/server.ext3 || return 1
973 + grep -F -m 1 -q dracut-root-block-created "$TESTDIR"/server.ext3 || return 1
974 rm -fr "$TESTDIR"/overlay
975
976 # Make an overlay with needed tools for the test harness