Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
git://anonscm.debian.org/debian-live/live-boot.git

Conflicts:
	components/9990-aaa-fixme.sh
  • Loading branch information
mika committed Jun 28, 2016
2 parents 1a226f4 + b98d289 commit 0ae40d8
Show file tree
Hide file tree
Showing 21 changed files with 77 additions and 105 deletions.
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

10 changes: 3 additions & 7 deletions backend/initramfs-tools/live.hook
Expand Up @@ -39,6 +39,9 @@ cp -a /bin/live-boot /lib/live/boot "${DESTDIR}/bin"
mkdir -p "${DESTDIR}/lib/live"
cp -a /lib/live/boot "${DESTDIR}/lib/live"

mkdir -p "${DESTDIR}/etc/live"
cp -a /etc/live/boot.conf /etc/live/boot "${DESTDIR}/etc/live"

# klibc dependencies
for FILE in /lib/libacl* /lib/libblkid* /lib/libuuid* /lib/libdevmapper* /lib/libattr*
do
Expand Down Expand Up @@ -236,11 +239,4 @@ done
#mkdir -p "${DESTDIR}/etc"
#cp -p /etc/nsswitch.conf "${DESTDIR}/etc"

# vlan support
if [ -x /sbin/vconfig ]
then
copy_exec /sbin/vconfig
manual_add_modules 8021q
fi

[ "${QUIET}" ] || echo .
11 changes: 11 additions & 0 deletions components/0001-init-vars.sh
@@ -0,0 +1,11 @@
#!/bin/sh

mountpoint="/live/medium"
alt_mountpoint="/media"
LIVE_MEDIA_PATH="live"
HOSTNAME="host"
custom_overlay_label="persistence"
persistence_list="persistence.conf"

mkdir -p "${mountpoint}"
mkdir -p /var/lib/live/boot
2 changes: 1 addition & 1 deletion components/0020-read-only
Expand Up @@ -54,7 +54,7 @@ Read_only ()
esac
done

if grep -qe persistence /proc/cmdline
if grep -qw persistence /proc/cmdline
then
printf " * Persistence mode enabled, searching for persistency related devices to unlock\n" >/dev/console

Expand Down
30 changes: 0 additions & 30 deletions components/9990-aaa-fixme.sh

This file was deleted.

7 changes: 0 additions & 7 deletions components/9990-cmdline-old
Expand Up @@ -17,19 +17,12 @@ Cmdline_old ()
BOOTIF=*)
BOOTIF="${_PARAMETER#BOOTIF=}"
;;

dns=*)
DNS=${_PARAMETER#dns=}
DNSSERVERS=$(echo ${DNS} | sed 's/,/ /g')
export DNSSERVERS
unset DNS
;;

bootid=*)
BOOTID="${_PARAMETER#bootid=}"
export BOOTID
;;

dhcp)
# Force dhcp even while netbooting
# Use for debugging in case somebody works on fixing dhclient
Expand Down
39 changes: 19 additions & 20 deletions components/9990-misc-helpers.sh
Expand Up @@ -478,7 +478,7 @@ is_supported_fs ()

get_fstype ()
{
/sbin/blkid -s TYPE -o value $1 2>/dev/null
blkid -s TYPE -o value $1 2>/dev/null
}

where_is_mounted ()
Expand Down Expand Up @@ -536,7 +536,7 @@ base_path ()
{
testpath="${1}"
mounts="$(awk '{print $2}' /proc/mounts)"
testpath="$(busybox realpath ${testpath})"
testpath="$(realpath ${testpath})"

while true
do
Expand Down Expand Up @@ -654,7 +654,7 @@ setup_loop ()
echo "${passphrase}" > /tmp/passphrase
unset passphrase
exec 9</tmp/passphrase
/sbin/losetup ${options} -e "${encryption}" -p 9 "${dev}" "${fspath}"
losetup ${options} -e "${encryption}" -p 9 "${dev}" "${fspath}"
error=${?}
exec 9<&-
rm -f /tmp/passphrase
Expand Down Expand Up @@ -761,7 +761,7 @@ mount_persistence_media ()
fi
elif [ "${backing}" != "${old_backing}" ]
then
if ! mount --move ${old_backing} ${backing} >/dev/null
if ! mount -o move ${old_backing} ${backing} >/dev/null
then
[ -z "${probe}" ] && log_warning_msg "Failed to move persistence media ${device}"
rmdir "${backing}"
Expand Down Expand Up @@ -801,7 +801,7 @@ close_persistence_media ()

if is_active_luks_mapping ${device}
then
/sbin/cryptsetup luksClose ${device}
cryptsetup luksClose ${device}
fi
}

