[PATCH] empty versions shouldn't traceback (#843346)
by Jesse Keating
This is related to commit 43715e5db831893edcfc2b289a1e575b0ba19403
---
pyanaconda/installclasses/rhel.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pyanaconda/installclasses/rhel.py b/pyanaconda/installclasses/rhel.py
index 036d84b..c0d8b06 100644
--- a/pyanaconda/installclasses/rhel.py
+++ b/pyanaconda/installclasses/rhel.py
@@ -104,6 +104,9 @@ class InstallClass(BaseInstallClass):
return False
def versionMatches(self, oldver):
+ if oldver is None:
+ return False
+
oldMajor = oldver.split(".")[0]
newMajor = productVersion.split(".")[0]
--
1.7.11.2
11 years, 9 months
[newui] keep yum cache when installing to target
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
Keep the yum cache instead of deleting it and re-downloading it.
This saves time and bandwidth, and also helps reduce memory since / is
on a ram backed device-mapper device.
---
pyanaconda/packaging/yumpayload.py | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 8aea2fb..5d85b3a 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -153,7 +153,7 @@ class YumPayload(PackagePayload):
# have group info ready.
self.gatherRepoMetadata()
- def _resetYum(self, root=None):
+ def _resetYum(self, root=None, keep_cache=False):
""" Delete and recreate the payload's YumBase instance. """
import shutil
if root is None:
@@ -161,10 +161,11 @@ class YumPayload(PackagePayload):
with _yum_lock:
if self._yum:
- for repo in self._yum.repos.listEnabled():
- if repo.name == BASE_REPO_NAME and \
- os.path.isdir(repo.cachedir):
- shutil.rmtree(repo.cachedir)
+ if not keep_cache:
+ for repo in self._yum.repos.listEnabled():
+ if repo.name == BASE_REPO_NAME and \
+ os.path.isdir(repo.cachedir):
+ shutil.rmtree(repo.cachedir)
del self._yum
@@ -287,7 +288,7 @@ reposdir=%s
releasever = self._yum.conf.yumvar['releasever']
self._writeYumConfig()
- self._resetYum(root=ROOT_PATH)
+ self._resetYum(root=ROOT_PATH, keep_cache=True)
log.debug("setting releasever to previous value of %s" % releasever)
self._yum.preconf.releasever = releasever
--
1.7.7.6
11 years, 9 months
[rhel6-branch] [PATCH] Add VMware PV drivers (#837835)
by Vratislav Podzimek
---
scripts/mk-images | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/mk-images b/scripts/mk-images
index e925cdc..5fb5a29 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -112,7 +112,8 @@ RAIDMODS="raid0 raid1 raid5 raid6 raid456 raid10 linear"
CRYPTOMODS="sha256_generic cbc xts lrw aes_generic crypto_blkcipher crc32c ecb arc4"
PCMCIASOCKMODS="yenta_socket i82365 tcic pcmcia"
INFINIBANDMODS="ib_qib mlx4_ib"
-INITRDMODS="$USBMODS $FIREWIREMODS $IDEMODS $SCSIMODS $FSMODS $LVMMODS $RAIDMODS $CRYPTOMODS $COMMONMODS $PCMCIASOCKMODS $INFINIBANDMODS $SDMODS =scsi =net =drm"
+VMPVMODS="vmxnet3 vmware_balloon vmw_pvsci"
+INITRDMODS="$USBMODS $FIREWIREMODS $IDEMODS $SCSIMODS $FSMODS $LVMMODS $RAIDMODS $CRYPTOMODS $COMMONMODS $PCMCIASOCKMODS $INFINIBANDMODS $SDMODS $VMPVMODS =scsi =net =drm"
. $(dirname $0)/buildinstall.functions
--
1.7.10.4
11 years, 9 months
the lasted offer与您共享了照片
by the lasted offer
Dear sir
We supply 1kw-10kw solar PV system (including solar panels , frame,
cable ,inverter and controller , power distribution cabinet) with
1.6$/w FOB shenzhen.
Email me or just call me directly if needed. Thank you!
Best wishes
lala
Ecosol PV Tech Co., Ltd
Tel: 86-769-8279 2468
Fax: 86-769-879 2478
email:info@ecsolsolar.com
skype:solarlala
msn:solarlala@hotmail.com
www.ecsolsolar.com
11 years, 9 months
[newui] repo.mirrorlist may be None
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
---
pyanaconda/packaging/__init__.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index ca23f53..02a1a5d 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -169,7 +169,9 @@ class Payload(object):
def _repoNeedsNetwork(self, repo):
""" Returns True if the ksdata repo requires networking. """
- urls = [repo.baseurl] + repo.mirrorlist
+ urls = [repo.baseurl]
+ if repo.mirrorlist:
+ urls.extend(repo.mirrorlist)
network_protocols = ["http:", "ftp:", "nfs:", "nfsiso:"]
for url in urls:
if any([url.startswith(p) for p in network_protocols]):
--
1.7.7.6
11 years, 9 months
the lasted offer与您共享了照片
by the lasted offer
Dear sir
We supply solar PV system (including solar panels , frame,
cable ,inverter and controller , power distribution cabinet) with
1.6$/w FOB shenzhen.
Email me or just call me directly if needed. Thank you!
Best wishes
lala
Ecosol PV Tech Co., Ltd
Tel: 86-769-8279 2468
Fax: 86-769-879 2478
email:info@ecsolsolar.com
skype:solarlala
msn:solarlala@hotmail.com
www.ecsolsolar.com
11 years, 9 months
[rhel6-branch] [PATCH] Use udev_resolve_devspec to recognize the partition used in --onpart
by Vratislav Podzimek
We allow partition specification using /dev/disk/by-id/... paths,
but we need to translate this to a device name (e.g. /dev/sda1),
because that's what storage.devicetree works with.
Resolves: rhbz#809640
---
kickstart.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kickstart.py b/kickstart.py
index f867a24..167440a 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -1106,7 +1106,7 @@ class VolGroupData(commands.volgroup.F16_VolGroupData):
for pv in self.physvols:
# if pv is using --onpart, use original device
pv = anaconda.id.ksdata.onPart.get(pv, pv)
- dev = devicetree.getDeviceByName(pv)
+ dev = devicetree.getDeviceByName(udev_resolve_devspec(pv))
if dev and dev.format.type == "luks":
try:
dev = devicetree.getChildren(dev)[0]
--
1.7.10.4
11 years, 9 months
[PATCH] Run anaconda inside tmux
by Will Woods
Having a shell on tty2 or hvc1 is convenient.. if you have tty2 or hvc1.
But not everyone does - think s390, or POWER, or remote virt guests.
Instead, let's run anaconda inside a tmux session, with windows
pre-configured with a shell, anaconda.log, program.log, and storage.log.
We set this up by using two services: anaconda.service, and
anaconda-tmux@.service.
anaconda.service starts anaconda (and starts watching the logs) inside a
detached tmux session, on screen 1. It also starts a shell on screen 2,
and 'tail -F' on anaconda.log, storage.log, and program.log on screens
3, 4, and 5.
anaconda-tmux@.service will be instantiated on the default console
(tty1, hvc0, ttyS0, whatever) and connect to the running tmux session,
which will show screen 1 - and thus the text UI (if any) appears.
Exiting tmux just restarts anaconda-tmux@.service, which reconnects to
the existing session, so you can't accidentally kill the installer by
leaving tmux.
---
anaconda | 5 -----
data/Makefile.am | 3 +++
data/systemd/Makefile.am | 3 ++-
data/systemd/anaconda-cleanup-initramfs.service | 2 +-
data/systemd/anaconda-generator | 2 +-
data/systemd/anaconda-tmux@.service | 15 +++++++++++++++
data/systemd/anaconda.service | 9 +++++++++
data/systemd/anaconda.target | 1 -
data/systemd/anaconda@.service | 13 -------------
data/tmux.conf | 16 ++++++++++++++++
10 files changed, 47 insertions(+), 22 deletions(-)
create mode 100644 data/systemd/anaconda-tmux@.service
create mode 100644 data/systemd/anaconda.service
delete mode 100644 data/systemd/anaconda@.service
create mode 100644 data/tmux.conf
diff --git a/anaconda b/anaconda
index 15d13e6..59bcd9e 100755
--- a/anaconda
+++ b/anaconda
@@ -717,11 +717,6 @@ if __name__ == "__main__":
" (pre-release)" if not product.isFinal else "",
)
- # to set UTF8 mode on the terminal, we need LANG to be set usefully
- if os.environ.get("LANG", "C") == "C":
- os.environ['LANG'] = DEFAULT_LANG
- print "\033%G" # UTF8 power go!
-
import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)
diff --git a/data/Makefile.am b/data/Makefile.am
index cc82ae5..5708281 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -29,6 +29,9 @@ langdir = $(datadir)/$(PACKAGE_NAME)
lang_DATA = lang-names
dist_lang_DATA = lang-table
+tmuxdir = $(datadir)/$(PACKAGE_NAME)
+dist_tmux_DATA = tmux.conf
+
if IS_S390
shareddir = $(datadir)/$(PACKAGE_NAME)
dist_shared_SCRIPTS = linuxrc.s390
diff --git a/data/systemd/Makefile.am b/data/systemd/Makefile.am
index 8579ece..96bd8f0 100644
--- a/data/systemd/Makefile.am
+++ b/data/systemd/Makefile.am
@@ -20,8 +20,9 @@
systemddir = /lib/systemd/system
generatordir = /lib/systemd/system-generators
-dist_systemd_DATA = anaconda@.service \
+dist_systemd_DATA = anaconda.service \
anaconda.target \
+ anaconda-tmux@.service \
anaconda-shell@.service \
instperf.service \
anaconda-sshd.service \
diff --git a/data/systemd/anaconda-cleanup-initramfs.service b/data/systemd/anaconda-cleanup-initramfs.service
index 1d10bfc..cc49357 100644
--- a/data/systemd/anaconda-cleanup-initramfs.service
+++ b/data/systemd/anaconda-cleanup-initramfs.service
@@ -1,6 +1,6 @@
[Unit]
Description=Clean Up Initramfs
-Before=anaconda@.service
+Before=anaconda.service
ConditionPathIsDirectory=/run/initramfs/usr/lib/modules
[Service]
diff --git a/data/systemd/anaconda-generator b/data/systemd/anaconda-generator
index cb47040..71e35e7 100755
--- a/data/systemd/anaconda-generator
+++ b/data/systemd/anaconda-generator
@@ -25,7 +25,7 @@ done
consoletty="$tty"
# put anaconda on the real console
-service_on_tty anaconda@.service $consoletty
+service_on_tty anaconda-tmux@.service $consoletty
# put a shell on tty2 and the first virtualization console we find
for tty in tty2 hvc0 hvc1 xvc0 hvsi0 hvsi1 hvsi2; do
diff --git a/data/systemd/anaconda-tmux@.service b/data/systemd/anaconda-tmux@.service
new file mode 100644
index 0000000..0b83765
--- /dev/null
+++ b/data/systemd/anaconda-tmux@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Anaconda Text Console
+Requires=anaconda.service
+After=anaconda.target anaconda.service
+
+[Service]
+Type=simple
+WorkingDirectory=/root
+Environment=LANG=en_US.UTF-8
+ExecStartPre=/usr/bin/echo -e \033%G
+ExecStart=/usr/bin/tmux -u attach -t anaconda
+StandardInput=tty-force
+TTYPath=/dev/%I
+TTYReset=yes
+Restart=always
diff --git a/data/systemd/anaconda.service b/data/systemd/anaconda.service
new file mode 100644
index 0000000..5629e00
--- /dev/null
+++ b/data/systemd/anaconda.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Anaconda
+After=anaconda.target
+
+[Service]
+Type=forking
+Environment=HOME=/root MALLOC_CHECK_=2 MALLOC_PERTURB_=204 PATH=/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin LANG=en_US.UTF-8
+WorkingDirectory=/root
+ExecStart=/usr/bin/tmux -u -f /etc/anaconda-tmux.conf start
diff --git a/data/systemd/anaconda.target b/data/systemd/anaconda.target
index 9a95c66..597adfd 100644
--- a/data/systemd/anaconda.target
+++ b/data/systemd/anaconda.target
@@ -3,7 +3,6 @@ Description=Anaconda System Services
Requires=basic.target
After=basic.target
AllowIsolate=yes
-Before=anaconda@.service
Wants=anaconda-cleanup-initramfs.service
Wants=instperf.service
Wants=rsyslog.service
diff --git a/data/systemd/anaconda@.service b/data/systemd/anaconda@.service
deleted file mode 100644
index 03ecabb..0000000
--- a/data/systemd/anaconda@.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=Anaconda
-After=anaconda.target
-
-[Service]
-Environment=HOME=/root MALLOC_CHECK_=2 MALLOC_PERTURB_=204 PATH=/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin
-Type=oneshot
-WorkingDirectory=/root
-ExecStart=/usr/sbin/anaconda
-StandardInput=tty-force
-TTYPath=/dev/%I
-TTYReset=yes
-TimeoutSec=0
diff --git a/data/tmux.conf b/data/tmux.conf
new file mode 100644
index 0000000..3639fcb
--- /dev/null
+++ b/data/tmux.conf
@@ -0,0 +1,16 @@
+# tmux.conf for the anaconda environment
+set-option -s exit-unattached off
+set-option -g base-index 1
+
+new-session -s anaconda -n main "anaconda"
+
+set-option set-remain-on-exit on
+set-option status-right ""
+set-option status-right-length 0
+
+new-window -d -n shell "bash --login"
+new-window -d -n log "tail -F /tmp/anaconda.log"
+new-window -d -n storage-log "tail -F /tmp/storage.log"
+new-window -d -n program-log "tail -F /tmp/program.log"
+
+detach-client -s anaconda
--
1.7.10.4
11 years, 9 months
[rhel6-branch] [PATCH] Enable all addon repos when doing upgrade
by Vratislav Podzimek
We need to enable all addon repos so that packages from them get updated.
Fortunately, yum ignores mandatory and default packages of the repos when
doing update and no additional packages are installed because of the added
repos.
Resolves: rhbz#746925
---
yuminstall.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/yuminstall.py b/yuminstall.py
index 61a0b65..20802b1 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -1296,6 +1296,12 @@ debuglevel=6
self.ayum = AnacondaYum(anaconda)
self.ayum.setup()
+ if anaconda.id.getUpgrade():
+ # If we are doing an upgrade, we need to enable all repos,
+ # so that packages from them get updated.
+ for repo in self.ayum.repos.repos.itervalues():
+ repo.enable()
+
self.ayum.doMacros()
# If any enabled repositories require networking, go ahead and bring
--
1.7.10.4
11 years, 9 months
[newui] Replace system-config-keyboard and remove our loadKeymap code
by Vratislav Podzimek
PATCH 1/2 replaces the anaconda.keyboard object, which was a Keyboard object
from system-config-keyboard. The only method that was used was the activate()
method, that basically called loadkeys and setxkbmap. We now use libxklavier
to handle X layouts and we can call loadkeys ourselves. Once systemd-localed
has the capability to load X layouts in the virtual console, we could easily
replace calling loadkeys with calling systemd-localed methods via DBus.
The only problem is, that system-config-keyboard uses a table mapping console
keymaps to X layouts. But this table is not at all complete (only few keymaps
compared to the available keymaps in /lib/xkb/keymaps/i386 directory contents)
and once systemd-localed gets patched to load X layouts for console, this
mapping will not be necessary. For now, I've added the code, that tries to load
the keymap as given by user (e.g. 'cz_cp1250' or it could be an X layout) and if
it fails, it tries to load the basic variant (e.g. 'cz' for 'cz (qwerty)'). This
way, given a valid keymap, we load it, given an invalid keymap (X layout), we
load the basic variant and setup proper layout for the X session.
Could we drop console keymaps at all once systemd-localed gets patched to load X
layouts supporting only X layouts and not the legacy keymaps?
Ideas? Suggestions?
I believe PATCH 2/2 is okay, we don't use our loadKeymap code anywhere and
I see no reason to use it instead of the loadkeys command.
Vratislav Podzimek (2):
Replace system-config-keyboard with our methods using ksdata.keyboard
Remove our loadKeymap code from isys
anaconda | 6 +-
anaconda.spec.in | 2 -
pyanaconda/__init__.py | 2 -
pyanaconda/isys/__init__.py | 6 --
pyanaconda/isys/isys.c | 1 -
pyanaconda/isys/lang.c | 108 --------------------------------
pyanaconda/isys/lang.h | 18 ------
pyanaconda/keyboard.py | 67 +++++++++++++++++---
pyanaconda/language.py | 12 ----
tests/pyanaconda_test/language_test.py | 20 ------
10 files changed, 63 insertions(+), 179 deletions(-)
--
1.7.10.4
11 years, 9 months