[PATCH] Fix filesystem SELinux labeling, remove unused code
by Jeremy Katz
* Use restorecon instead of fixfiles as fixfiles can't find out the filesystem
type from the chroot.
* Remove some dead code
* Don't leave the post scripts lingering on the ISO filesystem
---
creator/livecd-creator | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/creator/livecd-creator b/creator/livecd-creator
index f34abb1..be4389d 100755
--- a/creator/livecd-creator
+++ b/creator/livecd-creator
@@ -263,10 +263,6 @@ class LiveCDYum(yum.YumBase):
cb.filelog = False
return self.runTransaction(cb)
-def touch(fn):
- f = open(fn, "w+")
- f.close()
-
def get_kernel_version(root):
# FIXME: this doesn't handle multiple kernels being installed
kdir = os.listdir("%s/install_root/lib/modules" %(root,))
@@ -575,6 +571,7 @@ class InstallationTarget:
subprocess.call([s.interp, "/tmp/%s" %(os.path.basename(path),)],
preexec_fn = self.run_in_root)
+ os.unlink(path)
def createInitramfs(self):
@@ -601,8 +598,8 @@ class InstallationTarget:
def relabelSystem(self):
# finally relabel all files
instroot = "%s/install_root" %(self.build_dir,)
- if os.path.exists("%s/sbin/fixfiles" %(instroot,)):
- subprocess.call(["/sbin/fixfiles", "restore", "/"],
+ if os.path.exists("%s/sbin/restorecon" %(instroot,)):
+ subprocess.call(["/sbin/restorecon", "-v", "-r", "/"],
preexec_fn=self.run_in_root)
return True
--
1.5.0.2
17 years, 1 month
liveinst/anaconda erases /etc/sysconfig/desktop during/after installation
by Sebastian Vahl
Hi.
I've integrated /etc/sysconfig/desktop with the content "DESKTOP=KDE" on the
livecd. But after an installation to harddisk /etc/sysconfig/desktop is
empty.
Is there a way not to erase this file? Or could this be a bug that is worth to
filling it into bugzilla?
Sebastian
17 years, 1 month
not all repositories are disabled
by Sebastian Vahl
Hi.
Just noticed the following:
> Traceback (most recent call last):
> File "/usr/bin/livecd-creator", line 872, in <module>
> main()
> File "/usr/bin/livecd-creator", line 837, in main
> if not target.setup(uncompressed_size, fs_label, base_on):
> File "/usr/bin/livecd-creator", line 412, in setup
> self.ayum.setup("%s/install_root" %(self.build_dir,))
> File "/usr/bin/livecd-creator", line 184, in setup
> map(lambda x: self.repos.delete(x), self.repos.repos.keys())
> File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 486, in
> <lambda> repos = property(fget=lambda self: self._getRepos(),
> File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 337, in
> _getRepos repo.setup(self.conf.cache, self.mediagrabber)
> File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 585, in
> setup self.baseurlSetup()
> File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 427, in
> baseurlSetup self.check()
> File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 312, in
> check 'Cannot find a valid baseurl for repo: %s' % self.id
> yum.Errors.RepoError: Cannot find a valid baseurl for repo:
> kde-redhat-unstable
/etc/yum.repos.d/kde-redhat.repo only exists on my normal installation. If I
disable it manually livecd-creator works normal. Of course this repo is not
mentioned in the kickstart file:
>repo --name=a-dev --baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/i386/os
>repo --name=a-extras-dev --baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/i386
My command:
>livecd-creator \
> --config=./livecd-fedora-kde.ks \
> --repo=a-dev,file:///daten/LIVECD/RAWHIDE/core/ \
> --repo=a-extras-dev,file:///daten/LIVECD/RAWHIDE/extras \
> --repo=lcd7,http://www.deadbabylon.de/fedora/livecd/i386/ \
repo file is attached if this helps. Version of livecd-creator is todays git.
Sebastian
17 years, 1 month
[PATCH] delete repos from the default config, don't just disable them
by Jeremy Katz
This avoids problems with reusing repoids.
---
creator/livecd-creator | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/creator/livecd-creator b/creator/livecd-creator
index 77a61be..f34abb1 100755
--- a/creator/livecd-creator
+++ b/creator/livecd-creator
@@ -180,8 +180,8 @@ class LiveCDYum(yum.YumBase):
self.conf.cachedir = "/var/cache/yum"
- # disable the default repos and just enable ours
- map(lambda x: x.disable(), self.repos.listEnabled())
+ # don't look at the default repos from the host config
+ map(lambda x: self.repos.delete(x), self.repos.repos.keys())
def reset(self):
self.closeRpmDB()
--
1.5.0.2
17 years, 1 month
[PATCH] vol_id is dynamically linked now; pull in its deps
by Jeremy Katz
---
creator/mayflower | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/creator/mayflower b/creator/mayflower
index 6b11e70..b5062bf 100755
--- a/creator/mayflower
+++ b/creator/mayflower
@@ -172,7 +172,7 @@ cp /sbin/lsmod sbin
# Copy all required shared libs
-for i in bin/* sbin/*; do
+for i in bin/* sbin/* lib/udev/*; do
ldd $i | sed 's|.*=>||g' | awk '/\// { print $1 }' | while read lib ; do
if [ "$opt_verbose" == "1" ] ; then
echo "Copying DSO $l"
--
1.5.0.2
17 years, 1 month
[PATCH] error handling fixes
by Jeremy Katz
Close the rpmdb in case of errors installing packages so that we don't
get an error on unmounts. Also, don't print multiple errors if we've
exited on a package installation failure
---
creator/livecd-creator | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/creator/livecd-creator b/creator/livecd-creator
index 50a8036..77a61be 100755
--- a/creator/livecd-creator
+++ b/creator/livecd-creator
@@ -470,7 +470,8 @@ class InstallationTarget:
self.ayum.runInstall()
except Exception, e:
print "Error installing packages"
- traceback.print_exc(file=sys.stderr)
+ traceback.print_exc(file=sys.stderr)
+ self.ayum.closeRpmDB()
return False
self.ayum.closeRpmDB()
return True
@@ -849,6 +850,8 @@ def main():
if ksparser.handler.selinux.selinux:
target.relabelSystem()
target.configureBootloader()
+ except SystemExit:
+ sys.exit(1)
except:
print "\n\nERROR during installation..."
traceback.print_exc(file=sys.stderr)
--
1.5.0.2
17 years, 1 month
no /dev/root with newer kernels again
by Sebastian Vahl
Hi.
With the kernels 2981 and 2982 I get the "no /dev/root" problem again.
The latest kernel that works for me was 2962. The only change I made
was updating my local mirror from development and extras-development.
Is the problem located in the newer kernels or in livecd-creator
(used version is from F7test2)?
Sebastian
17 years, 1 month