[Debian-astro-commits] [iraf] 01/01: Separate /etc/iraf/login.cl patch from FHS

Ole Streicher olebole at moszumanska.debian.org
Sat Dec 2 13:47:06 UTC 2017


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to branch master
in repository iraf.

commit 73abf852771c7dad526ba9820804b2122e7fdb21
Author: Ole Streicher <olebole at debian.org>
Date:   Sat Dec 2 14:46:35 2017 +0100

    Separate /etc/iraf/login.cl patch from FHS
---
 debian/patches/Adjust-tests-for-FHS-paths.patch    |  81 +++++++++-
 .../patches/Adjust-version-number-and-motd.patch   |   8 +-
 .../patches/Create-a-global-login.cl-in-etc.patch  |  95 ++++++++++++
 debian/patches/Don-t-call-back-home-on-start.patch |   4 +-
 .../Make-the-installation-FHS-conform.patch        | 167 +--------------------
 debian/patches/series                              |   5 +-
 6 files changed, 184 insertions(+), 176 deletions(-)

diff --git a/debian/patches/Adjust-tests-for-FHS-paths.patch b/debian/patches/Adjust-tests-for-FHS-paths.patch
index 90e6f54..238de88 100644
--- a/debian/patches/Adjust-tests-for-FHS-paths.patch
+++ b/debian/patches/Adjust-tests-for-FHS-paths.patch
@@ -3,10 +3,85 @@ Date: Thu, 30 Nov 2017 14:43:05 +0100
 Subject: Adjust tests for FHS paths
 
 ---
- test/numerical-recipes.md | 11 +++++++----
- test/run_tests            | 11 +++++++++--
- 2 files changed, 16 insertions(+), 6 deletions(-)
+ test/files.md             | 56 +++++++++++++++++++++++------------------------
+ test/numerical-recipes.md | 11 ++++++----
+ test/run_tests            | 11 ++++++++--
+ 3 files changed, 44 insertions(+), 34 deletions(-)
 
+diff --git a/test/files.md b/test/files.md
+index 1684d2e..f703377 100644
+--- a/test/files.md
++++ b/test/files.md
+@@ -28,30 +28,30 @@ bin$x_vol.e
+ ```
+ 
+ ```
+-cl> dir host$bin/*.e ncol=1
+-host$bin/alloc.e
+-host$bin/f2c.e
+-host$bin/generic.e
+-host$bin/mkpkg.e
+-host$bin/rmbin.e
+-host$bin/rmfiles.e
+-host$bin/rpp.e
+-host$bin/rtar.e
+-host$bin/sgi2gif.e
+-host$bin/sgi2svg.e
+-host$bin/sgi2uapl.e
+-host$bin/sgi2ueps.e
+-host$bin/sgi2uhpgl.e
+-host$bin/sgi2uhplj.e
+-host$bin/sgi2uimp.e
+-host$bin/sgi2uptx.e
+-host$bin/sgi2uqms.e
+-host$bin/sgi2xbm.e
+-host$bin/sgidispatch.e
+-host$bin/wtar.e
+-host$bin/xc.e
+-host$bin/xpp.e
+-host$bin/xyacc.e
++cl> dir hbin$*.e ncol=1
++hbin$alloc.e
++hbin$f2c.e
++hbin$generic.e
++hbin$mkpkg.e
++hbin$rmbin.e
++hbin$rmfiles.e
++hbin$rpp.e
++hbin$rtar.e
++hbin$sgi2gif.e
++hbin$sgi2svg.e
++hbin$sgi2uapl.e
++hbin$sgi2ueps.e
++hbin$sgi2uhpgl.e
++hbin$sgi2uhplj.e
++hbin$sgi2uimp.e
++hbin$sgi2uptx.e
++hbin$sgi2uqms.e
++hbin$sgi2xbm.e
++hbin$sgidispatch.e
++hbin$wtar.e
++hbin$xc.e
++hbin$xpp.e
++hbin$xyacc.e
+ ```
+ 
+ # Libraries
+@@ -90,10 +90,10 @@ bin$libxtools.a
+ ```
+ 
+ ```
+-cl> dir host$bin/*.a ncol=1
+-host$bin/libboot.a
+-host$bin/libf2c.a
+-host$bin/libos.a
++cl> dir hbin$*.a ncol=1
++hbin$libboot.a
++hbin$libf2c.a
++hbin$libos.a
+ ```
+ 
+ ## NOAO packages
 diff --git a/test/numerical-recipes.md b/test/numerical-recipes.md
 index 495962a..f2801b8 100644
 --- a/test/numerical-recipes.md
diff --git a/debian/patches/Adjust-version-number-and-motd.patch b/debian/patches/Adjust-version-number-and-motd.patch
index ee76d2a..074b592 100644
--- a/debian/patches/Adjust-version-number-and-motd.patch
+++ b/debian/patches/Adjust-version-number-and-motd.patch
@@ -12,7 +12,7 @@ Subject: Adjust version number and motd
  create mode 100644 unix/hlib/motd.etc
 
 diff --git a/unix/hlib/login.cl b/unix/hlib/login.cl
-index 5a4d375..5ce0670 100644
+index 24b1c98..5fd0201 100644
 --- a/unix/hlib/login.cl
 +++ b/unix/hlib/login.cl
 @@ -2,7 +2,7 @@
@@ -22,9 +22,9 @@ index 5a4d375..5ce0670 100644
 -    logver = "IRAF V2.16.1 Oct 2013"
 +    logver = envget("version")
  
- set	home		= "U_HOME"
- set	imdir		= "U_IMDIR"
-@@ -136,7 +136,10 @@ cache   directory page type help
+ set	home		= (envget("HOME")  // "/.iraf/")
+ set	imdir		= "home$imdir/"
+@@ -131,7 +131,10 @@ cache   directory page type help
  if (access (".hushiraf"))
      menus = no
  else {
diff --git a/debian/patches/Create-a-global-login.cl-in-etc.patch b/debian/patches/Create-a-global-login.cl-in-etc.patch
new file mode 100644
index 0000000..7f5ae68
--- /dev/null
+++ b/debian/patches/Create-a-global-login.cl-in-etc.patch
@@ -0,0 +1,95 @@
+From: Ole Streicher <olebole at debian.org>
+Date: Sat, 25 Nov 2017 15:45:49 +0100
+Subject: Create a global login.cl in /etc
+
+---
+ pkg/cl/main.c      | 12 +++++++++++-
+ pkg/ecl/main.c     | 12 +++++++++++-
+ unix/hlib/login.cl | 19 +++++++------------
+ 3 files changed, 29 insertions(+), 14 deletions(-)
+
+diff --git a/pkg/cl/main.c b/pkg/cl/main.c
+index 0471f4c..6027bf3 100644
+--- a/pkg/cl/main.c
++++ b/pkg/cl/main.c
+@@ -491,7 +491,17 @@ login (char *cmd)
+                 compile (REDIRIN);
+                 compile (EXEC);
+             } else {
+-                printf ("Warning: no login.cl found in login directory\n");
++                memset (global, 0, SZ_LINE);
++                strcpy (global, "/etc/iraf/login.cl");
++                if (c_access (global, 0, 0) == YES) {
++                    o.o_val.v_s = global;
++                    compile (CALL, "cl");
++                    compile (PUSHCONST, &o);
++                    compile (REDIRIN);
++                    compile (EXEC);
++                } else {
++                    printf ("Warning: no login.cl found in login directory\n");
++                }
+             }
+ 
+ 	} else {
+diff --git a/pkg/ecl/main.c b/pkg/ecl/main.c
+index ee1aeae..7e927c9 100644
+--- a/pkg/ecl/main.c
++++ b/pkg/ecl/main.c
+@@ -540,7 +540,17 @@ login (char *cmd)
+                 compile (REDIRIN);
+                 compile (EXEC);
+             } else {
+-                printf ("Warning: no login.cl found in login directory\n");
++                memset (global, 0, SZ_LINE);
++                strcpy (global, "/etc/iraf/login.cl");
++                if (c_access (global, 0, 0) == YES) {
++                    o.o_val.v_s = global;
++                    compile (CALL, "cl");
++                    compile (PUSHCONST, &o);
++                    compile (REDIRIN);
++                    compile (EXEC);
++                } else {
++                    printf ("Warning: no login.cl found in login directory\n");
++                }
+             }
+ 
+ 	} else {
+diff --git a/unix/hlib/login.cl b/unix/hlib/login.cl
+index 5a4d375..24b1c98 100644
+--- a/unix/hlib/login.cl
++++ b/unix/hlib/login.cl
+@@ -4,19 +4,14 @@
+ if (defpar ("logver"))
+     logver = "IRAF V2.16.1 Oct 2013"
+ 
+-set	home		= "U_HOME"
+-set	imdir		= "U_IMDIR"
+-set	cache		= "U_CACHEDIR"
++set	home		= (envget("HOME")  // "/.iraf/")
++set	imdir		= "home$imdir/"
++set	cache		= "home$cache/"
+ set	uparm		= "home$uparm/"
+-set	userid		= "U_USER"
+-
+-# Set the terminal type.  We assume the user has defined this correctly 
+-# when issuing the MKIRAF and no longer key off the unix TERM to set a
+-# default.
+-if (access (".hushiraf") == no)
+-    print "setting terminal type to 'U_TERM' ..."
+-stty U_TERM
++set	userid		= envget("USER")
+ 
++# Set the terminal type.
++#stty	xgterm		# xgterm, xtermjh, xterm
+ 
+ #============================================================================
+ # Uncomment and edit to change the defaults.
+@@ -147,7 +142,7 @@ chkupdate
+ # Notify the user if we're using the global login.
+ path (".") | scan (s1)
+ if ( osfn("home$") != substr (s1, strldx("!",s1)+1, strlen(s1)) ) {
+-    printf ("  ***  Using global login file:  %slogin.cl\n", osfn("home$"))
++    printf ("  ***  Using global login file:  /etc/iraf/login.cl\n")
+ }
+ ;
+ 
diff --git a/debian/patches/Don-t-call-back-home-on-start.patch b/debian/patches/Don-t-call-back-home-on-start.patch
index 0508253..2ad140e 100644
--- a/debian/patches/Don-t-call-back-home-on-start.patch
+++ b/debian/patches/Don-t-call-back-home-on-start.patch
@@ -7,10 +7,10 @@ Subject: Don't call back home on start
  1 file changed, 2 deletions(-)
 
 diff --git a/unix/hlib/login.cl b/unix/hlib/login.cl
-index 5ce0670..6d8c4c5 100644
+index 5fd0201..4677fa4 100644
 --- a/unix/hlib/login.cl
 +++ b/unix/hlib/login.cl
-@@ -144,8 +144,6 @@ else {
+@@ -139,8 +139,6 @@ else {
  
  
  #============================================================================
diff --git a/debian/patches/Make-the-installation-FHS-conform.patch b/debian/patches/Make-the-installation-FHS-conform.patch
index d3744bb..0cb8111 100644
--- a/debian/patches/Make-the-installation-FHS-conform.patch
+++ b/debian/patches/Make-the-installation-FHS-conform.patch
@@ -7,14 +7,10 @@ the system dependent files (binaries) in /usr/lib/iraf.
 ---
  noao/lib/zzsetenv.def  |  4 ++--
  pkg/cl/exec.c          |  2 +-
- pkg/cl/main.c          | 12 ++++++++++-
  pkg/ecl/exec.c         |  2 +-
- pkg/ecl/main.c         | 12 ++++++++++-
- test/files.md          | 56 +++++++++++++++++++++++++-------------------------
- unix/hlib/login.cl     | 19 +++++++----------
  unix/hlib/zzsetenv.def |  3 ++-
- unix/os/irafpath.c     | 10 +++++++++
- 9 files changed, 73 insertions(+), 47 deletions(-)
+ unix/os/irafpath.c     | 10 ++++++++++
+ 5 files changed, 16 insertions(+), 5 deletions(-)
 
 diff --git a/noao/lib/zzsetenv.def b/noao/lib/zzsetenv.def
 index c38a4be..d51ff4c 100644
@@ -43,29 +39,6 @@ index efbd98b..25e9f2d 100644
  	    /*  The binary wasn't found in the expected bin directory, but
  	     *  on certain platforms look for alternate binaries that may
  	     *  work.  This supports backward compatability with older
-diff --git a/pkg/cl/main.c b/pkg/cl/main.c
-index 0471f4c..6027bf3 100644
---- a/pkg/cl/main.c
-+++ b/pkg/cl/main.c
-@@ -491,7 +491,17 @@ login (char *cmd)
-                 compile (REDIRIN);
-                 compile (EXEC);
-             } else {
--                printf ("Warning: no login.cl found in login directory\n");
-+                memset (global, 0, SZ_LINE);
-+                strcpy (global, "/etc/iraf/login.cl");
-+                if (c_access (global, 0, 0) == YES) {
-+                    o.o_val.v_s = global;
-+                    compile (CALL, "cl");
-+                    compile (PUSHCONST, &o);
-+                    compile (REDIRIN);
-+                    compile (EXEC);
-+                } else {
-+                    printf ("Warning: no login.cl found in login directory\n");
-+                }
-             }
- 
- 	} else {
 diff --git a/pkg/ecl/exec.c b/pkg/ecl/exec.c
 index 322a3ce..4e70bf6 100644
 --- a/pkg/ecl/exec.c
@@ -79,142 +52,6 @@ index 322a3ce..4e70bf6 100644
  	    /*  The binary wasn't found in the expected bin directory, but
  	     *  on certain platforms look for alternate binaries that may
  	     *  work.  This supports backward compatability with older
-diff --git a/pkg/ecl/main.c b/pkg/ecl/main.c
-index ee1aeae..7e927c9 100644
---- a/pkg/ecl/main.c
-+++ b/pkg/ecl/main.c
-@@ -540,7 +540,17 @@ login (char *cmd)
-                 compile (REDIRIN);
-                 compile (EXEC);
-             } else {
--                printf ("Warning: no login.cl found in login directory\n");
-+                memset (global, 0, SZ_LINE);
-+                strcpy (global, "/etc/iraf/login.cl");
-+                if (c_access (global, 0, 0) == YES) {
-+                    o.o_val.v_s = global;
-+                    compile (CALL, "cl");
-+                    compile (PUSHCONST, &o);
-+                    compile (REDIRIN);
-+                    compile (EXEC);
-+                } else {
-+                    printf ("Warning: no login.cl found in login directory\n");
-+                }
-             }
- 
- 	} else {
-diff --git a/test/files.md b/test/files.md
-index 1684d2e..f703377 100644
---- a/test/files.md
-+++ b/test/files.md
-@@ -28,30 +28,30 @@ bin$x_vol.e
- ```
- 
- ```
--cl> dir host$bin/*.e ncol=1
--host$bin/alloc.e
--host$bin/f2c.e
--host$bin/generic.e
--host$bin/mkpkg.e
--host$bin/rmbin.e
--host$bin/rmfiles.e
--host$bin/rpp.e
--host$bin/rtar.e
--host$bin/sgi2gif.e
--host$bin/sgi2svg.e
--host$bin/sgi2uapl.e
--host$bin/sgi2ueps.e
--host$bin/sgi2uhpgl.e
--host$bin/sgi2uhplj.e
--host$bin/sgi2uimp.e
--host$bin/sgi2uptx.e
--host$bin/sgi2uqms.e
--host$bin/sgi2xbm.e
--host$bin/sgidispatch.e
--host$bin/wtar.e
--host$bin/xc.e
--host$bin/xpp.e
--host$bin/xyacc.e
-+cl> dir hbin$*.e ncol=1
-+hbin$alloc.e
-+hbin$f2c.e
-+hbin$generic.e
-+hbin$mkpkg.e
-+hbin$rmbin.e
-+hbin$rmfiles.e
-+hbin$rpp.e
-+hbin$rtar.e
-+hbin$sgi2gif.e
-+hbin$sgi2svg.e
-+hbin$sgi2uapl.e
-+hbin$sgi2ueps.e
-+hbin$sgi2uhpgl.e
-+hbin$sgi2uhplj.e
-+hbin$sgi2uimp.e
-+hbin$sgi2uptx.e
-+hbin$sgi2uqms.e
-+hbin$sgi2xbm.e
-+hbin$sgidispatch.e
-+hbin$wtar.e
-+hbin$xc.e
-+hbin$xpp.e
-+hbin$xyacc.e
- ```
- 
- # Libraries
-@@ -90,10 +90,10 @@ bin$libxtools.a
- ```
- 
- ```
--cl> dir host$bin/*.a ncol=1
--host$bin/libboot.a
--host$bin/libf2c.a
--host$bin/libos.a
-+cl> dir hbin$*.a ncol=1
-+hbin$libboot.a
-+hbin$libf2c.a
-+hbin$libos.a
- ```
- 
- ## NOAO packages
-diff --git a/unix/hlib/login.cl b/unix/hlib/login.cl
-index 6d8c4c5..4677fa4 100644
---- a/unix/hlib/login.cl
-+++ b/unix/hlib/login.cl
-@@ -4,19 +4,14 @@
- if (defpar ("logver"))
-     logver = envget("version")
- 
--set	home		= "U_HOME"
--set	imdir		= "U_IMDIR"
--set	cache		= "U_CACHEDIR"
-+set	home		= (envget("HOME")  // "/.iraf/")
-+set	imdir		= "home$imdir/"
-+set	cache		= "home$cache/"
- set	uparm		= "home$uparm/"
--set	userid		= "U_USER"
--
--# Set the terminal type.  We assume the user has defined this correctly 
--# when issuing the MKIRAF and no longer key off the unix TERM to set a
--# default.
--if (access (".hushiraf") == no)
--    print "setting terminal type to 'U_TERM' ..."
--stty U_TERM
-+set	userid		= envget("USER")
- 
-+# Set the terminal type.
-+#stty	xgterm		# xgterm, xtermjh, xterm
- 
- #============================================================================
- # Uncomment and edit to change the defaults.
-@@ -148,7 +143,7 @@ else {
- # Notify the user if we're using the global login.
- path (".") | scan (s1)
- if ( osfn("home$") != substr (s1, strldx("!",s1)+1, strlen(s1)) ) {
--    printf ("  ***  Using global login file:  %slogin.cl\n", osfn("home$"))
-+    printf ("  ***  Using global login file:  /etc/iraf/login.cl\n")
- }
- ;
- 
 diff --git a/unix/hlib/zzsetenv.def b/unix/hlib/zzsetenv.def
 index 6fc73f6..ea622fc 100644
 --- a/unix/hlib/zzsetenv.def
diff --git a/debian/patches/series b/debian/patches/series
index df7356f..50e7e22 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,9 +1,10 @@
 Use-system-libraries-when-possible.patch
-Adjust-version-number-and-motd.patch
 Allow-plus-sign-in-build-path.patch
+Create-a-global-login.cl-in-etc.patch
+Adjust-version-number-and-motd.patch
 Don-t-call-back-home-on-start.patch
 Make-the-installation-FHS-conform.patch
+Adjust-tests-for-FHS-paths.patch
 Separate-NOAO-and-dev-packages.patch
 Propagate-CFLAGS-and-debug-flag-to-xc.patch
 Add-reportbug-CL-command.patch
-Adjust-tests-for-FHS-paths.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/iraf.git



More information about the Debian-astro-commits mailing list