Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ocl-icd for openSUSE:Factory checked in at 2026-09-22 20:30:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ocl-icd (Old) and /work/SRC/openSUSE:Factory/.ocl-icd.new.383539 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ocl-icd" Tue Sep 22 20:30:21 2026 rev:25 rq:1379692 version:2.3.4 Changes: -------- --- /work/SRC/openSUSE:Factory/ocl-icd/ocl-icd.changes 2025-09-22 16:41:44.554611686 +0200 +++ /work/SRC/openSUSE:Factory/.ocl-icd.new.383539/ocl-icd.changes 2026-09-22 20:31:06.791597519 +0200 @@ -1,0 +2,10 @@ +Tue Sep 22 13:05:03 UTC 2026 - Stefan Dirsch <[email protected]> + +- n_UsrShare-twopaths-2.3.4-v2.patch + * finally fixed previous n_UsrShare-twopaths.patch with + the help of chatgpt ... + --> https://chatgpt.com/share/6ab280ef-87c0-83eb-904f-951915b5213f + * supersedes non-working and non-applied n_UsrShare-twopaths.patch + * supersedes also n_UsrShare.patch + +------------------------------------------------------------------- Old: ---- n_UsrShare-twopaths.patch n_UsrShare.patch New: ---- n_UsrShare-twopaths-2.3.4-v2.patch ----------(Old B)---------- Old:- n_UsrShare-twopaths-2.3.4-v2.patch * finally fixed previous n_UsrShare-twopaths.patch with the help of chatgpt ... Old: * supersedes non-working and non-applied n_UsrShare-twopaths.patch * supersedes also n_UsrShare.patch ----------(Old E)---------- ----------(New B)---------- New: - n_UsrShare-twopaths-2.3.4-v2.patch * finally fixed previous n_UsrShare-twopaths.patch with ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ocl-icd.spec ++++++ --- /var/tmp/diff_new_pack.4JGBfY/_old 2026-09-22 20:31:07.461625611 +0200 +++ /var/tmp/diff_new_pack.4JGBfY/_new 2026-09-22 20:31:07.462625653 +0200 @@ -1,7 +1,7 @@ # # spec file for package ocl-icd # -# Copyright (c) 2025 SUSE LLC and contributors +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,11 +25,7 @@ URL: https://github.com/OCL-dev/ocl-icd Source: https://github.com/OCL-dev/ocl-icd/archive/v%{version}/%{name}-%{version}.tar.gz Source1: baselibs.conf -# PATCH-FEATURE-OPENSUSE n_UsrShare.patch boo#1173005, comment#8 -Patch0: n_UsrShare.patch -%ifarch dummy -Patch1: n_UsrShare-twopaths.patch -%endif +Patch0: n_UsrShare-twopaths-2.3.4-v2.patch BuildRequires: libtool BuildRequires: opencl-headers >= 2.2 BuildRequires: pkgconfig ++++++ n_UsrShare-twopaths-2.3.4-v2.patch ++++++ --- ocl-icd-2.3.4/ocl_icd_loader.c +++ ocl-icd-2.3.4/ocl_icd_loader.c @@ -274,8 +274,7 @@ RETURN(num_icds); } -static inline unsigned int _open_drivers(DIR *dir, const char* dir_path) { - unsigned int num_icds = 0; +static inline unsigned int _open_drivers(unsigned int num_icds, DIR *dir, const char* dir_path) { struct dirent *ent; while( (ent=readdir(dir)) != NULL ){ if(! _string_end_with_icd(ent->d_name)) { @@ -848,19 +847,29 @@ static void __initClIcd( void ) { debug_init(); cl_uint num_icds = 0; + cl_uint num_icds2 = 0; int is_dir = 0; DIR *dir = NULL; + DIR *dir2 = NULL; const char* dir_path=getenv("OCL_ICD_VENDORS"); const char* vendor_path=getenv("OPENCL_VENDOR_PATH"); + const char* vendor_path2="/usr/share/OpenCL/vendors"; + const char* dir_path2=NULL; if (! vendor_path || vendor_path[0]==0) { vendor_path=ETC_OPENCL_VENDORS; - debug(D_DUMP, "OPENCL_VENDOR_PATH unset or empty. Using hard-coded path '%s'", vendor_path); + debug(D_DUMP, "OPENCL_VENDOR_PATH unset or empty. Using hard-coded paths '%s' and '%s'", vendor_path, vendor_path2); } else { debug(D_DUMP, "OPENCL_VENDOR_PATH set to '%s', using it", vendor_path); + vendor_path2=NULL; } if (! dir_path || dir_path[0]==0) { dir_path=vendor_path; - debug(D_DUMP, "OCL_ICD_VENDORS empty or not defined, using vendors path '%s'", dir_path); + dir_path2=vendor_path2; + if (dir_path2) { + debug(D_DUMP, "OCL_ICD_VENDORS empty or not defined, using vendors paths '%s' and '%s'", dir_path, dir_path2); + } else { + debug(D_DUMP, "OCL_ICD_VENDORS empty or not defined, using vendors path '%s'", dir_path); + } is_dir=1; } if (!is_dir) { @@ -879,23 +888,39 @@ num_icds = 1; dir=NULL; } else { - debug(D_LOG,"Reading icd list from '%s'", dir_path); + debug(D_LOG,"Reading icd list from '%s'%s", dir_path, + dir_path2 ? " and '/usr/share/OpenCL/vendors'" : ""); dir = opendir(dir_path); if(dir == NULL) { - if (errno == ENOTDIR) { - debug(D_DUMP, "%s is not a directory, trying to use it as a ICD libname", - dir_path); - } + if (dir_path2) { + debug(D_WARN, "Cannot open '%s'. Trying '%s'", dir_path, dir_path2); + dir2 = opendir(dir_path2); + if (dir2 == NULL) { + goto abort; + } + num_icds2 = _find_num_icds(dir2); + } else { + if (errno == ENOTDIR) { + debug(D_DUMP, "%s is not a directory, trying to use it as a ICD libname", + dir_path); + } + goto abort; + } + } else { + num_icds = _find_num_icds(dir); + if (dir_path2) { + dir2 = opendir(dir_path2); + if (dir2 != NULL) + num_icds2 = _find_num_icds(dir2); + } + } + + if ((num_icds + num_icds2) == 0) { goto abort; } - - num_icds = _find_num_icds(dir); - if(num_icds == 0) { - goto abort; - } - } - - _icds = (struct vendor_icd*)malloc(num_icds * sizeof(struct vendor_icd)); + } + + _icds = (struct vendor_icd*)malloc((num_icds + num_icds2) * sizeof(struct vendor_icd)); if (_icds == NULL) { goto abort; } @@ -904,16 +929,18 @@ if (_string_end_with_icd(dir_path)) { num_icds = 0; if (! _string_with_slash(dir_path)) { - num_icds = _open_driver(0, vendor_path, dir_path); + num_icds = _open_driver(0, vendor_path, dir_path); } if (num_icds == 0) { - num_icds = _open_driver(0, NULL, dir_path); + num_icds = _open_driver(0, NULL, dir_path); } } else { num_icds = _load_icd(0, dir_path); } } else { - num_icds = _open_drivers(dir, dir_path); + num_icds = _open_drivers(0, dir, dir_path); + if (dir2) + num_icds = _open_drivers(num_icds, dir2, dir_path2); } if(num_icds == 0) { goto abort; @@ -931,6 +958,9 @@ if (dir != NULL){ closedir(dir); + } + if (dir2 != NULL){ + closedir(dir2); } __initLayers(); return; @@ -942,6 +972,9 @@ } if (dir != NULL){ closedir(dir); + } + if (dir2 != NULL){ + closedir(dir2); } return; }
