d1nch8g
feb99cd071
Merge branch 'main' into pacman-packages
2024-05-13 07:49:03 +03:00
Micash
ad4e902d5a
Add support for npm bundleDependencies ( #30751 )
2024-04-29 16:19:06 +08:00
silverwind
74f0c84fa4
Enable more revive
linter rules ( #30608 )
...
Noteable additions:
- `redefines-builtin-id` forbid variable names that shadow go builtins
- `empty-lines` remove unnecessary empty lines that `gofumpt` does not
remove for some reason
- `superfluous-else` eliminate more superfluous `else` branches
Rules are also sorted alphabetically and I cleaned up various parts of
`.golangci.yml`.
2024-04-22 11:48:42 +00:00
Michael Kriese
bafb80f80d
Support nuspec manifest download for nuget packages ( #28921 )
...
Support downloading nuget nuspec manifest[^1]. This is useful for
renovate because it uses this api to find the corresponding repository
- Store nuspec along with nupkg on upload
- allow downloading nuspec
- add doctor command to add missing nuspec files
[^1]:
https://learn.microsoft.com/en-us/nuget/api/package-base-address-resource#download-package-manifest-nuspec
---------
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2024-04-17 15:30:41 +00:00
KN4CK3R
8498e67309
Some NuGet package enhancements ( #30280 )
...
Fixes #30265
1. Read second type of dependencies
2. Render `Description` and `ReleaseNotes`
old:

new:

The NuGet spec does not specify what kind of text can be stored in the
description but we can best guess markdown. The official NuGet registry
just [converts the newlines to html
lines](https://www.nuget.org/packages/rb.Firefox#readme-body-tab ).
3. Extract and render the readme. This is the new and better place to
store larger text than in the description. The content is markdown.

---------
Co-authored-by: Benjamin Heemann <benjamin.heemann@raith.de>
2024-04-07 16:46:59 +00:00
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:

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.

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