Danila Fominykh
28712bc91e
refactoring
2023-08-04 14:52:36 +03:00
Danila Fominykh
0c7aa7f63e
refactoring
2023-08-03 20:43:13 +03:00
Danila Fominykh
ebaa5436ad
lint corrections
2023-08-03 17:36:48 +03:00
Danila Fominykh
d069303825
fixed pacman database creation algorithm, arch UI template
2023-08-02 00:23:12 +03:00
Danila Fominykh
3c6dd37019
Merge branch 'main' into pacman-packages
2023-07-31 10:14:41 +03:00
KN4CK3R
d08ab7be9c
Fix typo in metadata ( #26207 )
...
https://github.com/go-gitea/gitea/pull/26194#discussion_r1277094525
There is no need to backport because these names are just used internal.
2023-07-30 23:54:22 +00:00
Danila Fominykh
3df8d52fb8
changed pacman database creation mechanics, storing package desc as file in object storage, metadata structure update
2023-07-28 16:32:01 +03:00
Danila Fominykh
1abff64ccd
refactoring function to find unique values
2023-07-26 20:32:40 +03:00
Danila Fominykh
ce0d3935bf
removed unnecessary headers in arch package template
2023-07-26 18:42:00 +03:00
silverwind
672b00b542
Merge branch 'main' into pacman-packages
2023-07-25 00:02:26 +02:00
KN4CK3R
6aa30af724
Fix handling of Debian files with trailing slash ( #26087 )
...
Fixes #26022
- Fix handling of files with trailing slash
- Fix handling of duplicate package file errors
- Added test for both
2023-07-24 16:19:44 +02:00
Danila Fominykh
23f1ba193d
replaced base domain variable in metadata with registry host variable in similarly with container registry
2023-07-24 13:33:45 +03:00
Danila Fominykh
0093004d0f
removed distro field from arch package metadata, corrected related UI
2023-07-23 20:18:26 +03:00
Danila Fominykh
1a082903d7
Merge branch 'main' into pacman-packages
2023-07-16 13:09:54 +03:00
KN4CK3R
bd82d8974e
Add support for different Maven POM encoding ( #25873 )
...
Fixes #25853
- Maven POM files aren't always UTF-8 encoded.
- Reject the upload of unparsable POM files
2023-07-14 09:39:15 +00:00
dancheg97
c4f3fb302b
markdown and code documentation lint corrections
2023-07-12 13:32:38 +03:00
dancheg97
8195185607
lint corrections
2023-07-10 20:50:44 +03:00
dancheg97
364c33b0ad
fixed pacman database creation error for case with multiple architectures and distributions
2023-07-09 11:48:46 +03:00
silverwind
b5db5b89e8
Merge branch 'main' into pacman-packages
2023-07-04 20:43:36 +02:00
silverwind
88f835192d
Replace interface{}
with any
( #25686 )
...
Result of running `perl -p -i -e 's#interface\{\}#any#g' **/*` and `make fmt`.
Basically the same [as golang did](2580d0e08d
).
2023-07-04 18:36:08 +00:00
KN4CK3R
c890454769
Add direct serving of package content ( #25543 )
...
Fixes #24723
Direct serving of content aka HTTP redirect is not mentioned in any of
the package registry specs but lots of official registries do that so it
should be supported by the usual clients.
2023-07-03 15:33:28 +02:00
dancheg97
56772de730
corrected package blob structure, pacman database is created on get request automatically from package metadata in database
2023-07-02 23:03:34 +03:00
dancheg97
39e42f7c2b
fixed dependencies appended to wrong field in metadata
2023-06-26 17:10:04 +03:00
dancheg97
f1fae9ada6
changed procedure of package metadata ejection, removed unnecessary fields and unnecessary string conversions
2023-06-26 12:28:14 +03:00
dancheg97
1d1a5a312f
added function removing old package entries from pacman database to avoid duplication error
2023-06-25 23:05:02 +03:00
dancheg97
5beeb24684
added method to remove package verified with user's GPG key, removed unnecessary directory creation
2023-06-25 13:15:29 +03:00
dancheg97
c37231189b
corrected package database connection description and documentation reference in UI
2023-06-24 18:08:18 +03:00
dancheg97
e2b12f2db7
fixed error when attempting to read empty database
2023-06-24 17:27:39 +03:00
dancheg97
e399ce8452
opdated operation pacman database craetion to form or update database file in memory, added download counter related to pkg.tar.zst files
2023-06-24 13:37:33 +03:00
dancheg97
b354f027ff
code refactoring and package version publisher id correction
2023-06-21 23:30:07 +03:00
dancheg97
808a7aed67
replaced zstd with archiver and limit reader to speed up metadata ejection and remove windows incompatible dependency
2023-06-21 14:05:25 +03:00
dancheg97
ec18d9b535
added arch packages implementation
2023-06-20 23:08:48 +03:00
KN4CK3R
cdb088cec2
Add CRAN package registry ( #22331 )
...
This PR adds a [CRAN](https://cran.r-project.org/ ) package registry.

2023-05-22 10:57:49 +08:00
KN4CK3R
5968c63a11
Add Go package registry ( #24687 )
...
Fixes #7608
This PR adds a Go package registry usable with the Go proxy protocol.

2023-05-14 23:38:40 +08:00
KN4CK3R
9173e079ae
Add Alpine package registry ( #23714 )
...
This PR adds an Alpine package registry. You can follow [this
tutorial](https://wiki.alpinelinux.org/wiki/Creating_an_Alpine_package )
to build a *.apk package for testing.
This functionality is similar to the Debian registry (#22854 ) and
therefore shares some methods. I marked this PR as blocked because it
should be merged after #22854 .

---------
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-12 17:27:50 +00:00
KN4CK3R
05209f0d1d
Add RPM registry ( #23380 )
...
Fixes #20751
This PR adds a RPM package registry. You can follow [this
tutorial](https://opensource.com/article/18/9/how-build-rpm-packages ) to
build a *.rpm package for testing.
This functionality is similar to the Debian registry (#22854 ) and
therefore shares some methods. I marked this PR as blocked because it
should be merged after #22854 .

2023-05-05 20:33:37 +00:00
KN4CK3R
bf999e4069
Add Debian package registry ( #24426 )
...
Co-authored-by: @awkwardbunny
This PR adds a Debian package registry.
You can follow [this
tutorial](https://www.baeldung.com/linux/create-debian-package ) to build
a *.deb package for testing.
Source packages are not supported at the moment and I did not find
documentation of the architecture "all" and how these packages should be
treated.

Part of #20751 .
Revised copy of #22854 .
---------
Co-authored-by: Brian Hong <brian@hongs.me>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-05-02 12:31:35 -04:00
Yarden Shoham
c0ddec8a2a
Revert "Add Debian package registry" ( #24412 )
...
Reverts go-gitea/gitea#22854
2023-04-28 18:06:41 -04:00
KN4CK3R
bf77e2163b
Add Debian package registry ( #22854 )
...
Co-authored-by: @awkwardbunny
This PR adds a Debian package registry. You can follow [this
tutorial](https://www.baeldung.com/linux/create-debian-package ) to build
a *.deb package for testing. Source packages are not supported at the
moment and I did not find documentation of the architecture "all" and
how these packages should be treated.
---------
Co-authored-by: Brian Hong <brian@hongs.me>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2023-04-28 17:51:36 -04:00
KN4CK3R
f1173d6879
Use more specific test methods ( #24265 )
...
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
2023-04-22 17:56:27 -04:00
KN4CK3R
fbd4eaceed
Display image size for multiarch container images ( #23821 )
...
Fixes #23771
Changes the display of different architectures for multiarch images to
show the image size:

2023-04-02 17:53:37 +08:00
Zettat123
46addc1f93
Return repository
in npm package metadata endpoint ( #23539 )
...
Close #23444
Add `Repository` to npm package `Metadata` struct so the `repository` in
`package.json` can be stored and be returned in the endpoint.
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2023-03-17 14:39:19 -04:00
KN4CK3R
c709fa17a7
Add Swift package registry ( #22404 )
...
This PR adds a [Swift](https://www.swift.org/ ) package registry.

2023-03-13 15:28:39 -05:00
KN4CK3R
f8c1e14a13
Use import of OCI structs ( #22765 )
...
Fixes #22758
Otherwise we would need to rewrite the structs in `oci.go`.
2023-02-06 10:07:09 +00:00
KN4CK3R
d987ac6bf1
Add Chef package registry ( #22554 )
...
This PR implements a [Chef registry](https://chef.io/ ) to manage
cookbooks. This package type was a bit complicated because Chef uses RSA
signed requests as authentication with the registry.


Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-02-06 09:49:21 +08:00
KN4CK3R
df789d962b
Add Cargo package registry ( #21888 )
...
This PR implements a [Cargo registry](https://doc.rust-lang.org/cargo/ )
to manage Rust packages. This package type was a little bit more
complicated because Cargo needs an additional Git repository to store
its package index.
Screenshots:



---------
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-02-05 18:12:31 +08:00
KN4CK3R
6ba9ff7b48
Add Conda package registry ( #22262 )
...
This PR adds a [Conda](https://conda.io/ ) package registry.
2023-02-01 12:30:39 -06:00
KN4CK3R
3fef47b41c
Use ErrInvalidArgument in packages ( #22268 )
...
Related to
https://github.com/go-gitea/gitea/pull/22262#discussion_r1059010774
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
2022-12-31 12:49:37 +01:00
KN4CK3R
86ace4b5c2
Normalize NuGet package version on upload ( #22186 )
...
Fixes #22178
After this change upload versions with different semver metadata are
treated as the same version and trigger a duplicated version error.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-12-20 22:20:23 -05:00
Jason Song
9607750b5e
Replace fmt.Sprintf with hex.EncodeToString ( #21960 )
...
`hex.EncodeToString` has better performance than `fmt.Sprintf("%x",
[]byte)`, we should use it as much as possible.
I'm not an extreme fan of performance, so I think there are some
exceptions:
- `fmt.Sprintf("%x", func(...)[N]byte())`
- We can't slice the function return value directly, and it's not worth
adding lines.
```diff
func A()[20]byte { ... }
- a := fmt.Sprintf("%x", A())
- a := hex.EncodeToString(A()[:]) // invalid
+ tmp := A()
+ a := hex.EncodeToString(tmp[:])
```
- `fmt.Sprintf("%X", []byte)`
- `strings.ToUpper(hex.EncodeToString(bytes))` has even worse
performance.
2022-11-28 11:19:18 +00:00