Commit cd190b82 authored by intrigeri's avatar intrigeri

Merge branch 'stable' into...

Merge branch 'stable' into wip/bugfix/17784-make-MAC-spoofing-failure-msgs-more-useful-and-resilient
parents 3b0d13c9 43c60c05
...@@ -155,7 +155,7 @@ if [ -d "$WORKAROUNDS_SRC" ]; then ...@@ -155,7 +155,7 @@ if [ -d "$WORKAROUNDS_SRC" ]; then
fi fi
echo "I: Building ISO image ${BUILD_ISO_FILENAME}..." echo "I: Building ISO image ${BUILD_ISO_FILENAME}..."
time lb build noauto ${@} time lb build noauto "${@}"
[ -e binary.iso ] || fatal "lb build failed ($?)." [ -e binary.iso ] || fatal "lb build failed ($?)."
echo "I: ISO image was successfully created" echo "I: ISO image was successfully created"
......
...@@ -10,7 +10,7 @@ for dir in chroot/{dev/pts,proc,sys,var/lib/dpkg} ; do ...@@ -10,7 +10,7 @@ for dir in chroot/{dev/pts,proc,sys,var/lib/dpkg} ; do
fi fi
done done
lb clean noauto ${@} lb clean noauto "${@}"
# rm -f build-*.log # rm -f build-*.log
......
...@@ -91,7 +91,7 @@ export LB_BOOTSTRAP_INCLUDE="gnupg" ...@@ -91,7 +91,7 @@ export LB_BOOTSTRAP_INCLUDE="gnupg"
RUN_LB_CONFIG="lb config noauto" RUN_LB_CONFIG="lb config noauto"
# init config/ with defaults for the target distribution # init config/ with defaults for the target distribution
$RUN_LB_CONFIG --distribution buster ${@} $RUN_LB_CONFIG --distribution buster "${@}"
# set up everything for time-based snapshots: # set up everything for time-based snapshots:
if [ -n "${APT_SNAPSHOTS_SERIALS:-}" ]; then if [ -n "${APT_SNAPSHOTS_SERIALS:-}" ]; then
...@@ -159,7 +159,7 @@ $RUN_LB_CONFIG \ ...@@ -159,7 +159,7 @@ $RUN_LB_CONFIG \
--syslinux-splash data/splash.png \ --syslinux-splash data/splash.png \
--syslinux-timeout 4 \ --syslinux-timeout 4 \
--initramfs=live-boot \ --initramfs=live-boot \
${@} "${@}"
install -d config/chroot_local-includes/etc/amnesia/ install -d config/chroot_local-includes/etc/amnesia/
......
...@@ -16,9 +16,14 @@ output_apt_binary_source() { ...@@ -16,9 +16,14 @@ output_apt_binary_source() {
} }
output_overlay_apt_binary_sources() { output_overlay_apt_binary_sources() {
for suite in $(ls config/APT_overlays.d) ; do cd config/APT_overlays.d/
for suite in * ; do
# handle the case when no APT overlay is enabled
[[ -e "$suite" ]] || break
output_apt_binary_source "$suite" output_apt_binary_source "$suite"
done done
cd ../../
} }
### Sanity checks ### Sanity checks
......
# shellcheck shell=bash
# This library is meant to be used in bash, with "set -e" and "set -u". # This library is meant to be used in bash, with "set -e" and "set -u".
BASE_BRANCHES="stable testing devel" BASE_BRANCHES="stable testing devel"
......
...@@ -18,7 +18,8 @@ ensure_hook_dependency_is_installed dkms ...@@ -18,7 +18,8 @@ ensure_hook_dependency_is_installed dkms
ensure_hook_dependency_is_installed \ ensure_hook_dependency_is_installed \
virtualbox-guest-dkms virtualbox-guest-dkms
for log in $(ls /var/lib/dkms/*/*/build/make.log); do for log in /var/lib/dkms/*/*/build/make.log; do
[ -e "$log" ] || break # handle the case when no file matched the glob
echo "---- $log" echo "---- $log"
cat "$log" cat "$log"
done done
......
...@@ -6,5 +6,5 @@ RUN_AS_USER=tails-persistence-setup ...@@ -6,5 +6,5 @@ RUN_AS_USER=tails-persistence-setup
cd / cd /
xhost +SI:localuser:"$RUN_AS_USER" xhost +SI:localuser:"$RUN_AS_USER"
sudo -u "$RUN_AS_USER" /usr/bin/tails-persistence-setup --step delete $@ sudo -u "$RUN_AS_USER" /usr/bin/tails-persistence-setup --step delete "$@"
xhost -SI:localuser:"$RUN_AS_USER" xhost -SI:localuser:"$RUN_AS_USER"
...@@ -6,5 +6,5 @@ RUN_AS_USER=tails-persistence-setup ...@@ -6,5 +6,5 @@ RUN_AS_USER=tails-persistence-setup
cd / cd /
xhost +SI:localuser:"$RUN_AS_USER" xhost +SI:localuser:"$RUN_AS_USER"
sudo -u "$RUN_AS_USER" /usr/bin/tails-persistence-setup $@ sudo -u "$RUN_AS_USER" /usr/bin/tails-persistence-setup "$@"
xhost -SI:localuser:"$RUN_AS_USER" xhost -SI:localuser:"$RUN_AS_USER"
# shellcheck shell=sh
GNOME_ENV_VARS=" GNOME_ENV_VARS="
DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_ADDRESS
DISPLAY DISPLAY
......
...@@ -56,7 +56,7 @@ get_name_of_nic() { ...@@ -56,7 +56,7 @@ get_name_of_nic() {
mod_rev_dep_aux() { mod_rev_dep_aux() {
local mod local mod
local rev_deps local rev_deps
for mod in ${@}; do for mod in "${@}"; do
if echo ${MOD_REV_DEP_VISITED} | grep -qw ${mod}; then if echo ${MOD_REV_DEP_VISITED} | grep -qw ${mod}; then
continue continue
fi fi
......
# shellcheck shell=sh
# This shell library is meant to be used with `set -e` and `set -u`. # This shell library is meant to be used with `set -e` and `set -u`.
po_languages () { po_languages () {
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
error () error ()
{ {
echo "error: ${@}" >&2 echo "error: ${*}" >&2
exit 1 exit 1
} }
warning () warning ()
{ {
echo "warning: ${@}" >&2 echo "warning: ${*}" >&2
} }
# import Cmdline_old() # import Cmdline_old()
...@@ -131,13 +131,13 @@ migrate_persistence_preset() ...@@ -131,13 +131,13 @@ migrate_persistence_preset()
# We override live-boot's logging facilities to get more useful error messages # We override live-boot's logging facilities to get more useful error messages
log_warning_msg () log_warning_msg ()
{ {
warning ${@} warning "${@}"
} }
# We override live-boot's panic() since it does a lot of crazy stuff # We override live-boot's panic() since it does a lot of crazy stuff
panic () panic ()
{ {
error ${@} error "${@}"
} }
list_gpt_volumes () list_gpt_volumes ()
...@@ -567,7 +567,7 @@ main () ...@@ -567,7 +567,7 @@ main ()
list_gpt_volumes ${labels} list_gpt_volumes ${labels}
;; ;;
activate|close) activate|close)
if ! echo ${@} | grep -qe "[^[:space:]]" if ! echo "${@}" | grep -qe "[^[:space:]]"
then then
error "you must specify at least one volume" error "you must specify at least one volume"
fi fi
...@@ -582,4 +582,4 @@ main () ...@@ -582,4 +582,4 @@ main ()
esac esac
} }
main ${@} main "${@}"
tails (4.9) UNRELEASED; urgency=medium
* Dummy entry for next release.
-- anonym <anonym@riseup.net> Wed, 01 Jul 2020 11:05:21 +0200
tails (4.8) unstable; urgency=medium tails (4.8) unstable; urgency=medium
* Major changes * Major changes
......
...@@ -28,7 +28,7 @@ fi ...@@ -28,7 +28,7 @@ fi
### helper functions ### helper functions
fatal () { fatal () {
echo "Fatal: $@" >&2 echo "Fatal: $*" >&2
exit 2 exit 2
} }
...@@ -56,7 +56,7 @@ export DEBEMAIL="${AMNESIA_DEV_EMAIL}" ...@@ -56,7 +56,7 @@ export DEBEMAIL="${AMNESIA_DEV_EMAIL}"
echo "Updating debian/changelog from Git history..." echo "Updating debian/changelog from Git history..."
gbp dch \ gbp dch \
`if [ ${SNAPSHOT} = yes ]; then echo '--snapshot --auto' ; fi` \ `if [ ${SNAPSHOT} = yes ]; then echo '--snapshot --auto' ; fi` \
`if [ ${SNAPSHOT} = no -a -n ${SINCE} ]; then echo "--since=${SINCE}" ; fi` \ `if [ ${SNAPSHOT} = no -a -n "${SINCE}" ]; then echo "--since=${SINCE}" ; fi` \
`if [ ${SNAPSHOT} = no -a -z ${SINCE} ]; then echo "--auto" ; fi` \ `if [ ${SNAPSHOT} = no -a -z ${SINCE} ]; then echo "--auto" ; fi` \
--new-version="${NEW_VERSION}" \ --new-version="${NEW_VERSION}" \
--ignore-branch \ --ignore-branch \
......
#!/bin/sh #!/bin/sh
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: rtorrent_autostart # Provides: rtorrent_autostart
# Required-Start: $local_fs $remote_fs $network $syslog $netdaemons # Required-Start: $local_fs $remote_fs $network $syslog $netdaemons
# Required-Stop: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: 0 1 6 # Default-Stop: 0 1 6
# Short-Description: rtorrent script using screen(1) # Short-Description: rtorrent script using screen(1)
# Description: rtorrent script using screen(1) to keep torrents working without the user logging in # Description: rtorrent script using screen(1) to keep torrents working without the user logging in
### END INIT INFO ### END INIT INFO
############# #############
###<Notes>### ###<Notes>###
############# #############
# This script depends on screen. # This script depends on screen.
# For the stop function to work, you must set an # For the stop function to work, you must set an
# explicit session directory using ABSOLUTE paths (no, ~ is not absolute) in your rtorrent.rc. # explicit session directory using ABSOLUTE paths (no, ~ is not absolute) in your rtorrent.rc.
# If you typically just start rtorrent with just "rtorrent" on the # If you typically just start rtorrent with just "rtorrent" on the
# command line, all you need to change is the "user" option. # command line, all you need to change is the "user" option.
# Attach to the screen session as your user with # Attach to the screen session as your user with
# "screen -dr rtorrent". Change "rtorrent" with srnname option. # "screen -dr rtorrent". Change "rtorrent" with srnname option.
# Licensed under the GPLv2 by lostnihilist: lostnihilist _at_ gmail _dot_ com # Licensed under the GPLv2 by lostnihilist: lostnihilist _at_ gmail _dot_ com
############## ##############
###</Notes>### ###</Notes>###
############## ##############
####################### #######################
##Start Configuration## ##Start Configuration##
####################### #######################
# You can specify your configuration in a different file # You can specify your configuration in a different file
# (so that it is saved with upgrades, saved in your home directory, # (so that it is saved with upgrades, saved in your home directory,
# or whateve reason you want to) # or whateve reason you want to)
# by commenting out/deleting the configuration lines and placing them # by commenting out/deleting the configuration lines and placing them
# in a text file (say /home/user/.rtorrent.init.conf) exactly as you would # in a text file (say /home/user/.rtorrent.init.conf) exactly as you would
# have written them here (you can leave the comments if you desire # have written them here (you can leave the comments if you desire
# and then uncommenting the following line correcting the path/filename # and then uncommenting the following line correcting the path/filename
# for the one you used. note the space after the ".". # for the one you used. note the space after the ".".
# . /etc/rtorrent.init.conf # . /etc/rtorrent.init.conf
#Do not put a space on either side of the equal signs e.g. #Do not put a space on either side of the equal signs e.g.
# user = user # user = user
# will not work # will not work
# system user to run as # system user to run as
user="USERNAME" user="USERNAME"
# the system group to run as, not implemented, see d_start for beginning implementation # the system group to run as, not implemented, see d_start for beginning implementation
# group=`id -ng "$user"` # group=`id -ng "$user"`
# the full path to the filename where you store your rtorrent configuration # the full path to the filename where you store your rtorrent configuration
config="`su -c 'echo $HOME' $user`/.rtorrent.rc" config="`su -c 'echo $HOME' $user`/.rtorrent.rc"
# set of options to run with # set of options to run with
options="" options=""
# default directory for screen, needs to be an absolute path # default directory for screen, needs to be an absolute path
base="`su -c 'echo $HOME' $user`/.rtorrent" base="`su -c 'echo $HOME' $user`/.rtorrent"
# name of screen session # name of screen session
srnname="rtorrent" srnname="rtorrent"
# file to log to (makes for easier debugging if something goes wrong) # file to log to (makes for easier debugging if something goes wrong)
logfile="/var/log/rtorrentInit.log" logfile="/var/log/rtorrentInit.log"
####################### #######################
###END CONFIGURATION### ###END CONFIGURATION###
####################### #######################
PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin
DESC="rtorrent" DESC="rtorrent"
NAME=rtorrent NAME=rtorrent
DAEMON=$NAME DAEMON=$NAME
SCRIPTNAME=/etc/init.d/$NAME SCRIPTNAME=/etc/init.d/$NAME
checkcnfg() { checkcnfg() {
exists=0 exists=0
for i in `echo "$PATH" | tr ':' '\n'` ; do for i in `echo "$PATH" | tr ':' '\n'` ; do
if [ -f $i/$NAME ] ; then if [ -f $i/$NAME ] ; then
exists=1 exists=1
break break
fi fi
done done
if [ $exists -eq 0 ] ; then if [ $exists -eq 0 ] ; then
echo "cannot find rtorrent binary in PATH $PATH" | tee -a "$logfile" >&2 echo "cannot find rtorrent binary in PATH $PATH" | tee -a "$logfile" >&2
exit 3 exit 3
fi fi
if ! [ -r "${config}" ] ; then if ! [ -r "${config}" ] ; then
echo "cannot find readable config ${config}. check that it is there and permissions are appropriate" | tee -a "$logfile" >&2 echo "cannot find readable config ${config}. check that it is there and permissions are appropriate" | tee -a "$logfile" >&2
exit 3 exit 3
fi fi
session=`getsession "$config"` session=`getsession "$config"`
if ! [ -d "${session}" ] ; then if ! [ -d "${session}" ] ; then
echo "cannot find readable session directory ${session} from config ${config}. check permissions" | tee -a "$logfile" >&2 echo "cannot find readable session directory ${session} from config ${config}. check permissions" | tee -a "$logfile" >&2
exit 3 exit 3
fi fi
} }
d_start() { d_start() {
[ -d "${base}" ] && cd "${base}" [ -d "${base}" ] && cd "${base}"
stty stop undef && stty start undef stty stop undef && stty start undef
su -c "screen -ls | grep -sq "\.${srnname}[[:space:]]" " ${user} || su -c "screen -dm -S ${srnname} 2>&1 1>/dev/null" ${user} | tee -a "$logfile" >&2 su -c "screen -ls | grep -sq "\.${srnname}[[:space:]]" " ${user} || su -c "screen -dm -S ${srnname} 2>&1 1>/dev/null" ${user} | tee -a "$logfile" >&2
# this works for the screen command, but starting rtorrent below adopts screen session gid # this works for the screen command, but starting rtorrent below adopts screen session gid
# even if it is not the screen session we started (e.g. running under an undesirable gid # even if it is not the screen session we started (e.g. running under an undesirable gid
#su -c "screen -ls | grep -sq "\.${srnname}[[:space:]]" " ${user} || su -c "sg \"$group\" -c \"screen -fn -dm -S ${srnname} 2>&1 1>/dev/null\"" ${user} | tee -a "$logfile" >&2 #su -c "screen -ls | grep -sq "\.${srnname}[[:space:]]" " ${user} || su -c "sg \"$group\" -c \"screen -fn -dm -S ${srnname} 2>&1 1>/dev/null\"" ${user} | tee -a "$logfile" >&2
su -c "screen -S "${srnname}" -X screen rtorrent ${options} 2>&1 1>/dev/null" ${user} | tee -a "$logfile" >&2 su -c "screen -S "${srnname}" -X screen rtorrent ${options} 2>&1 1>/dev/null" ${user} | tee -a "$logfile" >&2
} }
d_stop() { d_stop() {
session=`getsession "$config"` session=`getsession "$config"`
if ! [ -s ${session}/rtorrent.lock ] ; then if ! [ -s ${session}/rtorrent.lock ] ; then
return return
fi fi
pid=`cat ${session}/rtorrent.lock | awk -F: '{print($2)}' | sed "s/[^0-9]//g"` pid=`cat ${session}/rtorrent.lock | awk -F: '{print($2)}' | sed "s/[^0-9]//g"`
if ps -A | grep -sq ${pid}.*rtorrent ; then # make sure the pid doesn't belong to another process if ps -A | grep -sq ${pid}.*rtorrent ; then # make sure the pid doesn't belong to another process
kill -s INT ${pid} kill -s INT ${pid}
fi fi
} }
getsession() { getsession() {
session=`cat "$1" | grep "^[[:space:]]*session[[:space:]]*=" | sed "s/^[[:space:]]*session[[:space:]]*=[[:space:]]*//" ` session=`cat "$1" | grep "^[[:space:]]*session[[:space:]]*=" | sed "s/^[[:space:]]*session[[:space:]]*=[[:space:]]*//" `
echo $session echo $session
} }
checkcnfg checkcnfg
case "$1" in case "$1" in
start) start)
echo -n "Starting $DESC: $NAME" echo -n "Starting $DESC: $NAME"
d_start d_start
echo "." echo "."
;; ;;
stop) stop)
echo -n "Stopping $DESC: $NAME" echo -n "Stopping $DESC: $NAME"
d_stop d_stop
echo "." echo "."
;; ;;
restart|force-reload) restart|force-reload)
echo -n "Restarting $DESC: $NAME" echo -n "Restarting $DESC: $NAME"
d_stop d_stop
sleep 1 sleep 1
d_start d_start
echo "." echo "."
;; ;;
*) *)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 1 exit 1
;; ;;
esac esac
exit 0 exit 0
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment