Skip to content

Commit

Permalink
Merge remote-tracking branch 'deb/debian' into debian
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Hofstaedtler committed Dec 6, 2011
2 parents 3bacf06 + 38fd15a commit ef7e2f7
Show file tree
Hide file tree
Showing 19 changed files with 1,140 additions and 588 deletions.
32 changes: 16 additions & 16 deletions Makefile
Expand Up @@ -78,26 +78,26 @@ install:
uninstall:
# Uninstalling executables
rm -f $(DESTDIR)/sbin/live-snapshot $(DESTDIR)/sbin/live-swapfile
rmdir --ignore-fail-on-non-empty $(DESTDIR)/sbin || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/sbin > /dev/null 2>&1 || true

rm -rf $(DESTDIR)/usr/share/live-boot

rm -f $(DESTDIR)/usr/share/initramfs-tools/hooks/live
rm -rf $(DESTDIR)/usr/share/initramfs-tools/scripts/live*
rm -f $(DESTDIR)/usr/share/initramfs-tools/scripts/local-top/live

rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools/hooks || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools/scripts/local-top || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools/scripts || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools/hooks > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools/scripts/local-top > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools/scripts > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools > /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 docs
rm -rf $(DESTDIR)/usr/share/doc/live-boot
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/doc || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr || true
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/*; \
Expand All @@ -117,15 +117,15 @@ uninstall:

for SECTION in $(ls manpages/en/* | awk -F. '{ print $2 }'); \
do \
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/man/man$${SECTION} || true; \
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/man/*/man$${SECTION} || true; \
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 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr || true
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) || true
rmdir --ignore-fail-on-non-empty $(DESTDIR) > /dev/null 2>&1 || true

clean:
@echo "Nothing to clean."
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
3.0~a19
3.0~a24-1
24 changes: 18 additions & 6 deletions bin/live-snapshot
Expand Up @@ -409,6 +409,13 @@ Do_filelist ()
Do_snapshot ()
{
TMP_FILELIST=$(mktemp -p "${SAFE_TMPDIR}" "${TMP_FILELIST}.XXXXXX")
if [ -e "${EXCLUDE_LIST}" ]
then
# Create a TMP filelist removing empty lines (grep -f does not like them)
# and comments (for speedup and LST)
TMP_EXCLUDE_LIST=$(mktemp -p "${SAFE_TMPDIR}" "${PROGRAM}_excludelist.XXXXXX")
grep -v '^#.*$' "${EXCLUDE_LIST}" | grep -v '^ *$' > "${TMP_EXCLUDE_LIST}"
fi

case "${SNAP_TYPE}" in
squashfs)
Expand All @@ -420,7 +427,7 @@ Do_snapshot ()
if [ -e "${EXCLUDE_LIST}" ]
then
# Add explicitly excluded files
grep -v '^#.*$' "${EXCLUDE_LIST}" | grep -v '^ *$' >> "${TMP_FILELIST}"
cat "${TMP_EXCLUDE_LIST}" >> "${TMP_FILELIST}"
fi

cd "${OLDPWD}"
Expand All @@ -439,12 +446,13 @@ Do_snapshot ()
cd "${WORKING_DIR}"
if [ -e "${EXCLUDE_LIST}" ]
then

# Convert \0 to \n and tag existing (rare but possible) \n in filenames,
# this to let grep -F -v do a proper work in filtering out
cat "${TMP_FILELIST}" | \
tr '\n' '\1' | \
tr '\0' '\n' | \
grep -F -v -f "${EXCLUDE_LIST}" | \
grep -F -v -f "${TMP_EXCLUDE_LIST}" | \
tr '\n' '\0' | \
tr '\1' '\n' | \
eval $COPY_CMD || exit 1
Expand All @@ -468,10 +476,14 @@ Do_snapshot ()
;;
esac

if [ -f "${TMP_FILELIST}" ]
then
rm -f "${TMP_FILELIST}"
fi
# Remove temporary file lists
for filelist in "${TMP_FILELIST}" "${TMP_EXCLUDE_LIST}"
do
if [ -f "${filelist}" ]
then
rm -f "${filelist}"
fi
done
}

