理查德·斯托曼:爲了自由,我決定寫一個GNU操作系統(下)

{"type":"doc","content":[{"type":"heading","attrs":{"align":null,"level":1}},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/26/2633533a6af811379f0dcc436a0bf6eb.png","alt":"理查德·斯托曼:爲了自由,我決定寫一個GNU操作系統(下)","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“打印機事件”以後,理查德斯托曼覺得:軟件本該共享。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“如果我喜歡一個程序,我必須與其他喜歡它的人一起共享它。軟件銷售商想分割用戶並統治他們,讓每一個用戶同意不與其他人共享軟件。我拒絕以這樣的方法破壞與其他用戶的團結。”","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"他擔心如果專有軟件成爲社會主流,會出現少數強力人物統治計算機工業的局面。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這種局面早在1949年奧威爾的小說《1984》裏早有描寫。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong","attrs":{}}],"text":"“BIG BROTHER IS WATCHING YOU”","attrs":{}}]},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/c3/c31c49fe6a9de75c39c7be9ccf98a175.png","alt":"理查德·斯托曼:爲了自由,我決定寫一個GNU操作系統(下)","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"《1984》是英國左翼作家喬治·奧威爾於1949年出版的長篇政治小說。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在這部作品中奧威爾刻畫了一個令人感到窒息的恐怖世界,在假想的未來社會中,獨裁者以追逐權力爲最終目標,人性被強權徹底扼殺,自由被徹底剝奪,思想受到嚴酷鉗制,人民的生活陷入了極度貧困,下層人民的人生變成了單調乏味的循環。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"本篇是理查德斯托曼的第二篇。想查看上一期請在後臺回覆 RMS001","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","marks":[{"type":"italic","attrs":{}}],"text":"爲了捍衛自由,我決定寫一個操作系統","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"斯托曼可不想讓這種事情發生。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"但現實中的斯托曼卻面臨兩種抉擇:加入一家專有軟件公司或者離開這個黑客圈子。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"麪包與理想。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"或者,斯托曼想,是否有第三種方法,可以解決目前遇到的問題?","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"同時維護自己珍視的黑客文化。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"答案顯而易見:寫一個操作系統,一個自由的操作系統。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"斯托曼的 DNA 動了。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"操作系統作爲軟件和硬件數據交換的應用程序,非常重要。如果沒有操作系統,斯托曼什麼也做不了。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"操作系統不僅僅是一個只能運行其他程序的內核。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在70年代,任何排得上號的操作系統都包括有命令解釋器、彙編器、編譯器、調試器、文本編輯器和電子郵件軟件包等等。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"開發一個操作系統是一個巨大的工程,耗時良久。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"爲了能夠實現這些目標,理查德斯托曼成立了自由軟件基金會(Free Software Foundation,簡寫爲 FSF),爲 GNU 募集基金。","attrs":{}}]},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/c3/c38a83f748f12d8dc970121cf464328e.png","alt":"理查德·斯托曼:爲了自由,我決定寫一個GNU操作系統(下)","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“我作爲操作系統的開發人員,我擁有的技能正適合這項工作。儘管我不認爲成功唾手可得,但是我覺得這是我的天賦。”","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“我決定將系統設計的與 Unix 兼容以便移植,同時也便於 Unix 用戶移植到新的操作系統上來。我按照黑客的傳統選擇了 GNU 這個名字”","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GNU是“GNU is Not Unix” 的遞歸同義詞。它是g發音的單音節字,就像“grew”,但要用字母“n”替換掉“r”,普通話類似“哥怒”,代表動物是一個牛羚。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"1983年,理查德斯托曼宣佈建立 GNU 工程(GNU Project)。","attrs":{}}]},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/02/020263c7be5a45be1285be1f2d2785ed.png","alt":"理查德·斯托曼:爲了自由,我決定寫一個GNU操作系統(下)","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","marks":[{"type":"italic","attrs":{}}],"text":"自由是無價的","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自由軟件的英文是:free software,free 在英文中使用最多的兩個意思是:免費和自由。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"不是免費啤酒(free beer)的“ free” 而是言論自由(free speech)的“free”。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自由軟件這個詞有比較高的教育成本,斯托曼也曾想更換一個準確的詞語來替換 free,例如 unfettered、liberated、freedom 和 open。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“但是這樣的代替詞要麼詞義不對,要麼就是存在其他缺陷。”斯托曼說。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"很多人認爲 GNU 工程的精神就是不該對軟件發行的副本收費,或者應只收取很少的錢——只要是成本價即可。這是一種誤解。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“自由軟件無關價格”。也就是說你可以免費提供,也可以爲軟件開發收取一定的費用。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“我們鼓勵重新發布自由軟件的人儘可能多的收取他們想要的費用。”","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"什麼是自由軟件?理查德制定了“自由軟件四項基本原則”:","attrs":{}}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自由度0:無論用戶出於何種目的,必須可以按照用戶意願,自由地運行該軟件。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自由度1:用戶可以自由地學習並修改該軟件,以此來幫助用戶完成用戶自己的計算。作爲前提,用戶必須可以訪問到該軟件的源代碼。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自由度2:用戶可以自由地分發該軟件的拷貝,這樣就可以助人。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自由度3:用戶可以自由地分發該軟件修改後的拷貝。藉此,用戶可以把改進後的軟件分享給整個社區令他人也從中受益。作爲前提,用戶必須可以訪問到該軟件的源代碼。","attrs":{}}]}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們來理解一下:","attrs":{}}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自由度0說明的是一個軟件的基本要求:可運行。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自由度1說明的是軟件必須公開源代碼。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自由度2說明的是,源碼可以自由分發。","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自由度3說明的是,軟件作者和使用軟件的用戶都必須將修改後的程序源代碼代碼公開,並且可以再次分發。","attrs":{}}]}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果一個軟件滿足這“自由軟件四項基本原則”,那它就是自由軟件。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","marks":[{"type":"italic","attrs":{}}],"text":"GNU 軟件與 GNU 系統","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GNU 工程並不是 GNU 軟件的集合,考慮到項目的可行性,GNU 工程中包含了GNU 軟件和符合“自由軟件四項基本原則”的其他自由軟件。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這個過程很有意思,斯托曼在列出一個操作系統所需的軟件後,第一時間不是去寫,而是在想現在有哪些自由軟件可以加入到 GNU 工程當中。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GNU 工程的編譯器模塊,斯托曼本來想通過這種方式整合到工程中。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當時斯托曼聽說荷蘭自由大學有一種編譯器軟件包 VUCK,它是爲處理多種語言而設計的編譯器,支持當時的 C 語言和 Pascal,支持多種硬件。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"斯托曼給作者寫了一封信,作者卻回覆到:“大學是自由的,但是 VUCK 不是”。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"編譯器是非常重要的模塊,它主要的目的是將便於人編寫、閱讀、維護的高級計算機語言所寫作的源代碼程序,翻譯爲計算機能解讀、運行的低階機器語言的程序,也就是可執行文件。它能夠將人類能看懂的語言編譯成機器可以識別的指令,就像軟件和硬件之間的一個翻譯官,沒有它的話,程序就無法讓機器識別,機器沒法幹活。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“因此我決定爲 GNU 開發第一個程序是一個支持多語言、多平臺編譯器”","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這個編譯器的名字叫做 GCC —— GNU編譯器套裝( GNU Compiler Collection)","attrs":{}}]},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/12/12e488b3bf7d62ca30446e18239608e7.jpeg","alt":"理查德·斯托曼:爲了自由,我決定寫一個GNU操作系統(下)","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"不會有人不知道 GCC 吧?","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","marks":[{"type":"italic","attrs":{}}],"text":"欲善其事,先利其器 —— GNU Emacs","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"代碼編輯器很重要。不過當時還沒有 VS Code。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“在完成 GCC 之前,我先完成了 GNU Emacs”","attrs":{}}]},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/31/319801758f36b3681be1fb9de8ed4f86.png","alt":"理查德·斯托曼:爲了自由,我決定寫一個GNU操作系統(下)","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“我開發 GNU Emacs 的工作開始於1984年,1985年初 GNU Emacs 便可以開始使用了。這使得我可以在 Unix 機器上進行編輯工作。而在此之前,因爲沒有興趣使用 vi 或者 ed,我的文本編輯器工作都是在其他系統上完成的”","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Vim 和 Emacs 至今爲止都是非常受歡迎的編輯器,爲什麼這麼多人喜歡使用 Vim 和 Emacs?,知乎上一個回答是這樣的:","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“作爲一個程序員來說,或者作爲一個立志成爲黑客的人來說,編輯器是你的基礎工具,是你必須得絕對熟練掌握的東西,你必須絕對地完全地熟練掌握它,它將伴隨你很多年。——一個優秀的設計必須是從一開始就具有優秀的機制,容易被無限的擴展而不喪失兼容。而 vim/Emacs 這樣的工具,一旦你掌握,在未來的三十年裏你都不用再操心編輯器的問題。”","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“一旦你掌握,在未來三十年裏你都不用操心編輯器的問題。”","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這或許就是人們喜歡 Vim 和 Emacs 的原因吧。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"宇宙的盡頭可能是 Vim 或者 Emacs。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當時的人開始中意 Emacs,那麼該如何讓 Emacs“飛入尋常百姓家”,讓更多人使用呢?專業一點的話,這個詞應該叫做“軟件發行”。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當時斯托曼已經辭去了麻省理工學院的職務,作爲 GNU 發行大本營的 FTP 服務器在 MIT,它隨着機器被淘汰也不能使用了。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“寄給我一盤磁帶和一個郵資已付的回信信封,我會把 Emacs 寄回給你,一份150美元。”斯托曼更想使用 Emacs 的用戶說。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這個磁帶可以理解成現在的 U 盤,是存儲程序的介質。斯托曼會把 GNU Emacs 程序拷貝到磁帶中,然後郵寄給用戶,並收取一定的服務費用。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"因爲當時斯托曼沒有工作,他想通過自由軟件掙錢。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"軟件免費,服務收費。這不就是紅帽軟件的盈利模式之一嗎?","attrs":{}}]},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/c6/c6b83219ae929a2c092d2f110b525144.png","alt":"理查德·斯托曼:爲了自由,我決定寫一個GNU操作系統(下)","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"確實是這樣,斯托曼說:“這(指銷售 Emacs 的這種模式)也是當今衆多銷售完成的、基於 Linux 的 GNU 系統的公司的濫觴”","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自由軟件無關價格,但是“自由軟件” 不表示 “非商業化”。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自由軟件必須可以商用、可以商業開發、可以商業發佈。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"作爲個人用戶,你可能花錢購買了自由軟件的拷貝,也可能免費拿到。但是無論你如何獲得你的拷貝,你都有自由複製和修改該軟件,乃至出售該軟件的拷貝的權利。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","marks":[{"type":"italic","attrs":{}}],"text":"自由軟件基金會","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GNU Emacs 的火熱開始讓越來越多的人們加入到 GNU 工程當中,斯托曼覺得這是一個爲項目募集資金的好機會。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"1985年,在斯托曼創辦了 FSF,這是一個完全致力於自由軟件開發免稅的福利機構,FSF 同時接管了 Emacs 磁帶發行業務,在之後的磁帶上增加了 GNU 軟件和非 GNU 的自由軟件,出售自由軟件的使用手冊,FSF 的業務得到了進一步的發展。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"雖然 FSF 接受捐贈,但是大部分的收入都是 FSF 自力更生換來的,來源於銷售自由軟件拷貝以及其他服務。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"FSF 編寫並維護好了數量相當的 GNU 軟件包,最主要的是 glibc 和 shell 兩個軟件,無論你是學生或工程師,對這兩款軟件都不陌生吧。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"glibc 是由 FSF 的 Roland McGrath 開發的,glibc 是 GNU/Linux 系統中最底層的API,幾乎其它任何運行庫都會依賴於 glibc。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"絕大多數的 GNU/Linux 上的 shell 都是 BASH。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"考點來了,BASH 是縮寫嗎?","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"答案:是的。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"BASH 的全稱是“Bourne Again Shell”,它是由 FSF 的 Brian Fox 開發。BASH 是 Bourne shell 的後繼兼容版本與開放源代碼版本。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Bourne shell 是 Unix 第七版上使用的 shell。以簡潔、緊湊、高效著稱、由 AT&T 編寫。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Bourne Again 的雙關語是 born again,新生的意思。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"黑客的幽默。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"BASH 現在仍是大多數的類 Unix 操作系統的默認 shell,自從 macOS Catalina 發佈以來,macOS 默認 shell 更換爲 ZSH。","attrs":{}}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","marks":[{"type":"italic","attrs":{}}],"text":"Copyleft & GPL","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"源代碼正在被版權法保護,那麼如何保證 GNU 工程中的自由軟件始終都是自由軟件呢?","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"1989年2月15日,斯托曼起草了併發布了 GNU General Public License, GNU 通用公共許可協議,簡稱爲 GNU GPL。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"目前該協議已經發布三個版本,最新版本 GNU GPLv3 於2005年由斯托曼起草,2007年由 FSF 發佈。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果你在 Github 或者 Gitee 新建一個開源項目的時候,在創建倉庫的時候會讓你選擇不同的開源許可證,GNU GPL 就是其中的一個。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"下面我們大概來看一下這個三個版本的主要內容。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GNU GPLv1 主要解決了以下兩個問題:軟件經銷商必須按照 GNU GPL 的 3a和3b 章節規定,提供人類可讀的源碼。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第二,考慮到自由軟件可能會和專有軟件相結合,例如在 Unix 機器上使用 BASH,這會導致 BASH 不能自由分發。Unix 是專有軟件。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"因此,根據 GNU GPLv1 條款分發的軟件可以和更寬鬆的條款與軟件相結合,因爲這不會改變整體可以分發的條款。但是不能與在更嚴格的許可證下分發的軟件相結合,這會產生衝突。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自由軟件和專有軟件“井水不犯河水”。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GNU GPLv2 規定開發者使用基於 GNU GPL 的軟件開發新軟件時,必須強制遵守分享源碼的條款,否則新軟件將無權發佈。即使新軟件中只用到了一點點的自由軟件,整個軟件都必須以 GNU GPL 發佈。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"正是因爲這一點,GNU GPL 許可證也被稱爲“病毒”式許可證,因爲它像“病毒”一樣,感染所有觸及它的程序。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GNU GPLv3 提高了與許多開放源代碼軟件許可證(例如 Apache許可證 2.0)和 GNU Affero 通用許可證的兼容性。","attrs":{}}]},{"type":"image","attrs":{"src":"https://static001.geekbang.org/infoq/93/9343c83e19138dfa7bfffb52634fd083.png","alt":"理查德·斯托曼:爲了自由,我決定寫一個GNU操作系統(下)","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"許可證兼容性在 GNU GPLv2 中是無法進行兼容的,畢竟使用了 GNU GPLv2 的自由軟件開發項目,其軟件許可必須爲 GNU GPLv2。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GNU Affero 通用許可證是 GNU GPL 的衍生版本,由 Affero 公司提供,其目的是避免自由軟件被軟件服務提供商使用而逃避 GNU GPL 的許可證規定義務的現象發生。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"舉個例子,像谷歌、微軟、亞馬遜、阿里雲這類的雲服務公司,在使用自由軟件的過程中會增加一部分的新特性,這些特性在 GNU GPLv3 中是要求開放源碼的。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"許可證的本質是一個法律問題,不建議各位工程師深度研究,因爲確實燒腦。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"什麼是 Copyleft 呢?","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Copyleft 的中心思想,是給予任何人運行、拷貝、修改以及發行改變後程序的許可,但不准許附加他們自己的限制。從而保障每個人都有獲得“自由軟件”的軟件拷貝的自由,他們成爲了不可異化的權利。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"聽起來跟 GNU GPL 的思想有點像。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"其實 GNU GPL 就是 Copyleft 一種特定實現形式。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"根據斯托曼的自述,絕大多數的 GNU 軟件都在使用 GNU GPL 許可證。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"但是在特殊情況下使用其他種類的“Copyleft”許可證。GNU 使用手冊也採取了 Copyleft 許可證。但這種大大簡化的許可證,因爲手冊不需要像 GNU GPL 那樣的複雜度。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","marks":[{"type":"italic","attrs":{}}],"text":"GNU Linux GNU/Linux","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"時間一晃來到了1990年,GNU 操作系統距離完成只差一個內核了。爲 GNU 操作系統準備的 GNU HURD 內核遲遲不能發佈。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GNU HURD 前身是 Mach 內核,是一款由卡耐基梅隆大學開發出來的微內核,後來在猶他大學得到了發展。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GNU HURD 是運行在 Mach 之上的一組服務的集合。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Mach 內核的開發團隊曾許諾 Mach 將會以自由軟件發佈,所以斯托曼等了很久,結果 GNU HURD 開發時間被迫推遲了。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Mach 內核的設備離我們並不遙遠。基於 Mach 內核開發出來的操作系統現在已經成爲了衆多極客的選擇,這個操作系統是由蘋果公司開發,在 Mach 內核基礎上,配合 BSD 的相關技術開發出來了 OS X 內核,基於此內核構建了 macOS 系統。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"斯托曼說:“選擇該設計的原因之一,是希望避免看似最爲困難的工作:調試一個內核程序而沒有相應的源代碼級調試器。這部分工作在 Mach 中已經完成,而我們期望用 GNU 調試器調試作爲用戶程序的 HURD 服務器。我們耗費了許多時間才使它成爲可能,而且互相之前發送信息的多線程服務器也是非常難以調試的。使用 HURD 穩定運行這一工作已經花了幾年時間。”","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"由於 HURD 內核遲遲不能投入使用。又碰巧在1991年,林納斯托瓦茲開發了一個與 Unix 兼容的內核稱之爲 Linux。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"雖然 GNU 和 Linux 結合本身就是一項非常艱鉅的工作,但是到1992年左右,兩個軟件已經融合成爲一個自由的操作系統。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"但是現在我們都叫這種運行 GNU 軟件和 Linux 內核的操作系統爲 Linux。斯托曼非常不滿,這個稱呼忽略了 GNU 貢獻,所以在 FSF 的定義裏,這種操作系統叫做 GNU/Linux。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“Linux 只是一個內核”。","attrs":{}}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“時至今日,我常常不是唯一的戰士。我看見成羣結隊的黑客掘土加固戰壕,我既感到寬慰,也感到快樂,我明白城市會繼續矗立在這裏——至少現在如此。但失敗的危險與日俱增。現在微軟已經明確地表示將我們的社團視爲打擊目標,我們不奢望未來自由會從天上掉下來。天上是不會掉餡餅的!如果你希望維護你的自由,那麼你必須做好準備捍衛它”","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"——理查德斯托曼","attrs":{}}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"自由軟件運動到現在爲止還在進行着,微軟也沒有成爲自由軟件運動的對手。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GNU 的目的是給用戶以自由,而不僅是爲了爭取大量用戶。越來越多的人使用自由軟件,很多新用戶是純粹本着 GNU/Linux 好用來的,但是對自由軟件的哲學基礎卻不甚瞭解。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"向新用戶推廣自由軟件概念是一項極具艱鉅的任務。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"埃裏克雷蒙德說“理查德斯托曼的 GCC、Emacs、GNU GPL 真的改變了世界,他幫助‘發明’所做的開放、協作的開發模式正在走向勝利。他的代碼取得了勝利,但是他的自由軟件思想失敗了,更可悲的是,理查德斯托曼更看重自由軟件思想,而不是代碼。”","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對於理查德來說,更可悲的是在1998年。因爲那一年自由軟件中的部分成員決定停用使用“自由軟件”這個稱呼,改用“開源軟件(open source)”","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這就是另外一個故事了。","attrs":{}}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","marks":[{"type":"italic","attrs":{}}],"text":"站在巨人的肩膀上","attrs":{}}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"https://movie.douban.com/subject/26647117/discussion/616371977/","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"https://zh.wikipedia.org/wiki/自由軟件","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"https://www.gnu.org/philosophy/free-sw.html","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"https://zh.wikipedia.org/wiki/編譯器","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"https://www.zhihu.com/question/19712884/answer/15939069","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"https://zh.wikipedia.org/wiki/Bash","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"https://zh.wikipedia.org/wiki/Bourne_shell","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"https://zhuanlan.zhihu.com/p/57656644","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"《若爲自由故:自由軟件之父理查德 斯托曼傳》[美]SAM WILLIAMS 著 鄧楠 李凡希 譯","attrs":{}}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"《開源軟件文集:開源革命之聲》Chris DiBona,Sam Ockman,Mark Stone 編 洪峯 譯","attrs":{}}]}]}],"attrs":{}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章