I installed the latest master. syntax error on install...
by dwoody1
I am installing this on a Centos 5.1 system.
The out output from the install follows:
/usr/bin/install -c -D tools/livecd-creator /usr/bin/livecd-creator
/usr/bin/install -c -D tools/image-creator /usr/bin/image-creator
/usr/bin/install -c -D tools/livecd-iso-to-disk.sh /usr/bin/livecd-iso-to-disk
/usr/bin/install -c -D tools/mayflower /usr/lib/livecd-creator/mayflower
/usr/bin/install -c -m 644 -D AUTHORS /usr/share/doc/livecd-tools-013/AUTHORS
/usr/bin/install -c -m 644 -D COPYING /usr/share/doc/livecd-tools-013/COPYING
/usr/bin/install -c -m 644 -D README /usr/share/doc/livecd-tools-013/README
/usr/bin/install -c -m 644 -D HACKING /usr/share/doc/livecd-tools-013/HACKING
mkdir -p /usr/share/livecd-tools/
/usr/bin/install -c -m 644 -D config/*.ks /usr/share/livecd-tools/
mkdir -p //usr/lib/python2.4/site-packages/imgcreate
/usr/bin/install -c -m 644 -D
imgcreate/*.py //usr/lib/python2.4/site-packages/imgcreate/
python -c "import compileall as c;
c.compile_dir('//usr/lib/python2.4/site-packages/imgcreate', force=1)"
Listing //usr/lib/python2.4/site-packages/imgcreate ...
Compiling //usr/lib/python2.4/site-packages/imgcreate/__init__.py ...
Compiling //usr/lib/python2.4/site-packages/imgcreate/creator.py ...
File "//usr/lib/python2.4/site-packages/imgcreate/creator.py", line 565
finally:
^
SyntaxError: invalid syntax
Compiling //usr/lib/python2.4/site-packages/imgcreate/errors.py ...
Compiling //usr/lib/python2.4/site-packages/imgcreate/fs.py ...
Compiling //usr/lib/python2.4/site-packages/imgcreate/kickstart.py ...
Compiling //usr/lib/python2.4/site-packages/imgcreate/live.py ...
Compiling //usr/lib/python2.4/site-packages/imgcreate/yuminst.py ...
python -O -c "import compileall as c;
c.compile_dir('//usr/lib/python2.4/site-packages/imgcreate', force=1)"
Listing //usr/lib/python2.4/site-packages/imgcreate ...
Compiling //usr/lib/python2.4/site-packages/imgcreate/__init__.py ...
Compiling //usr/lib/python2.4/site-packages/imgcreate/creator.py ...
File "//usr/lib/python2.4/site-packages/imgcreate/creator.py", line 565
finally:
^
SyntaxError: invalid syntax
Compiling //usr/lib/python2.4/site-packages/imgcreate/errors.py ...
Compiling //usr/lib/python2.4/site-packages/imgcreate/fs.py ...
Compiling //usr/lib/python2.4/site-packages/imgcreate/kickstart.py ...
Compiling //usr/lib/python2.4/site-packages/imgcreate/live.py ...
Compiling //usr/lib/python2.4/site-packages/imgcreate/yuminst.py ...
Am I missing something?
David
16 years, 4 months
[PATCH] Use string methods instead of the string module
by Tan Swee Heng
According to "pydoc string", the string module isn't normally used nowadays.
PEP 290 (http://www.python.org/dev/peps/pep-0290/#string-methods) also
recommends using string methods over the string module because
i. the string module may be deprecated in future;
ii. string methods are faster.
This patch converts the imgcreate code to use string methods instead of the
string module.
Note: This patch does not fix any bugs per se. I just thought it would be
good to follow the PEP guidelines... unless there is a need to support
Python 1.6 or earlier.
Signed-off-by: Tan Swee Heng <thesweeheng(a)gmail.com>
16 years, 4 months
syntax error in livecd-creator
by dwoody1
When I run livecd-creator I get a syntax error on line 127 (at the finally:
keyword)
I have never used python before but in looking at the source code and the
makefile for installing livecd-tools it appears that at least part of the
problem may be that the imgcreate directory is not installed.
My thought is that python does not know where the imgcreate is located and can
not import it. It does not, however, display an error when it imports
imgcreate.
Where does the imgcreate directory need to be located or how can I tell python
where it is located.
Thanks for you help,
David
16 years, 4 months
persistence testing howto
by Douglas McClendon
WARNING: THE FOLLOWING IS A VERY ALPHA EXPERIMENTAL DEVELOPMENT FEATURE
If you have to ask what this is all about, it isn't ready for your
testing yet. Please wait a bit longer.
More variations of this on the way for testing purposes, but for the
moment, this might work-
(actually it seems to work better than I thought it would, see notes below)
# get the 5MB binary delta blob
wget \
http://filteredperception.org/downloads/overlay/20071216/Fedora-8-Live-i6...
# get the f8 livecd iso, or use existing and modify commands accordingly
wget \
ftp://mirrors.kernel.org/fedora/releases/8/Live/i686/Fedora-8-Live-i686.iso
# this generates the patched iso
xdelta patch \
Fedora-8-Live-i686.persistence.xdelta \
Fedora-8-Live-i686.iso \
Fedora-8-Live-i686.persistence.iso
# this extracts the modified livecd-iso-to-disk
isodump -R -i Fedora-8-Live-i686.persistence.iso \
-x /LiveOS/zyx-livecd-iso-to-disk \
> zyx-livecd-iso-to-disk
chmod +x ./zyx-livecd-iso-to-disk
# assuming /dev/sdb is a usb flash drive that you have previously tested
# with livecd-iso-to-disk and been able to boot, and has a single
# /dev/sdb1 partition with a uuid and no fslabel
./zyx-livecd-iso-to-disk \
--reset-mbr \
--overlay-size-mb 128 \
./Fedora-8-Live-i686.persistence.iso \
/dev/sdb1
# and give it a whirl...
note: the following sha1sum will merely tell you that the file you
receive is likely the same one that I created on my internet connected
development system. While I give my word that I have not knowingly
introduced any trojans or security holes, I urge you to assume that
other hackers who have infected my system have. Though on the plus
side, experimental livecds are some of the easiest pieces of untrusted
software to safely test. (i.e. you can test them on systems with no
hard drive that you would need to worry about possibly corrupting)
sha1sum Fedora-8-Live-i686.persistence.xdelta
924146b62546fa2342023a1f614da5eb155e318b
note that the bit about the uuid and no fslabel is due to the fact that
I didn't realize that livecd-iso-to-disk worked with fslabels instead of
uuids until tonight. I'll fix that limitation soon. I ran into a fresh
2G flash with a single vfat fs, and no uuid, and was able to create one
by just running 'mkfs.vfat /dev/sdb1'. Unfortunately for some bizarre
reason this 2G one won't boot my laptop, but a 1G model from the same
product line does...??? hence the bit about making sure you have tested
with stock f8 and stock livecd-iso-to-disk.
note, that despite everything I've said about it being fragile WRT
unclean shutdown... I've noticed a couple things while putting this
download together. A) since I last worked with it a couple months ago,
something is screwing up the clean shutdown, so don't be alarmed when
you see a message on shutdown that it failed to remount readonly the
overlayfs. and B) in rudimentary testing, I persisted across 3 reboots,
the 2nd of which was a unclean poweroff instead of a clean shutdown.
Not that a sample size of 1 proves anything, but before my sample size
of 1 was an unrecoverable corruption... go figure.
More to come... If you bother to test, please report success or failure.
Thanks,
-dmc/jdog
16 years, 4 months
RHEL Live CD + Persistance?
by Mike Dickson
Is there any chance of getting a current version of RHEL into the Live
CD + Persistence game?
MikeD
16 years, 4 months
Re: [Fedora-livecd-list] RHEL Live CD + Persistence?
by Mike Dickson
No. I was spammed w/ the end-of-the quarter work and am picking this
back up now.
So, the options to get where we need to go are:
* RHEL 5.x w/ JBoss Developer Studio (JBDS) (This would best, but
I don't think RHEL 5 can do LiveCD + Persistence. JBDS includes
license for RHEL 5.x)
* F8 w/ JBoss Tools (Free solution for the community at large, but
much more work for us.)
* F8 w/ JBDS (Easiest path, but the OS is not the same one they
are going to deploy on, but close enough?)
Which one of the combinations or all of them can we pull off? Can we
get RHEL 5.x to do Live CD/DVD + Persistence? What do you think?
Another question is, how do we update/patch JBDS if we have a read-only
Live CD image? Can we apply the updates to the "persistence" part of
the thumb drive or are are we going to have to spin another LIve CD
image?
Q: Why do we need to do this? A: Too many Java developers are using
Windoz to develop on and then deploying on Linux/Solaris/HPUX.... Given
that we have an Open Source OS, JVM, Application Server, DB, and
Development Environment, we can give them a really exciting "cool" way
to get their whole development environment on a thumb drive for very
little to no cost. That way their development environment is the
same/similar too their deployment environment and they can use it at
home or on the road and have EVERYTHING they need wherever they are.
Who else could do this? Nobody. It's a big deal if we can get it done.
I will have to look up your script you sent me and start to get smart on
this. Can I use a F8 Live CD/DVD to do this to a thumb drive, or am I
going to have to upgrade my laptop from FC6 to F8?
MikeD
On Fri, 2007-12-14 at 13:21 -0600, Douglas McClendon wrote:
> Mike Dickson wrote:
> > Is there any chance of getting a current version of RHEL into the Live
> > CD + Persistence game?
>
> Were you ever able to test those patches I sent you a couple months back
> (on fedora)? (and for the most part, posted to this list)
>
> For me, they do basically work in trivial testing scenarios.
>
> The main problem I have mustering any enjoyment developing them is the
> utter grossness of what it takes to patch the standard /etc/rc.d/init.d
> halt and functions file. (which is needed to defer unmounting of
> persistence device until after readonly remounting of rootfs).
>
> I do have an alternate distribution method of the feature, which makes
> it more of a proof of concept "live iso patch" to the official f8
> livecd, but it's still the same code and mechanism.
>
> The same fragility may still apply to my method that I mentioned months
> ago, i.e. that it may become unrecoverably corrupted if not shutdown
> cleanly. But I suspect that if I can make the distribution of it as
> easy as a 'patch' to apply to the f8 livecd, and get some testers, that
> that problem can be solved (pure speculation).
>
> My time estimates are usually overly ambitious, but I'll try to get that
> iso-patch posted in a couple hours.
>
> And as I responded long ago to the original criticism of the ugliness of
> the halt&functions patching- I totally agree, and am open to suggestions.
>
> Attached is the last patch I sent Mike, which is pretty close to what I
> last posted to this list. It's still useful if anyone is interested in
> trying to understand the method I'm using. The main thing to simplify
> reading it, is
>
> a) ignore the 'overlay=auto' code path. It's a nice feature, but
> complexity that should wait for the future when the base case is well
> understood, tested and stable. The base case being
>
> b) assume the only use of the patch is with the modified
> livecd-iso-to-disk. I.e. the new usage would be
>
> livecd-iso-to-disk --overlay-size-mb 128 /path/to/f8.iso /dev/sdb1
>
> which would initialize a 128M persistence file and cause the bootloader
> on the liveusb to use it. I.e. the syslinux append line goes from
>
> root=UUID=abcd-1234
>
> to
>
> root=UUID=abcd-1234 overlay=UUID=abcd-1234
>
> Then, try to ignore the horrendously ugly selinux magic act required to
> patch halt&functions, and just look at the contents of the halt.patch
> and functions.patch.
>
> -dmc
16 years, 4 months
Why does my LiveCD look ugly?
by Bryan Kearney
I am building a RHEL5 live DVD on an F8 box. I have noticed that my DVD
looks ugly when the boot while the F8 live cds look good with their
splash screen. Digging through the archives, I had an rpm drop a image
which I want to use at boot time, and the %post section copies this to
/usr/lib/anaconda-runtime/syslinux-vesa-splash.jpg. However, I still get
a TUI (curses) menu where I have to select what to boot. The timer does
not appear to run, so they have to select it. I have based my DVD on the
fedora-7 kickstart files.. only removing syslinux and kernel from the
package list.
Is there any voodoo to get the bootup looking better?
-- bk
16 years, 4 months
[PATCH] Modified Makefile and livecd-tools.spec to use tools/ and imgcreate.
by Tan Swee Heng
Hi, I am new to this list so pardon me if this is the wrong place for
patches or if I am not doing this the "right way". :-)
I have problems doing "make install" and "rpmbuild" using the current
git tree. Turns out that Makefile was using creator/ directory when
livecd-creator and image-creator are both now in tools/. Also both
Makefile and livecd-tools.spec seemed to have omitted the imgcreate
Python module. So below is my patch to address these issues. It works
for me. Hopefully it is of use to others too.
Regards,
Swee Heng
---
Changed Makefile to use tools/ directory instead of creator/.
Changed both Makefile and livecd-tools.spec to handle imgcreate.
Signed-off-by: Tan Swee Heng <thesweeheng(a)gmail.com>
---
Makefile | 14 ++++++++++++--
livecd-tools.spec | 8 ++++++++
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 3d86b29..393d6db 100644
--- a/Makefile
+++ b/Makefile
@@ -6,11 +6,18 @@ INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
+INSTALL_PYTHON = ${INSTALL} -m 644
+define COMPILE_PYTHON
+ python -c "import compileall as c; c.compile_dir('$(1)', force=1)"
+ python -O -c "import compileall as c; c.compile_dir('$(1)', force=1)"
+endef
+PYTHONDIR := $(shell python -c "import distutils.sysconfig as d;
print d.get_python_lib()")
+
all:
install:
- $(INSTALL_PROGRAM) -D creator/livecd-creator
$(DESTDIR)/usr/bin/livecd-creator
- $(INSTALL_PROGRAM) -D creator/image-creator
$(DESTDIR)/usr/bin/image-creator
+ $(INSTALL_PROGRAM) -D tools/livecd-creator
$(DESTDIR)/usr/bin/livecd-creator
+ $(INSTALL_PROGRAM) -D tools/image-creator
$(DESTDIR)/usr/bin/image-creator
$(INSTALL_PROGRAM) -D tools/livecd-iso-to-disk.sh
$(DESTDIR)/usr/bin/livecd-iso-to-disk
$(INSTALL_PROGRAM) -D tools/mayflower
$(DESTDIR)/usr/lib/livecd-creator/mayflower
$(INSTALL_DATA) -D AUTHORS
$(DESTDIR)/usr/share/doc/livecd-tools-$(VERSION)/AUTHORS
@@ -19,6 +26,9 @@ install:
$(INSTALL_DATA) -D HACKING
$(DESTDIR)/usr/share/doc/livecd-tools-$(VERSION)/HACKING
mkdir -p $(DESTDIR)/usr/share/livecd-tools/
$(INSTALL_DATA) -D config/*.ks $(DESTDIR)/usr/share/livecd-tools/
+ mkdir -p $(DESTDIR)/$(PYTHONDIR)/imgcreate
+ $(INSTALL_PYTHON) -D imgcreate/*.py $(DESTDIR)/$(PYTHONDIR)/imgcreate/
+ $(call COMPILE_PYTHON,$(DESTDIR)/$(PYTHONDIR)/imgcreate)
uninstall:
rm -f $(DESTDIR)/usr/bin/livecd-creator
diff --git a/livecd-tools.spec b/livecd-tools.spec
index 542283d..9b9d4f5 100644
--- a/livecd-tools.spec
+++ b/livecd-tools.spec
@@ -1,3 +1,5 @@
+%{!?python_sitelib: %define python_sitelib %(%{__python} -c "import
distutils.sysconfig as d; print d.get_python_lib()")}
+
%define debug_package %{nil}
Summary: Tools for building live CD's
@@ -24,6 +26,7 @@ Requires: syslinux
%ifarch ppc ppc64
Requires: yaboot
%endif
+BuildRequires: python
%description
@@ -53,6 +56,11 @@ rm -rf $RPM_BUILD_ROOT
/usr/lib/livecd-creator/mayflower
%dir %{_datadir}/livecd-tools
%{_datadir}/livecd-tools/*
+%{_bindir}/image-creator
+%dir %{python_sitelib}/imgcreate
+%{python_sitelib}/imgcreate/*.py
+%{python_sitelib}/imgcreate/*.pyo
+%{python_sitelib}/imgcreate/*.pyc
%changelog
* Mon Oct 29 2007 Jeremy Katz <katzj(a)redhat.com> - 013-1
--
1.5.3.3
16 years, 4 months