diff --git a/xCAT-genesis-builder/debian/control b/xCAT-genesis-builder/debian/control index 151f7af7c..c49d7660e 100644 --- a/xCAT-genesis-builder/debian/control +++ b/xCAT-genesis-builder/debian/control @@ -1,14 +1,14 @@ -Source: xcat-genesis +Source: xcat-genesis-base-amd64 Section: admin Priority: extra -Maintainer: Arif Ali -Build-Depends: debhelper (>= 5), dracut, ethtool, bridge-utils, ifenslave, vlan, rpm, libc6-i386, hwdata, screen, ntp, ncurses-term, btrfs-tools, libstdc++5, libldap-2.4-2, libsasl2-2, libtirpc1, nfs-common +Maintainer: root +Build-Depends: debhelper (>= 8.0.0) Standards-Version: 3.7.2 -Package: xcat-genesis-amd64 +Package: xcat-genesis-base-amd64 Architecture: all -Depends: ${perl:Depends} +Depends: Description: xCAT Genesis netboot image - xCAT genesis (Genesis Enhanced Netboot Environment for System Information - and Servicing) is a small, embedded-like environment for xCAT's use in - discovery and management actions when interaction with an OS is infeasible. + xCAT genesis (Genesis Enhanced Netboot Environment for System Information + and Servicing) is a small, embedded-like environment for xCAT's use in + discovery and management actions when interaction with an OS is infeasible. diff --git a/xCAT-genesis-builder/debian/dirs b/xCAT-genesis-builder/debian/dirs new file mode 100644 index 000000000..9e36a75f7 --- /dev/null +++ b/xCAT-genesis-builder/debian/dirs @@ -0,0 +1 @@ +/opt/xcat/share/xcat/netboot/genesis/x86_64/ diff --git a/xCAT-genesis-builder/debian/install b/xCAT-genesis-builder/debian/install new file mode 100644 index 000000000..09e22fc62 --- /dev/null +++ b/xCAT-genesis-builder/debian/install @@ -0,0 +1 @@ +opt/ . diff --git a/xCAT-genesis-builder/debian/xcat-genesis-amd64.postinst b/xCAT-genesis-builder/debian/postinst similarity index 76% rename from xCAT-genesis-builder/debian/xcat-genesis-amd64.postinst rename to xCAT-genesis-builder/debian/postinst index 35bf74c2d..1847f28b1 100644 --- a/xCAT-genesis-builder/debian/xcat-genesis-amd64.postinst +++ b/xCAT-genesis-builder/debian/postinst @@ -1,5 +1,5 @@ #!/bin/sh -# postinst script for xcat-genesis +# postinst script for xcat-genesis-base # # see: dh_installdeb(1) @@ -20,13 +20,13 @@ set -e case "$1" in configure) - if [ -f /tmp/xCAT-genesis_upgrade.tmp ];then - if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image - . /etc/profile.d/xcat.sh - mknb x86_64 - fi - rm /tmp/xCAT-genesis_upgrade.tmp - fi + if [ -f "/tmp/xCATgenesisbase_update.tmp" ]; then + if [ -f "/proc/cmdline" ]; then + . /etc/profile.d/xcat.sh + tarch=`uname -m` + mknb %{tarch} + fi + fi ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/xCAT-genesis-builder/debian/postrm b/xCAT-genesis-builder/debian/postrm new file mode 100644 index 000000000..d64afe4ab --- /dev/null +++ b/xCAT-genesis-builder/debian/postrm @@ -0,0 +1,37 @@ +#!/bin/sh +# postrm script for xcat-genesis-base +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/xCAT-genesis-builder/debian/preinst b/xCAT-genesis-builder/debian/preinst new file mode 100644 index 000000000..56a8ac27e --- /dev/null +++ b/xCAT-genesis-builder/debian/preinst @@ -0,0 +1,35 @@ +#!/bin/sh +# preinst script for xcat-genesis-base +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `install' +# * `install' +# * `upgrade' +# * `abort-upgrade' +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/xCAT-genesis-builder/debian/xcat-genesis-amd64.prerm b/xCAT-genesis-builder/debian/prerm similarity index 91% rename from xCAT-genesis-builder/debian/xcat-genesis-amd64.prerm rename to xCAT-genesis-builder/debian/prerm index 155110d63..3e8b3a851 100644 --- a/xCAT-genesis-builder/debian/xcat-genesis-amd64.prerm +++ b/xCAT-genesis-builder/debian/prerm @@ -1,5 +1,5 @@ #!/bin/sh -# prerm script for xCAT-nbroot2 +# prerm script for xcat-genesis-base # # see: dh_installdeb(1) @@ -18,12 +18,13 @@ set -e case "$1" in - upgrade) - touch /tmp/xCAT-genesis_upgrade.tmp - ;; remove|deconfigure) ;; + upgrade) + touch /tmp/xCATgenesisbase_update.tmp + ;; + failed-upgrade) ;; diff --git a/xCAT-genesis-builder/debian/rules b/xCAT-genesis-builder/debian/rules index 45e2be9de..650dfad88 100755 --- a/xCAT-genesis-builder/debian/rules +++ b/xCAT-genesis-builder/debian/rules @@ -9,19 +9,8 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -export DH_COMPAT=5 - -export buildroot=$(PWD)/debian/xcat-genesis-$(DEB_BUILD_ARCH) - build: - mkdir -p /usr/share/dracut/modules.d/97xcat - cp -r * /usr/share/dracut/modules.d/97xcat - rm -rf /usr/share/dracut/modules.d/97xcat/debian - mv /usr/share/dracut/modules.d/97xcat/install.ubuntu /usr/share/dracut/modules.d/97xcat/install - mkdir -p $(buildroot)/opt/xcat/share/xcat/netboot/genesis/$(DEB_BUILD_GNU_CPU)/fs - dracut -m "xcat base" -f /tmp/xcatgenesis.tmp.rfs - (cd $(buildroot)/opt/xcat/share/xcat/netboot/genesis/$(DEB_BUILD_GNU_CPU)/fs/ && zcat /tmp/xcatgenesis.tmp.rfs|cpio -dumi) - cp /boot/vmlinuz-`uname -r` $(buildroot)/opt/xcat/share/xcat/netboot/genesis/$(DEB_BUILD_GNU_CPU)/kernel + pwd clean: dh_testdir @@ -33,44 +22,18 @@ install: dh_testdir dh_testroot dh_installdirs -# dh_install -X".svn" -# dh_link - - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs -# dh_installexamples -# dh_install -X".svn" -# dh_installmenu -# dh_installdebconf -# dh_installlogrotate -# dh_installemacsen -# dh_installpam -# dh_installmime -# dh_python -# dh_installinit -# dh_installcron -# dh_installinfo - dh_installman -# dh_link -# dh_strip + dh_install dh_compress -# dh_fixperms - dh_perl - dh_makeshlibs dh_installdeb - dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb +# Build architecture-independent files here. +binary-indep: build install + +binary-arch: + pwd + binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure diff --git a/xCAT-genesis-builder/debian/xcat-genesis-amd64.dirs b/xCAT-genesis-builder/debian/xcat-genesis-amd64.dirs deleted file mode 100644 index a940a8b7f..000000000 --- a/xCAT-genesis-builder/debian/xcat-genesis-amd64.dirs +++ /dev/null @@ -1 +0,0 @@ -opt/xcat/share/xcat/netboot/genesis/x86_64