Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eepm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
eepm
Commits
ee131435
Commit
ee131435
authored
Mar 20, 2025
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add epm repo importgpg - import gpg key to package manager
parent
3d7e1e39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
2 deletions
+44
-2
epm-repo
bin/epm-repo
+4
-0
epm-repo-addkey
bin/epm-repo-addkey
+40
-2
No files found.
bin/epm-repo
View file @
ee131435
...
@@ -74,6 +74,10 @@ epm_repo()
...
@@ -74,6 +74,10 @@ epm_repo()
load_helper epm-repo-addkey
load_helper epm-repo-addkey
epm_addkey
"
$@
"
epm_addkey
"
$@
"
;;
;;
importgpg
)
# HELPCMD: import gpg key (by URL or file)
load_helper epm-repo-addkey
epm_importgpg
"
$@
"
;;
clean
)
# HELPCMD: remove temp. repos (tasks and CD-ROMs)
clean
)
# HELPCMD: remove temp. repos (tasks and CD-ROMs)
load_helper epm-repofix
load_helper epm-repofix
epm_repoclean
"
$@
"
epm_repoclean
"
$@
"
...
...
bin/epm-repo-addkey
View file @
ee131435
#!/bin/sh
#!/bin/sh
#
#
# Copyright (C) 2023 Etersoft
# Copyright (C) 2023
, 2025
Etersoft
# Copyright (C) 2023 Vitaly Lipatov <lav@etersoft.ru>
# Copyright (C) 2023
, 2025
Vitaly Lipatov <lav@etersoft.ru>
#
#
# This program is free software: you can redistribute it and/or modify
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# it under the terms of the GNU Affero General Public License as published by
...
@@ -31,6 +31,22 @@ __epm_get_file_from_url()
...
@@ -31,6 +31,22 @@ __epm_get_file_from_url()
echo
"
$tmpfile
"
echo
"
$tmpfile
"
}
}
__epm_altgpg
()
{
sudocmd gpg
--no-default-keyring
--keyring
/usr/lib/alt-gpgkeys/pubring.gpg
"
$@
"
}
__epm_importgpg_altlinux
()
{
local
res
local
url
=
"
$1
"
local
tmpfile
=
$(
__epm_get_file_from_url
"
$url
"
)
||
fatal
# just always try import
__epm_altgpg
--import
$tmpfile
res
=
$?
rm
$tmpfile
return
$res
}
__epm_addkey_altlinux
()
__epm_addkey_altlinux
()
{
{
local
name
local
name
...
@@ -171,6 +187,28 @@ __epm_addkey_deb()
...
@@ -171,6 +187,28 @@ __epm_addkey_deb()
sudocmd apt-key adv
--keyserver
"
$url
"
--recv
"
$fingerprint
"
sudocmd apt-key adv
--keyserver
"
$url
"
--recv
"
$fingerprint
"
}
}
epm_importgpg
()
{
if
[
"
$1
"
=
"-h"
]
||
[
"
$1
"
=
"--help"
]
||
[
-z
"
$1
"
]
;
then
message
"Usage:
$
epm repo importgpg <url>"
return
fi
# initialize here
remove_on_exit
case
$BASEDISTRNAME
in
"alt"
)
__epm_importgpg_altlinux
"
$@
"
return
;;
esac
}
epm_addkey
()
epm_addkey
()
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment