Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mika committed May 27, 2020
2 parents bcf2959 + 24f2452 commit 51f4b9d
Show file tree
Hide file tree
Showing 34 changed files with 1,419 additions and 2,080 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
manpages/po4a.cfg
manpages/es
manpages/fr
manpages/ja
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -32,13 +32,13 @@ test:
else \
echo "W: checkbashisms - command not found"; \
echo "I: checkbashisms can be obtained from: "; \
echo "I: http://git.debian.org/?p=devscripts/devscripts.git"; \
echo "I: https://salsa.debian.org/debian/devscripts.git"; \
echo "I: On Debian based systems, checkbashisms can be installed with:"; \
echo "I: apt-get install devscripts"; \
fi

build:
@echo "Nothing to build."
$(MAKE) -C $(CURDIR)/manpages

install:
# Installing components
Expand Down
8 changes: 4 additions & 4 deletions backend/initramfs-tools/live.hook
Expand Up @@ -242,11 +242,11 @@ fi

[ "${QUIET}" ] || echo -n " dns"

# /lib/libnss_dns.so.*:a DNS
# /lib/libnss_files.so.*: /etc/hosts and /etc/passwd
# /lib/libnss_compat.so.*: /etc/passwd
# libnss_dns.so.*: DNS
# libnss_files.so.*: /etc/hosts and /etc/passwd
# libnss_compat.so.*: /etc/passwd

for _SHLIB in $(find /lib/ -name 'libnss_dns.so.*' -o -name 'libnss_files.so.*')
for _SHLIB in $(find /lib /usr/lib -name 'libnss_dns.so.*' -o -name 'libnss_files.so.*')
do
copy_exec "${_SHLIB}"
done
Expand Down
2 changes: 1 addition & 1 deletion components/9990-cmdline-old
Expand Up @@ -216,7 +216,7 @@ Cmdline_old ()
;;