Clean ()
Expand Down
106 changes: 106 additions & 0 deletions debian/changelog
@@ -1,3 +1,109 @@
live-boot (3.0~a24-1) unstable; urgency=low

* Removing quotes from udev path_id command to actually execute the
command.

-- Daniel Baumann <daniel@debian.org> Sun, 04 Dec 2011 09:58:23 +0100

live-boot (3.0~a23-1) unstable; urgency=low

[ Tails developers ]
* Enabling whiteouts support for aufs.

[ Daniel Baumann ]
* Update udevs path_id changes as of version 174, thanks to Baurzhan
Muftakhidinov <baurthefirst@gmail.com> for spotting it.

[ Tails developers ]
* Adding persistent-encryption={none|luks}.
* Making persistent-encryption=luks strict.
* Making sure dm-crypt is loaded when dealing with LUKS devices.
* Adding persistent-storage=TYPE...
* Removing now obsolete persistent=* arguments.
* Adding persistent-method=METHOD...
* Fixing an incorrectly redirected newline.
* Clarifying what happens when you don't retry decrypting a device.
* Refactoring device scanning in find_{cow_device,files}.
* Making use of is_supported_fs in find_cow_devices (like in
find_files).
* Refactoring overlay and snapshot scanning code.
* Fixing a "sh: bad number" when $offset is not passed to
setup_loop().
* Disabling persistent-encryption=luks if dependencies are
unavailable.
* Adding persistent-read-only boot parameter.
* Changing persistent-encryption to accept a list TYPE... instead.
* Updating live-boot man page for persistent-encryption.
* Updating live-boot man page for persistent-storage.
* Updating live-boot man page for persistent-method.
* Updating and rewording live-boot man page for the persistent option.
* Making persistent-read-only work for home-rw overlays.
* Making persistent-read-only work for live-rw overlays.
* Updating live-boot man page for persistent-read-only.
* Adding workaround for a busybox bug with grep -w.

-- Daniel Baumann <daniel@debian.org> Mon, 28 Nov 2011 18:26:11 +0100

live-boot (3.0~a22-1) unstable; urgency=low

[ Daniel Baumann ]
* Using compression level 9 also for binary packages.
* Updating matching in is_nice_device to, amongst others, match for
virtio devices.
* Include overlayfs modules in initramfs if existing.

