logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

gen.lua (5727B)


  1. local arch = config.target.platform:match('[^-]*')
  2. local archflags = {
  3. x86_64='-D SANDBOX_SECCOMP_FILTER=1 -D SECCOMP_AUDIT_ARCH=AUDIT_ARCH_X86_64',
  4. aarch64='-D SANDBOX_SECCOMP_FILTER=1 -D SECCOMP_AUDIT_ARCH=AUDIT_ARCH_AARCH64',
  5. }
  6. cflags{
  7. '-Wall', '-Wno-pointer-sign', '-Wno-format-truncation', '-Wno-stringop-truncation',
  8. '-D _XOPEN_SOURCE=600',
  9. '-D _DEFAULT_SOURCE',
  10. archflags[arch] or '-D SANDBOX_RLIMIT=1',
  11. '-I $outdir',
  12. '-I $srcdir',
  13. '-isystem $basedir/pkg/openbsd/include',
  14. '-isystem $builddir/pkg/bearssl/include',
  15. '-isystem $builddir/pkg/libfido2/include',
  16. '-isystem $builddir/pkg/linux-headers/include',
  17. '-isystem $builddir/pkg/zlib/include',
  18. '-idirafter $srcdir/openbsd-compat',
  19. }
  20. pkg.deps = {
  21. 'pkg/bearssl/headers',
  22. 'pkg/libfido2/headers',
  23. 'pkg/linux-headers/headers',
  24. 'pkg/zlib/headers',
  25. '$outdir/config.h',
  26. }
  27. build('cat', '$outdir/config.h', {
  28. '$dir/config.h',
  29. '$builddir/probe/SIZEOF_LONG',
  30. '$builddir/probe/SIZEOF_TIME_T',
  31. })
  32. lib('libopenbsd-compat.a', [[openbsd-compat/(
  33. base64.c basename.c bcrypt_pbkdf.c bindresvport.c blowfish.c daemon.c
  34. dirname.c explicit_bzero.c fmt_scaled.c freezero.c getcwd.c
  35. getgrouplist.c getopt_long.c getrrsetbyname.c glob.c inet_aton.c
  36. inet_ntoa.c inet_ntop.c md5.c memmem.c mktemp.c pwcache.c
  37. readpassphrase.c reallocarray.c recallocarray.c rresvport.c setenv.c
  38. setproctitle.c sha1.c sha2.c sigact.c strcasestr.c strlcat.c strlcpy.c
  39. strmode.c strndup.c strnlen.c strptime.c strsep.c strtoll.c strtonum.c
  40. strtoull.c strtoul.c timingsafe_bcmp.c vis.c
  41. arc4random.c bsd-asprintf.c bsd-closefrom.c bsd-cygwin_util.c bsd-err.c
  42. bsd-flock.c bsd-getpagesize.c bsd-getpeereid.c bsd-malloc.c bsd-misc.c
  43. bsd-nextstep.c bsd-openpty.c bsd-poll.c bsd-setres_id.c bsd-signal.c
  44. bsd-snprintf.c bsd-statvfs.c bsd-waitpid.c fake-rfc2553.c
  45. getrrsetbyname-ldns.c kludge-fd_set.c
  46. xcrypt.c
  47. port-aix.c port-irix.c port-linux.c port-solaris.c port-net.c port-uw.c
  48. )]])
  49. -- port-tun.c from openbsd-compat depends on sshbuf-getput-basic.c and ssherr.c
  50. -- from libssh.a, so just include it in libssh.a.
  51. lib('libssh.a', [[
  52. ssh_api.c
  53. ssherr.c
  54. sshbuf.c
  55. sshkey.c
  56. sshbuf-getput-basic.c
  57. sshbuf-misc.c
  58. krl.c
  59. bitmap.c
  60. ssh-xmss.c
  61. sshkey-xmss.c
  62. xmss_commons.c
  63. xmss_fast.c
  64. xmss_hash.c
  65. xmss_hash_address.c
  66. xmss_wots.c
  67. authfd.c authfile.c
  68. canohost.c channels.c cipher.c cipher-aes.c cipher-aesctr.c
  69. cleanup.c
  70. compat.c fatal.c hostfile.c
  71. log.c match.c moduli.c nchan.c packet.c
  72. readpass.c ttymodes.c xmalloc.c addr.c addrmatch.c
  73. atomicio.c dispatch.c mac.c misc.c utf8.c
  74. monitor_fdpass.c rijndael.c ssh-ecdsa.c ssh-ecdsa-sk.c
  75. ssh-ed25519-sk.c ssh-rsa.c dh.c
  76. msg.c progressmeter.c dns.c entropy.c gss-genr.c umac.c umac128.c
  77. ssh-pkcs11.c smult_curve25519_ref.c
  78. poly1305.c chacha.c cipher-chachapoly.c cipher-chachapoly-bearssl.c
  79. ssh-ed25519.c digest-bearssl.c digest-libc.c
  80. hmac.c ed25519.c hash.c
  81. kex.c kex-names.c kexdh.c kexgex.c kexecdh.c kexc25519.c
  82. kexgexc.c kexgexs.c
  83. kexsntrup761x25519.c kexmlkem768x25519.c sntrup761.c kexgen.c
  84. sftp-realpath.c platform-pledge.c platform-tracing.c platform-misc.c
  85. sshbuf-io.c
  86. ssh-sk-client.c
  87. libopenbsd-compat.a
  88. $builddir/pkg/bearssl/libbearssl.a
  89. $builddir/pkg/libfido2/libfido2.a.d
  90. $builddir/pkg/zlib/libz.a
  91. ]])
  92. lib('sftp-client.a', [[
  93. sftp-common.c
  94. sftp-client.c
  95. sftp-glob.c
  96. ]])
  97. lib('sftp-server.a', [[
  98. sftp-common.c.o
  99. sftp-server.c
  100. ]])
  101. exe('ssh', [[
  102. ssh.c readconf.c clientloop.c sshtty.c
  103. sshconnect.c sshconnect2.c mux.c
  104. libssh.a.d
  105. ]])
  106. file('bin/ssh', '755', '$outdir/ssh')
  107. exe('sshd', [[
  108. sshd.c
  109. platform-listen.c
  110. servconf.c sshpty.c srclimit.c groupaccess.c auth2-methods.c
  111. libssh.a.d
  112. ]])
  113. file('bin/sshd', '755', '$outdir/sshd')
  114. -- used by sshd-session and sshd-auth
  115. lib('sshd-common.a', [[
  116. auth-rhosts.c auth-passwd.c
  117. audit.c audit-bsm.c audit-linux.c platform.c
  118. sshpty.c.o sshlogin.c servconf.c.o serverloop.c
  119. auth.c auth2.c auth2-methods.c.o auth-options.c session.c
  120. auth2-chall.c groupaccess.c.o
  121. auth-bsdauth.c auth2-hostbased.c auth2-kbdint.c
  122. auth2-none.c auth2-passwd.c auth2-pubkey.c auth2-pubkeyfile.c
  123. monitor_wrap.c auth-krb5.c
  124. auth2-gss.c gss-serv.c gss-serv-krb5.c
  125. loginrec.c auth-pam.c auth-shadow.c auth-sia.c
  126. uidswap.c
  127. ]])
  128. exe('sshd-session', [[
  129. sshd-session.c
  130. monitor.c platform-listen.c.o
  131. sshd-common.a
  132. sftp-server.a
  133. libssh.a.d
  134. ]])
  135. file('libexec/sshd-session', '755', '$outdir/sshd-session')
  136. exe('sshd-auth', [[
  137. sshd-auth.c
  138. sandbox-null.c sandbox-rlimit.c sandbox-darwin.c
  139. sandbox-seccomp-filter.c sandbox-capsicum.c sandbox-solaris.c
  140. sshd-common.a
  141. sftp-server.a
  142. libssh.a.d
  143. ]])
  144. file('libexec/sshd-auth', '755', '$outdir/sshd-auth')
  145. exe('scp', {'scp.c', 'sftp-client.a', 'libssh.a.d'})
  146. file('bin/scp', '755', '$outdir/scp')
  147. exe('ssh-add', {'ssh-add.c', 'libssh.a.d'})
  148. file('bin/ssh-add', '755', '$outdir/ssh-add')
  149. exe('ssh-agent', {'ssh-agent.c', 'ssh-pkcs11-client.c', 'libssh.a.d'})
  150. file('bin/ssh-agent', '755', '$outdir/ssh-agent')
  151. exe('ssh-keygen', {'ssh-keygen.c', 'sshsig.c', 'libssh.a.d'})
  152. file('bin/ssh-keygen', '755', '$outdir/ssh-keygen')
  153. exe('ssh-keyscan', {'ssh-keyscan.c', 'libssh.a.d'})
  154. file('bin/ssh-keyscan', '755', '$outdir/ssh-keyscan')
  155. exe('ssh-sk-helper', {'ssh-sk-helper.c', 'ssh-sk.c', 'sk-usbhid.c', 'libssh.a.d'})
  156. file('libexec/ssh-sk-helper', '755', '$outdir/ssh-sk-helper')
  157. exe('sftp-server', {'sftp-server-main.c', 'sftp-server.a', 'libssh.a.d'})
  158. file('libexec/sftp-server', '755', '$outdir/sftp-server')
  159. exe('sftp', {'sftp.c', 'sftp-usergroup.c', 'sftp-client.a', 'libssh.a.d'})
  160. file('bin/sftp', '755', '$outdir/sftp')
  161. man{
  162. 'ssh.1',
  163. 'scp.1',
  164. 'ssh-add.1',
  165. 'ssh-agent.1',
  166. 'ssh-keygen.1',
  167. 'ssh-keyscan.1',
  168. 'ssh_config.5',
  169. 'sshd_config.5',
  170. 'sshd.8',
  171. 'sftp-server.8',
  172. 'sftp.1',
  173. }
  174. fetch 'git'