persistence-label=*)
custom_overlay_label="${_PARAMETER#persistence-label=*}"
custom_overlay_label=$(echo ${_PARAMETER#persistence-label=*} | sed -e 's/,/ /g')
;;

nopersistence)
Expand Down
51 changes: 37 additions & 14 deletions components/9990-main.sh
Expand Up @@ -33,11 +33,11 @@ Live ()
# Needed here too because some things (*cough* udev *cough*)
# changes the timeout

if [ ! -z "${NETBOOT}" ] || [ ! -z "${FETCH}" ] || [ ! -z "${HTTPFS}" ] || [ ! -z "${FTPFS}" ]
if [ -n "${NETBOOT}" ] || [ -n "${FETCH}" ] || [ -n "${HTTPFS}" ] || [ -n "${FTPFS}" ]
then
if do_netmount
then
livefs_root="${mountpoint}"
livefs_root="${mountpoint?}"
else
panic "Unable to find a live file system on the network"
fi
Expand All @@ -52,13 +52,22 @@ Live ()
else
if [ -x /usr/bin/memdiskfind ]
then
MEMDISK=$(/usr/bin/memdiskfind)

if [ $? -eq 0 ]
if MEMDISK=$(/usr/bin/memdiskfind)
then
# We found a memdisk, set up phram
modprobe phram phram=memdisk,${MEMDISK}
modprobe phram phram=memdisk,${MEMDISK}
# Sometimes "modprobe phram" can not successfully create /dev/mtd0.
# Have to try several times.
max_try=20
while [ ! -c /dev/mtd0 ] && [ "$max_try" -gt 0 ]; do
modprobe phram "phram=memdisk,${MEMDISK}"
sleep 0.2
if [ -c /dev/mtd0 ]; then
break
else
rmmod phram
fi
max_try=$((max_try - 1))
done

# Load mtdblock, the memdisk will be /dev/mtdblock0
modprobe mtdblock
Expand All @@ -77,7 +86,7 @@ Live ()
fi

sleep 1
i="$(($i + 1))"
i=$((i + 1))
done
fi
fi
Expand Down Expand Up @@ -121,10 +130,10 @@ Live ()

if [ -n "${MODULETORAMFILE}" ] || [ -n "${PLAIN_ROOT}" ]
then
setup_unionfs "${livefs_root}" "${rootmnt}"
setup_unionfs "${livefs_root}" "${rootmnt?}"
else
mac="$(get_mac)"
mac="$(echo ${mac} | sed 's/-//g')"
mac="$(echo "${mac}" | sed 's/-//g')"
mount_images_in_directory "${livefs_root}" "${rootmnt}" "${mac}"
fi

Expand Down Expand Up @@ -156,16 +165,30 @@ Live ()
fi
fi

if [ -f /etc/hostname ] && ! grep -E -q -v '^[[:space:]]*(#|$)' "${rootmnt}/etc/hostname"
then
log_begin_msg "Copying /etc/hostname to ${rootmnt}/etc/hostname"
cp -v /etc/hostname "${rootmnt}/etc/hostname"
log_end_msg
fi

if [ -f /etc/hosts ] && ! grep -E -q -v '^[[:space:]]*(#|$|(127.0.0.1|::1|ff02::[12])[[:space:]])' "${rootmnt}/etc/hosts"
then
log_begin_msg "Copying /etc/hosts to ${rootmnt}/etc/hosts"
cp -v /etc/hosts "${rootmnt}/etc/hosts"
log_end_msg
fi

if [ -L /root/etc/resolv.conf ] ; then
# assume we have resolvconf
DNSFILE="${rootmnt}/etc/resolvconf/resolv.conf.d/base"
else
DNSFILE="${rootmnt}/etc/resolv.conf"
fi
if [ -f /etc/resolv.conf ] && ! grep -E -q -v '^[[:space:]]*#|^[[:space:]]*$' ${DNSFILE}
if [ -f /etc/resolv.conf ] && ! grep -E -q -v '^[[:space:]]*(#|$)' "${DNSFILE}"
then
log_begin_msg "Copying /etc/resolv.conf to ${DNSFILE}"
cp -v /etc/resolv.conf ${DNSFILE}
cp -v /etc/resolv.conf "${DNSFILE}"
log_end_msg
fi

Expand All @@ -178,8 +201,8 @@ Live ()
# this includes code that checks what is mounted on /lib/live/mount/*
# (eg: grep /lib/live /proc/mount)
# XXX: to be removed before the bullseye release
mkdir -p ${rootmnt}/lib/live/mount
mount --rbind /run/live ${rootmnt}/lib/live/mount
mkdir -p "${rootmnt}/lib/live/mount"
mount --rbind /run/live "${rootmnt}/lib/live/mount"

Fstab

Expand Down
14 changes: 11 additions & 3 deletions components/9990-misc-helpers.sh
Expand Up @@ -495,6 +495,14 @@ is_supported_fs ()
fi

# Try to look if it is already supported by the kernel
# For ntfs, since user space program ntfs-3g will be used. Check ntfs-3g instead of kernel module.
if [ "${fstype}" = "ntfs" ]; then
if type ntfs-3g >/dev/null 2>&1; then
return 0
else
return 1
fi
fi
if grep -q ${fstype} /proc/filesystems
then
return 0
Expand Down Expand Up @@ -795,7 +803,7 @@ mount_persistence_media ()
then
mount_opts="ro,noatime"
fi
if mount -t "${fstype}" -o "${mount_opts}" "${device}" "${backing}" >/dev/null
if mount -t "${fstype}" -o "${mount_opts}" "${device}" "${backing}" >/dev/null 2>&1
then
echo ${backing}
return 0
Expand Down Expand Up @@ -1398,8 +1406,8 @@ do_union ()
# + a workdir to become mounted
# + workdir and upperdir to reside under the same mount
# + workdir and upperdir to be in separate directories
mkdir "${unionrw}/rw"
mkdir "${unionrw}/work"
mkdir -p "${unionrw}/rw"
mkdir -p "${unionrw}/work"
unionmountopts="-o noatime,lowerdir=${unionro},upperdir=${unionrw}/rw,workdir=${unionrw}/work"
;;
esac
Expand Down
17 changes: 16 additions & 1 deletion components/9990-networking.sh
Expand Up @@ -128,9 +128,17 @@ do_netsetup ()

if [ -n "${interface}" ]
then
# HWADDR used by do_iscsi from 9990-mount-iscsi.sh
# shellcheck disable=SC2034
HWADDR="$(cat "/sys/class/net/${interface}/address")"
fi

if [ ! -e "/etc/hostname" ] && [ -n "${HOSTNAME}" ]
then
echo "Creating /etc/hostname"
echo "${HOSTNAME}" > /etc/hostname
fi

# Only create /etc/hosts if FQDN is known (to let 'hostname -f' query
# this file). Otherwise DNS will be queried to determine the FQDN.
if [ ! -e "/etc/hosts" ] && [ -n "${DNSDOMAIN}" ]
Expand All @@ -154,7 +162,6 @@ EOF
if [ -n "${DNSDOMAIN}" ]
then
echo "domain ${DNSDOMAIN}" > /etc/resolv.conf
echo "search ${DNSDOMAIN}" >> /etc/resolv.conf
fi

for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1} ${DNSSERVERS}
Expand All @@ -164,6 +171,14 @@ EOF
echo "nameserver $i" >> /etc/resolv.conf
fi
done

if [ -n "${DOMAINSEARCH}" ]
then
echo "search ${DOMAINSEARCH}" >> /etc/resolv.conf
elif [ -n "${DNSDOMAIN}" ]
then
echo "search ${DNSDOMAIN}" >> /etc/resolv.conf
fi
fi

# Check if we have a network device at all
Expand Down
21 changes: 15 additions & 6 deletions components/9990-overlay.sh
Expand Up @@ -195,12 +195,15 @@ setup_unionfs ()
do
media="$(echo ${media} | tr ":" " ")"

case ${media} in
${custom_overlay_label}=*)
device="${media#*=}"
overlay_devices="${overlay_devices} ${device}"
;;
esac
for overlay_label in ${custom_overlay_label}
do
case ${media} in
${overlay_label}=*)
device="${media#*=}"
overlay_devices="${overlay_devices} ${device}"
;;
esac
done
done
fi
elif [ -n "${NFS_COW}" ] && [ -z "${NOPERSISTENCE}" ]
Expand Down Expand Up @@ -307,6 +310,12 @@ setup_unionfs ()
chmod 1777 "${rootmnt}"/tmp
fi

# Correct the permission of /var/tmp:
if [ -d "${rootmnt}/var/tmp" ]
then
chmod 1777 "${rootmnt}"/var/tmp
fi

# Adding custom persistence
if [ -n "${PERSISTENCE}" ] && [ -z "${NOPERSISTENCE}" ]
then
Expand Down
22 changes: 22 additions & 0 deletions debian/changelog
@@ -1,3 +1,25 @@
live-boot (1:20190614) unstable; urgency=medium

[ Roland Clobus ]
* The homepage is https://wiki.debian.org/DebianLive
* Used the same text for po4a as in live-manual.
* Updated URL to the homepage and manual.
* Fixed Lintian warning: manpage-section-mismatch
* Always rebuild po4a.cfg This is needed to ensure that new languages
will automatically be found
* New Build-Depends: po4a for the translation files
* Updated the translation files. The translators can now update their
translations.

