Crystal-1.6.1-1.1.x86_64, Fedora 37 (rpm) package may be maformed

sudo dnf install crystal
Installing:
** crystal x86_64 1.6.1-1.1 crystal 29 M**

sudo dnf check
crystal-1.6.1-1.1.x86_64 has installed conflict “crystal”: crystal-1.6.1-1.1.x86_64
Error: Check discovered 1 problem(s)

I reinstalled : same problem, the RPM package may be malformed ?
Thanks.

Can you try this?

[root@zw963 ~]# curl -fsSL https://crystal-lang.org/install.sh | sudo bash

Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/nodesource-el8.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/nodesource-el8.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Crystal (CentOS_8)                                             21 kB/s | 112 kB     00:05    
Last metadata expiration check: 0:00:01 ago on Thu 03 Nov 2022 11:28:12 PM HKT.
Package crystal-1.6.0~20220920.git.6c3305e7-1.1.x86_64 is already installed.
Dependencies resolved.
==============================================================================================
 Package              Architecture        Version                  Repository            Size
==============================================================================================
Upgrading:
 crystal              x86_64              1.6.1-1.1                crystal               31 M

Transaction Summary
==============================================================================================
Upgrade  1 Package

Total download size: 31 M
Downloading Packages:
crystal-1.6.1-1.1.x86_64.rpm                                  171 kB/s |  31 MB     03:03    
----------------------------------------------------------------------------------------------
Total                                                         171 kB/s |  31 MB     03:03     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                      1/1 
  Upgrading        : crystal-1.6.1-1.1.x86_64                                             1/2 
  Cleanup          : crystal-1.6.0~20220920.git.6c3305e7-1.1.x86_64                       2/2 
  Running scriptlet: crystal-1.6.0~20220920.git.6c3305e7-1.1.x86_64                       2/2 
/sbin/ldconfig: /etc/ld.so.conf.d/kernel-ml-5.17.5-1.el8.elrepo.x86_64.conf:6: hwcap directive ignored

  Verifying        : crystal-1.6.1-1.1.x86_64                                             1/2 
  Verifying        : crystal-1.6.0~20220920.git.6c3305e7-1.1.x86_64                       2/2 

Upgraded:
  crystal-1.6.1-1.1.x86_64                                                                    

Complete!
[root@zw963 ~]# crystal version
Crystal 1.6.1 [fc61bd678] (2022-10-21)

LLVM: 13.0.1
Default target: x86_64-unknown-linux-gnu
[root@zw963 ~]# 

Billy,
Thanks, but I prefer not, packages avoid breaking a good system.
Anyways the issue seems to be with the rpm package.
My Guess is the problem is I the spec file.

André

rpm package no issue.

I guess the above bash script is just updating the crystal repo file, then install it.

[root@zw963 yum.repos.d]# yum install crystal
Last metadata expiration check: 1:38:45 ago on Thu 03 Nov 2022 11:28:12 PM HKT.
Package crystal-1.6.1-1.1.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@zw963 yum.repos.d]# grep -i -e 'crystal' .  -R
./crystal.repo:[crystal]
./crystal.repo:name=Crystal (CentOS_8)
./crystal.repo:baseurl=https://download.opensuse.org/repositories/devel:languages:crystal/CentOS_8/
./crystal.repo:gpgkey=https://download.opensuse.org/repositories/devel:languages:crystal/CentOS_8/repodata/repomd.xml.key
[root@zw963 yum.repos.d]# 

Check the installation menu here

From which repository are you installing this package? Fedora 37 is not yet available in the official packages hosted on build.opensuse.org (OBS does not support it yet).

Billy:
Thanks for the update.

if I modify the /etc/crystal.rep as

[crystal]
name=Crystal (Fedora_37)
type=rpm-md
baseurl=https://download.opensuse.org/repositories/devel:languages:crystal/Fedora_Rawhide/
gpgcheck=1
gpgkey=https://download.opensuse.org/repositories/devel:languages:crystal/Fedora_Rawhide/repodata/repomd.xml.key
enabled=1

Then it does install the proper version (FC37), but the problem is stil there.
My guess is it was tested for Suse, and something wrong in the RPM , still.
Andre

Sorry, I have very limited experience with RPM packaging systems. So any assistance is welcome.

The packages are generated for every repository from this spec file: File crystal.spec of Package crystal - openSUSE Build Service

There is a Conflicts: crystal line which is a likely cause for this.

IIRC, the idea was to express that this package conflicts with other packages that provide crystal as well (say crystal1.4 for example). But apparently, it doesn’t work like this? Well it works at least partially because the conflict does not prevent you from installing the package itself but it pevents from installing other packages such as crystal1.4.

dnf info crystal

Installed Packages
Name : crystal
Version : 1.6.1
Release : 1.9
Architecture : x86_64
Size : 116 M
Source : crystal-1.6.1-1.9.src.rpm
Repository : @System
From repo : crystal
Summary : A programming language for humans and computers
URL : https://github.com/crystal-lang/crystal
License : ASL 2.0
Description : Crystal is a general-purpose, object-oriented programming language.
: With syntax inspired by Ruby, it is a compiled language with static type-checking,
: serving both, humans and computers.