Commit Graph

103 Commits

Author SHA1 Message Date
d1nch8g
9202199de7
Merge branch 'main' into pacman-packages 2024-03-11 20:08:27 +07:00
KN4CK3R
1c6858543c
Integrate alpine noarch packages into other architectures index (#29137)
Fixes #26691
Revert #24972

The alpine package manager expects `noarch` packages in the index of
other architectures too.

---------

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-02-25 15:10:55 +00:00
Sergey Bugaev
2da233ad8b
Propagate install_if and provider_priority to APKINDEX (#28899)
Resolves https://github.com/go-gitea/gitea/issues/28704

Example of an entry in the generated `APKINDEX` file:

```
C:Q1xCO3H9LTTEbhKt9G1alSC87I56c=
P:hello
V:2.12-r1
A:x86_64
T:The GNU Hello program produces a familiar, friendly greeting
U:https://www.gnu.org/software/hello/
L:GPL-3.0-or-later
S:15403
I:36864
o:hello
m:
t:1705934118
D:so:libc.musl-x86_64.so.1
p:cmd:hello=2.12-r1
i:foobar=1.0 !baz
k:42
```

the `i:` and `k:` entries are new.

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2024-02-05 05:52:56 +00:00
KN4CK3R
ba24e0ba61
Use new RPM constants (#28931)
https://github.com/sassoftware/go-rpmutils/pull/24 got merged.
2024-01-25 21:40:24 +00:00
KN4CK3R
461d8b53c2
Fix some RPM registry flaws (#28782)
Related #26984
(https://github.com/go-gitea/gitea/pull/26984#issuecomment-1889588912)

Fix admin cleanup message.
Fix models `Get` not respecting default values.
Rebuild RPM repository files after cleanup.
Do not add RPM group to package version name.
Force stable sorting of Alpine/Debian/RPM repository data.
Fix missing deferred `Close`.
Add tests for multiple RPM groups.
Removed non-cached `ReplaceAllStringRegex`.

If there are multiple groups available, it's stated in the package
installation screen:

![grafik](https://github.com/go-gitea/gitea/assets/1666336/8f132760-882c-4ab8-9678-77e47dfc4415)
2024-01-19 11:37:10 +00:00
Exploding Dragon
ba4d0b8ffb
Support for grouping RPMs using paths (#26984)
The current rpm repository places all packages in the same repository,
and different systems (el7,f34) may hit packages that do not belong to
this distribution ( #25304 ) , which now supports grouping of rpm.

![图片](https://github.com/go-gitea/gitea/assets/33776693/d1e1d99f-7799-4b2b-a19b-cb2a5c692914)

Fixes #25304 .
Fixes #27056 .

Refactor: [#25866](https://github.com/go-gitea/gitea/pull/25866)
2024-01-12 03:16:05 +00:00
Danila Fominykh
ca66c6d324
use buffer in pacman db desc function 2023-11-01 19:19:49 -03:00
Danila Fominykh
d6a05c30d2
moved package properties to constants in metadata module 2023-11-01 15:24:40 -03:00
Danila Fominykh
5c22b915bb
lint corrections 2023-10-31 20:36:08 -03:00
Danila Fominykh
5becd3c4e0
initialize regular expressions for arch package validation once 2023-10-31 14:51:12 -03:00
Danila Fominykh
8aeada8c30
additional validations for package metadata fields, split package metadata into file and version related structures, better test coverage and refactoring in metadata module 2023-10-30 21:53:14 -03:00
Danila Fominykh
f8b78cba23
Merge branch 'main' into pacman-packages 2023-10-26 12:16:04 -03:00
KN4CK3R
ab3f6c1bac
Close all hashed buffers (#27787)
Add missing `.Close()` calls. The current code does not delete the
temporary files if the data grows over 32mb.
2023-10-25 21:24:24 +02:00
Danila Fominykh
95a1df6dfc
import naming unification with other package types 2023-10-12 11:56:54 -03:00
Danila Fominykh
f812aa7cf7
fixes in arch package metadata tests 2023-10-12 11:47:17 -03:00
Danila Fominykh
6052aea5f2
moved upload function to arch service 2023-10-12 11:43:33 -03:00
Danila Fominykh
b63af7e277
metadata tests, json struct tag unification with other linux packages, removed package backup files from metadata and arch package UI 2023-10-09 03:13:53 -03:00
Danila Fominykh
54c0816377
refactoring, better readability in arch package metadata module 2023-10-05 16:16:02 -03:00
Danila Fominykh
b7725c6b53
formatting corrections 2023-10-03 14:58:58 -03:00
Danila Fominykh
784b4f9304
refactoring in metadata module, pacman database creation function 2023-10-02 22:00:44 -03:00
Danila Fominykh
8974d27ba3
refactoring in metadata module, better readability
shorter function calls in arch service
fix - request now ends if unable to decode package signature from hex
fix - now package search continues to previous versions in package file for required architecture not found for current version
2023-10-02 19:12:06 -03:00
Danila Fominykh
4656b3b958
replaced bytes.Buffer with packages.HashedBuffer to return working io.ReadSeeker implementation 2023-09-25 18:42:48 -03:00
Danila Fominykh
907aa021a1
refactoring create pacman database function 2023-09-24 14:12:07 -03:00
Danila Fominykh
54fd84d83f
function to get package file property by composite key, refactoring function creating pacman database 2023-09-24 13:32:53 -03:00
Danila Fominykh
a2aaae3dc7
refactoring funciton creating arch package database archive 2023-09-12 12:05:25 -03:00
Danila Fominykh
93b1f854c4
Merge branch 'main' into pacman-packages 2023-08-30 19:41:38 -03:00
Lunny Xiao
476b9d1589
Use docs.gitea.com instead of docs.gitea.io (#26739) 2023-08-27 11:59:12 +00:00
Danila Fominykh
ad2af70d5c
Merge branch 'main' into pacman-packages 2023-08-26 17:38:46 +03:00
TimberBro
84d05516dc
Fix NPM packages name validation (#26595)
- Added new tests to cover corner cases
- Replace existing regex with new one
Closes #26551 

---
As @silverwind suggested, I started from
[validate-npm-package-name](https://github.com/npm/validate-npm-package-name),
but found this solution too complicated.
Then I tried to fix existing regex myself, but thought, that exclude all
restricted symbols is harder, than set only allowed symbols.
Then I search a bit more and found
[package-name-regex](https://github.com/dword-design/package-name-regex)
and regex from it works for all new test cases.

Let me know, if more information or help with this PR is needed.
2023-08-20 15:06:42 +00:00
Danila Fominykh
0d08eaa556
reduced amount of logic, removed unnecessary fields 2023-08-08 19:40:54 +03:00
Danila Fominykh
e86bdfcb0e
metadata and signature are stored in package properties instead of object storage 2023-08-08 16:21:17 +03:00
Danila Fominykh
a3cb45cf3b
Merge branch 'main' into pacman-packages 2023-08-05 12:00:07 +03:00
KN4CK3R
2d3924d0e7
Prevent newline errors with Debian packages (#26332)
Fixes #26313
2023-08-05 10:59:52 +02:00
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