2014-10-27

Fedora 21 がやってくる!

Fedora は、Red Hat が支援するコミュニティー Fedora Projectによって開発されている RPM 系 Linux ディストリビューションです。Fedora は、最新の技術を積極的に取り込むディストリビューションで、その成果が RHEL に取り込まれるといった検証目的としての位置づけがなされています。最新の技術を取り込むことを標榜しているだけあって、新しいバージョンのリリース頻度は(スケジュールは遅れるのが常ですが)半年に一回と、結構更新が忙しいディストリビューションでもあります。

ところが 10 周年の記念すべき現リリースの Fedora 20 が 2013 年 12 月 17 日公開されたあと、2014 年には一度しか Fedora がリリースされないことが発表されました [1], [2]。しかも毎回付けられていた、イカした開発コードネームは付かないということも。それが Fedora 21 です。スケジュールが遅れるのは常ですが、なんとか年内にはリリースされそうです [3]

Fedora 21 の配布は、クラウド、サーバー、ワークステーションの用の 3 製品になるようです [4]。正確には Base パッケージの元に、Cloud、Server そして Workstation のパッケージが配布されることになるようです。アルファリリースの段階では i686 と x86_64 に対応したパッケージが公開されています。リリースのタイミングは判りませんが ARM 版も公開されるでしょう。

Fedora 21 に取り込まれるソフトウェアは [5] によると以下のようになります。日本語には翻訳していません。

Fedora 21 Accepted System Wide Changes Proposals

Application Installer Continued
Fully integrate the new application installer with Fedora, and complete its feature set
Cockpit Management Console
The Fedora Server Product will ship the Cockpit Project as available by default, providing an approachable tool for system management.
System-wide crypto policy
Unify the crypto policies used by different applications and libraries. That is allow setting a consistent security level for crypto on all applications in a Fedora system. The implementation approach will be to initially modify SSL libraries to respect the policy and gradually adding more libraries and applications.
Domain Controller Server Role
The Fedora Server Product will provide a standard deployment mechanism for a Linux Domain Controller (powered by the FreeIPA project).
Fedora 21 Boost 1.56 Uplift
This change brings Boost 1.55.0 (as, Boost 1.56.0 was not ready in time) to Fedora 21.
Fedora 21 Make 4.0 Update
This change brings Make 4.0 to Fedora 21.
Format Security
Enable "-Werror=format-security" compilation flag for all packages in Fedora. Once this flag is enabled, GCC will refuse to compile code that could be vulnerable to a string format security flaw.
Framework for Server Role Deployment
A new D-Bus service, and associated command-line tools, to deploy and manage Server Roles.
GCC49
Switch GCC in Fedora 21 to 4.9.x, rebuild all packages with it.
GNOME 3.14
Update GNOME to the latest upstream release, 3.14
Headless Java
Server installations of Fedora should usually not pull in packages related to X system or sound subsystem. For this reason part of OpenJDK package has been split into headless subpackage which has smaller dependency chain. Fedora packages should be migrated to require java-headless instead of full java package when appropriate.
Java 8
Make Java 8 (provided by OpenJDK 8 which is java-1.8.0-openjdk) the default Java runtime. The current default Java runtime (Java 7, provided by OpenJDK 7, java-1.7.0-openjdk) will be obsoleted and removed.
Lohit Odia and Gurmukhi font naming
This is a change to make Lohit Oriya fonts name as per the guidelines by Odisha governement and improve Lohit Punjabi font name to avoid confusion between Arabic and Gurmukhi script fonts. It will change Lohit Oriya fonts to Lohit Odia and Lohit Punjabi to Lohit Gurmukhi.
Modular Kernel Packaging for Cloud
Kernel modules that are not necessary in virtualized environments become optionally (un)installable.
Optional Javadocs
Make javadoc subpackages of Java packages optional in guidelines and communicate this change to users.
Access control in PCSC
Add access control to PC/SC smart cards available in the system. Adding access control would (a) prevent unauthorized processes/users from reading data on a smart card, (b) prevent unauthorized processes/users from erasing a smart card, (c) prevent unauthorized processes/users from talking to the smart card firmware
PHP 5.6
Update the PHP stack to new version 5.6.
Python 3.4
Update the Python 3 stack in Fedora from Python 3.3 to Python 3.4.
RPM-4.12
Update RPM to the upcoming 4.12 release.
Remove python-setuptools-devel
The python-setuptools package has carried a virtual Provide for python-setuptools-devel since 2009 for backwards compatibility. We're going to remove this virtual Provide. Packages which still BuildRequire python-setuptools-devel will need to be updated to Require: python-setuptools instead.
Ruby 2.1
Ruby 2.1 is the latest stable version of Ruby, with major increases in speed, memory efficiency and reliability. With this major update from Ruby 2.0.0 in Fedora 20 to Ruby 2.1 in Fedora 21, alongside JRuby, Fedora becomes the superior Ruby development platform.
Ruby on Rails 4.1
Ruby on Rails 4.1 is the latest version of well know web framework written in Ruby.
Smaller Cloud Image Footprint
Shrink the footprint of our cloud images as far as reasonably, and within the given timeframe, possible.
Use license macro in RPMs for packages in Cloud Image
Use new %license macro to separate license files from documentation, so the latter can be excluded from container images without stripping license information which must be included.
Wayland
Support GNOME Wayland sessions
Web Assets
Traditionally, Fedora has been pushing bits from its various servers to people's browsers in an ad-hoc fashion, and issues surrounding JavaScript have been swept under the rug. This change proposal provides a simple framework for shipping static web content and a way forward to treat JavaScript more closely to other code in the distribution.
TCL/TK 8.6
Update tcl/tk from 8.5 to 8.6 in Fedora 21.
u-boot syslinux by default
Add syslinux support to u-boot enabling both pxelinux and extlinux support. simplifying booting arm machines, making anaconda installs easy and overall providing for a better user experience. Default u-boot to using syslinux config files for booting. pxelinux for network and extlinux for local booting. u-boot is the bootloader used on ARM systems in Fedora so the scope of this change is limited to ARM hardware only.

