Hello community, here is the log from the commit of package linuxrc checked in at Fri Apr 4 01:10:02 CEST 2008. -------- --- linuxrc/linuxrc.changes 2008-03-28 19:01:33.000000000 +0100 +++ /mounts/work_src_done/STABLE/linuxrc/linuxrc.changes 2008-04-03 19:13:51.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Apr 3 19:13:48 CEST 2008 - snwint@suse.de + +- smt is now reg (or smt) +- implemented 'extend' command for downloading & integrating instsys parts + +------------------------------------------------------------------- Old: ---- linuxrc-3.1.12.tar.bz2 New: ---- linuxrc-3.1.13.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ linuxrc.spec ++++++ --- /var/tmp/diff_new_pack.E22340/_old 2008-04-04 01:09:32.000000000 +0200 +++ /var/tmp/diff_new_pack.E22340/_new 2008-04-04 01:09:32.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package linuxrc (Version 3.1.12) +# spec file for package linuxrc (Version 3.1.13) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -17,9 +17,9 @@ Group: System/Boot AutoReqProv: on Summary: SUSE Installation Program -Version: 3.1.12 +Version: 3.1.13 Release: 1 -Source: linuxrc-3.1.12.tar.bz2 +Source: linuxrc-3.1.13.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -54,6 +54,9 @@ %doc linuxrc.html %changelog +* Thu Apr 03 2008 snwint@suse.de +- smt is now reg (or smt) +- implemented 'extend' command for downloading & integrating instsys parts * Fri Mar 28 2008 snwint@suse.de - fix loading of modules without config - can unpack only parts of cpio/rpm archives @@ -731,7 +734,7 @@ - keep proxy scheme (#23611) * Fri Mar 07 2003 snwint@suse.de - don't log to console (#24753) -* Mon Mar 03 2003 snwint@suse.de +* Tue Mar 04 2003 snwint@suse.de - updated slovak & czech translations - fixed some gcc warnings - don't check for gateway config (#22430) ++++++ linuxrc-3.1.12.tar.bz2 -> linuxrc-3.1.13.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-3.1.12/auto2.c new/linuxrc-3.1.13/auto2.c --- old/linuxrc-3.1.12/auto2.c 2008-03-28 15:59:36.000000000 +0100 +++ new/linuxrc-3.1.13/auto2.c 2008-04-03 15:47:32.000000000 +0200 @@ -976,3 +976,69 @@ } +int auto2_extend_root(char *file) +{ + int err = 0; + char *argv[3] = { }; + char *s; + slist_t *sl; + + fprintf(stderr, "instsys extend: %s\n", file); + + str_copy(&config.mountpoint.instdata, new_mountpoint()); + str_copy(&config.mountpoint.instsys, new_mountpoint()); + + if(config.url.install) { + config.url.install->mount = config.url.install->tmp_mount = 0; + } + + if(config.url.instsys) { + config.url.instsys->mount = config.url.instsys->tmp_mount = 0; + } + + if(!config.url.instsys) { + fprintf(stderr, "no instsys\n"); + err = 1; + } + + if(config.url.instsys->scheme == inst_rel && !config.url.install) { + fprintf(stderr, "no repo\n"); + err = 2; + } + + if(err) return err; + + s = url_instsys_base(config.url.instsys->path); + if(!s) return 3; + + strprintf(&config.url.instsys->path, "%s/%s", s, file); + + if(config.url.instsys->scheme == inst_rel) { + err = url_find_repo(config.url.install, config.mountpoint.instdata); + } + + /* if instsys is not a relative url, load it here */ + if(!err && !config.url.instsys->mount) { + err = url_find_instsys(config.url.instsys, config.mountpoint.instsys); + } + + sync(); + + url_umount(config.url.install); + if(err) url_umount(config.url.instsys); + + if(!err) { + for(sl = config.url.instsys_list; sl; sl = sl->next) { + fprintf(stderr, "integrating %s (%s)\n", sl->key, sl->value); + if(!config.test) { + argv[1] = sl->value; + argv[2] = "/"; + util_lndir_main(3, argv); + } + } + } + + return err; +} + + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-3.1.12/auto2.h new/linuxrc-3.1.13/auto2.h --- old/linuxrc-3.1.12/auto2.h 2007-08-30 15:53:10.000000000 +0200 +++ new/linuxrc-3.1.13/auto2.h 2008-04-02 12:37:37.000000000 +0200 @@ -6,3 +6,4 @@ char *auto2_serial_console(void); void pcmcia_socket_startup(void); void auto2_driverupdate(url_t *url); +int auto2_extend_root(char *file); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-3.1.12/Changelog new/linuxrc-3.1.13/Changelog --- old/linuxrc-3.1.12/Changelog 2008-03-28 19:00:31.000000000 +0100 +++ new/linuxrc-3.1.13/Changelog 2008-04-03 19:13:14.000000000 +0200 @@ -1,3 +1,7 @@ +3/4/2008: v3.1.13 + - smt is now reg (or smt) + - implemented 'extend' command for downloading & integrating instsys parts + 28/3/2008: v3.1.12 - fix loading of modules without config - can unpack only parts of cpio/rpm archives diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-3.1.12/file.c new/linuxrc-3.1.13/file.c --- old/linuxrc-3.1.12/file.c 2008-03-26 14:16:37.000000000 +0100 +++ new/linuxrc-3.1.13/file.c 2008-04-01 16:39:36.000000000 +0200 @@ -272,6 +272,8 @@ { key_nomodprobe, "nomodprobe", kf_cfg + kf_cmd_early }, { key_device, "Device", kf_cfg + kf_cmd }, { key_nomdns, "NoMDNS", kf_cfg + kf_cmd }, + { key_yepurl, "regurl", kf_cfg + kf_cmd }, + { key_yepcert, "regcert", kf_cfg + kf_cmd }, { key_yepurl, "smturl", kf_cfg + kf_cmd }, { key_yepcert, "smtcert", kf_cfg + kf_cmd }, { key_mediacheck, "mediacheck", kf_cfg + kf_cmd }, diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-3.1.12/global.h new/linuxrc-3.1.13/global.h --- old/linuxrc-3.1.12/global.h 2008-03-28 16:09:39.000000000 +0100 +++ new/linuxrc-3.1.13/global.h 2008-04-03 18:14:03.000000000 +0200 @@ -382,6 +382,7 @@ char *netdevice; /* network interface to use */ char *vga; /* vga option */ int vga_mode; /* vga mode number */ + slist_t *extend_list; /* list of loaded instsys extensions */ struct { char *instsys_default; /* default instsys url */ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-3.1.12/install.c new/linuxrc-3.1.13/install.c --- old/linuxrc-3.1.12/install.c 2008-03-28 15:59:09.000000000 +0100 +++ new/linuxrc-3.1.13/install.c 2008-04-03 18:15:16.000000000 +0200 @@ -946,6 +946,8 @@ err = inst_execute_yast(); + config.extend_list = slist_free(config.extend_list); + util_umount_all(); util_clear_downloads(); @@ -1171,6 +1173,8 @@ // fprintf(stderr, "%d: back from loop\n", getpid()); } else { + signal(SIGUSR1, SIG_IGN); + // fprintf(stderr, "%d: system()\n", getpid()); err = system(setupcmd); // fprintf(stderr, "%d: exit(%d)\n", getpid(), err); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-3.1.12/linuxrc.c new/linuxrc-3.1.13/linuxrc.c --- old/linuxrc-3.1.12/linuxrc.c 2008-03-28 15:59:45.000000000 +0100 +++ new/linuxrc-3.1.13/linuxrc.c 2008-04-03 18:21:11.000000000 +0200 @@ -73,6 +73,7 @@ static void lxrc_change_root (void); static void lxrc_reboot (void); static void lxrc_halt (void); +static void lxrc_usr1(int signum); extern char **environ; static void lxrc_movetotmpfs(void); @@ -119,6 +120,7 @@ { "fstype", util_fstype_main }, { "scsi_rename", scsi_rename_main }, { "lndir", util_lndir_main }, + { "extend", util_extend_main }, { "hotplug", hotplug_main }, { "nothing", util_nothing_main } }; @@ -704,6 +706,8 @@ siginterrupt(SIGSEGV, 1); siginterrupt(SIGPIPE, 1); lxrc_catch_signal(0); + signal(SIGUSR1, lxrc_usr1); + /* reboot (RB_DISABLE_CAD); */ umask(022); @@ -761,6 +765,7 @@ config.kbd_fd = -1; config.ntfs_3g = 1; config.secure = 1; + config.squash = 1; config.scsi_rename = 0; config.scsi_before_usb = 1; @@ -1262,3 +1267,56 @@ #endif +void lxrc_usr1(int signum) +{ + static unsigned extend_cnt = 0; + int i, err; + char *s, *t, buf[1024]; + FILE *f; + slist_t *sl; + + if(!rename("/tmp/extend.job", s = new_download())) { + *buf = 0; + f = fopen(s, "r"); + if(f) { + if(!fgets(buf, sizeof buf, f)) *buf = 0; + if(*buf) { + t = buf + strlen(buf) - 1; + while(t > buf && isspace(*t)) *t-- = 0; + } + fclose(f); + } + unlink(s); + if(*buf) { + sl = slist_getentry(config.extend_list, buf); + if(!sl) slist_append_str(&config.extend_list, buf); + if(!fork()) { + for(i = 0; i < 256; i++) close(i); + open("/tmp/extend.log", O_RDWR | O_CREAT | O_TRUNC, 0644); + dup(0); + dup(0); + setlinebuf(stderr); + config.download.cnt = 1000 + extend_cnt; + config.mountpoint.cnt = 1000 + extend_cnt; + if(!config.debug) config.debug = 1; + if(sl) { + fprintf(stderr, "instsys extend: %s\n%s: already integrated\n", buf, buf); + err = 0; + } + else { + err = auto2_extend_root(buf); + } + f = fopen("/tmp/extend.result", "w"); + if(f) fprintf(f, "%d\n", err); + fclose(f); + exit(0); + } + } + } + + extend_cnt += 10; + + signal(SIGUSR1, lxrc_usr1); +} + + diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-3.1.12/url.c new/linuxrc-3.1.13/url.c --- old/linuxrc-3.1.12/url.c 2008-03-28 18:18:03.000000000 +0100 +++ new/linuxrc-3.1.13/url.c 2008-04-02 15:55:01.000000000 +0200 @@ -59,7 +59,6 @@ static slist_t *url_instsys_lookup(char *key, slist_t **sl_ll); static void url_build_instsys_list(char *instsys); static char *url_instsys_config(char *path); -static char *url_instsys_base(char *path); static char *url_config_get_path(char *entry); static slist_t *url_config_get_file_list(char *entry); @@ -924,7 +923,7 @@ // FIXME: this is wrong! - if(url->mount && !util_umount(url->mount)) { + if(url->mount && util_umount(url->mount)) { if(config.debug) fprintf(stderr, "%s: url umount failed\n", url->mount); } str_copy(&url->mount, NULL); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-3.1.12/url.h new/linuxrc-3.1.13/url.h --- old/linuxrc-3.1.12/url.h 2008-01-18 15:28:31.000000000 +0100 +++ new/linuxrc-3.1.13/url.h 2008-04-02 14:51:06.000000000 +0200 @@ -52,4 +52,5 @@ int url_find_repo(url_t *url, char *dir); int url_find_instsys(url_t *url, char *dir); char *url_print(url_t *url, int format); +char *url_instsys_base(char *path); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-3.1.12/util.c new/linuxrc-3.1.13/util.c --- old/linuxrc-3.1.12/util.c 2008-03-28 16:24:41.000000000 +0100 +++ new/linuxrc-3.1.13/util.c 2008-04-03 18:35:51.000000000 +0200 @@ -3104,6 +3104,55 @@ } +int util_extend_main(int argc, char **argv) +{ + FILE *f; + int ready, err = 0; + char buf[1024]; + + argv++; argc--; + + if(!argc) return fprintf(stderr, "usage: extend extension_name\n"), 1; + + unlink("/tmp/extend.result"); + f = fopen("/tmp/extend.job", "w"); + if(f) { + fprintf(f, "%s\n", *argv); + fclose(f); + + if(util_check_exist("/usr/src/packages") || getuid()) config.test = 1; + + if(config.test) { + util_killall("linuxrc", SIGUSR1); + } + else { + if(kill(1, SIGUSR1)) err = 2; + } + + if(!err) for(ready = 0; !ready ;) { + sleep(1); + f = fopen("/tmp/extend.result", "r"); + if(f) { + ready = fscanf(f, "%d", &err) == 1; + fclose(f); + } + } + } + else { + err = 1; + } + + f = fopen("/tmp/extend.log", "r"); + if(f) { + while(fgets(buf, sizeof buf, f)) printf("%s", buf); + fclose(f); + } + + printf("%s: extend %s\n", *argv, err ? "failed" : "ok"); + + return err; +} + /* * returns loop device used @@ -3111,7 +3160,7 @@ char *util_attach_loop(char *file, int ro) { struct loop_info loopinfo; - int fd, rc, i, device; + int fd, rc, i, device, ok = 0; static char buf[32]; if((fd = open(file, (ro ? O_RDONLY : O_RDWR) | O_LARGEFILE)) < 0) { @@ -3119,7 +3168,7 @@ return NULL; } - for(i = 0; i < 8; i++) { + for(i = 0; i < 64; i++) { sprintf(buf, "/dev/loop%d", i); if((device = open(buf, (ro ? O_RDONLY : O_RDWR) | O_LARGEFILE)) >= 0) { memset(&loopinfo, 0, sizeof loopinfo); @@ -3127,13 +3176,16 @@ rc = ioctl(device, LOOP_SET_FD, fd); if(rc != -1) rc = ioctl(device, LOOP_SET_STATUS, &loopinfo); close(device); - if(rc != -1) break; + if(rc != -1) { + ok = 1; + break; + } } } close(fd); - return i < 8 ? buf : NULL; + return ok ? buf : NULL; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-3.1.12/util.h new/linuxrc-3.1.13/util.h --- old/linuxrc-3.1.12/util.h 2008-03-28 15:58:36.000000000 +0100 +++ new/linuxrc-3.1.13/util.h 2008-04-03 12:51:10.000000000 +0200 @@ -68,6 +68,7 @@ extern int util_bootpc_main (int argc, char **argv); extern int util_wget_main (int argc, char **argv); extern int util_fstype_main (int argc, char **argv); +extern int util_extend_main (int argc, char **argv); extern void util_start_shell (char *tty, char *shell, int flags); extern char *util_process_name (pid_t pid); extern char *util_process_cmdline (pid_t pid); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/linuxrc-3.1.12/VERSION new/linuxrc-3.1.13/VERSION --- old/linuxrc-3.1.12/VERSION 2008-03-28 12:53:22.000000000 +0100 +++ new/linuxrc-3.1.13/VERSION 2008-04-03 18:23:44.000000000 +0200 @@ -1 +1 @@ -3.1.12 +3.1.13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org