Expand All @@ -815,7 +815,7 @@ open_luks_device ()
opts="${opts} --readonly"
fi

if /sbin/cryptsetup status "${name}" >/dev/null 2>&1
if cryptsetup status "${name}" >/dev/null 2>&1
then
re="^[[:space:]]*device:[[:space:]]*\([^[:space:]]*\)$"
opened_dev=$(cryptsetup status ${name} 2>/dev/null | grep "${re}" | sed "s|${re}|\1|")
Expand Down Expand Up @@ -856,7 +856,7 @@ open_luks_device ()
while true
do
$cryptkeyscript "$cryptkeyprompt" | \
/sbin/cryptsetup -T 1 luksOpen ${dev} ${name} ${opts}
cryptsetup -T 1 luksOpen ${dev} ${name} ${opts}

if [ 0 -eq ${?} ]
then
Expand Down Expand Up @@ -897,14 +897,14 @@ get_gpt_name ()
{
local dev
dev="${1}"
/sbin/blkid -s PART_ENTRY_NAME -p -o value ${dev} 2>/dev/null
blkid -s PART_ENTRY_NAME -p -o value ${dev} 2>/dev/null
}

is_gpt_device ()
{
local dev
dev="${1}"
[ "$(/sbin/blkid -s PART_ENTRY_SCHEME -p -o value ${dev} 2>/dev/null)" = "gpt" ]
[ "$(blkid -s PART_ENTRY_SCHEME -p -o value ${dev} 2>/dev/null)" = "gpt" ]
}

probe_for_gpt_name ()
Expand Down Expand Up @@ -944,7 +944,7 @@ probe_for_fs_label ()

for label in ${overlays}
do
if [ "$(/sbin/blkid -s LABEL -o value $dev 2>/dev/null)" = "${label}" ]
if [ "$(blkid -s LABEL -o value $dev 2>/dev/null)" = "${label}" ]
then
echo "${label}=${dev}"
fi
Expand Down Expand Up @@ -1137,7 +1137,7 @@ find_persistence_media ()
# Close luks device if it isn't used
if [ -z "${result}" ] && [ -n "${luks_device}" ] && is_active_luks_mapping "${luks_device}"
then
/sbin/cryptsetup luksClose "${luks_device}"
cryptsetup luksClose "${luks_device}"
fi
done

Expand Down Expand Up @@ -1168,13 +1168,13 @@ get_mac ()
is_luks_partition ()
{
device="${1}"
/sbin/cryptsetup isLuks "${device}" 1>/dev/null 2>&1
cryptsetup isLuks "${device}" 1>/dev/null 2>&1
}

is_active_luks_mapping ()
{
device="${1}"
/sbin/cryptsetup status "${device}" 1>/dev/null 2>&1
cryptsetup status "${device}" 1>/dev/null 2>&1
}

get_luks_backing_device ()
Expand Down Expand Up @@ -1333,15 +1333,14 @@ do_union ()
;;

