Hello community, here is the log from the commit of package linuxrc for openSUSE:Factory checked in at Mon Mar 1 01:43:59 CET 2010. -------- --- linuxrc/linuxrc.changes 2010-02-24 16:03:28.000000000 +0100 +++ /mounts/work_src_done/STABLE/linuxrc/linuxrc.changes 2010-02-26 15:25:43.000000000 +0100 @@ -1,0 +2,8 @@ +Fri Feb 26 15:25:31 CET 2010 - snwint@suse.de + +- added 'namescheme' option to linuxrc to select alternative device name + schemes (by-id, by-path, by-label); default is 'by-id' (bnc #582717) +- fix make deps for VERSION +- fix make deps for changelog + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- linuxrc-3.4.10.tar.bz2 New: ---- linuxrc-3.4.11.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ linuxrc.spec ++++++ --- /var/tmp/diff_new_pack.v616ta/_old 2010-03-01 01:43:54.000000000 +0100 +++ /var/tmp/diff_new_pack.v616ta/_new 2010-03-01 01:43:54.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package linuxrc (Version 3.4.10) +# spec file for package linuxrc (Version 3.4.11) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -24,9 +24,9 @@ Group: System/Boot AutoReqProv: on Summary: SUSE Installation Program -Version: 3.4.10 +Version: 3.4.11 Release: 1 -Source: linuxrc-3.4.10.tar.bz2 +Source: linuxrc-3.4.11.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description ++++++ linuxrc-3.4.10.tar.bz2 -> linuxrc-3.4.11.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.4.10/Makefile new/linuxrc-3.4.11/Makefile --- old/linuxrc-3.4.10/Makefile 2010-02-24 15:55:03.000000000 +0100 +++ new/linuxrc-3.4.11/Makefile 2010-02-26 15:25:20.000000000 +0100 @@ -19,10 +19,10 @@ all: changelog libs linuxrc ifneq ($(GIT2LOG),) -changelog: .git/HEAD .git/COMMIT_EDITMSG +changelog: .git/HEAD .git/refs/heads .git/refs/tags $(GIT2LOG) --log >changelog -VERSION: .git/HEAD +VERSION: .git/HEAD .git/refs/heads .git/refs/tags $(GIT2LOG) --version >VERSION endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.4.10/VERSION new/linuxrc-3.4.11/VERSION --- old/linuxrc-3.4.10/VERSION 2010-02-24 16:02:05.000000000 +0100 +++ new/linuxrc-3.4.11/VERSION 2010-02-26 15:25:23.000000000 +0100 @@ -1 +1 @@ -3.4.10 +3.4.11 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.4.10/changelog new/linuxrc-3.4.11/changelog --- old/linuxrc-3.4.10/changelog 2010-02-24 16:02:06.000000000 +0100 +++ new/linuxrc-3.4.11/changelog 2010-02-26 15:25:24.000000000 +0100 @@ -1,4 +1,10 @@ -2010-02-24: HEAD +2010-02-26: HEAD + - added 'namescheme' option to linuxrc to select alternative device name + schemes (by-id, by-path, by-label); default is 'by-id' (bnc #582717) + - fix make deps for VERSION + - fix make deps for changelog + +2010-02-24: 3.4.10 - fix Makefile 2010-02-24: 3.4.9 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.4.10/checkmd5.c new/linuxrc-3.4.11/checkmd5.c --- old/linuxrc-3.4.10/checkmd5.c 2010-02-08 14:57:53.000000000 +0100 +++ new/linuxrc-3.4.11/checkmd5.c 2010-02-26 15:25:20.000000000 +0100 @@ -49,7 +49,7 @@ iso.err = 1; - for(hd = hd_list(config.hd_data, hw_cdrom, 0, NULL); hd; hd = hd->next) { + for(hd = fix_device_names(hd_list(config.hd_data, hw_cdrom, 0, NULL)); hd; hd = hd->next) { if(hd->is.notready) continue; get_info(hd->unix_dev_name); if(!iso.err) break; @@ -58,7 +58,7 @@ if(iso.err) { if(dia_message(txt_get(TXT_INSERT_CD_DVD), MSGTYPE_INFO)) return; - for(hd = hd_list(config.hd_data, hw_cdrom, 0, NULL); hd; hd = hd->next) { + for(hd = fix_device_names(hd_list(config.hd_data, hw_cdrom, 0, NULL)); hd; hd = hd->next) { if(hd->is.notready) continue; get_info(hd->unix_dev_name); if(!iso.err) break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.4.10/file.c new/linuxrc-3.4.11/file.c --- old/linuxrc-3.4.10/file.c 2010-02-24 14:09:33.000000000 +0100 +++ new/linuxrc-3.4.11/file.c 2010-02-26 15:25:20.000000000 +0100 @@ -304,6 +304,7 @@ { key_supporturl, "supporturl", kf_cfg + kf_cmd }, { key_udevrule, "udev.rule", kf_cfg + kf_cmd_early }, { key_dhcpfail, "DHCPFail", kf_cfg + kf_cmd }, + { key_namescheme, "NameScheme", kf_cfg + kf_cmd + kf_cmd_early }, }; static struct { @@ -1581,6 +1582,10 @@ str_copy(&config.net.dhcpfail, f->value); break; + case key_namescheme: + str_copy(&config.namescheme, f->value); + break; + default: break; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.4.10/file.h new/linuxrc-3.4.11/file.h --- old/linuxrc-3.4.10/file.h 2010-02-24 14:09:33.000000000 +0100 +++ new/linuxrc-3.4.11/file.h 2010-02-26 15:25:20.000000000 +0100 @@ -50,7 +50,8 @@ key_nomdns, key_yepurl, key_yepcert, key_mediacheck, key_y2gdb, key_squash, key_kexec_reboot, key_devbyid, key_braille, key_nfsopts, key_ipv4, key_ipv4only, key_ipv6, key_ipv6only, key_usesax2, key_efi, key_supporturl, key_portno, - key_osahwaddr, key_zen, key_zenconfig, key_udevrule, key_dhcpfail + key_osahwaddr, key_zen, key_zenconfig, key_udevrule, key_dhcpfail, + key_namescheme } file_key_t; typedef enum { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.4.10/global.h new/linuxrc-3.4.11/global.h --- old/linuxrc-3.4.10/global.h 2010-02-24 14:09:33.000000000 +0100 +++ new/linuxrc-3.4.11/global.h 2010-02-26 15:25:20.000000000 +0100 @@ -409,6 +409,7 @@ int vga_mode; /* vga mode number */ slist_t *extend_list; /* list of loaded instsys extensions */ slist_t *udevrules; /* udev rules */ + char *namescheme; /* device name scheme (e.g.: by-id, by-label, by-path) */ struct { char *instsys_default; /* default instsys url */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.4.10/info.c new/linuxrc-3.4.11/info.c --- old/linuxrc-3.4.10/info.c 2010-02-08 14:57:53.000000000 +0100 +++ new/linuxrc-3.4.11/info.c 2010-02-26 15:25:20.000000000 +0100 @@ -191,7 +191,7 @@ hd_data = calloc(1, sizeof *hd_data); - hd0 = hd_list2(hd_data, hw_items, 1); + hd0 = fix_device_names(hd_list2(hd_data, hw_items, 1)); for(hd = hd0; hd; hd = hd->next) { if(!hd->unix_dev_name) continue; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.4.10/install.c new/linuxrc-3.4.11/install.c --- old/linuxrc-3.4.10/install.c 2010-02-22 15:24:13.000000000 +0100 +++ new/linuxrc-3.4.11/install.c 2010-02-26 15:25:20.000000000 +0100 @@ -1396,7 +1396,7 @@ if(config.manual < 2) { dia_info(&win, "Searching for storage devices...", MSGTYPE_INFO); - hd_list(hd_data, hw_block, 1, NULL); + fix_device_names(hd_list(hd_data, hw_block, 1, NULL)); win_close(&win); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.4.10/linuxrc.c new/linuxrc-3.4.11/linuxrc.c --- old/linuxrc-3.4.10/linuxrc.c 2010-02-24 14:09:33.000000000 +0100 +++ new/linuxrc-3.4.11/linuxrc.c 2010-02-26 15:25:20.000000000 +0100 @@ -778,6 +778,8 @@ config.swap_file_size = 1024; /* 1024 MB */ + str_copy(&config.namescheme, "by-id"); + file_do_info(file_get_cmdline(key_lxrcdebug), kf_cmd + kf_cmd_early); LXRC_WAIT @@ -817,7 +819,7 @@ if (config.linemode) putchar('\n'); printf( - "\n>>> %s installation program v" LXRC_FULL_VERSION " (c) 1996-2009 SUSE Linux Products GmbH <<<\n", + "\n>>> %s installation program v" LXRC_FULL_VERSION " (c) 1996-2010 SUSE Linux Products GmbH <<<\n", config.product ); if (config.linemode) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.4.10/url.c new/linuxrc-3.4.11/url.c --- old/linuxrc-3.4.10/url.c 2010-02-24 14:52:20.000000000 +0100 +++ new/linuxrc-3.4.11/url.c 2010-02-26 15:25:20.000000000 +0100 @@ -1361,7 +1361,7 @@ url_device = url->device; if(!url_device) url_device = url->is.network ? config.netdevice : config.device; - for(found = 0, hd = sort_a_bit(hd_list(config.hd_data, hw_item, 0, NULL)); hd; hd = hd->next) { + for(found = 0, hd = sort_a_bit(fix_device_names(hd_list(config.hd_data, hw_item, 0, NULL))); hd; hd = hd->next) { for(hwaddr = NULL, res = hd->res; res; res = res->next) { if(res->any.type == res_hwaddr) { hwaddr = res->hwaddr.addr; @@ -2672,4 +2672,3 @@ return 0; } - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.4.10/util.c new/linuxrc-3.4.11/util.c --- old/linuxrc-3.4.10/util.c 2010-02-24 14:09:33.000000000 +0100 +++ new/linuxrc-3.4.11/util.c 2010-02-26 15:25:20.000000000 +0100 @@ -3477,7 +3477,7 @@ hd_data_t *hd_data = calloc(1, sizeof *hd_data); hd_data->flags.list_md = 1; - hd_list(hd_data, hw_disk, 1, NULL); + fix_device_names(hd_list(hd_data, hw_disk, 1, NULL)); if(add) { for(hsl = hd_data->disks; hsl; hsl = hsl->next) { @@ -4536,7 +4536,7 @@ config.hd_data = calloc(1, sizeof *config.hd_data); - hd_list2(config.hd_data, hw_items, 1); + fix_device_names(hd_list2(config.hd_data, hw_items, 1)); } @@ -4814,6 +4814,7 @@ } } + void util_error_trace(char *format, ...) { va_list args; @@ -4826,3 +4827,42 @@ nptrs = backtrace(buffer, 100); backtrace_symbols_fd(buffer, nptrs, STDERR_FILENO); } + + +/* + * Change device names to match requested naming scheme. + */ +hd_t *fix_device_names(hd_t *hd) +{ + hd_t *hd0 = hd; + str_list_t *sl, *sl0; + char *s = NULL; + + if(!config.namescheme || !*config.namescheme) return hd0; + + asprintf(&s, "/%s/", config.namescheme); + + for(; hd; hd = hd->next) { + if(!hd->unix_dev_name || !hd->unix_dev_names) continue; + + if(strstr(hd->unix_dev_name, s)) continue; + + for(sl = hd->unix_dev_names; sl; sl = sl->next) { + if(strstr(sl->str, s)) { + sl0 = calloc(1 , sizeof *sl0); + sl0->next = hd->unix_dev_names; + hd->unix_dev_names = sl0; + sl0->str = strdup(sl->str); + // ########## FIXME: should be freed +// free(hd->unix_dev_name); + hd->unix_dev_name = strdup(sl->str); + break; + } + } + } + + free(s); + + return hd0; +} + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-3.4.10/util.h new/linuxrc-3.4.11/util.h --- old/linuxrc-3.4.10/util.h 2010-02-22 14:14:47.000000000 +0100 +++ new/linuxrc-3.4.11/util.h 2010-02-26 15:25:20.000000000 +0100 @@ -161,3 +161,5 @@ void util_setup_udevrules(void); void util_error_trace(char *format, ...); +hd_t *fix_device_names(hd_t *hd); + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org