Skip to content

Commit

Permalink
Merge pull request Soviet-Linux#159 from Okkonen-GitHub/ssh
Browse files Browse the repository at this point in the history
Ssh
  • Loading branch information
AleksArt000 authored Nov 10, 2024
2 parents a157510 + 065f908 commit 071a21f
Show file tree
Hide file tree
Showing 6 changed files with 138 additions and 0 deletions.
24 changes: 24 additions & 0 deletions extra/src/lib/libcbor.ecmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[info]
name = libcbor
version = 0.11.0
license = MIT
url = https://github.com/PJK/libcbor
type = src


[files]
libcbor-0.11.0.tar.gz https://codeload.github.com/PJK/libcbor/tar.gz/refs/tags/v0.11.0 89e0a83d16993ce50651a7501355453f5250e8729dfc8d4a251a78ea23bb26d7

[description]
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.

[dependencies]
cmake

[download]
tar -xzf $NAME-$VERSION.tar.gz

[install]
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
make
make DESTDIR=$BUILD_ROOT install
25 changes: 25 additions & 0 deletions extra/src/lib/libfido2.ecmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[info]
name = libfido2
version = 1.15.0
license = BSD 2-clause
url = https://developers.yubico.com/libfido2
type = src


[files]
libfido2-1.15.0.tar.gz https://developers.yubico.com/libfido2/Releases/libfido2-1.15.0.tar.gz abaab1318d21d262ece416fb8a7132fa9374bda89f6fa52b86a98a2f5712b61e

[description]
libfido2 provides library functionality and command-line tools to communicate with a FIDO device over USB or NFC, and to verify attestation and assertion signatures.

[dependencies]
cmake
libcbor

[download]
tar -xzf $NAME-$VERSION.tar.gz

[install]
cmake -DCMAKE_INSTALL_PREFIX=/usr -B build
make -C build
make DESTDIR=$BUILD_ROOT -C build install
51 changes: 51 additions & 0 deletions extra/src/openssh/openssh.ecmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[info]
name = openssh
version = 9.9p1
license = BSD 2-clause, BSD 3-clause, MIT, ISC, public domain
url = https://www.openssh.com/
type = src


[files]
openssh-9.9p1.tar.gz https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.9p1.tar.gz b343fbcdbff87f15b1986e6e15d6d4fc9a7d36066be6b7fb507087ba8f966c02

[description]
openssh provides library functionality and command-line tools to communicate with a FIDO device over USB or NFC, and to verify attestation and assertion signatures.

[dependencies]
make
zlib
pam
openssl
libedit

[optional]
libfido2

[exports]
PACKAGE_DIRECTORY=$SOVIET_REPOS_DIR/OUR/extra/src/openssh

[download]
tar -xzf $NAME-$VERSION.tar.gz

[install]
./configure --prefix=/usr \
--sbindir=/usr/bin \
--sysconfdir=/etc/ssh \
--libexecdir=/usr/lib/ssh \
--with-libedit \
--with-security-key-builtin \
--with-ssl-engine \
--with-pam
make
make DESTDIR=$SOVIET_BUILD_DIR install

install -Dm644 $PACKAGE_DIRECTORY/sshd.service -t $SOVIET_BUILD_DIR/usr/lib/systemd/system/
install -Dm644 $PACKAGE_DIRECTORY/ssh-agent.service -t $SOVIET_BUILD_DIR/usr/lib/systemd/user/
install -Dm644 $PACKAGE_DIRECTORY/sshd.pam $SOVIET_BUILD_DIR/etc/pam.d/sshd


[special]
if [ ! -e /etc/ssh/ssh_host_rsa_key ] || [ ! -e /etc/ssh/ssh_host_rsa_key.pub ] || [ ! -e /etc/ssh/ssh_host_ecdsa_key ] || [ ! -e /etc/ssh/ssh_host_ecdsa_key.pub ] || [ ! -e /etc/ssh/ssh_host_ed25519_key ] || [ ! -e /etc/ssh/ssh_host_ed25519_key.pub ]; then
/usr/bin/ssh-keygen -A
fi
15 changes: 15 additions & 0 deletions extra/src/openssh/ssh-agent.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# liberated from Archlinux
# Requires SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" to be set in environment
[Unit]
ConditionEnvironment=!SSH_AGENT_PID
Description=OpenSSH key agent
Documentation=man:ssh-agent(1) man:ssh-add(1) man:ssh(1)

[Service]
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
ExecStart=/usr/bin/ssh-agent -D -a ${SSH_AUTH_SOCK}
SuccessExitStatus=2
Type=simple

[Install]
WantedBy=default.target
8 changes: 8 additions & 0 deletions extra/src/openssh/sshd.pam
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# liberated from Archlinux
#%PAM-1.0

auth include system-remote-login
account include system-remote-login
password include system-remote-login
session include system-remote-login

15 changes: 15 additions & 0 deletions extra/src/openssh/sshd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# liberated from Archlinux
[Unit]
Description=OpenSSH Daemon
Wants=sshdgenkeys.service
After=sshdgenkeys.service
After=network.target

[Service]
Type=notify-reload
ExecStart=/usr/bin/sshd -D
KillMode=process
Restart=always

[Install]
WantedBy=multi-user.target

0 comments on commit 071a21f

Please sign in to comment.