Commit 7ed6da8b authored by aTc's avatar aTc Committed by Nick Elsmore

Initial commit

parents
[General]
include=/usr/share/multistrap/pyra/pyra-debian-stretch.conf
directory=pyra-debian-stretch-mate-rootfs
bootstrap=Debian Debian-updates Debian-security Pyra
aptsources=Debian Debian-updates Debian-security Pyra
[Pyra]
packages=pyra-meta-mate pyra-hacks
source=http://packages.pyra-handheld.com/debian
suite=stretch
components=main
keyring=pyra-archive-keyring
#!/bin/sh
# run config script if building on arm hardware,
# otherwise it'll be run on the first boot.
if [ "$(uname -m)" = "armv7l" ]
then
mkdir $1/preseeds
cp /usr/share/multistrap/pyra/pyra-debconf $1/preseeds/
systemd-nspawn -D $1 /pyra-config.sh
rm $1/pyra-config.sh
rm -rf $1/preseeds
# new ssh keys will need to be made on the real device
rm $1/etc/ssh/ssh_host_*
fi
#!/bin/sh
#exit 0
NOW=$(date +"%Y-%m-%d_%H-%M")
cd $1
mkdir -p ../export
#FNAME=$(basename $1)-$NOW.tgz
FNAME=$(basename $1)
echo Creating ${FNAME}.tgz
if hash pv 2>/dev/null
then
SIZE=$(du -sb . | awk '{print $1}')
tar cf - . | pv -s $SIZE | gzip --rsyncable > ../export/${FNAME}.tgz
#tar cf - . | pv -s $SIZE > ../export/${FNAME}.tar
else
tar cf - . | gzip --rsyncable > ../export/${FNAME}.tgz
#tar cf - . > ../export/${FNAME}.tgz
fi
#echo Creating ${FNAME}.tar.xz
#tar cf - . | pv -s $SIZE | xz --block-size=16M > ../export/${FNAME}.tar.xz
cd ../export/
#sha256sum ${FNAME}.tgz > ${FNAME}.tgz.sha256
#sha256sum ${FNAME}.tar.xz > ${FNAME}.tar.xz.sha256
#ln -sf ${FNAME} $(basename $1)-latest.tgz
rm $1 -rf
Package: *
Pin: origin "packages.pyra-handheld.com"
Pin-Priority: 1100
#!bin/bash
# pyra multistrap config script
# this is run on the device at first boot
# configuration options
# this should be replaced by an interactive first-run-wizard later on.
hostname="pyra_install"
user_name="pyra"
user_pass="pyra"
root_pass="root"
########################################################################
# setup script
# environment
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl"
export LC_ALL=C LANGUAGE=C LANG=C
# stop dpkg from asking any questions, just uses the default settings for everything
export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true
#touch /etc/fstab
echo "/dev/mmcblk0p1 / ext4 defaults 0 1" > /etc/fstab
mount -t sysfs sysfs /sys
mount -t proc proc /proc
# configure packages
#preseed debconf
if [ -d /preseeds/ ]; then
for file in `ls -1 /preseeds/*`; do
debconf-set-selections $file
done
fi
# disable daemon startup
echo "exit 101" > /usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
# run any preinst scripts that might add dpkg-divert rules
grep -l dpkg-divert /var/lib/dpkg/info/*.preinst \
| while read file
do
export DPKG_MAINTSCRIPT_NAME="$(basename $file)"
export DPKG_MAINTSCRIPT_PACKAGE="$(basename $file .preinst)"
echo "Running ${DPKG_MAINTSCRIPT_NAME}..."
$file install
# :XXX: requires network access and `apt-get update` first
# apt-get -y --reinstall install ${DPKG_MAINTSCRIPT_PACKAGE}
done
# set up a few things manually
/var/lib/dpkg/info/dash.preinst install
dpkg --force-configure-any --configure base-passwd
# base-files will fail to install if there are any files in /var/run
rm /var/run/* -rf
dpkg --force-configure-any --configure base-files
dpkg --force-configure-any --configure dpkg
dpkg --force-configure-any --configure perl-base
dpkg --force-configure-any --configure debconf
dpkg --force-configure-any --configure apt
dpkg --force-configure-any --configure eatmydata
# apt can handle things from here
# using eatmydata makes installing a few minutes faster
eatmydata apt-get -f install
# used to be
#dpkg --configure -a
# but apt handles things slightly better it seems.
#init got replaced by a link to this script, move the real one back
#rm /sbin/init
mv /sbin/init-real /sbin/init
###############################################################
# set up the rest of the system
# set root password
passwd "root" <<EOF
$root_pass
$root_pass
EOF
#create a normal user
# moved to first-run
#adduser --gecos "" $user_name << EOF
#$user_pass
#$user_pass
#EOF
#usermod -a -G sudo,audio,bluetooth,plugdev $user_name
# set hostname
#echo $hostname > /etc/hostname
#echo "127.0.0.1 localhost.localdomain localhost $hostname" > /etc/hosts
#hostname -F /etc/hostname
hostnamectl set-hostname $hostname
#enable serial login
systemctl enable serial-getty@ttyO2.service
# if kernel kernel modules weren't installed from a package
depmod -a
# run first-run-wizard at next boot
rm /var/lib/pyra/first-run.done
# initialize apt database
apt-get update
rm $1/usr/sbin/policy-rc.d
# make sure everything is written to filesystem
sync
# reboot
#shutdown -rn now
#reboot --force
locales locales/locales_to_be_generated multiselect de_DE.UTF-8 UTF-8, en_US.UTF-8 UTF-8, nl_NL.UTF-8 UTF-8
locales locales/default_environment_locale select en_US.UTF-8
keyboard-configuration keyboard-configuration/modelcode string pc105
keyboard-configuration keyboard-configuration/compose select No compose key
keyboard-configuration keyboard-configuration/variantcode string euro
keyboard-configuration keyboard-configuration/store_defaults_in_debconf_db boolean true
keyboard-configuration keyboard-configuration/unsupported_layout boolean true
keyboard-configuration keyboard-configuration/model select Generic 105-key (Intl) PC
keyboard-configuration keyboard-configuration/ctrl_alt_bksp boolean false
keyboard-configuration keyboard-configuration/xkb-keymap select us(euro)
keyboard-configuration keyboard-configuration/altgr select The default for the keyboard layout
keyboard-configuration keyboard-configuration/switch select No temporary switch
keyboard-configuration keyboard-configuration/unsupported_config_layout boolean true
keyboard-configuration keyboard-configuration/layout select
keyboard-configuration keyboard-configuration/unsupported_options boolean true
keyboard-configuration keyboard-configuration/layoutcode string us
keyboard-configuration keyboard-configuration/unsupported_config_options boolean true
keyboard-configuration keyboard-configuration/toggle select No toggling
keyboard-configuration keyboard-configuration/optionscode string
keyboard-configuration keyboard-configuration/variant select English (US) - English (US, with euro on 5)
tzdata tzdata/Zones/Europe select Amsterdam
tzdata tzdata/Zones/Etc select UTC
tzdata tzdata/Areas select Europe
[General]
arch=armhf
cleanup=true
noauth=true
unpack=true
ignorenativearch=true
addimportant=true
allowrecommends=true
hookdir=/usr/share/multistrap/pyra/hooks/
#aptpreferences=/usr/share/multistrap/pyra/pyra-archive
debconfseed=/usr/share/multistrap/pyra/pyra-debconf
setupscript=/usr/share/multistrap/pyra/pyra-setup.sh
configscript=/usr/share/multistrap/pyra/pyra-config.sh
[Debian]
source=http://httpredir.debian.org/debian
suite=stretch
components=main contrib non-free
packages=eatmydata
[Debian-updates]
source=http://httpredir.debian.org/debian
suite=stretch-updates
components=main contrib non-free
[Debian-security]
source=http://security.debian.org/debian-security
suite=stretch/updates
components=main contrib non-free
#!/bin/bash
# multistrap setup script, run by multistrap after generating the image, $1 points to the image root
# make sure fstab exists
#touch $1/etc/fstab
#mkdir $1/boot/extlinux
#echo "menu title Pyra boot SD" >> $1/boot/extlinux/extlinux.conf
#echo "timeout 50" >> $1/boot/extlinux/extlinux.conf
#echo "default none" >> $1/boot/extlinux/extlinux.conf
#echo " " >> $1/boot/extlinux/extlinux.conf
# some evil bits to launch the setup script at first boot
# this is undone by the config script
mv $1/sbin/init $1/sbin/init-real
ln -s ../pyra-config.sh $1/sbin/init
#systemd-nspawn -D $1 /pyra-config.sh
#rm $1/pyra-config.sh
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment