Hello community, here is the log from the commit of package linuxrc for openSUSE:Factory checked in at 2020-03-11 18:32:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/linuxrc (Old) and /work/SRC/openSUSE:Factory/.linuxrc.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "linuxrc" Wed Mar 11 18:32:19 2020 rev:281 rq:782099 version:7.0.11 Changes: -------- --- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes 2020-02-21 16:39:41.673713740 +0100 +++ /work/SRC/openSUSE:Factory/.linuxrc.new.3160/linuxrc.changes 2020-03-11 18:32:21.650899201 +0100 @@ -1,0 +2,7 @@ +Fri Mar 6 12:13:38 UTC 2020 - wfe...@opensuse.org + +- merge gh#openSUSE/linuxrc#216 +- fix rescue system setup (bsc#1160378) +- 7.0.11 + +-------------------------------------------------------------------- Old: ---- linuxrc-7.0.10.tar.xz New: ---- linuxrc-7.0.11.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ linuxrc.spec ++++++ --- /var/tmp/diff_new_pack.SI7N1J/_old 2020-03-11 18:32:22.354899633 +0100 +++ /var/tmp/diff_new_pack.SI7N1J/_new 2020-03-11 18:32:22.354899633 +0100 @@ -17,7 +17,7 @@ Name: linuxrc -Version: 7.0.10 +Version: 7.0.11 Release: 0 Summary: SUSE Installation Program License: GPL-3.0+ ++++++ linuxrc-7.0.10.tar.xz -> linuxrc-7.0.11.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-7.0.10/VERSION new/linuxrc-7.0.11/VERSION --- old/linuxrc-7.0.10/VERSION 2020-02-18 16:10:56.000000000 +0100 +++ new/linuxrc-7.0.11/VERSION 2020-03-06 13:13:38.000000000 +0100 @@ -1 +1 @@ -7.0.10 +7.0.11 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-7.0.10/changelog new/linuxrc-7.0.11/changelog --- old/linuxrc-7.0.10/changelog 2020-02-18 16:10:56.000000000 +0100 +++ new/linuxrc-7.0.11/changelog 2020-03-06 13:13:38.000000000 +0100 @@ -1,3 +1,7 @@ +2020-03-06: 7.0.11 + - merge gh#openSUSE/linuxrc#216 + - fix rescue system setup (bsc#1160378) + 2020-02-18: 7.0.10 - merge gh#openSUSE/linuxrc#213 - move plymouthd start after screen size detection (bsc#1163115) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-7.0.10/linuxrc.c new/linuxrc-7.0.11/linuxrc.c --- old/linuxrc-7.0.10/linuxrc.c 2020-02-18 16:10:56.000000000 +0100 +++ new/linuxrc-7.0.11/linuxrc.c 2020-03-06 13:13:38.000000000 +0100 @@ -84,6 +84,7 @@ static int cmp_entry(slist_t *sl0, slist_t *sl1); static int cmp_entry_s(const void *p0, const void *p1); static void lxrc_add_parts(void); +static void lxrc_umount_parts(char *basedir); #if SWISS_ARMY_KNIFE static void lxrc_makelinks(char *name); #endif @@ -296,7 +297,7 @@ char *argv[3] = { }; char *dirs[] = { "bin", "boot", "etc", "home", "lib", "run", - "media", "mounts", "mounts/initrd", "mnt", "proc", "sbin", + "media", "mounts", "mounts/initrd", "mnt", "parts", "parts/mp_0000", "proc", "sbin", "sys", "tmp", "usr", "usr/lib", "usr/lib/microcode", "var", NULL }; @@ -312,6 +313,8 @@ ) { log_info("starting rescue\n"); + mount("tmpfs", mp, "tmpfs", 0, "size=100%,nr_inodes=0"); + // add dud images for(i = 0; i < config.update.ext_count; i++) { sl = slist_add(&config.url.instsys_list, slist_new()); @@ -328,17 +331,20 @@ if(!strcmp(*s, "tmp")) chmod(buf, 01777); } - // move module tree + // link module tree strprintf(&buf, "%s/lib/modules", mp); - rename("/lib/modules", buf); + symlink("/parts/mp_0000/lib/modules", buf); - // move firmware tree + // link firmware tree strprintf(&buf, "%s/lib/firmware", mp); - rename("/lib/firmware", buf); + symlink("/parts/mp_0000/lib/firmware", buf); + + // mount 'parts/00_lib' (kernel parts) + strprintf(&buf, "%s/parts/mp_0000", mp); + util_mount_ro("/parts/00_lib", buf, NULL); - // move 'parts' tree - strprintf(&buf, "%s/parts", mp); - rename("/parts", buf); + // unmount filesystems below /parts + lxrc_umount_parts(""); // add devices strprintf(&buf, "%s/dev", mp); @@ -453,9 +459,6 @@ mount(".", "/", NULL, MS_MOVE, NULL); chroot("."); - /* put / entry back into /proc/mounts */ - mount("/", "/", "none", MS_BIND, 0); - for(i = 0; i < 20; i++) close(i); open("/dev/console", O_RDWR); @@ -681,7 +684,6 @@ void lxrc_init() { - int i; slist_t *sl; siginterrupt(SIGALRM, 1); @@ -963,10 +965,6 @@ if(config.had_segv) config.manual = 1; if(!config.test && !config.had_segv) { - log_info("Remount of / "); - i = mount(0, "/", 0, MS_MGC_VAL | MS_REMOUNT, 0); - log_info(i ? "failed\n" : "ok\n"); - /* Check for special case with aborted installation */ if(util_check_exist ("/.bin")) { unlink("/bin"); @@ -1686,6 +1684,26 @@ } free(mp); +} + + +/* + * Unmount initrd parts when no longer needed. + * + * This is called when moving control to the rescue system. + */ +void lxrc_umount_parts(char *basedir) +{ + char *mp = NULL; + + if(config.test) return; + + for(unsigned u = 0; u < config.mountpoint.initrd_parts; u++) { + strprintf(&mp, "%s/parts/mp_%04u", basedir, u); + umount2(mp, MNT_DETACH); + } + + free(mp); }