public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: cygwin-apps@cygwin.com
Subject: Re: per-version hints proposal
Date: Mon, 19 Sep 2016 15:37:00 -0000	[thread overview]
Message-ID: <083d57ad-bbd8-7988-7016-a0e2e3f2522b@cornell.edu> (raw)
In-Reply-To: <87poo1b29n.fsf@Rainer.invalid>

[-- Attachment #1: Type: text/plain, Size: 535 bytes --]

On 9/18/2016 12:28 PM, Achim Gratz wrote:
> Achim Gratz writes:
>> Jon Turney writes:
>>> I notice the section about postinstall scripts doesn't mention
>>> permanent postinsall scripts at all.
>>>
>>> Could you possibly provide a couple of paragraphs?
>>
>> I had sent them to this very list at the time.  I need to dig them out
>> of the archive unless you're faster.
>
> There it is:
> https://cygwin.com/ml/cygwin-apps/2014-12/msg00148.html

The attached patch attempts to extract two paragraphs from this for the 
web page.

Ken


[-- Attachment #2: 0001-Add-information-about-perpetual-postinstall-scripts.patch --]
[-- Type: text/plain, Size: 3093 bytes --]

From 5950633d23c69cf84200409f2f5354901ecb7933 Mon Sep 17 00:00:00 2001
From: Ken Brown <kbrown@cornell.edu>
Date: Mon, 19 Sep 2016 11:30:34 -0400
Subject: [PATCH] Add information about perpetual postinstall scripts

Also mention ".dash" and ".cmd" suffixes.
---
 packaging-package-files.html | 39 ++++++++++++++++++++++++++++++++++-----
 1 file changed, 34 insertions(+), 5 deletions(-)

diff --git a/packaging-package-files.html b/packaging-package-files.html
index fdf7fdc..e5db8c5 100755
--- a/packaging-package-files.html
+++ b/packaging-package-files.html
@@ -160,13 +160,17 @@ etc...
 <p>
   If your package requires certain commands to be executed after the files in
   the package are installed, include them in a file in the package called
-  /etc/postinstall/<var>package</var>.sh or
-  /etc/postinstall/<var>package</var>.bat.
+  /etc/postinstall/<var>package</var>.sh,
+  /etc/postinstall/<var>package</var>.dash,
+  /etc/postinstall/<var>package</var>.bat, or
+  /etc/postinstall/<var>package</var>.cmd.
 </p>
 <p>
-  If the file's name ends in ".sh", it is executed with the Cygwin shell; if it
-  ends in ".bat", it is executed with the DOS command interpreter. If it doesn't
-  end with either of these suffixes, it is ignored.
+  If the file's name ends in ".sh", it is executed with the Cygwin
+  bash shell; if it ends in ".dash", it is executed with the Cygwin
+  dash shell; if it ends in ".bat" or ".cmd", it is executed with the
+  Windows command interpreter. If it doesn't end with any of these
+  suffixes, it is ignored.
 </p>
 <p>
   After the script has been successfully run it is renamed by appending the
@@ -183,6 +187,31 @@ etc...
   scripts have already been run.
 </p>
 
+<h2>Perpetual postinstall scripts</h2>
+<p>
+  In addition to the ordinary ("run-once") postinstall scripts
+  described above, the setup program supports "perpetual" postinstall
+  scripts.  These are run on every invocation of setup and do not have
+  ".done" appended to their names after they are run.  Perpetual
+  postinstall scripts are distinguished from run-once scripts by
+  having names that start with "0p_" or "zp_".  Those that start with
+  "0p_" are run before the run-once scripts, and those that start with
+  "zp_" are run after the run-once scripts.  Examples include
+  0p_000_autorebase.dash (provided by the _autorebase package) and
+  0p_update-info-dir.dash (provided by the info package).
+</p>
+<p>
+  For those package maintainers wanting to employ perpetual scripts,
+  the first thing to keep in mind is to only use this feature for
+  things that really can't be done with run-once scripting.  Any
+  perpetual script should minimize the resources used (use dash
+  instead of bash for instance) and exit at the earliest possible
+  moment if no action is required.  Scripts of type "0p_" must be able
+  to run with the Base packages installed but the postinstall scripts
+  not yet executed; in practical terms that rules out using bash
+  scripts.  This limitation does not apply to scripts of type "zp_".
+</p>
+
 </div>
 </body>
 </html>
-- 
2.8.3


  reply	other threads:[~2016-09-19 15:37 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20 15:28 Jon Turney
2016-06-21 12:03 ` Corinna Vinschen
2016-06-21 13:49   ` Marco Atzeri
2016-06-21 14:28     ` Corinna Vinschen
2016-06-21 15:32       ` Marco Atzeri
2016-06-21 14:09   ` Eric Blake
2016-06-21 14:27     ` Corinna Vinschen
2016-06-21 18:04     ` Achim Gratz
2016-06-21 18:27   ` Jon Turney
2016-08-30 12:24 ` Jon Turney
2016-08-31 19:14   ` Achim Gratz
2016-09-01 17:15     ` Jon Turney
2016-12-08 19:30   ` Jon Turney
2016-12-09 10:46     ` Corinna Vinschen
2016-12-09 11:10       ` Corinna Vinschen
2016-12-12 13:29         ` Jon Turney
2016-12-12 13:29       ` Jon Turney
2017-04-08 17:00     ` Achim Gratz
2017-04-12 20:51       ` Ken Brown
2017-04-13  6:24         ` Achim Gratz
2016-09-17  6:15 ` Achim Gratz
2016-09-18  5:17   ` Marco Atzeri
2016-09-18 15:14     ` Jon Turney
2016-09-18 16:12       ` Achim Gratz
2016-09-18 16:29         ` Achim Gratz
2016-09-19 15:37           ` Ken Brown [this message]
2016-09-19 18:24             ` Achim Gratz
2016-09-19 22:23               ` Jon Turney
2016-09-18 16:40       ` Ken Brown
2016-09-18 16:53         ` Marco Atzeri
2016-09-18 17:16           ` Achim Gratz
2016-09-18 18:08             ` Marco Atzeri
2016-09-22 13:44 ` Eric Blake
2016-12-10 22:42 ` How to override previous version? David Rothenberger
2016-12-11  0:03   ` Jon Turney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=083d57ad-bbd8-7988-7016-a0e2e3f2522b@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).