Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cygwin github action + sysoptions workaround #261

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brandonros
Copy link

@brandonros brandonros commented Nov 23, 2023

I doubt this will get actually upstreamed but it helped me today so I hope it helps somebody else.

https://cygwin.com/packages/x86_64/cygwin-devel/cygwin-devel-3.4.9-1 says 2023-09-06 11:29 581 usr/include/sys/random.h is provided but autoreconf couldn't find it for some reason.

I also tried to do --enable-static (to avoid the need for the Cygwin runtime being installed/the binaries being linked externally against the Cygwin runtime DLLs) but it had a hard time with -lcrypto (it probably isn't provided in a fashion that can be used statically from https://cygwin.com/packages/x86_64/libcrypt-devel/libcrypt-devel-4.4.20-1 (although I do see usr/lib/libcrypt.dll.a)

How to use:

# build it with GitHub Actions + download: https://github.com/brandonros/dropbear/actions/runs/6964141533
# install Cygwin on the machine (probably need libcrypt package) or figure out Cygwin runtime DLLs
# run it from Cygwin terminal, not Git Bash or MinGW (freaks out about being able to write to /etc/dropbear for host keys)
mkpasswd -l > /etc/passwd
mkgroup -l > /etc/group
mkdir /etc/dropbear
mkdir ~/.ssh/
vi ~/.ssh/authorized_keys # paste ~/.ssh/id_rsa.pub from client into it, do not try to connect with passwords
./dropbear -F -E -R -w -s -g -j -k

/* TODO: find a better workaround */
#ifdef __CYGWIN__
#ifndef HAVE_SYS_RANDOM_H
#define HAVE_SYS_RANDOM_H 1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you still have config.log handy, can you send it? It might show why sys/random.h isn't being found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants