crystal-lang / distribution-scripts

40 stars 23 forks source link

Require either pkg-config or pkgconf #275

Open joshcangit opened 7 months ago

joshcangit commented 7 months ago

When installing this as an Apt package, it requires pkg-config as per #22. I'm using Ubuntu 22.04 and have installed pkgconf.

If it needs this, then why not require either pkg-config or pkgconf? I suppose there's a way to conditionally depend on one package if the other is not found or vice versa.

joshcangit commented 7 months ago

Could modify the control file for deb packages with this.

--- control
+++ control
@@ -3,7 +3,7 @@
 Architecture: amd64
 Maintainer: Crystal Team <crystal@manas.tech>
 Installed-Size: 130120
-Depends: gcc, pkg-config, libpcre3-dev, libpcre2-dev, libevent-dev
+Depends: gcc, pkg-config|pkgconf, libpcre3-dev, libpcre2-dev, libevent-dev
 Recommends: libssl-dev, libz-dev, libxml2-dev, libgmp-dev, libyaml-dev
 Provides: crystal
 Section: devel
straight-shoota commented 7 months ago

This seems a bit odd. As far as I can tell, pkgconf should provide pkg-config and thus fulfil the dependency. Can you share the package information of your pkgconf?

Are you aware of any other packages defining pkgconf as an explicit alternative dependency?

joshcangit commented 7 months ago

I have apt reporting broken dependencies when installing crystal1.10. Only if I remove pkgconf and install pkg-config beforehand then it works. I couldn't find any packages that explicitly require pkgconf.

But some packages which depend on pkg-config could work fine with pkgconf. I could find libavahi-client-dev as one of those. Still, those packages have to be reinstalled before the Crystal deb package could be installed.

straight-shoota commented 7 months ago

I can't reproduce this. I'm running the following commands on a clean ubuntu:22.04 docker container:

apt update
apt install -y pkgconf curl
curl -fsSL https://crystal-lang.org/install.sh | bash

The crystal package installs and works while pkg-config is aliased to pkgconfig. So that makes me wonder if this isn't an issue with your particular setup.

The official Debian package by the way has the same dependency on pkg-config: https://salsa.debian.org/deiv/crystal/-/blob/master/debian/control#L30

joshcangit commented 7 months ago

Is installing from the Open Build Service the same? The packages there seem to be a bit different from the Debian packages.

straight-shoota commented 7 months ago

The install script installs packages from Open Build System. These are the only ones that we maintain.

joshcangit commented 7 months ago

Is it different if I set up and install the package manually without the script?

straight-shoota commented 7 months ago

No. It's the same package.