[rear-devel] [rear/rear] 002206: Create rear

Johannes Meixner noreply at github.com
Thu Jun 24 13:48:32 CEST 2021


  Branch: refs/heads/master
  Home:   https://github.com/rear/rear
  Commit: 00220635bc89f7cd0c877a3e79c5cf39f6e3042e
      https://github.com/rear/rear/commit/00220635bc89f7cd0c877a3e79c5cf39f6e3042e
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-21 (Mon, 21 Jun 2021)

  Changed paths:
    M usr/sbin/rear

  Log Message:
  -----------
  Create rear

In non-debug modes (in particular also in verbose mode)
stdout and stderr are redirected to a temporary file
STDOUT_STDERR_FILE="$TMP_DIR/rear.$WORKFLOW.stdout_stderr
so in non-debug modes stdout and stderr of all programs is still available
for the Error function to extract some latest messages
cf. https://github.com/rear/rear/issues/2623


  Commit: 593f026d31e2c08e7b665915ddef544a81820efa
      https://github.com/rear/rear/commit/593f026d31e2c08e7b665915ddef544a81820efa
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-21 (Mon, 21 Jun 2021)

  Changed paths:
    M usr/share/rear/lib/_input-output-functions.sh

  Log Message:
  -----------
  Update _input-output-functions.sh

Let the Error function is search for latest stdout and stderr messages
both in RUNTIME_LOGFILE and in STDOUT_STDERR_FILE
and show all what is found (usually it should be only in one file).


  Commit: de52d4b4265adecd23c1a2a696e4b714a64b41ea
      https://github.com/rear/rear/commit/de52d4b4265adecd23c1a2a696e4b714a64b41ea
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-21 (Mon, 21 Jun 2021)

  Changed paths:
    M usr/share/rear/lib/framework-functions.sh

  Log Message:
  -----------
  Update framework-functions.sh

Provide the "Including relative/path/to/script.sh" info
both in RUNTIME_LOGFILE and STDOUT_STDERR_FILE because the
Error function is searching for 'Including .*$script_basename' in both files.


  Commit: 76080f8d9630ada19cd9581b7ca9e1a8abc4df32
      https://github.com/rear/rear/commit/76080f8d9630ada19cd9581b7ca9e1a8abc4df32
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-21 (Mon, 21 Jun 2021)

  Changed paths:
    M usr/sbin/rear

  Log Message:
  -----------
  Update rear

To do chmod u=rw,go=- "$LOGFILE"
it must exist


  Commit: 283782a18a79c5bf9741f7ec1548884966fd51c6
      https://github.com/rear/rear/commit/283782a18a79c5bf9741f7ec1548884966fd51c6
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-21 (Mon, 21 Jun 2021)

  Changed paths:
    M usr/sbin/rear

  Log Message:
  -----------
  Update rear

Be safe and do cat /dev/null >"$LOGFILE"
before chmod u=rw,go=- "$LOGFILE"
and then cat "$RUNTIME_LOGFILE" > "$LOGFILE"


  Commit: ee382d6c27fdbcf85e1b215d7ee1194bc7d8a5b1
      https://github.com/rear/rear/commit/ee382d6c27fdbcf85e1b215d7ee1194bc7d8a5b1
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-22 (Tue, 22 Jun 2021)

  Changed paths:
    M usr/sbin/rear

  Log Message:
  -----------
  Update rear


  Commit: 43f05b6e75021ee1c1606a8ca2f4cf3ea3848442
      https://github.com/rear/rear/commit/43f05b6e75021ee1c1606a8ca2f4cf3ea3848442
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-22 (Tue, 22 Jun 2021)

  Changed paths:
    M usr/share/rear/lib/_input-output-functions.sh

  Log Message:
  -----------
  Update _input-output-functions.sh

When stdout and stderr are redirected to STDOUT_STDERR_FILE
messages of the last called programs cannot be in the log
have the extracted messages also stored in the log.
Furthermore show some generic info about debugging.


  Commit: 5bed220e1ef2d85684a5712ee6ca98a9b35ae8df
      https://github.com/rear/rear/commit/5bed220e1ef2d85684a5712ee6ca98a9b35ae8df
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-23 (Wed, 23 Jun 2021)

  Changed paths:
    M usr/sbin/rear

  Log Message:
  -----------
  Update rear


  Commit: 8701183626bde9f019ff0e6bf01d127a11c69efd
      https://github.com/rear/rear/commit/8701183626bde9f019ff0e6bf01d127a11c69efd
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-23 (Wed, 23 Jun 2021)

  Changed paths:
    M usr/share/rear/lib/framework-functions.sh

  Log Message:
  -----------
  Update framework-functions.sh


  Commit: 3f4bc829ec106ecf3456e305d48a4f2423458303
      https://github.com/rear/rear/commit/3f4bc829ec106ecf3456e305d48a4f2423458303
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-23 (Wed, 23 Jun 2021)

  Changed paths:
    M usr/sbin/rear

  Log Message:
  -----------
  Update rear

Prepend temporary working area (BUILD_DIR) removal exit task
(via "QuietAddExitTask cleanup_build_area_and_end_program")
directly after "source usr/share/rear/lib/_input-output-functions.sh"
so it gets executed directly before the generic exit tasks
that are set in usr/share/rear/lib/_input-output-functions.sh
This must be done before the first possible call of the 'Error' function
otherwise we may error out but leave the build area behind.


  Commit: a16bf49c5189d46c3c7d231895ae7e82924e6e73
      https://github.com/rear/rear/commit/a16bf49c5189d46c3c7d231895ae7e82924e6e73
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-23 (Wed, 23 Jun 2021)

  Changed paths:
    M usr/share/rear/lib/framework-functions.sh

  Log Message:
  -----------
  Update framework-functions.sh


  Commit: a7cd1eb583c7b88f23d01682a65f70e70f09d0b7
      https://github.com/rear/rear/commit/a7cd1eb583c7b88f23d01682a65f70e70f09d0b7
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-23 (Wed, 23 Jun 2021)

  Changed paths:
    M usr/share/rear/lib/framework-functions.sh

  Log Message:
  -----------
  Update framework-functions.sh

