Skip to content

Commit

Permalink
pacstrap: Add siglevel option for repositories
Browse files Browse the repository at this point in the history
Signed-off-by: Arnaud Rebillout <[email protected]>
  • Loading branch information
elboulangero authored and santoshmahto7 committed Jul 15, 2021
1 parent ba40558 commit 81052fb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions actions/pacstrap_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Yaml syntax for repositories:
repositories:
- name: repository name
server: server url
siglevel: signature checking settings (optional)
*/
package actions

Expand Down Expand Up @@ -46,8 +47,9 @@ Server = %s
`

type Repository struct {
Name string
Server string
Name string
Server string
SigLevel string
}

type PacstrapAction struct {
Expand All @@ -73,6 +75,9 @@ func (d *PacstrapAction) Run(context *debos.DebosContext) error {
if err != nil {
return fmt.Errorf("Couldn't write to pacman config: %v", err)
}
if r.SigLevel != "" {
f.WriteString(fmt.Sprintf("SigLevel = %s\n", r.SigLevel))
}
}
f.Close()

Expand Down

1 comment on commit 81052fb

@evelikov
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not particularly exited about this, but it makes sense. This would make handling a friendly derivatives like Blackarch a trivial task, with no practical overhead on debos/debos recipe.

For anyone wondering BlackArch is effectively just an extra repository with penetration tools. All you do is edit the pacman.conf to add it and then you can install the additional packages.

Please sign in to comment.