• Bug#1099689: ocaml-topkg: Should have a noopam build profile

    From Samuel Thibault@21:1/5 to All on Thu Mar 6 20:30:01 2025
    XPost: linux.debian.maint.ocaml.maint

    Source: ocaml-topkg
    Version: 1.0.7-1
    Severity: important
    Tags: patch

    Hello,

    Currently,

    - opam build-depends on libjsonm-ocaml-dev, libuutf-ocaml-dev
    - uutf build-depends on libtopkg-ocaml-dev
    - ocaml-topkg build-depends on opam-installer

    We need to break the loop somehow to make bootstraping a new port easy
    :)

    As upstream puts it in topkg.opam, Topkg [...] has **no**
    dependencies. This is what your packages will need as a *build*
    dependency. So even if using opam to install the files is convenient,
    topkg is expected to be depend on by packages needed to build opam.

    The attached patch adds a pkg.ocaml-topkg.noopam build profile which can
    be used to avoid using opam-installer and still build a proper libtopkg-ocaml-dev package, could you apply it?

    Samuel

    -- System Information:
    Debian Release: trixie/sid
    APT prefers testing
    APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'oldstable-proposed-updates-debug'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'
    ), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
    Architecture: amd64 (x86_64)
    Foreign Architectures: i386, arm64

    Kernel: Linux 6.13.0 (SMP w/8 CPU threads; PREEMPT)
    Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
    Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    --
    Samuel
    * B kicks DW (non mais franchement)
    * DW was kicked
    -+- #ens-mim - comment ça hopeless ? -+-

    --- debian/control.original 2025-03-06 19:00:26.000000000 +0000
    +++ debian/control 2025-03-06 19:00:43.000000000 +0000
    @@ -11,7 +11,7 @@
    ocamlbuild,
    ocaml-findlib,
    libfindlib-ocaml-dev,
    - opam-installer
    + opam-installer <!pkg.ocaml-topkg.noopam>
    Standards-Version: 4.6.0
    Rules-Requires-Root: no
    Homepage: https://erratique.ch/software/topkg
    --- debian/rules.original 2025-03-06 19:00:50.000000000 +0000
    +++ debian/rules 2025-03-06 19:12:31.000000000 +0000
    @@ -12,5 +12,24 @@
    ./pkg/pkg.ml build --pkg-name topkg

    override_dh_auto_install:
    +ifeq (,$(filter pkg.ocaml-topkg.noopam, $(DEB_BUILD_PROFILES)))
    opam-installer --prefix=$(DESTDIR)/usr --libdir=..$(OCAML_STDLIB_DIR) +else
    + install -d $(DESTDIR)/$(OCAML_STDLIB_DIR)/topkg
    + install _build/src/*.mli $(DESTDIR)/$(OCAML_STDLIB_DIR)/topkg
    + install _build/src/*.cmi $(DESTDIR)/$(OCAML_STDLIB_DIR)/topkg
    + install _build/src/*.cma $(DESTDIR)/$(OCAML_STDLIB_DIR)/topkg
    + install _build/src/*.cmxs $(DESTDIR)/$(OCAML_STDLIB_DIR)/top