tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: xentools41 paths
On Thu, Mar 14, 2013 at 09:58:29PM +0100, Ignatios Souvatzis wrote:
> Here's what's missing from Aarons patch set:
>
> a) config paths, device paths adapted
> b) Trimming what's read out ... but instead of Aaron's adopted
> Rosetta code, using a new String class function.
>
> Hm... I wonder whether xenstored_proc_kva and xenstored_proc_port
> should be patched per-OS. What does cxenstored do in our pkg?
Updated to remove fixed pathes (using SUBST & friends).
-is
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/xentools41/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- Makefile 20 Jan 2013 15:21:54 -0000 1.28
+++ Makefile 15 Mar 2013 08:57:10 -0000
@@ -101,6 +104,7 @@
SUBST_CLASSES+= conf
SUBST_STAGE.conf= pre-configure
SUBST_FILES.conf+= python/xen/xm/create.py
+SUBST_FILES.conf+= ocaml/xenstored/define.ml
SUBST_SED.conf= -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g"
.include "../../mk/bsd.prefs.mk"
@@ -111,12 +115,22 @@
SUBST_CLASSES+= proc
SUBST_STAGE.proc= pre-configure
SUBST_FILES.proc= python/xen/xend/XendVnet.py
+SUBST_FILES.proc+= ocaml/xenstored/define.ml
SUBST_SED.proc= -e "s|/proc|/kern|g"
PROCPATH= /kern
.else
PROCPATH= /proc
.endif
+SUBST_CLASSES+= procdev
+SUBST_STAGE.procdev= pre-configure
+SUBST_FILES.procdev= ocaml/xenstored/define.ml
+.if ${OPSYS} == "NetBSD"
+SUBST_SED.procdev= -e "s|@PROCDEV@|/dev|g"
+.else
+SUBST_SED.procdev= -e "s|@PROCDEV@|/proc/xen|g"
+.endif
+
RCD_SCRIPTS= xen-watchdog xencommons xend xendomains
FILES_SUBST+= RCD_INTERPRETER=${PYTHONBIN:Q}
FILES_SUBST+= PROCPATH=${PROCPATH:Q}
RCS file: patches/patch-ocaml_xenstored_define.ml
diff -N patches/patch-ocaml_xenstored_define.ml
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-ocaml_xenstored_define.ml 15 Mar 2013 08:57:10 -0000
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- ocaml/xenstored/define.ml.orig 2012-11-24 07:27:21.000000000 +0000
++++ ocaml/xenstored/define.ml 2012-11-24 07:33:59.000000000 +0000
+@@ -17,13 +17,13 @@
+ let xenstored_major = 1
+ let xenstored_minor = 0
+
+-let xenstored_proc_kva = "/proc/xen/xsd_kva"
++let xenstored_proc_kva = "@PROCDEV@/xsd_kva"
+ let xenstored_proc_port = "/proc/xen/xsd_port"
+
+ let xs_daemon_socket = "/var/run/xenstored/socket"
+ let xs_daemon_socket_ro = "/var/run/xenstored/socket_ro"
+
+-let default_config_dir = "/etc/xensource"
++let default_config_dir = "@XENDCONFDIR@"
+
+ let maxwatch = ref (50)
+ let maxtransaction = ref (20)
Index: patches/patch-ocaml_xenstored_utils.ml
===================================================================
RCS file: patches/patch-ocaml_xenstored_utils.ml
diff -N patches/patch-ocaml_xenstored_utils.ml
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-ocaml_xenstored_utils.ml 15 Mar 2013 08:57:10 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ocaml/xenstored/utils.ml.orig
++++ ocaml/xenstored/utils.ml
+@@ -87,7 +83,7 @@ let read_file_single_integer filename =
+ let buf = String.make 20 (char_of_int 0) in
+ let sz = Unix.read fd buf 0 20 in
+ Unix.close fd;
+- int_of_string (String.sub buf 0 sz)
++ int_of_string (String.trim (String.sub buf 0 sz))
+
+ let path_complete path connection_path =
+ if String.get path 0 <> '/' then
Home |
Main Index |
Thread Index |
Old Index