[Pkg-ocaml-maint-commits] [SCM] OCaml packaging branch, experimental/master, updated. debian/4.00.0_beta2-2-12-g11a1ff5

Stephane Glondu steph at glondu.net
Sat Jul 21 14:57:49 UTC 2012


The following commit has been merged in the experimental/master branch:
commit d0dd1b724156a0dc0867dcc2343d0277c12c8c06
Merge: 8cc09d9279c35fad3422169e6ddbc9dc78f3a3e1 560bdc6a5d31582c4330f60a81be69b196c27b1a
Author: Stephane Glondu <steph at glondu.net>
Date:   Sat Jul 21 15:13:51 2012 +0200

    Merge branch 'master' into experimental/master
    
    Conflicts:
    	patch for Debian-specific behaviour of -custom

diff --combined debian/changelog
index 007d764,24fb792..de3352a
--- a/debian/changelog
+++ b/debian/changelog
@@@ -1,53 -1,9 +1,59 @@@
 +ocaml (4.00.0~rc1-1) UNRELEASED; urgency=low
 +
 +  * New upstream release candidate
 +
 + -- Stéphane Glondu <glondu at debian.org>  Sat, 21 Jul 2012 14:37:03 +0200
 +
 +ocaml (4.00.0~beta2-2) experimental; urgency=low
 +
 +  * Fix natdynlink detection on sparc
 +  * Cherry-pick an upstream fix in native compilation on powerpc
 +  * Fixes in the test suite:
 +    - use legacy -custom for lib-marshal test
 +    - some tests were still triggering ocamlopt even on bytecode
 +    - fix asmcomp tests on powerpc
 +    - fix symbol mangling in asmcomp tests on kfreebsd-i386 and sparc
 +  * Bump Standards-Version to 3.9.3
 +
 + -- Stéphane Glondu <glondu at debian.org>  Thu, 21 Jun 2012 16:42:25 +0200
 +
 +ocaml (4.00.0~beta2-1) experimental; urgency=low
 +
 +  * New upstream beta release
 +    - new "R" parameter in OCAMLRUNPARAMS to enable automatic
 +      randomization of the generic hash function (Closes: #659149,
 +      CVE-2012-0839)
 +    - the layout of the ocaml-compiler-libs binary package has changed
 +      significantly as a result of upstream installing +compiler-libs by
 +      itself; toplevel libraries have been moved there
 +  * Change the layout of the ocaml-source binary package
 +  * Merge changes from version 3.12.1-3
 +
 + -- Stéphane Glondu <glondu at debian.org>  Wed, 13 Jun 2012 22:38:41 +0200
 +
 +ocaml (4.00.0~~dev15+12379-1) experimental; urgency=low
 +
 +  * New upstream snapshot, based on the 4.00 upstream branch
 +    - partially revert r12328 to avoid FTBFS
 +    - the dbm bindings have been removed upstream and are now released
 +      separately
 +    - declare armel and armhf as native architectures supporting
 +      natdynlink
 +  * Run the test-suite
 +    - on kfreebsd-*, skip lib-thread tests (they hang and I am not able
 +      to reproduce it myself)
 +    - on slow architectures, skip some tests that take too much time
 +    - fix asmcomp tests on Hurd (Closes: #661716)
 +    - fix "embedded" test broken by our -custom behaviour
 +
 + -- Stéphane Glondu <glondu at debian.org>  Thu, 19 Apr 2012 09:04:28 +0200
 +
+ ocaml (3.12.1-4) unstable; urgency=low
+ 
+   * Change the Debian-specific behaviour of -custom (Closes: #678577)
+ 
+  -- Stéphane Glondu <glondu at debian.org>  Tue, 26 Jun 2012 21:39:18 +0200
+ 
  ocaml (3.12.1-3) unstable; urgency=low
  
    [ Hendrik Tews ]
diff --combined debian/patches/0008-Embed-bytecode-in-C-object-when-using-custom.patch
index d5224a1,0000000..33539b6
mode 100644,000000..100644
--- a/debian/patches/0008-Embed-bytecode-in-C-object-when-using-custom.patch
+++ b/debian/patches/0008-Embed-bytecode-in-C-object-when-using-custom.patch
@@@ -1,126 -1,0 +1,133 @@@
 +From: Stephane Glondu <steph at glondu.net>
- Date: Tue, 19 Jun 2012 09:57:08 +0200
++Date: Sat, 21 Jul 2012 15:40:52 +0200
 +Subject: Embed bytecode in C object when using -custom
 +
 +This patch fixes non-strippability of bytecode executables linked with
- custom runtime. Having "c" in OCAML_COMPAT environment variable
- restores the original behaviour.
++custom runtime. The new behaviour is enabled when OCAML_CUSTOM_EMBED
++is set to "y", or when DEB_HOST_ARCH is non-empty.
 +
 +Forwarded: not-needed
 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900
 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627761
++Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=678577
 +Signed-off-by: Stephane Glondu <steph at glondu.net>
 +---
-  bytecomp/bytelink.ml                 |   36 ++++++++++++++++++++++++++++++----
++ bytecomp/bytelink.ml                 |   42 ++++++++++++++++++++++++++++++----
 + testsuite/tests/embedded/Makefile    |    3 +++
 + testsuite/tests/lib-marshal/Makefile |    3 +++
-  3 files changed, 38 insertions(+), 4 deletions(-)
++ 3 files changed, 44 insertions(+), 4 deletions(-)
 +
 +diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml
- index bb14de6..ec02825 100644
++index bb14de6..9922bf2 100644
 +--- a/bytecomp/bytelink.ml
 ++++ b/bytecomp/bytelink.ml
 +@@ -423,7 +423,7 @@ let mlvalues_primitives = [
 + 
 + (* Output a bytecode executable as a C file *)
 + 
 +-let link_bytecode_as_c ppf tolink outfile =
 ++let link_bytecode_as_c ppf tolink outfile with_main =
 +   let outchan = open_out outfile in
 +   begin try
 +     (* The bytecode *)
 +@@ -465,14 +465,27 @@ let link_bytecode_as_c ppf tolink outfile =
 +     (* The table of primitives *)
 +     Symtable.output_primitive_table outchan mlvalues_primitives;
 +     (* The entry point *)
 +-    output_string outchan "\
 ++    if with_main then begin
 ++      output_string outchan "\
 ++\nint main(int argc, char **argv)\
 ++\n{\
 ++\n  caml_startup_code(caml_code, sizeof(caml_code),\
 ++\n                    caml_data, sizeof(caml_data),\
 ++\n                    caml_sections, sizeof(caml_sections),\
 ++\n                    argv);\
 ++\n  return 0; /* not reached */\
 ++\n}\n"
 ++    end else begin
 ++      output_string outchan "\
 + \nvoid caml_startup(char ** argv)\
 + \n{\
 + \n  caml_startup_code(caml_code, sizeof(caml_code),\
 + \n                    caml_data, sizeof(caml_data),\
 + \n                    caml_sections, sizeof(caml_sections),\
 + \n                    argv);\
 +-\n}\
 ++\n}\n"
 ++    end;
 ++    output_string outchan "\
 + \n#ifdef __cplusplus\
 + \n}\
 + \n#endif\n";
- @@ -511,6 +524,11 @@ let fix_exec_name name =
++@@ -511,6 +524,17 @@ let fix_exec_name name =
 +       if String.contains name '.' then name else name ^ ".exe"
 +   | _ -> name
 + 
- +(* Legacy custom behaviour (Debian-specific) *)
+++(* Debian-specific -custom behaviour:
+++   - if DEB_HOST_ARCH is non-empty, it is activated by default
+++   - can be enabled/disabled by setting OCAML_CUSTOM_EMBED to y/n
+++*)
 ++
- +let legacy_custom =
- +  try String.contains (Sys.getenv "OCAML_COMPAT") 'c' with Not_found -> false
+++let custom_embed =
+++  try Sys.getenv "OCAML_CUSTOM_EMBED" = "y"
+++  with Not_found ->
+++    try Sys.getenv "DEB_HOST_ARCH" <> ""
+++    with Not_found -> false
 ++
 + (* Main entry point (build a custom runtime if needed) *)
 + 
 + let link ppf objfiles output_name =
- @@ -524,6 +542,16 @@ let link ppf objfiles output_name =
++@@ -524,6 +548,16 @@ let link ppf objfiles output_name =
 +   Clflags.dllibs := !lib_dllibs @ !Clflags.dllibs; (* put user's DLLs first *)
 +   if not !Clflags.custom_runtime then
 +     link_bytecode ppf tolink output_name true
- +  else if not legacy_custom && not !Clflags.output_c_object && not !Clflags.make_runtime then
+++  else if custom_embed && not !Clflags.output_c_object && not !Clflags.make_runtime then
 ++    let c_file = Filename.temp_file "camlobj" ".c" in
 ++    try
 ++      link_bytecode_as_c ppf tolink c_file true;
 ++      let exec_name = fix_exec_name output_name in
 ++      if not (build_custom_runtime c_file exec_name)
 ++      then raise(Error Custom_runtime);
 ++    with x ->
 ++      remove_file c_file;
 ++      raise x
 +   else if not !Clflags.output_c_object then begin
 +     let bytecode_name = Filename.temp_file "camlcode" "" in
 +     let prim_name = Filename.temp_file "camlprim" ".c" in
- @@ -566,7 +594,7 @@ let link ppf objfiles output_name =
++@@ -566,7 +600,7 @@ let link ppf objfiles output_name =
 +     if Sys.file_exists c_file then raise(Error(File_exists c_file));
 +     let temps = ref [] in
 +     try
 +-      link_bytecode_as_c ppf tolink c_file;
 ++      link_bytecode_as_c ppf tolink c_file false;
 +       if not (Filename.check_suffix output_name ".c") then begin
 +         temps := c_file :: !temps;
 +         if Ccomp.compile_file c_file <> 0 then raise(Error Custom_runtime);
 +diff --git a/testsuite/tests/embedded/Makefile b/testsuite/tests/embedded/Makefile
- index ed33143..0d1e4ca 100644
++index ed33143..dc4e9a1 100644
 +--- a/testsuite/tests/embedded/Makefile
 ++++ b/testsuite/tests/embedded/Makefile
 +@@ -1,5 +1,8 @@
 + BASEDIR=../..
 + 
 ++# This test relies on the upstream behaviour of -custom
- +export OCAML_COMPAT=c
+++export OCAML_CUSTOM_EMBED=n
 ++
 + default: compile run
 + 
 + compile:
 +diff --git a/testsuite/tests/lib-marshal/Makefile b/testsuite/tests/lib-marshal/Makefile
- index 1f78273..4878507 100644
++index 1f78273..c246469 100644
 +--- a/testsuite/tests/lib-marshal/Makefile
 ++++ b/testsuite/tests/lib-marshal/Makefile
 +@@ -3,5 +3,8 @@ BASEDIR=../..
 + MAIN_MODULE=intext
 + C_FILES=intextaux
 + 
 ++# This test relies on the upstream behaviour of -custom
- +export OCAML_COMPAT=c
+++export OCAML_CUSTOM_EMBED=n
 ++
 + include $(BASEDIR)/makefiles/Makefile.one
 + include $(BASEDIR)/makefiles/Makefile.common
 +-- 

-- 
OCaml packaging



More information about the Pkg-ocaml-maint-commits mailing list