RubyCocoaããµã¤ã¼ã®gemã«ããã
ã ãã¶åããèãã¦ããRubyCocoaããµã¤ã¼ã®gemã«ãããã¨ã«ææ¦ãã¦ã¿ããã¢ããªç¨ã®.frameworkã¯ã¾ã æãä»ãã¦ãªããã©ãæ¡å¼µã©ã¤ãã©ãªã®ã»ãã¯`rake test`ãå ¨é¨éãã¨ãã¾ã§ããã
-ç¾ç¶ã®èª²é¡
ä»ã®RubyCocoaã¯ã»ã¨ãã©å ¨é¨ã®æ©è½ãRubyCocoa.frameworkã®ã»ãã«å ¥ã£ã¦ããã®ã§ãrubyã¹ã¯ãªãããã使ãå ´åã«ãå¿ ããã¬ã¼ã ã¯ã¼ã¯ã®é ç½®ãå¿ è¦ã«ãªãããã¬ã¼ã ã¯ã¼ã¯ã¯ç¹å®ã®ãã¼ã¸ã§ã³ã»æ§æã®librubyã«ãªã³ã¯ãã¦ãã¡ãã£ã¨ããã¹ã¯ãªããæ¸ãã¨ãããããããªãã¼ã¸ã§ã³ã§æ¤è¨¼ãããã¨ãã«ãã£ããæéããããã
ç®æ¨ã¯ãããªã¨ããã
- `gem "rubycocoa"`ã§rubycocoaã®ã¹ã¯ãªãããæ¸ããããã«ããã
- bundler/rakeãã¼ã¹ã®éçºãã§ããããã«ããã
ä½æ¥ã®æµãï¼ããã¾ã§ï¼
ã¨ããããã`bundle gem --ext`ã§æ°è¦ã«ç¨æãããã®ã«ãframework/src, test/ã®ãã¡ã¤ã«ãå ¥ãã¦è©¦ãã¦ã¿ã¦ãåé¡ãå¤æ´ç¹ãæ´ãåºãã
ãã©ãç«ã£ãã®ã§ãå®éã®ãªãã¸ããªã§ãã©ã³ãåã£ã¦ä½æ¥ã
- bundleã®çæãã¡ã¤ã«ã追å
- ã½ã¼ã¹ãã¡ã¤ã«ã移å
- æ¡å¼µã©ã¤ãã©ãªã®ã³ã³ãã¤ã«ãextconf.rbã«ãä»»ãã«
- ãã¹ãã調æ´
- minitestããtest-unitã«
- ãã¡ã¤ã«åãtest_*.rbãã*_test.rbã«å¤æ´ã(çæãããRakefileã®å½¢å¼ã«åãããï¼
- testãã£ã¬ã¯ããªã§å®è¡ãããã¨ãæ³å®ããç¸å¯¾ãã¹ã¾ããã®å¯¾å¿ã
- çµæçã«ãããªããªã£ããã¡ã¤ã«ãæ´çã
ã ããã1æ¥åããããæã£ãããç°¡åã«å¯¾å¿ã§ããå°è±¡ã
ä»å¾ã®äºå®
æ®ã£ã¦ãRubyCocoa.frameworkã¯ãNSBundleã§rubycocoa.bundleããã¼ããã¦ãdlopenããåæåé¢æ°ãå¼ã³åºãã¿ãããªæãã«ãªãäºå®ã.frameworkèªä½ã¯librubyã«ãªã³ã¯ããªãå½¢å¼ã«ãã¦ãå ´åã«ãã£ã¦ã¯è¤æ°ã®ãã¼ã¸ã§ã³ã®rubycocoa.bundleã使ãåãã§ããããã«æºåãã¦ããã
RubyCocoaä»é±ã®ã³ããã 2017-06-12..17
æ°ããmacOSã®betaã§ã¦ãã®ã§è©¦ãã¦ã¿ããæ¡ã®å®ããããåé¡ãã£ããã ãã©ããã以åã«10.12ã§åãã¦ãªããã¨ã«ãã¾ããæ°ä»ããâ¦
librubyã«éçãªã³ã¯ããRubyCocoaã®çæãå¯è½ã«
ãã£ããåã«プルリクもらってたã®ããã¼ã¸ã
ãªãããããããªå¤æ´ãæ··ãã£ã¦ããããã¨ã§è¦ããã¨æã£ã¦å®å
¨ã«å¿ãã¦ãã§ããã
macOS 10.12ã§SEGVããåé¡ãä¿®æ£
以åã«ç¢ºèªãããããªæ°ããããã ãã©ã10.12ã ã¨require 'osx/cocoa'ã ãã§SEGVããã®ã§å¯¾å¿ã
ã©ãã調ã¹ãã¨ãããWebKitã®å
é¨ã¯ã©ã¹ã§respondsToSelector:ãã¡ããã¨å®è£
ãã¦ããªãã®ãããã¤ããã£ã¦ããããåå ããããããã¤ãã¯Rubyå´ãããè¦ãã¦ãå¿
è¦ããªãã®ã§ç¡è¦ããããã«å¤æ´ããã
ãã¹ãã¾ããã®ä¿®æ£
- QTKitã®é¢æ°ããªããªã£ã¦ãã®ã§ããããã¯å®è¡ããªãã
- ruby-2.4ã§Fixnumã®è¦åãã§ãã®ã§Integerã«å¤æ´ããã
10.11以éã§ä»å±ã®rubyã§è½ã¡ã
OSä»å±ã®rubyã§require 'osx/cocoa'ããã¨ãclass_addMethod()ã®ãããã§è½ã¡ãããã¶ãSIP(System Integrity Protecton)ã§ä¿è·ããã¦ãããããã¨ãã°/usr/bin/rubyãä½æ¥ãã£ã¬ã¯ããªã«ã³ãã¼ãã¦ããã®rubyããå®è¡ããã¨åé¡ãªãåä½ããã
ãªã®ã§ããªã³ã¯ãã.appã¨ãã¯åé¡ãªããrubyã¹ã¯ãªããã§ãªãããããã¨ããã¨è½ã¡ãã
ãã¶ãovmixã®ãããã®å¦çãè¦ç´ãã¦ãObjective-Cå´ã§å®ç¾©ããã¯ã©ã¹ã«ã¡ã½ãã追å ã¨ãã§ããªãããã«å¶å¾¡ããã°è½ã¡ãªãã¯ãªãã¨æããã¡ãã£ã¨åªå 度ä½ãã
diff --git a/install.rb b/install.rb index a57e53c..4fffc2f 100644 --- a/install.rb +++ b/install.rb @@ -1088,6 +1088,7 @@ class ToplevelInstaller < Installer ruby_cmd = '"' + File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['RUBY_INSTALL_NAME']) + '"' ruby_cmd = "/usr/bin/arch -#{@options['arch']} " + ruby_cmd if @options['arch'] + ruby_cmd = File.expand_path("../ruby", __FILE__) dive_into('test') { ENV['DYLD_FRAMEWORK_PATH'] = File.join('../framework', framework_obj_path) ENV['BRIDGE_SUPPORT_PATH'] = '../framework/bridge-support' diff --git a/test/util.rb b/test/util.rb index d65afe5..fbe9c54 100644 --- a/test/util.rb +++ b/test/util.rb @@ -2,7 +2,8 @@ module TestHelper def __spawn_line(line) - cmd = "#{@ruby_path} -I../lib -I../ext/rubycocoa -e \"#{line}\"" + ruby_cmd = File.expand_path("../../ruby", __FILE__) + cmd = "#{ruby_cmd} -I../lib -I../ext/rubycocoa -e \"#{line}\"" cmd = cmd_with_dyld_env(cmd) res = IO.popen(cmd) {|io| io.read} raise "Can't spawn Ruby line: '#{line}'" unless $?.success?
PowerShellã®ãã³ãã¬ã¼ãã¨ã³ã¸ã³EPS
rubyのERBã¿ããã®ã
Windowsä¸ã§ããã¹ãçæããã®ã«ãã³ãã¬ã¼ãå¦ççãªãã¨ããããã£ã¦ãã§ãããããrubyã¨ããããã®ããªãã¨æã£ã¦ãPowerShell Galleryで"Template"で検索ãã³ã¼ãçæã¿ããã®ãå¤ãä¸ã§ãEPSããµã¤ãã«ããã¹ãçæãããã®ã£ã½ãã®ã§è©¦ãã¦ã¿ããã¨ã«ã
"<%" "%>"ã§å²ã£ãä¸ã«PowerShellã®ã³ã¼ããæ¸ãã¨å®è¡ããããã¾ãã¾eRuby/ERBã ãã
ReadMe.mdã®ä¾ã
PS> Get-Content Test.eps Hi <%= $name %> <%# this is a comment -%> Please buy me the following items: <% 1..5 | %{ -%> - <%= $_ %> pigs ... <% } -%> Dave is a <% if($True) { %>boy<% } else { %>girl<% } %>. Thanks, Dave <%= (Get-Date -f yyyy-MM-dd) %> PS> Invoke-EpsTemplate -Path Test.eps -Safe -binding @{ name = "dave" } Hi dave Please buy me the following items: - 1 pigs ... - 2 pigs ... - 3 pigs ... - 4 pigs ... - 5 pigs ... Dave is a boy. Thanks, Dave 2017-06-12
ç±æ¥çã«ãããããªãã§ããªããã"EPS"ã£ã¦ååã¯ã©ã¼ãªãï¼ç¹ã«ãã¡ã¤ã«åã®æ¡å¼µåã
ãã¡ã¤ã«å ¥åã®ã¨ãç¸å¯¾ãã¹ã解決ããªã
Invoke-EpsTemplateã«ã¯æååããã¡ã¤ã«ã®ãããããé£ããããã ãã©ããã¡ã¤ã«åã渡ããã¨ãReadMeã«ããããã«ç¸å¯¾ãã¹ã§æ¸ãã¦ããã¾ãå¦çã§ããªããã¨ããããã³ã¼ãã¿ããç°¡åã«ç´ãããã ã£ãã®ã§ãã«ãªã¯ã¨ã¹ãã ãã¨ããã
ãã¹ãã©ããããæ©ãã ãã®ã®ããã¨ãã¨-Pathã«å¯¾ãã¦ãã¹ããªãã£ãã®ã§ã¹ã«ã¼ã
ç¡äºã«åãè¾¼ã¾ããã®ã§ãç¾å¨ã®0.4.0ã®æ¬¡ã®ãªãªã¼ã¹ã§ç´ã£ã¦ãã¨æãã
MacBookã®Touch IDã§sudoã使ã(PAM)
MacBookã«ä»ãã¦ãTouch IDã§sudoã§ããªãããªãã¨æ¢ãã¦ã¿ããã"「MacBook Proの「Touch ID」を利用してsudoなどの認証を行うPAMが公開。 | AAPL Ch.」"ã¨ããè¨äºãè¦ã¤ããã®ã§è©¦ãã¦ã¿ãã
æé ã¯
1. pam_touchidãã³ã³ãã¤ã«ãã¦ãã¦ãã¨ããªå ´æã«ç½®ã
2. /etc/pam.d/sudo ãç·¨éãã¦ä¸è¨ã®ã¢ã¸ã¥ã¼ã«ã®è¨è¿°ã**å
é ã«**追å
ã¨ãªããããã ãã§ã¡ããã¨åãã¦ããªããä¸æè°ãªæããããã
ãã¼ã«ã«ã«Portfileæ¸ãã¦ã¤ã³ã¹ãã¼ã«ãã¦è¨å®ãããissueã§SSHã®ã±ã¼ã¹è°è«ãã¦ãããã³ã¼ãã¾ã èªãã§ãªãã£ããã¨èªä¿¡ãªãã®ã§å ¬å¼ã®portã«ã¯å ¥ãã¦ãªããbrewãã¾ã ãªãã£ã½ããã
% port contents pam_touchid Port pam_touchid contains: /opt/local/lib/pam/pam_touchid.so.2 /opt/local/share/doc/pam_touchid/LICENSE /opt/local/share/doc/pam_touchid/README.md /opt/local/share/doc/pam_touchid/screenshot.png % grep -n pam_touchid /etc/pam.d/sudo 2:auth sufficient /opt/local/lib/pam/pam_touchid.so reason="execute a command as another user"
% port cat pam_touchid # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup github 1.0 PortGroup xcode 1.0 github.setup hamzasood pam_touchid 0.0.1 github.version ec7b7bdc1285b3588fe083d5bb9ac5ab5137fda2 categories security description A PAM module for authentication with Touch ID long_description ${description} platforms darwin license GPL-3 maintainers kimuraw openmaintainer checksums md5 5a80622d1150b9ff34515e7e97ee3a9c \ sha1 b08b8d338574da2131faaebd9f188098c93d51a1 \ sha256 7bac41ef30b7ba4a69aea5f8683d3b035a469139697f985ab8030c68f9724a13 xcode.project pam_touchid.xcodeproj xcode.configuration Release xcode.destroot.path ${prefix}/lib/pam xcode.destroot.type none # build without code signing for macports xcode.build.settings CODE_SIGN_IDENTITY= xcode.destroot.settings CODE_SIGN_IDENTITY= INSTALL_MODE_FLAG=440 post-destroot { xinstall -d ${destroot}${prefix}/share/doc/${name} xinstall -W ${worksrcpath} README.md LICENSE screenshot.png \ ${destroot}${prefix}/share/doc/${name} } post-activate { ui_msg "" ui_msg "================================================================================" ui_msg "If you try to use Touch ID with `sudo` command, add the below line to the top " ui_msg "of \"/etc/pam.d/sudo\". (see ${homepage})" ui_msg "" ui_msg "auth sufficient ${prefix}/lib/pam/pam_touchid.so reason=\"execute a command as another user\"" ui_msg "================================================================================" ui_msg "" }
ï¼2016-12-30 追è¨ï¼reasonããã¼ã«ã©ã¤ãºããæ¹æ³ãããããªãâ¦â¦å¥ã«è±èªã§åºãã®ã¯ãã¾ããã®ã ãã©ãæ¥æ¬èªã®ã¡ãã»ã¼ã¸ã«ã¾ãã£ã¦ãã¨ãã£ãæªãããªãã
MacPortsã®PortGroup rubyãsubport対å¿ã«
per5, php, pythonãªããã§ã¯ä»¥åããã²ã¨ã¤ã®Portfileã§è¤æ°ã®ã¤ã³ã¿ããªã¿ã®ãã¼ã¸ã§ã³ã«å¯¾å¿ããsubportãã¾ã¨ãã¦ç»é²ã§ããããã«ãªã£ã¦ããããã¨ãã°ãperl5ã ã¨perl5.brahcnesã»pythonã ã¨python.versionsã¨ãããªãã·ã§ã³ã§ç»é²ããsubportã®ãã¼ã¸ã§ã³ãæ示ã§ããã
rubyã§ã¯gemã§ã¿ããªèªåã§å ¥ããã ãããï¼æè¿ã®rb22-ãrb23-ã¦portã¯ããããç»é²ããã¦ãªãï¼ããããªãããªãã¨æã£ã¦ã¨ãã«ä½ã£ã¦ãªãã£ãã®ã ãã©ãruby-2.4ã®æºåä¸ã«ã以åæ¬ä½ã«å ¥ã£ã¦ãruby/tkãããã¯ç¨æãã¦ããããã¨æã£ã¦ã¡ãã£ã¨ä½æ¥ãã¦ã¿ãããããã¨ç°¡åã«å¯¾å¿ã§ããã®ã§コミットしといたã
- ruby.branchesã¨ããå¤ãå°å ¥
- ããã®è¨å®ãããã¨ãruby.setupä¸ã§subportãç»é²ãã
- 以ä¸ã®ç¹ã¯perl5ãphpã¨ç°ãªã
ãã¨ãã¨ã¯ruby/tkããã«æºåãã¦ãããã®ã®ãX11ã®åé¡ããã£ã¦ãèµå ¥ãã«ãªã£ã¦ãã¾ãã使ããªãã®ãããããã®ã§ãbundlerã«å ¥ãã¦ãããã
% port info --subports rb-bundler subports: rb23-bundler, rb24-bundler
rb-bundlerã¨ããPortfileã§2.3ã¨2.4ã®subportãç»é²ããã¦ããã
ããã§ãã¨ã¯port:rubyãport:ruby18ã«æ¹åããã°ãå人çã«ã¯ãã£ã¨1.8ã®åªç¸ããè±åºã§ããæããããããã
MacPortsã®port:ruby24ãç»é²
ä¾ã«ãã£ã¦ã¯ãªã¹ãã¹ã«æ°ãããã¼ã¸ã§ã³ããªãªã¼ã¹ããã¦ããã®ã§å¯¾å¿ãã¾ãããå¤æ´ç¹ãªã©ã¯公式のリリースアナウンスãè¦ã¦ãã ããã
å¾æ¥éããMacPortsçã¯
- ruby2.4, rake2.4, gem2.4ãªã©ãã¼ã¸ã§ã³ã®suffixãã¤ã
- port select --set ruby ruby24ãªã©selectã使ãã¨ãsuffixãªãã®ãã¼ã¸ã§ã³ã§ä½¿ãã
ã¨ãªã£ã¦ãã¾ãã
以åããã¢ãã¦ã³ã¹ãåºã¦ããããã«ãtkãrubyæ¬ä½ã®ãªãªã¼ã¹ã«å«ã¾ããªããªãã¾ããã®ã§ãvariantããé¢é£ãããã®ãå¤ãã¦ãã¾ããOSã®Tk.frameworkã«ãªã³ã¯ããããã«ãã¦ï¼ããã©ã«ãã§ãããªãã¯ãï¼gem tkãå ¥ããã®ãããã§ãããã
æå ã®ç°å¢ã§è©¦ããæãã ã¨X11çã¯Macã ã¨ä»¥ä¸ã®åé¡ãèµ·ãã¦ãã¡ã£ã½ãæãã§ãã
- Sierra: XQuartzãããããåããªãï¼ wishããç«ã¡ä¸ãããªãã®ã§ãruby/tkããã¡ã§ãã
- El Capitan: ruby-2.4ã ã¨ã¦ã£ã³ãã¦ãéããã¨ãã«SEGVãããruby-2.3ã¯ã»ã¼ãã
ï¼è¿½è¨ï¼OS X 10.7以åã§ã³ã³ãã¤ã«ã§ããªãåé¡/解æ¶æ¸ã¿
10.7ã10.6ã®buildbotで"ext/-test-/memory_status/emory_status.c"のコンパイルエラーã«ãªã£ã¦ããã
ãããã«å¤ãç°å¢ãªã®ã§ãç¥ããããªãã¨ããæãã ã£ããã®ã®ãtwitterä¸ã§@n0kadaããã¨ããã¨ãããããã¦trunkã«r57180ãã¯ãã£ãã®ã§ããã®å¤æ´ããã¼ã¸ããruby24-2.4.0_1ã¨ãã¦ç»é²ãã¾ãããã¾ã使ã£ã¦ã人ãããã¯ç¥ããªããã©â¦
ï¼ã¡ãªã¿ã«10.5 ppcã¯ãã¡ãªã¾ã¾ã§ããbuildbotã®ã¡ã¼ã«ã2æ¥ãããé ãã¦ããã®ã§èª¿ã¹ã¦ãã¾ãããï¼
Mac App Storeç¨ã®ã³ãã³ãã©ã¤ã³ãã¼ã« mas ãç»é²
ã³ãã³ãã©ã¤ã³ã§Mac App Storeçµç±ã®ã¤ã³ã¹ãã¼ã«ãæ´æ°ãªã©ã®æä½ãã§ãã mas (mas-cli) ã¨ãããã¼ã«ãããã
使ãæ¹ã¯READMEã«æ¸ããã¦ãç¨ä¾ãè¦ãã°ã»ã¨ãã©ãããã¨æãã
$ mas list #ã¤ã³ã¹ãã¼ã«ãã¦ããã¹ãã¢ã¢ããªã®ä¸è¦§ãåºå $ mas search app-name #ã¹ãã¢ä¸ã®ã¢ããªãååã§æ¤ç´¢ $ mas install app-id-number #ã¹ãã¢ã¢ããªãã¤ã³ã¹ãã¼ã« $ mas outdated #æ´æ°ããã¦ããã¢ããªã表示 $ mas upgrade #æ´æ°ããã¦ããã¢ããªãææ°ã«ãã :
æåã®ã¢ããªãè³¼å ¥ãããã¨ã¯ãããã«ã§ããªãã¿ããã
å人çã«ã¯ã¡ãã£ã¨åãã使ã£ã¦ããã®ã ãã©ãã¢ããªã±ã¼ã·ã§ã³ã®æå®æã«è¬ã®æ°åï¼ã¹ãã¢ä¸ã®URLã«å«ã¾ãããã®ï¼ã§æ示ããã¨ããã¨ããã©ãããªã¼ï¼ã¨æã£ã¦å ¬å¼ã®ãªãã¸ããªã«ã¯ç»é²ãã¦ãªãã£ãã
æè¿èªãã ããã¤ãã®Macã®ç°å¢æ§ç¯è¨äºã§ãæ°ããç°å¢ã«ã¹ãã¢ã¢ããªãå ¥ããã®ã«ä½¿ãã¨ãããã¨ãæ¸ããã¦ã¦ãããããã¦ã¼ã¹ã±ã¼ã¹ãªããããããæ°åããã£ã¦ããåé¡ãªãã¨ç´å¾ããã®ã§å ¬å¼ã®portç»é²ãããã¨ã«ããã
ãªãã¸ããªå ¥ãã¦buildbotã®çµæãªãããã¾ã§æ°ä»ããªãã£ãã®ã ãã©ãææ°çã¯swift3ã§æ¸ããã¦ãããXcode 8以ä¸ããããã ããOS X 10.11ä¸ã§ã使ãã¦ããããã¾ãæèãã¦ãªãã£ãã
ã¨ãããã¨ã§Portfileã«å¶éã®è¨è¼ã追å ã
# requires swift3 minimum_xcodeversions {15 8} pre-fetch { if {${os.major} < 15} { ui_error "${name} @${version} requires OS X 10.11 or later." return -code error "incompatible OS X version" } }
ããã§ãXcode 7.xãªç°å¢ã ã¨ã¡ããã¨ãã¼ã¸ã§ã³ã足ãã¦ãªãæ¨ã®ã¡ãã»ã¼ã¸ãåºãããã«ãªãã
---> Extracting mas Error: On macOS 10.11, mas @1.3.1 requires Xcode 8 or later but you have Xcode 7.3. Error: See https://guide.macports.org/chunked/installing.xcode.html for download links. Error: org.macports.extract for port mas returned: incompatible Xcode version Please see the log file for port mas for details: /opt/local/var/macports/logs/_Users_kimuraw_work_ports_sysutils_mas/mas/main.log To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets Error: Processing of port mas failed
MacPortsã®w3mmanãåããªãã®ã§ç´ãã
w3mã¨ããã¿ã¼ããã«ä¸ã§åä½ããå大ãªãã©ã¦ã¶ããã£ã¦ã§ãããããã«ä»å±ãã`w3mman`ã¨ããã³ãã³ããSEE ALSOãããããã¡ã¤ã«ããªã³ã¯ã¨ãã¦ã¸ã£ã³ãã§ãããã¨ããã便å©ã§æç¨ãã¦ããã§ããã
ãã¤ã®ã¾ã«ãå®è¡ãã¦ã空ã®ç»é¢ãã表示ãããªããªã£ã¦ãã¦ãããªãããã¨æ´æ°ããã¦ãªãã½ããã ãããã¼ãªããªãã¨æã£ã¦ã¨ã¤ãªã¢ã¹è§£é¤ãã¦å¿ãã¦ãã¾ã£ã¦ããããããããµã¨æãåºãã¦èª¿ã¹ã¦ã¿ããã
% perl w3mman2html.cgi Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at w3mman2html.cgi line 223. %
ã¨ãããããã¹ã¯ãªãããperlã®ã¨ã©ã¼ã§åããªãã¨ãããã¨ãããã£ããã©ããã¡ãã»ã¼ã¸ã®ã¨ããåã«defined()ãå¤ãã°ããããã§ã@msmhrtããããdebiançã¯åé¡ãªããããã¨ã®æ å ±ãããã£ã¦ç¢ºèªããããã¦å¯¾å¿ããã
port:w3mã¯nomaintainerãªã®ã§ä¿®æ£ãããã追å ï¼ã¤ãã§ã«w3mhelp.cgiãï¼ãã¦ã³ãããã
ã¨ããããã§ãport:w3m @0.5.3_6ããã¯w3mmanãåãããã«ãªã£ã¦ããã¯ãã§ãã
poll(2)ã®åä½ãSierraã§å¤ãã£ã¦ãã½ã
ï¼2016-11-12追è¨ï¼ãã®ç¾è±¡ã¯10.12.2 beta2(16C41bï¼ã§ç´ã£ã¦ããããã§ãã10.12.2ããªãªã¼ã¹ãããã解æ¶ããããããã¾ããã
ruby 2.4-preview3ãåºãã®ã§ãtest-allæµãã¦åä½ç¢ºèªãã¦ãããSierraã§éããªããã¹ãããã£ãã®ã§æ°ä»ããã
pollã®manè¦ãã¨ãpoll(2)ã®ã¤ã³ã¿ã¼ãã§ã¤ã¹ã¯ãããªãªãã ãã©
SYNOPSIS #include <poll.h> int poll(struct pollfd fds[], nfds_t nfds, int timeout);
å¼ã³åºãæã«æ¸¡ãnfdsã®å¤(=fdsã®æ°)ã0ã®ã¨ãã®åä½ãSierraããå¤ãã£ã¦ããã¿ããã§
- 10.11以å: timeoutã ãå¾ ã¤
- 10.12: å¾ ããã«ããçµäºãã
ã¨ãªã£ã¦ããã
curlã®ã»ãã§ãå æã«è©±é¡ã«ãªã£ã¦ããããã
- "poll on mac 10.12 is broken daniel.haxx.se"
- "poll() on macOS 10.12 returns prematurely · Issue #1057 · curl/curl"
Hacker Newsã§ã¯ãããããPOSIXçã«ã©ããªãããä»æ§çã«ã»ã¼ãã ã£ãã¨ãã¦ãããã¯ãã¡ã ããã¿ãããªè°è«ããã¦ãã£ã½ããããããããã
Sierraã®xnuã®ã½ã¼ã¹ã³ã¼ããã¾ã opensource.apple.comã«ããã£ã¦ãªãã®ãã³ã¼ãã¿ã¦ç¢ºèªã§ããªãã®ããã©ãããã
ãã®ä»¶ã¯rubyå´ã®åé¡ãããªãã¨æãã®ã ããã©ããã¹ãéããªãã®ã¯åä½ç¢ºèªã§å°ãã®ã§å ±åãã¦ãããã
åé¡ã®test/fiddle/test_function.rbãå ã«ãruby+fiddleã§pollã®åä½ç¢ºèªç¨ã®ã¹ã¯ãªãããæ¸ããã
require 'fiddle/import' require 'tempfile' include Fiddle libc = dlopen('/usr/lib/libc.dylib') @func = Function.new(libc['poll'], [TYPE_VOIDP, TYPE_INT, TYPE_INT], TYPE_INT) def test_poll(fds, nfds) t0 = Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond) n1 = @func.call(fds&.to_ptr, nfds, 200) t1 = Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond) puts "fds=#{fds ? fds.fd : "(nil)"}, nfds=#{nfds}, slept=#{t1 - t0}, status=#{n1}" end fds = Fiddle::Importer.struct(["int fd", "short events", "short revents"]).malloc file = Tempfile.open('poll') begin fds.fd = file.fileno fds.events = 0 fds.revents = 0 puts RUBY_DESCRIPTION puts `uname -sr`.chomp test_poll(fds, 0) # not block on macOS Sierra test_poll(fds, 1) test_poll(nil, 0) test_poll(nil, 1) ensure file.unlink end
Sierraããã³El Capitanã§ã®çµæã¯æ¬¡ã®ã¨ããã
# Sierra ruby 2.4.0preview3 (2016-11-07 trunk 56661) [x86_64-darwin16] Darwin 16.1.0 fds=7, nfds=0, slept=0, status=0 fds=7, nfds=1, slept=205, status=0 fds=(nil), nfds=0, slept=0, status=0 # ânfds=0ã§ã¯å¾ ããªã fds=(nil), nfds=1, slept=0, status=-1 # El Capitan ruby 2.4.0preview3 (2016-11-07 trunk 56661) [x86_64-darwin15] Darwin 15.6.0 fds=7, nfds=0, slept=201, status=0 fds=7, nfds=1, slept=206, status=0 fds=(nil), nfds=0, slept=203, status=0 # ânfds=0ã§ãå¾ ã¤ fds=(nil), nfds=1, slept=0, status=-1
# Sierra 10.12.2 beta2 (16C41b) INS 2016-11-12 ruby 2.4.0preview3 (2016-11-07 trunk 56661) [x86_64-darwin16] Darwin 16.3.0 fds=7, nfds=0, slept=201, status=0 fds=7, nfds=1, slept=202, status=0 fds=(nil), nfds=0, slept=200, status=0 # ç´ã£ã¦ãï¼ï¼ fds=(nil), nfds=1, slept=0, status=-1
å¾ ããã«çµãã£ãã¨ãã®poll()ã®æ»ãå¤ã0ãªã®ãã¡ãã£ã¨å«ãªæãã
æ£ç´ããç¥ããªãã®ã ãã©ãfd渡ããã«åã«æå®ããæéå¾ ãããããã«poll(2)使ãã®ã£ã¦ä¸è¬çãªãã¯ããã¯ãªãã§ãããï¼
-
- ã¨ããããAppleã«ãã°ã¨ãã¦å ±åããã»ããããããã ãã©ãåç¾ã³ã¼ããCã§æ¸ãç´ãã®ããã©ããªãã--ï¼æ¬¡ã®10.12.2ã§ç´ãã¿ããï¼
ï¼2016-12-17 追è¨ï¼10.12.2ã§è§£æ¶ãããã¨ã確èªãã¾ããã
# Sierra 10.12.2 (16C67) INS 2016-12-17 ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16] Darwin 16.3.0 fds=7, nfds=0, slept=205, status=0 fds=7, nfds=1, slept=205, status=0 fds=(nil), nfds=0, slept=206, status=0 # <- same as 10.11 El Capitan or earlier fds=(nil), nfds=1, slept=0, status=-1
MacPortsã®éçºãªãã¸ããªãgithubã¸ç§»è¡ï¼äºå®ï¼
話ã¯ããã¶ãåããåºã¦ãã®ã ããã©ãããããMacPortsã®éçºãgithubã«ç§»ããã¨ã«ãªã£ãããã§ããä»é±æ«ã®10/29-30ã§ç§»è¡ããäºå®ãããã
ä»ã¾ã§ã¯macports.orgä¸ã®svnã¨tracä¸ã§ä½æ¥ãã¦ãããã©ãã¡ããã¡ããtracãè½ã¡ã¦ãã®ã§github.comã®ã»ãã稼åçé«ãããªã®ããã¡ã°ãå©ããããªããcoreã¯ã¨ãããportfileã¯åç´ãªãã®ã ããvcsã¯svnã§ããããªã«å°ãããã
コミッタのみなさまã¯MLでの指示("Moving to GitHub: Status Update, Action Required")ã©ãã
- (ãªããã°)githubã®ã¢ã«ã¦ã³ããç»é²
- ã¢ãã¬ã¹ã« macports.org ã®ã¡ã¼ã«ã¢ãã¬ã¹ã追å
- macports-infra ãã¦ã«"Please invite me to MacPorts on GitHub"ã®ä»¶åã§ã¡ã¼ã«éã
ã®æç¶ããã¨ã£ã¦ãã¨ã®ãã¨ãã¦ãããããµã¤ãã«éçºè MLã«æµãã¦ãããè¦éãã¦ããï¼