trying to automate ARCH builds... first steps

This commit is contained in:
toby 2019-01-09 19:04:09 +00:00
parent 31f88c1254
commit 39806245bf
10 changed files with 50 additions and 7 deletions

View File

@ -12,7 +12,6 @@ KERNEL_DIR=$RESULT_DIR/kernel
[[ -d $RESULT_DIR ]] || mkdir -p $RESULT_DIR
[[ -d $KERNEL_DIR ]] || mkdir -p $KERNEL_DIR
HOSTNAME=localhost
# Configs overwritable via environment variables
RELEASE=${RELEASE:=unstable}
FLAVOUR=${FLAVOUR:=debian} # Either 'debian' or 'ubuntu'
@ -49,7 +48,7 @@ fi
echo "Installing Debian $RELEASE..."
debootstrap --variant=minbase --include=$INCLUDES,$BOOT_PKG $RELEASE $MNT_DIR $MIRROR || fail "cannot install $RELEASE"
echo $HOSTNAME > $MNT_DIR/etc/hostname
echo localhost > $MNT_DIR/etc/hostname
cat <<EOF > $MNT_DIR/etc/hosts
127.0.0.1 localhost
@ -59,7 +58,7 @@ ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
EOF
echo "ipv4: \4 ipv6: \6" >>/etc/issue
echo "ipv4: \4 ipv6: \6" >>$MNT_DIR/etc/issue
rm -f $MNT_DIR/etc/apt/sources.list
echo 'deb https://mirrors.wit.com/debian sid main contrib non-free' > $MNT_DIR/etc/apt/sources.list

View File

@ -1,4 +1,4 @@
Source: wit-pxeboot
Source: wit-pxeboot-amd64
Section: unknown
Priority: optional
Maintainer: wit <netops@wit.com>
@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 11)
Standards-Version: 4.1.3
Homepage: http://www.wit.com
Package: wit-pxeboot
Package: wit-pxeboot-amd64
Architecture: all
Depends: ${misc:Depends}, tftpd-hpa, pxelinux, syslinux-common
Description: kernel and initrd to pxeboot debcore

View File

@ -1,3 +1,3 @@
files/wit-pxeboot/* /srv/tftp/wit-pxeboot/
files/kernel/* /srv/tftp/wit-pxeboot/
files/boot/* /srv/tftp/boot/
files/grub.cfg /srv/tftp/boot/grub/

1
debian-arm64/compat Normal file
View File

@ -0,0 +1 @@
11

15
debian-arm64/control Normal file
View File

@ -0,0 +1,15 @@
Source: wit-pxeboot-arm64
Section: unknown
Priority: optional
Maintainer: wit <netops@wit.com>
Build-Depends: debhelper (>= 11)
Standards-Version: 4.1.3
Homepage: http://www.wit.com
Package: wit-pxeboot-arm64
Architecture: all
Depends: ${misc:Depends}, tftpd-hpa, pxelinux, syslinux-common
Description: kernel and initrd to pxeboot debcore
kernel and initrd to boot a pxe image easily
it also includes a rootfs to quickly kickstart
a local install

25
debian-arm64/rules Executable file
View File

@ -0,0 +1,25 @@
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
%:
dh $@
# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

View File

@ -0,0 +1,3 @@
files/kernel/* /srv/tftp/wit-pxeboot/
files/boot/* /srv/tftp/boot/
files/grub.cfg /srv/tftp/boot/grub/

View File

@ -2,7 +2,7 @@
set -Eeuxo pipefail
export TMP_DIR=$(mktemp -d)
cp -r debian $TMP_DIR
cp -r debian-$ARCH $TMP_DIR/debian
cp -r files $TMP_DIR
echo -e "wit-pxeboot (1.0.$(date +%Y.%m.%d.%H.%M)) unstable; urgency=low\n\n$(git log --format=" * %s")\n\n -- wit <netops@wit.com> $(date -R)" >$TMP_DIR/debian/changelog
sudo TMP_DIR=$TMP_DIR ./create_pxeinitrd.sh