Fedora 21 Accepted Self Contained Changes Proposals

Add amd map parser to autofs
The am-utils package provides automount services for automount maps that use an amd format. However, the am-utils project has not been actively maintained for quite a while now.
Allwinner sunxi (A10 / A13 / A20) ARM SoC support
Allwinner A10 / A13 / A20 SoCs are used in a number of popular low cost arm development boards and arm mini computers. Currently Fedora ARM is supported on these devices through a Remix. Allwinner kernel support is progressing rapidly upstream, and with this upstream kernel support it should be possible to support Allwinner SoCs in the official Fedora ARM images, without the need for a remix.
Amplab Tachyon
Amplab-Tachyon is a fault tolerant distributed file system enabling reliable file sharing at memory-speed across cluster frameworks.
Apache Accumulo
The Apache Accumulo is a scalable sorted, distributed, key/value store.
Apache Ambari
Apache Ambari is a cluster management framework and UI for Apache Hadoop.
Apache HBase
Apache HBase is a distributed database built on top of Apache Hadoop.
Apache Hive
Apache Hive is a data warehouse built on top of Apache Hadoop.
Apache Mesos
Apache Mesos is a cluster manager for sharing distributed application frameworks. This change brings Mesos to Fedora, which many have called a micro-kernel for the data center.
Apache Oozie
Apache Oozie is a workflow scheduler system to manage Apache Hadoop jobs.
Apache Pig
Apache Pig is a data analysis tool built on top of Apache Hadoop.
Apache Spark
Apache Spark is a fast and general engine for large-scale data processing. This change brings Spark to Fedora, allowing easy deployment and development of Spark applications on Fedora.
Atomic Cloud Image
New Fedora product: Fedora Atomic (Cloud Image) - Docker host ready to go in the cloud. This is the "host" component of the Project Atomic pattern.
Better Erlang Support
Update Erlang/OTP to R17, and improve Erlang integration with the rest of Fedora.
Convert Fedora Cloud Image to Fedora Server ("Adopt Your Cattle")
We provide a smooth path so a Cloud Base Image can be turned into Fedora Server. Fedora Cloud images are designed to be run and managed as scale-out undifferentiated "cattle", while Fedora Server is intended for more "pet-like" individually-managed servers.
CUPS Journal Logging
By default, CUPS will send log output to the system journal rather than /var/log/cups/error_log.
Docker Container Image
This is Fedora running inside Docker. Currently, there are non-official images in the docker index, but we'd like them to really come out of release engineering.
DNSSEC support for FreeIPA
FreeIPA with integrated DNS server will support serving of DNSSEC secured zones and automatic DNSSEC key maintenance.
Improved Ivy Packaging
This change aims at improving the way of packaging Java software, which uses Apache Ivy to manage build dependencies.
Improved Scala Ecosystem Support
Fedora now supports several essential parts of the Scala language ecosystem as well as building packages with sbt, the de facto build tool for the Scala community.
Jenkins
Jenkins is an open source continuous integration tool written in Java.
KDE Frameworks 5
KDE Frameworks 5 is a set of libraries and technologies developed in the KDE project over the past 18 years. Most of the frameworks come from the kdelibs module, which has been split, cleaned up, dependencies were strightened and packed into individual libraries. This allows developers and projects outside the KDE ecosystem to make use of these technologies and benefit from work of the KDE Community.
MATE Desktop 1.8
Update MATE Desktop to version 1.8
MariaDB 10.0
Update MariaDB to version 10.0
Move to ImageFactory For Cloud Image Creation
Create images using Anaconda in Koji rather than appliance-creator. Allows non-scratch builds with fedmsg integration for upload service, and also could produce official Docker images.
NFS Ganesha File Server
NFS Ganesha is a user mode file server that supports NFSv3, NFSv4, and NFSv4.1 including pNFS for distributed filesystems. It uses loadable filesystem driver modules to support its backend filesystems. It also integrates 9P.2000L file service
OpenCL
This change will bring basic OpenCL support to Fedora to support the development of OpenCL enabled software and the development of OpenCL implementations itself. The change includes enabling Mesa's OpenCL state-tracker (in 10.0 with ICD support), packaging pocl - an CPU only OpenCL implementation - and the introduction of several other OpenCL related packages.
Remote Journal Logging
Systemd journal can be configured to forward events to a remote server. Entries are forwarded including full metadata, and are stored in normal journal files, identically to locally generated logs. This can be used as an alternative or in addition to existing log forwarding solutions.
Review Board 2.0
Review Board is a powerful tool for managing patch reviews.
SDDM as the default KDE display manager instead of KDM
Retire KDM as the default display manager of the KDE Fedora Spin in favor of SDDM.
SSSD GPO-Based Access Control
This change will enhance SSSD, by adding support for centrally managed host-based access control in an Active Directory (AD) environment, using Group Policy Objects (GPOs).
64bit ARM emulation on x86
Allow running 64bit ARM (AArch64) VMs on x86 hosts using standard the standard qemu and libvirt stack, as well as end user tools like virt-manager and virt-install.
Web Application Authentication
On 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. Various web application environments and frameworks can then consume results of the authentication and information retrieval using environment variables similar to REMOTE_USER.
libzhuyin
An new intelligent input method for Traditional Chinese (Taiwan) provided by libzhuyin using n-gram to give better conversion than ibus-chewing with libchewing.
The Shogun Machine Learning Toolbox
SHOGUN is a large Scale Machine Learning Toolbox, being implemented in C++ and offering interfaces to C#, Java, Lua, Octave, Perl, Python, R and Ruby.

 