[ Benjamin Drung ]
* Also search for libnss_*.so files in /usr/lib (Closes: #930419)

[ Luca Boccassi ]
* Set Rules-Requires-Root: no
* Set Standards-Version to 4.3.0

-- Luca Boccassi <bluca@debian.org> Fri, 14 Jun 2019 10:55:07 +0100

live-boot (1:20180603+grml.3) unstable; urgency=medium

* [d189b07] Ensure locating libnss* files doesn't fail on merged-usr
Expand Down
1 change: 0 additions & 1 deletion debian/compat

This file was deleted.

14 changes: 9 additions & 5 deletions debian/control
Expand Up @@ -2,11 +2,15 @@ Source: live-boot
Section: misc
Priority: optional
Maintainer: Grml Team <team@grml.org>
Uploaders: Michael Prokop <mika@grml.org>
Build-Depends:
debhelper (>= 10),
Standards-Version: 4.1.3
debhelper-compat (= 12),
po4a,
Standards-Version: 4.4.1
Rules-Requires-Root: no
Homepage: https://wiki.debian.org/DebianLive
Homepage: http://live.debian.net/devel/live-boot/
Vcs-Browser: http://git.grml.org/?p=live-boot-grml.git
Vcs-Browser: https://git.grml.org/?p=live-boot-grml.git
Vcs-Git: git://git.grml.org/live-boot-grml.git
Origin: Grml
Bugs: mailto:bugs@grml.org
Expand Down Expand Up @@ -48,7 +52,7 @@ Multi-Arch: foreign
Depends:
${misc:Depends},
Description: Live System Boot Components (documentation)
The Live Systems project maintains the components to build Debian based Live
The Debian Live project maintains the components to build Debian based Live
systems and the official Debian Live images themselves.
.
live-boot contains the components to configure a live system during the boot
Expand All @@ -74,7 +78,7 @@ Replaces:
Provides:
live-boot-backend,
Description: Live System Boot Components (initramfs-tools backend)
The Live Systems project maintains the components to build Debian based Live
The Debian Live project maintains the components to build Debian based Live
systems and the official Debian Live images themselves.
.
live-boot contains the components to configure a live system during the boot
Expand Down
5 changes: 3 additions & 2 deletions debian/copyright
@@ -1,9 +1,10 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: live-boot
Upstream-Contact: Live Systems Project <debian-live@lists.debian.org>
Upstream-Contact: Debian Live Project <debian-live@lists.debian.org>

Files: *
Copyright: 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
Copyright: 2016-2020 The Debian Live team
2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
2005-2008 Canonical Ltd. <http://www.cannonical.com/>
2008 Chris Lamb <chris@debian.org>
2006-2007 Marco Amadori <marco.amadori@gmail.com>
Expand Down
12 changes: 12 additions & 0 deletions debian/gitlab-ci.yml
@@ -0,0 +1,12 @@
image: registry.salsa.debian.org/salsa-ci-team/ci-image-git-buildpackage:latest

pages:
stage: deploy
artifacts:
paths:
- public
only:
- master
script:
- gitlab-ci-git-buildpackage-all
- gitlab-ci-aptly
2 changes: 1 addition & 1 deletion debian/live-boot-grml.bug-presubj
@@ -1,7 +1,7 @@
Before submitting a bug report against live-boot, please make sure
that you have read our guidelines for live systems bug reports:

http://live-systems.org/manual/
https://live-team.pages.debian.net/live-manual/html/live-manual/bugs.en.html

By providing the required information as outlined in the guidelines makes
sure that we can optimally reproduce and fix bugs, not doing so wastes a
Expand Down
4 changes: 2 additions & 2 deletions debian/rules
Expand Up @@ -13,5 +13,5 @@ override_dh_auto_install:
mkdir -p debian/live-boot-grml-initramfs-tools/usr/share
mv debian/tmp/usr/share/initramfs-tools debian/live-boot-grml-initramfs-tools/usr/share

override_dh_install:
dh_install --fail-missing
override_dh_missing:
dh_missing --fail-missing
10 changes: 5 additions & 5 deletions manpages/Makefile
Expand Up @@ -23,14 +23,12 @@ build: check po4a.cfg
@if [ ! -x "$$(which po4a 2>/dev/null)" ]; \
then \
echo "E: po4a - command not found"; \
echo "I: po4a can be obtained from:"; \
echo "I: http://po4a.alioth.debian.org/"; \
echo "I: On Debian based systems, po4a can be installed with:"; \
echo "I: apt-get install po4a"; \
echo "I: po4a can be obtained from https://po4a.org"; \
echo "I: On Debian based systems, po4a can be installed with 'apt-get install po4a'."; \
exit 1; \
fi

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

clean:
rm -rf $(LANGUAGES)
Expand All @@ -55,3 +53,5 @@ check:
fi

@echo " done!"

.PHONY: po4a.cfg

0 comments on commit 51f4b9d

Please sign in to comment.