On Sun, 19 Jan 2025 18:35:20 +0100,
Sebastien Marie <sema...@kapouay.eu.org> wrote:
> 
> Hi,
> 
> I would like to update sysutils/opam to 2.3.0, and backport an
> upstreamed patch specific to OpenBSD (to make opam consider all packages
> in depext, and not only the one manually installed).
> 
> See https://github.com/ocaml/opam/pull/6362 for the backported patch.
> 
> Note, that I didn't update to the 2.2.1 update as 2.3.0 was already released.
> 
> Comments or OK ?

Brifly tested on -current/arm64. It works.

Probably better to use the same autoconf version which is used by upstream
(2.71).

Anyway, OK kirill@

> -- 
> Sebastien Marie
> 
> diff --git a/sysutils/opam/Makefile b/sysutils/opam/Makefile
> index 862f6da260..bbd322fad2 100644
> --- a/sysutils/opam/Makefile
> +++ b/sysutils/opam/Makefile
> @@ -2,10 +2,9 @@
>  
>  CATEGORIES =         sysutils devel
>  
> -V =                  2.2.0
> +V =                  2.3.0
>  PKGNAME =            opam-${V}
>  DISTNAME =           opam-full-${V}
> -DISTFILES =          ${DISTNAME}-2${EXTRACT_SUFX} #remove on next update
>  
>  SITES =                      
> https://github.com/ocaml/opam/releases/download/${V}/
>  
> diff --git a/sysutils/opam/distinfo b/sysutils/opam/distinfo
> index 32d4885741..f382994fba 100644
> --- a/sysutils/opam/distinfo
> +++ b/sysutils/opam/distinfo
> @@ -1,2 +1,2 @@
> -SHA256 (opam-full-2.2.0-2.tar.gz) = 
> RZ7WTmZD8FxndWOgAOO6oFx2zlKAZOnLnObbSf/zfJc=
> -SIZE (opam-full-2.2.0-2.tar.gz) = 12775907
> +SHA256 (opam-full-2.3.0.tar.gz) = 
> UGunaGXcMVtn35qonnq9XBqJen8KkteyaUl0/cUys0Y=
> +SIZE (opam-full-2.3.0.tar.gz) = 12860518
> diff --git a/sysutils/opam/patches/patch-configure_ac 
> b/sysutils/opam/patches/patch-configure_ac
> index abcca6439d..d7506a85d7 100644
> --- a/sysutils/opam/patches/patch-configure_ac
> +++ b/sysutils/opam/patches/patch-configure_ac
> @@ -3,7 +3,7 @@
>  Index: configure.ac
>  --- configure.ac.orig
>  +++ configure.ac
> -@@ -272,7 +272,6 @@ AS_IF([test "x${enable_certificate_check}" = "xno"], [
> +@@ -252,7 +252,6 @@ AS_IF([test "x${enable_certificate_check}" = "xno"], [
>   
>   AC_CHECK_PROGS(FETCH,[curl wget],no)
>   
> diff --git a/sysutils/opam/patches/patch-src_state_opamSysInteract_ml 
> b/sysutils/opam/patches/patch-src_state_opamSysInteract_ml
> new file mode 100644
> index 0000000000..9cb15a60d2
> --- /dev/null
> +++ b/sysutils/opam/patches/patch-src_state_opamSysInteract_ml
> @@ -0,0 +1,14 @@
> +backport https://github.com/ocaml/opam/pull/6362
> +
> +Index: src/state/opamSysInteract.ml
> +--- src/state/opamSysInteract.ml.orig
> ++++ src/state/opamSysInteract.ml
> +@@ -972,7 +972,7 @@ let packages_status ?(env=OpamVariable.Map.empty) conf
> +     compute_sets sys_installed
> +   | Openbsd ->
> +     let sys_installed =
> +-      run_query_command "pkg_info" ["-mqP"]
> ++      run_query_command "pkg_info" ["-qP"]
> +       |> package_set_of_pkgpath
> +     in
> +     compute_sets sys_installed
> diff --git a/sysutils/opam/patches/patch-tests_reftests_legacy-git_test 
> b/sysutils/opam/patches/patch-tests_reftests_legacy-git_test
> deleted file mode 100644
> index e8520d70d2..0000000000
> --- a/sysutils/opam/patches/patch-tests_reftests_legacy-git_test
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -Index: tests/reftests/legacy-git.test
> ---- tests/reftests/legacy-git.test.orig
> -+++ tests/reftests/legacy-git.test
> -@@ -19,7 +19,7 @@ ARCHIVE=$1; shift
> - if [ ! -e "packages/${ARCHIVE}" ]; then ( cd packages && tar czf ${ARCHIVE} 
> ${ARCHIVE%.tar.gz}; ) fi
> - MD5=$(openssl md5 packages/${ARCHIVE} | cut -d' ' -f2)
> - echo 'src: "http://dev.null"; checksum: "'$MD5'"' > REPO/packages/${PKG}/url
> --CACHEDIR=REPO/cache/md5/$(echo $MD5 |head -c2)
> -+CACHEDIR=REPO/cache/md5/$(echo $MD5 |cut -b -2)
> - mkdir -p $CACHEDIR
> - cp "packages/$ARCHIVE" "$CACHEDIR/$MD5"
> - ### : INIT :
> diff --git a/sysutils/opam/patches/patch-tests_reftests_legacy-local_test 
> b/sysutils/opam/patches/patch-tests_reftests_legacy-local_test
> deleted file mode 100644
> index 6da74a558b..0000000000
> --- a/sysutils/opam/patches/patch-tests_reftests_legacy-local_test
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -Index: tests/reftests/legacy-local.test
> ---- tests/reftests/legacy-local.test.orig
> -+++ tests/reftests/legacy-local.test
> -@@ -7,7 +7,7 @@ ARCHIVE=$1; shift
> - if [ ! -e "packages/${ARCHIVE}" ]; then ( cd packages && tar czf ${ARCHIVE} 
> ${ARCHIVE%.tar.gz}; ) fi
> - MD5=$(openssl md5 packages/${ARCHIVE} | cut -d' ' -f2)
> - echo 'src: "http://dev.null"; checksum: "'$MD5'"' > REPO/packages/${PKG}/url
> --CACHEDIR=REPO/cache/md5/$(echo $MD5 |head -c2)
> -+CACHEDIR=REPO/cache/md5/$(echo $MD5 |cut -b -2)
> - mkdir -p $CACHEDIR
> - cp "packages/$ARCHIVE" "$CACHEDIR/$MD5"
> - ### : INIT :
> 

-- 
wbr, Kirill

Reply via email to