overlay)
# XXX: can multiple unionro be used? (overlay only handles two dirs, but perhaps they can be chained?)
# XXX: and can unionro be optional? i.e. can overlay skip lowerdir?
if echo ${unionro} | grep -q " "
then
panic "Multiple lower filesystems are currently not supported with overlay (unionro = ${unionro})."
elif [ -z "${unionro}" ]
# XXX: can unionro be optional? i.e. can overlay skip lowerdir?
if [ -z "${unionro}" ]
then
panic "overlay needs at least one lower filesystem (read-only branch)."
fi
# Multiple lower layers can now be given using the the colon (":") as a
# separator character between the directory names.
unionro="$(echo ${unionro} | sed -e 's| |:|g')"
# overlayfs requires:
# + a workdir to become mounted
# + workdir and upperdir to reside under the same mount
Expand Down Expand Up @@ -1614,7 +1613,7 @@ activate_custom_mounts ()
do_union ${dest} ${source} ${rootfs_dest_backing}
elif [ -n "${opt_bind}" ] && [ -z "${PERSISTENCE_READONLY}" ]
then
mount --bind "${source}" "${dest}"
mount -o bind "${source}" "${dest}"
elif [ -n "${opt_bind}" -o -n "${opt_union}" ] && [ -n "${PERSISTENCE_READONLY}" ]
then
# bind-mount and union mount are handled the same
Expand Down
3 changes: 3 additions & 0 deletions components/9990-mount-http.sh
Expand Up @@ -25,6 +25,9 @@ do_httpmount ()
mount -t ramfs ram "${mountpoint}"
mkdir -p "${dest}"
fi
case "${url}" in
*:///*) url="${url%%:///*}://${ROOTSERVER}/${url##*:///}" ;;
esac
if [ "${webfile}" = "FETCH" ]
then
case "$url" in
Expand Down
2 changes: 1 addition & 1 deletion components/9990-overlay.sh
Expand Up @@ -274,7 +274,7 @@ setup_unionfs ()
panic "only one RO file system supported with exposedroot: ${rootfslist}"
fi

mount --bind ${rootfs} ${rootmnt} || \
mount -o bind ${rootfs} ${rootmnt} || \
panic "bind mount of ${rootfs} failed"

if [ -z "${SKIP_UNION_MOUNTS}" ]
Expand Down
21 changes: 13 additions & 8 deletions debian/changelog
@@ -1,11 +1,16 @@
live-boot (1:20151213+grml.1) UNRELEASED; urgency=medium

* Merge latest Debian changes.
* [aea94ce] add gbp.conf
* [9f0266a] fix "unexpected operator" error when stopping live-boot
* [83abdd6] Revert "restore support for old persistence media"

-- Evgeni Golov <evgeni@grml.org> Wed, 06 Jan 2016 18:07:09 +0100
live-boot (1:20160511) unstable; urgency=medium

* Team upload.
* Update build system to rely on "dpkg-parsechangelog -S Version" instead
of outdated VERSION file.
* No longer modify PATH to point to /root and thus stop using executables
from /root. Closes: #823069
* Drop debian/source/local-options as the only option it contained was
not applicable to 3.0 (native) source format.
* Drop debian/source/options and dh_builddeb override as XZ compression is
the default now.

-- Raphaël Hertzog <hertzog@debian.org> Wed, 11 May 2016 11:40:37 +0200

live-boot (1:20151213) unstable; urgency=medium

