Product SiteDocumentation Site

5. Fedora 针​对​开​发​人​员​所​做​的​变​更​

5.1. 开​发​

5.1.1. KDE Frameworks 5

Fedora 21 为​ C++ 和​ Qt 应​用​以​及​作​为​ KDE Platform 4 继​承​者​的​ KDE Frameworks 5 的​开​发​人​员​提​供​了​新​的​库​集​合​。​基​于​ Qt 5 的​ KDE Frameworks 5 可​让​开​发​人​员​获​取​ KDE 社​区​开​发​的​多​种​技​术​和​工​具​,而​无​需​依​赖​整​个​ KDE 平​台​。​
大​多​数​框​架​都​基​于​ kdelibs 模​块​,该​模​块​已​经​依​据​所​提​供​功​能​进​行​了​拆​分​。​依​赖​直​接​打​包​至​各​个​库​中​。​这​可​让​ KDE 生​态​圈​之​外​的​开​发​人​员​和​项​目​使​用​这​些​技​术​并​从​ KDE 社​区​的​成​果​中​受​益​。​
KDE Frameworks 5 可​以​与​ KDE Platform 4 软​件​包​同​时​共​存​。​

5.1.2. OpenCL

Fedora 提​供​了​ OpenCL 标​准​的​基​本​支​持​,为​使​用​了​ OpenCL 的​软​件​开​发​提​供​了​足​够​的​开​发​环​境​。​
To enable OpenCL development, the Mesa's OpenCL state-tracker, the Portable Computing Language (pocl), and several other OpenCL packages have been added to the official Fedora repositories. The pocl language can be used on CPUs, and Mesa can be used on R600 AMD/ATI GPUs.

5.1.3. Python 3.4

Python 3 升​级​至​ 3.4。​修​正​了​多​个​ bug,并​在​前​一​版​本​基​础​上​做​了​多​项​增​强​和​安​全​改​进​。​例​如​:增​加​了​多​个​新​的​库​模​块​和​特​性​,并​大​大​的​改​进​了​多​库​模​块​ (Multiple library modules)。​
详​情​可​阅​读​ Python 3.4 Release Schedule 和​ What’​s New In Python 3.4。​

Python 2 仍​然​是​默​认​版​本​

虽​然​多​数​ Python 软​件​包​都​提​供​了​ Python 和​ Python 3 版​本​,但​ Fedora 默​认​提​供​的​仍​是​ Python 2.7。​

rewheel 模​块​

在​ 3.4 版​本​中​ Python 上​游​决​定​落​实​ PEP 453 文​档​中​摘​录​的​变​更​。​简​而​言​之​就​是​:
  1. bundling archives with the setuptools and pip utilities in Python distribution
  2. providing the ensurepip module that is able to install these archives either on a system or in the virtualenv environment.
Due to Fedora strict non-bundling policies, setuptools and pip are unbundled. To match the upstream functionality, the following approach has been implemented:
  1. python3 现​依​赖​ python3-setuptools 和​ python3-pip 软​件​包​。​这​意​味​着​用​户​不​必​再​使​用​ ensurepip 分​别​安​装​ setuptools 和​ pip 工​具​。​因​为​它​们​将​会​与​ python3 一​起​默​认​被​安​装​。​
  2. To install the setuptools and pip utilities in the virtualenv environment from the system packages, a mechanism called rewheel has been implemented to Fedora 21. When a new virtualenv is being created, rewheel takes the system python3-setuptools and python3-pip packages, recreates their archives and installs them in the new virtualenv so that the upstream functionality is preserved.
One more advantage is provided by the rewheel approach. When there is a bug, for example a security issue, in either python3-setuptools or python3-pip, Fedora maintainers of these packages fix the bug and users get the fixed packages. Therefore, virtualenvs created after updating to fixed python3-setuptools or python3-pip will have already fixed version. With pure upstream Python, this approach is not possible, users will have to wait for upstream to release new Python version with these fixes incorporated. This means that the rewheel patch makes the python3 package fulfill Fedora's high packaging standards and also helps to make virtualenvs more secure.
See the Rewheel page on GitHub for additional information about rewheel.

5.1.4. RPM 4.12

RPM 软​件​包​管​理​器​更​新​至​ 4.12,与​上​游​最​新​版​本​一​致​。​
本​次​更​新​带​来​多​项​改​进​:
可​打​包​大​于​ 4 GB 的​文​件​。​
支​持​弱​的​依​赖​。​
API 用​户​将​可​以​更​清​晰​的​访​问​文​件​数​据​。​
通​过​ API 可​访​问​ Payload 数​据​。​
新​工​具​ rpm2archive 可​将​ rpm 包​转​换​为​ tar 文​件​,而​不​再​是​旧​的​ cpio 格​式​。​新​工​具​也​可​用​于​超​过​ 4 GB 的​文​件​,而​ cpio 和​ rpm2cpio 则​不​能​。​