Linux を主にワークステーションとして使っているため、自分にとって上記情報で興味を惹かれるのは、それほど多くはありません。Java 環境が Fedora 21 から 8 へ切り替わること。あと(マイナーな話題かもしれませんが)、Tcl/Tk 8.6 がようやく採用されるようです。

現在、自分が使っている環境は、Fedora から CentOS 7 に切り替えて、ようやく馴染んできたところです。約一年ぶりの Fedora のリリースには大いに心惹かれるのですが、Fedora に戻すのには躊躇いがあります。暫く様子見をします。

参考サイト

  1. 2014年、Fedora は名前を持たないリリースを1度だけ公開する ― だが、心配には及ばない - インターネットコム
  2. Nameless Fedora 21 Linux Is an Opportunity for Growth (2014-01-13)
  3. Releases/21/Schedule - FedoraProject
  4. Fedora Project - 次の Fedora を入手する
  5. Releases/21/ChangeSet - FedoraProject

2014-10-25

ProgressIndicator と Thread

JFace の ProgressIndicator を利用して、ファイルの読み込みなど時間が掛かる処理について、単に処理中であることを表示しようとしましたが、最初、なかなかうまくいきませんでした。試行錯誤して、当初予定していたサンプルが出来たので、備忘録として書留ます。

このサンプルは、ダミーの処理をしているスレッドから、UI スレッドにある ProgressIndicator のインスタンス indicator に非同期でアクセスして操作をしています。なお、このサンプルでは [2] のように別スレッドの処理中に「処理開始」ボタンがクリックされることを考慮していません。

List: ProgressIndicatorTest.java
package jfacesample;

