diff --git a/.gitignore b/.gitignore index 7312757..bd49bec 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/rear-1.17.2.tar.gz +SOURCES/rear-2.00.tar.gz diff --git a/.rear.metadata b/.rear.metadata index 30ffa3d..b57604f 100644 --- a/.rear.metadata +++ b/.rear.metadata @@ -1 +1 @@ -c904631fd47d6a7ff878847ccf8675f248f78d3f SOURCES/rear-1.17.2.tar.gz +6d78cd78e4c6679fba4bb224dde56ac9da0485ae SOURCES/rear-2.00.tar.gz diff --git a/SOURCES/0002-Changed-BACKUP_CAP-to-NETFS_RESTORE_CAPABILITIES.patch b/SOURCES/0002-Changed-BACKUP_CAP-to-NETFS_RESTORE_CAPABILITIES.patch deleted file mode 100644 index 66aeba1..0000000 --- a/SOURCES/0002-Changed-BACKUP_CAP-to-NETFS_RESTORE_CAPABILITIES.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/usr/share/rear/conf/default.conf b/usr/share/rear/conf/default.conf -index 5389a07..a5152a2 100644 ---- a/usr/share/rear/conf/default.conf -+++ b/usr/share/rear/conf/default.conf -@@ -614,6 +614,9 @@ NETFS_PREFIX="$HOSTNAME" - # empty means only keep current backup - NETFS_KEEP_OLD_BACKUP_COPY= - -+# Specify if rear should try to backup capabilities (y/n) default (n). -+NETFS_RESTORE_CAPABILITIES=n -+ - ## - # BACKUP=RSYNC method - ## --- -1.8.3.1 - diff --git a/SOURCES/0003-Added-knowledge-about-NVME-SSD-disks-in-script-20_pa.patch b/SOURCES/0003-Added-knowledge-about-NVME-SSD-disks-in-script-20_pa.patch deleted file mode 100644 index 2f4cb27..0000000 --- a/SOURCES/0003-Added-knowledge-about-NVME-SSD-disks-in-script-20_pa.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e7043b6951705edb2abd87031868591502e9a688 Mon Sep 17 00:00:00 2001 -From: Gratien D'haese -Date: Mon, 7 Mar 2016 11:40:26 +0100 -Subject: [PATCH] Added knowledge about NVME SSD disks in script - 20_partition_layout.sh - issue #787 - ---- - usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh b/usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh -index a5458d9..9724aee 100644 ---- a/usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh -+++ b/usr/share/rear/layout/save/GNU/Linux/20_partition_layout.sh -@@ -250,7 +250,7 @@ Log "Saving disk partitions." - # format: disk - for disk in /sys/block/* ; do - blockd=${disk#/sys/block/} -- if [[ $blockd = hd* || $blockd = sd* || $blockd = cciss* || $blockd = vd* || $blockd = xvd* ]] ; then -+ if [[ $blockd = hd* || $blockd = sd* || $blockd = cciss* || $blockd = vd* || $blockd = xvd* || $blockd = dasd* || $blockd = nvme* ]] ; then - devname=$(get_device_name $disk) - devsize=$(get_disk_size ${disk#/sys/block/}) - --- -1.8.3.1 - diff --git a/SOURCES/0004-correcting-variable-name-and-making-it-an-array.patch b/SOURCES/0004-correcting-variable-name-and-making-it-an-array.patch deleted file mode 100644 index 87cef81..0000000 --- a/SOURCES/0004-correcting-variable-name-and-making-it-an-array.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2f7e6e09a3934b431daea2b44750143b16d22922 Mon Sep 17 00:00:00 2001 -From: jmazanek -Date: Fri, 27 Jan 2017 09:36:42 +0100 -Subject: [PATCH] -correcting variable name and making it an array - ---- - usr/share/rear/prep/default/95_check_missing_programs.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/usr/share/rear/prep/default/95_check_missing_programs.sh b/usr/share/rear/prep/default/95_check_missing_programs.sh -index e7f7ea7..3204016 100644 ---- a/usr/share/rear/prep/default/95_check_missing_programs.sh -+++ b/usr/share/rear/prep/default/95_check_missing_programs.sh -@@ -3,7 +3,7 @@ - # so we need to double check before leaving the prep stage. - - # check for requirements, do we have all required binaries ? --MISSING_PROGRS=() -+declare -a MISSING_PROGS - for f in "${REQUIRED_PROGS[@]}" ; do - if ! has_binary "$f"; then - MISSING_PROGS=( "${MISSING_PROGS[@]}" "$f" ) --- -1.8.3.1 - diff --git a/SOURCES/31_include_cap_uitls.sh b/SOURCES/31_include_cap_uitls.sh deleted file mode 100644 index 244abf5..0000000 --- a/SOURCES/31_include_cap_uitls.sh +++ /dev/null @@ -1,4 +0,0 @@ -# include utilities needed to set capabilities -if is_true "$NETFS_RESTORE_CAPABILITIES" ; then - REQUIRED_PROGS=("${REQUIRED_PROGS[@]}" setcap getcap) -fi diff --git a/SOURCES/36_teaming.sh b/SOURCES/36_teaming.sh deleted file mode 100644 index 5214d3e..0000000 --- a/SOURCES/36_teaming.sh +++ /dev/null @@ -1,107 +0,0 @@ -# 36_teaming.sh -# -# record teaming information (network and routing) for Relax-and-Recover -# -# Relax-and-Recover is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. - -# Relax-and-Recover is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with Relax-and-Recover; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# BUG: Supports Ethernet only (so far) - -# where to build networking configuration -netscript=$ROOTFS_DIR/etc/scripts/system-setup.d/63-teaming.sh - -### Skip netscript if noip is configured on the command line -cat <> ${netscript} -if [[ -e /proc/cmdline ]] ; then - if grep -q 'noip' /proc/cmdline ; then - return - fi -fi -EOT - -# add a line at the top of netscript to skip if dhclient will be used -cat - < ${netscript} -# if USE_DHCLIENT=y then use DHCP instead and skip 60-network-devices.sh -[[ ! -z "\$USE_DHCLIENT" && -z "\$USE_STATIC_NETWORKING" ]] && return -# if IPADDR=1.2.3.4 has been defined at boot time via ip=1.2.3.4 then configure -if [[ "\$IPADDR" ]] && [[ "\$NETMASK" ]] ; then - device=\${NETDEV:-eth0} - ip link set dev "\$device" up - ip addr add "\$IPADDR"/"\$NETMASK" dev "\$device" - if [[ "\$GATEWAY" ]] ; then - ip route add default via "\$GATEWAY" - fi - return -fi -EOT - -# store virtual devices, because teaming interfaces are declared as virtual -VIRTUAL_DEVICES=$(ls /sys/devices/virtual/net) - -TEAMINGS=() - -# check if virtual interface is a teaming interface -for VIRT_DEV in ${VIRTUAL_DEVICES} -do - if ethtool -i ${VIRT_DEV} | grep -w "driver:" | grep -qw team - then - TEAMINGS+=($VIRT_DEV) - fi - -done - -for TEAM in "${TEAMINGS[@]}" -do - # catch all ip-addresses for the teaming interface - ADDR=() - for x in $(ip ad show dev ${TEAM} scope global | grep "inet.*\ " | tr -s " " | cut -d " " -f 3) - do - ADDR+=($x) - done - - # create netscript only when the interface has at least one configured ip - # to simplify we attach the configured ip-addresses to the first teaming-member - if [[ ${ADDR[*]} ]] - then - # find out one member interface. Greping for "active port:" will not work for all possible teaming configs (e.g. roundrobin, loadbalance, ...) - FIRST_PORT=$(teamdctl ${TEAM} state | grep -A1 -w ports: | tail -1 | sed 's/[[:blank:]]*//g') - - for TEAM_IP in ${ADDR[@]} - do - echo "ip addr add ${TEAM_IP} dev ${FIRST_PORT}" >>${netscript} - done - - echo "ip link set dev ${FIRST_PORT} up" >>${netscript} - - PORT_MTU="$(cat /sys/class/net/${FIRST_PORT}/mtu)" - echo "ip link set dev ${FIRST_PORT} mtu ${PORT_MTU}" >>${netscript} - fi - - # catch the routing for the teaming interface as we disabled it in 35_routing.sh - for table in $( { echo "254 main" ; cat /etc/iproute2/rt_tables ; } |\ - grep -E '^[0-9]+' |\ - tr -s " \t" " " |\ - cut -d " " -f 2 | sort -u | grep -Ev '(local|default|unspec)' ) ; - do - ip route list table $table |\ - grep -Ev 'scope (link|host)' |\ - while read destination via gateway dev device junk; - do - if [[ "${device}" == "${TEAM}" ]] - then - echo "ip route add ${destination} ${via} ${gateway} ${dev} ${FIRST_PORT} table ${table}" >>${netscript} - fi - done - done -done diff --git a/SOURCES/51_set_capabilities.sh b/SOURCES/51_set_capabilities.sh deleted file mode 100644 index 43d03ed..0000000 --- a/SOURCES/51_set_capabilities.sh +++ /dev/null @@ -1,13 +0,0 @@ -# restore capabilities if capabilities are in the backup - if is_true "$NETFS_RESTORE_CAPABILITIES" ; then - if test -s $VAR_DIR/recovery/capabilities ; then - Log "Restoring Capabilities." - while IFS="=" read file cap ; do - file="${file% }" - cap="${cap# }" - setcap "${cap}" "${TARGET_FS_ROOT}/${file}" 2>/dev/null || Log "Error while setting capabilties to \"${file}\"" - done < <(cat $VAR_DIR/recovery/capabilities) - else - Log "No saved capabilities found" - fi - fi diff --git a/SOURCES/61_save_capabilities.sh b/SOURCES/61_save_capabilities.sh deleted file mode 100644 index f118723..0000000 --- a/SOURCES/61_save_capabilities.sh +++ /dev/null @@ -1,5 +0,0 @@ -# save all found capapilities to file - -if is_true "$NETFS_RESTORE_CAPABILITIES" ; then - getcap -r / 2>/dev/null | grep -v $ISO_DIR > $VAR_DIR/recovery/capabilities || Log "Error while saving capabilities to file." -fi diff --git a/SOURCES/is_true.patch b/SOURCES/is_true.patch deleted file mode 100644 index 098ddd5..0000000 --- a/SOURCES/is_true.patch +++ /dev/null @@ -1,283 +0,0 @@ ---- /usr/share/rear/lib/global-functions.sh 2015-09-03 15:43:01.000000000 +0200 -+++ /usr/share/rear/lib/global-functions.sh 2017-01-06 12:02:52.000000000 +0100 -@@ -2,27 +2,14 @@ - # - # global functions for Relax-and-Recover - # --# Relax-and-Recover is free software; you can redistribute it and/or modify --# it under the terms of the GNU General Public License as published by --# the Free Software Foundation; either version 2 of the License, or --# (at your option) any later version. -- --# Relax-and-Recover is distributed in the hope that it will be useful, --# but WITHOUT ANY WARRANTY; without even the implied warranty of --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --# GNU General Public License for more details. -- --# You should have received a copy of the GNU General Public License --# along with Relax-and-Recover; if not, write to the Free Software --# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA --# --# -+# This file is part of Relax-and-Recover, licensed under the GNU General -+# Public License. Refer to the included COPYING for full text of license. - - function read_and_strip_file () { - # extracts content from config files. In other words: strips the comments and new lines -- if test -s "$1" ; then -- sed -e '/^[[:space:]]/d;/^$/d;/^#/d' "$1" -- fi -+ if test -s "$1" ; then -+ sed -e '/^[[:space:]]/d;/^$/d;/^#/d' "$1" -+ fi - } - - function is_numeric () { -@@ -34,27 +21,143 @@ - fi - } - -+# two explicit functions to be able to test explicitly for true and false (see issue #625) -+# because "tertium non datur" (cf. https://en.wikipedia.org/wiki/Law_of_excluded_middle) -+# does not hold for variables because variables could be unset or have empty value -+# and to test if a variable is true or false its value is tested by that functions -+# but the variable may not have a real value (i.e. be unset or have empty value): -+ -+function is_true () { -+ # the argument is usually the value of a variable which needs to be tested -+ # only if there is explicitly a 'true' value then is_true returns true -+ # so that an unset variable or an empty value is not true: -+ case "$1" in -+ ([tT] | [yY] | [yY][eE][sS] | [tT][rR][uU][eE] | 1) -+ return 0 ;; -+ esac -+ return 1 -+} -+ -+function is_false () { -+ # the argument is usually the value of a variable which needs to be tested -+ # only if there is explicitly a 'false' value then is_false returns true -+ # so that an unset variable or an empty value is not false -+ # caution: for unset or empty variables is_false is false -+ case "$1" in -+ ([fF] | [nN] | [nN][oO] | [fF][aA][lL][sS][eE] | 0) -+ return 0 ;; -+ esac -+ return 1 -+} -+ - ###### - ### Functions for dealing with URLs - ###### -+# URL is the most common form of URI -+# see https://en.wikipedia.org/wiki/Uniform_Resource_Identifier -+# where a generic URI is of the form -+# scheme:[//[user:password@]host[:port]][/]path[?query][#fragment] -+# e.g. for BACKUP_URL=sshfs://user@host/G/rear/ -+# url_scheme = 'sshfs' , url_host = 'user@host' , url_hostname = 'host' , url_username = 'user' , url_path = '/G/rear/' -+# e.g. for BACKUP_URL=usb:///dev/sdb1 -+# url_scheme = 'usb' , url_host = '' , url_hostname = '' , url_username = '' , url_path = '/dev/sdb1' -+# FIXME: the ulr_* functions are not safe against special characters -+# for example they break when the password contains spaces -+# but on the other hand permitted characters for values in a URI -+# are ASCII letters, digits, dot, hyphen, underscore, and tilde -+# and any other character must be percent-encoded (in particular the -+# characters : / ? # [ ] @ are reserved as delimiters of URI components -+# and must be percent-encoded when used in the value of a URI component) -+# so that what is missing is support for percent-encoded characters -+# but user-friendly support for percent-encoded characters is not possible -+# cf. http://bugzilla.opensuse.org/show_bug.cgi?id=561626#c7 - --url_scheme() { -+function url_scheme() { - local url=$1 -+ # the scheme is the leading part up to '://' - local scheme=${url%%://*} - # rsync scheme does not have to start with rsync:// it can also be scp style -+ # see the comments in usr/share/rear/prep/RSYNC/default/100_check_rsync.sh - echo $scheme | grep -q ":" && echo rsync || echo $scheme - } - --url_host() { -+function url_host() { -+ local url=$1 -+ local url_without_scheme=${url#*//} -+ # the authority part is the part after the scheme (e.g. 'host' or 'user@host') -+ # i.e. after 'scheme://' all up to but excluding the next '/' -+ # which means it breaks if there is a username that contains a '/' -+ # which should not happen because a POSIX-compliant username -+ # should have only characters from the portable filename character set -+ # which is ASCII letters, digits, dot, hyphen, and underscore -+ # (a hostname must not contain a '/' see RFC 952 and RFC 1123) -+ local authority_part=${url_without_scheme%%/*} -+ # for backward compatibility the url_host function returns the whole authority part -+ # see https://github.com/rear/rear/issues/856 -+ # to get only hostname or username use the url_hostname and url_username functions -+ echo $authority_part -+} -+ -+function url_hostname() { - local url=$1 -- local host=${url#*//} -- echo ${host%%/*} -+ local url_without_scheme=${url#*//} -+ local authority_part=${url_without_scheme%%/*} -+ # if authority_part contains a '@' we assume the 'user@host' format and -+ # then we remove the 'user@' part (i.e. all up to and including the last '@') -+ # so that it also works when the username contains a '@' -+ # like 'john@doe' in BACKUP_URL=sshfs://john@doe@host/G/rear/ -+ # (a hostname must not contain a '@' see RFC 952 and RFC 1123) -+ local host_and_port=${authority_part##*@} -+ # if host_and_port contains a ':' we assume the 'host:port' format and -+ # then we remove the ':port' part (i.e. all from and including the last ':') -+ # so that it even works when the hostname contains a ':' (in spite of RFC 952 and RFC 1123) -+ echo ${host_and_port%:*} - } - --url_path() { -+function url_username() { - local url=$1 -- local path=${url#*//} -- echo /${path#*/} -+ local url_without_scheme=${url#*//} -+ local authority_part=${url_without_scheme%%/*} -+ # authority_part must contain a '@' when a username is specified -+ echo $authority_part | grep -q '@' || return 0 -+ # we remove the '@host' part (i.e. all from and including the last '@') -+ # so that it also works when the username contains a '@' -+ # like 'john@doe' in BACKUP_URL=sshfs://john@doe@host/G/rear/ -+ # (a hostname must not contain a '@' see RFC 952 and RFC 1123) -+ local user_and_password=${authority_part%@*} -+ # if user_and_password contains a ':' we assume the 'user:password' format and -+ # then we remove the ':password' part (i.e. all from and including the first ':') -+ # so that it works when the password contains a ':' -+ # (a POSIX-compliant username should not contain a ':') -+ echo $user_and_password | grep -q ':' && echo ${user_and_password%%:*} || echo $user_and_password -+} -+ -+function url_password() { -+ local url=$1 -+ local url_without_scheme=${url#*//} -+ local authority_part=${url_without_scheme%%/*} -+ # authority_part must contain a '@' when a username is specified -+ echo $authority_part | grep -q '@' || return 0 -+ # we remove the '@host' part (i.e. all from and including the last '@') -+ # so that it also works when the username contains a '@' -+ # like 'john@doe' in BACKUP_URL=sshfs://john@doe@host/G/rear/ -+ # (a hostname must not contain a '@' see RFC 952 and RFC 1123) -+ local user_and_password=${authority_part%@*} -+ # user_and_password must contain a ':' when a password is specified -+ echo $user_and_password | grep -q ':' || return 0 -+ # we remove the 'user:' part (i.e. all up to and including the first ':') -+ # so that it works when the password contains a ':' -+ # (a POSIX-compliant username should not contain a ':') -+ echo ${user_and_password#*:} -+} -+ -+function url_path() { -+ local url=$1 -+ local url_without_scheme=${url#*//} -+ # the path is all from and including the first '/' in url_without_scheme -+ # i.e. the whole rest after the authority part so that -+ # it may contain an optional trailing '?query' and '#fragment' -+ echo /${url_without_scheme#*/} - } - - backup_path() { -@@ -76,7 +179,7 @@ - path="${TMP_DIR}/isofs${path}" - fi - ;; -- (*) # nfs, cifs, usb, a.o. need a temporary mount-path -+ (*) # nfs, cifs, usb, a.o. need a temporary mount-path - path="${BUILD_DIR}/outputfs/${NETFS_PREFIX}" - ;; - esac -@@ -93,7 +196,7 @@ - (file) # type file needs a local path (must be mounted by user) - path="$path/${OUTPUT_PREFIX}" - ;; -- (*) # nfs, cifs, usb, a.o. need a temporary mount-path -+ (*) # nfs, cifs, usb, a.o. need a temporary mount-path - path="${BUILD_DIR}/outputfs/${OUTPUT_PREFIX}" - ;; - esac -@@ -129,7 +232,8 @@ - ;; - (cifs) - if [ x"$options" = x"$defaultoptions" ];then -- mount_cmd="mount $v -o $options,guest //$(url_host $url)$(url_path $url) $mountpoint" -+ # defaultoptions contains noatime which is not valid for cifs (issue #752) -+ mount_cmd="mount $v -o rw,guest //$(url_host $url)$(url_path $url) $mountpoint" - else - mount_cmd="mount $v -o $options //$(url_host $url)$(url_path $url) $mountpoint" - fi -@@ -137,19 +241,48 @@ - (usb) - mount_cmd="mount $v -o $options $(url_path $url) $mountpoint" - ;; -- (sshfs) -- mount_cmd="sshfs $(url_host $url):$(url_path $url) $mountpoint -o $options" -+ (sshfs) -+ local authority=$( url_host $url ) -+ test "$authority" || Error "Cannot run 'sshfs' because no authority '[user@]host' found in URL '$url'." -+ local path=$( url_path $url ) -+ test "$path" || Error "Cannot run 'sshfs' because no path found in URL '$url'." -+ # ensure the fuse kernel module is loaded because sshfs is based on FUSE -+ lsmod | grep -q '^fuse' || modprobe $verbose fuse || Error "Cannot run 'sshfs' because 'fuse' kernel module is not loadable." -+ mount_cmd="sshfs $authority:$path $mountpoint -o $options" -+ ;; -+ (ftpfs) -+ local hostname=$( url_hostname $url ) -+ test "$hostname" || Error "Cannot run 'curlftpfs' because no hostname found in URL '$url'." -+ local path=$( url_path $url ) -+ test "$path" || Error "Cannot run 'curlftpfs' because no path found in URL '$url'." -+ local username=$( url_username $url ) -+ # ensure the fuse kernel module is loaded because ftpfs (via CurlFtpFS) is based on FUSE -+ lsmod | grep -q '^fuse' || modprobe $verbose fuse || Error "Cannot run 'curlftpfs' because 'fuse' kernel module is not loadable." -+ if test "$username" ; then -+ local password=$( url_password $url ) -+ if test "$password" ; then -+ # single quoting is a must for the password -+ mount_cmd="curlftpfs $verbose -o user='$username:$password' ftp://$hostname$path $mountpoint" -+ else -+ # also single quoting for the plain username so that it also works for non-POSIX-compliant usernames -+ # (a POSIX-compliant username should only contain ASCII letters, digits, dot, hyphen, and underscore) -+ mount_cmd="curlftpfs $verbose -o user='$username' ftp://$hostname$path $mountpoint" -+ fi -+ else -+ mount_cmd="curlftpfs $verbose ftp://$hostname$path $mountpoint" -+ fi -+ ;; -+ (davfs) -+ mount_cmd="mount $v -t davfs http://$(url_host $url)$(url_path $url) $mountpoint" - ;; -- (davfs) -- mount_cmd="mount $v -t davfs http://$(url_host $url)$(url_path $url) $mountpoint" -- ;; - (*) - mount_cmd="mount $v -t $(url_scheme $url) -o $options $(url_host $url):$(url_path $url) $mountpoint" - ;; - esac - - Log "Mounting with '$mount_cmd'" -- $mount_cmd >&2 -+ # eval is required when mount_cmd contains single quoted stuff (e.g. see the above mount_cmd for curlftpfs) -+ eval $mount_cmd >&2 - StopIfError "Mount command '$mount_cmd' failed." - - AddExitTask "umount -f $v '$mountpoint' >&2" -@@ -182,7 +315,7 @@ - # and delete only the just used cache - #rm -rf /var/cache/davfs2/** - rm -rf /var/cache/davfs2/*outputfs* -- -+ - ;; - (var) - local var=$(url_host $url) -@@ -228,3 +361,4 @@ - Log "Unmounting '$mountpoint' failed." - return 1 - } -+ diff --git a/SOURCES/rear-grep-fix.patch b/SOURCES/rear-grep-fix.patch deleted file mode 100644 index ade831c..0000000 --- a/SOURCES/rear-grep-fix.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff --git a/usr/share/rear/layout/save/default/31_autoexclude_usb.sh b/usr/share/rear/layout/save/default/31_autoexclude_usb.sh -index 6ee0e45..75b4080 100644 ---- a/usr/share/rear/layout/save/default/31_autoexclude_usb.sh -+++ b/usr/share/rear/layout/save/default/31_autoexclude_usb.sh -@@ -36,7 +36,7 @@ do - - grep -q "^$REAL_USB_DEVICE " /proc/mounts - if [[ $? -eq 0 ]]; then -- local usb_mntpt=$(grep -P "^$REAL_USB_DEVICE\s" /proc/mounts | cut -d" " -f2 | tail -1) -+ local usb_mntpt=$(grep -E "^$REAL_USB_DEVICE\s" /proc/mounts | cut -d" " -f2 | tail -1) - if ! IsInArray "$usb_mntpt" "${AUTOEXCLUDE_USB_PATH[@]}" ; then - AUTOEXCLUDE_USB_PATH=( ${AUTOEXCLUDE_USB_PATH[@]} $usb_mntpt ) - Log "Auto-excluding USB path $usb_mntpt [device $REAL_USB_DEVICE]" -diff --git a/usr/share/rear/output/USB/Linux-i386/30_create_extlinux.sh b/usr/share/rear/output/USB/Linux-i386/30_create_extlinux.sh -index fdbb3e9..efdd558 100644 ---- a/usr/share/rear/output/USB/Linux-i386/30_create_extlinux.sh -+++ b/usr/share/rear/output/USB/Linux-i386/30_create_extlinux.sh -@@ -3,7 +3,7 @@ - function get_usb_syslinux_version { - for file in $BUILD_DIR/outputfs/{boot/syslinux,}/{ld,ext}linux.sys; do - if [[ -s "$file" ]]; then -- strings $file | grep -P -m1 "^(EXT|SYS)LINUX \\d+.\\d+" | cut -d' ' -f2 -+ strings $file | grep -E -m1 "^(EXT|SYS)LINUX \\d+.\\d+" | cut -d' ' -f2 - return 0 - fi - done -diff --git a/usr/share/rear/output/USB/Linux-i386/85_make_USB_bootable.sh b/usr/share/rear/output/USB/Linux-i386/85_make_USB_bootable.sh -index 49739d4..3cffc94 100644 ---- a/usr/share/rear/output/USB/Linux-i386/85_make_USB_bootable.sh -+++ b/usr/share/rear/output/USB/Linux-i386/85_make_USB_bootable.sh -@@ -22,7 +22,7 @@ if [[ "$usb_syslinux_version" ]] && version_newer "$usb_syslinux_version" "$sysl - fi - - # Make the USB bootable --usb_filesystem=$(grep -P "^($USB_DEVICE|$REAL_USB_DEVICE)\\s" /proc/mounts | cut -d' ' -f3 | tail -1) -+usb_filesystem=$(grep -E "^($USB_DEVICE|$REAL_USB_DEVICE)\\s" /proc/mounts | cut -d' ' -f3 | tail -1) - case "$usb_filesystem" in - (ext?) - if [[ "$FEATURE_SYSLINUX_EXTLINUX_INSTALL" ]]; then -diff --git a/usr/share/rear/prep/USB/Linux-i386/35_check_usb_disk.sh b/usr/share/rear/prep/USB/Linux-i386/35_check_usb_disk.sh -index 4d280c1..a166f94 100644 ---- a/usr/share/rear/prep/USB/Linux-i386/35_check_usb_disk.sh -+++ b/usr/share/rear/prep/USB/Linux-i386/35_check_usb_disk.sh -@@ -9,7 +9,7 @@ REAL_USB_DEVICE=$(readlink -f $USB_DEVICE) - StopIfError "USB device '$USB_DEVICE' is not a block device" - - ! grep -q "^$REAL_USB_DEVICE " /proc/mounts --StopIfError "USB device '$USB_DEVICE' is already mounted on $(grep -P "^$REAL_USB_DEVICE\\s" /proc/mounts | cut -d' ' -f2 |tail -1)" -+StopIfError "USB device '$USB_DEVICE' is already mounted on $(grep -E "^$REAL_USB_DEVICE\\s" /proc/mounts | cut -d' ' -f2 |tail -1)" - - # We cannot use the layout dependency code in the backup phase (yet) - #RAW_USB_DEVICE=$(find_disk $REAL_USB_DEVICE) diff --git a/SOURCES/rear-teaming-interface.patch b/SOURCES/rear-teaming-interface.patch deleted file mode 100644 index a34efb1..0000000 --- a/SOURCES/rear-teaming-interface.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/usr/share/rear/rescue/GNU/Linux/35_routing.sh b/usr/share/rear/rescue/GNU/Linux/35_routing.sh -index a1dddab..186d01f 100644 ---- a/usr/share/rear/rescue/GNU/Linux/35_routing.sh -+++ b/usr/share/rear/rescue/GNU/Linux/35_routing.sh -@@ -83,7 +83,8 @@ else # use original routes - ifslaves=($(cat /proc/net/bonding/$device | grep "Slave Interface:" | cut -d : -f 2)) - Log "X${ifslaves[@]}X" - echo "ip route add $destination $via $gateway $dev ${ifslaves[0]} table $table" >>$netscript -- else -+ # be sure that it is not a teaming-interface -+ elif ! ethtool -i $device | grep -w "driver:" | grep -qw team ; then - echo "ip route add $destination $via $gateway $dev $device table $table" >>$netscript - fi - done -@@ -95,7 +96,8 @@ else # use original routes - ifslaves=($(cat /proc/net/bonding/$device | grep "Slave Interface:" | cut -d : -f 2)) - Log "X${ifslaves[@]}X" - echo "ip route add $destination $via $gateway $dev ${ifslaves[0]} table $table" >>$netscript -- else -+ # be sure that it is not a teaming-interface -+ elif ! ethtool -i $device | grep -w "driver:" | grep -qw team ; then - echo "ip route add $destination $via $gateway $dev $device table $table" >>$netscript - fi - done diff --git a/SOURCES/rearbin.patch b/SOURCES/rearbin.patch deleted file mode 100644 index 6c4fbae..0000000 --- a/SOURCES/rearbin.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- /usr/sbin/rear 2015-09-03 15:43:01.000000000 +0200 -+++ /usr/sbin/rear 2017-02-23 13:15:59.504794464 +0100 -@@ -46,6 +46,7 @@ - VAR_DIR="$REAR_DIR_PREFIX/var/lib/rear" - LOG_DIR="$REAR_DIR_PREFIX/var/log/rear" - CMD_OPTS=( "$@" ) -+readonly TARGET_FS_ROOT="/mnt/local" - - # initialize defaults - STEPBYSTEP= diff --git a/SOURCES/uuid_xfs.patch b/SOURCES/uuid_xfs.patch deleted file mode 100644 index 67d6cb5..0000000 --- a/SOURCES/uuid_xfs.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 64a685e1a464450c7d2679b59a913969012a2177 Mon Sep 17 00:00:00 2001 -From: jmazanek -Date: Fri, 9 Dec 2016 09:52:00 +0100 -Subject: [PATCH] Correcting UUID creation on xfs filesystem - ---- - .../layout/prepare/GNU/Linux/13_include_filesystem_code.sh | 14 ++++++++++---- - 1 file changed, 10 insertions(+), 4 deletions(-) - -diff --git a/usr/share/rear/layout/prepare/GNU/Linux/13_include_filesystem_code.sh b/usr/share/rear/layout/prepare/GNU/Linux/13_include_filesystem_code.sh -index 71aed00..7b3e82c 100644 ---- a/usr/share/rear/layout/prepare/GNU/Linux/13_include_filesystem_code.sh -+++ b/usr/share/rear/layout/prepare/GNU/Linux/13_include_filesystem_code.sh -@@ -79,14 +79,20 @@ EOF - (xfs) - cat >> "$LAYOUT_CODE" <&2; then" -+ echo " mkfs.xfs -f $device >&2" -+ echo " xfs_admin -U $uuid $device >&2" -+ echo "fi" -+ ) >> "$LAYOUT_CODE" -+ else -+ # Actually create the filesystem -+ echo "mkfs.xfs -f $device >&2" >> "$LAYOUT_CODE" -+ fi - if [ -n "$label" ] ; then - echo "xfs_admin -L $label $device >&2" >> "$LAYOUT_CODE" - fi -- if [ -n "$uuid" ] ; then -- echo "xfs_admin -U $uuid $device >&2" >> "$LAYOUT_CODE" -- fi - ;; - (reiserfs) - cat >> "$LAYOUT_CODE" <rear.cron @@ -126,10 +111,6 @@ echo "30 1 * * * root /usr/sbin/rear checklayout || /usr/sbin/rear mkrescue" >re %{__make} install DESTDIR="%{buildroot}" %{__install} -Dp -m0644 rear.cron %{buildroot}%{_sysconfdir}/cron.d/rear #%{__install} -Dp -m0644 etc/udev/rules.d/62-rear-usb.rules %{buildroot}%{_sysconfdir}/udev/rules.d/62-rear-usb.rules -cp %{SOURCE1} %{buildroot}%{_datadir}/rear/rescue/GNU/Linux/36_teaming.sh -cp %{SOURCE2} %{buildroot}%{_datadir}/rear/prep/GNU/Linux/31_include_cap_uitls.sh -cp %{SOURCE3} %{buildroot}%{_datadir}/rear/restore/NETFS/default/51_set_capabilities.sh -cp %{SOURCE4} %{buildroot}%{_datadir}/rear/rescue/NETFS/default/61_save_capabilities.sh %clean %{__rm} -rf %{buildroot} @@ -145,14 +126,13 @@ cp %{SOURCE4} %{buildroot}%{_datadir}/rear/rescue/NETFS/default/61_save_capabili %{_sbindir}/rear %changelog -* Wed Jan 25 2017 Jakub Mazanek - 1.17.2-8 -- Adding backup of Linux capabilities -- Adding knowledge about NVME disks -Resolves: #1434519 - -* Tue Dec 13 2016 Jakub Mazanek - 1.17.2-7 -- Correcting UUID creation on xfs filesystem -Resolves: #1404167 +* Wed May 17 2017 Jakub Mazanek - 2.00-2 +- Excluding Archs s390 and s390x +- Related #1355667 + +* Mon Feb 20 2017 Jakub Mazanek - 2.00-1 +- Rebase to version 2.00 +- Resolves #1355667 * Tue Jul 19 2016 Petr Hracek - 1.17.2-6 - Replace experimental grep -P with grep -E