From af4de55dbffaf335e91dda1d986cf65287381a9e Mon Sep 17 00:00:00 2001 From: Okko Date: Sat, 26 Oct 2024 13:30:46 +0300 Subject: [PATCH 01/15] add libcbor --- extra/src/libcbor.ecmp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 extra/src/libcbor.ecmp diff --git a/extra/src/libcbor.ecmp b/extra/src/libcbor.ecmp new file mode 100644 index 0000000..5c8fe2a --- /dev/null +++ b/extra/src/libcbor.ecmp @@ -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://github.com/PJK/libcbor/releases/download/release-0.11.0/libcbor-0.11.0.tar.gz 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 From 711e42dc7f856a3c6945ce12eec46eab795a61c0 Mon Sep 17 00:00:00 2001 From: Okko Date: Sat, 26 Oct 2024 13:41:55 +0300 Subject: [PATCH 02/15] fix libcbor url --- extra/src/libcbor.ecmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/src/libcbor.ecmp b/extra/src/libcbor.ecmp index 5c8fe2a..6827763 100644 --- a/extra/src/libcbor.ecmp +++ b/extra/src/libcbor.ecmp @@ -7,7 +7,7 @@ type = src [files] -libcbor-0.11.0.tar.gz https://github.com/PJK/libcbor/releases/download/release-0.11.0/libcbor-0.11.0.tar.gz 89e0a83d16993ce50651a7501355453f5250e8729dfc8d4a251a78ea23bb26d7 +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. From 37224b2eb415bad40fe7fe7250261470eae763f1 Mon Sep 17 00:00:00 2001 From: Okko Date: Sat, 26 Oct 2024 13:46:31 +0300 Subject: [PATCH 03/15] fix libcbor installation path --- extra/src/libcbor.ecmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/src/libcbor.ecmp b/extra/src/libcbor.ecmp index 6827763..e1837ef 100644 --- a/extra/src/libcbor.ecmp +++ b/extra/src/libcbor.ecmp @@ -19,6 +19,6 @@ cmake tar -xzf $NAME-$VERSION.tar.gz [install] -cmake -DCMAKE_INSTALL_PREFIX=usr -DCMAKE_BUILD_TYPE=Release +cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release make make DESTDIR=$BUILD_ROOT install From 56b84989ea7c8d0e8529c096bb02a2b917e0849e Mon Sep 17 00:00:00 2001 From: Okko Date: Sat, 26 Oct 2024 13:49:35 +0300 Subject: [PATCH 04/15] move libcbor to lib dir --- extra/src/{ => lib}/libcbor.ecmp | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename extra/src/{ => lib}/libcbor.ecmp (100%) diff --git a/extra/src/libcbor.ecmp b/extra/src/lib/libcbor.ecmp similarity index 100% rename from extra/src/libcbor.ecmp rename to extra/src/lib/libcbor.ecmp From f334bc93846a14ae5d0e5ab81ae5f43d40ceaf38 Mon Sep 17 00:00:00 2001 From: Okko Date: Sat, 26 Oct 2024 14:07:46 +0300 Subject: [PATCH 05/15] add libfido2 --- extra/src/lib/libfido2.ecmp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 extra/src/lib/libfido2.ecmp diff --git a/extra/src/lib/libfido2.ecmp b/extra/src/lib/libfido2.ecmp new file mode 100644 index 0000000..876da5a --- /dev/null +++ b/extra/src/lib/libfido2.ecmp @@ -0,0 +1,24 @@ +[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 + +[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 From eb2d131a66b7a55fa4a204d9fb8af4b3b55dad5a Mon Sep 17 00:00:00 2001 From: Okko Date: Sat, 26 Oct 2024 14:47:59 +0300 Subject: [PATCH 06/15] add libcbor as a dep --- extra/src/lib/libfido2.ecmp | 1 + 1 file changed, 1 insertion(+) diff --git a/extra/src/lib/libfido2.ecmp b/extra/src/lib/libfido2.ecmp index 876da5a..f6c2b77 100644 --- a/extra/src/lib/libfido2.ecmp +++ b/extra/src/lib/libfido2.ecmp @@ -14,6 +14,7 @@ libfido2 provides library functionality and command-line tools to communicate wi [dependencies] cmake +libcbor [download] tar -xzf $NAME-$VERSION.tar.gz From 174cdc23d124d7d69059cf112deabcdd47f9343f Mon Sep 17 00:00:00 2001 From: Okko Date: Sat, 26 Oct 2024 14:48:25 +0300 Subject: [PATCH 07/15] add openssh --- extra/src/openssh.ecmp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 extra/src/openssh.ecmp diff --git a/extra/src/openssh.ecmp b/extra/src/openssh.ecmp new file mode 100644 index 0000000..7a053b9 --- /dev/null +++ b/extra/src/openssh.ecmp @@ -0,0 +1,39 @@ +[info] +name = openssh +version = 1.15.0 +license = BSD 2-clause +url = https://developers.yubico.com/openssh +type = src + + +[files] +openssh-1.15.0.tar.gz https://developers.yubico.com/openssh/Releases/openssh-1.15.0.tar.gz abaab1318d21d262ece416fb8a7132fa9374bda89f6fa52b86a98a2f5712b61e + +[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 + + +[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=$BUILD_ROOT install From 2ae0bf9a5ca15100d5e446f3ecdecd13971b9b22 Mon Sep 17 00:00:00 2001 From: Okko Date: Sat, 26 Oct 2024 16:00:06 +0300 Subject: [PATCH 08/15] generate host keys for all supported types --- extra/src/openssh.ecmp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extra/src/openssh.ecmp b/extra/src/openssh.ecmp index 7a053b9..8a037f0 100644 --- a/extra/src/openssh.ecmp +++ b/extra/src/openssh.ecmp @@ -37,3 +37,8 @@ tar -xzf $NAME-$VERSION.tar.gz --with-pam make make DESTDIR=$BUILD_ROOT install + +[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 From bb88ca0d202f1479fdb73af67496730491aa267a Mon Sep 17 00:00:00 2001 From: Okko Date: Sat, 26 Oct 2024 16:07:25 +0300 Subject: [PATCH 09/15] add openssh source --- extra/src/openssh.ecmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/src/openssh.ecmp b/extra/src/openssh.ecmp index 8a037f0..870790a 100644 --- a/extra/src/openssh.ecmp +++ b/extra/src/openssh.ecmp @@ -7,7 +7,7 @@ type = src [files] -openssh-1.15.0.tar.gz https://developers.yubico.com/openssh/Releases/openssh-1.15.0.tar.gz abaab1318d21d262ece416fb8a7132fa9374bda89f6fa52b86a98a2f5712b61e +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. From ce6d30ff12be7d51ccebaeab573064efcedca281 Mon Sep 17 00:00:00 2001 From: Okko Date: Sat, 26 Oct 2024 16:20:04 +0300 Subject: [PATCH 10/15] add correct info about openssh --- extra/src/openssh.ecmp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extra/src/openssh.ecmp b/extra/src/openssh.ecmp index 870790a..7cff0a4 100644 --- a/extra/src/openssh.ecmp +++ b/extra/src/openssh.ecmp @@ -1,8 +1,8 @@ [info] name = openssh -version = 1.15.0 -license = BSD 2-clause -url = https://developers.yubico.com/openssh +version = 9.9p1 +license = BSD 2-clause, BSD 3-clause, MIT, ISC, public domain +url = https://www.openssh.com/ type = src From 065b478efb36e321a790490d3a85351257d81ec0 Mon Sep 17 00:00:00 2001 From: Okko Date: Sat, 26 Oct 2024 16:24:12 +0300 Subject: [PATCH 11/15] fix configure opts for openssh --- extra/src/openssh.ecmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/src/openssh.ecmp b/extra/src/openssh.ecmp index 7cff0a4..111fc1b 100644 --- a/extra/src/openssh.ecmp +++ b/extra/src/openssh.ecmp @@ -28,7 +28,7 @@ tar -xzf $NAME-$VERSION.tar.gz [install] ./configure --prefix=/usr \ - --sbindir/usr/bin \ + --sbindir=/usr/bin \ --sysconfdir=/etc/ssh \ --libexecdir=/usr/lib/ssh \ --with-libedit \ From 30c15cf6594d0bb53421f5270122e217ce548e8e Mon Sep 17 00:00:00 2001 From: Okko Date: Sat, 9 Nov 2024 15:02:42 +0200 Subject: [PATCH 12/15] move openssh to its own folder and add service/system files --- extra/src/{ => openssh}/openssh.ecmp | 0 extra/src/openssh/ssh-agent.service | 15 +++++++++++++++ extra/src/openssh/sshd.pam | 8 ++++++++ extra/src/openssh/sshd.service | 15 +++++++++++++++ 4 files changed, 38 insertions(+) rename extra/src/{ => openssh}/openssh.ecmp (100%) create mode 100644 extra/src/openssh/ssh-agent.service create mode 100644 extra/src/openssh/sshd.pam create mode 100644 extra/src/openssh/sshd.service diff --git a/extra/src/openssh.ecmp b/extra/src/openssh/openssh.ecmp similarity index 100% rename from extra/src/openssh.ecmp rename to extra/src/openssh/openssh.ecmp diff --git a/extra/src/openssh/ssh-agent.service b/extra/src/openssh/ssh-agent.service new file mode 100644 index 0000000..0bfa582 --- /dev/null +++ b/extra/src/openssh/ssh-agent.service @@ -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 diff --git a/extra/src/openssh/sshd.pam b/extra/src/openssh/sshd.pam new file mode 100644 index 0000000..a610842 --- /dev/null +++ b/extra/src/openssh/sshd.pam @@ -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 + diff --git a/extra/src/openssh/sshd.service b/extra/src/openssh/sshd.service new file mode 100644 index 0000000..139b29b --- /dev/null +++ b/extra/src/openssh/sshd.service @@ -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 From 06b425ec947f888569348f544cf0241bc7356904 Mon Sep 17 00:00:00 2001 From: Okko Date: Sat, 9 Nov 2024 15:53:00 +0200 Subject: [PATCH 13/15] install the openssh systemfiles --- extra/src/openssh/openssh.ecmp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extra/src/openssh/openssh.ecmp b/extra/src/openssh/openssh.ecmp index 111fc1b..55fd063 100644 --- a/extra/src/openssh/openssh.ecmp +++ b/extra/src/openssh/openssh.ecmp @@ -22,6 +22,8 @@ libedit [optional] libfido2 +[exports] +PATCHES_DIRECTORY=$SOVIET_REPOS_DIR/OUR/extra/src/openssh [download] tar -xzf $NAME-$VERSION.tar.gz @@ -38,6 +40,11 @@ tar -xzf $NAME-$VERSION.tar.gz make make DESTDIR=$BUILD_ROOT install +install -Dm644 $PATCHES_DIRECTORY/sshd.service -t /usr/lib/systemd/system/ +install -Dm644 $PATCHES_DIRECTORY/ssh-agent.service -t /usr/lib/systemd/user/ +install -Dm644 $PATCHES_DIRECTORY/sshd.pam /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 From 57364bbafde2955bef4c4af815eb7cfacf53950f Mon Sep 17 00:00:00 2001 From: Okko Date: Sun, 10 Nov 2024 17:45:24 +0200 Subject: [PATCH 14/15] install the openssh systemfiles correctly --- extra/src/openssh/openssh.ecmp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extra/src/openssh/openssh.ecmp b/extra/src/openssh/openssh.ecmp index 55fd063..44fd247 100644 --- a/extra/src/openssh/openssh.ecmp +++ b/extra/src/openssh/openssh.ecmp @@ -23,7 +23,7 @@ libedit libfido2 [exports] -PATCHES_DIRECTORY=$SOVIET_REPOS_DIR/OUR/extra/src/openssh +PACKAGE_DIRECTORY=$SOVIET_REPOS_DIR/OUR/extra/src/openssh [download] tar -xzf $NAME-$VERSION.tar.gz @@ -40,9 +40,9 @@ tar -xzf $NAME-$VERSION.tar.gz make make DESTDIR=$BUILD_ROOT install -install -Dm644 $PATCHES_DIRECTORY/sshd.service -t /usr/lib/systemd/system/ -install -Dm644 $PATCHES_DIRECTORY/ssh-agent.service -t /usr/lib/systemd/user/ -install -Dm644 $PATCHES_DIRECTORY/sshd.pam /etc/pam.d/sshd +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] From 065f908baf7e2a3157ce81c336cf092b8af98e01 Mon Sep 17 00:00:00 2001 From: Okko Date: Sun, 10 Nov 2024 17:47:28 +0200 Subject: [PATCH 15/15] change build_root to soviet_build_dir --- extra/src/openssh/openssh.ecmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/src/openssh/openssh.ecmp b/extra/src/openssh/openssh.ecmp index 44fd247..35116ee 100644 --- a/extra/src/openssh/openssh.ecmp +++ b/extra/src/openssh/openssh.ecmp @@ -38,7 +38,7 @@ tar -xzf $NAME-$VERSION.tar.gz --with-ssl-engine \ --with-pam make -make DESTDIR=$BUILD_ROOT install +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/