import org.eclipse.jface.dialogs.ProgressIndicator;
import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class ProgressIndicatorTest extends ApplicationWindow {
    Display display;
    ProgressIndicator indicator;

    public ProgressIndicatorTest() {
        super(null);
    }

    @Override
    protected Control createContents(Composite parent) {
        Shell shell = parent.getShell();
        display = shell.getDisplay();
        shell.setText("ProgressIndicatorTest");

        GridLayout layout = new GridLayout();
        parent.setLayout(layout);

        GridData gd;

        // start button
        Button start = new Button(parent, SWT.PUSH);
        start.setText("処理開始");
        gd = new GridData(GridData.FILL_HORIZONTAL);
        start.setLayoutData(gd);
        start.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                startWork();
            }
        });

        // progress indicator
        indicator = new ProgressIndicator(parent);
        gd = new GridData(GridData.FILL_HORIZONTAL);
        indicator.setLayoutData(gd);

        return parent;
    }

    private void startWork() {
        DummyTask task = new DummyTask(display, indicator);
        Thread th = new Thread(task);
        th.start();
    }

    public static void main(String[] args) {
        ProgressIndicatorTest w = new ProgressIndicatorTest();
        w.setBlockOnOpen(true);
        w.open();
        Display.getCurrent().dispose();
    }
}

class DummyTask implements Runnable {
    Display display;
    ProgressIndicator indicator;

    DummyTask(Display display, ProgressIndicator indicator) {
        this.display = display;
        this.indicator = indicator;        
    }

    public void run() {
        // start progress indicator
        display.asyncExec(new Runnable() {
            public void run() {
                indicator.beginAnimatedTask();
                indicator.showNormal();
            }
        });

        // dummy task
        long sleepTime = 3000; // milliseconds
        long endTime = System.currentTimeMillis() + sleepTime;
        while (System.currentTimeMillis() < endTime) {
        }

        // stop progress indicator
        display.asyncExec(new Runnable() {
            public void run() {
                indicator.done();
            }
        });

        System.out.println("completed!");
    }
}

実行例

参考サイト

  1. IBM Knowledge Center
  2. 基礎編 - スレッド

2014-10-16

Oracle、「Java SE 7 Update 71」「Java SE 8 Update 25」を公開。25件の脆弱性を修正 - 窓の杜

10 月 14 日(米国時間)に Java など Oracle 製品に関する定例の Critical Patch Update が公開されました。Java 関連では、最新版となる Java SE 7 Update 71 および Java SE 8 Update 25 が公開されています。なお、Java SE 7 については、セキュリティ以外の修正も含まれる Java SE 7 Update 72 も公開されていますが、特別な問題がない場合には Java SE 7 Update 71 を使用することが推奨されています。

今回のアップデートから、java.com のページで配布される Java ランタイムが、Java 7 から Java 8 となりました。

次回の定例セキュリティアップデートは、米国時間 2015 年 1 月 20 日に予定されています。

2014-10-10

XYGraph

Nebula Visualization Widgets の XYGraph を試してみました。

XYGraph を利用するには、まず Eclipse のマーケットプレイスから、Nebula をインストールします。

プロジェクトのビルドパスに org.eclipse.draw2d_XXXX.....jarorg.eclipse.nebula.visualization.xygraph_XXXX....jar を加ます

参考サイトで紹介されていた Snippet をベースにした簡単なサンプルを以下に示しました。

List: XYGraphSample.java
package nebula;

/*******************************************************************************
 * Copyright (c) 2010 Oak Ridge National Laboratory.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 ******************************************************************************/
import org.eclipse.draw2d.LightweightSystem;
import org.eclipse.nebula.visualization.xygraph.dataprovider.CircularBufferDataProvider;
import org.eclipse.nebula.visualization.xygraph.figures.ToolbarArmedXYGraph;
import org.eclipse.nebula.visualization.xygraph.figures.Trace;
import org.eclipse.nebula.visualization.xygraph.figures.XYGraph;
import org.eclipse.nebula.visualization.xygraph.figures.Trace.PointStyle;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

/**
 * A simple XYGraph with toolbar.
 * 
 * Original name of the class was 'SimpleToolbarArmedXYGraphExample' and
 * modified by Fuhito Suguri, 10-Oct-2014
 * 
 * @author Xihui Chen
 *
 */
public class XYGraohSample {
    Shell shell;

    public XYGraohSample(Display display) {
        shell = new Shell(display);
        shell.setText("XYGraphSample");
        shell.setSize(600, 400);

        shell.setLayout(new FillLayout());

        initUI();

        shell.setLocation(200, 200);
        shell.open();

        while (!shell.isDisposed()) {
            if (!display.readAndDispatch()) {
                display.sleep();
            }
        }
    }

    public void initUI() {
        // use LightweightSystem to create the bridge between SWT and draw2D
        final LightweightSystem lws = new LightweightSystem(shell);

        // create a new XYGraph
        XYGraph xyGraph = new XYGraph();
        xyGraph.setTitle("XYgraph の簡単な例");

        xyGraph.primaryXAxis.setTitle("X軸");
        xyGraph.primaryYAxis.setTitle("Y軸");

        xyGraph.primaryXAxis.setShowMajorGrid(true);
        xyGraph.primaryYAxis.setShowMajorGrid(true);

        // add ToolbarArmedXYGraph
        ToolbarArmedXYGraph toolbarArmedXYGraph = new ToolbarArmedXYGraph(xyGraph);

        // set it as the content of LightwightSystem
        lws.setContents(toolbarArmedXYGraph);

        xyGraph.primaryXAxis.setShowMajorGrid(true);
        xyGraph.primaryYAxis.setShowMajorGrid(true);

        // create a trace data provider, which will provide the data to the trace
        CircularBufferDataProvider traceDataProvider = new CircularBufferDataProvider(false);
        traceDataProvider.setBufferSize(100);
        traceDataProvider.setCurrentXDataArray(new double[] { 10, 23, 34, 45, 56, 78, 88, 99 });
        traceDataProvider.setCurrentYDataArray(new double[] { 11, 44, 55, 45, 88, 98, 52, 23 });

        // create the trace
        Trace trace = new Trace("データ", xyGraph.primaryXAxis, xyGraph.primaryYAxis, traceDataProvider);

        // set trace property
        trace.setPointStyle(PointStyle.CIRCLE);
        trace.setPointSize(10);

        // add the trace to xyGraph
        xyGraph.addTrace(trace);
    }

    public static void main(String[] args) {
        Display display = new Display();
        new XYGraohSample(display);
        display.dispose();
    }
}

実行例

参考サイト

  1. Nebula Visualization Widgets
  2. Overview (SWT XYGraph API)

2014-10-04

DateChooserCombo

日付を選択するウィジェットが必要になり、Nebula Incubation の DateChooserCombo を試してみました。

DateChooserCombo は Combobox 状のウィジェットで、右側のボタンをクリックするとカレンダーが表示されて日付けを選択することができます。

準備

Eclipse の、マーケットプレースで Eclipse Nebula Incubation Widgets を選んでインストールします。

プロジェクトのビルドパスに、プラグインでインストールしたウィジェットの内、org.exlipse.nebula.widgets.datechooserorg.exlipse.nebula.widgets.formattedtext を加ます。

サンプル

参考サイトの 2. に示されているサンプルをベースに、自分用のサンプルを作りました。

List: NebulaAppDateChooserCombo.java
package nebula;

import java.util.Date;

import org.eclipse.nebula.widgets.datechooser.DateChooserCombo;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class NebulaAppDateChooserCombo {
    Shell shell;

    public NebulaAppDateChooserCombo(Display display) {
        shell = new Shell(display);
        shell.setText("DateChooserCombo");

        shell.setLayout(new GridLayout());

        initUI();

        shell.pack();
        shell.setLocation(300, 200);
        shell.open();

        while (!shell.isDisposed()) {
            if (!display.readAndDispatch()) {
                display.sleep();
            }
        }
    }

    public void initUI() {
        DateChooserCombo combo = new DateChooserCombo(shell, SWT.BORDER);
        combo.setValue(new Date());
        GridData gd = new GridData();
        gd.widthHint = 120;
        combo.setLayoutData(gd);
    }

    public static void main(String[] args) {
        Display display = new Display();
        new NebulaAppDateChooserCombo(display);
        display.dispose();
    }
}

実行例

参考サイト

  1. Nebula DateChooser Widgets
  2. org.eclipse.nebula.git - Nebula

2014-10-03

Is this why Microsoft named it Windows 10? - CNET

Windows 9 をスキップして Windows 10 にした理由が、Windows 9.x との混乱を避けるため、という推測はもっともな話で納得できます。

if (version.StartsWith("Windows 9")) {
    /* 95 and 98 */
} else {
    ....

なるほど。

2014-10-01

【Bash脆弱性 対応のまとめ】 各ディストリビューションの修正パッケージのリリース相次ぐ、暗黙にBashを呼び出すケースに要注意:CodeZine

Bash にセキュリティホールが見つかった件の続報です。

上の記事によると、CentOS 7 の場合、bash-4.2.45-5.el7_0.2.x86_64 で対応しているようですが、現在、自分の環境における bash のパッケージは、bash-4.2.45-5.el7_0.4.x86_64 です。ということは、既に 9/15 の時点で対応ができていたようです。