[ Marco Amadori ]
* Fix live-snapshot exclude.list handling (Closes: #610337)

[ Daniel Baumann ]
* Sorting overrides in rules alphabetically.

-- Daniel Baumann <daniel@debian.org> Fri, 04 Nov 2011 11:37:28 +0100

live-boot (3.0~a21-1) unstable; urgency=low

[ Daniel Baumann ]
* Silencing rmdir calls in makefile.
* Printing out a warning message in initramfs-tools hook if backend is
installed but no live-boot package, exiting early and not breaking
update-initramfs (Closes: #639884).

[ Tails developers ]
* Fixing cache_path: cache non-executable libs dependencies as well.
* Fixing cache_path: taking into account the three forms of ldd output
lines.
* Adding a white_listed_devices parameter to find_cow_device and
find_files.
* Factorizing loops on removable/non-removable devices.
* Adding support for persistent-media={removable,removable-usb}.
* Silencing umount in case live/image was unmounted already, extracted
from a patch by Michael Schierl <schierlm@gmx.de>.
* Erroring out in case a "wrong" filesystem was chosen.

[ Daniel Baumann ]
* Using /usr/share/live-boot instead of unreliable
/usr/share/doc/live-boot in validateroot bootscript, stripped live
systems may or may not carry /usr/share/doc.

-- Daniel Baumann <daniel@debian.org> Thu, 08 Sep 2011 21:06:28 +0200

live-boot (3.0~a20-1) unstable; urgency=low

[ Daniel Baumann ]
* Updating section for live-boot-doc.

[ Ben Armstrong ]
* Cross-referencing lb_config --bootappend-live.

[ Daniel Baumann ]
* Correcting bootappend-live reference in live-boot manpage.
* Applying patch from grml to update forgotten use of live.log with
live-boot.log.
* Applying reformated patch from Ulrich Dangel <mru@grml.org> to add
support for lvm and md devices.

-- Daniel Baumann <daniel@debian.org> Thu, 04 Aug 2011 21:20:47 +0200

live-boot (3.0~a19-1) unstable; urgency=low

* Correct rmdir call in top-level Makefiles uninstall target to not
Expand Down
1 change: 1 addition & 0 deletions debian/control
Expand Up @@ -22,6 +22,7 @@ Description: Debian Live - System Boot Scripts
as live-boot-initramfs-tools.

Package: live-boot-doc
Section: doc
Architecture: all
Depends: ${misc:Depends}
Conflicts: live-boot (<< 3.0~a18~)
Expand Down
29 changes: 21 additions & 8 deletions debian/live-boot.init
Expand Up @@ -47,15 +47,28 @@ cache_path()
find "${path}" -type f | xargs cat > /dev/null 2>&1
elif [ -f "${path}" ]
then
if [ -x "${path}" ]
if file -L "${path}" | grep -q 'dynamically linked'
then
if file -L "${path}" | grep -q 'dynamically linked'
then
for lib in $(ldd "${path}" | awk '{ print $3 }')
do
cache_path "${lib}"
done
fi
# ldd output can be of three forms:
# 1. linux-vdso.so.1 => (0x00007fffe3fb4000)
# This is a virtual, kernel shared library and we want to skip it
# 2. libc.so.6 => /lib/libc.so.6 (0x00007f5e9dc0c000)
# We want to cache the third word.
# 3. /lib64/ld-linux-x86-64.so.2 (0x00007f5e9df8b000)
# We want to cache the first word.
ldd "${path}" | while read line
do
if echo "$line" | grep -qs ' => '
then
continue
elif echo "$line" | grep -qs ' => '
then
lib=$(echo "${line}" | awk '{ print $3 }')
else
lib=$(echo "${line}" | awk '{ print $1 }')
fi
cache_path "${lib}"
done
fi

cat "${path}" >/dev/null 2>&1
Expand Down
7 changes: 5 additions & 2 deletions debian/rules
Expand Up @@ -13,8 +13,11 @@ override_dh_auto_install:
mkdir -p debian/live-boot-initramfs-tools/usr/share
mv debian/tmp/usr/share/initramfs-tools debian/live-boot-initramfs-tools/usr/share

override_dh_installinit:
dh_installinit -p live-boot --no-restart-on-upgrade --no-start --update-rcd-params='start 89 0 6 .'
override_dh_builddeb:
dh_builddeb -- -Zgzip -z9

override_dh_install:
dh_install --fail-missing

override_dh_installinit:
dh_installinit -p live-boot --no-restart-on-upgrade --no-start --update-rcd-params='start 89 0 6 .'
10 changes: 9 additions & 1 deletion hooks/live
Expand Up @@ -42,6 +42,13 @@ fi

# Handling live-boot

if [ ! -e /usr/share/live-boot ]
then
echo "W: live-boot-initramfs-tools (backend) installed without live-boot,"
echo "W: this initramfs will *NOT* have live support."
exit 0
fi

[ "${QUIET}" ] || echo -n " "core
# Configuration
if [ -e /usr/share/live-boot/languagelist ]
Expand Down Expand Up @@ -134,8 +141,9 @@ manual_add_modules squashfs
manual_add_modules sqlzma
manual_add_modules unlzma

# Filesystem: aufs/unionfs
# Filesystem: aufs/overlayfs/unionfs
manual_add_modules aufs
manual_add_modules overlayfs
manual_add_modules unionfs

# Filesystem: unionfs-fuse
Expand Down
57 changes: 41 additions & 16 deletions manpages/de/live-boot.de.7
Expand Up @@ -3,7 +3,7 @@
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH LIVE\-BOOT 7 13.07.2011 3.0~a19 "Debian Live Projekt"
.TH LIVE\-BOOT 7 04.12.2011 3.0~a24\-1 "Debian Live Projekt"

.SH NAME
\fBlive\-boot\fP \- System Boot Skripte
Expand All @@ -27,6 +27,9 @@ aufs, for Debian like systems to boot from.
.SH KONFIGURATION
\fBlive\-boot\fP kann durch Boot Parameter oder durch Konfigurationsdateien
konfiguriert werden.
.PP
To configure the live\-boot parameters used by default in a live image, see
the \-\-bootappend\-live option in the \fIlb_config\fP(1) manual page.

.SS "Kernel Parameter"
\fBlive\-boot\fP ist nur dann aktiv, wenn 'boot=live' als Kernel Parameter
Expand Down Expand Up @@ -169,25 +172,47 @@ default of mount applies (currently 50% of available RAM). Note that this
option has no currently no effect when booting with toram.
.IP \fBswapon\fP 4
This parameter enables usage of local swap partitions.
.IP \fBpersistent\fP[={nofiles|cryptsetup}] 4
live\-boot will look for persistent and snapshot partitions or files labeled
"live\-rw", "home\-rw", and files called "live\-sn*", "home\-sn*" and will try
to, in order: mount as /cow the first, mount the second in /home, and just
copy the contents of the latter in appropriate locations
(snapshots). Snapshots will be tried to be updated on reboot/shutdown. Look
at live\-snapshot(1) for more informations.
.br
If "nofiles" is specified, only filesystems with matching labels will be
searched; no filesystems will be traversed looking for archives or image
files. This results in shorter boot times.
.br
If "cryptsetup" is specified, filesystems stored on Luks\-encrypted devices
will be considered as well as others when searching for a persistence
filesystem; the user will be prompted for any needed decryption passphrase.
.IP \fBpersistent\fP 4
live\-boot will probe filesystems for persistent media. These can either be
the filesystems themselves, if labeled correctly, or image/archive files, if
named correctly. Overlays are labeled/named either "live\-rw" or "home\-rw"
and will be mounted on / or /home, respectively; snapshots are labeled/named
either "live\-sn" or "home\-sn" and will be extracted into / or /home,
respectively (see live\-snapshot(1) for more information). Overlays are
mounted before snapshots are extracted, and for both overlays and snapshots,
"live\-*" are handled before "home\-*". Overlay image files and snapshot
archive files have extensions which determines their filesystem or archive
type, e.g. "live\-rw.ext3" and "\home\-sn.squashfs".
.IP "\fBpersistent\-encryption\fP=\fITYPE1\fP,\fITYPE2\fP ... \fITYPEn\fP" 4
This option determines which types of encryption that we allow to be used
when probing devices for persistent media. If "none" is in the list, we
allow unencrypted media; if "luks" is in the list, we allow LUKS\-encrypted
media. Whenever a device containing encrypted media is probed the user will
be prompted for the passphrase. The default value is "none".
.IP \fBpersistent\-media\fP={\fIremovable\fP|\fIremovable\-usb\fP} 4
If you specify the keyword 'removable', live\-boot will try to find
persistent and snapshot partitions on removable media only. Note that if you
want to further restrict the media to usb mass storage only, you can use the
\&'removable\-usb' keyword.
.IP "\fBpersistent\-method\fP=\fITYPE1\fP,\fITYPE2\fP ... \fITYPEn\fP" 4
This option determines which types of persistent media we allow. If
"overlay" is in the list, we consider overlays (i.e. "live\-rw" and
"home\-rw"); if "snapshot" is in the list, we consider snapshots
(i.e. "live\-sn" and "home\-sn"). The default is "overlay,snapshot".
.IP \fBpersistent\-path\fP=\fIPATH\fP 4
live\-boot will look for persistency files in the root directory of a
partition, with this parameter, the path can be configured so that you can
have multiple directories on the same partition to store persistency files.
.IP \fBpersistent\-read\-only\fP 4
Filesystem changes are not saved back to persistent media. In particular,
overlays and netboot NFS mounts are mounted read\-only, and snapshots are not
resynced on shutdown.
.IP "\fBpersistent\-storage\fP=\fITYPE1\fP,\fITYPE2\fP ... \fITYPEn\fP" 4
This option determines which types of persistent storage to consider when
probing for persistent media. If "filesystem" is in the list, filesystems
with matching labels will be used; if "file" is in the list, all filesystems
will be probed for archives and image files with matching filenames. The
default is "file,filesystem".
.IP \fBpersistent\-subtext\fP=\fISUFFIX\fP 4
Add a suffix when searching for the image filenames or partition labels to
use for the above mentioned persistent feature, the SUFFIX will be added
Expand Down

0 comments on commit ef7e2f7

Please sign in to comment.