Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
abuild
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
abuild
Commits
ce020315
Commit
ce020315
authored
Jul 22, 2009
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
abuild-keygen: support for -i to install pubkey to /etc/apk/keys
parent
9a622715
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
4 deletions
+32
-4
abuild-keygen.in
abuild-keygen.in
+32
-4
No files found.
abuild-keygen.in
View file @
ce020315
...
...
@@ -15,6 +15,17 @@ abuild_conf=${ABUILD_CONF:-"$sysconfdir/abuild.conf"}
abuild_home
=
${
ABUILD_USERDIR
:-
"
$HOME
/.abuild"
}
abuild_userconf
=
${
ABUILD_USERCONF
:-
"
$abuild_home
/abuild.conf"
}
usage
()
{
echo
"abuild-keygen
$abuild_ver
"
echo
"usage: abuild-keygen [-ih]"
echo
"options:"
echo
" -i Install public key into /etc/apk/keys using sudo"
echo
" -h Show this help"
echo
""
exit
1
}
# read config
[
-f
"
$abuild_conf
"
]
&&
.
"
$abuild_conf
"
...
...
@@ -35,6 +46,14 @@ else
default_name
=
"
$USER
"
fi
while
getopts
"hi"
opt
;
do
case
$opt
in
h
)
usage
;;
i
)
install_pubkey
=
yes
;
esac
done
shift
$((
$OPTIND
-
1
))
mkdir
-p
"
$abuild_home
"
echo
"Generating public/private rsa key pair for abuild"
...
...
@@ -55,10 +74,19 @@ openssl genrsa -out "$privkey" 2048
)
openssl rsa
-in
"
$privkey
"
-pubout
-out
"
$pubkey
"
echo
""
echo
"You'll need to install
$pubkey
into "
echo
"/etc/apk/keys to be able to install packages and repositories signed with"
echo
"
$privkey
"
if
[
-n
"
$install_pubkey
"
]
;
then
echo
"Installing
$pubkey
to /etc/apk/keys..."
sudo mkdir
-p
/etc/apk/keys
sudo cp
-i
"
$pubkey
"
/etc/apk/keys/
else
echo
""
echo
"You'll need to install
$pubkey
into "
echo
"/etc/apk/keys to be able to install packages and repositories signed with"
echo
"
$privkey
"
fi
echo
""
echo
"Please remember to make a safe backup of
$privkey
"
echo
""
...
...
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