Expand Down
3 changes: 0 additions & 3 deletions debian/rules
Expand Up @@ -24,9 +24,6 @@ override_dh_auto_install:
chmod a+rx debian/live-boot-grml-initramfs-tools/usr/share/initramfs-tools/scripts/*
chmod a+rx debian/live-boot-grml-initramfs-tools/usr/share/initramfs-tools/hooks/*

override_dh_builddeb:
dh_builddeb -- -Zxz

override_dh_install:
dh_install --fail-missing

Expand Down
1 change: 0 additions & 1 deletion debian/source/options

This file was deleted.

6 changes: 3 additions & 3 deletions frontend/live-boot
Expand Up @@ -11,10 +11,10 @@ do
fi
done

for _COMONENT in /lib/live/boot/????-*
for _COMPONENT in /lib/live/boot/????-*
do
if [ -e "${_COMONENT}" ]
if [ -e "${_COMPONENT}" ]
then
. ${_COMONENT}
. ${_COMPONENT}
fi
done
2 changes: 1 addition & 1 deletion manpages/Makefile
Expand Up @@ -30,7 +30,7 @@ build: check po4a.cfg
exit 1; \
fi

po4a --copyright-holder "Live Systems Project" --keep 0 --package-name live-boot --package-version $(shell cat ../VERSION) po4a.cfg
po4a --copyright-holder "Live Systems Project" --keep 0 --package-name live-boot --package-version $(shell dpkg-parsechangelog -S Version) po4a.cfg

clean:
rm -rf $(LANGUAGES)
Expand Down
2 changes: 1 addition & 1 deletion manpages/bin/update-version.sh
Expand Up @@ -11,7 +11,7 @@
set -e

PROGRAM="LIVE\\\-BOOT"
VERSION="$(cat ../VERSION)"
VERSION="$(dpkg-parsechangelog -S Version)"

DATE="$(LC_ALL=C date +%Y\\\\-%m\\\\-%d)"

Expand Down
4 changes: 2 additions & 2 deletions manpages/en/live-boot.7
Expand Up @@ -132,8 +132,8 @@ If you boot with the normal quiet parameter, live\-boot hides most messages of i
Adding this parameter, live\-boot will try to copy the entire read\-only media to the specified device before mounting the root filesystem. It probably needs a lot of free space. Subsequent boots should then skip this step and just specify the "live\-media=DEVICE" boot parameter with the same DEVICE used this time.
.IP "\fBtoram\fR" 4
Adding this parameter, live\-boot will try to copy the whole read\-only media to the computer's RAM before mounting the root filesystem. This could need a lot of ram, according to the space used by the read\-only media.
.IP "\fBunion\fR=aufs|overlay\fR" 4
By default, live\-boot uses aufs. With this parameter, you can switch to overlay.
.IP "\fBunion\fR=overlay|aufs\fR" 4
By default, live\-boot uses overlay. With this parameter, you can switch to aufs.
.\" FIXME

.\" FIXME
Expand Down
6 changes: 3 additions & 3 deletions manpages/es/live-boot.es.7
Expand Up @@ -248,10 +248,10 @@ Al añadir este parámetro, live\-boot trata de copiar los medios de sólo
lectura enteros en la memoria RAM del ordenador antes de montar el sistema
de ficheros raíz. Para esto puede ser necesaria mucha memoria RAM, según el
espacio utilizado por los medios de sólo lectura.
.IP \fBunion\fP=aufs|overlay 4
.IP \fBunion\fP=overlay|aufs 4
.\" FIXME
Por defecto, live\-boot usa aufs. Con este parámetro, se puede cambiar a
overlay.
Por defecto, live\-boot usa overlay. Con este parámetro, se puede cambiar a
aufs.

.\" FIXME
.SH "FICHEROS (antiguos)"
Expand Down
4 changes: 2 additions & 2 deletions manpages/ja/live-boot.ja.7
Expand Up @@ -183,9 +183,9 @@ live\-boot
.IP \fBtoram\fP 4
このパラメータを追加すると、live\-boot はルートファイルシステムをマウントする前に読み取り専用メディア全体をそのコンピュータの RAM
にコピーしようとします。その読み取り専用メディアで利用している容量により、これには多くの RAM が必要となるかもしれません。
.IP \fBunion\fP=aufs|overlay 4
.IP \fBunion\fP=overlay|aufs 4
.\" FIXME
デフォルトで live\-boot は aufs を利用します。このパラメータにより overlay に切り替えることができます。
デフォルトで live\-boot は overlay を利用します。このパラメータにより aufs に切り替えることができます。

.\" FIXME
.SH "ファイル (古い情報)"
Expand Down
12 changes: 6 additions & 6 deletions manpages/po/es/live-boot.7.po
Expand Up @@ -901,18 +901,18 @@ msgstr ""
#. type: IP
#: en/live-boot.7:135
#, no-wrap
msgid "B<union>=aufs|overlay"
msgstr "B<union>=aufs|overlay"
msgid "B<union>=overlay|aufs"
msgstr "B<union>=overlay|aufs"

#. FIXME
#. type: Plain text
#: en/live-boot.7:138
msgid ""
"By default, live-boot uses aufs. With this parameter, you can switch to "
"overlay."
"By default, live-boot uses overlay. With this parameter, you can switch to "
"aufs."
msgstr ""
"Por defecto, live-boot usa aufs. Con este parámetro, se puede cambiar a "
"overlay."
"Por defecto, live-boot usa overlay. Con este parámetro, se puede cambiar a "
"aufs."

#. FIXME
#. type: SH
Expand Down

0 comments on commit 0ae40d8

Please sign in to comment.