diff options
-rw-r--r-- | Makefile.inc | 3 | ||||
-rwxr-xr-x | anaconda | 46 | ||||
-rw-r--r-- | anaconda.spec.in | 1 | ||||
-rwxr-xr-x | command-stubs/mknod-stub | 3 | ||||
-rw-r--r-- | comps.py | 8 | ||||
-rw-r--r-- | installclass.py | 3 | ||||
-rw-r--r-- | isys/lang.c | 11 | ||||
-rw-r--r-- | iw/xconfig_gui.py | 54 | ||||
-rw-r--r-- | iw/zipl_gui.py | 17 | ||||
-rw-r--r-- | kickstart.py | 2 | ||||
-rw-r--r-- | loader2/Makefile | 1 | ||||
-rw-r--r-- | loader2/keymaps-ppc | bin | 0 -> 12125 bytes | |||
-rw-r--r-- | loader2/linuxrc.s390 | 33 | ||||
-rw-r--r-- | loader2/loader.c | 137 | ||||
-rw-r--r-- | loader2/module-info | 4 | ||||
-rw-r--r-- | loader2/shutdown.c | 4 | ||||
-rw-r--r-- | packages.py | 10 | ||||
-rw-r--r-- | partitions.py | 6 | ||||
-rwxr-xr-x | scripts/buildinstall | 26 | ||||
-rwxr-xr-x | scripts/mk-images | 70 | ||||
-rw-r--r-- | scripts/mk-images.i386 | 7 | ||||
-rw-r--r-- | scripts/mk-images.ia64 | 2 | ||||
-rw-r--r-- | scripts/mk-images.ppc | 15 | ||||
-rw-r--r-- | scripts/mk-images.s390 | 8 | ||||
-rw-r--r-- | scripts/mk-images.x86_64 | 7 | ||||
-rwxr-xr-x | scripts/pkgorder | 6 | ||||
-rwxr-xr-x | scripts/upd-instroot | 2 | ||||
-rw-r--r-- | text.py | 17 | ||||
-rw-r--r-- | textw/network_text.py | 2 | ||||
-rw-r--r-- | textw/xconfig_text.py | 84 | ||||
-rw-r--r-- | textw/zipl_text.py | 7 |
31 files changed, 436 insertions, 160 deletions
diff --git a/Makefile.inc b/Makefile.inc index ad57fd498..56c6c42f0 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -15,8 +15,9 @@ PYTHONINCLUDE = /usr/include/python2.2 ARCH := $(patsubst i%86,i386,$(shell uname -m)) ARCH := $(patsubst sparc%,sparc,$(ARCH)) ARCH := $(patsubst ppc%,ppc,$(ARCH)) +FULLARCH := $(shell uname -m) -ifneq (,$(filter ppc64 x86_64 s390x,$(ARCH))) +ifneq (,$(filter ppc64 x86_64 s390x,$(FULLARCH))) LIBDIR = lib64 else LIBDIR = lib @@ -259,6 +259,34 @@ def doShutdownX11Actions(): pass +def setupRhplUpdates(): + try: + os.mkdir("/tmp/updates") + except: + pass + try: + os.mkdir("/tmp/updates/rhpl") + except: + pass + if os.access("/mnt/source/RHupdates/rhpl", os.X_OK): + for f in os.listdir("/mnt/source/RHupdates/rhpl"): + os.symlink("/mnt/source/RHupdates/rhpl/%s" %(f,), + "/tmp/updates/rhpl/%s" %(f,)) + + if os.access("/usr/lib64/python2.2/site-packages/rhpl", os.X_OK): + libdir = "lib64" + else: + libdir = "lib" + + for f in os.listdir("/usr/%s/python2.2/site-packages/rhpl" %(libdir,)): + if os.access("/tmp/updates/rhpl/%s" %(f,), os.R_OK): + continue + elif f.endswith(".pyc") and os.access("/tmp/updates/rhpl/%s" %(f[:-1],), os.R_OK): + # dont copy .pyc files we are replacing with updates + continue + + os.symlink("/usr/%s/python2.2/site-packages/rhpl/%s" %(libdir, f), + "/tmp/updates/rhpl/%s" %(f,)) # For anaconda in test mode if (os.path.exists('isys')): @@ -300,6 +328,11 @@ if len(sys.argv) > 1: syslog = Syslogd (root, open (output, "a")) # this never returns +# this handles setting up RHupdates for rhpl to minimize the set needed +if (os.access("/mnt/source/RHupdates/rhpl", os.X_OK) or + os.access("/tmp/updates/rhpl", os.X_OK)): + setupRhplUpdates() + import signal, traceback, string, isys, iutil, time from exception import handleException @@ -467,7 +500,7 @@ for n in args: flags.setupFilesystems = 0 logFile = "/tmp/anaconda-debug.log" elif (str == '-T' or str == '--text'): - display_mode = 't' + display_mode = 't' elif (str == "-C" or str == "--cmdline"): display_mode = 'c' elif (str == '--kbdtype'): @@ -947,6 +980,17 @@ if xcfg is None and not isHeadless: xcfg = None if xcfg is not None: + # + # XXX - hack - here we want to enforce frame buffer requirement on ppc + # pick 640x480x8bpp cause that is what frame buffer inits to + # when the machine reboots + if iutil.getArch() == "ppc": + cardname = "Framebuffer driver (generic)" + xcfg.set_videocard_card(cardname) + xcfg.set_videocard_name(cardname) + xcfg.set_colordepth(8) + xcfg.set_resolution("640x480") + xsetup = xsetup.XSetup(xcfg) id.setXSetup(xsetup) diff --git a/anaconda.spec.in b/anaconda.spec.in index e7329babb..da9725c26 100644 --- a/anaconda.spec.in +++ b/anaconda.spec.in @@ -1,3 +1,4 @@ +ExcludeArch: ppc64 Name: anaconda Version: @@VERSION@@ Release: @@RELEASE@@ diff --git a/command-stubs/mknod-stub b/command-stubs/mknod-stub index 752f46283..f7491eabf 100755 --- a/command-stubs/mknod-stub +++ b/command-stubs/mknod-stub @@ -25,7 +25,8 @@ def main(): # inode while (drive.find('/') != -1): if (drive.startswith("cciss") or drive.startswith("ida") or - drive.startswith("rd") or drive.startswith("ataraid")): + drive.startswith("rd") or drive.startswith("ataraid") + or drive.startswith("iseries")): break drive = drive[drive.find('/') + 1:] isys.makeDevInode(drive, path) @@ -41,7 +41,8 @@ ExcludePackages = { 'XFree86-3DLabs' : None, 'XFree86-8514' : None, 'kernel-smp' : None, 'kernel-bigmem' : None, 'kernel-vrdr' : None, 'kernel-tape' : None, 'kernel-BOOTtape' : None, 'kernel-BOOTvrdr' : None, - 'kernel-summit' : None, + 'kernel-summit' : None, 'kernel-pseries': None, + 'kernel-iseries': None, 'kinput2-canna' : None, 'kinput-canna-wnn4' : None, 'kinput2-wnn4' : None, 'kinput2-wnn6' : None } @@ -209,6 +210,11 @@ class HeaderList: continue if name == "kernel-iseries" and iutil.getPPCMachine() != "iSeries": continue + + # FIXME: this is a really bad hack so that we can try to avoid + # weirdness with kernel packages + if name == "kernel-iseries" or name == "kernel-pseries": + self.packages["kernel"] = Package(h) if noscore: self.packages[name] = Package(h) diff --git a/installclass.py b/installclass.py index 605d225f8..083a6bd48 100644 --- a/installclass.py +++ b/installclass.py @@ -149,7 +149,8 @@ class BaseInstallClass: if iutil.getArch() != "i386": dispatch.skipStep("bootdisk") - + dispatch.skipStep("bootloader") + if (iutil.getArch() == "alpha" or iutil.getArch() == "ia64" or iutil.getArch() == "sparc" or iutil.getArch() == "ppc"): dispatch.skipStep("bootloader") diff --git a/isys/lang.c b/isys/lang.c index 684ae2247..e1c12587b 100644 --- a/isys/lang.c +++ b/isys/lang.c @@ -180,6 +180,10 @@ int isysStartBterm(void) { int rc; struct stat sb; + /* if we've already successfully started bterm, we don't need to again */ + if (!access("/var/run/bterm.run", R_OK)) + return 0; + /* assume that if we're already on a pty we can handle unicode */ fstat(0, &sb); if (major(sb.st_rdev) == 3 || major(sb.st_rdev) == 136) @@ -192,9 +196,14 @@ int isysStartBterm(void) { else if (!access("font.bgf.gz", R_OK)) btermargs[3] = "font.bgf.gz"; else - return 0; + return 1; rc = bterm_main(4, btermargs); + + if (!rc) { + int fd = open("/var/run/bterm.run", O_CREAT | O_TRUNC | O_RDWR, 0600); + close(fd); + } return rc; } diff --git a/iw/xconfig_gui.py b/iw/xconfig_gui.py index e3b6f4f51..6a9fd3bfa 100644 --- a/iw/xconfig_gui.py +++ b/iw/xconfig_gui.py @@ -219,9 +219,11 @@ class XCustomWindow (InstallWindow): self.desktop = desktop self.instClass = instClass - if not xsetup.imposed_sane_default: - xsetup.xhwstate.choose_sane_default() - xsetup.imposed_sane_default = 1 + # dont do anything on ppc - we want to use default fb setting + if iutil.getArch() != "ppc": + if not xsetup.imposed_sane_default: + xsetup.xhwstate.choose_sane_default() + xsetup.imposed_sane_default = 1 # save so we can restore if necessary going back self.origres = self.xsetup.xhwstate.get_resolution() @@ -776,6 +778,10 @@ class XConfigWindow (InstallWindow): self.dispatch.skipStep("writexconfig", skip = 0) self.xsetup.skipx = 0 + # if ppc then we bail now, you cant selected videocard for ppc + if iutil.getArch() == "ppc": + return None + # set videocard type (assuming we're working with PRIMARY card) if self.currentCard: try: @@ -805,6 +811,8 @@ class XConfigWindow (InstallWindow): else: selected = None + + # see if they actually picked a card, otherwise keep going if selected == None: self.intf.messageWindow(_("Unspecified video card"), _("You need to pick a video card before " @@ -813,11 +821,6 @@ class XConfigWindow (InstallWindow): "choose the 'Skip X Configuration' button.")) raise gui.StayOnScreen - - # see if they actually picked a card, otherwise keep going - - - # sniff out the selected ram size menu = self.ramOption.get_menu ().get_active() index = 0 @@ -842,7 +845,8 @@ class XConfigWindow (InstallWindow): return None def skipToggled (self, widget, *args): - self.configbox.set_sensitive (not widget.get_active ()) + if not self.force_ppc_fb: + self.configbox.set_sensitive (not widget.get_active ()) def selectCardType (self, selection, *args): if self.ignoreEvents: @@ -941,9 +945,20 @@ class XConfigWindow (InstallWindow): self.autoBox = gtk.VBox (gtk.FALSE, 5) + self.force_ppc_fb = 0 arch = iutil.getArch() # we can only probe video ram on i386 - if arch != "i386": + # and we force frame buffer on ppc currently + if arch == "ppc": + label = makeFormattedLabel (_("Your system will be setup to " + "use the frame buffer driver for " + "the X Window System. If you do " + "not want to setup the X Window " + "System , choose " + "'Skip X Configuration' below.")) + box.pack_start (label, gtk.FALSE, gtk.FALSE) + self.force_ppc_fb = 1 + elif arch != "i386": label = makeFormattedLabel (_("Your video ram size can not be " "autodetected. Choose your video " "ram size from the choices below:")) @@ -1030,7 +1045,10 @@ class XConfigWindow (InstallWindow): sw.set_policy (gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) sw.set_shadow_type(gtk.SHADOW_IN) sw.add (self.cardview) - box.pack_start (sw, gtk.TRUE) + + # only show this option on non-ppc + if not self.force_ppc_fb: + box.pack_start (sw, gtk.TRUE) #Memory configuration menu hbox = gtk.HBox() @@ -1056,7 +1074,10 @@ class XConfigWindow (InstallWindow): hbox.pack_start(self.ramOption, gtk.TRUE, gtk.TRUE, 25) self.ramOption.set_menu (self.ramMenu) - box.pack_start (hbox, gtk.FALSE) + + # only show this option on non-ppc + if not self.force_ppc_fb: + box.pack_start (hbox, gtk.FALSE) restore = gtk.Button (_("Restore _original values")) restore.connect ("clicked", self.restorePressed) @@ -1069,8 +1090,13 @@ class XConfigWindow (InstallWindow): self.topbox = gtk.VBox (gtk.FALSE, 5) self.topbox.set_border_width (5) - self.topbox.pack_start (box, gtk.TRUE, gtk.TRUE) - self.topbox.pack_start (self.skip, gtk.FALSE) + if self.force_ppc_fb: + # tweak packing + self.topbox.pack_start (box, gtk.FALSE, gtk.FALSE) + self.topbox.pack_start (self.skip, gtk.FALSE, gtk.FALSE) + else: + self.topbox.pack_start (box, gtk.TRUE, gtk.TRUE) + self.topbox.pack_start (self.skip, gtk.FALSE) self.configbox = box diff --git a/iw/zipl_gui.py b/iw/zipl_gui.py index 78aa31422..f76897dbb 100644 --- a/iw/zipl_gui.py +++ b/iw/zipl_gui.py @@ -71,6 +71,9 @@ class ZiplWindow (InstallWindow): box = gtk.VBox(gtk.FALSE, 5) box.set_border_width(5) + + label = gtk.Label(_("The z/IPL boot loader will be installed on your " + "system.")) label = gtk.Label(_("The z/IPL Boot Loader will now be installed " "on your system." "\n" @@ -107,10 +110,18 @@ class ZiplWindow (InstallWindow): clabel2 = gtk.Label(_("Chandev Parameters") + ":") clabel2.set_alignment(0.0, 0.5) self.chandeventry2 = gtk.Entry() + if bl.args and bl.args.get(): - self.kernelEntry.set_text(bl.args.get()) - if isys.getDasdPorts(): - self.kernelEntry.set_text(self.kernelEntry.get_text() + " dasd=" + isys.getDasdPorts()) + kernelparms = bl.args.get() + else: + kernelparms = "" + if isys.getDasdPorts() and (kernelparms.find("dasd=") == -1): + if len(kernelparms) > 0: + kernelparms = "%s dasd=%s" %(kernelparms, isys.getDasdPorts()) + else: + kernelparms = "dasd=%s" %(isys.getDasdPorts(),) + self.kernelEntry.set_text(kernelparms) + if bl.args and bl.args.chandevget(): cdevs = bl.args.chandevget() self.chandeventry1.set_text('') diff --git a/kickstart.py b/kickstart.py index c8f022851..ddf531835 100644 --- a/kickstart.py +++ b/kickstart.py @@ -1383,4 +1383,4 @@ def pullRemainingKickstartConfig(ksfile): url.close() return None - + diff --git a/loader2/Makefile b/loader2/Makefile index ad2a10d8e..d222a6832 100644 --- a/loader2/Makefile +++ b/loader2/Makefile @@ -136,6 +136,7 @@ install: all install -m 755 $$n $(DESTDIR)/$(RUNTIMEDIR)/loader; \ strip $(DESTDIR)/$(RUNTIMEDIR)/loader/$$n || :; \ done + if [ -f keymaps-$(ARCH) ]; then cp keymaps-$(ARCH) $(DESTDIR)/$(RUNTIMEDIR)/keymaps-override-$(ARCH) ; fi install -m 644 loader.tr $(DESTDIR)/$(RUNTIMEDIR)/loader install -m 644 module-info $(DESTDIR)/$(RUNTIMEDIR)/loader install -m 644 font.bgf.gz $(DESTDIR)/$(RUNTIMEDIR)/loader diff --git a/loader2/keymaps-ppc b/loader2/keymaps-ppc Binary files differnew file mode 100644 index 000000000..e7463301a --- /dev/null +++ b/loader2/keymaps-ppc diff --git a/loader2/linuxrc.s390 b/loader2/linuxrc.s390 index bf35849da..a3dfc2a2f 100644 --- a/loader2/linuxrc.s390 +++ b/loader2/linuxrc.s390 @@ -28,6 +28,18 @@ VERSION=1.01 export TEXTDOMAIN=s390installer export TEXTDOMAINDIR=/usr/lib/locale +doshutdown() +{ + exec /sbin/shutdown + exit 0 +} + +doreboot() +{ + exec /sbin/shutdown -r + exit 0 +} + startinetd() { echo @@ -35,15 +47,14 @@ startinetd() echo $"Welcome to the Red Hat Linux install environment $VERSION for $S390ARCH" > /etc/issue.net echo $"Welcome to the Red Hat Linux install environment $VERSION for $S390ARCH" > /etc/motd echo >> /etc/motd - echo $"Now run 'loader' to install Red Hat Linux." >> /etc/motd - echo >> /etc/motd /sbin/xinetd -stayalive -reuse -pidfile /tmp/xinetd.pid /sbin/sshd if [ -z "$RUNKS" ]; then + echo + echo $"Please connect now to $IPADDR to start the installation." + read while : ; do - echo - echo $"Please connect now to $IPADDR and start 'loader' from this shell." /bin/sh --login [ $? = 0 ] || break done @@ -348,12 +359,12 @@ MTU=$MTU EOF # so that the vars get propagated into the sshd shells -cat >> /etc/profile <<EOF +mkdir /.ssh +cat >> /.ssh/environment <<EOF LD_LIBRARY_PATH=$LD_LIBRARY_PATH PATH=$PATH HOME=$HOME PYTHONPATH=$PYTHONPATH -export LD_LIBRARY_PATH PATH HOME PYTHONPATH EOF if [ "$NETTYPE" = "ctc" ]; then @@ -364,16 +375,20 @@ fi # I'm tired of typing this out... echo "loader" >> /.bash_history +echo -n $$ > /var/run/init.pid +# shutdown (halt) on SIGUSR1 +trap doshutdown SIGUSR1 +# reboot on SIGUSR2 +trap doreboot SIGUSR2 + startinetd if [ -n "$RUNKS" ]; then /sbin/loader fi -umount -a -umount /proc +doshutdown -exit 0 # ;;; Local Variables: *** # ;;; mode: sh *** # ;;; tab-width:3 *** diff --git a/loader2/loader.c b/loader2/loader.c index d4d4dc1f0..a44c99119 100644 --- a/loader2/loader.c +++ b/loader2/loader.c @@ -37,6 +37,7 @@ #include <sys/ioctl.h> #include <sys/types.h> #include <sys/stat.h> +#include <sys/wait.h> #include <linux/fb.h> @@ -365,36 +366,52 @@ static void writeVNCPasswordFile(char *pfile, char *password) { fclose(f); } -/* read information that's passed as environmental variables */ -static void readEnvVars(int flags, struct loaderData_s ** ld) { - struct loaderData_s * loaderData = *ld; - char * env; +/* read information from /tmp/netinfo (written by linuxrc) */ +static void readNetInfo(int flags, struct loaderData_s ** ld) { + struct loaderData_s * loaderData = *ld; + FILE *f; + char *end; + char buf[100], *vname, *vparm; - env = getenv("IPADDR"); - if (env && *env) { - loaderData->ip = strdup(env); - loaderData->ipinfo_set = 1; + f = fopen("/tmp/netinfo", "r"); + if (!f) { + return; } - env = getenv("NETMASK"); - if (env && *env) { - loaderData->netmask = strdup(env); - } - env = getenv("GATEWAY"); - if (env && *env) { - loaderData->gateway = strdup(env); - } - env = getenv("DNS"); - if (env && *env) { - loaderData->dns = strdup(env); - } - env = getenv("MTU"); - if (env && *env) { - loaderData->mtu = atoi(env); - } - env = getenv("REMIP"); - if (env && *env) { - loaderData->ptpaddr = strdup(env); + vname = (char *)malloc(sizeof(char)*15); + vparm = (char *)malloc(sizeof(char)*85); + + while(fgets(buf, 100, f)) { + if ((vname = strtok(buf, "="))) { + vparm = strtok(NULL, "="); + while (isspace(*vparm)) + vparm++; + end = strchr(vparm, '\0'); + while (isspace(*end)) + end--; + end++; + *end = '\0'; + if (strstr(vname, "IPADDR")) { + loaderData->ip = strdup(vparm); + loaderData->ipinfo_set = 1; + } + if (strstr(vname, "NETMASK")) { + loaderData->netmask = strdup(vparm); + } + if (strstr(vname, "GATEWAY")) { + loaderData->gateway = strdup(vparm); + } + if (strstr(vname, "DNS")) { + loaderData->dns = strdup(vparm); + } + if (strstr(vname, "MTU")) { + loaderData->mtu = atoi(vparm); + } + if (strstr(vname, "REMIP")) { + loaderData->ptpaddr = strdup(vparm); + } + } } + fclose(f); } /* parses /proc/cmdline for any arguments which are important to us. @@ -528,7 +545,7 @@ static int parseCmdLineFlags(int flags, struct loaderData_s * loaderData, } } - readEnvVars(flags, &loaderData); + readNetInfo(flags, &loaderData); /* NULL terminates the array of extra args */ extraArgs[numExtraArgs] = NULL; @@ -912,6 +929,19 @@ static void migrate_runtime_directory(char * dirname) { } +static int hasGraphicalOverride(char *extraArgs[]) { + int i; + + if (getenv("DISPLAY")) + return 1; + + for (i = 0; extraArgs[i] != NULL; i++) { + if (!strncasecmp(extraArgs[i], "--vnc", 5)) + return 1; + } + return 0; +} + int main(int argc, char ** argv) { int flags = 0; struct stat sb; @@ -958,6 +988,14 @@ int main(int argc, char ** argv) { if (!strcmp(argv[0] + strlen(argv[0]) - 5, "rmmod")) return combined_insmod_main(argc, argv); + if (!testing && !access("/var/run/loader.run", R_OK)) { + printf(_("loader has already been run. Starting shell.")); + execl("/bin/sh", "-/bin/sh", NULL); + exit(0); + } + i = open("/var/run/loader.run", O_CREAT | O_TRUNC | O_RDWR, 0600); + close(i); + /* The fstat checks disallows serial console if we're running through a pty. This is handy for Japanese. */ fstat(0, &sb); @@ -999,7 +1037,7 @@ int main(int argc, char ** argv) { extraArgs[0] = NULL; flags = parseCmdLineFlags(flags, &loaderData, cmdLine, extraArgs); - if (FL_SERIAL(flags) && !getenv("DISPLAY")) + if (FL_SERIAL(flags) && !hasGraphicalOverride(extraArgs)) flags |= LOADER_FLAGS_TEXT; setupRamfs(); @@ -1173,6 +1211,11 @@ int main(int argc, char ** argv) { else *argptr++ = "/usr/bin/anaconda"; + /* make sure /tmp/updates exists so that magic in anaconda to */ + /* symlink rhpl/ will work */ + if (access("/tmp/updates", F_OK)) + mkdirChain("/tmp/updates"); + logMessage("Running anaconda script %s", *(argptr-1)); *argptr++ = "-m"; @@ -1265,10 +1308,42 @@ int main(int argc, char ** argv) { closeLog(); if (!FL_TESTING(flags)) { + int pid, status, rc; + char *buf = sdupprintf(_("Running anaconda, the %s system installer - please wait...\n"), getProductName()); printf("%s", buf); - execv(anacondaArgs[0], anacondaArgs); - perror("exec"); + + if (!(pid = fork())) { + execv(anacondaArgs[0], anacondaArgs); + fprintf(stderr, "exec of anaconda failed: %s", strerror(errno)); + exit(1); + } + + waitpid(pid, &status, 0); + + if (!WIFEXITED(status) || WEXITSTATUS(status)) + rc = 1; + else + rc = 0; + +#if defined(__s390__) || defined(__s390x__) + /* FIXME: we have to send a signal to linuxrc on s390 so that shutdown + * can happen. this is ugly */ + FILE * f; + f = fopen("/var/run/init.pid", "r"); + if (!f) { + logMessage("can't find init.pid, guessing that init is pid 1"); + pid = 1; + } else { + char * buf = malloc(256); + fgets(buf, 256, f); + pid = atoi(buf); + } + kill(pid, SIGUSR1); + return rc; +#else + return rc; +#endif } #if 0 else { diff --git a/loader2/module-info b/loader2/module-info index 832b4b5e0..f5b98bf02 100644 --- a/loader2/module-info +++ b/loader2/module-info @@ -504,6 +504,10 @@ veth eth "iSeries Virtual Ethernet" +viodasd + scsi_hostadapter + "iSeries Virtual DASD" + # Mac stuff bmac eth diff --git a/loader2/shutdown.c b/loader2/shutdown.c index 33dab7bad..f6ade0ae0 100644 --- a/loader2/shutdown.c +++ b/loader2/shutdown.c @@ -65,11 +65,7 @@ void shutDown(int noKill, int doReboot) { #endif } else { printf("you may safely reboot your system\n"); -#if !defined(__s390__) && !defined(__s390x__) - while (1); -#else reboot(RB_HALT_SYSTEM); -#endif } exit(0); diff --git a/packages.py b/packages.py index c739235c1..2c5da3500 100644 --- a/packages.py +++ b/packages.py @@ -496,6 +496,8 @@ def setupTimezone(timezone, upgrade, instPath, dir): except OSError, (errno, msg): log("Error copying timezone (from %s): %s" %(tzfile, msg)) + if iutil.getArch() == "s390": + return args = [ "/usr/sbin/hwclock", "--hctosys" ] if timezone.utc: args.append("-u") @@ -1239,7 +1241,7 @@ def betaNagScreen(intf, dir): while 1: rc = intf.messageWindow( _("Warning! This is a beta!"), _("Thank you for downloading this " - "Red Hat Beta release.\n\n" + "%s Beta release.\n\n" "This is not a final " "release and is not intended for use " "on production systems. The purpose of " @@ -1247,9 +1249,9 @@ def betaNagScreen(intf, dir): "from testers, and it is not suitable " "for day to day usage.\n\n" "To report feedback, please visit:\n\n" - " http://bugzilla.redhat.com/bugzilla\n\n" - "and file a report against 'Red Hat Public " - "Beta'.\n"), + " http://bugzilla.redhat.com/bugzilla\n\n" + "and file a report against '%s Beta'.\n" + %(productName, productName,)), type="custom", custom_icon="warning", custom_buttons=[_("_Exit"), _("_Install BETA")]) diff --git a/partitions.py b/partitions.py index 4a4bb0955..7780145a8 100644 --- a/partitions.py +++ b/partitions.py @@ -104,13 +104,11 @@ class Partitions: ptype = fsset.fileSystemTypeGet("software RAID") elif part.get_flag(parted.PARTITION_LVM) == 1: ptype = fsset.fileSystemTypeGet("physical volume (LVM)") - elif part.fs_type: + else: ptype = partedUtils.get_partition_file_system_type(part) - if part.fs_type.name == "linux-swap": + if part.fs_type and part.fs_type.name == "linux-swap": # XXX this is a hack format = 1 - else: - ptype = fsset.fileSystemTypeGet("foreign") start = part.geom.start end = part.geom.end diff --git a/scripts/buildinstall b/scripts/buildinstall index e323597cb..2dbf60a34 100755 --- a/scripts/buildinstall +++ b/scripts/buildinstall @@ -55,9 +55,10 @@ if [ -z "$RELEASESTR" ]; then usage fi -p=`cd $DIR; /bin/pwd | sed 's,/md1/,/,g'` +p=`cd $DIR; /bin/pwd` BUILDINSTDIR=$p/buildinstall.tree.$$ +TREEDIR=/tmp/treedir.$$ rm -rf $BUILDINSTDIR mkdir -p $BUILDINSTDIR @@ -88,27 +89,32 @@ fi MK_IMAGES=$BUILDINSTDIR/mk-images echo "Building images..." -$UPD_INSTROOT --comp $COMPNAME $p/RedHat/RPMS $p/image-template $p/RedHat/instimage +if [ -x /usr/bin/runroot ]; then + runroot $COMPNAME --onlyone --arch $BUILDARCH "$UPD_INSTROOT --comp $COMPNAME $p/RedHat/RPMS $TREEDIR/image-template $TREEDIR/instimage" +else + $UPD_INSTROOT --comp $COMPNAME $p/RedHat/RPMS $TREEDIR/image-template $TREEDIR/instimage +fi # XXX hack - msw if [ $BUILDARCH = "sparc" ]; then BUILDARCH=sparc64 fi -if [ -n "$PKGORDER" -a -x $p/RedHat/instimage/usr/lib/anaconda-runtime/pkgorder ]; then +if [ -n "$PKGORDER" ]; then echo "Getting package order..." if [ -x /usr/bin/runroot ]; then runroot --quiet $COMPNAME --onlyone --arch $BUILDARCH \ - "PYTHONPATH=$p/RedHat/instimage/usr/lib/anaconda $p/RedHat/instimage/usr/lib/anaconda-runtime/pkgorder $p $BUILDARCH" > $PKGORDER + "PYTHONPATH=$TREEDIR/instimage/usr/lib/anaconda $TREEDIR/instimage/usr/lib/anaconda-runtime/pkgorder $p $BUILDARCH" > $PKGORDER else - PYTHONPATH=$p/RedHat/instimage/usr/lib/anaconda $p/RedHat/instimage/usr/lib/anaconda-runtime/pkgorder $p $BUILDARCH > $PKGORDER + PYTHONPATH=$TREEDIR/instimage/usr/lib/anaconda $TREEDIR/instimage/usr/lib/anaconda-runtime/pkgorder $p $BUILDARCH > $PKGORDER fi fi +echo "Making images..." if [ -x /usr/bin/runroot ]; then - runroot $COMPNAME --onlyone --arch $BUILDARCH "cd $BUILDINSTDIR\; ./mk-images $p/RedHat/RPMS $p $p/image-template $BUILDARCH '\"$PRODUCTSTR\"' $VERSION" + runroot $COMPNAME --onlyone --arch $BUILDARCH "cd $BUILDINSTDIR\; ./mk-images $p/RedHat/RPMS $p $TREEDIR/image-template $TREEDIR/instimage $BUILDARCH '\"$PRODUCTSTR\"' $VERSION" else - $MK_IMAGES $p/RedHat/RPMS $p $p/image-template $BUILDARCH "$PRODUCTSTR" $VERSION + $MK_IMAGES $p/RedHat/RPMS $p $TREEDIR/image-template $TREEDIR/instimage $BUILDARCH "$PRODUCTSTR" $VERSION fi MK_STAMP=./makestamp.py @@ -126,4 +132,8 @@ MK_STAMP=$BUILDINSTDIR/makestamp.py $MK_STAMP --releasestr="$RELEASESTR" --arch=$BUILDARCH --discNum="1,2,3" --baseDir=RedHat/base --packagesDir=RedHat/RPMS --pixmapsDir=RedHat/pixmaps --outfile=$p/.discinfo rm -rf $BUILDINSTDIR -rm -rf $p/image-template $p/RedHat/instimage +if [ -x /usr/bin/runroot ]; then + runroot $COMPNAME --onlyone --arch $BUILDARCH "rm -rf $TREEDIR/image-template $TREEDIR/instimage" +else + rm -rf $TREEDIR/image-template $TREEDIR/instimage +fi diff --git a/scripts/mk-images b/scripts/mk-images index 6fe22fc6a..963810fed 100755 --- a/scripts/mk-images +++ b/scripts/mk-images @@ -4,14 +4,14 @@ PATH=$PATH:/sbin:/usr/sbin IMAGEUUID=$(date +%Y%m%d%H%M) usage () { - echo "usage: mk-images <pkgsrc> <toplevel> <template> <buildarch> <productname> <version>" + echo "usage: mk-images <pkgsrc> <toplevel> <template> <imgdir> <buildarch> <productname> <version>" exit 0 } -if [ -z "$1" -o -z "$2" -o -z "$3" -o -z "$4" -o -z "$5" -o -z "$6" ]; then usage; fi +if [ -z "$1" -o -z "$2" -o -z "$3" -o -z "$4" -o -z "$5" -o -z "$6" -o -z "$7" ]; then usage; fi -PRODUCT=$5 -VERSION=$6 +PRODUCT=$6 +VERSION=$7 TOPDIR=$(echo $0 | sed "s,/[^/]*$,,") if [ $TOPDIR = $0 ]; then @@ -23,15 +23,15 @@ TOPDIR=$(cd $TOPDIR; pwd) # Set, verify, and create paths KERNELPATH=$1 TOPDESTPATH=$2 - IMAGEPATH=$2/images + IMAGEPATH=$TOPDESTPATH/images FULLMODPATH=/tmp/instimagemods.$$ - FINALFULLMODPATH=$2/RedHat/instimage/modules - INSTIMGPATH=$2/RedHat/base + FINALFULLMODPATH=$4/modules + INSTIMGPATH=$TOPDESTPATH/RedHat/base INSTIMGTEMPLATE=$3 - IMGPATH=$2/RedHat/instimage + IMGPATH=$4 KERNELROOT=/tmp/updboot.kernel.$$ MODDEPS=$KERNELROOT/moddeps - BUILDARCH=$4 + BUILDARCH=$5 if [ "$BUILDARCH" = "ppc" -o "$BUILDARCH" = "ppc64" ]; then KERNELNAME=vmlinux @@ -40,6 +40,12 @@ TOPDIR=$(cd $TOPDIR; pwd) KERNELNAME=vmlinuz KERNELARCH=$BUILDARCH fi + + if [ "$BUILDARCH" = "ia64" ]; then + KERNELDIR="/boot/efi/EFI/redhat" + else + KERNELDIR="/boot" + fi if [ "$BUILDARCH" = "sparc64" ]; then BASEARCH=sparc @@ -113,11 +119,16 @@ TOPDIR=$(cd $TOPDIR; pwd) if [ "$BUILDARCH" != "s390" -a "$BUILDARCH" != "s390x" ]; then # go ahead and create the keymaps so we only have to do it once - echo "Running: GETKEYMAPS $BUILDARCH $KEYMAPS $IMGPATH" - $GETKEYMAPS $BUILDARCH $KEYMAPS $IMGPATH - if [ $? != 0 ]; then - echo "Unable to create keymaps and thus can't create initrd." - exit 1 + if [ -f $IMGPATH/usr/lib/anaconda-runtime/keymaps-override-$BUILDARCH ]; then + echo "Found keymap override, using it" + cp $IMGPATH/usr/lib/anaconda-runtime/keymaps-override-$BUILDARCH $KEYMAPS + else + echo "Running: GETKEYMAPS $BUILDARCH $KEYMAPS $IMGPATH" + $GETKEYMAPS $BUILDARCH $KEYMAPS $IMGPATH + if [ $? != 0 ]; then + echo "Unable to create keymaps and thus can't create initrd." + exit 1 + fi fi fi @@ -305,7 +316,10 @@ makemoduleball() { pushd $MMB_DIR/modules > /dev/null - find . -name '*.o.gz' |xargs gunzip + GZIPPED=$(find . -name '*.o.gz') + if [ -n "$GZIPPED" ]; then + echo $GZIPPED | xargs gunzip + fi $MODLIST --modinfo-file $MODINFO --ignore-missing --modinfo \ $MMB_MODULESET > ../$MMB_MODINFO @@ -366,6 +380,7 @@ makeinitrd() { MODULEBALLNAME="modules.cgz" MYLANGTABLE=$LANGTABLE MYLOADERTR=loader.tr + BOGL=yes while [ x$(echo $1 | cut -c1-2) = x"--" ]; do if [ $1 = "--initrdto" ]; then EXTRAINITRDPATH=$2 @@ -399,6 +414,10 @@ makeinitrd() { MODULEBALLNAME=$2 shift; shift continue + elif [ $1 = "--nobogl" ]; then + BOGL="" + shift + continue fi echo "Unknown option passed to makeinitrd" exit 1 @@ -434,6 +453,7 @@ makeinitrd() { mkdir -p $MBD_DIR/etc/terminfo/x mkdir -p $MBD_DIR/etc/terminfo/v mkdir -p $MBD_DIR/var/state + mkdir -p $MBD_DIR/var/run ln -s /tmp $MBD_DIR/var/state/xkb if [ "$BUILDARCH" = "ppc" -o "$BUILDARCH" = "ppc64" ]; then @@ -466,7 +486,9 @@ EOF mkdir -p $MBD_DIR/etc/terminfo/b install -m 644 $IMGPATH/usr/share/terminfo/b/bterm $MBD_DIR/etc/terminfo/b/bterm - install -m 644 $LOADERBINDIR/font.bgf.gz $MBD_DIR/etc + if [ -n "$BOGL" ]; then + install -m 644 $LOADERBINDIR/font.bgf.gz $MBD_DIR/etc + fi if [ -n "$PCMCIA" ]; then mkdir -p $MBD_BOOTTREE/etc @@ -638,7 +660,7 @@ makebootdisk() { if [ -n "$EXTRAKERNELPATH" ]; then mkdir -p `dirname $EXTRAKERNELPATH` - cp -f $KERNELROOT/boot/${KERNELNAME}-* $EXTRAKERNELPATH + cp -f $KERNELROOT/$KERNELDIR/${KERNELNAME}-* $EXTRAKERNELPATH fi mkdir -p `dirname $MBD_FILENAME` @@ -698,7 +720,8 @@ makeinstimage () { makeproductfile $tmpdir echo "Running mkcramfs $CRAMBS $tmpdir $INSTIMGPATH/${imagename}2.img" - mkcramfs $CRAMBS $tmpdir $INSTIMGPATH/${imagename}2.img + mkcramfs $CRAMBS $tmpdir /tmp/${imagename}2.img.$$ + cp /tmp/${imagename}2.img.$$ $INSTIMGPATH/${imagename}2.img size=$(ls -l $INSTIMGPATH/${imagename}2.img | awk '{print $5}') size=$(expr $size / 1024) echo "Wrote $INSTIMGPATH/${imagename}2.img (${size}k)..." @@ -843,7 +866,7 @@ for kernelvers in $vertag; do kpackage=$($LATEST $KERNELPATH kernel-$kernelvers) mkdir -p $KERNELROOT/lib/modules/misc if [ ! -f "$kpackage" ]; then - echo 'kernel-$kernelvers does not exist -- using kernel package' + echo "kernel-$kernelvers does not exist -- using kernel package" kpackage=$($LATEST $KERNELPATH kernel) kernelvers="" fi @@ -866,8 +889,8 @@ for kernelvers in $vertag; do usage fi - if [ ! -f "$KERNELROOT/boot/${KERNELNAME}-$version" ]; then - echo "$KERNELROOT/boot/${KERNELNAME}-$version does not exist" + if [ ! -f "$KERNELROOT/$KERNELDIR/${KERNELNAME}-$version" ]; then + echo "$KERNELROOT/$KERNELDIR/${KERNELNAME}-$version does not exist" usage fi @@ -877,7 +900,10 @@ for kernelvers in $vertag; do PCMCIAMODULES=$((perl -e 'while (<>) { s/^.*class.*(network|scsi|ide).*module +"// || next; s/[" ]//g; s/,/\n/g; print }' $KERNELROOT/etc/pcmcia/config | sed 's/\.o//g') | sort -u) fi - find $KERNELROOT/lib/modules/$version -name "*.o.gz" |xargs gunzip + GZIPPED=$(find $KERNELROOT/lib/modules/$version -name "*.o.gz") + if [ -n "$GZIPPED" ]; then + echo $GZIPPED |xargs gunzip + fi allmods=$(find $KERNELROOT/lib/modules/$version -name *.o) rundepmod "$allmods" $MODDEPS diff --git a/scripts/mk-images.i386 b/scripts/mk-images.i386 index e556c540a..e2e3993e1 100644 --- a/scripts/mk-images.i386 +++ b/scripts/mk-images.i386 @@ -25,11 +25,6 @@ prepareBootTree() { cp $BOOTDISKDIR/splash.lss $MBD_BOOTTREE/splash.lss rm -f $MBD_BOOTTREE/syslinux-splash.png if [ -d $BOOTDISKDIR/$BOOTLANG ]; then - # fb console and kon don't get along... - if [ "$BOOTLANG" = "ja_JP" ]; then - sed -e "s/ vga=[0-9]*//g" < $MBD_BOOTTREE/syslinux.cfg > $MBD_BOOTTREE/syslinux.cf2 - mv -f $MBD_BOOTTREE/syslinux.cf2 $MBD_BOOTTREE/syslinux.cfg - fi for file in $BOOTDISKDIR/$BOOTLANG/*.msg; do filename=`basename $file` sed -e "s/@VERSION@/$VERSION/g" $file > $MBD_BOOTTREE/$filename @@ -151,7 +146,7 @@ PCMCIAMODULES="$PCMCIAMODULES yenta_socket i82365 tcic pcmcia_core ds" makeBootImages() { echo "Building $TOPDESTPATH/images/pxeboot/initrd.img" makeinitrd --initrdto $TOPDESTPATH/images/pxeboot/initrd.img \ - --pcmcia \ + --pcmcia --nobogl \ --initrdsize 4750 \ --loaderbin loader \ --modules "$COMMONMODULES" diff --git a/scripts/mk-images.ia64 b/scripts/mk-images.ia64 index 3b6e31a92..b9ab64172 100644 --- a/scripts/mk-images.ia64 +++ b/scripts/mk-images.ia64 @@ -4,7 +4,7 @@ LATEUSBMODS="mousedev" SECSTAGE="nfs fat vfat raid0 raid1 raid5 ext3 $LATEUSBMODS" NETMODULES="3c59x acenic bcm5700 e100 e1000 eepro100 hamachi sk98lin starfire sunhme tulip yellowfin tg3" -SCSIMODULES="sd_mod sr_mod scsi_mod DAC960 cciss cpqarray aic7xxx aic7xxx_mod megaraid qla1280 qla2200 qla2300 sym53c8xx sym53c8xx_2 mptscsih mptbase" +SCSIMODULES="sd_mod sr_mod scsi_mod DAC960 cciss cpqarray aic7xxx aic7xxx_mod megaraid qla1280 qla2200 qla2300 sym53c8xx sym53c8xx_2 mptscsih mptbase ips" IDEMODULES="ide-mod ide-probe-mod ide-disk ide-cd" prepareBootImage() { diff --git a/scripts/mk-images.ppc b/scripts/mk-images.ppc index 43b66ac0e..0844de063 100644 --- a/scripts/mk-images.ppc +++ b/scripts/mk-images.ppc @@ -1,3 +1,4 @@ +COMMONMODULES="nfs fat vfat cramfs loop" FSMODS="msdos vfat ext3 reiserfs jfs" IDEMODS="ide-cd" SCSIMODS="sd_mod sr_mod st" @@ -8,6 +9,7 @@ NETMODULES="sungem tg3 ne2k-pci 3c59x 8139too de4x5 acenic pcnet32 tulip natsemi eepro100 airport" SCSIMODULES="advansys aic7xxx initio sym53c8xx" +ISERIESMODULES="veth viodasd viocd" # images we only want on the CD (usually for space reasons) ISOMODULES="ehci-hcd ieee1394 ohci1394 sbp2" @@ -25,22 +27,25 @@ makeBootImages() { makeinitrd --initrdto $TOPDESTPATH/ppc/chrp/ramdisk.image.gz \ --initrdsize 8192 \ --loaderbin loader \ - --modules "nfs fat vfat cramfs $NETMODULES $SCSIMODULES $IDEMODULES $ISOMODULES" + --modules "$COMMONMODULES $NETMODULES $SCSIMODULES $IDEMODULES $ISOMODULES" mkdir -p $TOPDESTPATH/etc $TOPDESTPATH/ppc/chrp cp $KERNELROOT/boot/vmlinux-*pseries* $TOPDESTPATH/ppc/chrp/vmlinux cp $BOOTDISKDIR/yaboot.conf $TOPDESTPATH/etc/yaboot.conf cp $BOOTDISKDIR/bootinfo.txt $TOPDESTPATH/ppc/bootinfo.txt cp $IMGPATH/usr/lib/yaboot/yaboot $TOPDESTPATH/ppc/chrp + $IMGPATH/usr/lib/yaboot/addnote $TOPDESTPATH/ppc/chrp/yaboot # we also want to make a boot.iso here mkdir -p $TOPDESTPATH/isopath/ppc/chrp $TOPDESTPATH/isopath/etc cp $TOPDESTPATH/etc/* $TOPDESTPATH/isopath/etc/ cp $TOPDESTPATH/ppc/chrp/* $TOPDESTPATH/isopath/ppc/chrp + cp $TOPDESTPATH/ppc/bootinfo.txt $TOPDESTPATH/isopath/ppc/bootinfo.txt - # FIXME: still need the magic boot_image file - # mkisofs -generic-boot $TOPDESTPATH/isopath/boot_image -V "PBOOT" -J -R -v -T -allow-multidot -l -o $TOPDESTPATH/images/boot.iso $TOPDESTPATH/isopath - # rm -rf $TOPDESTPATH/isopath/ + # FIXME: this assumes the file gets there by magic + cp $TOPDESTPATH/boot_image $TOPDESTPATH/isopath/boot_image + mkisofs -generic-boot $TOPDESTPATH/isopath/boot_image -A "$PRODUCT $VERSION" -V "PBOOT" -J -R -v -T -allow-multidot -l -o $TOPDESTPATH/images/boot.iso $TOPDESTPATH/isopath + rm -rf $TOPDESTPATH/isopath/ elif [ "$kernelvers" = "iseries" ]; then mkdir -p $TOPDESTPATH/ppc/iSeries @@ -48,7 +53,7 @@ makeBootImages() { makeinitrd --initrdto $TOPDESTPATH/ppc/iSeries/ramdisk.image.gz \ --initrdsize 8192 \ --loaderbin loader \ - --modules "nfs fat vfat cramfs veth $NETMODULES $SCSIMODULES $IDEMODULES $ISOMODULES" + --modules "$COMMONMODULES $NETMODULES $SCSIMODULES $IDEMODULES $ISOMODULES $ISERIESMODULES" cp $KERNELROOT/boot/vmlinux-*iseries* $TOPDESTPATH/ppc/iSeries/vmlinux cp $KERNELROOT/boot/System.map-*iseries* $TOPDESTPATH/ppc/iSeries/System.map diff --git a/scripts/mk-images.s390 b/scripts/mk-images.s390 index 772e8d571..9bada5f3e 100644 --- a/scripts/mk-images.s390 +++ b/scripts/mk-images.s390 @@ -108,6 +108,7 @@ makeS390initrd() { mkdir -p $MBD_DIR/proc mkdir -p $MBD_DIR/tmp mkdir -p $MBD_DIR/etc/terminfo/{a,d,k,l,s,v,x} + mkdir -p $MBD_DIR/var/run mkdir -p $MBD_DIR/var/state mkdir -p $MBD_DIR/var/empty/sshd mkdir -p $MBD_DIR/etc/{pam.d,security} @@ -120,7 +121,8 @@ makeS390initrd() { fi cat > $MBD_DIR/etc/passwd << EOF -root::0:0:root:/:/bin/bash +root::0:0:root:/:/sbin/loader +debug::0:0:debug shell:/:/bin/bash sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin EOF echo "sshd:x:74:" >> $MBD_DIR/etc/group @@ -130,13 +132,11 @@ EOF pam_limits.so; do cp -f $IMGPATH/$LIBDIR/security/$i $MBD_DIR/$LIBDIR/security done - cp -f $IMGPATH/$LIBDIR/libpam_misc.so* $IMGPATH/$LIBDIR/libpam.so* $MBD_DIR/$LIBDIR for i in sshd other; do cp -f $IMGPATH/etc/pam.d/$i $MBD_DIR/etc/pam.d done cat > $MBD_DIR/etc/pam.d/login << EOF #%PAM-1.0 -auth required pam_securetty.so auth required pam_stack.so service=system-auth auth required pam_nologin.so account required pam_stack.so service=system-auth @@ -274,6 +274,7 @@ RhostsAuthentication no RSAAuthentication yes PasswordAuthentication yes PermitEmptyPasswords yes +PermitUserEnvironment yes EOF chmod 600 $MBD_DIR/etc/ssh/sshd_config @@ -283,6 +284,7 @@ EOF echo "telnet 23/tcp" > $MBD_DIR/etc/services echo "tcp 6 TCP" > $MBD_DIR/etc/protocols cp -df $IMGPATH/$LIBDIR/libpam.so* $MBD_DIR/$LIBDIR + cp -df $IMGPATH/$LIBDIR/libpam_misc.so* $MBD_DIR/$LIBDIR cp -df $IMGPATH/$LIBDIR/libdl.so* $MBD_DIR/$LIBDIR cp -df $IMGPATH/$LIBDIR/libdl-*.so* $MBD_DIR/$LIBDIR cp -df $IMGPATH/$LIBDIR/libnsl.so* $MBD_DIR/$LIBDIR diff --git a/scripts/mk-images.x86_64 b/scripts/mk-images.x86_64 index 28f2548a9..dd8571acd 100644 --- a/scripts/mk-images.x86_64 +++ b/scripts/mk-images.x86_64 @@ -85,7 +85,7 @@ mkdir -p $TOPDESTPATH/images/pxeboot makeBootImages() { echo "Building initrd-everything.img" - makeinitrd --initrdto $TOPDESTPATH/images/pxeboot/initrd-everything.img \ + makeinitrd --initrdto $TOPDESTPATH/images/pxeboot/initrd.img \ --pcmcia \ --initrdsize 8192 \ --loaderbin loader \ @@ -95,7 +95,7 @@ makeBootImages() { if [ -f $IMGPATH/usr/lib/syslinux/isolinux.bin ]; then echo "Building isolinux directory" MBD_BOOTTREE=$TOPDESTPATH/isolinux - MBD_FSIMAGE=$TOPDESTPATH/images/pxeboot/initrd-everything.img + MBD_FSIMAGE=$TOPDESTPATH/images/pxeboot/initrd.img mkdir $MBD_BOOTTREE cp $IMGPATH/usr/lib/syslinux/isolinux.bin $MBD_BOOTTREE/isolinux.bin @@ -107,6 +107,9 @@ makeBootImages() { echo "No isolinux binaries. Skipping isolinux creation" fi + # symlink the kernel for pxe dir + ln $TOPDESTPATH/isolinux/vmlinuz $TOPDESTPATH/images/pxeboot/vmlinuz + # now make a boot iso mkdir -p $TOPDESTPATH/images/isopath cp -rl $TOPDESTPATH/isolinux $TOPDESTPATH/images/isopath diff --git a/scripts/pkgorder b/scripts/pkgorder index d122e6f35..85e72cd1c 100755 --- a/scripts/pkgorder +++ b/scripts/pkgorder @@ -77,6 +77,12 @@ except rpm.error: comps = comps.ComponentSet("file://%s/RedHat/base/comps.xml" %(distDir,), hdlist, arch = arch, matchAllLang = 0) +# FIXME: HACK SO THAT PPC TREES WILL SPLIT. MUST BE REMOVED +# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +import iutil +if iutil.getArch() == "ppc" and hdlist.packages.has_key("kernel"): + del hdlist.packages["kernel"] + # work out the order we'd like to install everything in pkgOrder = [] pkgHash = {} diff --git a/scripts/upd-instroot b/scripts/upd-instroot index 4569487e9..16217307b 100755 --- a/scripts/upd-instroot +++ b/scripts/upd-instroot @@ -307,6 +307,7 @@ usr/lib/anaconda-runtime/* usr/lib/anaconda/* usr/lib/anaconda/installclasses/* usr/lib/anaconda/textw/* +usr/$LIBDIR/bogl/font.bgf.gz usr/lib/booty/* usr/kerberos/$LIBDIR/libkrb5.so* usr/kerberos/$LIBDIR/libk5crypto.so* @@ -479,7 +480,6 @@ etc/man.config etc/pango/* etc/fonts/* $LIBDIR/libnss_dns* -$LIBDIR/libnss_nis* $LIBDIR/libpam* $LIBDIR/libproc* sbin/addRamDisk @@ -367,6 +367,18 @@ class InstallInterface: self.screen.finish() def run(self, id, dispatch, configFileData): + # set up for CJK text mode if needed + if (flags.setupFilesystems and + id.instLanguage.getFontFile(id.instLanguage.getCurrent()) + and not isys.isPsudoTTY(0) + and not flags.serial): + log("starting bterm") + try: + rc = isys.startBterm() + time.sleep(1) + except Exception, e: + log("got an exception starting bterm: %s" %(e,)) + self.screen = SnackScreen() self.configFileData = configFileData self.screen.helpCallback(self.helpWindow) @@ -387,8 +399,9 @@ class InstallInterface: #self.screen.drawRootText (len(_(self.welcomeText)), 0, #(self.screen.width - len(_(self.welcomeText))) * " ") #self.screen.drawRootText (0 - len(_(step[0])), 0, _(step[0])) - lang = id.instLanguage.getCurrent() - lang = id.instLanguage.getLangNick(lang) + langname = id.instLanguage.getCurrent() + lang = id.instLanguage.getLangNick(langname) + self.langSearchPath = expandLangs(lang) + ['C'] self.instLanguage = id.instLanguage diff --git a/textw/network_text.py b/textw/network_text.py index 1419fb806..97eb63c36 100644 --- a/textw/network_text.py +++ b/textw/network_text.py @@ -348,7 +348,7 @@ class HostnameWindow: if rc == TEXT_BACK_CHECK: return INSTALL_BACK - if radio.getSelection != "manual": + if radio.getSelection() != "manual": network.overrideDHCPhostname = 0 network.hostname = "localhost.localdomain" else: diff --git a/textw/xconfig_text.py b/textw/xconfig_text.py index 941ce147e..081c666b7 100644 --- a/textw/xconfig_text.py +++ b/textw/xconfig_text.py @@ -12,18 +12,16 @@ # import copy -from constants_text import * +import iutil from snack import * - +from constants_text import * +from desktop import ENABLE_DESKTOP_CHOICE from rhpl.translate import _ from rhpl.monitor import isValidSyncRange -from desktop import ENABLE_DESKTOP_CHOICE - ddc_monitor_string = _("DDC Probed Monitor") unprobed_monitor_string = _("Unprobed Monitor") - class XCustomWindow: def depthchangeCB(self, screen): @@ -94,14 +92,14 @@ class XCustomWindow: self.origres = self.xsetup.xhwstate.get_resolution() self.origdepth = self.xsetup.xhwstate.get_colordepth() - if not xsetup.imposed_sane_default: - xsetup.xhwstate.choose_sane_default() - else: - xsetup.imposed_sane_default = 1 + # dont do anything on ppc - we want to use default fb setting + if iutil.getArch() != "ppc": + if not xsetup.imposed_sane_default: + xsetup.xhwstate.choose_sane_default() + xsetup.imposed_sane_default = 1 availableRes = self.xsetup.xhwstate.available_resolutions() availableDepths = self.xsetup.xhwstate.available_color_depths() - self.selectedDepth = self.xsetup.xhwstate.get_colordepth() self.selectedRes = self.xsetup.xhwstate.get_resolution() @@ -480,7 +478,7 @@ class MonitorWindow: self.xsetup.xhwstate.set_hsync(hval) self.xsetup.xhwstate.set_vsync(vval) self.xsetup.xhwstate.recalc_mode() - + return INSTALL_OK class XConfigWindowCard: @@ -558,6 +556,9 @@ class XConfigWindowCard: self.cardslist = self.cards.keys() self.cardslist.sort() + # yuck on fb driver works on ppc currently + self.force_ppc_fb = iutil.getArch() == "ppc" + self.ramlist = [] for ram in self.videocard.possible_ram_sizes(): self.ramlist.append(str(ram)) @@ -598,31 +599,48 @@ class XConfigWindowCard: toplevel = GridFormHelp (screen, _("Video Card Configuration"), "videocard", 1, 5) - text = _("Select the video card and video RAM for your system.") - videogrid = Grid(3, 2) - label = Label(_("Video Card:")) - videogrid.setField (label, 0, 0, (0, 0, 0, 1), anchorLeft = 1) - if self.selectedCard != None: - cardlbl = self.cardslist[self.selectedCard] - else: - cardlbl = _("Unknown card") + + if self.force_ppc_fb: + text = _("Your system will be setup to " + "use the frame buffer driver for " + "the X Window System. If you do " + "not want setup the X Window " + "System, choose " + "'Skip X Configuration' below.") + + else: + text = _("Select the video card and video RAM for your system.") + + label = Label(_("Video Card:")) + videogrid.setField (label, 0, 0, (0, 0, 0, 1), anchorLeft = 1) + if self.selectedCard != None: + cardlbl = self.cardslist[self.selectedCard] + else: + cardlbl = _("Unknown card") - cardlabel = Textbox(28, 1, cardlbl) + cardlabel = Textbox(28, 1, cardlbl) - videogrid.setField (cardlabel, 1, 0, (0, 0, 0, 1), anchorLeft = 1) - cardchangebutton = CompactButton(_("Change")) - videogrid.setField (cardchangebutton, 2, 0, (0, 0, 0, 1), anchorLeft = 1) + videogrid.setField (cardlabel, 1, 0, (0, 0, 0, 1), anchorLeft = 1) + cardchangebutton = CompactButton(_("Change")) + videogrid.setField (cardchangebutton, 2, 0, (0, 0, 0, 1), anchorLeft = 1) - label = Label(_("Video RAM:")) - videogrid.setField (label, 0, 1, (0, 0, 0, 0), anchorLeft = 1) - ramlabel = Textbox(12, 1, self.ramlist[self.selectedRam]) - videogrid.setField (ramlabel, 1, 1, (0, 0, 0, 0), anchorLeft = 1) - ramchangebutton = CompactButton(_("Change")) - videogrid.setField (ramchangebutton, 2, 1, (0, 0, 0, 0), anchorLeft = 1) + label = Label(_("Video RAM:")) + videogrid.setField (label, 0, 1, (0, 0, 0, 0), anchorLeft = 1) + ramlabel = Textbox(12, 1, self.ramlist[self.selectedRam]) + videogrid.setField (ramlabel, 1, 1, (0, 0, 0, 0), anchorLeft = 1) + ramchangebutton = CompactButton(_("Change")) + videogrid.setField (ramchangebutton, 2, 1, (0, 0, 0, 0), anchorLeft = 1) + toplevel.add(TextboxReflowed(60, text), 0, 0, (0, 0, 0, 0)) - toplevel.add(videogrid, 0, 1, (0, 1, 0, 1), growx = 1) - toplevel.add(bb, 0, 4, (0, 0, 0, 0), growx = 1) + + # tweak packing + if not self.force_ppc_fb: + toplevel.add(videogrid, 0, 1, (0, 1, 0, 1), growx = 1) + toplevel.add(bb, 0, 4, (0, 0, 0, 0), growx = 1) + else: + toplevel.add(bb, 0, 4, (0, 1, 0, 1), growx = 1) + result = toplevel.run () rc = bb.buttonPressed (result) @@ -664,6 +682,10 @@ class XConfigWindowCard: self.dispatch.skipStep("writexconfig", skip = 0) self.xsetup.skipx = 0 + # bail at this point if we're doing ppc configuration + if self.force_ppc_fb: + return INSTALL_OK + # store selected videocard selection = self.cards[self.cardslist[self.selectedCard]] primary_card = self.videocard.primaryCard() diff --git a/textw/zipl_text.py b/textw/zipl_text.py index 7503c5cf4..c5932adcf 100644 --- a/textw/zipl_text.py +++ b/textw/zipl_text.py @@ -34,8 +34,11 @@ class ZiplWindow: if bl.args and bl.args.get(): kernelparms = bl.args.get() - if isys.getDasdPorts(): - kernelparms = kernelparms + " dasd=" + isys.getDasdPorts() + if isys.getDasdPorts() and (kernelparms.find("dasd=") == -1): + if len(kernelparms) > 0: + kernelparms = "%s dasd=%s" %(kernelparms, isys.getDasdPorts()) + else: + kernelparms = "dasd=%s" %(isys.getDasdPorts(),) kernelentry.set(kernelparms) if bl.args and bl.args.chandevget(): |