diff --git a/docs/content/doc/usage/packages/arch.en-us.md b/docs/content/doc/usage/packages/arch.en-us.md index 4d7343f7dc..b7853562f1 100644 --- a/docs/content/doc/usage/packages/arch.en-us.md +++ b/docs/content/doc/usage/packages/arch.en-us.md @@ -58,27 +58,27 @@ mQENBGSYoJUBCADSJ6v8Egst/gNJVC2206o8JqTzRBxTULKm/DH5J7AzrhJBxC2/ ## 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 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 echo -n {owner}{package}$(date --rfc-3339=seconds | tr " " T) >> 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 xxd -p md.sig >> md.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 curl -X PUT \ @@ -128,7 +128,7 @@ echo -n {owner}{package}$(date --rfc-3339=seconds | tr " " T) >> 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 curl -X DELETE \ diff --git a/modules/packages/arch/metadata.go b/modules/packages/arch/metadata.go index 4e3606bf66..6f553b8634 100644 --- a/modules/packages/arch/metadata.go +++ b/modules/packages/arch/metadata.go @@ -48,7 +48,7 @@ type Metadata struct { 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) { pkginfo, err := getPkginfo(pkg) if err != nil { @@ -263,8 +263,8 @@ func writeToArchive(files map[string][]byte, buf io.Writer) error { return nil } -// This function can be used to create a list containing unique values from 2 -// passed arguements. The first is +// This function creates a list containing unique values formed of 2 passed +// slices. func UnifiedList(first, second []string) []string { unique := map[string]struct{}{} for _, v := range first { diff --git a/services/packages/arch/verificator.go b/services/packages/arch/verificator.go index dfea40ae7a..f9ac67fb89 100644 --- a/services/packages/arch/verificator.go +++ b/services/packages/arch/verificator.go @@ -24,7 +24,7 @@ type IdentidyOwnerParameters struct { 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 // empty namespace allowed for admin users). Function will return user making // operation, organization or user owning the package.