mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-15 23:17:14 +00:00
parent
50b8094d0d
commit
1073d6077b
@ -1 +1 @@
|
||||
1fd2a873bde35417c4e3a9153c1f5a035d072712
|
||||
c62edc006bdc609249ecdebef83ed9f6ba61d9f8
|
||||
|
@ -1,11 +1,13 @@
|
||||
LICENSE := BSD
|
||||
VERSION := 6.1p1
|
||||
VERSION := 7.1p1
|
||||
DOWNLOADS := openssh.archive
|
||||
|
||||
URL(openssh) := ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-$(VERSION).tar.gz
|
||||
SHA(openssh) := 751c92c912310c3aa9cadc113e14458f843fc7b3
|
||||
URL(openssh) := http://artfiles.org/openbsd/OpenSSH/portable/openssh-$(VERSION).tar.gz
|
||||
SHA(openssh) := ed22af19f962262c493fcc6ed8c8826b2761d9b6
|
||||
SIG(openssh) := ${URL(openssh)}.asc
|
||||
KEY(openssh) := 3981992A1523ABA079DBFC66CE8ECB0386FF9C48
|
||||
DIR(openssh) := src/noux-pkg/openssh
|
||||
|
||||
PATCHES := src/noux-pkg/openssh/*.patch
|
||||
PATCHES := $(addprefix ${DIR(openssh)}/,\
|
||||
$(notdir $(wildcard $(REP_DIR)/${DIR(openssh)}/*.patch)))
|
||||
PATCH_OPT := -N -p1
|
||||
|
@ -1,201 +0,0 @@
|
||||
if {![have_spec x86]} {
|
||||
puts "\nThis runscript is supported on the x86 architecture only\n"
|
||||
exit 0
|
||||
}
|
||||
|
||||
#
|
||||
# Uncomment the following line when working on the VIM source code. Otherwise,
|
||||
# the package may get recompiled, yet it does not get reinstalled into 'bin/'.
|
||||
#
|
||||
#exec rm -rf noux-pkg/bash bin/bash
|
||||
|
||||
set build_components {
|
||||
core init drivers/timer
|
||||
noux/net lib/libc_noux
|
||||
drivers/framebuffer drivers/input
|
||||
drivers/nic
|
||||
server/terminal server/ram_fs
|
||||
test/libc_resolv
|
||||
test/libports/libcrypto
|
||||
test/libports/libssl
|
||||
test/libports/ncurses
|
||||
test/libports/readline
|
||||
test/libports/zlib
|
||||
}
|
||||
|
||||
#
|
||||
# Build Noux packages only once
|
||||
#
|
||||
set noux_pkgs "bash coreutils openssh noux-etc"
|
||||
|
||||
foreach pkg $noux_pkgs {
|
||||
lappend_if [expr ![file exists bin/$pkg]] build_components noux-pkg/$pkg }
|
||||
|
||||
source ${genode_dir}/repos/base/run/platform_drv.inc
|
||||
append_platform_drv_build_components
|
||||
|
||||
build $build_components
|
||||
|
||||
# strip all binaries prior archiving
|
||||
set find_args ""
|
||||
foreach pkg $noux_pkgs { append find_args " bin/$pkg/" }
|
||||
exec sh -c "find $find_args -type f | (xargs [cross_dev_prefix]strip || true) 2>/dev/null"
|
||||
|
||||
# add bash as sh
|
||||
exec cp bin/bash/bin/bash bin/bash/bin/sh
|
||||
|
||||
foreach pkg $noux_pkgs {
|
||||
exec tar cfv bin/$pkg.tar -h -C bin/$pkg . }
|
||||
|
||||
create_boot_directory
|
||||
|
||||
append config {
|
||||
<config verbose="yes">
|
||||
<parent-provides>
|
||||
<service name="ROM"/>
|
||||
<service name="LOG"/>
|
||||
<service name="CAP"/>
|
||||
<service name="RAM"/>
|
||||
<service name="RM"/>
|
||||
<service name="CPU"/>
|
||||
<service name="PD"/>
|
||||
<service name="IRQ"/>
|
||||
<service name="IO_PORT"/>
|
||||
<service name="IO_MEM"/>
|
||||
<service name="SIGNAL"/>
|
||||
</parent-provides>
|
||||
<default-route>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</default-route>
|
||||
<start name="timer">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="Timer"/></provides>
|
||||
</start> }
|
||||
|
||||
append_if [have_spec sdl] config {
|
||||
<start name="fb_sdl">
|
||||
<resource name="RAM" quantum="4M"/>
|
||||
<provides>
|
||||
<service name="Input"/>
|
||||
<service name="Framebuffer"/>
|
||||
</provides>
|
||||
</start>}
|
||||
|
||||
append_platform_drv_config
|
||||
|
||||
append_if [have_spec framebuffer] config {
|
||||
<start name="fb_drv">
|
||||
<resource name="RAM" quantum="4M"/>
|
||||
<provides><service name="Framebuffer"/></provides>
|
||||
</start>}
|
||||
|
||||
append_if [have_spec ps2] config {
|
||||
<start name="ps2_drv">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
<provides><service name="Input"/></provides>
|
||||
</start> }
|
||||
|
||||
append config {
|
||||
<start name="terminal">
|
||||
<resource name="RAM" quantum="2M"/>
|
||||
<provides><service name="Terminal"/></provides>
|
||||
<config>
|
||||
<keyboard layout="us"/>
|
||||
</config>
|
||||
</start>
|
||||
<start name="nic_drv">
|
||||
<resource name="RAM" quantum="4M"/>
|
||||
<provides> <service name="Nic"/> </provides>
|
||||
</start>
|
||||
<start name="ram_fs">
|
||||
<resource name="RAM" quantum="10M"/>
|
||||
<provides><service name="File_system"/></provides>
|
||||
<config>
|
||||
<content>
|
||||
<dir name="tmp">
|
||||
</dir>
|
||||
<dir name="home">
|
||||
</dir>
|
||||
</content>
|
||||
<policy label="noux -> root" root="/" />
|
||||
<policy label="noux -> home" root="/home" writeable="yes" />
|
||||
<policy label="noux -> tmp" root="/tmp" writeable="yes" />
|
||||
</config>
|
||||
</start>
|
||||
<start name="noux">
|
||||
<binary name="noux_net" />
|
||||
<resource name="RAM" quantum="1G" />
|
||||
<config>
|
||||
<user name="openssh_user" uid="3" gid="3">
|
||||
<shell name="/bin/bash" />
|
||||
<home name="/home" />
|
||||
</user>
|
||||
<fstab>
|
||||
}
|
||||
|
||||
foreach pkg $noux_pkgs {
|
||||
append config " <tar name=\"$pkg.tar\" />" }
|
||||
|
||||
append config {
|
||||
<dir name="home">
|
||||
<fs label="home" />
|
||||
</dir>
|
||||
<dir name="ram"> <fs label="root" /> </dir>
|
||||
<dir name="tmp"> <fs label="tmp" /> </dir>
|
||||
|
||||
<dir name="dev">
|
||||
<null />
|
||||
<zero />
|
||||
<stdio name="tty" />
|
||||
<random />
|
||||
</dir>
|
||||
|
||||
</fstab>
|
||||
<start name="/bin/bash">
|
||||
<env name="TERM" value="linux" />
|
||||
</start>
|
||||
</config>
|
||||
</start>
|
||||
</config>
|
||||
}
|
||||
|
||||
install_config $config
|
||||
|
||||
|
||||
#
|
||||
# Boot modules
|
||||
#
|
||||
|
||||
# generic modules
|
||||
set boot_modules {
|
||||
core init timer ld.lib.so noux_net nic_drv terminal ram_fs
|
||||
libc.lib.so libm.lib.so libc_noux.lib.so libc_resolv.lib.so
|
||||
lwip.lib.so ncurses.lib.so libcrypto.lib.so libssl.lib.so
|
||||
readline.lib.so zlib.lib.so
|
||||
}
|
||||
|
||||
foreach pkg $noux_pkgs {
|
||||
lappend boot_modules "$pkg.tar" }
|
||||
|
||||
# platform-specific modules
|
||||
lappend_if [have_spec linux] boot_modules fb_sdl
|
||||
lappend_if [have_spec framebuffer] boot_modules fb_drv
|
||||
lappend_if [have_spec ps2] boot_modules ps2_drv
|
||||
|
||||
append_platform_drv_boot_modules
|
||||
|
||||
build_boot_image $boot_modules
|
||||
|
||||
if {[have_spec x86_64]} {
|
||||
# bash.tar is really huge when built for x86_64
|
||||
append qemu_args " -m 320 "
|
||||
}
|
||||
|
||||
append_if [have_spec x86] qemu_args " -net nic,model=e1000"
|
||||
append_if [have_spec lan9118] qemu_args " -net nic,model=lan9118 "
|
||||
|
||||
append qemu_args " -net user "
|
||||
|
||||
run_genode_until forever
|
||||
|
||||
#exec rm bin/bash.tar
|
75
repos/ports/src/noux-pkg/openssh/configure.patch
Normal file
75
repos/ports/src/noux-pkg/openssh/configure.patch
Normal file
@ -0,0 +1,75 @@
|
||||
Although we use FreeBSD libc we actually do not have __progname. As
|
||||
interim fix we just remove the check from configure.
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 0d7a5b9..3218724 100755
|
||||
--- a/src/noux-pkg/openssh/configure
|
||||
+++ b/src/noux-pkg/openssh/configure
|
||||
@@ -30485,67 +30485,6 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
-{ echo "$as_me:$LINENO: checking if libc defines __progname" >&5
|
||||
-echo $ECHO_N "checking if libc defines __progname... $ECHO_C" >&6; }
|
||||
-if test "${ac_cv_libc_defines___progname+set}" = set; then
|
||||
- echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
-else
|
||||
-
|
||||
- cat >conftest.$ac_ext <<_ACEOF
|
||||
-/* confdefs.h. */
|
||||
-_ACEOF
|
||||
-cat confdefs.h >>conftest.$ac_ext
|
||||
-cat >>conftest.$ac_ext <<_ACEOF
|
||||
-/* end confdefs.h. */
|
||||
-
|
||||
-int
|
||||
-main ()
|
||||
-{
|
||||
- extern char *__progname; printf("%s", __progname);
|
||||
- ;
|
||||
- return 0;
|
||||
-}
|
||||
-_ACEOF
|
||||
-rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
-if { (ac_try="$ac_link"
|
||||
-case "(($ac_try" in
|
||||
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
|
||||
- *) ac_try_echo=$ac_try;;
|
||||
-esac
|
||||
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
|
||||
- (eval "$ac_link") 2>conftest.er1
|
||||
- ac_status=$?
|
||||
- grep -v '^ *+' conftest.er1 >conftest.err
|
||||
- rm -f conftest.er1
|
||||
- cat conftest.err >&5
|
||||
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
- (exit $ac_status); } && {
|
||||
- test -z "$ac_c_werror_flag" ||
|
||||
- test ! -s conftest.err
|
||||
- } && test -s conftest$ac_exeext &&
|
||||
- $as_test_x conftest$ac_exeext; then
|
||||
- ac_cv_libc_defines___progname="yes"
|
||||
-else
|
||||
- echo "$as_me: failed program was:" >&5
|
||||
-sed 's/^/| /' conftest.$ac_ext >&5
|
||||
-
|
||||
- ac_cv_libc_defines___progname="no"
|
||||
-
|
||||
-fi
|
||||
-
|
||||
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
- conftest$ac_exeext conftest.$ac_ext
|
||||
-
|
||||
-fi
|
||||
-{ echo "$as_me:$LINENO: result: $ac_cv_libc_defines___progname" >&5
|
||||
-echo "${ECHO_T}$ac_cv_libc_defines___progname" >&6; }
|
||||
-if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
|
||||
-
|
||||
-cat >>confdefs.h <<\_ACEOF
|
||||
-#define HAVE___PROGNAME 1
|
||||
-_ACEOF
|
||||
-
|
||||
-fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking whether $CC implements __FUNCTION__" >&5
|
||||
echo $ECHO_N "checking whether $CC implements __FUNCTION__... $ECHO_C" >&6; }
|
@ -1,11 +0,0 @@
|
||||
+++ src/noux-pkg/openssh/includes.h
|
||||
@@ -18,7 +18,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
-#define _GNU_SOURCE /* activate extra prototypes for glibc */
|
||||
+/* already defined by noux.mk */
|
||||
+//#define _GNU_SOURCE /* activate extra prototypes for glibc */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h> /* For CMSG_* */
|
@ -1,15 +0,0 @@
|
||||
We do not have poll.h and since struct pollfd etc. pp is defined in
|
||||
sys/poll.h we use it instead.
|
||||
|
||||
+++ src/noux-pkg/openssh/monitor_fdpass.c
|
||||
@@ -36,6 +36,10 @@
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_POLL_H
|
||||
#include <poll.h>
|
||||
+#else
|
||||
+# ifdef HAVE_SYS_POLL_H
|
||||
+# include <sys/poll.h>
|
||||
+# endif
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
@ -1,7 +1,10 @@
|
||||
set*uid() is not implemented but it does not matter anyway because there
|
||||
is only one user per noux instance.
|
||||
|
||||
+++ src/noux-pkg/openssh/sshconnect.h
|
||||
diff --git a/sshconnect.h b/sshconnect.h
|
||||
index 0ea6e99..18f7d36 100644
|
||||
--- a/src/noux-pkg/openssh/sshconnect.h
|
||||
+++ b/src/noux-pkg/openssh/sshconnect.h
|
||||
@@ -55,6 +55,7 @@ void ssh_userauth2(const char *, const char *, char *, Sensitive *);
|
||||
void ssh_put_password(char *);
|
||||
int ssh_local_cmd(const char *);
|
||||
|
Loading…
x
Reference in New Issue
Block a user