From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 0E29D138202 for ; Tue, 23 Jul 2013 18:34:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5B79DE09DB; Tue, 23 Jul 2013 18:34:37 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A9DEDE0A10 for ; Tue, 23 Jul 2013 18:34:36 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 87F6033E987 for ; Tue, 23 Jul 2013 18:34:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 29738E5464 for ; Tue, 23 Jul 2013 18:34:34 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1374604434.1dc64039a45eb41f785f9f64a4ddbf9464e018ba.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:gsoc13/next commit in: doc/rst/ X-VCS-Repository: proj/R_overlay X-VCS-Files: doc/rst/usage.rst X-VCS-Directories: doc/rst/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 1dc64039a45eb41f785f9f64a4ddbf9464e018ba X-VCS-Branch: gsoc13/next Date: Tue, 23 Jul 2013 18:34:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f6cb2243-908d-4047-a1f5-fb0c7387ea3b X-Archives-Hash: 0875fecbc55a0b044e5ba1f4a5179d57 commit: 1dc64039a45eb41f785f9f64a4ddbf9464e018ba Author: André Erdmann mailerd de> AuthorDate: Tue Jul 23 18:33:54 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Tue Jul 23 18:33:54 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=1dc64039 doc/rst: add hook environment changes --- doc/rst/usage.rst | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/doc/rst/usage.rst b/doc/rst/usage.rst index 01c3411..204de09 100644 --- a/doc/rst/usage.rst +++ b/doc/rst/usage.rst @@ -542,6 +542,43 @@ to symbolic links if hard links are not supported. This should be fine in most cases, but fine-tuning can be done via OVERLAY_DISTDIR_STRATEGY_ and OVERLAY_DISTDIR_FLAT_. +------------------ + roverlay helpers +------------------ + +An installation of roverlay includes some helper programs: + +*roverlay-sh* + a wrapper around /bin/sh that runs a shell or shell script in roverlay's + `hook environment`_. + + roverlay-related scripts can use it to automatically inherit roverlay's + config and ``$FUNCTIONS`` file: + + .. code-block:: sh + + #!/usr/bin/roverlay-sh + + # reset DEBUG, VERBOSE, QUIET + DEBUG=n; QUIET=n; VERBOSE=y + + # load the functions file (optional) + . "${FUNCTIONS?}" || exit + + # script body + true + + <> + + +*name_is_todo--roverlay_creation_helper* + <> + Safely runs overlay creation <>. + Suitable for being run as cron job. + + + + =============================== Basic Implementation Overview =============================== @@ -2027,6 +2064,8 @@ the config file. An empty string sets the policy to *deny all*. +----------------+-------------------+-----------------------------------------+ | ROVERLAY_PHASE | event | event that caused the script to run | +----------------+-------------------+-----------------------------------------+ + | OVERLAY_NAME | config | name of the overlay | + +----------------+-------------------+-----------------------------------------+ | OVERLAY | config | overlay directory (`OVERLAY_DIR`_), | +----------------+-------------------+ initial working directory | | S | *$OVERLAY* | | @@ -2046,6 +2085,9 @@ the config file. An empty string sets the policy to *deny all*. +----------------+-------------------+ | | FILESDIR | *$ADDITIONS_DIR* | | +----------------+-------------------+-----------------------------------------+ + | WORKDIR | config | directory for work data | + | | | (`CACHEDIR`_) | + +----------------+-------------------+-----------------------------------------+ | SHLIB | *$ADDITIONS_DIR*, | A list of directories with shell | | | *installed?* | function files | | | | (optional, only set if any dir exists) | @@ -2053,6 +2095,19 @@ the config file. An empty string sets the policy to *deny all*. | FUNCTIONS | *$ADDITIONS_DIR*, | file with essential shell functions | | | *installed?* | (optional, only set if it exists) | +----------------+-------------------+-----------------------------------------+ + | DATADIR | *installed?* | location of installed data files | + | | | (directory, usually | + | | | */usr/share/roverlay*) | + +----------------+-------------------+-----------------------------------------+ + | ROVERLAY\ | sys.argv | path to the roverlay executable that | + | _HELPER_EXE | | created the hook environment | + | | | (usually */usr/bin/roverlay* or | + | | | */usr/bin/roverlay-sh*) | + +----------------+-------------------+-----------------------------------------+ + | ROVERLAY_EXE | guessed, | guessed path to the roverlay "main" | + | | *$ROVERLAY\ | executable (which creates the overlay) | + | | _HELPER_EXE* | | + +----------------+-------------------+-----------------------------------------+ | DEBUG | log level | *shbool* (``y`` or ``n``) that | | | | indicates whether debug messages should | | | | be printed | From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 26A9C1381F3 for ; Tue, 23 Jul 2013 18:34:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C87EAE0A6D; Tue, 23 Jul 2013 18:34:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 586CEE0A6D for ; Tue, 23 Jul 2013 18:34:38 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3557E33E98B for ; Tue, 23 Jul 2013 18:34:37 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id B16EEE546A for ; Tue, 23 Jul 2013 18:34:34 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1374604434.1dc64039a45eb41f785f9f64a4ddbf9464e018ba.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: doc/rst/ X-VCS-Repository: proj/R_overlay X-VCS-Files: doc/rst/usage.rst X-VCS-Directories: doc/rst/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 1dc64039a45eb41f785f9f64a4ddbf9464e018ba X-VCS-Branch: master Date: Tue, 23 Jul 2013 18:34:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: eb120201-237b-4d71-b01b-4f3ae60bcae8 X-Archives-Hash: 3119b075f0519de791378bac6e512af7 Message-ID: <20130723183434.LG_EinGzC_vZJXG_sy_Ht2v-JNzO0L8_RfMNkn1ai4s@z> commit: 1dc64039a45eb41f785f9f64a4ddbf9464e018ba Author: André Erdmann mailerd de> AuthorDate: Tue Jul 23 18:33:54 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Tue Jul 23 18:33:54 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=1dc64039 doc/rst: add hook environment changes --- doc/rst/usage.rst | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/doc/rst/usage.rst b/doc/rst/usage.rst index 01c3411..204de09 100644 --- a/doc/rst/usage.rst +++ b/doc/rst/usage.rst @@ -542,6 +542,43 @@ to symbolic links if hard links are not supported. This should be fine in most cases, but fine-tuning can be done via OVERLAY_DISTDIR_STRATEGY_ and OVERLAY_DISTDIR_FLAT_. +------------------ + roverlay helpers +------------------ + +An installation of roverlay includes some helper programs: + +*roverlay-sh* + a wrapper around /bin/sh that runs a shell or shell script in roverlay's + `hook environment`_. + + roverlay-related scripts can use it to automatically inherit roverlay's + config and ``$FUNCTIONS`` file: + + .. code-block:: sh + + #!/usr/bin/roverlay-sh + + # reset DEBUG, VERBOSE, QUIET + DEBUG=n; QUIET=n; VERBOSE=y + + # load the functions file (optional) + . "${FUNCTIONS?}" || exit + + # script body + true + + <> + + +*name_is_todo--roverlay_creation_helper* + <> + Safely runs overlay creation <>. + Suitable for being run as cron job. + + + + =============================== Basic Implementation Overview =============================== @@ -2027,6 +2064,8 @@ the config file. An empty string sets the policy to *deny all*. +----------------+-------------------+-----------------------------------------+ | ROVERLAY_PHASE | event | event that caused the script to run | +----------------+-------------------+-----------------------------------------+ + | OVERLAY_NAME | config | name of the overlay | + +----------------+-------------------+-----------------------------------------+ | OVERLAY | config | overlay directory (`OVERLAY_DIR`_), | +----------------+-------------------+ initial working directory | | S | *$OVERLAY* | | @@ -2046,6 +2085,9 @@ the config file. An empty string sets the policy to *deny all*. +----------------+-------------------+ | | FILESDIR | *$ADDITIONS_DIR* | | +----------------+-------------------+-----------------------------------------+ + | WORKDIR | config | directory for work data | + | | | (`CACHEDIR`_) | + +----------------+-------------------+-----------------------------------------+ | SHLIB | *$ADDITIONS_DIR*, | A list of directories with shell | | | *installed?* | function files | | | | (optional, only set if any dir exists) | @@ -2053,6 +2095,19 @@ the config file. An empty string sets the policy to *deny all*. | FUNCTIONS | *$ADDITIONS_DIR*, | file with essential shell functions | | | *installed?* | (optional, only set if it exists) | +----------------+-------------------+-----------------------------------------+ + | DATADIR | *installed?* | location of installed data files | + | | | (directory, usually | + | | | */usr/share/roverlay*) | + +----------------+-------------------+-----------------------------------------+ + | ROVERLAY\ | sys.argv | path to the roverlay executable that | + | _HELPER_EXE | | created the hook environment | + | | | (usually */usr/bin/roverlay* or | + | | | */usr/bin/roverlay-sh*) | + +----------------+-------------------+-----------------------------------------+ + | ROVERLAY_EXE | guessed, | guessed path to the roverlay "main" | + | | *$ROVERLAY\ | executable (which creates the overlay) | + | | _HELPER_EXE* | | + +----------------+-------------------+-----------------------------------------+ | DEBUG | log level | *shbool* (``y`` or ``n``) that | | | | indicates whether debug messages should | | | | be printed |