Commit a67c66b4 authored by EclipseSpark's avatar EclipseSpark

update sources and fix boot problems

parent 36615b52
......@@ -52,15 +52,14 @@ install:
mkdir -p $(DESTDIR)/etc/init.d
cp backend/sysvinit/live-config.init $(DESTDIR)/etc/init.d/live-config
mkdir -p $(DESTDIR)/lib/systemd/system
mkdir -p $(DESTDIR)/lib/systemd/system $(DESTDIR)/lib/systemd/system-generators
cp backend/systemd/live-config.systemd $(DESTDIR)/lib/systemd/system/live-config.service
cp backend/systemd/live-config-getty-generator $(DESTDIR)/lib/systemd/system-generators/
# Installing frontend
mkdir -p $(DESTDIR)/bin
cp frontend/* $(DESTDIR)/bin
# Installing components
mkdir -p $(DESTDIR)/lib/live/config
# Installing frontend and components
mkdir -p $(DESTDIR)/bin $(DESTDIR)/lib/live/config
cp frontend/live-* $(DESTDIR)/bin
cp frontend/init-config.sh $(DESTDIR)/lib/live/
cp components/* $(DESTDIR)/lib/live/config
mkdir -p $(DESTDIR)/var/lib/live/config
......@@ -89,69 +88,6 @@ install:
done; \
done
uninstall:
# Uninstalling backend
rm -f $(DESTDIR)/etc/init.d/live
rm -f $(DESTDIR)/etc/init.d/live-config
rmdir --ignore-fail-on-non-empty $(DESTDIR)/etc/init.d > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/etc > /dev/null 2>&1 || true
rm -f $(DESTDIR)/etc/init/live-config.conf
rmdir --ignore-fail-on-non-empty $(DESTDIR)/etc/init > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/etc > /dev/null 2>&1 || true
rm -f $(DESTDIR)/lib/systemd/system/live-config.service
rmdir --ignore-fail-on-non-empty $(DESTDIR)/lib/systemd/system > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/lib/systemd > /dev/null 2>&1 || true
# Uninstalling components
rm -rf $(DESTDIR)/lib/live/config
rmdir --ignore-fail-on-non-empty $(DESTDIR)/lib/live > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/lib > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/var/lib/live/config > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/var/lib/live > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/var/lib > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/var > /dev/null 2>&1 || true
# Uninstalling shared data
rm -rf $(DESTDIR)/usr/share/live/config
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/live
# Uninstalling docs
rm -rf $(DESTDIR)/usr/share/doc/live-config
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/doc > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr > /dev/null 2>&1 || true
# Uninstalling manpages
for MANPAGE in manpages/en/*; \
do \
SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$2 }')"; \
rm -f $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${MANPAGE} .en.$${SECTION}).$${SECTION}; \
done
for LANGUAGE in $(LANGUAGES); \
do \
for MANPAGE in manpages/$${LANGUAGE}/*; \
do \
SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$3 }')"; \
rm -f $(DESTDIR)/usr/share/man/$${LANGUAGE}/man$${SECTION}/$$(basename $${MANPAGE} .$${LANGUAGE}.$${SECTION}).$${SECTION}; \
done; \
done
for SECTION in $(ls manpages/en/* | awk -F. '{ print $2 }'); \
do \
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/man/man$${SECTION} > /dev/null 2>&1 || true; \
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/man/*/man$${SECTION} > /dev/null 2>&1 || true; \
done
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/man > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR) > /dev/null 2>&1 || true
clean:
@echo "Nothing to clean."
......
......@@ -2,18 +2,22 @@
## live-config(7) - System Configuration Components
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
## Copyright (C) 2016 Raphael Hertzog <hertzog@debian.org>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
set -e
#set -e
SYSTEMD_DIR=$1
. /lib/live/init-config.sh
Cmdline ()
{
# Reading kernel command line
for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
for _PARAMETER in $(cat /proc/cmdline)
do
case "${_PARAMETER}" in
live-config.debug|debug)
......@@ -37,6 +41,12 @@ Cmdline ()
Init ()
{
# Do nothing if not booted in live mode
if ! grep -q "boot=live" /proc/cmdline
then
exit 0
fi
# Disables both console and graphical autologin.
case "${LIVE_CONFIG_NOAUTOLOGIN}" in
true)
......@@ -51,14 +61,11 @@ Init ()
;;
esac
# Checking if package is installed or already configured
if [ ! -e /var/lib/dpkg/info/systemd.list ] || \
[ -e /var/lib/live/config/systemd ]
# Check if configuration already happened
if [ -e $SYSTEMD_DIR/getty@tty1.service.d/live-config_autologin.conf ]
then
exit 0
fi
echo -n " systemd"
}
Config ()
......@@ -68,33 +75,27 @@ Config ()
then
for NUMBER in $(seq 1 6)
do
mkdir -p /etc/systemd/system/getty@tty${NUMBER}.service.d
GETTY_SERVICE_D=$SYSTEMD_DIR/getty@tty${NUMBER}.service.d
CONF=$GETTY_SERVICE_D/live-config_autologin.conf
mkdir -p $GETTY_SERVICE_D
cat > /etc/systemd/system/getty@tty${NUMBER}.service.d/live-config_autologin.conf << EOF
cat > $CONF << EOF
[Service]
Type=idle
ExecStart=
ExecStart=-/sbin/agetty --autologin ${LIVE_USERNAME} --noclear %I \$TERM
EOF
case "${LIVE_CONFIG_DEBUG}" in
true)
echo "TTYVTDisallocate=no" >> /etc/systemd/system/getty@tty${NUMBER}.service.d/live-config_autologin.conf
;;
esac
done
for NUMBER in $(seq 1 6)
do
systemctl --no-block daemon-reload
systemctl --no-block restart getty@tty${NUMBER}.service
if [ "${LIVE_CONFIG_DEBUG}" = "true" ]
then
echo "TTYVTDisallocate=no" >> $CONF
fi
done
fi
# Creating state file
touch /var/lib/live/config/systemd
}
Cmdline
Init
Config
exit 0
......@@ -10,6 +10,7 @@
Description=live-config contains the components that configure a live system during the boot process (late userspace).
Documentation=man:live-config
Before=basic.target udev.service
After=local-fs.target
DefaultDependencies=no
ConditionPathExists=/bin/live-config
ConditionKernelCommandLine=boot=live
......@@ -18,3 +19,6 @@ ConditionKernelCommandLine=boot=live
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/live-config
[Install]
WantedBy=basic.target
......@@ -67,13 +67,16 @@ Config ()
# Default password is: live
# passwords can be generated with 'echo "live" | mkpasswd -s',
# a blank password is 'U6aMy0wojraho'.
_PASSWORD="8Ab05sVQ4LLps"
_PASSWORD="di91MHzj1bgoY"
_USER="parrot"
_USERNAME="Parrot OS"
_GROUPS="audio cdrom dip floppy video plugdev netdev powerdev scanner bluetooth debian-tor sudo"
cat > /tmp/live-config.cfg << EOF
live-debconfig live-debconfig/passwd/shadow boolean on
#live-debconfig live-debconfig/passwd/root-password password
#live-debconfig live-debconfig/passwd/root-password-again password
live-debconfig live-debconfig/passwd/root-password-crypted string *
live-debconfig live-debconfig/passwd/root-password-crypted string ${_PASSWORD}
live-debconfig live-debconfig/passwd/user-name string ${LIVE_USERNAME}
live-debconfig live-debconfig/passwd/user-fullname string ${LIVE_USER_FULLNAME}
#live-debconfig live-debconfig/passwd/user-password password
......
......@@ -64,14 +64,17 @@ Config ()
;;
esac
# Default password is: toor
# Default password is: live
# passwords can be generated with 'echo "live" | mkpasswd -s',
# a blank password is 'U6aMy0wojraho'.
_PASSWORD="X014elvznJq7E"
_PASSWORD="di91MHzj1bgoY"
_USER="parrot"
_USERNAME="Parrot OS"
_GROUPS="audio cdrom dip floppy video plugdev netdev powerdev scanner bluetooth debian-tor sudo"
cat > /tmp/live-config.cfg << EOF
user-setup passwd/make-user boolean true
user-setup passwd/root-password-crypted string *
user-setup passwd/root-password-crypted string ${_PASSWORD}
user-setup passwd/user-password-crypted string ${_PASSWORD}
user-setup passwd/user-default-groups string ${LIVE_USER_DEFAULT_GROUPS}
user-setup passwd/user-fullname string ${LIVE_USER_FULLNAME}
......
......@@ -47,6 +47,7 @@ Config ()
fi
echo "${_AREA}/${_ZONE}" > /etc/timezone
rm -f /etc/localtime
dpkg-reconfigure -f noninteractive -p critical tzdata
# Creating state file
......
#!/bin/sh
## live-config(7) - System Configuration Components
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
#set -e
Cmdline ()
{
# Reading kernel command line
for _PARAMETER in ${LIVE_CONFIG_CMDLINE}
do
case "${_PARAMETER}" in
live-config.username=*|username=*)
LIVE_USERNAME="${_PARAMETER#*username=}"
;;
esac
done
}
Init ()
{
# Checking if package is installed or already configured
if [ ! -e /var/lib/dpkg/info/mate-screensaver.list ] || \
[ -e /var/lib/live/config/mate-screensaver ]
then
exit 0
fi
echo -n " mate-screensaver"
}
Config ()
{
# Disabling to lock the screen when the screensaver goes active.
sudo -u "${LIVE_USERNAME}" dbus-launch --exit-with-session dconf write /org/mate/desktop/screensaver/lock-enabled false
sudo -u "${LIVE_USERNAME}" dbus-launch --exit-with-session dconf write /org/mate/desktop/lockdown/disable-lock-screen true
# Creating state file
touch /var/lib/live/config/mate-screensaver
}
Cmdline
Init
Config
......@@ -57,6 +57,7 @@ EOF
cat > /etc/adjtime << EOF
0.0 0 0.0
0
LOCAL
EOF
;;
......
live-config (5.20160601+parrot1) testing; urgency=medium
* Fix live-config-update support for parrot
-- Lorenzo "Palinuro" Faletra <eclipse@parrotsec.org> Wed, 01 Jun 2016 12:47:34 +0200
live-config (5.20160601+parrot0) testing; urgency=medium
* Update for Parrot Security
-- Lorenzo "Palinuro" Faletra <eclipse@parrotsec.org> Wed, 01 Jun 2016 01:24:56 +0200
live-config (5.20160608+0parrot0) testing; urgency=medium
* Add Parrot exception
* Import into Parrot
-- Lorenzo "Palinuro" Faletra <eclipse@parrotsec.org> Wed, 15 Jun 2016 16:36:48 +0200
live-config (5.20160608) unstable; urgency=medium
* Team upload.
* Replace components/0170-systemd with a systemd generator so that
we don't reload systemd in the middle of the boot sequence. This
really fixes the boot delay experienced with systemd 230.
* Improve ordering of live-config.service so that it runs after the
local filesystems have been mounted.
* Rely on dh_systemd_enable to enable the service instead of shipping
a basic.target.wants/live-config.service symlink in the package.
-- Raphaël Hertzog <hertzog@debian.org> Wed, 08 Jun 2016 12:38:58 +0200
live-config (5.20160607) unstable; urgency=medium
* Team upload.
* No longer manually start the getty@* services. There is systemd-logind
already taking care of this at runtime when the user switches to the
corresponding VT. Furthermore systemd-logind is smarter since it will
avoid running it on an already used VT (such as vt1 which is nowadays
used by gdm3). This also gets rid of the undesirable boot delay that
was likely introduced by one of the above conflicts.
* Make live-config-systemd the default backend.
* Properly handle hwclock set to local time. Closes: #824197
Thanks to Tom Jampen <tom@cryptography.ch> for the patch.
* Fix timezone configuration by dropping /etc/localtime so that
tzdata config script is forced to recreate it from /etc/timezone.
Closes: #816201 Thanks to Gregory DAVID <groolot@groolot.net> for
the analysis.
* Also look for live/config.conf in /lib/live/mount/persistence/*/
Closes: #817831 Thanks to Gregory DAVID <groolot@groolot.net>
for the patch.
* Automatically export variables set in live-config configuration
files so that components inherit from them. Closes: #799359
Thanks to Lukas Schwaighofer <lukas@schwaighofer.name> for the patch.
* Drop override and options for XZ compression, it has been the default for
a while.
* Bump Standards-Version to 3.9.8.
-- Raphaël Hertzog <hertzog@debian.org> Tue, 07 Jun 2016 16:30:13 +0200
live-config (5.20151121) unstable; urgency=medium
......
Source: live-config
Maintainer: Lorenzo "Palinuro" Faletra <palinuro@frozenbox.org>
Uploaders: Lorenzo "Palinuro" Faletra <palinuro@frozenbox.org>
Maintainer: Live Systems Maintainers <debian-live@lists.debian.org>
Uploaders: Iain R. Learmonth <irl@debian.org>
Section: misc
Priority: optional
Build-Depends: debhelper (>= 9),
......@@ -13,7 +13,7 @@ Homepage: https://debian-live.alioth.debian.org/live-config/
Package: live-config
Architecture: all
Depends: live-config-sysvinit | live-config-backend,
Depends: live-config-systemd | live-config-backend,
${misc:Depends}
Recommends: iproute2 | iproute,
keyboard-configuration,
......@@ -32,7 +32,7 @@ Description: Live System Configuration Components
process (late userspace).
.
In addition to live-config, a backend for an init system is required, such as
live-config-sysvinit.
live-config-systemd.
Package: live-config-doc
Architecture: all
......
live-config
live-config-doc
live-config-systemd
live-config-sysvinit
live-config-doc_5.20160608+0parrot0_all.deb doc optional
live-config-systemd_5.20160608+0parrot0_all.deb misc optional
live-config-sysvinit_5.20160608+0parrot0_all.deb misc optional
live-config_5.20160608+0parrot0_all.deb misc optional
dh_update_autotools_config
dh_auto_configure
dh_auto_build
dh_auto_test
dh_prep
override_dh_auto_install dh_auto_install
dh_auto_install
override_dh_install dh_install
dh_install
dh_installdocs
dh_installchangelogs
dh_installman
dh_systemd_enable
dh_installinit
dh_systemd_start
dh_bugfiles
dh_lintian
dh_perl
dh_link
dh_strip_nondeterminism
override_dh_compress dh_compress
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dh_builddeb
dh_builddeb
dh_builddeb
dh_builddeb
misc:Depends=
misc:Pre-Depends=
Package: live-config-doc
Source: live-config
Version: 5.20160608+0parrot0
Architecture: all
Maintainer: Live Systems Maintainers <debian-live@lists.debian.org>
Installed-Size: 92
Section: doc
Priority: optional
Homepage: https://debian-live.alioth.debian.org/live-config/
Description: Live System Configuration Components (documentation)
live-config contains the components that configure a live system during the
boot process (late userspace).
.
This package contains the documentation.
01a4df467588a84aff7dc46da923a4a7 usr/share/doc/live-config-doc/changelog.gz
3d0fd70880de9f00bbb19097d2351278 usr/share/doc/live-config-doc/copyright
91ba49a06dff602a7a5f349f4edc76d7 usr/share/doc/live-config/examples/README
bc8aec1cf6f2a88e77c56adae6905bea usr/share/doc/live-config/examples/hooks/cat
cc168ce6fe5437339a999ebb3a31fd66 usr/share/doc/live-config/examples/hooks/passwd
c624edba42eb6beee59754ef2cd04b43 usr/share/doc/live-config/examples/hooks/rm
faaac9be1dcb7925f2298cf7e1af9783 usr/share/doc/live-config/examples/hooks/sh
cfee1c5f182039ad9acddf62b601cf60 usr/share/doc/live-config/examples/hooks/vi
5f5b417a8986333e7ad27187319f141c usr/share/doc/live-config/examples/live-config-foobar/components/9000-foobar
523cf1f8c534a96bb96b6efb8f660531 usr/share/doc/live-config/examples/live-config-foobar/configs/foobar.conf
9a63c5e10ab0adc67bf930666b168176 usr/share/doc/live-config/examples/live-config-foobar/debian/changelog
7c5aba41f53293b712fd86d08ed5b36e usr/share/doc/live-config/examples/live-config-foobar/debian/compat
770709edbacc22da8de4f9f5c1051735 usr/share/doc/live-config/examples/live-config-foobar/debian/control
e7357345ec2ec158bcd2a5ae811d2b5f usr/share/doc/live-config/examples/live-config-foobar/debian/copyright
70b555440f067d2263c230b05eec4f7c usr/share/doc/live-config/examples/live-config-foobar/debian/install
2545b533cd2d844597f6a64aa8d6aed2 usr/share/doc/live-config/examples/live-config-foobar/debian/rules
c5fc031a250b2d76fe051ac3621620ab usr/share/doc/live-config/examples/live-config-foobar/debian/source/format
e3070cf11448e1e3cb5859679566c507 usr/share/doc/live-config/examples/live-config-foobar/debian/source/options
edaa83d22b89375aa14919892d7feb78 usr/share/man/es/man7/live-config.7.gz
324686490a7535b47f7962513c64388f usr/share/man/fr/man7/live-config.7.gz
3352ddd0937a5adc8626fac119310013 usr/share/man/it/man7/live-config.7.gz
ad4454f084b876805d8f37ee3e834aa4 usr/share/man/ja/man7/live-config.7.gz
c48114ae8aa1eb6805226f24dbdb92ab usr/share/man/man7/live-config.7.gz
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: live-config
Upstream-Contact: Live Systems Project <debian-live@lists.debian.org>
Source: http://live-systems.org/archive/packages/live-config/
Files: *
Copyright: 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
License: GPL-3+
License: GPL-3+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
The complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-3 file.
live-config-foobar Example
--------------------------
Best practise for downstream projects and derivatives is to ship their custom
live-config components in an own debian package.
The following live-config-foobar example package should be used as a starting
point. The following things should minimally be changed:
* Replace any mentioning of 'Joe Doe' with your own name.
* Replace any mentioning of 'example.org' with your own domain name.
* Replace any mentioning of 'foobar', 'Foobar' and 'FOOBAR' with the name of
your custom componentsor project name.
-- Daniel Baumann <mail@daniel-baumann.ch> Wed, 01 Jan 2014 00:00:00 +0100
#!/bin/sh
echo
echo "live-config hook: cat"
_FILENAME=""
while [ "${_FILENAME}" != q ]
do
echo
echo -n "Enter filename [q for quit]: "
read _FILENAME
if [ -n "${_FILENAME}" ]
then
echo
echo "Begin: ${_FILENAME}"
echo "--------------------------------------------------------------------------------"
cat "${_FILENAME}"
echo "--------------------------------------------------------------------------------"
echo "End: ${_FILENAME}"
fi
done
#!/bin/sh
echo
echo "live-config hook: passwd"
_USERNAME=""
while [ "${_USERNAME}" != q ]
do
echo
echo -n "Enter username [q for quit]: "
read _USERNAME
_USERNAME="${_USERNAME:-${LIVE_USERNAME}}"
case "${_USERNAME}" in
root)
passwd
;;
*)
if [ -n "${_USERNAME}" ]
then
echo
passwd "${_USERNAME}"
fi
;;
esac
done
#!/bin/sh
echo
echo "live-config hook: rm"
_FILENAME=""
while [ "${_FILENAME}" != q ]
do
echo
echo -n "Enter filename [q for quit]: "
read _FILENAME
if [ -n "${_FILENAME}" ]
then
rm -rf "${_FILENAME}"
fi
done
#!/bin/sh
echo
echo "live-config hook: sh"
echo
echo "Starting shell [logout for quit]: "
sh
#!/bin/sh
echo
echo "live-config hook: vi"
_FILENAME=""
while [ "${_FILENAME}" != q ]
do
echo
echo -n "Enter filename [q for quit]: "