在​ Fedora 包​中​没​有​弱​的​依​赖​

While the the underlying RPM libraries offer support for optional dependencies, soft requirements, and other weak dependencies, the packages in Fedora repositories are not yet leveraging this feature.
完​整​变​更​请​见​ RPM 4.12 发​行​注​记​。​

没​有​新​特​性​用​来​安​装​老​版​本​的​ RPM

如​果​使​用​部​分​新​功​能​,则​会​破​坏​向​前​兼​容​性​ (forward compatibility)。​也​就​是​说​,使​用​这​些​特​性​的​软​件​包​将​无​法​在​较​早​版​本​的​ Fedora 上​构​建​或​安​装​。​然​而​向​后​兼​容​性​ (backward compatibility) 仍​将​会​得​到​维​护​。​

5.1.5. Ruby 2.1

Ruby 2.1 是​ Ruby 的​最​新​稳​定​版​本​,该​版​本​在​速​度​,内​存​效​率​以​及​可​靠​性​上​做​了​改​进​。​
The update brings a soname bump. Therefore, Ruby packages which use binary extensions should be rebuilt - and this has been done for packages in the Fedora repositories. Nevertheless, since upstream payed great attention to source compatibility, no changes to your code should be needed. Additionally, RubyGems with binary extensions need to be updated to conform to the recent package guidelines to ensure compatibility with the new RubyGems release.
也​请​留​意​,从​此​次​发​行​开​始​,Ruby 将​过​渡​到​ 规​范​的​版​本​号​命​名​方​式​.
有​关​ Ruby 2.1 变​更​的​全​部​内​容​可​阅​读​变​更​记​录​。​完​整​文​档​位​于​ Ruby 文​档​页​面​。​

5.1.6. TCL/TK 8.6

Fedora 21 中​的​ TCL/TK 升​级​至​ 8.6.1 版​本​,该​版​本​包​括​了​大​量​的​错​误​修​正​和​改​进​。​本​部​分​将​介​绍​部​分​显​著​特​性​。​
变​更​的​完​整​内​容​请​参​考​ TCL/TK 发​行​注​记​。​
5.1.6.1. TCL 8.6
TCL 8.6 的​变​更​
  • IPv6 支​持​
    支​持​ IPv6 网​络​的​客​户​端​和​服​务​器​套​接​字​。​
  • SQL 数​据​库​支​持​
    The bundled tdbc package, which contains the Tcl DataBase Connectivity interface, now enables writing SQL database-powered scripts decoupled from any particular database engine. The bundled sqlite3 and tdbc::sqlite3 packages supply a powerful and popular SQL database engine that is ready to use.
  • 面​向​对​象​程​序​设​计​的​支​持​
    The commands of the TclOO package are now part of the TCL language itself. This gives TCL a built-in fully dynamic, class-based object system and also includes advanced features such as meta-classes, filters, and mixins.
    A new version 4 of the popular package Itcl (also known as "incr TCL") is also included, now built on a TclOO foundation, granting support for some traditional Object Oriented TCL programming out of the box as well.
  • 多​线​程​操​作​支​持​
    A thread-enabled default build, a bundled Thread package, and a new command interp cancel enable multi-threaded programming tasks on TCL 8.6.
5.1.6.2. TK 8.6
TK 8.6 的​变​更​
  • PNG 图​像​支​持​
    照​片​图​像​现​支​持​以​ PNG 格​式​读​写​,并​可​设​置​ alpha 通​道​。​
  • 倾​斜​文​字​
    新​的​ -angle $degrees 到​ $canvas 可​以​创​建​文​本​选​项​让​显​示​的​文​字​旋​转​。​

5.1.7. 改​进​的​ Scala “​生​态​”​系​统​

通​过​集​成​ sbt 0.13.1 及​其​它​ Scala 基​础​结​构​的​关​键​软​件​包​,Fedora 极​大​地​改​进​了​对​ Scala “​生​态​”​系​统​的​支​持​。​这​些​软​件​包​有​:
  • akka,一​个​用​来​开​发​基​于​行​为​系​统​ (actor-based system) 的​工​具​集​
  • json4s,一​个​ JSON 解​析​器​和​生​成​器​的​统​一​接​口​
  • sbinary,用​来​读​取​和​写​入​二​进​制​格​式​的​类​型​化​ Scala 接​口​
  • scala-stm,一​种​ Scala 的​软​件​事​务​内​存​实​现​
  • scalacheck,一​个​ Scala 基​于​性​能​的​测​试​框​架​
  • scalaz,Scala 标​准​库​的​一​系​列​扩​展​以​利​于​函​数​式​编​程​
