]> xenbits.xensource.com Git - people/sstabellini/raisin.git/commitdiff
Move components' data under data dir
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Sat, 28 Mar 2015 23:46:54 +0000 (16:46 -0700)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Sat, 28 Mar 2015 23:46:54 +0000 (16:46 -0700)
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
12 files changed:
README
components/grub
components/libvirt
components/xen
data/grub-bootstrap.cfg [new file with mode: 0644]
data/grub.cfg [new file with mode: 0644]
data/ifcfg-xenbr0 [new file with mode: 0644]
data/libvirt.debian.init [new file with mode: 0644]
grub-bootstrap.cfg [deleted file]
grub.cfg [deleted file]
ifcfg-xenbr0 [deleted file]
libvirt.debian.init [deleted file]

diff --git a/README b/README
index 10058a6858301d72b828ead25845230501a7126e..3658857a3e9cb740a5b48f91fa53b614fbe47e89 100644 (file)
--- a/README
+++ b/README
@@ -84,3 +84,6 @@ particular:
 install_dependencies
 start_initscripts
 stop_initscripts
+
+If your component comes with additional data, maybe a config script or
+anything else, place it under "data".
index 14ffca3813dd41282c5d6e1d24b0115e9135edbc..c131179716a66f300e3e44c7e5ab4d0c860a7818 100644 (file)
@@ -32,14 +32,14 @@ function grub_build() {
 
     cd "$BASEDIR"
     rm -f memdisk.tar
-    tar cf memdisk.tar grub.cfg
+    tar cf memdisk.tar -C data grub.cfg
     ./git-checkout.sh $GRUB_UPSTREAM_URL $GRUB_UPSTREAM_REVISION grub-dir
     cd grub-dir
     ./autogen.sh
     ## GRUB32
     ./configure --target=i386 --with-platform=xen
     $MAKE CPPFLAGS="-I$INST_DIR/$PREFIX/include"
-    ./grub-mkimage -d grub-core -O i386-xen -c ../grub-bootstrap.cfg \
+    ./grub-mkimage -d grub-core -O i386-xen -c "$BASEDIR"/data/grub-bootstrap.cfg \
       -m ../memdisk.tar -o grub-i386-xen grub-core/*mod
     cp grub-i386-xen "$INST_DIR"/$PREFIX/lib/xen/boot
     ## GRUB64
@@ -48,7 +48,7 @@ function grub_build() {
         $MAKE clean
         ./configure --target=amd64 --with-platform=xen
         $MAKE CPPFLAGS="-I$INST_DIR/$PREFIX/include"
-        ./grub-mkimage -d grub-core -O x86_64-xen -c ../grub-bootstrap.cfg \
+        ./grub-mkimage -d grub-core -O x86_64-xen -c "$BASEDIR"/data/grub-bootstrap.cfg \
           -m ../memdisk.tar -o grub-x86_64-xen grub-core/*mod
         cp grub-x86_64-xen "$INST_DIR"/$PREFIX/lib/xen/boot
     fi
index d198bb3b4c9454cbd68085adb5897d4e94de1500..d422f3632dd9f35aa25b92356f09e4785da417be 100644 (file)
@@ -44,7 +44,7 @@ function libvirt_build() {
     if test $DISTRO = "Debian"
     then
         mkdir -p "$INST_DIR"/etc/init.d
-        cat ../libvirt.debian.init | sed -e "s,@PREFIX,$PREFIX,g" > "$INST_DIR"/etc/init.d/libvirtd
+        cat "$BASEDIR"/data/libvirt.debian.init | sed -e "s,@PREFIX,$PREFIX,g" > "$INST_DIR"/etc/init.d/libvirtd
         chmod +x "$INST_DIR"/etc/init.d/libvirtd
     elif test $DISTRO = "Fedora" || test $DISTRO = "CentOS"
     then
index 14655b7167ef9df1f12ddd3920f8c6d8106ba4ea..de360767b50a7fdd936aee200f9ecbee88d8ca6f 100644 (file)
@@ -99,7 +99,7 @@ function xen_create_bridge_Fedora() {
     echo "BRIDGE=$BRIDGE" >> $TMPFILE
     $SUDO mv -f $TMPFILE $IFACE
 
-    cat ifcfg-xenbr0 | sed -e "s/@BRIDGE/$BRIDGE/g" > $TMPFILE
+    cat "$BASEDIR"/data/ifcfg-xenbr0 | sed -e "s/@BRIDGE/$BRIDGE/g" > $TMPFILE
     $SUDO mv -f $TMPFILE /etc/sysconfig/network-scripts
 
     $SUDO iptables -I FORWARD -m physdev --physdev-is-bridged -j ACCEPT
diff --git a/data/grub-bootstrap.cfg b/data/grub-bootstrap.cfg
new file mode 100644 (file)
index 0000000..e988314
--- /dev/null
@@ -0,0 +1 @@
+normal (memdisk)/grub.cfg
diff --git a/data/grub.cfg b/data/grub.cfg
new file mode 100644 (file)
index 0000000..1600b1e
--- /dev/null
@@ -0,0 +1,21 @@
+if search -s -f /boot/xen/pvboot-x86_64.elf ; then
+        echo "Chainloading (${root})/boot/xen/pvboot-x86_64.elf"
+        multiboot "/boot/xen/pvboot-x86_64.elf"
+        boot
+fi
+
+if search -s -f /xen/pvboot-x86_64.elf ; then
+        echo "Chainloading (${root})/xen/pvboot-x86_64.elf"
+        multiboot "/xen/pvboot-x86_64.elf"
+        boot
+fi
+
+if search -s -f /boot/grub/grub.cfg ; then
+        echo "Reading (${root})/boot/grub/grub.cfg"
+        configfile /boot/grub/grub.cfg
+fi
+
+if search -s -f /grub/grub.cfg ; then
+        echo "Reading (${root})/grub/grub.cfg"
+        configfile /grub/grub.cfg
+fi
diff --git a/data/ifcfg-xenbr0 b/data/ifcfg-xenbr0
new file mode 100644 (file)
index 0000000..3e81495
--- /dev/null
@@ -0,0 +1,5 @@
+DEVICE=@BRIDGE
+TYPE=Bridge
+BOOTPROTO=dhcp
+ONBOOT=yes
+DELAY=0
diff --git a/data/libvirt.debian.init b/data/libvirt.debian.init
new file mode 100644 (file)
index 0000000..036154b
--- /dev/null
@@ -0,0 +1,59 @@
+#! /bin/sh
+#
+# Init script for libvirtd
+#
+# Loosely based on Debian libvirt-bin initscript:
+# (c) 2007 Guido Guenther <agx@sigxcpu.org>
+# based on the skeletons that comes with dh_make
+#
+### BEGIN INIT INFO
+# Provides:          libvirt-bin libvirtd
+# Required-Start:    $network $local_fs $remote_fs $syslog
+# Required-Stop:     $local_fs $remote_fs $syslog
+# Should-Start:      avahi-daemon cgconfig
+# Should-Stop:       avahi-daemon cgconfig
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: libvirt management daemon
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+export PATH
+DAEMON=@PREFIX/sbin/libvirtd
+NAME=libvirtd
+DESC="libvirt management daemon"
+
+test -x $DAEMON || exit 0
+. /lib/lsb/init-functions
+
+PIDFILE=/var/run/$NAME.pid
+
+case "$1" in
+  start)
+       [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+       start-stop-daemon --start --pidfile $PIDFILE \
+           --exec $DAEMON -- -d $libvirtd_opts
+       [ "$VERBOSE" != no ] && log_end_msg $?
+       ;;
+  stop)
+       [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+       start-stop-daemon --stop --pidfile $PIDFILE \
+           --exec $DAEMON
+       [ "$VERBOSE" != no ] && log_end_msg $?
+       ;;
+  restart)
+       stop
+       start
+       ;;
+  reload|force-reload)
+       start-stop-daemon --stop --signal 1 --quiet --pidfile \
+            /var/run/$NAME.pid --exec $DAEMON
+       ;;
+  *)
+       N=/etc/init.d/libvirtd
+       echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+       exit 1
+       ;;
+esac
+
+exit 0
diff --git a/grub-bootstrap.cfg b/grub-bootstrap.cfg
deleted file mode 100644 (file)
index e988314..0000000
+++ /dev/null
@@ -1 +0,0 @@
-normal (memdisk)/grub.cfg
diff --git a/grub.cfg b/grub.cfg
deleted file mode 100644 (file)
index 1600b1e..0000000
--- a/grub.cfg
+++ /dev/null
@@ -1,21 +0,0 @@
-if search -s -f /boot/xen/pvboot-x86_64.elf ; then
-        echo "Chainloading (${root})/boot/xen/pvboot-x86_64.elf"
-        multiboot "/boot/xen/pvboot-x86_64.elf"
-        boot
-fi
-
-if search -s -f /xen/pvboot-x86_64.elf ; then
-        echo "Chainloading (${root})/xen/pvboot-x86_64.elf"
-        multiboot "/xen/pvboot-x86_64.elf"
-        boot
-fi
-
-if search -s -f /boot/grub/grub.cfg ; then
-        echo "Reading (${root})/boot/grub/grub.cfg"
-        configfile /boot/grub/grub.cfg
-fi
-
-if search -s -f /grub/grub.cfg ; then
-        echo "Reading (${root})/grub/grub.cfg"
-        configfile /grub/grub.cfg
-fi
diff --git a/ifcfg-xenbr0 b/ifcfg-xenbr0
deleted file mode 100644 (file)
index 3e81495..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-DEVICE=@BRIDGE
-TYPE=Bridge
-BOOTPROTO=dhcp
-ONBOOT=yes
-DELAY=0
diff --git a/libvirt.debian.init b/libvirt.debian.init
deleted file mode 100644 (file)
index 036154b..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#! /bin/sh
-#
-# Init script for libvirtd
-#
-# Loosely based on Debian libvirt-bin initscript:
-# (c) 2007 Guido Guenther <agx@sigxcpu.org>
-# based on the skeletons that comes with dh_make
-#
-### BEGIN INIT INFO
-# Provides:          libvirt-bin libvirtd
-# Required-Start:    $network $local_fs $remote_fs $syslog
-# Required-Stop:     $local_fs $remote_fs $syslog
-# Should-Start:      avahi-daemon cgconfig
-# Should-Stop:       avahi-daemon cgconfig
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: libvirt management daemon
-### END INIT INFO
-
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-export PATH
-DAEMON=@PREFIX/sbin/libvirtd
-NAME=libvirtd
-DESC="libvirt management daemon"
-
-test -x $DAEMON || exit 0
-. /lib/lsb/init-functions
-
-PIDFILE=/var/run/$NAME.pid
-
-case "$1" in
-  start)
-       [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
-       start-stop-daemon --start --pidfile $PIDFILE \
-           --exec $DAEMON -- -d $libvirtd_opts
-       [ "$VERBOSE" != no ] && log_end_msg $?
-       ;;
-  stop)
-       [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
-       start-stop-daemon --stop --pidfile $PIDFILE \
-           --exec $DAEMON
-       [ "$VERBOSE" != no ] && log_end_msg $?
-       ;;
-  restart)
-       stop
-       start
-       ;;
-  reload|force-reload)
-       start-stop-daemon --stop --signal 1 --quiet --pidfile \
-            /var/run/$NAME.pid --exec $DAEMON
-       ;;
-  *)
-       N=/etc/init.d/libvirtd
-       echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
-       exit 1
-       ;;
-esac
-
-exit 0