diff --git a/bootstrap.d/10-bootstrap.sh b/bootstrap.d/10-bootstrap.sh index ec01b72..abc578c 100644 --- a/bootstrap.d/10-bootstrap.sh +++ b/bootstrap.d/10-bootstrap.sh @@ -20,12 +20,7 @@ if [ "$ENABLE_MINBASE" = true ] ; then fi # Exclude packages if required by Debian release -if [ "$RELEASE" = "stretch" ] ; then - EXCLUDES="--exclude=init,systemd-sysv" -fi - -# Exclude packages if required by Debian buster release -if [ "$RELEASE" = "buster" ] ; then +if [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then EXCLUDES="--exclude=init,systemd-sysv" fi diff --git a/bootstrap.d/42-fbturbo.sh b/bootstrap.d/42-fbturbo.sh index a2d5717..fba46b3 100644 --- a/bootstrap.d/42-fbturbo.sh +++ b/bootstrap.d/42-fbturbo.sh @@ -28,12 +28,7 @@ if [ "$ENABLE_FBTURBO" = true ] ; then fi # Install Xorg build dependencies - if [ "$RELEASE" = "jessie" ] ; then - chroot_exec apt-get -q -y --no-install-recommends install xorg-dev xutils-dev x11proto-dri2-dev libltdl-dev libtool automake libdrm-dev - elif [ "$RELEASE" = "stretch" ] ; then - chroot_exec apt-get -q -y --no-install-recommends --allow-unauthenticated install xorg-dev xutils-dev x11proto-dri2-dev libltdl-dev libtool automake libdrm-dev - # removed --allow-unauthenticated as recommended after amendment on _apt privileges - elif [ "$RELEASE" = "buster" ] ; then + if [ "$RELEASE" = "jessie" ] || [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then chroot_exec apt-get -q -y --no-install-recommends install xorg-dev xutils-dev x11proto-dri2-dev libltdl-dev libtool automake libdrm-dev fi diff --git a/functions.sh b/functions.sh index 52f9c35..f311816 100644 --- a/functions.sh +++ b/functions.sh @@ -59,10 +59,8 @@ chroot_install_cc() { if [ -z "${COMPILER_PACKAGES}" ] ; then COMPILER_PACKAGES=$(chroot_exec apt-get -s install g++ make bc | grep "^Inst " | awk -v ORS=" " '{ print $2 }') - if [ "$RELEASE" = "jessie" ] ; then + if [ "$RELEASE" = "jessie" ] || [ "$RELEASE" = "stretch" ] || [ "$RELEASE" = "buster" ] ; then chroot_exec apt-get -q -y --no-install-recommends install ${COMPILER_PACKAGES} - elif [ "$RELEASE" = "stretch" ] ; then - chroot_exec apt-get -q -y --allow-unauthenticated --no-install-recommends install ${COMPILER_PACKAGES} fi fi } diff --git a/templates/README.md b/templates/README.md new file mode 100644 index 0000000..6f80f7b --- /dev/null +++ b/templates/README.md @@ -0,0 +1,13 @@ +## Templates used at IFÉ ENS de Lyon for Tremplin project + +These templates have been used to create Raspberry Pi images for the project "Climate and meteorolgy springboard for teaching sciences". These images are used as explained in the [blog](http://blog.climatetmeteo.fr/GerardVidal/) (mostly in french). + +The aim was to share with teachers an image providing software resources to use commercial weatherstations or DIY weathersystems made with various sensors. The following images have been built : + + * raspife2-stretch Debian stretch image for raspi 2 + * raspife3-jessie Debian jessie image for raspi 3 + * raspife3-stretch Debian stretch image for raspi 3 + * raspife3W-stretch Debian stretch image for raspi 3 with single IPAddress and weewx service + * raspife3-buster Debian buster image for raspi 3 + + diff --git a/templates/raspife2-stretch b/templates/raspife2-stretch new file mode 100644 index 0000000..dbf6f2d --- /dev/null +++ b/templates/raspife2-stretch @@ -0,0 +1,80 @@ + Configuration file raspife2 Stretch IFÉ 2017/02/24 + # + APT_SERVER=ftp.fr.debian.org + APT_INCLUDES="gnupg,gnupg2,firmware-realtek,firmware-linux-nonfree,firmware-linux,tightvncserver,build-essentia$ + bison,libboost-all-dev,automake,autoconf,autogen,libtool,pkg-config,checkinstall,python3,python3-dev,menulibre,$ + libnotify-bin,python,python-configobj,python-cheetah,python-imaging,python-serial,python-usb,python-dev,\ + pcre2-utils,libpcre++-dev,libpcre2-dev,libjpeg-dev,jed,i2c-tools,python-smbus,policykit-1,usbutils,\ + pmount,python-pip,python3-pip,geany,geany-plugin-py,geany-plugin-markdown,firefox-esr,firefox-esr-l10n-fr,\ + icedtea-8-plugin,openjdk-8-jdk,openjdk-8-jre,openjdk-8-jre-headless,libqtwebkit-dev,libqt5webkit5-dev,\ + libudev-dev,libzzip-dev,zlib1g-dev,libcanberra-gtk-module,libnss-myhostname,libfreetype6-dev,libpng16-16,\ + lxsession,openbox-lxde-session,lxde" + #---------------------- + RPI_MODEL=2 + RELEASE="stretch" + HOSTNAME="raspife2" + PASSWORD="***********" + USER_PASSWORD="**************" + DEFLOCAL="fr_FR.UTF-8" + TIMEZONE="Europe/Paris" + EXPANDROOT=false + #----------------------- + XKB_MODEL="pc105" + XKB_LAYOUT="fr" + XKB_VARIANT="latin9" + XKB_OPTIONS="" + #------------------------ + ENABLE_DHCP=true + #------------------------ + ENABLE_CONSOLE=true + ENABLE_I2C=true + ENABLE_SPI=true + ENABLE_IPV6=true + ENABLE_SSHD=true + ENABLE_NONFREE=true + ENABLE_WIRELESS=false + ENABLE_RSYSLOG=true + ENABLE_SOUND=true + ENABLE_HWRANDOM=true + ENABLE_MINGPU=true + ENABLE_DBUS=true + ENABLE_XORG=true + ENABLE_WM="lxdm" + #------------------------ + ENABLE_MINBASE=false + ENABLE_REDUCE=false + ENABLE_UBOOT=false + ENABLE_FBTURBO=true + ENABLE_IPTABLES=false + ENABLE_USER=true + USER_NAME=ens-ife + ENABLE_ROOT=true + ENABLE_HARDNET=true + ENABLE_INITRAMFS=true + ENABLE_IFNAMES=true + #------------------------ + ENABLE_ROOT_SSH=false + SSH_LIMIT_USERS=false + SSH_ROOT_PUB_KEY="/home/********/.ssh/authorized_keys" + SSH_USER_PUB_KEY="/home/********/.ssh/authorized_keys" + #------------------------ + BUILD_KERNEL=true + KERNEL_REDUCE=false + KERNEL_HEADERS=true + KERNEL_REMOVESRC=true + KERNELSRC_CLEAN=true + KERNELSRC_CONFIG=true + #------------------------ + REDUCE_APT=false + REDUCE_DOC=true + REDUCE_MAN=false + REDUCE_HWDB=true + REDUCE_BASH=false + REDUCE_SSHD=false + REDUCE_LOCALE=false + #------------------------- + ENABLE_CRYPTFS=false + #------------------------- + BASEDIR=/media/********/images/${RELEASE} + DATE=date ++%Y-%m-%d IMAGE_NAME=${BASEDIR}/${DATE}-rpi${RPI_MODEL}-${RELEASE} diff --git a/templates/rpi3busterIFE b/templates/raspife3-buster similarity index 89% rename from templates/rpi3busterIFE rename to templates/raspife3-buster old mode 100755 new mode 100644 index 9560970..b9c4524 --- a/templates/rpi3busterIFE +++ b/templates/raspife3-buster @@ -1,14 +1,15 @@ -# Configuration file raspi3 Stretch IFÉ 2017/04/15 +# Configuration file raspi3 Buster IFÉ 2017/07/26 # APT_SERVER=ftp.fr.debian.org APT_INCLUDES="gnupg,gnupg2,firmware-linux-nonfree,firmware-linux,dh-autoreconf,\ gettext,build-essential,git,cmake,libjson-c-dev,unzip,usbutils,\ bison,libboost-all-dev,automake,autoconf,autogen,libtool,libtool-bin,\ -pkg-config,checkinstall,menulibre,libnotify-bin,python3,python3-dev,\ -python,python-dev,python-configobj,python-cheetah,python-imaging,python-serial,python-usb,\ -python-tk,python3-tk,python3-scipy,pandoc,python-pypandoc,python3-pypandoc,\ -python-pandocfilters,python3-pandocfilters,\ -python-geopy,python3-geopy,python-pip,python3-pip,\ +pkg-config,checkinstall,menulibre,libnotify-bin,pandoc,\ +python3,python3-dev,python3-pypandoc,python3-scipy,python3-tk,python3-pandocfilters,\ +python,python-dev,python-pypandoc,python-scipy,python-tk,python-pandocfilters,\ +python3-geopy,python3-pip,\ +python-geopy,python-pip,\ +python-configobj,python-cheetah,python-imaging,python-serial,python-usb,\ pcre2-utils,libpcre++-dev,libpcre2-dev,libjpeg-dev,jed,i2c-tools,python-smbus,policykit-1,\ pmount,ntpdate,\ texlive,texlive-xetex,nginx-extras,ffmpeg,wicd,wicd-gtk,console-data,keyboard-configuration,\ @@ -21,8 +22,8 @@ tightvncserver,geany,geany-plugin-py,geany-plugin-markdown,firefox-esr,firefox-e RPI_MODEL=3 RELEASE="buster" HOSTNAME="raspife3" -PASSWORD="***********" -USER_PASSWORD="***********" +PASSWORD="**************" +USER_PASSWORD="***************" DEFLOCAL="fr_FR.UTF-8" TIMEZONE="Europe/Paris" EXPANDROOT=false diff --git a/templates/raspife3-jessie b/templates/raspife3-jessie new file mode 100644 index 0000000..6a4f72f --- /dev/null +++ b/templates/raspife3-jessie @@ -0,0 +1,4 @@ +# Configuration template file used by rpi23-gen-image.sh +RPI_MODEL=3 +RELEASE=jessie +BUILD_KERNEL=true diff --git a/templates/raspife3-stretch b/templates/raspife3-stretch new file mode 100644 index 0000000..5ab2596 --- /dev/null +++ b/templates/raspife3-stretch @@ -0,0 +1,86 @@ +# Configuration file raspi3 Stretch IFÉ 2017/04/15 +# +APT_SERVER=ftp.fr.debian.org +APT_INCLUDES="gnupg,gnupg2,firmware-linux-nonfree,firmware-linux,xutils-dev,\ +gettext, tightvncserver,build-essential,git,cmake,libjson-c-dev,unzip,\ +bison,libboost-all-dev,automake,autoconf,autogen,libtool,libtool-bin,pkg-config,checkinstall,menulibre,libnotify-bin, \ +python3,python3-dev,python,python-dev,python-configobj,python-cheetah,python-imaging,python-serial,python-usb,\ +python-tk,python3-tk,python3-scipy,pandoc,python-pypandoc,python3-pypandoc,python-pandocfilters,python3-pandocfilters, \ +python-geopy,python3-geopy,python-pip,python3-pip, \ +pcre2-utils,libpcre++-dev,libpcre2-dev,libjpeg-dev,jed,i2c-tools,python-smbus,policykit-1,usbutils,\ +pmount,geany,geany-plugin-py,geany-plugin-markdown,firefox-esr,firefox-esr-l10n-fr,ntpdate, \ +texlive,texlive-xetex,nginx-extras,ffmpeg,wicd,wicd-gtk,console-data,keyboard-configuration, \ +icedtea-8-plugin,openjdk-8-jdk,openjdk-8-jre,openjdk-8-jre-headless,libqtwebkit-dev,libqt5webkit5-dev,\ +libudev-dev,libzzip-dev,zlib1g-dev,libcanberra-gtk-module,libnss-myhostname,libfreetype6-dev,libpng16-16,\ +nmap,libltdl-dev,lxsession,openbox-lxde-session,lxde,dbus-user-session,debian-archive-keyring" +#---------------------- +RPI_MODEL=3 +RELEASE="stretch" +HOSTNAME="raspife3" +PASSWORD="**********" +USER_PASSWORD="**********" +DEFLOCAL="fr_FR.UTF-8" +TIMEZONE="Europe/Paris" +EXPANDROOT=false +#----------------------- +XKB_MODEL="pc105" +XKB_LAYOUT="fr" +XKB_VARIANT="latin9" +XKB_OPTIONS="" +#------------------------ +ENABLE_DHCP=true +#------------------------ +ENABLE_CONSOLE=false +ENABLE_I2C=true +ENABLE_SPI=true +ENABLE_IPV6=true +ENABLE_SSHD=true +ENABLE_NONFREE=true +ENABLE_WIRELESS=true +ENABLE_RSYSLOG=true +ENABLE_SOUND=true +ENABLE_HWRANDOM=true +ENABLE_MINGPU=true +ENABLE_DBUS=true +ENABLE_XORG=true +ENABLE_WM="lxdm" +#------------------------ +ENABLE_MINBASE=false +ENABLE_REDUCE=false +ENABLE_UBOOT=false +ENABLE_FBTURBO=false +ENABLE_IPTABLES=false +ENABLE_USER=true +USER_NAME=ens-ife +ENABLE_ROOT=true +ENABLE_HARDNET=true +ENABLE_INITRAMFS=true +ENABLE_IFNAMES=true +#------------------------ +ENABLE_ROOT_SSH=false +SSH_LIMIT_USERS=false +SSH_ROOT_PUB_KEY="/home/*******/.ssh/authorized_keys" +SSH_USER_PUB_KEY="/home/*******/.ssh/authorized_keys" +#------------------------ +BUILD_KERNEL=true +KERNEL_REDUCE=false +KERNEL_HEADERS=true +KERNEL_REMOVESRC=true +KERNELSRC_CLEAN=true +KERNELSRC_CONFIG=true +#------------------------ +REDUCE_APT=false +REDUCE_DOC=true +REDUCE_MAN=false +REDUCE_HWDB=true +REDUCE_BASH=false +REDUCE_SSHD=false +REDUCE_LOCALE=false +#------------------------- +ENABLE_CRYPTFS=false +#------------------------- +BASEDIR=/data/RpiGenImage/Images/${RELEASE} +DATE=`date +%Y-%m-%d` +IMAGE_NAME=${BASEDIR}/${DATE}-rpi${RPI_MODEL}-${RELEASE} + + diff --git a/templates/raspife3W-stretch b/templates/raspife3W-stretch new file mode 100644 index 0000000..8b4e016 --- /dev/null +++ b/templates/raspife3W-stretch @@ -0,0 +1,92 @@ +# Configuration file raspi3 Stretch IFÉ 2017/04/15 +# +APT_SERVER=ftp.fr.debian.org +APT_INCLUDES="debian-archive-keyring,debian-keyring,automake,autoconf,autogen,gawk,gnupg,gnupg2, \ +build-essential,git,cmake,libjson-c-dev,unzip,\ +bison,libboost-all-dev,libtool,libtool-bin,pkg-config,checkinstall,libnotify-bin,pandoc, \ +python3,python3-dev,python,python-dev,python-configobj,python-cheetah, \ +python-imaging,python-serial,python-usb,python-tk,python3-tk,python3-scipy, \ +python-pypandoc,python3-pypandoc,python-pandocfilters,python3-pandocfilters, \ +python-geopy,python3-geopy,python-pip,python3-pip,python-smbus, \ +libudev-dev,libzzip-dev,zlib1g-dev,libnss-myhostname,libpng16-16,nmap \ +libltdl-dev,usbutils,pmount,ntpdate,texlive,texlive-xetex,nginx-extras,policykit-1" +#firehol" +#ffmpeg,console-data,keyboard-configuration,openjdk-8-jdk, \ +#openjdk-8-jre,openjdk-8-jre-headless,pcre2-utils,libpcre++-dev,libpcre2-dev,libjpeg-dev,i2c-tools, \ +#libcanberra-gtk-module,libqtwebkit-dev,libqt5webkit5-dev,libfreetype6-dev" +#,policykit-1,inetutils-ping,firmware-linux-nonfree,firmware-linux +#---------------------- +RPI_MODEL=3 +RELEASE="stretch" +HOSTNAME="raspwife3" +PASSWORD="**************" +USER_PASSWORD="*************" +DEFLOCAL="fr_FR.UTF-8" +TIMEZONE="Europe/Paris" +EXPANDROOT=false +#----------------------- +XKB_MODEL="pc105" +XKB_LAYOUT="fr" +XKB_VARIANT="latin9" +XKB_OPTIONS="" +#------------------------ +ENABLE_DHCP=false +NET_ADDRESS="192.168.***.**/**" +NET_GATEWAY="192.168.***.1" +NET_DNS_1="192.168.***.1" +NET_DNS_2="8.8.8.8" +#------------------------ +ENABLE_CONSOLE=false +ENABLE_I2C=true +ENABLE_SPI=true +ENABLE_IPV6=true +ENABLE_SSHD=true +ENABLE_NONFREE=true +ENABLE_WIRELESS=true +ENABLE_RSYSLOG=true +ENABLE_SOUND=true +ENABLE_HWRANDOM=true +ENABLE_MINGPU=true +ENABLE_DBUS=true +ENABLE_XORG=false +ENABLE_WM="" +#------------------------ +ENABLE_MINBASE=false +ENABLE_REDUCE=false +ENABLE_UBOOT=false +ENABLE_FBTURBO=false +ENABLE_IPTABLES=false +ENABLE_USER=true +USER_NAME=ens-ife +ENABLE_ROOT=true +ENABLE_HARDNET=true +ENABLE_INITRAMFS=true +ENABLE_IFNAMES=true +#------------------------ +ENABLE_ROOT_SSH=false +SSH_LIMIT_USERS=false +SSH_ROOT_PUB_KEY="/home/********/.ssh/authorized_keys" +SSH_USER_PUB_KEY="/home/********/.ssh/authorized_keys" +#------------------------ +BUILD_KERNEL=true +KERNEL_REDUCE=false +KERNEL_HEADERS=true +KERNEL_REMOVESRC=true +KERNELSRC_CLEAN=true +KERNELSRC_CONFIG=true +#------------------------ +REDUCE_APT=false +REDUCE_DOC=true +REDUCE_MAN=false +REDUCE_HWDB=true +REDUCE_BASH=false +REDUCE_SSHD=false +REDUCE_LOCALE=false +#------------------------- +ENABLE_CRYPTFS=false +#------------------------- +BASEDIR=/data/RpiGenImage/Images/${RELEASE} +DATE=`date +%Y-%m-%d` +IMAGE_NAME=${BASEDIR}/${DATE}-rpiw${RPI_MODEL}-${RELEASE} + +