<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>ライセンス on akky@サイボウズラボ・ブログ</title>
		<link>https://labs.cybozu.co.jp/blog/akky/tags/%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9/</link>
		<description>Recent content in ライセンス on akky@サイボウズラボ・ブログ</description>
		<generator>Hugo</generator>
		<language>ja</language>
		
		
		
		
			<lastBuildDate>Tue, 28 Sep 2021 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://labs.cybozu.co.jp/blog/akky/tags/%E3%83%A9%E3%82%A4%E3%82%BB%E3%83%B3%E3%82%B9/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Debian の perf を高速化するパッチと、そのGPL的な背景</title>
				<link>https://labs.cybozu.co.jp/blog/akky/2021/09/debian-perf-slowness-comes-from-license-incompatibilities/</link>
				<pubDate>Tue, 28 Sep 2021 00:00:00 +0000</pubDate>
				<guid>https://labs.cybozu.co.jp/blog/akky/2021/09/debian-perf-slowness-comes-from-license-incompatibilities/</guid>
				<description>&lt;p&gt;Cargo の &lt;a href=&#34;https://github.com/flamegraph-rs/flamegraph&#34;&gt;flamegraph&lt;/a&gt; ツールが&lt;a href=&#34;https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911815&#34;&gt;Debian の perf のせいでとても遅い&lt;/a&gt;という話。&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://labs.cybozu.co.jp/blog/akky/2021/09/debian-perf-slowness-comes-from-license-incompatibilities/example_cropped.png&#34;&gt;&lt;picture&gt;&#xA;  &lt;source type=&#34;image/webp&#34; srcset=&#34;https://labs.cybozu.co.jp/blog/akky/2021/09/debian-perf-slowness-comes-from-license-incompatibilities/example_cropped_hu_9c524255cc8709fc.webp 480w, https://labs.cybozu.co.jp/blog/akky/2021/09/debian-perf-slowness-comes-from-license-incompatibilities/example_cropped_hu_ce280d565fd6d098.webp 768w, https://labs.cybozu.co.jp/blog/akky/2021/09/debian-perf-slowness-comes-from-license-incompatibilities/example_cropped_hu_4dc32e8f18544df0.webp 2284w&#34; sizes=&#34;(max-width: 56rem) 100vw, 54rem&#34;&gt;&#xA;  &lt;img src=&#34;https://labs.cybozu.co.jp/blog/akky/2021/09/debian-perf-slowness-comes-from-license-incompatibilities/example_cropped.png&#34; width=&#34;2284&#34; height=&#34;862&#34; alt=&#34;Cargo flamegraph sample&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34;&gt;&#xA;&lt;/picture&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;perf コマンドがプロファイルデータを解析する際に libbfd をリンクすればずっと高速になるのですが、&lt;a href=&#34;https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911815#15&#34;&gt;Debian のポリシーでライセンスに違反するため libbfd をリンクすることはできない&lt;/a&gt;そうです。&lt;/p&gt;&#xA;&lt;p&gt;[修正] コメントでの指摘を受け修正しました&lt;/p&gt;&#xA;&lt;p&gt;perf のライセンスが GPL バージョン2、libbfd のライセンスが GPL バージョン3+ であり、これら二つのプロジェクトを&lt;a href=&#34;https://mag.osdn.jp/07/06/05/0114203&#34;&gt;合法的にリンクさせる方法がない&lt;/a&gt;そう。&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://salsa.debian.org/kernel-team/linux/blob/master/debian/rules.d/tools/perf/Makefile#L45&#34;&gt;Debian の Makefile では、わざわざ生成された perf コマンドが libbfd をリンクして「いない」ことをチェックするようになっている&lt;/a&gt;のですね。&lt;/p&gt;&#xA;&lt;p&gt;そんな訳で、Debian の perf は dso 一つごとに addr2line コマンドをパイプで呼び出す(そして、毎回サブプロセスは終了する)方式となっています。&lt;/p&gt;&#xA;&lt;p&gt;しかし、大量の perf 呼び出しを行う flamegraph を作ろうとした @leastfixedpoint さんは、いつまでも帰ってこない perf コマンドに業を煮やし、libbfd をリンクさせない範囲での高速化を考えました。&lt;/p&gt;&#xA;&lt;p&gt;この&lt;a href=&#34;https://eighty-twenty.org/2021/09/09/perf-addr2line-speed-improvement&#34;&gt;パッチでは&lt;/a&gt;、addr2line を別プロセスとして起動させたままにしておき、dso をデータとして送り付け結果を受け取っても、addr2line プロセスを終了させないことで、とあるデータ量に対して68倍速く処理が終わるようにできたそうです。&lt;/p&gt;&#xA;&lt;p&gt;対象のデータ量によっては気にならない程度の速度差なのかもしれませんが、同じようにここの処理速度で困ってる人もいるんじゃないでしょうかね。&lt;/p&gt;&#xA;&lt;p&gt;via &lt;a href=&#34;https://news.ycombinator.com/item?id=28468751&#34;&gt;Hacker News&lt;/a&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Spiteライセンス - 読んだら無効になるソフトウェアライセンス</title>
				<link>https://labs.cybozu.co.jp/blog/akky/2020/09/spite-software-license/</link>
				<pubDate>Fri, 18 Sep 2020 00:00:00 +0000</pubDate>
				<guid>https://labs.cybozu.co.jp/blog/akky/2020/09/spite-software-license/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://github.com/voynix/spite-license&#34;&gt;Spite License&lt;/a&gt;は新たに提案された(ジョーク)ライセンスです。&lt;/p&gt;&#xA;&lt;p&gt;ソフトウェアに適用できるライセンスの&lt;a href=&#34;https://opensource.org/licenses/alphabetical&#34;&gt;種類不足&lt;/a&gt;を嘆く声にこたえて作られたこのSpite(悪意の)ライセンスは、開いて読んでしまう読まない限りと別の(今回の例では同梱されたMITライセンス)に切り替わる、というシンプルな文面になっています。&lt;/p&gt;&#xA;&lt;p&gt;[訂正 2020-09-22] 読んでしまうと無効になるのにMITライセンスに落ちるのはおかしいですね。&lt;a href=&#34;https://twitter.com/hnakamur2/status/1308234264979275782&#34;&gt;ご指摘&lt;/a&gt;ありがとうございます。&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;このファイルをまったく読まない場合に限り、このソフトウェアや関連物の利用には同梱の LICESNSE_MIT ファイルのMITライセンスが適用される。&lt;/p&gt;&#xA;&lt;p&gt;このファイルをたとえその一部分であっても読んだ場合、このソフトウェアの利用は禁止する。これ以前に許可された権限は直ちに撤回される。&lt;/p&gt;&#xA;&lt;p&gt;Permission is hereby granted to any person obtaining a copy of this software and associated materials to make use of the software and associated materials according to the terms of the MIT License (see included file `LICENSE_MIT`) IF AND ONLY IF they have not read any portion of this file.&lt;/p&gt;&#xA;&lt;p&gt;Any person who has read any portion of this file may not make any use of the software and associated materials for any purpose whatsoever. Any permissions previously granted to any person to use this software and associated materials terminate and are revoked with immediate effect upon their reading of any portion of this file.&lt;/p&gt;</description>
			</item>
			<item>
				<title>go-license-detector - オープンソースのライセンスを判定してくれるツール</title>
				<link>https://labs.cybozu.co.jp/blog/akky/2019/01/go-license-detector-tells-you-license-from-source-codes/</link>
				<pubDate>Thu, 31 Jan 2019 00:00:00 +0000</pubDate>
				<guid>https://labs.cybozu.co.jp/blog/akky/2019/01/go-license-detector-tells-you-license-from-source-codes/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://github.com/src-d/go-license-detector&#34;&gt;go-license-detector&lt;/a&gt; は、プロジェクトのドキュメントファイルをスキャンして、そのプロジェクトがどんなライセンスかを推定するというツールです。&lt;a href=&#34;https://spdx.org/licenses/&#34;&gt;SPDX&lt;/a&gt; で400種類近くに分類されている多種多様なライセンスの分類名(identifier)の形でライセンス情報を返します。&lt;/p&gt;&#xA;&lt;h3 id=&#34;従来のツール&#34;&gt;従来のツール&lt;/h3&gt;&#xA;&lt;p&gt;Ruby製の&lt;a href=&#34;http://ben.balter.com/licensee/&#34;&gt;Licensee&lt;/a&gt;では、ライセンスファイルの存在や、既知のライセンスファイルとの一致度を見て、オープンソースのライセンスが何かを判定しています。GitHub 自身も、各リポジトリのライセンスを判定するのに利用しているそうです。&lt;/p&gt;&#xA;&lt;p&gt;他にもいくつか、Google の licenseclassifier などライセンスを推定するツールはあるのですが、go-license-detector は以下の特徴があるそうです。&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;誤判定があっても、「不明」という結果を少なくする方向の検出&lt;/li&gt;&#xA;&lt;li&gt;Golang による高速な処理&lt;/li&gt;&#xA;&lt;li&gt;GitHub の人気トップ1000リポジトリ(手動でライセンスが判定されている)をできるだけ当てられることを目指す&lt;/li&gt;&#xA;&lt;li&gt;SPDX の分類に従う&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;精度比較&#34;&gt;精度比較&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://blog.sourced.tech/post/gld/&#34;&gt;ブログ記事では&lt;/a&gt;、既存の各ツールとの判定精度の比較をしています。902のソースコードを判定し、ライセンスがあるものに関して99%という高率の判定結果、また、判定の速度もとても優秀ということ。&lt;/p&gt;&#xA;&lt;p&gt;現在は LICENSE や READEME など、一定の種類の名前でライセンス情報を探そうとしていますが、それらのファイルについて既存のライセンス文書との一致をみるにしても、単なる一致ではなく単語のゆらぎやミススペルなどまでケアしているようです。&lt;/p&gt;&#xA;&lt;p&gt;何か一つオープンソースのプロジェクトが有ったとして、そのライセンスが何であるかを当て、それを信じて利用するというよりは、多数のリポジトリをまとめて分析するような用途に向いているのかなと思いました。&lt;/p&gt;&#xA;&lt;p&gt;via &lt;a href=&#34;https://blog.sourced.tech/post/gld/&#34;&gt;Detecting licenses in code with Go and ML · source{d} blog&lt;/a&gt;&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
