diff --git a/debian/control b/debian/control index 8139375e7..daf346dc4 100644 --- a/debian/control +++ b/debian/control @@ -28,7 +28,7 @@ Depends: ${python3:Depends}, ${misc:Depends} , redis-server , acl , git, curl, wget, cron, unzip, jq, bc, at, procps, j2cli - , lsb-release, haveged, fake-hwclock, equivs, lsof, whois + , lsb-release, haveged, fake-hwclock, lsof, whois Recommends: yunohost-admin , ntp, inetutils-ping | iputils-ping , bash-completion, rsyslog diff --git a/helpers/helpers.v1.d/apt b/helpers/helpers.v1.d/apt index 8231515fc..c3fd9aa07 100644 --- a/helpers/helpers.v1.d/apt +++ b/helpers/helpers.v1.d/apt @@ -186,21 +186,19 @@ ynh_package_install_from_equivs() { # Build and install the package local TMPDIR=$(mktemp --directory) - - # Make sure to delete the legacy compat file - # It's now handle somewhat magically through the control file - rm -f /usr/share/equivs/template/debian/compat + mkdir -p ${TMPDIR}/${pkgname}/DEBIAN/ # Note that the cd executes into a sub shell # Create a fake deb package with equivs-build and the given control file # Install the fake package without its dependencies with dpkg # Install missing dependencies with ynh_package_install ynh_wait_dpkg_free - cp "$controlfile" "${TMPDIR}/control" + cp "$controlfile" "${TMPDIR}/${pkgname}/DEBIAN/control" ( cd "$TMPDIR" - LC_ALL=C equivs-build ./control 2>&1 - LC_ALL=C dpkg --force-depends --install "./${pkgname}_${pkgversion}_all.deb" 2>&1 | tee ./dpkg_log + # Install the fake package without its dependencies with dpkg --force-depends + LC_ALL=C dpkg-deb --build ${pkgname} ${pkgname}.deb > ./dpkg_log 2>&1 || { cat ./dpkg_log; false; } + LC_ALL=C dpkg --force-depends --install "./${pkgname}.deb" 2>&1 | tee ./dpkg_log ) ynh_package_install --fix-broken \ @@ -323,6 +321,7 @@ Package: ${dep_app}-ynh-deps Version: ${version} Depends: ${dependencies} Architecture: all +Maintainer: root@localhost Description: Fake package for ${app} (YunoHost app) dependencies This meta-package is only responsible of installing its dependencies. EOF diff --git a/helpers/helpers.v2.1.d/apt b/helpers/helpers.v2.1.d/apt index 4c78a2147..3930f5e9c 100644 --- a/helpers/helpers.v2.1.d/apt +++ b/helpers/helpers.v2.1.d/apt @@ -90,27 +90,25 @@ ynh_apt_install_dependencies() { dependencies="$current_dependencies, $dependencies" fi - # ############################# - # Actual install using equivs # - # ############################# + # ################ + # Actual install # + # ################ - # Prepare the virtual-dependency control file for equivs + # Prepare the virtual-dependency control file for dpkg-deb --build local TMPDIR=$(mktemp --directory) - cat >${TMPDIR}/control <${TMPDIR}/${app_ynh_deps}/DEBIAN/control < ./equivs_log 2>&1 || { cat ./equivs_log; false; } - LC_ALL=C dpkg --force-depends --install "./${app_ynh_deps}_${version}_all.deb" > ./dpkg_log 2>&1 + LC_ALL=C dpkg-deb --build ${app_ynh_deps} ${app_ynh_deps}.deb > ./dpkg_log 2>&1 || { cat ./dpkg_log; false; } + LC_ALL=C dpkg --force-depends --install "./${app_ynh_deps}.deb" > ./dpkg_log 2>&1 ) # Then install the missing dependencies with apt install