markdown and code documentation lint corrections

This commit is contained in:
dancheg97 2023-07-12 13:32:38 +03:00
parent d679c7e5e7
commit c4f3fb302b
3 changed files with 9 additions and 9 deletions

View File

@ -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 \

View File

@ -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 {

View File

@ -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.