mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-03 21:02:34 +00:00 
			
		
		
		
	build xcat-genesis-base package on debian/ubuntu
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15112 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		@@ -1,14 +1,14 @@
 | 
			
		||||
Source: xcat-genesis
 | 
			
		||||
Source: xcat-genesis-base-amd64
 | 
			
		||||
Section: admin
 | 
			
		||||
Priority: extra
 | 
			
		||||
Maintainer: Arif Ali <aali@ocf.co.uk>
 | 
			
		||||
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 <aali@ocf.co.uk>
 | 
			
		||||
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. 
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								xCAT-genesis-builder/debian/dirs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								xCAT-genesis-builder/debian/dirs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
/opt/xcat/share/xcat/netboot/genesis/x86_64/
 | 
			
		||||
							
								
								
									
										1
									
								
								xCAT-genesis-builder/debian/install
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								xCAT-genesis-builder/debian/install
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
opt/ .
 | 
			
		||||
@@ -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)
 | 
			
		||||
							
								
								
									
										37
									
								
								xCAT-genesis-builder/debian/postrm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								xCAT-genesis-builder/debian/postrm
									
									
									
									
									
										Normal file
									
								
							@@ -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:
 | 
			
		||||
#        * <postrm> `remove'
 | 
			
		||||
#        * <postrm> `purge'
 | 
			
		||||
#        * <old-postrm> `upgrade' <new-version>
 | 
			
		||||
#        * <new-postrm> `failed-upgrade' <old-version>
 | 
			
		||||
#        * <new-postrm> `abort-install'
 | 
			
		||||
#        * <new-postrm> `abort-install' <old-version>
 | 
			
		||||
#        * <new-postrm> `abort-upgrade' <old-version>
 | 
			
		||||
#        * <disappearer's-postrm> `disappear' <overwriter>
 | 
			
		||||
#          <overwriter-version>
 | 
			
		||||
# 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
 | 
			
		||||
							
								
								
									
										35
									
								
								xCAT-genesis-builder/debian/preinst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								xCAT-genesis-builder/debian/preinst
									
									
									
									
									
										Normal file
									
								
							@@ -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:
 | 
			
		||||
#        * <new-preinst> `install'
 | 
			
		||||
#        * <new-preinst> `install' <old-version>
 | 
			
		||||
#        * <new-preinst> `upgrade' <old-version>
 | 
			
		||||
#        * <old-preinst> `abort-upgrade' <new-version>
 | 
			
		||||
# 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
 | 
			
		||||
@@ -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)
 | 
			
		||||
    ;;
 | 
			
		||||
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -1 +0,0 @@
 | 
			
		||||
opt/xcat/share/xcat/netboot/genesis/x86_64
 | 
			
		||||
		Reference in New Issue
	
	Block a user