Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alpine
aports
Commits
b7a1f16d
Commit
b7a1f16d
authored
2 years ago
by
Natanael Copa
Browse files
Options
Downloads
Patches
Plain Diff
main/alpine-conf: backport fix for setup-sshd
parent
bd3a0814
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main/alpine-conf/0001-setup-sshd-fix-prompts.patch
+53
-0
53 additions, 0 deletions
main/alpine-conf/0001-setup-sshd-fix-prompts.patch
main/alpine-conf/APKBUILD
+3
-1
3 additions, 1 deletion
main/alpine-conf/APKBUILD
with
56 additions
and
1 deletion
main/alpine-conf/0001-setup-sshd-fix-prompts.patch
0 → 100644
+
53
−
0
View file @
b7a1f16d
From 6483529fd6d60f8ae3f996f9089faf289ef86b1d Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Sat, 21 May 2022 08:32:32 +0200
Subject: [PATCH] setup-sshd: fix prompts
Use 'ssh' in lowercase consistently
Fix duplicate [prohibit-password]
---
setup-sshd.in | 4 ++--
tests/setup_sshd_test | 5 ++++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/setup-sshd.in b/setup-sshd.in
index fabea69..b6c2877 100644
--- a/setup-sshd.in
+++ b/setup-sshd.in
@@ -35,7 +35,7 @@
case "$1" in
esac
while ! isin "$sshdchoice" openssh dropbear none; do
- ask "Which SSH server? ('openssh', 'dropbear' or 'none')" openssh
+ ask "Which ssh server? ('openssh', 'dropbear' or 'none')" openssh
sshdchoice="$resp"
done
@@ -52,7 +52,7 @@
$MOCK apk add --quiet $pkgs
if [ "$sshdchoice" = "openssh" ] && [ -z "$authorized_key" ]; then
while true; do
- ask "Allow root ssh login? ('yes', 'no', 'prohibit-password' or KEYURL) [prohibit-password]" prohibit-password
+ ask "Allow root ssh login? ('yes', 'no', 'prohibit-password' or KEYURL)" prohibit-password
case "$resp" in
yes|no|prohibit-password)
sed -i -E -e "s/^#?\s*PermitRootLogin.*/PermitRootLogin $resp/" "$ROOT"/etc/ssh/sshd_config
diff --git a/tests/setup_sshd_test b/tests/setup_sshd_test
index 6df679c..23a6f07 100755
--- a/tests/setup_sshd_test
+++ b/tests/setup_sshd_test
@@ -46,7 +46,10 @@
setup_sshd_interactive_body() {
init_env
mkdir -p etc/ssh
echo "PermitRootLogin foobar" > etc/ssh/sshd_config
- printf "%s\n%s\n" openssh no | atf_check -s exit:0 \
+ (
+ echo "openssh"
+ echo "no"
+ ) | atf_check -s exit:0 \
-e empty \
-o match:"Which SSH server" \
-o match:"^apk add .* openssh" \
--
2.36.1
This diff is collapsed.
Click to expand it.
main/alpine-conf/APKBUILD
+
3
−
1
View file @
b7a1f16d
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname
=
alpine-conf
pkgver
=
3.14.0_rc6
pkgrel
=
0
pkgrel
=
1
pkgdesc
=
"Alpine configuration management scripts"
url
=
"https://git.alpinelinux.org/alpine-conf/about"
arch
=
"all"
...
...
@@ -9,6 +9,7 @@ license="MIT"
depends
=
"openrc>=0.24.1-r6 busybox>=1.26.1-r3"
checkdepends
=
"kyua"
source
=
"https://gitlab.alpinelinux.org/alpine/alpine-conf/-/archive/
$pkgver
/alpine-conf-
$pkgver
.tar.gz
0001-setup-sshd-fix-prompts.patch
"
builddir
=
"
$srcdir
"
/
$pkgname
-
$pkgver
...
...
@@ -31,4 +32,5 @@ check() {
sha512sums
=
"
cb7250f372648c56316224d2a623eda1c3797645f3b57b6b9644dc1f2048f76276d69c3f77150af8514ea4559923a9021bae76bbbe8287908b27ec7ddff04601 alpine-conf-3.14.0_rc6.tar.gz
f40fd2ecacd3747ac1a9e2e9f1dfe62b2071f3b38fc22d5f741a4c4c05b653fa0805c48143f9cfd8ed702c8d84db465d85b15e764e4c569c558a772f6ddd6abf 0001-setup-sshd-fix-prompts.patch
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment