mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-01 14:56:30 +00:00
markdown and code documentation lint corrections
This commit is contained in:
parent
d679c7e5e7
commit
c4f3fb302b
@ -58,27 +58,27 @@ mQENBGSYoJUBCADSJ6v8Egst/gNJVC2206o8JqTzRBxTULKm/DH5J7AzrhJBxC2/
|
|||||||
|
|
||||||
## Upload packages
|
## Upload packages
|
||||||
|
|
||||||
1. Ensure, that your package have been signed with your gpg key (more about arch package signing)[https://wiki.archlinux.org/title/DeveloperWiki:Package_signing]. You can do that by running following command:
|
1. Ensure, that your package have been signed with your gpg key (more about arch [package signing](https://wiki.archlinux.org/title/DeveloperWiki:Package_signing)). You can do that by running following command:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
gpg --verify package-ver-1-x86_64.pkg.tar.zst.sig
|
gpg --verify package-ver-1-x86_64.pkg.tar.zst.sig
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Sign message metadata, which consists of package owner (namespace in gitea), package file name and send time. You can do that by running following command:
|
1. Sign message metadata, which consists of package owner (namespace in gitea), package file name and send time. You can do that by running following command:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
echo -n {owner}{package}$(date --rfc-3339=seconds | tr " " T) >> md
|
echo -n {owner}{package}$(date --rfc-3339=seconds | tr " " T) >> md
|
||||||
gpg --detach-sign md
|
gpg --detach-sign md
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Decode message and metadata signatures to hex, by running following commands, save output somewhere.
|
1. Decode message and metadata signatures to hex, by running following commands, save output somewhere.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
xxd -p md.sig >> md.sig.hex
|
xxd -p md.sig >> md.sig.hex
|
||||||
xxd -p package-1-1-x86_64.pkg.tar.zst.sig >> pkg.sig.hex
|
xxd -p package-1-1-x86_64.pkg.tar.zst.sig >> pkg.sig.hex
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Paste your parameters and push package with [curl](https://curl.se/). Important, that time should be the same with metadata (signed md file), since this value is verified with GnuPG.
|
1. Paste your parameters and push package with [curl](https://curl.se/). Important, that time should be the same with metadata (signed md file), since this value is verified with GnuPG.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -X PUT \
|
curl -X PUT \
|
||||||
@ -128,7 +128,7 @@ echo -n {owner}{package}$(date --rfc-3339=seconds | tr " " T) >> md
|
|||||||
gpg --detach-sign md
|
gpg --detach-sign md
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Send delete message with [curl](https://curl.se/). Time should be the same with saved in `md` file.
|
1. Send delete message with [curl](https://curl.se/). Time should be the same with saved in `md` file.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -X DELETE \
|
curl -X DELETE \
|
||||||
|
@ -48,7 +48,7 @@ type Metadata struct {
|
|||||||
DistroArch []string `json:"distro-arch"`
|
DistroArch []string `json:"distro-arch"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function that recieves arch package archive data and returns it's metadata.
|
// Function that receives arch package archive data and returns it's metadata.
|
||||||
func EjectMetadata(filename, distribution, domain string, pkg []byte) (*Metadata, error) {
|
func EjectMetadata(filename, distribution, domain string, pkg []byte) (*Metadata, error) {
|
||||||
pkginfo, err := getPkginfo(pkg)
|
pkginfo, err := getPkginfo(pkg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -263,8 +263,8 @@ func writeToArchive(files map[string][]byte, buf io.Writer) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function can be used to create a list containing unique values from 2
|
// This function creates a list containing unique values formed of 2 passed
|
||||||
// passed arguements. The first is
|
// slices.
|
||||||
func UnifiedList(first, second []string) []string {
|
func UnifiedList(first, second []string) []string {
|
||||||
unique := map[string]struct{}{}
|
unique := map[string]struct{}{}
|
||||||
for _, v := range first {
|
for _, v := range first {
|
||||||
|
@ -24,7 +24,7 @@ type IdentidyOwnerParameters struct {
|
|||||||
Email string
|
Email string
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function will find user related to provided email adress and check if
|
// This function will find user related to provided email address and check if
|
||||||
// he is able to push packages to provided namespace (user/organization/or
|
// he is able to push packages to provided namespace (user/organization/or
|
||||||
// empty namespace allowed for admin users). Function will return user making
|
// empty namespace allowed for admin users). Function will return user making
|
||||||
// operation, organization or user owning the package.
|
// operation, organization or user owning the package.
|
||||||
|
Loading…
Reference in New Issue
Block a user