Hi
Here's a working version with help from ajacoutot@. Thanks!
Cheers
Tom

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/ajaxterm/Makefile,v
retrieving revision 1.13
diff -N -u Makefile
--- Makefile    16 Sep 2011 12:00:05 -0000      1.13
+++ Makefile    7 Jun 2012 13:25:27 -0000
@@ -4,7 +4,7 @@
 
 DISTNAME =             Ajaxterm-0.10
 PKGNAME =              ajaxterm-0.10
-REVISION =             6
+REVISION =             7
 
 CATEGORIES =           net security www
 PKG_ARCH =             *
@@ -39,6 +39,7 @@
        ${INSTALL_DATA} ${WRKDIST}/sarissa_dhtml.js ${SHARE}
        perl -pi -e 's/ajaxterm.py/ajaxterm/' ${WRKDIST}/ajaxterm.1
        ${INSTALL_MAN}  ${WRKDIST}/ajaxterm.1 ${PREFIX}/man/man1/ajaxterm.1
+       ${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py ${PREFIX}/share/ajaxterm
 
 
 
Index: patches/patch-ajaxterm_py
===================================================================
RCS file: /cvs/ports/www/ajaxterm/patches/patch-ajaxterm_py,v
retrieving revision 1.2
diff -N -u patches/patch-ajaxterm_py
--- patches/patch-ajaxterm_py   6 Apr 2009 15:30:13 -0000       1.2
+++ patches/patch-ajaxterm_py   7 Jun 2012 13:25:27 -0000
@@ -1,6 +1,6 @@
-$OpenBSD: patch-ajaxterm_py,v 1.2 2009/04/06 15:30:13 ajacoutot Exp $
---- ajaxterm.py.orig   Sun Oct 29 03:52:39 2006
-+++ ajaxterm.py        Tue Mar 31 12:32:31 2009
+$OpenBSD$
+--- ajaxterm.py.orig   Thu Jun  7 13:54:38 2012
++++ ajaxterm.py        Thu Jun  7 13:58:37 2012
 @@ -1,12 +1,13 @@
 -#!/usr/bin/env python
 +#!${MODPY_BIN}
@@ -14,7 +14,7 @@
 +print(os.path.normpath(os.path.dirname(__file__)+'/../share/ajaxterm'))
  # Optional: Add QWeb in sys path
 -sys.path[0:0]=glob.glob('../../python')
-+sys.path[0:0]=glob.glob('.');
++sys.path[0:0]=glob.glob('.')
  
  import qweb
  
@@ -32,7 +32,7 @@
                        fcntl.fcntl(fd, fcntl.F_SETFL, os.O_NONBLOCK)
                        # python bug http://python.org/sf/1112949 on amd64
 -                      fcntl.ioctl(fd, 
struct.unpack('i',struct.pack('I',termios.TIOCSWINSZ))[0], 
struct.pack("HHHH",h,w,0,0))
-+                      fcntl.ioctl(fd, long(struct.unpack('i',struct.pack('l', 
termios.TIOCSWINSZ))[0]), struct.pack("HHHH",h,w,0,0))
++                      fcntl.ioctl(fd, termios.TIOCSWINSZ, 
struct.pack("HHHH",h,w,0,0))
                        
self.proc[fd]={'pid':pid,'term':Terminal(w,h),'buf':'','time':time.time()}
                        return fd
        def die(self):
Index: pkg/MESSAGE
===================================================================
RCS file: /cvs/ports/www/ajaxterm/pkg/MESSAGE,v
retrieving revision 1.2
diff -N -u pkg/MESSAGE
--- pkg/MESSAGE 6 Apr 2009 15:30:13 -0000       1.2
+++ pkg/MESSAGE 7 Jun 2012 13:25:27 -0000
@@ -1,6 +1,4 @@
 Some specific installation is needed:
-- run the ajaxterm proxy from /etc/rc, e.g.,
-ajaxterm -d -u _ajaxterm 
 
 - modify your http config to redirect to it, only from ssl modes.
 
@@ -11,5 +9,5 @@
 section <VirtualHost _default_:443>
 
 add something like:
-       ProxyPass /ajaxterm/ http://localhost:8022/
-       ProxyPassReverse /ajaxterm http://localhost:8022/
+       ProxyPass /ajaxterm/ http://127.0.0.1:8022/
+       ProxyPassReverse /ajaxterm http://127.0.0.1:8022/
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/ajaxterm/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -N -u pkg/PLIST
--- pkg/PLIST   3 Feb 2009 10:52:36 -0000       1.1.1.1
+++ pkg/PLIST   7 Jun 2012 13:25:27 -0000
@@ -8,5 +8,7 @@
 share/ajaxterm/ajaxterm.html
 share/ajaxterm/ajaxterm.js
 share/ajaxterm/qweb.py
+share/ajaxterm/qweb.pyc
 share/ajaxterm/sarissa.js
 share/ajaxterm/sarissa_dhtml.js
+@rcscript ${RCDIR}/ajaxterm
Index: pkg/ajaxterm.rc
===================================================================
RCS file: pkg/ajaxterm.rc
diff -N -u pkg/ajaxterm.rc
--- /dev/null   7 Jun 2012 07:25:27 -0000
+++ pkg/ajaxterm.rc     7 Jun 2012 13:25:27 -0000
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# $OpenBSD$
+
+daemon="${TRUEPREFIX}/bin/ajaxterm"
+daemon_flags="-d -u _ajaxterm --command=/usr/bin/login"
+
+. /etc/rc.d/rc.subr
+
+pexp="${MODPY_BIN} ${daemon}${daemon_flags:+ ${daemon_flags}}"
+
+rc_bg=YES
+rc_reload=NO
+
+rc_cmd $1

On Thu, May 31, 2012 at 02:56:04PM +0100, Tom Doherty wrote:
> Hi
> Here's an update to the www/ajaxterm port. This is not a new version but I
> have added an rcscript and I have updated the message to use 127.0.0.1 when
> configuring httpd so this now works as expected with a default install in the
> chroot.
> Cheers
> Tom
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/www/ajaxterm/Makefile,v
> retrieving revision 1.13
> diff -N -u Makefile
> --- Makefile  16 Sep 2011 12:00:05 -0000      1.13
> +++ Makefile  31 May 2012 13:53:06 -0000
> @@ -4,7 +4,7 @@
>  
>  DISTNAME =           Ajaxterm-0.10
>  PKGNAME =            ajaxterm-0.10
> -REVISION =           6
> +REVISION =           7
>  
>  CATEGORIES =         net security www
>  PKG_ARCH =           *
> Index: pkg/MESSAGE
> ===================================================================
> RCS file: /cvs/ports/www/ajaxterm/pkg/MESSAGE,v
> retrieving revision 1.2
> diff -N -u pkg/MESSAGE
> --- pkg/MESSAGE       6 Apr 2009 15:30:13 -0000       1.2
> +++ pkg/MESSAGE       31 May 2012 13:53:06 -0000
> @@ -1,6 +1,4 @@
>  Some specific installation is needed:
> -- run the ajaxterm proxy from /etc/rc, e.g.,
> -ajaxterm -d -u _ajaxterm 
>  
>  - modify your http config to redirect to it, only from ssl modes.
>  
> @@ -11,5 +9,5 @@
>  section <VirtualHost _default_:443>
>  
>  add something like:
> -       ProxyPass /ajaxterm/ http://localhost:8022/
> -       ProxyPassReverse /ajaxterm http://localhost:8022/
> +       ProxyPass /ajaxterm/ http://127.0.0.1:8022/
> +       ProxyPassReverse /ajaxterm http://127.0.0.1:8022/
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/www/ajaxterm/pkg/PLIST,v
> retrieving revision 1.1.1.1
> diff -N -u pkg/PLIST
> --- pkg/PLIST 3 Feb 2009 10:52:36 -0000       1.1.1.1
> +++ pkg/PLIST 31 May 2012 13:53:06 -0000
> @@ -10,3 +10,4 @@
>  share/ajaxterm/qweb.py
>  share/ajaxterm/sarissa.js
>  share/ajaxterm/sarissa_dhtml.js
> +@rcscript ${RCDIR}/ajaxterm
> Index: pkg/ajaxterm.rc
> ===================================================================
> RCS file: pkg/ajaxterm.rc
> diff -N -u pkg/ajaxterm.rc
> --- /dev/null 31 May 2012 07:53:06 -0000
> +++ pkg/ajaxterm.rc   31 May 2012 13:53:06 -0000
> @@ -0,0 +1,15 @@
> +#!/bin/sh
> +#
> +# $OpenBSD$
> +
> +daemon="${TRUEPREFIX}/bin/ajaxterm"
> +daemon_flags="-d -u _ajaxterm"
> +
> +. /etc/rc.d/rc.subr
> +
> +pexp="${MODPY_BIN} ${daemon}${daemon_flags:+ ${daemon_flags}}"
> +
> +rc_bg=YES
> +rc_reload=NO
> +
> +rc_cmd $1

Reply via email to