diff --git a/README.md b/README.md index e6b62202a..ca68a9c2a 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ File `install-dependencies` and the relevant subdirectories in `deps-packaging` | [SASL2](https://www.cyrusimap.org/sasl/) | 2.1.28 | 2.1.28 | 2.1.28 | Solaris Enterprise agent | | [zlib](https://www.zlib.net/) | 1.3.2 | 1.3.2 | 1.3.2 | | | [librsync](https://github.com/librsync/librsync/releases) | - | 2.3.4 | 2.3.4 | | -| [leech](https://github.com/larsewi/leech/releases) | - | 0.2.0 | 0.2.0 | | +| [leech2](https://github.com/larsewi/leech2/releases) | - | 5.0.1 | 5.0.1 | | ### Enterprise Hub dependencies diff --git a/build-scripts/compile-options b/build-scripts/compile-options index 4206536d1..f73cacf46 100644 --- a/build-scripts/compile-options +++ b/build-scripts/compile-options @@ -155,10 +155,10 @@ nova) # - Mission Portal uses LDAP for authentication functionality var_append DEPS "openldap" - # leech is used for efficient synchronization of tabular data. + # leech2 is used for efficient synchronization of tabular data. # - cf-hub requests state changes from cf-serverd # - state changes are recorded by cf-agent - var_append DEPS "leech" + var_append DEPS "leech2" ;; esac diff --git a/build-scripts/configure b/build-scripts/configure index c54b7b64f..ba88698e3 100755 --- a/build-scripts/configure +++ b/build-scripts/configure @@ -42,7 +42,7 @@ P=$BUILDPREFIX ARGS="--prefix=$P --libdir=$P/lib --with-workdir=$P --sysconfdir=/etc --with-openssl=$P --with-pcre2=$P --with-librsync=$P --with-init-script --with-lmdb=$P" -for dep in ldap libxml2 libyaml librsync leech libacl libvirt libcurl; do +for dep in ldap libxml2 libyaml librsync leech2 libacl libvirt libcurl; do case "$DEPS" in *"$dep"*) var_append ARGS "--with-$dep=$P" diff --git a/ci/cfengine-build-host-setup.cf b/ci/cfengine-build-host-setup.cf index 5bcacc288..0a8950e9b 100644 --- a/ci/cfengine-build-host-setup.cf +++ b/ci/cfengine-build-host-setup.cf @@ -251,6 +251,24 @@ bundle agent cfengine_build_host_setup !(debian|ubuntu):: "sshd_service_name" string => "sshd"; + # protoc is needed to build the cargo-based leech2 dependency. Reuse + # leech2's own installer from master (single source of truth, so the pinned + # protoc version tracks leech2's .protoc-version). Fetched only when missing; + # the if-guard is evaluated at promise time, unlike a class defined in the + # classes: section which would not be set yet during vars. + any:: + "leech2_protoc_setup" + data => url_get("https://raw.githubusercontent.com/larsewi/leech2/refs/heads/master/.github/scripts/setup-protoc.sh", "{}"), + if => not(fileexists("/usr/local/bin/protoc")); + + "leech2_protoc_version" + data => url_get("https://raw.githubusercontent.com/larsewi/leech2/refs/heads/master/.protoc-version", "{}"), + if => not(fileexists("/usr/local/bin/protoc")); + + "rustup_init" + data => url_get("https://static.rust-lang.org/rustup/rustup-init.sh", "{}"), + if => not(fileexists("/opt/rust/bin/rustc")); + classes: any:: "mingw_build_host" @@ -373,6 +391,35 @@ bundle agent cfengine_build_host_setup contain => in_shell, classes => results("bundle", "java"); + # leech2 build toolchain: run the installers fetched in the files: section. + protoc_script_ok:: + "$(sys.workdir)/leech2-protoc/setup-protoc.sh" + contain => in_dir("$(sys.workdir)/leech2-protoc"), + comment => "Install pinned protoc using leech2's own installer; required to build the cargo-based leech2 dependency."; + + rustup_script_ok:: + # RUSTUP_HOME=/opt/rust : install the toolchains/targets system-wide + # (defaults to ~/.rustup). + # CARGO_HOME=/opt/rust : put the cargo/rustc/rustup proxy binaries in + # /opt/rust/bin (added to PATH via profile.d). + # Not exported at runtime, so builds use the + # default ~/.cargo for their writable cache. + # -y : non-interactive, accept defaults (unattended). + # --no-modify-path : do not let rustup edit shell rc files; we + # manage PATH ourselves in profile.d/rust.sh. + # --profile minimal : rustc + cargo + rust-std only (no docs/clippy). + # --default-toolchain stable : install the stable channel as default. + "RUSTUP_HOME=/opt/rust CARGO_HOME=/opt/rust sh $(sys.workdir)/rustup-init.sh -y --no-modify-path --profile minimal --default-toolchain stable" + contain => in_shell, + comment => "Install the Rust toolchain system-wide under /opt/rust for building the cargo-based leech2 dependency."; + + "RUSTUP_HOME=/opt/rust /opt/rust/bin/rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu x86_64-pc-windows-gnu" + contain => in_shell, + comment => "Add the cross-compilation targets needed to build leech2."; + + "chmod -R a+rX /opt/rust" + comment => "Make sure it's readable by the build user."; + (redhat_7|centos_7|redhat_8|centos_8|redhat_9|redhat_10).(!have_development_tools).(yum_dnf_conf_ok):: "yum groups install -y 'Development Tools'" contain => in_shell; @@ -440,6 +487,26 @@ bundle agent cfengine_build_host_setup ); files: + # leech2 build toolchain: write the fetched installers to disk (only when + # the corresponding tool is missing) so the commands: section can run them. + any:: + "$(sys.workdir)/leech2-protoc/.protoc-version" + content => "$(leech2_protoc_version[content])", + perms => mog("0644", "root", "root"), + if => not(fileexists("/usr/local/bin/protoc")); + + "$(sys.workdir)/leech2-protoc/setup-protoc.sh" + content => "$(leech2_protoc_setup[content])", + perms => mog("0700", "root", "root"), + classes => scoped_classes_generic("bundle", "protoc_script"), + if => not(fileexists("/usr/local/bin/protoc")); + + "$(sys.workdir)/rustup-init.sh" + content => "$(rustup_init[content])", + perms => mog("0700", "root", "root"), + classes => scoped_classes_generic("bundle", "rustup_script"), + if => not(fileexists("/opt/rust/bin/rustc")); + redhat:: "/etc/environment" edit_line => contains_literal_string("LC_ALL=C"), diff --git a/container/Dockerfile.debian b/container/Dockerfile.debian index 5b2abdcf3..2955ed4a7 100644 --- a/container/Dockerfile.debian +++ b/container/Dockerfile.debian @@ -8,7 +8,7 @@ RUN apt-get update && apt-get install -y \ autoconf automake binutils bison build-essential curl debhelper \ dpkg-dev expat fakeroot flex gdb git libexpat1-dev \ libmodule-load-conditional-perl libpam0g-dev libtool \ - pkg-config psmisc python3-pip rsync sudo systemd-coredump wget \ + pkg-config psmisc python3-pip rsync sudo systemd-coredump unzip wget \ && rm -rf /var/lib/apt/lists/* # ncurses: ubuntu-20 uses libncurses5/libncurses5-dev, newer use libncurses6/libncurses-dev @@ -30,6 +30,21 @@ RUN apt-get purge -y \ libattr1-dev libssl-dev libpcre2-dev libacl1-dev \ libyaml-dev libxml2-dev librsync-dev 2>/dev/null || true +# Rust toolchain and protobuf compiler for building the cargo-based leech2 +# dependency (mirrors the rust/protoc setup in cfengine-build-host-setup.cf). +# rustup is installed system-wide under /opt/rust and consumed by +# deps-packaging/leech2 via RUSTUP_HOME and PATH. +# +# protoc: reuse leech2's own pinned installer (single source of truth). +RUN curl -fsSL https://raw.githubusercontent.com/larsewi/leech2/refs/heads/master/.protoc-version -o /tmp/.protoc-version +RUN curl -fsSL https://raw.githubusercontent.com/larsewi/leech2/refs/heads/master/.github/scripts/setup-protoc.sh -o /tmp/setup-protoc.sh +RUN cd /tmp && bash setup-protoc.sh && rm -f /tmp/.protoc-version /tmp/setup-protoc.sh + +# Rust toolchain, installed system-wide under /opt/rust. +RUN curl -fsSL https://sh.rustup.rs | RUSTUP_HOME=/opt/rust CARGO_HOME=/opt/rust sh -s -- -y --no-modify-path --profile minimal --default-toolchain stable +RUN RUSTUP_HOME=/opt/rust /opt/rust/bin/rustup target add x86_64-unknown-linux-gnu aarch64-unknown-linux-gnu x86_64-pc-windows-gnu +RUN chmod -R a+rX /opt/rust + # Create build user with passwordless sudo (needed by install-dependencies, package, etc.) RUN useradd -m -s /bin/bash builder \ && echo "builder ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/builder diff --git a/deps-packaging/leech/cfbuild-leech.spec b/deps-packaging/leech/cfbuild-leech.spec deleted file mode 100644 index a437def74..000000000 --- a/deps-packaging/leech/cfbuild-leech.spec +++ /dev/null @@ -1,63 +0,0 @@ -%define leech_version 0.2.0 - -Summary: CFEngine Build Automation -- leech -Name: cfbuild-leech -Version: %{version} -Release: 1 -Source0: leech-%{leech_version}.tar.gz -License: LGPL -Group: Other -Url: https://cfengine.com -BuildRoot: %{_topdir}/BUILD/%{name}-%{version}-%{release}-buildroot - -AutoReqProv: no - -%define prefix %{buildprefix} - -%prep -mkdir -p %{_builddir} -%setup -q -n leech-%{leech_version} - -./configure --prefix=%{prefix} --enable-shared --disable-static - -rm -f ${RPM_BUILD_ROOT}%{prefix}/lib/libleech.a - -%build - -make - -%install -rm -rf ${RPM_BUILD_ROOT} - -make install DESTDIR=${RPM_BUILD_ROOT} -rm -f ${RPM_BUILD_ROOT}%{prefix}/lib/libleech.la - -%clean -rm -rf $RPM_BUILD_ROOT - -%package devel -Summary: CFEngine Build Automation -- leech -- development files -Group: Other -AutoReqProv: no - -%description -CFEngine Build Automation -- leech - -%description devel -CFEngine Build Automation -- leech -- development files - -%files -%defattr(-,root,root) - -%dir %{prefix}/lib -%{prefix}/lib/*.so* - -%files devel -%defattr(-,root,root) - -%dir %{prefix}/include -%{prefix}/include/*.h - -%dir %{prefix}/lib - -%changelog diff --git a/deps-packaging/leech/debian/cfbuild-leech.install b/deps-packaging/leech/debian/cfbuild-leech.install deleted file mode 100644 index 808bf7945..000000000 --- a/deps-packaging/leech/debian/cfbuild-leech.install +++ /dev/null @@ -1 +0,0 @@ -/var/cfengine/lib/*.so.* diff --git a/deps-packaging/leech/debian/control b/deps-packaging/leech/debian/control deleted file mode 100644 index 90f1a3ddc..000000000 --- a/deps-packaging/leech/debian/control +++ /dev/null @@ -1,18 +0,0 @@ -Source: cfbuild-leech -Section: libs -Priority: optional -Maintainer: CFEngine Packager -Build-Depends: debhelper -Standards-Version: 3.8.4 - -Package: cfbuild-leech -Section: libs -Architecture: any -Description: CFEngine Build Automation -- leech - CFEngine Build Automation -- leech - -Package: cfbuild-leech-devel -Section: libdevel -Architecture: any -Description: CFEngine Build Automation -- leech -- development files - CFEngine Build Automation -- leech -- development files diff --git a/deps-packaging/leech/debian/rules b/deps-packaging/leech/debian/rules deleted file mode 100644 index f8eda321c..000000000 --- a/deps-packaging/leech/debian/rules +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/make -f - -PREFIX=$(BUILDPREFIX) - -clean: - dh_testdir - dh_testroot - - dh_clean - -build: build-stamp -build-stamp: - dh_testdir - - ./configure --prefix=$(PREFIX) --enable-shared --disable-static - make - - touch build-stamp - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp - -binary-indep: build install - -binary-arch: build install - dh_testdir - dh_testroot - dh_install --sourcedir=debian/tmp - dh_link - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/deps-packaging/leech/distfiles b/deps-packaging/leech/distfiles deleted file mode 100644 index 7f69c2897..000000000 --- a/deps-packaging/leech/distfiles +++ /dev/null @@ -1 +0,0 @@ -9c86f1a12ca696c32a3b9413e3f6344c965d9ee6b307adf916f9a50ff0d288ce leech-0.2.0.tar.gz diff --git a/deps-packaging/leech/hpux/build b/deps-packaging/leech/hpux/build deleted file mode 100755 index ec63ceb8e..000000000 --- a/deps-packaging/leech/hpux/build +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -e - -# Options - -PREFIX=${BUILDPREFIX} - -TT=${BUILD_ROOT}/cfbuild-leech${PREFIX} -TTD=${BUILD_ROOT}/cfbuild-leech-devel${PREFIX} - -# Build -./configure --prefix=$PREFIX -gmake - -# Test - -# Install - -mkdir -p $TTD/lib -mkdir -p $TTD/include -gmake install prefix=${TTD} - -# Package - -mkdir -p ${TT}/lib -mv ${TTD}/lib/*.so* ${TT}/lib diff --git a/deps-packaging/leech/hpux/packages b/deps-packaging/leech/hpux/packages deleted file mode 100644 index 3dffeb671..000000000 --- a/deps-packaging/leech/hpux/packages +++ /dev/null @@ -1 +0,0 @@ -cfbuild-leech cfbuild-leech-devel diff --git a/deps-packaging/leech/mingw/debian/control b/deps-packaging/leech/mingw/debian/control deleted file mode 100644 index 69324a823..000000000 --- a/deps-packaging/leech/mingw/debian/control +++ /dev/null @@ -1,18 +0,0 @@ -Source: cfbuild-leech -Section: libs -Priority: optional -Maintainer: CFEngine Packager -Build-Depends: debhelper -Standards-Version: 3.8.4 - -Package: cfbuild-leech-mingw64 -Section: libs -Architecture: any -Description: CFEngine Build Automation -- leech -- mingw64 - CFEngine Build Automation -- leech -- mingw64 - -Package: cfbuild-leech-mingw64-devel -Section: libdevel -Architecture: any -Description: CFEngine Build Automation -- leech -- mingw64 -- development files - CFEngine Build Automation -- leech -- mingw64 -- development files diff --git a/deps-packaging/leech/mingw/debian/rules b/deps-packaging/leech/mingw/debian/rules deleted file mode 100644 index 01cfc4fee..000000000 --- a/deps-packaging/leech/mingw/debian/rules +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/make -f - -PREFIX=$(BUILDPREFIX) - -clean: - dh_testdir - dh_testroot - - dh_clean - -build: build-stamp -build-stamp: - dh_testdir - - ./configure LDFLAGS="-Wl,-no-undefined" --host=$(DEB_HOST_GNU_TYPE) --prefix=$(PREFIX) \ - --enable-shared \ - --disable-static - make - - touch build-stamp - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - make install DESTDIR=$(CURDIR)/debian/tmp - - rm -f $(CURDIR)/debian/tmp$(PREFIX)/lib/leech.la - -binary-indep: build install - -binary-arch: build install - dh_testdir - dh_testroot - dh_install --sourcedir=debian/tmp - dh_link - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/deps-packaging/leech/solaris/build b/deps-packaging/leech/solaris/build deleted file mode 100755 index 4b1a32b32..000000000 --- a/deps-packaging/leech/solaris/build +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/xpg4/bin/sh -e - -# Options - -PREFIX=${BUILDPREFIX} - -TT=${BUILD_ROOT}/cfbuild-leech${PREFIX} -TTD=${BUILD_ROOT}/cfbuild-leech-devel${PREFIX} - -# Patch -# Solaris 8 - -# Build -./configure --prefix=$PREFIX - -$MAKE - -# Test - -# Install - -mkdir -p $TTD/lib -mkdir -p $TTD/include -$MAKE install prefix=${TTD} - -# Package - - -mkdir -p ${TT}/lib -mv ${TTD}/lib/*.so* ${TT}/lib diff --git a/deps-packaging/leech/solaris/packages b/deps-packaging/leech/solaris/packages deleted file mode 100644 index 3dffeb671..000000000 --- a/deps-packaging/leech/solaris/packages +++ /dev/null @@ -1 +0,0 @@ -cfbuild-leech cfbuild-leech-devel diff --git a/deps-packaging/leech/source b/deps-packaging/leech/source deleted file mode 100644 index ba03708e2..000000000 --- a/deps-packaging/leech/source +++ /dev/null @@ -1 +0,0 @@ -https://github.com/larsewi/leech/releases/download/v0.2.0/ diff --git a/deps-packaging/leech2/cfbuild-leech2.spec b/deps-packaging/leech2/cfbuild-leech2.spec new file mode 100644 index 000000000..bf3cf300e --- /dev/null +++ b/deps-packaging/leech2/cfbuild-leech2.spec @@ -0,0 +1,73 @@ +%define leech2_version 5.0.1 + +Summary: CFEngine Build Automation -- leech2 +Name: cfbuild-leech2 +Version: %{version} +Release: 1 +Source0: leech2-%{leech2_version}.tar.gz +License: MIT +Group: Other +Url: https://cfengine.com +BuildRoot: %{_topdir}/BUILD/%{name}-%{version}-%{release}-buildroot + +AutoReqProv: no + +%define prefix %{buildprefix} + +%prep +mkdir -p %{_builddir} +%setup -q -n leech2-%{leech2_version} + +%build + +# Use the system-wide Rust toolchain installed by the build host setup. PATH +# finds the cargo proxy; RUSTUP_HOME lets it locate the toolchain. +export RUSTUP_HOME=/opt/rust +export PATH=/opt/rust/bin:$PATH +cargo build --release + +%install +rm -rf ${RPM_BUILD_ROOT} + +mkdir -p ${RPM_BUILD_ROOT}%{prefix}/lib/pkgconfig +mkdir -p ${RPM_BUILD_ROOT}%{prefix}/include + +install -m 755 target/release/libleech2.so ${RPM_BUILD_ROOT}%{prefix}/lib/ +install -m 644 include/leech2.h ${RPM_BUILD_ROOT}%{prefix}/include/ + +sed -e 's|^prefix=.*|prefix=%{prefix}|' \ + -e 's|@LIBDIR@|lib|' \ + -e 's|@VERSION@|%{leech2_version}|' \ + leech2.pc.in > ${RPM_BUILD_ROOT}%{prefix}/lib/pkgconfig/leech2.pc + +%clean +rm -rf $RPM_BUILD_ROOT + +%package devel +Summary: CFEngine Build Automation -- leech2 -- development files +Group: Other +AutoReqProv: no + +%description +CFEngine Build Automation -- leech2 + +%description devel +CFEngine Build Automation -- leech2 -- development files + +%files +%defattr(-,root,root) + +%dir %{prefix}/lib +%{prefix}/lib/*.so + +%files devel +%defattr(-,root,root) + +%dir %{prefix}/include +%{prefix}/include/*.h + +%dir %{prefix}/lib +%dir %{prefix}/lib/pkgconfig +%{prefix}/lib/pkgconfig/*.pc + +%changelog diff --git a/deps-packaging/leech2/debian/cfbuild-leech2-devel.install b/deps-packaging/leech2/debian/cfbuild-leech2-devel.install new file mode 100644 index 000000000..96c4b3019 --- /dev/null +++ b/deps-packaging/leech2/debian/cfbuild-leech2-devel.install @@ -0,0 +1,2 @@ +/var/cfengine/include +/var/cfengine/lib/pkgconfig diff --git a/deps-packaging/leech/debian/cfbuild-leech-devel.install b/deps-packaging/leech2/debian/cfbuild-leech2.install similarity index 51% rename from deps-packaging/leech/debian/cfbuild-leech-devel.install rename to deps-packaging/leech2/debian/cfbuild-leech2.install index fcabb82f2..5ce81eebf 100644 --- a/deps-packaging/leech/debian/cfbuild-leech-devel.install +++ b/deps-packaging/leech2/debian/cfbuild-leech2.install @@ -1,2 +1 @@ -/var/cfengine/include /var/cfengine/lib/*.so diff --git a/deps-packaging/leech/debian/compat b/deps-packaging/leech2/debian/compat similarity index 100% rename from deps-packaging/leech/debian/compat rename to deps-packaging/leech2/debian/compat diff --git a/deps-packaging/leech2/debian/control b/deps-packaging/leech2/debian/control new file mode 100644 index 000000000..fcb2e92c9 --- /dev/null +++ b/deps-packaging/leech2/debian/control @@ -0,0 +1,18 @@ +Source: cfbuild-leech2 +Section: libs +Priority: optional +Maintainer: CFEngine Packager +Build-Depends: debhelper +Standards-Version: 3.8.4 + +Package: cfbuild-leech2 +Section: libs +Architecture: any +Description: CFEngine Build Automation -- leech2 + CFEngine Build Automation -- leech2 + +Package: cfbuild-leech2-devel +Section: libdevel +Architecture: any +Description: CFEngine Build Automation -- leech2 -- development files + CFEngine Build Automation -- leech2 -- development files diff --git a/deps-packaging/leech/debian/copyright b/deps-packaging/leech2/debian/copyright similarity index 100% rename from deps-packaging/leech/debian/copyright rename to deps-packaging/leech2/debian/copyright diff --git a/deps-packaging/leech2/debian/rules b/deps-packaging/leech2/debian/rules new file mode 100755 index 000000000..23bf2b5a4 --- /dev/null +++ b/deps-packaging/leech2/debian/rules @@ -0,0 +1,58 @@ +#!/usr/bin/make -f + +PREFIX=$(BUILDPREFIX) +VERSION=$(shell sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -1) + +# Use the system-wide Rust toolchain installed by the build host setup. PATH +# finds the cargo proxy; RUSTUP_HOME lets it locate the toolchain. +export RUSTUP_HOME = /opt/rust +export PATH := /opt/rust/bin:$(PATH) + +clean: + dh_testdir + dh_testroot + + dh_clean + +build: build-stamp +build-stamp: + dh_testdir + + cargo build --release + + touch build-stamp + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + mkdir -p $(CURDIR)/debian/tmp$(PREFIX)/lib/pkgconfig + mkdir -p $(CURDIR)/debian/tmp$(PREFIX)/include + + install -m 755 target/release/libleech2.so $(CURDIR)/debian/tmp$(PREFIX)/lib/ + install -m 644 include/leech2.h $(CURDIR)/debian/tmp$(PREFIX)/include/ + + sed -e 's|^prefix=.*|prefix=$(PREFIX)|' \ + -e 's|@LIBDIR@|lib|' \ + -e 's|@VERSION@|$(VERSION)|' \ + leech2.pc.in > $(CURDIR)/debian/tmp$(PREFIX)/lib/pkgconfig/leech2.pc + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_install --sourcedir=debian/tmp + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/deps-packaging/leech2/distfiles b/deps-packaging/leech2/distfiles new file mode 100644 index 000000000..593726f6c --- /dev/null +++ b/deps-packaging/leech2/distfiles @@ -0,0 +1 @@ +a425cc66f34a9da7cef296d9b693f6823734f1df0e2b1cd95070314843d0caa1 leech2-5.0.1.tar.gz diff --git a/deps-packaging/leech/mingw/debian/cfbuild-leech-mingw64-devel.install b/deps-packaging/leech2/mingw/debian/cfbuild-leech2-mingw64-devel.install similarity index 100% rename from deps-packaging/leech/mingw/debian/cfbuild-leech-mingw64-devel.install rename to deps-packaging/leech2/mingw/debian/cfbuild-leech2-mingw64-devel.install diff --git a/deps-packaging/leech/mingw/debian/cfbuild-leech-mingw64.install b/deps-packaging/leech2/mingw/debian/cfbuild-leech2-mingw64.install similarity index 100% rename from deps-packaging/leech/mingw/debian/cfbuild-leech-mingw64.install rename to deps-packaging/leech2/mingw/debian/cfbuild-leech2-mingw64.install diff --git a/deps-packaging/leech/mingw/debian/compat b/deps-packaging/leech2/mingw/debian/compat similarity index 100% rename from deps-packaging/leech/mingw/debian/compat rename to deps-packaging/leech2/mingw/debian/compat diff --git a/deps-packaging/leech2/mingw/debian/control b/deps-packaging/leech2/mingw/debian/control new file mode 100644 index 000000000..e1124a715 --- /dev/null +++ b/deps-packaging/leech2/mingw/debian/control @@ -0,0 +1,18 @@ +Source: cfbuild-leech2 +Section: libs +Priority: optional +Maintainer: CFEngine Packager +Build-Depends: debhelper +Standards-Version: 3.8.4 + +Package: cfbuild-leech2-mingw64 +Section: libs +Architecture: any +Description: CFEngine Build Automation -- leech2 -- mingw64 + CFEngine Build Automation -- leech2 -- mingw64 + +Package: cfbuild-leech2-mingw64-devel +Section: libdevel +Architecture: any +Description: CFEngine Build Automation -- leech2 -- mingw64 -- development files + CFEngine Build Automation -- leech2 -- mingw64 -- development files diff --git a/deps-packaging/leech/mingw/debian/copyright b/deps-packaging/leech2/mingw/debian/copyright similarity index 100% rename from deps-packaging/leech/mingw/debian/copyright rename to deps-packaging/leech2/mingw/debian/copyright diff --git a/deps-packaging/leech2/mingw/debian/rules b/deps-packaging/leech2/mingw/debian/rules new file mode 100755 index 000000000..c2548abbd --- /dev/null +++ b/deps-packaging/leech2/mingw/debian/rules @@ -0,0 +1,59 @@ +#!/usr/bin/make -f + +PREFIX=$(BUILDPREFIX) +TARGET=x86_64-pc-windows-gnu + +# Use the system-wide Rust toolchain installed by the build host setup. PATH +# finds the cargo proxy; RUSTUP_HOME lets it locate the toolchain. +export RUSTUP_HOME = /opt/rust +export PATH := /opt/rust/bin:$(PATH) + +clean: + dh_testdir + dh_testroot + + dh_clean + +build: build-stamp +build-stamp: + dh_testdir + + cargo build --release --target $(TARGET) + + touch build-stamp + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + mkdir -p $(CURDIR)/debian/tmp$(PREFIX)/bin + mkdir -p $(CURDIR)/debian/tmp$(PREFIX)/include + mkdir -p $(CURDIR)/debian/tmp$(PREFIX)/lib + + install -m 755 target/$(TARGET)/release/leech2.dll $(CURDIR)/debian/tmp$(PREFIX)/bin/ + install -m 644 include/leech2.h $(CURDIR)/debian/tmp$(PREFIX)/include/ + + # Import library, if the toolchain produced one. + if [ -f target/$(TARGET)/release/leech2.dll.a ]; then \ + install -m 644 target/$(TARGET)/release/leech2.dll.a $(CURDIR)/debian/tmp$(PREFIX)/lib/ ; \ + fi + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_install --sourcedir=debian/tmp + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/deps-packaging/leech2/source b/deps-packaging/leech2/source new file mode 100644 index 000000000..172b76d99 --- /dev/null +++ b/deps-packaging/leech2/source @@ -0,0 +1 @@ +https://github.com/larsewi/leech2/releases/download/v5.0.1/ diff --git a/deps-packaging/release-monitoring.json b/deps-packaging/release-monitoring.json index 6c9cef02e..1490ca6f2 100644 --- a/deps-packaging/release-monitoring.json +++ b/deps-packaging/release-monitoring.json @@ -25,5 +25,5 @@ "sasl2": "13280", "zlib": "5303", "librsync": "6309", - "leech": "376789" + "leech2": "389516" } diff --git a/packaging/cfengine-nova/cfengine-nova.wxs b/packaging/cfengine-nova/cfengine-nova.wxs index a39117727..2e4ccdab4 100644 --- a/packaging/cfengine-nova/cfengine-nova.wxs +++ b/packaging/cfengine-nova/cfengine-nova.wxs @@ -156,8 +156,8 @@ - - + + @@ -212,7 +212,7 @@ - +