diff --git a/1a5845b45f064bd589d83460408b551a06d6c5ca.patch b/1a5845b45f064bd589d83460408b551a06d6c5ca.patch new file mode 100644 index 0000000000000000000000000000000000000000..7f0589c43780cbd65c2867dd8733f0b42804e649 --- /dev/null +++ b/1a5845b45f064bd589d83460408b551a06d6c5ca.patch @@ -0,0 +1,105 @@ +diff --git a/install/dracut-install.c b/install/dracut-install.c +index 97c75dbdf..17544ac68 100644 +--- a/install/dracut-install.c ++++ b/install/dracut-install.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -123,6 +124,7 @@ static inline void fts_closep(FTS **p) { + } + #define _cleanup_fts_close_ _cleanup_(fts_closep) + ++#define _cleanup_globfree_ _cleanup_(globfree) + + + static size_t dir_len(char const *file) +@@ -1328,8 +1330,33 @@ static int install_all(int argc, char **argv) + return r; + } + +-static int install_firmware(struct kmod_module *mod) ++static int install_firmware_fullpath(const char *fwpath) + { ++ const char *fw; ++ _cleanup_free_ char *fwpath_xz = NULL; ++ fw = fwpath; ++ struct stat sb; ++ int ret, r; ++ if (stat(fwpath, &sb) != 0) { ++ r = asprintf(&fwpath_xz, "%s.xz", fwpath); ++ if (r < 0) { ++ log_error("Out of memory!"); ++ exit(EXIT_FAILURE); ++ } ++ if (stat(fwpath_xz, &sb) != 0) { ++ log_debug("stat(%s) != 0", fwpath); ++ return 1; ++ } ++ fw = fwpath_xz; ++ } ++ ret = dracut_install(fw, fw, false, false, true); ++ if (ret == 0) { ++ log_debug("dracut_install '%s' OK", fwpath); ++ } ++ return ret; ++} ++ ++static int install_firmware(struct kmod_module *mod) { + struct kmod_list *l; + _cleanup_kmod_module_info_free_list_ struct kmod_list *list = NULL; + int ret; +@@ -1354,8 +1381,6 @@ static int install_firmware(struct kmod_module *mod) + ret = -1; + STRV_FOREACH(q, firmwaredirs) { + _cleanup_free_ char *fwpath = NULL; +- _cleanup_free_ char *fwpath_xz = NULL; +- const char *fw; + struct stat sb; + int r; + +@@ -1365,27 +1390,22 @@ static int install_firmware(struct kmod_module *mod) + exit(EXIT_FAILURE); + } + +- fw = fwpath; +- if (stat(fwpath, &sb) != 0) { +- r = asprintf(&fwpath_xz, "%s.xz", fwpath); +- if (r < 0) { +- log_error("Out of memory!"); +- exit(EXIT_FAILURE); ++ if ((strstr(value, "*") != 0 || strstr(value, "?") != 0 || strstr(value, "[") != 0) && stat(fwpath, &sb) != 0) { ++ int i; ++ _cleanup_globfree_ glob_t globbuf; ++ glob(fwpath, 0, NULL, &globbuf); ++ for (i = 0; i < globbuf.gl_pathc; i++) { ++ install_firmware_fullpath(globbuf.gl_pathv[i]); ++ if (ret != 0) { ++ log_info("Possible missing firmware %s for kernel module %s", value, kmod_module_get_name(mod)); ++ } + } +- if (stat(fwpath_xz, &sb) != 0) { +- log_debug("stat(%s) != 0", fwpath); +- continue; ++ } else { ++ install_firmware_fullpath(fwpath); ++ if (ret != 0) { ++ log_info("Possible missing firmware %s for kernel module %s", value, kmod_module_get_name(mod)); + } +- fw = fwpath_xz; + } +- +- ret = dracut_install(fw, fw, false, false, true); +- if (ret == 0) +- log_debug("dracut_install '%s' OK", fwpath); +- } +- +- if (ret != 0) { +- log_info("Possible missing firmware %s for kernel module %s", value, kmod_module_get_name(mod)); + } + } + return 0; diff --git a/4339d47cf810d8a79f20cf2b86d15af7ec859052.patch b/4339d47cf810d8a79f20cf2b86d15af7ec859052.patch new file mode 100644 index 0000000000000000000000000000000000000000..3eec426ec6ab3a20f3a83776424be3b5d0e3bdc1 --- /dev/null +++ b/4339d47cf810d8a79f20cf2b86d15af7ec859052.patch @@ -0,0 +1,13 @@ +diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh +index 73927b4b8..9b9e6c5c1 100755 +--- a/modules.d/95fcoe/module-setup.sh ++++ b/modules.d/95fcoe/module-setup.sh +@@ -23,7 +23,7 @@ depends() { + + # called by dracut + installkernel() { +- instmods fcoe 8021q edd ++ instmods fcoe libfcoe 8021q edd bnx2fc + } + + get_vlan_parent() { diff --git a/dracut.spec b/dracut.spec index a85222233131910388f3d23c3e58b39f36bc6365..232e0fc1c1c54f7f694f6c169fa5bcf3253da1be 100644 --- a/dracut.spec +++ b/dracut.spec @@ -9,7 +9,7 @@ Name: dracut Version: 050 -Release: 3 +Release: 4 Summary: Initramfs generator using udev @@ -38,6 +38,8 @@ Patch10: dracut-lib.sh-quote-variables-in-parameter-expansion.patch Patch11: dracut-90crypt-module-setup.sh-fix-force-on-multiple-lines.patch Patch12: Fix-test-in-lsinitrd.patch Patch13: add-option-to-include-file-metadata-in-initramfs.patch +Patch6000: 1a5845b45f064bd589d83460408b551a06d6c5ca.patch +Patch6001: 4339d47cf810d8a79f20cf2b86d15af7ec859052.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt Source2: openEuler.conf.example @@ -488,6 +490,9 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne %endif %changelog +* 20201118213007666427 patch-tracking 050-4 +- append patch file of upstream repository from <1a5845b45f064bd589d83460408b551a06d6c5ca> to <4339d47cf810d8a79f20cf2b86d15af7ec859052> + * Thu Jul 23 2020 Liquor - 050-1 - Update to 050 @@ -516,4 +521,4 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne - Delete redundant information * Thu Aug 29 2019 openEuler Buildteam - 049-1 -- Package init +- Package init \ No newline at end of file