Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 if upload non SemVers Conan packages #21250

Closed
Leopol123 opened this issue Sep 23, 2022 · 3 comments · Fixed by #21275
Closed

Error 500 if upload non SemVers Conan packages #21250

Leopol123 opened this issue Sep 23, 2022 · 3 comments · Fixed by #21275

Comments

@Leopol123
Copy link

Description

We are trying Gitea as repository.

We are experimenting the same issue that this case using Conan package:

#20603 (comment)

****

If we upload a conan package using nonSem version, we have error 500 on repo package pages.

To fix this issue, I update semver_compatible from true to false :

giteadb=# UPDATE package SET semver_compatible = 'f' WHERE id = 7;
UPDATE 1
giteadb=# UPDATE package SET semver_compatible = 'f' WHERE id = 9;
UPDATE 1
giteadb=# select * from package;
 id | owner_id | repo_id |  type   |     name     |  lower_name  | semver_compatible
----+----------+---------+---------+--------------+--------------+-------------------
  1 |        2 |       0 | generic | cirros       | cirros       | f
  2 |        4 |       0 | conan   | boost        | boost        | t
  4 |       12 |       0 | conan   | b2           | b2           | t
  5 |       12 |       0 | conan   | boost        | boost        | t
  6 |       12 |       0 | conan   | grpc         | grpc         | t
 10 |       12 |       0 | conan   | openssl      | openssl      | t
 11 |       12 |       0 | conan   | zlib         | zlib         | t
  7 |       12 |       0 | conan   | libbacktrace | libbacktrace | f
  9 |       12 |       0 | conan   | opengv       | opengv       | f
(9 rows)

giteadb=#

There is no command on conan upload cli to fix semvers to true or false.

Is this a bug in Gitea ?

Thanks,

Gitea Version

1.18-dev

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Ubuntu 22

How are you running Gitea?

Install gitea on vmware virtual machine, ubuntu22 using the binary.

Database

PostgreSQL

@wxiaoguang wxiaoguang added this to the 1.17.3 milestone Sep 23, 2022
@KN4CK3R
Copy link
Member

KN4CK3R commented Sep 23, 2022

I expected conan to use SemVer but the upload did not enforce it. I don't use conan in production, are non-SemVer versions common and should the registry allow non-SemVer versions?

The docs are not clear about that:
https://docs.conan.io/en/latest/versioning/introduction.html

It is also true that the semver definition that comes from other programming languages doesn’t fit that well to C and C++ packages, because of different reasons, because of open source libraries that don’t closely follow the semver specification, but also because of the ABI compatibility issues and compilation model that is so characteristic of C and C++ binaries.

@Leopol123
Copy link
Author

I am more an ops than a dev. Our dev team uses non-SemVer versions on Conan packages but I don't know if it's a good practise.

Thanks for your interest on thi s issue.

@stefled
Copy link

stefled commented Oct 6, 2022

For instance, libbacktrace recipe on Conan-center index doesn't use SemVer : version is cci.20210118 and we encounter the problem with this dependency.

not tested, but perhaps it's the same with :

More generally, we cannot either manage an intermediate version in dev : "latest" or other string version currently with Gitea.

wxiaoguang pushed a commit that referenced this issue Oct 7, 2022
Fixes #21250
Related #20414

Conan packages don't have to follow SemVer.
The migration fixes the setting for all existing Conan and Generic
(#20414) packages.
KN4CK3R added a commit to KN4CK3R/gitea that referenced this issue Oct 7, 2022
Fixes go-gitea#21250
Related go-gitea#20414

Conan packages don't have to follow SemVer.
The migration fixes the setting for all existing Conan and Generic
(go-gitea#20414) packages.
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants