Advertisement
yaneurabeya

Untitled

Feb 24th, 2012
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.20 KB | None | 0 0
  1. $ svn diff nanobsd/ build/
  2. Index: nanobsd/freenas-common
  3. ===================================================================
  4. --- nanobsd/freenas-common (revision 10228)
  5. +++ nanobsd/freenas-common (working copy)
  6. @@ -482,6 +482,62 @@
  7. }
  8. customize_cmd configure_pbi_manager
  9.  
  10. +# Beware of dog. A lot of the stuff done here is done in such a way
  11. +# that it doesn't require changes to nanobsd.sh, etc.
  12. +create_portsjail()
  13. +{
  14. + local jail_obj_dir jail_world_dir
  15. +
  16. + jail_obj_dir="$AVATAR_ROOT/obj.$NANO_ARCH/_.pjobj"
  17. + jail_world_dir="$AVATAR_ROOT/obj.$NANO_ARCH/_.pjw"
  18. +
  19. + nanobsd_vars="MAKEOBJDIRPREFIX NANO_MAKE_CONF_BUILD NANO_MAKE_CONF_INSTALL NANO_OBJ NANO_WORLDDIR"
  20. +
  21. + # Save the old values
  22. + for nanobsd_var in $nanobsd_vars
  23. + do
  24. + local "old_${nanobsd_var}"
  25. + eval "old_${nanobsd_var}='\${$nanobsd_var}'"
  26. + done
  27. +
  28. + export MAKEOBJDIRPREFIX="$jail_obj_dir"
  29. + export NANO_MAKE_CONF_BUILD="$AVATAR_ROOT/examples/plugins/make.conf"
  30. + export NANO_MAKE_CONF_INSTALL="$AVATAR_ROOT/examples/plugins/make.conf"
  31. + export NANO_OBJ="$jail_obj_dir"
  32. + export NANO_WORLDDIR=$jail_world_dir
  33. +
  34. + # XXX: do something smarter here, like svn status $NANO_SRC, generate a
  35. + # checksum, profit from not having to recompile stuff..
  36. + clean_build
  37. +
  38. + # Build the jailed world.
  39. + build_world
  40. +
  41. + # Create/install a PBI jailed world.
  42. + install_world
  43. + install_etc
  44. +
  45. + cat > "$jail_world_dir/etc/rc.conf" <<EOF
  46. +sendmail_enable="NONE"
  47. +syslogd_flags="-ss"
  48. +pbid_enable="YES"
  49. +sshd_enable="YES"
  50. +EOF
  51. +
  52. + # TODO: install magic ports here required for all PBIs.
  53. + # examples/plugins/jail_ports.sh doesn't seem to reflect the
  54. + # exact requirements (too heavyweight)..
  55. +
  56. +
  57. + # Restore the old values
  58. + for nanobsd_var in $nanobsd_vars
  59. + do
  60. + eval "${nanobsd_var}='\${old_$nanobsd_var}'"
  61. + done
  62. +
  63. +}
  64. +customize_cmd create_portsjail
  65. +
  66. if [ "${DEBUG}" = 1 ]; then
  67.  
  68. unmute_console_logging()
  69. @@ -632,6 +688,7 @@
  70. local cd_image_log
  71. local full_image full_image_log
  72. local gui_upgrade gui_upgrade_image_log
  73. + local jail_world_dir
  74.  
  75. cd_image_log="${MAKEOBJDIRPREFIX}/_.cd_iso"
  76. full_image_log="${MAKEOBJDIRPREFIX}/_.full_image"
  77. @@ -679,5 +736,14 @@
  78.  
  79. fi
  80.  
  81. + set -x
  82. + pbi_create \
  83. + -a \
  84. + -n $NANO_IMGNAME.Plugins_Jail \
  85. + -o "$NANO_DISKIMGDIR" \
  86. + -r "$(echo $VERSION | sed -E -e 's/-[^-]+//g')" \
  87. + -w $AVATAR_PROJECT_SITE \
  88. + $jail_world_dir \
  89. +
  90. }
  91. fi # $do_image
  92. Index: build/nano_env
  93. ===================================================================
  94. --- build/nano_env (revision 10228)
  95. +++ build/nano_env (working copy)
  96. @@ -10,6 +10,9 @@
  97. # The FreeNAS source and build tree is rooted here.
  98. : ${AVATAR_ROOT=$(pwd)}
  99.  
  100. +# The website for this avatar project.
  101. +: ${AVATAR_PROJECT_SITE=http://www.freenas.org}
  102. +
  103. # The support site for this avatar project.
  104. : ${AVATAR_SUPPORT_SITE=http://support.freenas.org}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement