Compare commits
10 Commits
nilmdbuntu
...
nilmdbuntu
Author | SHA1 | Date | |
---|---|---|---|
812b1803ea | |||
2f71b45b16 | |||
e699801a3b | |||
3618d9815f | |||
c17520bc8a | |||
4ddfa26355 | |||
6318e0a55a | |||
b7ca46922d | |||
cb0da24a7d | |||
70272d3184 |
8
README
8
README
@@ -1,8 +1,7 @@
|
|||||||
This live CD is customized by roughly following the guidelines at:
|
This live CD is customized by roughly following the guidelines at:
|
||||||
https://
|
https://help.ubuntu.com/community/LiveCDCustomization
|
||||||
help.ubuntu.com/community/LiveCDCustomization
|
https://help.ubuntu.com/community/LiveCDCustomizationFromScratch
|
||||||
help.ubuntu.com/community/LiveCDCustomizationFromScratch
|
https://help.ubuntu.com/community/MakeALiveCD/DVD/BootableFlashFromHarddiskInstall
|
||||||
help.ubuntu.com/community/MakeALiveCD/DVD/BootableFlashFromHarddiskInstall
|
|
||||||
plus a lot of other info, like ubiquity and casper source code, and
|
plus a lot of other info, like ubiquity and casper source code, and
|
||||||
additions for making the resulting iso EFI bootable.
|
additions for making the resulting iso EFI bootable.
|
||||||
|
|
||||||
@@ -29,5 +28,6 @@ cleanup.sh
|
|||||||
|
|
||||||
|
|
||||||
SHORT VERSION:
|
SHORT VERSION:
|
||||||
|
sudo apt-get install squashfs-tools xorriso syslinux
|
||||||
time sudo sh -c "env BUILD_CONFIG=12.10 ./full-rebuild.sh"
|
time sudo sh -c "env BUILD_CONFIG=12.10 ./full-rebuild.sh"
|
||||||
time sudo sh -c "env BUILD_CONFIG=13.04 ./full-rebuild.sh"
|
time sudo sh -c "env BUILD_CONFIG=13.04 ./full-rebuild.sh"
|
||||||
|
15
TODO
15
TODO
@@ -1,15 +0,0 @@
|
|||||||
- Try other Ubuntu/Xubuntu versions
|
|
||||||
|
|
||||||
Problems with 3ce08771a631f9e373f65995fd2114a817326e98:
|
|
||||||
* Ubiquity chooser doesn't have nilmdb background --- skip it!
|
|
||||||
* Theme is still "Greybird" not "Clearlooks"
|
|
||||||
* Icons are still "elementary Xfce dark" not "elementary Xfce"
|
|
||||||
* Change xfdesktop background color to black
|
|
||||||
* Set default firefox homepage to http://nilmdb.com/
|
|
||||||
* /home/nilmdb should have /etc/skel stuff
|
|
||||||
* capture.sh should say skipping
|
|
||||||
* ubiquity still shows release notes?
|
|
||||||
* release notes need to exist
|
|
||||||
* in live CD, ssh_host_dsa_key is ba636e7440..
|
|
||||||
* quiet/splash removal failed --- preseed late_command didn't work
|
|
||||||
* build hybrid iso
|
|
@@ -7,5 +7,5 @@ sudo umount ${FS}/dev/pts || true
|
|||||||
sudo umount ${FS}/sys/kernel/security || true
|
sudo umount ${FS}/sys/kernel/security || true
|
||||||
sudo umount ${FS}/sys || true
|
sudo umount ${FS}/sys || true
|
||||||
sudo umount ${FS}/proc || true
|
sudo umount ${FS}/proc || true
|
||||||
sudo umount mnt || true
|
sudo umount ${MNT} || true
|
||||||
sudo rm --one-file-system -rf ${FS} ${ISO} ${MNT} ${DISK}
|
sudo rm --one-file-system -rf ${FS} ${ISO} ${MNT} ${DISK}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# output image
|
# output image
|
||||||
VERSION="12.10.1"
|
VERSION="12.10.2"
|
||||||
OUTPUT="nilmdbuntu-${VERSION}.iso"
|
OUTPUT="nilmdbuntu-${VERSION}.iso"
|
||||||
|
|
||||||
# original ISOs
|
# original ISOs
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# output image
|
# output image
|
||||||
VERSION="13.04.1"
|
VERSION="13.04.2"
|
||||||
OUTPUT="nilmdbuntu-${VERSION}.iso"
|
OUTPUT="nilmdbuntu-${VERSION}.iso"
|
||||||
|
|
||||||
# original ISOs
|
# original ISOs
|
||||||
|
17
config-13.10
Normal file
17
config-13.10
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# output image
|
||||||
|
VERSION="13.10.2"
|
||||||
|
OUTPUT="nilmdbuntu-${VERSION}.iso"
|
||||||
|
|
||||||
|
# original ISOs
|
||||||
|
ISONAME="xubuntu-13.10-desktop-amd64.iso"
|
||||||
|
ORIG="tmp-13.10/$ISONAME"
|
||||||
|
ORIGURL="http://cdimage.ubuntu.com/xubuntu/releases/13.10/release/$ISONAME"
|
||||||
|
|
||||||
|
# work directories, temporary qemu HD image
|
||||||
|
FS="tmp-13.10/fs"
|
||||||
|
ISO="tmp-13.10/iso"
|
||||||
|
MNT="tmp-13.10/mnt"
|
||||||
|
DISK="tmp-13.10/disk.img"
|
||||||
|
|
||||||
|
# local user
|
||||||
|
USER=jim:jim
|
@@ -24,6 +24,9 @@ export BUILD_SYSTEM="Ubuntu"
|
|||||||
export FLAVOUR="NilmDBuntu"
|
export FLAVOUR="NilmDBuntu"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# In 13.10, this is needed to upgrade the "whoopsie" package; bug #1272269
|
||||||
|
grep '13[.]10' /etc/issue && ln -sf /lib/init/upstart-job /etc/init.d/whoopsie
|
||||||
|
|
||||||
# Upgrade packages, remove old kernels
|
# Upgrade packages, remove old kernels
|
||||||
apt-get update
|
apt-get update
|
||||||
# in 13.04, doing upgrade & dist-upgrade together tries to install 2 kernels
|
# in 13.04, doing upgrade & dist-upgrade together tries to install 2 kernels
|
||||||
@@ -100,7 +103,11 @@ try_install \
|
|||||||
ipython \
|
ipython \
|
||||||
openvpn \
|
openvpn \
|
||||||
network-manager-openvpn-gnome \
|
network-manager-openvpn-gnome \
|
||||||
openssl
|
openssl \
|
||||||
|
tcpdump \
|
||||||
|
screen \
|
||||||
|
devscripts \
|
||||||
|
mailutils
|
||||||
|
|
||||||
# required
|
# required
|
||||||
apt-get -y install \
|
apt-get -y install \
|
||||||
@@ -125,11 +132,27 @@ import nilmrun.server
|
|||||||
application = nilmrun.server.wsgi_application("/nilmrun")
|
application = nilmrun.server.wsgi_application("/nilmrun")
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
#### Edit apache config
|
||||||
|
|
||||||
# Create apache config by hacking up the default one. Might be a better way
|
# Create apache config by hacking up the default one. Might be a better way
|
||||||
# to do this, and it'll probably break on apache 2.4, but...
|
# to do this, and it'll probably break on new versions, but...
|
||||||
DEF=/etc/apache2/sites-available/default
|
|
||||||
|
APACHE_VER=$(dpkg -s apache2 | grep ^Version | cut -d ' ' -f 2)
|
||||||
|
if dpkg --compare-versions $APACHE_VER ge 2.4 ; then
|
||||||
|
DEF=/etc/apache2/sites-available/000-default.conf
|
||||||
|
NEED_PERMISSIONS=1
|
||||||
|
else
|
||||||
|
DEF=/etc/apache2/sites-available/default
|
||||||
|
NEED_PERMISSIONS=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Cut out any existing NilmDB stuff
|
||||||
perl -ne 'print unless /## NilmDB start/../## NilmDB end/' $DEF > $DEF.orig
|
perl -ne 'print unless /## NilmDB start/../## NilmDB end/' $DEF > $DEF.orig
|
||||||
|
|
||||||
|
# Copy everything up to the first </VirtualHost> line
|
||||||
perl -ne 'print unless m-^[^#]*</VirtualHost>-..1' $DEF.orig > $DEF
|
perl -ne 'print unless m-^[^#]*</VirtualHost>-..1' $DEF.orig > $DEF
|
||||||
|
|
||||||
|
# Add the NilmDB config
|
||||||
cat >>$DEF <<"EOF"
|
cat >>$DEF <<"EOF"
|
||||||
## NilmDB start
|
## NilmDB start
|
||||||
WSGIScriptAlias /nilmdb /home/nilmdb/nilmdb.wsgi
|
WSGIScriptAlias /nilmdb /home/nilmdb/nilmdb.wsgi
|
||||||
@@ -145,10 +168,26 @@ cat >>$DEF <<"EOF"
|
|||||||
WSGIProcessGroup nilmrun-procgroup
|
WSGIProcessGroup nilmrun-procgroup
|
||||||
WSGIApplicationGroup nilmrun-appgroup
|
WSGIApplicationGroup nilmrun-appgroup
|
||||||
</Location>
|
</Location>
|
||||||
|
EOF
|
||||||
|
if [ $NEED_PERMISSIONS == 1 ] ; then
|
||||||
|
cat >>$DEF <<"EOF"
|
||||||
|
|
||||||
|
<Directory /home/nilmdb>
|
||||||
|
Options All
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
cat >>$DEF <<"EOF"
|
||||||
## NilmDB end
|
## NilmDB end
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# Copy everything including and after the first </VirtualHost> line
|
||||||
perl -ne 'print if m-^[^#]*</VirtualHost>-..1' $DEF.orig >> $DEF
|
perl -ne 'print if m-^[^#]*</VirtualHost>-..1' $DEF.orig >> $DEF
|
||||||
|
|
||||||
|
#### Done editing apache config
|
||||||
|
|
||||||
# Create nilmdb capture, processing, and cleanup files
|
# Create nilmdb capture, processing, and cleanup files
|
||||||
cat > /home/nilmdb/capture.sh <<"EOF"
|
cat > /home/nilmdb/capture.sh <<"EOF"
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
@@ -263,14 +302,18 @@ cp /usr/share/applications/exo-web-browser.desktop $DESKTOP || true
|
|||||||
chmod +x $DESKTOP/* # needs to be executable for 13.04+
|
chmod +x $DESKTOP/* # needs to be executable for 13.04+
|
||||||
|
|
||||||
# XFCE / theme customizations
|
# XFCE / theme customizations
|
||||||
if [ -d /usr/share/themes/Clearlooks ] && \
|
if [ -d /usr/share/themes/Clearlooks ] ; then
|
||||||
[ -d /usr/share/icons/elementary-xfce ] ; then
|
cat > /usr/share/gconf/defaults/88_nilmdbuntu-gtk-theme <<"EOF"
|
||||||
cat > /usr/share/gconf/defaults/88_nilmdbuntu-settings <<"EOF"
|
|
||||||
/desktop/gnome/interface/gtk_theme "Clearlooks"
|
/desktop/gnome/interface/gtk_theme "Clearlooks"
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
if [ -d /usr/share/icons/elementary-xfce ] ; then
|
||||||
|
cat > /usr/share/gconf/defaults/88_nilmdbuntu-icon-theme <<"EOF"
|
||||||
/desktop/gnome/interface/icon_theme "elementary-xfce"
|
/desktop/gnome/interface/icon_theme "elementary-xfce"
|
||||||
EOF
|
EOF
|
||||||
update-gconf-defaults
|
|
||||||
fi
|
fi
|
||||||
|
update-gconf-defaults
|
||||||
|
|
||||||
|
|
||||||
XML=/etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml
|
XML=/etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml
|
||||||
BG=/usr/share/xfce4/backdrops
|
BG=/usr/share/xfce4/backdrops
|
||||||
@@ -323,7 +366,7 @@ EOF
|
|||||||
sed -i -s -e 's/Greybird/Default/g' $XML/xfwm4.xml || true
|
sed -i -s -e 's/Greybird/Default/g' $XML/xfwm4.xml || true
|
||||||
sed -i -s -e 's/Greybird/Clearlooks/g' $XML/xsettings.xml || true
|
sed -i -s -e 's/Greybird/Clearlooks/g' $XML/xsettings.xml || true
|
||||||
sed -i -s -e \
|
sed -i -s -e \
|
||||||
's/elementary-xfce-dark/elementary-xfce/g' $XML/xsettings.xml || true
|
's/elementary-xfce-dark(er)?/elementary-xfce/g' $XML/xsettings.xml || true
|
||||||
|
|
||||||
# Firefox defaults
|
# Firefox defaults
|
||||||
cat >/etc/firefox/syspref.js <<"EOF"
|
cat >/etc/firefox/syspref.js <<"EOF"
|
||||||
|
8
enter.sh
8
enter.sh
@@ -27,6 +27,10 @@ run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
umount ${FS}/dev/pts || true
|
||||||
|
umount ${FS}/sys/kernel/security || true
|
||||||
|
umount ${FS}/sys || true
|
||||||
|
umount ${FS}/proc || true
|
||||||
mount -t proc none ${FS}/proc
|
mount -t proc none ${FS}/proc
|
||||||
mount -t sysfs none ${FS}/sys
|
mount -t sysfs none ${FS}/sys
|
||||||
mount -t devpts none ${FS}/dev/pts
|
mount -t devpts none ${FS}/dev/pts
|
||||||
@@ -34,9 +38,9 @@ mount -t devpts none ${FS}/dev/pts
|
|||||||
run "echo 'nameserver 8.8.8.8' > /etc/resolv.conf"
|
run "echo 'nameserver 8.8.8.8' > /etc/resolv.conf"
|
||||||
run "dbus-uuidgen > /var/lib/dbus/machine-id"
|
run "dbus-uuidgen > /var/lib/dbus/machine-id"
|
||||||
run "dpkg-divert --local --rename --add /sbin/initctl"
|
run "dpkg-divert --local --rename --add /sbin/initctl"
|
||||||
run "ln -s /bin/true /sbin/initctl"
|
run "ln -sf /bin/true /sbin/initctl"
|
||||||
run "dpkg-divert --local --rename --add /usr/sbin/update-grub"
|
run "dpkg-divert --local --rename --add /usr/sbin/update-grub"
|
||||||
run "ln -s /bin/true /usr/sbin/update-grub"
|
run "ln -sf /bin/true /usr/sbin/update-grub"
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
if [ -z "$1" ] ; then
|
if [ -z "$1" ] ; then
|
||||||
|
Reference in New Issue
Block a user