In cleanup_build_area_and_end_program()
when KEEP_BUILD_DIR is true show LogPrintError
when there is something mounted within the build area
and what is mounted there so the user is informed that he must
manually umount it before he can (also manually) remove the build area.


  Commit: 61646a64876a1244c7c0d237d9611da9499cb346
      https://github.com/rear/rear/commit/61646a64876a1244c7c0d237d9611da9499cb346
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-23 (Wed, 23 Jun 2021)

  Changed paths:
    M usr/share/rear/lib/framework-functions.sh

  Log Message:
  -----------
  Update framework-functions.sh

In cleanup_build_area_and_end_program()
when KEEP_BUILD_DIR is not true
use '--one-file-system' to be safe against also deleting by accident
all mounted things below mountpoints in TMP_DIR or ROOTFS_DIR
cf. https://github.com/rear/rear/pull/2633#issuecomment-866797427


  Commit: 42f78dbb25e28afc5bbfb3309b7dfdd969109f17
      https://github.com/rear/rear/commit/42f78dbb25e28afc5bbfb3309b7dfdd969109f17
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

  Changed paths:
    M usr/share/rear/lib/framework-functions.sh

  Log Message:
  -----------
  Update framework-functions.sh

In cleanup_build_area_and_end_program()
also when KEEP_BUILD_DIR is not true show LogPrintError
when there still exists something in the build area
in particular when there is something mounted in the build area
and what is mounted there so the user is informed that he must
manually umount it before he can (also manually) remove the build area


  Commit: 7da72435380da7a48f2ef180f94b16540c19ec8e
      https://github.com/rear/rear/commit/7da72435380da7a48f2ef180f94b16540c19ec8e
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

  Changed paths:
    M usr/share/rear/lib/_input-output-functions.sh

  Log Message:
  -----------
  Update _input-output-functions.sh

Make multi-line Log() output appear aligned with the content of the first line:
The first line is prefixed with MESSAGE_PREFIX and timestamp as it was before
but now all subsequent lines are also prefixed with as many blanks as there are
printable characters in the MESSAGE_PREFIX plus timestamp prefix
so that the content of the subsequent lines gets properly indented
to make their contents appear aligned with the content of the first line


  Commit: 82c505e2cba23d31727bd552a5c1d8bc1ca91ff3
      https://github.com/rear/rear/commit/82c505e2cba23d31727bd552a5c1d8bc1ca91ff3
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

  Changed paths:
    M usr/share/rear/lib/_input-output-functions.sh

  Log Message:
  -----------
  Update _input-output-functions.sh

Move the cleanup_build_area_and_end_program() function
from lib/framework-functions.sh to lib/_input-output-functions.sh
which is specifically sourced early in usr/sbin/rear
to have cleanup_build_area_and_end_program() available
for early Error() exits in usr/sbin/rear
and make cleanup_build_area_and_end_program()
and also the Error() function work fail-safe against
not yet existing log files and not yet sourced functions
in case of early Error() exits in usr/sbin/rear


  Commit: 3dca74e59ab73487308c7b9aa6ebb50d7044e1d4
      https://github.com/rear/rear/commit/3dca74e59ab73487308c7b9aa6ebb50d7044e1d4
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

  Changed paths:
    M usr/share/rear/lib/framework-functions.sh

  Log Message:
  -----------
  Update framework-functions.sh

Removed cleanup_build_area_and_end_program()
from lib/framework-functions.sh because it is now with some
more fail-safe conditions in lib/_input-output-functions.sh


  Commit: 5ed5b2e40e9716d6283fef2cc9dafe5bc43b02a5
      https://github.com/rear/rear/commit/5ed5b2e40e9716d6283fef2cc9dafe5bc43b02a5
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

  Changed paths:
    M usr/share/rear/lib/_input-output-functions.sh

  Log Message:
  -----------
  Update _input-output-functions.sh

Some more minor fixes for early Error() in usr/sbin/rear


  Commit: e670f504220f5edb7db36e78065c9b126d340d24
      https://github.com/rear/rear/commit/e670f504220f5edb7db36e78065c9b126d340d24
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

  Changed paths:
    M usr/sbin/rear
    M usr/share/rear/lib/_input-output-functions.sh
    M usr/share/rear/lib/framework-functions.sh

  Log Message:
  -----------
  Merge pull request #2633 from rear/jsmeix-stdout-stderr-non-debug-1

Show some stdout and stderr messages also in non-debug modes:
In non-debug modes (in particular also in verbose mode)
stdout and stderr are redirected to a temporary file
STDOUT_STDERR_FILE=TMP_DIR/rear.WORKFLOW.stdout_stderr
so in non-debug modes stdout and stderr of all programs is still available
for the Error() function to extract some latest messages that get shown
on the usrer's terminal and those extracted lines are also copied into the log.
Furthermore the log files and the stdout/stderr file can now only be read by root.
Additionally when there is something still mounted within the build area
when rear finishes, the user is informed what is mounted and that he must
manually umount it before he can (also manually) remove the build area.
Finally the Error() and cleanup_build_area_and_end_program() functions
are made fail-safe against not yet existing log files and not yet sourced
other functions in case of early Error() exits in usr/sbin/rear


Compare: https://github.com/rear/rear/compare/98a22402594b...e670f504220f


More information about the rear-devel mailing list