Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.6 backported commits #3973

Merged
merged 10 commits into from
Jan 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@ Changes prefixed with "(*)" are potentially breaking to scripts or existing
repositories (changes that are automatically handled by the format upgrade tools
are not marked).


2.0.6:
* Don't remove git cache objects that may be used [#3831 @AltGr]
* Don't include .gitattributes in index.tar.gz [#3873 @dra27]
* Update FAQ uri [#3941 @dra27]
* Lock: add warning in case of missing locked file [#3939 @rjbou]
* Directory tracking: fix cached entries retrieving with precise
tracking [#4038 @hannesm]
* Build:
* Add sanity checks [#3934 @dra27]
* Build man pages using dune [#3902] #dra27]
* Add patch and bunzip check for make cold [#4006 @rjbou - fix #3842]
* Shell:
* fish: add colon for fish manpath [#3886 @rjbou - fix #3878]
* Sandbox:
* Add dune cache as rw [#4019 @rjbou - fix #4012]
* Do not fail if $HOME/.ccache is missing [#3957 @mseri]
* opam-devel file: avoid copying extraneous files in opam-devel example [#3999 @maroneze]

2.0.5:
* Bump src_ext Dune to 1.6.3, allows compilation with OCaml 4.08.0. [#3887 @dra27]
* Support Dune 1.7.0 and later [#3888 @dra27 - fix #3870]
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ compiler:
env MAKE=$(MAKE) ./shell/bootstrap-ocaml.sh $(OCAML_PORT)

cold: compiler
env PATH="`pwd`/bootstrap/ocaml/bin:$$PATH" ./configure $(CONFIGURE_ARGS)
env PATH="`pwd`/bootstrap/ocaml/bin:$$PATH" ./configure --enable-cold-check $(CONFIGURE_ARGS)
env PATH="`pwd`/bootstrap/ocaml/bin:$$PATH" $(MAKE) lib-ext
env PATH="`pwd`/bootstrap/ocaml/bin:$$PATH" $(MAKE)

Expand Down
35 changes: 26 additions & 9 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for opam 2.0.5.
# Generated by GNU Autoconf 2.69 for opam 2.0.6.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -578,8 +578,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='opam'
PACKAGE_TARNAME='opam'
PACKAGE_VERSION='2.0.5'
PACKAGE_STRING='opam 2.0.5'
PACKAGE_VERSION='2.0.6'
PACKAGE_STRING='opam 2.0.6'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -701,6 +701,7 @@ enable_checks
enable_developer_mode
with_mccs
with_private_runtime
enable_cold_check
enable_certificate_check
'
ac_precious_vars='build_alias
Expand Down Expand Up @@ -1264,7 +1265,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures opam 2.0.5 to adapt to many kinds of systems.
\`configure' configures opam 2.0.6 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1326,7 +1327,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of opam 2.0.5:";;
short | recursive ) echo "Configuration of opam 2.0.6:";;
esac
cat <<\_ACEOF

Expand All @@ -1340,6 +1341,7 @@ Optional Features:

--enable-developer-mode Enable developer features

--enable-cold-check Fail on some check necessary for make cold
--disable-certificate-check
Do not check the certificate of opam's dependency
archives
Expand Down Expand Up @@ -1429,7 +1431,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
opam configure 2.0.5
opam configure 2.0.6
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1524,7 +1526,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by opam $as_me 2.0.5, which was
It was created by opam $as_me 2.0.6, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ $0 $@
Expand Down Expand Up @@ -3169,6 +3171,12 @@ else
fi


# Check whether --enable-cold_check was given.
if test "${enable_cold_check+set}" = set; then :
enableval=$enable_cold_check; COLD_CHECK=yes
fi


if test "x" != "x$LIB_PREFIX"; then :

CPATH=$CPATH:$LIB_PREFIX/include
Expand Down Expand Up @@ -4817,6 +4825,15 @@ else
fi


if test "x${COLD_CHECK}" = "xyes" ; then
if test "x$PATCH" = "x" ; then
as_fn_error $? "You must have patch installed." "$LINENO" 5
fi
if test "x$BUNZIP2" = "x" ; then
as_fn_error $? "You must have bunzip2 installed." "$LINENO" 5
fi
fi

if test "${OCAML_OS_TYPE}" = "Win32"; then :

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a workable solution for ln -s" >&5
Expand Down Expand Up @@ -6068,7 +6085,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by opam $as_me 2.0.5, which was
This file was extended by opam $as_me 2.0.6, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -6121,7 +6138,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
opam config.status 2.0.5
opam config.status 2.0.6
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

Expand Down
16 changes: 15 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dnl The line below must be formatted AC_INIT(opam,VERSION) with no extra spaces
AC_INIT(opam,2.0.5)
AC_INIT(opam,2.0.6)
AC_COPYRIGHT(Copyright 2012-2017 OcamlPro SAS)

AC_CONFIG_MACRO_DIR([m4])
Expand Down Expand Up @@ -60,6 +60,11 @@ AC_ARG_WITH([private_runtime],
[For a mingw-w64 build, manifest the runtime DLLs locally in Opam.Runtime.arch]),,[with_private_runtime=no]
)

AC_ARG_ENABLE([cold_check],
AC_HELP_STRING([--enable-cold-check],
[Fail on some check necessary for make cold]),[COLD_CHECK=yes],[]
)

AS_IF([test "x" != "x$LIB_PREFIX"], [
CPATH=$CPATH:$LIB_PREFIX/include
LIBRARY_PATH=$LIBRARY_PATH:$LIB_PREFIX/lib
Expand Down Expand Up @@ -219,6 +224,15 @@ AC_CHECK_TOOL(CPPO,cppo)
AC_CHECK_TOOL(PATCH,patch)
AC_CHECK_TOOL(BUNZIP2,bunzip2)

if test "x${COLD_CHECK}" = "xyes" ; then
if test "x$PATCH" = "x" ; then
AC_MSG_ERROR([You must have patch installed.])
fi
if test "x$BUNZIP2" = "x" ; then
AC_MSG_ERROR([You must have bunzip2 installed.])
fi
fi

AS_IF([test "${OCAML_OS_TYPE}" = "Win32"],[
AC_MSG_CHECKING([for a workable solution for ln -s])
ln -s configure conftestLink
Expand Down
6 changes: 3 additions & 3 deletions opam-client.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.5"
version: "2.0.6"
maintainer: "[email protected]"
authors: [
"Vincent Bernardoff <[email protected]>"
Expand All @@ -21,8 +21,8 @@ build: [
[make "%{name}%.install"]
]
depends: [
"opam-state" {= "2.0.5"}
"opam-solver" {= "2.0.5"}
"opam-state" {= "2.0.6"}
"opam-solver" {= "2.0.6"}
"re" {>= "1.7.2"}
"cmdliner" {>= "0.9.8"}
"dune" {build & >= "1.2.1"}
Expand Down
2 changes: 1 addition & 1 deletion opam-core.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.5"
version: "2.0.6"
maintainer: "[email protected]"
authors: [
"Vincent Bernardoff <[email protected]>"
Expand Down
6 changes: 3 additions & 3 deletions opam-devel.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.5"
version: "2.0.6"
maintainer: "[email protected]"
authors: [
"Vincent Bernardoff <[email protected]>"
Expand All @@ -22,13 +22,13 @@ build: [
]
build-test: [make "tests"]
depends: [
"opam-client" {= "2.0.5"}
"opam-client" {= "2.0.6"}
"cmdliner" {>= "0.9.8"}
"dune" {build & >= "1.2.1"}
]
post-messages: [
"The development version of opam has been successfully compiled into %{lib}%/%{name}%. You should not run it from there, please install the binaries to your PATH, e.g. with
sudo cp %{lib}%/%{name}%/* /usr/local/bin
sudo cp %{lib}%/%{name}%/opam /usr/local/bin

If you just want to give it a try without altering your current installation, you could use instead:
alias opam2=\"OPAMROOT=~/.opam2 %{lib}%/%{name}%/opam\""
Expand Down
4 changes: 2 additions & 2 deletions opam-format.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.5"
version: "2.0.6"
maintainer: "[email protected]"
authors: [
"Vincent Bernardoff <[email protected]>"
Expand All @@ -21,7 +21,7 @@ build: [
[make "%{name}%.install"]
]
depends: [
"opam-core" {= "2.0.5"}
"opam-core" {= "2.0.6"}
"opam-file-format" {>= "2.0.0~rc2"}
"dune" {build & >= "1.2.1"}
]
Expand Down
4 changes: 2 additions & 2 deletions opam-installer.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.5"
version: "2.0.6"
maintainer: "[email protected]"
authors: [
"Vincent Bernardoff <[email protected]>"
Expand All @@ -21,7 +21,7 @@ build: [
[make "DUNE_ARGS=-p %{name}%" "%{name}%.install"]
]
depends: [
"opam-format" {= "2.0.5"}
"opam-format" {= "2.0.6"}
"cmdliner" {>= "0.9.8"}
"dune" {build & >= "1.2.1"}
]
Expand Down
4 changes: 2 additions & 2 deletions opam-repository.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.5"
version: "2.0.6"
maintainer: "[email protected]"
authors: [
"Vincent Bernardoff <[email protected]>"
Expand All @@ -21,7 +21,7 @@ build: [
[make "%{name}%.install"]
]
depends: [
"opam-format" {= "2.0.5"}
"opam-format" {= "2.0.6"}
"dune" {build & >= "1.2.1"}
]
available: ocaml-version >= "4.02.3"
4 changes: 2 additions & 2 deletions opam-solver.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.5"
version: "2.0.6"
maintainer: "[email protected]"
authors: [
"Vincent Bernardoff <[email protected]>"
Expand All @@ -21,7 +21,7 @@ build: [
[make "%{name}%.install"]
]
depends: [
"opam-format" {= "2.0.5"}
"opam-format" {= "2.0.6"}
"mccs" {>= "1.1+9"}
"dose3" {>= "5"}
"cudf" {>= "0.7"}
Expand Down
4 changes: 2 additions & 2 deletions opam-state.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.5"
version: "2.0.6"
maintainer: "[email protected]"
authors: [
"Vincent Bernardoff <[email protected]>"
Expand All @@ -21,7 +21,7 @@ build: [
[make "%{name}%.install"]
]
depends: [
"opam-repository" {= "2.0.5"}
"opam-repository" {= "2.0.6"}
"dune" {build & >= "1.2.1"}
]
available: ocaml-version >= "4.02.3"
2 changes: 1 addition & 1 deletion shell/bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -ue

OCAMLV=4.04.1
OPAMV=2.0.5
OPAMV=2.0.6
OPAM_REPO=https://opam.ocaml.org/2.0
DEBUG=
MAKESELF=
Expand Down
9 changes: 8 additions & 1 deletion src/client/opamCommands.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3022,7 +3022,14 @@ let clean =
if download_cache then
(OpamConsole.msg "Clearing cache of downloaded files\n";
rmdir (OpamPath.archives_dir root);
cleandir (OpamRepositoryPath.download_cache root));
List.iter (fun dir ->
match OpamFilename.(Base.to_string (basename_dir dir)) with
| "git" ->
(try OpamFilename.exec dir ~name:"git gc" [["git"; "gc"]]
with e -> OpamStd.Exn.fatal e)
| _ -> cleandir dir
)
(OpamFilename.dirs (OpamRepositoryPath.download_cache root)));
if logs then
(OpamConsole.msg "Clearing logs\n";
cleandir (OpamPath.log root))
Expand Down
7 changes: 6 additions & 1 deletion src/client/opamConfigCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,12 @@ let print_sexp_env env =

let rec print_fish_env env =
let set_arr_cmd k v =
let v = OpamStd.String.split v ':' in
let v =
OpamStd.String.split v ':'
|> function
| x::v' -> (":"^x)::v'
| v -> v
in
OpamConsole.msg "set -gx %s %s;\n" k
(OpamStd.List.concat_map " "
(fun v ->
Expand Down
2 changes: 1 addition & 1 deletion src/core/opamDirTrack.ml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ let cached_digest =
fun f size mtime ->
try
let csize, cmtime, digest = Hashtbl.find item_cache f in
if csize = size || mtime = cmtime then Digest.to_hex digest
if csize = size && mtime = cmtime then Digest.to_hex digest
else raise Not_found
with Not_found ->
let digest = Digest.file f in
Expand Down
2 changes: 1 addition & 1 deletion src/repository/opamHTTP.ml
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,5 @@ let make_index_tar_gz repo_root =
let to_include = [ "version"; "packages"; "repo" ] in
match List.filter Sys.file_exists to_include with
| [] -> ()
| d -> OpamSystem.command ("tar" :: "czhf" :: "index.tar.gz" :: d)
| d -> OpamSystem.command ("tar" :: "czhf" :: "index.tar.gz" :: "--exclude=.git*" :: d)
)
7 changes: 7 additions & 0 deletions src/state/shellscripts/bwrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ add_ccache_mount() {
fi
}

add_dune_cache_mount() {
DUNE_CACHE=${XDG_CACHE_HOME:-$HOME/.cache}/dune
mkdir -p ${DUNE_CACHE}
add_mounts rw $DUNE_CACHE
}

# This case-switch should remain identical between the different sandbox implems
COMMAND="$1"; shift
case "$COMMAND" in
Expand All @@ -84,6 +90,7 @@ case "$COMMAND" in
add_mounts ro "$OPAM_SWITCH_PREFIX"
add_mounts rw "$PWD"
add_ccache_mount
add_dune_cache_mount
;;
install)
# mount unusual path in ro
Expand Down
Loading