有​了​这​些​软​件​包​的​存​在​,Fedora 已​经​成​为​一​个​优​秀​的​开​发​及​分​发​ Scala 项​目​的​环​境​。​

5.2. 开​发​工​具​

5.2.1. Eclipse Luna

Fedora 21 的​ Eclipse 更​新​至​ Luna (4.4)。​除​其​他​变​更​外​,Eclipse Luna 开​始​支​持​ Java 8,拆​分​编​辑​器​以​及​深​色​主​题​。​
有​关​该​版​本​发​布​的​详​细​内​容​可​参​考​上​游​项​目​的​发​行​注​记​ https://www.eclipse.org/eclipse/news/4.4/eclipse_news_4.4.php。​

5.2.2. Jenkins

The official Fedora repositories now include Jenkins, an application written in Java that provides continuous integration services for software development. Jenkins allows you to build and test software projects continuously, as well as to monitor executions of jobs that were ran externally.
For additional information, refer to the Meet Jenkins webpage.

5.2.3. Make 更​新​至​ 4.0

GNU Make has been updated to version 4.0, offering several bug fixes and new features. It also includes new command line options and new variables to improve usability.
Read the Make release announcement at https://lists.gnu.org/archive/html/make-w32/2013-10/msg00021.html for more information about the changes in this release. The project documentation is available at http://www.gnu.org/software/make/manual/

5.2.4. Review Board 2.0

Fedora now provides Review Board 2.0, a powerful, web-based patch review and management tool.
Version 2.0 adds the ability to post committed changes from a branch directly from the web UI, adds review of text file attachments, greatly extends the capabilities of the public API and extension framework, and offers significant performance improvements, usability enhancements, and visual cleanups.
diff 查​看​器​做​出​了​重​要​改​进​,同​时​加​入​对​非​代​码​类​文​件​的​检​查​支​持​(如​二​进​制​文​件​格​式​)。​
Review Board 2.0 的​文​档​位​于​ Review Board 手​册​页​面​。​

Back up before migrating to Review Board 2.0

Upgrading to Review Board 2.0 from a previous release will modify your database schema. The migration will be performed when you restart Apache for the first time after the upgrade, and the process is irreversible.
Back up your database before upgrading.

5.2.5. SHOGUN Machine Learning Toolbox

The machine learning toolbox's focus is on large scale kernel methods and especially on Support Vector Machines (SVM). It provides a generic SVM object interfacing to several different SVM implementations, among them the state of the art LibSVM. Each of the SVMs can be combined with a variety of kernels.
One of its key features is the "combined kernel" which can be constructed by a weighted linear combination of a number of sub-kernels, each of which not necessarily working on the same domain. An optimal sub-kernel weighting can be learned using Multiple Kernel Learning. Currently SVM 2-class classification and regression problems can be dealt with. However SHOGUN also implements a number of linear methods like Linear Discriminant Analysis (LDA), Linear Programming Machine (LPM), (Kernel) Perceptrons and features algorithms to train hidden Markov-models.
Learn more about SHOGUN at http://shogun-toolbox.org/doc/en/current/

5.3. GCC 工​具​

5.3.1. Boost 1.55.0

boost 升​级​至​ 1.55.0。​本​次​升​级​包​括​大​量​错​误​修​正​和​功​能​改​进​,同​时​增​加​了​一​个​新​库​ (Predef),并​在​需​求​上​稍​作​改​动​以​便​对​那​些​已​经​删​除​了​某​些​编​译​器​的​很​老​的​版​本​进​行​支​持​。​
变​更​的​完​整​内​容​请​阅​读​ Boost 1.55.0 发​行​注​记​。​

5.3.2. GCC 4.9.x

GNU 编​译​器​集​ (GCC) 升​级​至​ 4.9.x。​Fedora 所​有​的​软​件​包​已​使​用​该​版​本​的​ GCC 重​新​构​建​。​
此​次​更​新​提​供​了​大​量​的​ bug 修​复​以​及​增​强​。​最​显​著​的​是​新​近​增​加​的​一​些​特​性​,如​下​:
完​成​绝​大​部​分​ ISO C11 支​持​。​
部​分​支​持​ C++14。​
C++11 对​正​则​表​达​式​的​支​持​。​
OpenMP 4.0 标​准​。​
未​定​义​行​为​消​除​(UBSAN)。​
Cilk Plus 扩​展​。​
有​关​变​更​的​详​细​信​息​请​参​考​ GCC 4.9 发​行​注​记​。​

5.4. Java

5.4.1. OpenJDK 8

OpenJDK8 取​代​ OpenJDK7 成​为​ Fedora 默​认​的​ Java Runtime 环​境​。​有​关​ OpenJDK8 中​新​特​性​的​详​细​信​息​可​参​考​ http://openjdk.java.net/projects/jdk8/features/。​

Java 自​定​义​

User customizations made to java-1.7.0-openjdk(specifically, to files under /usr/lib/jvm/java-1.7.0*/*) will not be carried across to java-1.8.0-openjdk.

5.4.2. 更​加​高​效​的​包​依​赖​

The way that Java dependencies are handled has changed in Fedora 21. Packages that do not interact with the X server or audio subsystem now depend on a new OpenJDK headless subpackage. This means installation size reduction on servers, a change that aims for efficiency.
此​外​,为​更​大​的​节​省​服​务​器​空​间​,Java 软​件​包​的​文​档​为​可​选​安​装​。​可​通​过​查​找​ Java 软​件​包​相​关​的​ -doc 从​属​软​件​包​来​安​装​对​应​的​文​档​。​
If you need access to API documentation of Java libraries without javadoc subpackages, try using upstream web pages which should be accessible at homepage URL of the project in question. You can query for the URL of installed package with rpm -qi package| grep '^URL'
Java packaging guidelines now also require to convert most Java packages to have Requires: java-headlesswhen appropriate. Detailed information about the packaging effort can be found at https://fedoraproject.org/wiki/Packaging:Java#BuildRequires_and_Requires

5.4.3. 改​进​的​ Ivy 打​包​

The way of packaging Java software that uses Apache Ivy to manage build dependencies has been improved in a similar way to the Maven packaging updates in previous Fedora releases. In particular, the following improvements have been implemented:
  • 自​动​解​决​ Ivy artifacts,
  • 集​成​系​统​ Maven 仓​库​,
  • 自​动​安​装​ Ivy artifact 元​数​据​,
  • 自​动​索​求​。​

5.5. Web 开​发​

5.5.1. PHP 5.6

PHP 堆​栈​更​新​至​上​游​最​新​版​ 5.6。​本​版​本​中​主​要​变​更​有​:
PHP 5.6 also features a new tool, the PHP debugger, provided in the new php-dbg subpackage. Use the debugger with the phpdbg command.
有​关​将​应​用​从​ PHP 5.5 迁​移​到​ PHP 5.6 的​信​息​可​访​问​ http://php.net/manual/en/migration56.php。​

5.5.2. Ruby on Rails 4.1

Fedora 21 includes Ruby on Rails 4.1, the latest version of the well-known web application framework written in Ruby. Highlights in this release include Spring application preloader, config/secrets.yml, Action Pack variants, and Action Mailer previews. The Release Notes are at http://guides.rubyonrails.org/4_1_release_notes.html
Information for developers upgrading existing applications to Ruby on Rails 4.1 can be found in the Upgrading Ruby on Rails guide at http://guides.rubyonrails.org/upgrading_ruby_on_rails.html.

5.5.3. Web 应​用​程​序​认​证​

At an operating system level, there are numerous authentication and identity lookup mechanisms, some of them using sssd. With new Apache modules and new sssd, some of those mechanisms become more easily consumable by web applications. Web application environments and frameworks can then consume results of the authentication and information retrieval using environment variables similar to REMOTE_USER. This will allow the better integration of web applications into enterprise-scale deployments.
With mod_authnz_pam, PAM authentication and access checks are available to web applications, allowing wider combination of authentication and access controls. One specific target is host-based access control rules of FreeIPA for Kerberos SSO via mod_sss and sssd.
The mod_intercept_form_submit module makes it possible to enable the PAM authentication of mod_authnz_pam on normal logon form handling paths, which can then be consumed by web application with fairly minimal changes.
The mod_lookup_identity uses sssd-dbus to retrieve additional attributes like name, email address, or group membership, and populates environment variables for easy consumption of this information by web applications.
The sssd-dbus implements new service ifp which provides access to additional user-related pieces of information.
更​多​信​息​可​以​参​见​ http://www.freeipa.org/page/Web_App_Authentication。​