modified ovirt-node-image for inclusion in Fedora Removes ovirt-node-image-pxe sub package adds get-ovirt-node-image script adds generate-ovirt-node-pxe-tree script (replaces subpackage) moved all the scripts/tools into tools subdir adds new rpm, ovirt-node-recipe includes tools, manifests, and ks file/recipe Process for building upstream ovirt node packages.... 1. Build ovir-node.rpm in koji (everything in fedora) 2. Build ovirt-node-image (manual step done by ovirt project) 1. checkout git repo run make recipe 2. output = ks file, manifest.tar, ovirt-node.iso (unofficial) 3. output checking in to fedora cvs as source for (3) 3. Build ovirt-node-recipe in koji (requires extra source from step 2, mainfest.tar [includes recipe]) 1. does not include iso image, spin hosted on spin.fedoraproject.orgor on ovirt.org 2. recipe/ks and manifest.tar built at image creation time (2) 3. includes tools/docs for downloaing ovirt-node-image 4. Fedora project builds official spin form ks in ovirt-node-recipe 4.1 (congentincy plan iso image hosted on ovirt.org
---
ovirt-node-image.spec.in | 8 ++++----
.../create-ovirt-iso-nodes | 0
edit-livecd => tools/edit-livecd | 0
livecd-rpms => tools/livecd-rpms | 0
livecd-setauth => tools/livecd-setauth | 0
5 files changed, 4 insertions(+), 4 deletions(-)
rename create-ovirt-iso-nodes => tools/create-ovirt-iso-nodes (100%)
rename edit-livecd => tools/edit-livecd (100%)
rename livecd-rpms => tools/livecd-rpms (100%)
rename livecd-setauth => tools/livecd-setauth (100%)
diff --git a/ovirt-node-image.spec.in b/ovirt-node-image.spec.in
index e64f4de..1c89246 100644
--- a/ovirt-node-image.spec.in
+++ b/ovirt-node-image.spec.in
@@ -63,10 +63,10 @@ mkdir %{buildroot}
%{__install} -d -m0755 %{buildroot}%{app_root}
%{__install} -p -m0644 %{image_iso} %{buildroot}%{app_root}
%{__install} -d -m0755 %{buildroot}%{_sbindir}
-%{__install} -p -m0755 create-ovirt-iso-nodes %{buildroot}%{_sbindir}
-%{__install} -p -m0755 edit-livecd %{buildroot}%{_sbindir}
-%{__install} -p -m0755 livecd-setauth %{buildroot}%{_sbindir}
-%{__install} -p -m0755 livecd-rpms %{buildroot}%{_sbindir}
+%{__install} -p -m0755 tools/create-ovirt-iso-nodes %{buildroot}%{_sbindir}
+%{__install} -p -m0755 tools/edit-livecd %{buildroot}%{_sbindir}
+%{__install} -p -m0755 tools/livecd-setauth %{buildroot}%{_sbindir}
+%{__install} -p -m0755 tools/livecd-rpms %{buildroot}%{_sbindir}
%{__tar} -xf %{image_manifests} -C %{buildroot}%{app_root}
%clean
diff --git a/create-ovirt-iso-nodes b/tools/create-ovirt-iso-nodes
similarity index 100%
rename from create-ovirt-iso-nodes
rename to tools/create-ovirt-iso-nodes
diff --git a/edit-livecd b/tools/edit-livecd
similarity index 100%
rename from edit-livecd
rename to tools/edit-livecd
diff --git a/livecd-rpms b/tools/livecd-rpms
similarity index 100%
rename from livecd-rpms
rename to tools/livecd-rpms
diff --git a/livecd-setauth b/tools/livecd-setauth
similarity index 100%
rename from livecd-setauth
rename to tools/livecd-setauth
--
1.6.0.6
David Huff
2009-Jul-29 00:14 UTC
[Ovirt-devel] [PATCH] added tools/get-ovirt-node-image tools/generate-ovirt-node-pxe-tree
---
Makefile.am | 12 ++++++---
tools/generate-ovirt-node-pxe-tree | 44 ++++++++++++++++++++++++++++++++++++
tools/get-ovirt-node-image | 28 ++++++++++++++++++++++
3 files changed, 80 insertions(+), 4 deletions(-)
create mode 100755 tools/generate-ovirt-node-pxe-tree
create mode 100755 tools/get-ovirt-node-image
diff --git a/Makefile.am b/Makefile.am
index a44ae49..2be9146 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -38,15 +38,19 @@ EXTRA_DIST = \
.gitignore \
$(PACKAGE).spec \
$(PACKAGE).spec.in \
+ ovirt-node-recipe.spec \
+ ovirt-node-recipe.spec.in \
common-blacklist.ks \
common-install.ks \
common-pkgs.ks \
common-post.ks \
$(PACKAGE).ks \
- create-ovirt-iso-nodes \
- edit-livecd \
- livecd-setauth \
- livecd-rpms \
+ tools/create-ovirt-iso-nodes \
+ tools/edit-livecd \
+ tools/livecd-setauth \
+ tools/livecd-rpms \
+ tools/generate-ovirt-node-pxe-tree \
+ tools/get-ovirt-node-image \
README
DISTCLEANFILES = $(PACKAGE)-$(VERSION).tar.gz \
diff --git a/tools/generate-ovirt-node-pxe-tree
b/tools/generate-ovirt-node-pxe-tree
new file mode 100755
index 0000000..f4d69ab
--- /dev/null
+++ b/tools/generate-ovirt-node-pxe-tree
@@ -0,0 +1,44 @@
+#!/bin/bash
+#
+# Script to generate a pxe tree form a node image
+# Copyright 2009 Red Hat, Inc.
+# Written by David Huff <dhuff at redhat.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+IMAGE_NAME="ovirt-node-image.iso"
+OVIRT_NODE_DIR="/usr/share/ovirt-node-image/"
+
+if [ $(id -u) != 0 ]; then
+ echo "You need to be root to run this script."
+ exit 1
+fi
+
+if [ ! -f ${OVIRT_NODE_DIR}${IMAGE_NAME} ]; then
+ echo "Warning: ${IMAGE_NAME} not found."
+ echo "you can download it from spins.fedoraproject.org"
+ echo "by running: get-ovirt-node-image"
+ exit 1
+fi
+
+cat <<EOF
+
+Writing pxe tree to ${OVIRT_NODE_DIR}tftpboot....
+
+EOF
+
+cd $OVIRT_NODE_DIR
+rm -rf tftpboot
+livecd-iso-to-pxeboot $IMAGE_NAME
+cobbler sync > /dev/null 2>&1 || :
\ No newline at end of file
diff --git a/tools/get-ovirt-node-image b/tools/get-ovirt-node-image
new file mode 100755
index 0000000..1a3ee94
--- /dev/null
+++ b/tools/get-ovirt-node-image
@@ -0,0 +1,28 @@
+#!/bin/bash
+#
+# Script to get ovirt-node-image form spins.fedoraproject.org
+# Copyright 2009 Red Hat, Inc.
+# Written by David Huff <dhuff at redhat.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+OVIRT_NODE_DIR="/usr/share/ovirt-node-image/"
+OVIRT_NODE_URL="http://spins.fedoraproject.org/torrents/Fedora-10-x86_64-AOS.torrent"
+
+if [ $(id -u) != 0 ]; then
+ echo "You need to be root to run this script."
+ exit 1
+fi
+
+bittorrent-console --no_spew --max_uploads 0 --save_in $OVIRT_NODE_DIR
$OVIRT_NODE_URL
\ No newline at end of file
--
1.6.0.6
Modified configure
---
configure.ac | 2 +-
ovirt-node-recipe.spec.in | 82 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 83 insertions(+), 1 deletions(-)
create mode 100644 ovirt-node-recipe.spec.in
diff --git a/configure.ac b/configure.ac
index af2cccd..d7e8fac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,5 +7,5 @@ AC_CONFIG_HEADERS([config.h])
test x"$ac_ct_CC:$CFLAGS" = 'xgcc:-g -O2' \
&& CFLAGS="$CFLAGS -Wshadow -Wall -Werror"
-AC_CONFIG_FILES([Makefile ovirt-node-image.spec])
+AC_CONFIG_FILES([Makefile ovirt-node-image.spec ovirt-node-recipe.spec])
AC_OUTPUT
diff --git a/ovirt-node-recipe.spec.in b/ovirt-node-recipe.spec.in
new file mode 100644
index 0000000..113939b
--- /dev/null
+++ b/ovirt-node-recipe.spec.in
@@ -0,0 +1,82 @@
+Summary: oVirt Node image recipe
+Name: ovirt-node-recipe
+Version: @VERSION@
+Release: 0%{?dist}%{?extra_release}
+Source0: %{name}-%{version}.tar.gz
+%define image ovirt-node-image
+%define image_manifests %{image}-manifests.tar
+License: GPLv2+
+Group: Applications/System
+buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+URL: http://ovirt.org/
+
+Requires: livecd-tools >= 020-2
+Requires: bittorrent
+
+BuildArch: noarch
+%define app_root %{_datadir}/%{name}
+
+# disable debuginfo, makes no sense for boot image and it is created empty
anyway
+%define debug_package %{nil}
+
+%description
+The oVirt-node-recipe provides ks file, manifest files, client tools, and
+documentation for building and running an oVirt Node image. This package
+is not to be installed on the oVirt-Node, however on a development machine
+to help in deployment on the node.
+
+%prep
+%setup -c -q
+
+%build
+
+%install
+%{__rm} -rf %{buildroot}
+mkdir %{buildroot}
+
+%{__install} -d -m0755 %{buildroot}%{app_root}
+%{__install} -p -m0644 %{name}.ks %{buildroot}%{app_root}
+%{__install} -d -m0755 %{buildroot}%{_sbindir}
+%{__install} -p -m0755 tools/create-ovirt-iso-nodes %{buildroot}%{_sbindir}
+%{__install} -p -m0755 tools/edit-livecd %{buildroot}%{_sbindir}
+%{__install} -p -m0755 tools/livecd-setauth %{buildroot}%{_sbindir}
+%{__install} -p -m0755 tools/livecd-rpms %{buildroot}%{_sbindir}
+%{__install} -p -m0755 tools/get-ovirt-node-image %{buildroot}%{_sbindir}
+%{__install} -p -m0755 tools/generate-ovirt-node-pxe-tree
%{buildroot}%{_sbindir}
+%{__tar} -xf %{image_manifests} -C %{buildroot}%{app_root}
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%files
+%defattr(0644,root,root,0755)
+%{app_root}/%{name}.ks
+%doc %{app_root}/manifests/rpm-manifest.txt
+%doc %{app_root}/manifests/srpm-manifest.txt
+%doc %{app_root}/manifests/file-manifest.txt
+%doc %{app_root}/manifests/dir-manifest.txt
+%doc %{app_root}/manifests/rpm-manifest-post.txt
+%doc %{app_root}/manifests/srpm-manifest-post.txt
+%doc %{app_root}/manifests/file-manifest-post.txt
+%doc %{app_root}/manifests/dir-manifest-post.txt
+%doc %{app_root}/manifests/ovirt-release
+
+%defattr(0755,root,root,0755)
+%{_sbindir}/create-ovirt-iso-nodes
+%{_sbindir}/edit-livecd
+%{_sbindir}/livecd-setauth
+%{_sbindir}/livecd-rpms
+%{_sbindir}/get-ovirt-node-image
+%{_sbindir}/generate-ovirt-node-pxe-tree
+
+%changelog
+* Thu Jul 16 2009 David Huff <dhuff at redhat.com> 0.93-0
+- Package for F-12
+
+* Thu Jul 03 2008 Perry Myers <pmyers at redhat.com> 0.92-0
+- Only store ISO in SRPM, and generate PXE from that during build
+
+* Tue Jun 03 2008 Alan Pevec <apevec at redhat.com> 0.0.5-1
+- Initial build.
+
+
--
1.6.0.6
---
Makefile.am | 34 +++++++++++++++++++++++++++++++---
1 files changed, 31 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 2be9146..5cefa83 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,14 +32,16 @@ ARCH = $(shell rpm --eval '%{_arch}')
CUR_PREVIEW = 11
PREVIEW_URL ?=
http://markmc.fedorapeople.org/virt-preview/f$(CUR_PREVIEW)/$(ARCH)
+RECIPE = ovirt-node-recipe
NVR = $(PACKAGE)-$(VERSION)-$(ARCH)
+RECIPE_PACKAGE = $(RECIPE)-$(VERSION)
EXTRA_DIST = \
.gitignore \
$(PACKAGE).spec \
$(PACKAGE).spec.in \
- ovirt-node-recipe.spec \
- ovirt-node-recipe.spec.in \
+ $(RECIPE).spec \
+ $(RECIPE).spec.in \
common-blacklist.ks \
common-install.ks \
common-pkgs.ks \
@@ -186,14 +188,40 @@ source: src.ks
> $(PACKAGE)-source-$(VERSION).$(SRC_FMT).$(SUM)
rpms: dist node
+# fixme hack two specs
+ ( \
+ gunzip $(distdir).tar.gz; \
+ tar --delete $(PACKAGE)-$(VERSION)/$(RECIPE).spec -f $(distdir).tar; \
+ gzip $(distdir).tar; \
+ )
+# fixme hack two specs
rpmbuild $(RPM_FLAGS) -ts $(distdir).tar.gz
rpmbuild $(RPM_FLAGS) --define "source_iso 1" -tb $(distdir).tar.gz
+
+recipe: dist node
+
+ ksflatten $(PACKAGE).ks --output $(RECIPE).ks
+ tar -zcvf $(RECIPE_PACKAGE).tar.gz tools $(PACKAGE)-manifests.tar $(RECIPE).ks
$(RECIPE).spec
+ rpmbuild $(RPM_FLAGS) -ta $(RECIPE_PACKAGE).tar.gz
srpms: dist
- rpmbuild $(RPM_FLAGS) -ts $(distdir).tar.gz
+# fixme hack two specs
+ ( \
+ gunzip $(distdir).tar.gz; \
+ tar --delete $(PACKAGE)-$(VERSION)/$(RECIPE).spec -f $(distdir).tar; \
+ gzip $(distdir).tar; \
+ )
+# fixme hack two specs rpmbuild $(RPM_FLAGS) -ts $(distdir).tar.gz
$(MAKE) _publish
iso_srpms: dist
+# fixme hack two specs
+ ( \
+ gunzip $(distdir).tar.gz; \
+ tar --delete $(PACKAGE)-$(VERSION)/$(RECIPE).spec -f $(distdir).tar; \
+ gzip $(distdir).tar; \
+ )
+# fixme hack two specs
rpmbuild $(RPM_FLAGS) --define "source_iso 1" -ts $(distdir).tar.gz
$(MAKE) _publish
--
1.6.0.6
David Huff
2009-Jul-29 00:14 UTC
[Ovirt-devel] [PATCH] Edited ovirt-node-image.ks to write redhat-release and splash images
--- ovirt-node-image.ks | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/ovirt-node-image.ks b/ovirt-node-image.ks index 802b6a5..dcf2465 100644 --- a/ovirt-node-image.ks +++ b/ovirt-node-image.ks @@ -85,6 +85,22 @@ mv $LIVE_ROOT/isolinux/isolinux.cfg.standalone $LIVE_ROOT/isolinux/isolinux.cfg %end %post +# release files +ln -snf /etc/ovirt-release /etc/redhat-release +ln -snf /etc/ovirt-release /etc/system-release +cp /etc/ovirt-release /etc/issue +echo "Kernel \r on an \m (\l)" >> /etc/issue +cp /etc/issue /etc/issue.net + +# logos +# should be ifarch i386 +/boot/grub/splash.xpm.gz +# end i386 +mkdir -p /usr/lib/anaconda-runtime +cp /usr/share/ovirt-node/images/syslinux-vesa-splash.jpg /usr/lib/anaconda-runtime +%end + +%post # Create post-image processing manifests manifests=/tmp/manifests mkdir -p $manifests -- 1.6.0.6
Reasonably Related Threads
- Refactor ovirt-node-image code base for inclusion in Fedora
- More complete patch...
- [PATCH node-image] add livecd-iso-to-iscsi script to support iscsi root booting setup
- Refactor ovirt-node code base for inclusion in Fedora
- oVirt Appliance / Single Machine Install