[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#884355: marked as done (live-boot: Please support live-{top,premount,bottom} hooks)



Your message dated Wed, 28 Mar 2018 19:36:02 +0000
with message-id <E1f1Gra-000Cg8-Bm@fasolo.debian.org>
and subject line Bug#884355: fixed in live-boot 1:20180328
has caused the Debian Bug report #884355,
regarding live-boot: Please support live-{top,premount,bottom} hooks
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
884355: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884355
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: live-boot
Version: 1:20170623
Severity: wishlist
Tags: patch

Hi,

initramfs-tools support hooks for top, premount, bottom when booting
with boot=local or boot=nfs. Please add similar support to live-boot
when booting with boot=live. A patch (for git) is attached.

-- 
Benjamin Drung
System Developer
Debian & Ubuntu Developer

ProfitBricks GmbH
Greifswalder Str. 207
D - 10405 Berlin

Email: benjamin.drung@profitbricks.com
URL: https://www.profitbricks.de

Sitz der Gesellschaft: Berlin
Registergericht: Amtsgericht Charlottenburg, HRB 125506 B
Geschäftsführer: Achim Weiss, Matthias Steinberg
>From 11ccfa795851a5652a55fec37c059864c7951458 Mon Sep 17 00:00:00 2001
From: Benjamin Drung <benjamin.drung@profitbricks.com>
Date: Wed, 13 Dec 2017 18:40:37 +0100
Subject: [PATCH] Support live-{top,premount,bottom} hooks

initramfs-tools support hooks for top, premount, bottom when booting
with boot=local or boot=nfs. Add similar support to live-boot when
booting with boot=live.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
---
 backend/initramfs-tools/live.script | 56 +++++++++++++++++++++++++++++++++----
 components/9990-initramfs-tools.sh  | 22 +++++++++++++++
 2 files changed, 73 insertions(+), 5 deletions(-)

diff --git a/backend/initramfs-tools/live.script b/backend/initramfs-tools/live.script
index ff2915a..5bec741 100755
--- a/backend/initramfs-tools/live.script
+++ b/backend/initramfs-tools/live.script
@@ -1,13 +1,59 @@
-#!/bin/sh
-
-#set -e
+# Live system filesystem mounting			-*- shell-script -*-
 
 . /bin/live-boot
 
-. /scripts/functions
+live_top()
+{
+	if [ "${live_top_used}" != "yes" ]; then
+		[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/live-top"
+		run_scripts /scripts/live-top
+		[ "$quiet" != "y" ] && log_end_msg
+	fi
+	live_top_used=yes
+}
+
+live_premount()
+{
+	if [ "${live_premount_used}" != "yes" ]; then
+		[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/live-premount"
+		run_scripts /scripts/live-premount
+		[ "$quiet" != "y" ] && log_end_msg
+	fi
+	live_premount_used=yes
+}
+
+live_bottom()
+{
+	if [ "${live_premount_used}" = "yes" ] || [ "${live_top_used}" = "yes" ]; then
+		[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/live-bottom"
+		run_scripts /scripts/live-bottom
+		[ "$quiet" != "y" ] && log_end_msg
+	fi
+	live_premount_used=no
+	live_top_used=no
+}
+
 
-mountroot ()
+mountroot()
 {
 	# initramfs-tools entry point for live-boot is mountroot(); function
 	Live
 }
+
+mount_top()
+{
+	# Note, also called directly in case it's overridden.
+	live_top
+}
+
+mount_premount()
+{
+	# Note, also called directly in case it's overridden.
+	live_premount
+}
+
+mount_bottom()
+{
+	# Note, also called directly in case it's overridden.
+	live_bottom
+}
diff --git a/components/9990-initramfs-tools.sh b/components/9990-initramfs-tools.sh
index eb11d23..241c620 100755
--- a/components/9990-initramfs-tools.sh
+++ b/components/9990-initramfs-tools.sh
@@ -73,3 +73,25 @@ panic()
 	. /scripts/functions
 	panic "$@"
 }
+
+# Note: Other components source /scripts/functions before sourcing this file.
+# /scripts/functions overrides the mount_* functions (to no-ops). Thus fix
+# the mount_* options here again.
+
+mount_top()
+{
+	# Note, also called directly in case it's overridden.
+	live_top
+}
+
+mount_premount()
+{
+	# Note, also called directly in case it's overridden.
+	live_premount
+}
+
+mount_bottom()
+{
+	# Note, also called directly in case it's overridden.
+	live_bottom
+}
-- 
2.14.1


--- End Message ---
--- Begin Message ---
Source: live-boot
Source-Version: 1:20180328

We believe that the bug you reported is fixed in the latest version of
live-boot, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 884355@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Luca Boccassi <bluca@debian.org> (supplier of updated live-boot package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 28 Mar 2018 20:07:39 +0100
Source: live-boot
Binary: live-boot live-boot-doc live-boot-initramfs-tools
Architecture: source
Version: 1:20180328
Distribution: unstable
Urgency: low
Maintainer: Live Systems Maintainers <debian-live@lists.debian.org>
Changed-By: Luca Boccassi <bluca@debian.org>
Description:
 live-boot  - Live System Boot Components
 live-boot-doc - Live System Boot Components (documentation)
 live-boot-initramfs-tools - Live System Boot Components (initramfs-tools backend)
Closes: 856482 868559 877776 884355 884886 885453 885455 885466 886328 886337 892772
Changes:
 live-boot (1:20180328) unstable; urgency=low
 .
   [ Raphaël Hertzog ]
   * Fix read-only persistence mode with overlayfs. Closes: #877776
     Thanks to Ronny Standtke <ronny.standtke@fhnw.ch> for the patch.
   * Add a small warning in the long description that the
     package must not be installed on a regular system, but only in
     a live image. Closes: #884886
   * Strip comments from checksums files passed to "shaXsum -c"
     Thanks to Andreas Heinlein for the report (Closes: #856482)
 .
   [ Steve McIntyre ]
   * Repo moved to salsa
 .
   [ Benjamin Drung ]
   * Don't replace busybox's wget by the true wget.
     It was likely done for https support but since buster the busybox
     provided wget has https support too. We save a lot of space by
     doing so (8 Mb). (Closes: #885455)
   * Avoid double slashes in some paths (Closes: #885453)
   * Support setting upperdir tmpfs size with overlay-size boot parameter
     (Closes: #885466)
   * Simplify mount point handling by using /run/live instead of /lib/live/mount
     (Closes: #886328)
   * Add configuration variables to build a stripped down initrd
     (Closes: #886337)
 .
   [ Daniel Reichelt ]
   * Use klibc's mount again for fuse mounts (Closes: #868559)
 .
   [ raizo62 ]
   * Update DNSFILE even if DNSFILE contains only commented or empty lines
 .
   [ Sameer Agrawal ]
   * Fix ifconfig parsing (Closes: #892772)
 .
   [ Chas Williams ]
   * Add back persistence fsck option
   * Remove workaround for ipconfig issues
 .
   [ Benjamin Drung ]
   * Remove sourcing /scripts/functions in components
   * Support live-{top,premount,bottom} hooks (Closes: #884355)
 .
   [ Luca Boccassi ]
   * Add backward compatibility rbind mount /lib/live/mount -> /run/live.
     The paths used in the current released versions of live-boot are a
     form of public API, and existing applications and scripts might rely
     on them. Do a recursive bind mount of the new path on the previous one
     so that they do not break on upgrade (see #886328).
     This backward-compatible mount point will be deprecated and removed
     before the Bullseye (Debian 11) release. Users are recommended to start
     migrating to the new /run/live path as soon as possible.
 .
   [ Erik Ziegenbalg ]
   * fromiso: add support for local ISO (ONIE)
 .
   [ Luca Boccassi ]
   * Clarify FROMISO documentation in live-boot manpage
   * Use HTTPS in debian/copyright (policy 4.0.0).
   * Remove dead link to live-systems.org from debian/copyright.
   * Bump Standards-Version to 4.1.3, no changes.
   * Add myself to Uploaders.
Checksums-Sha1:
 3f5b3c5a5ad40b6a5d59b5595174ea234c5c0178 1548 live-boot_20180328.dsc
 c7251bc1398cea57cc3ce08759a8cfd08c87d602 101172 live-boot_20180328.tar.xz
 4d9ab1a3a5a8ce3cfeab09ea4acd0f3d7c2fb62a 6110 live-boot_20180328_source.buildinfo
Checksums-Sha256:
 a94801aa0bc428bf21c57ba382ab8e5a6e8a5128275ff925b389d65fc651a49c 1548 live-boot_20180328.dsc
 58acb3a961c40707350f7cd61e58f255d330f6dfdad9022b2962e4335a29c469 101172 live-boot_20180328.tar.xz
 232fa4dfc580417be8f267e4b1abe7f1046190c638ad1941ee6ba17cf1b2cfa4 6110 live-boot_20180328_source.buildinfo
Files:
 50529a169e238d221981166260b34fbb 1548 misc optional live-boot_20180328.dsc
 43184c037c144665bd3e96710850c0a5 101172 misc optional live-boot_20180328.tar.xz
 a1adbcdd7e789312055c0498aedc5fa1 6110 misc optional live-boot_20180328_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQFFBAEBCgAvFiEE6g0RLAGYhL9yp9G8SylmgFB4UWIFAlq76koRHGJsdWNhQGRl
Ymlhbi5vcmcACgkQSylmgFB4UWIwVQgAmIk7GLLWbSGkyCTfJUSNTEpLgHPY6SJv
0TlDP69ndXMNl8FxKBG9pUpByZ4sCmEtjkktV2s3pIHyG2YuhXeLXiZOo0BYUA/t
r10jnYDTfRn3qxHKtluEJgX2JIU4S1fEa5sWQ2TV9rTsihV8vpl4KvryQZmRW/Qu
OsB4j4N4tp0WYiEl8ZJFJdnXvYZhsq4a7XUESOkAqaUkvUbqwPVVuatIe/2m6c1P
u7Kj5qhIyQOM2oOVvG4YZnyJl5gKD6XcfZEmBBx37o0IXu6ZCRlju23uE8wus9sZ
dGJfSCZblItwRMfgC1IM3EfFYlV9rqdbQyQM/26eF6eC0bKuV96sjA==
=6rI8
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: