actions.py 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. from pisi.actionsapi import autotools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import get
  10. #WorkDir = "openssh-%s" % get.srcVERSION().replace("_","")
  11. def setup():
  12. shelltools.export("CFLAGS","%s -fpie" % get.CFLAGS())
  13. shelltools.export("LDFLAGS","%s -pie" % get.LDFLAGS())
  14. #pisitools.dosed("pathnames.h", "/usr/X11R6/bin/xauth", r"/usr/bin/xauth")
  15. #pisitools.dosed("sshd_config", "(?m)^(^#UsePAM ).*", r"UsePAM yes")
  16. #pisitools.dosed("sshd_config", "(?m)^(^#PasswordAuthentication ).*", r"PasswordAuthentication no")
  17. #pisitools.dosed("sshd_config", "(?m)^(^#X11Forwarding ).*", r"X11Forwarding yes")
  18. #pisitools.dosed("sshd_config", "(?m)^(^#UseDNS ).*", r"UseDNS no")
  19. #pisitools.dosed("sshd_config", "(?m)^(^#PermitRootLogin ).*", r"PermitRootLogin no")
  20. autotools.autoreconf("-fi")
  21. # Kerberos support is a must, libedit is optional
  22. # Update configure parameters when both are ready
  23. autotools.configure("--sysconfdir=/etc/ssh \
  24. --libexecdir=/usr/libexec/openssh \
  25. --datadir=/usr/share/openssh \
  26. --disable-strip \
  27. --with-pam \
  28. --with-libedit \
  29. --with-kerberos5 \
  30. --with-tcp-wrappers \
  31. --with-md5-passwords \
  32. --with-ipaddr-display \
  33. --with-privsep-user=sshd \
  34. --with-privsep-path=/var/empty \
  35. --without-zlib-version-check \
  36. --without-ssl-engine")
  37. def build():
  38. autotools.make()
  39. def install():
  40. autotools.rawInstall("DESTDIR=%s" % get.installDIR())
  41. # fixes #10992
  42. pisitools.dobin("contrib/ssh-copy-id")
  43. pisitools.doman("contrib/ssh-copy-id.1")
  44. # an script in contrib
  45. pisitools.dobin("contrib/findssl.sh")
  46. shelltools.chmod("%s/etc/ssh/sshd_config" % get.installDIR(), 0600)
  47. # special request by merensan
  48. shelltools.echo("%s/etc/ssh/ssh_config" % get.installDIR(), "ServerAliveInterval 5")
  49. pisitools.dodir("/var/empty/sshd")
  50. pisitools.dodoc("ChangeLog", "CREDITS", "OVERVIEW", "README*", "TODO", "sshd_config")