Fedora Hub

June 28, 2017

Fedora黑

Fedora Magazine

Testing modules and containers with Modularity Testing Framework

Fedora Modularity is a project within Fedora with the goal of Building a modular operating system with multiple versions of components on different lifecycles. Fedora 26 features the first look of the modularity vision: the Fedora 26 Boltron Server. However,  if you are jumping into the modularity world, creating and deploying your own modules and containers — your next question may be how to test these artifacts.  The Modularity Testing Framework (MTF) has been designed for testing artifacts such as modules, RPM base repos, containers, and other artifact types. It helps you to write tests easily, and the tests are also independent of the type of the module.

MTF is a minimalistic library built on the existing avocado and behave testing frameworks. enabling developers to enable test automation for various module aspects and requirements quickly. MTF adds basic support and abstraction for testing various module artifact types: RPM based, docker images, ISOs, and more. For detailed information about the framework, and how to use it check out the MTF Documentation.

Installing MTF

The Modularity Testing Framework is available in the official Fedora repositories. Install MTF using the command:

dnf install -y modularity-testing-framework

A COPR is available if you want to use the untested, unstable version. Install via COPR with the commands:

dnf copr enable phracek/Modularity-testing-framework
dnf install -y modularity-testing-framework

Writing a simple test

Creating a testing directory structure

First, create the tests/ directory in the root directory of the module. In the tests/ directory, create a Makefile file:

MODULE_LINT=/usr/share/moduleframework/tools/modulelint/*.py
TESTS=*.py (try not to use “*.py”, but use the test files with names such as sanity1.py sanity2.py... separated by spaces)

CMD=python -m avocado run $(MODULE_LINT) $(TESTS)

#
all:
    generator  # use it in case that tests are defined also in config.yaml file (described below)
    $(CMD)

In the root directory of the module, create a Makefile file containing a section test. For example:

.PHONY: build run default

IMAGE_NAME = memcached

MODULEMDURL=file://memcached.yaml

default: run

build:
    docker build --tag=$(IMAGE_NAME) .

run: build
    docker run -d $(IMAGE_NAME)

test: build
    # used for testing docker image available on Docker Hub. Dockerfile 
    cd tests; MODULE=docker MODULEMD=$(MODULEMDURL) URL="docker.io/modularitycontainers/memcached" make all
    # used for testing docker image available on locally.
    # Dockerfile and relavant files has to be stored in root directory of the module.
    cd tests; MODULE=docker MODULEMD=$(MODULEMDURL) URL="docker=$(IMAGE_NAME)" make all
    # This tests "modules" on local system.
    cd tests; MODULE=rpm MODULEMD=$(MODULEMDURL) URL="https://kojipkgs.fedoraproject.org/compose/latest-Fedora-Modular-26/compose/Server/x86_64/os/" make all

In the tests/ directory, place the config.yaml configuration file for module testing(Do adresare tests umisti configuracni soubor config.yaml pro testovani modulu) . See minimal-config.yaml. For example:

document: modularity-testing
version: 1
name: memcached
modulemd-url: http://raw.githubusercontent.com/container-images/memcached/master/memcached.yaml
service:
    port: 11211
packages:
    rpms:
        - memcached
        - perl-Carp
testdependecies:
    rpms:
        - nc
module:
    docker:
        start: "docker run -it -e CACHE_SIZE=128 -p 11211:11211"
        labels:
            description: "memcached is a high-performance, distributed memory"
            io.k8s.description: "memcached is a high-performance, distributed memory"
        source: https://github.com/container-images/memcached.git
        container: docker.io/modularitycontainers/memcached
    rpm:
        start: /usr/bin/memcached -p 11211 &
        repo:
           - https://kojipkgs.fedoraproject.org/compose/latest-Fedora-Modular-26/compose/Server/x86_64/os/

test:
    processrunning:
        - 'ls  /proc/*/exe -alh | grep memcached'
testhost:
    selfcheck:
        - 'echo errr | nc localhost 11211'
        - 'echo set AAA 0 4 2 | nc localhost 11211'
        - 'echo get AAA | nc localhost 11211'
    selcheckError:
        - 'echo errr | nc localhost 11211 |grep ERROR'

 

Add the simpleTest.py python file, which tests a service or an application, into the tests/ directory:

#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This Modularity Testing Framework helps you to write tests for modules
# Copyright (C) 2017 Red Hat, Inc.

import socket
from avocado import main
from avocado.core import exceptions
from moduleframework import module_framework


class SanityCheck1(module_framework.AvocadoTest):
    """
    :avocado: enable
    """

    def testSettingTestVariable(self):
        self.start()
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.connect(('localhost', self.getConfig()['service']['port']))
        s.sendall('set Test 0 100 4\r\n\n')
        #data = s.recv(1024)
        # print data

        s.sendall('get Test\r\n')
        #data = s.recv(1024)
        # print data
        s.close()

    def testBinExistsInRootDir(self):
        self.start()
        self.run("ls / | grep bin")

    def test3GccSkipped(self):
        module_framework.skipTestIf("gcc" not in self.getActualProfile())
        self.start()
        self.run("gcc -v")

if __name__ == '__main__':
    main()

Running tests

To execute tests from the root directory of the module, type

# run tests from a module root directory
$ sudo make test

The result looks like:

docker build --tag=memcached .
Sending build context to Docker daemon 268.3 kB
Step 1 : FROM baseruntime/baseruntime:latest
---> 0cbcd55844e4
Step 2 : ENV NAME memcached ARCH x86_64
---> Using cache
---> 16edc6a5f7b6
Step 3 : LABEL MAINTAINER "Petr Hracek" <[email protected]>
---> Using cache
---> 693d322beab2
Step 4 : LABEL summary "High Performance, Distributed Memory Object Cache" name "$FGC/$NAME" version "0" release "1.$DISTTAG" architecture "$ARCH" com.redhat.component $NAME usage "docker run -p 11211:11211 f26/memcached" help "Runs memcached, which listens on port 11211. No dependencies. See Help File below for more details." description "memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load." io.k8s.description "memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load." io.k8s.diplay-name "Memcached 1.4 " io.openshift.expose-services "11211:memcached" io.openshift.tags "memcached"
---> Using cache
---> eea936c1ae23
Step 5 : COPY repos/* /etc/yum.repos.d/
---> Using cache
---> 920155da88d9
Step 6 : RUN microdnf --nodocs --enablerepo memcached install memcached &&     microdnf -y clean all
---> Using cache
---> c83e613f0806
Step 7 : ADD files /files
---> Using cache
---> 7ec5f42c0064
Step 8 : ADD help.md README.md /
---> Using cache
---> 34702988730f
Step 9 : EXPOSE 11211
---> Using cache
---> 577ef9f0d784
Step 10 : USER 1000
---> Using cache
---> 671ac91ec4e5
Step 11 : CMD /files/memcached.sh
---> Using cache
---> 9c933477acc1
Successfully built 9c933477acc1
cd tests; MODULE=docker MODULEMD=file://memcached.yaml URL="docker=memcached" make all
make[1]: Entering directory '/home/phracek/work/FedoraModules/memcached/tests'
Added test (runmethod: run): processrunning
Added test (runmethod: runHost): selfcheck
Added test (runmethod: runHost): selcheckError
python -m avocado run --filter-by-tags=-WIP /usr/share/moduleframework/tools/modulelint.py *.py
JOB ID     : 9ba3a3f9fd982ea087f4d4de6708b88cee15cbab
JOB LOG    : /root/avocado/job-results/job-2017-06-14T16.25-9ba3a3f/job.log
(01/20) /usr/share/moduleframework/tools/modulelint.py:DockerfileLinter.testDockerFromBaseruntime: PASS (1.52 s)
(02/20) /usr/share/moduleframework/tools/modulelint.py:DockerfileLinter.testDockerRunMicrodnf: PASS (1.53 s)
(03/20) /usr/share/moduleframework/tools/modulelint.py:DockerfileLinter.testArchitectureInEnvAndLabelExists: PASS (1.63 s)
(04/20) /usr/share/moduleframework/tools/modulelint.py:DockerfileLinter.testNameInEnvAndLabelExists: PASS (1.61 s)
(05/20) /usr/share/moduleframework/tools/modulelint.py:DockerfileLinter.testReleaseLabelExists: PASS (1.60 s)
(06/20) /usr/share/moduleframework/tools/modulelint.py:DockerfileLinter.testVersionLabelExists: PASS (1.45 s)
(07/20) /usr/share/moduleframework/tools/modulelint.py:DockerfileLinter.testComRedHatComponentLabelExists: PASS (1.64 s)
(08/20) /usr/share/moduleframework/tools/modulelint.py:DockerfileLinter.testIok8sDescriptionExists: PASS (1.51 s)
(09/20) /usr/share/moduleframework/tools/modulelint.py:DockerfileLinter.testIoOpenshiftExposeServicesExists: PASS (1.50 s)
(10/20) /usr/share/moduleframework/tools/modulelint.py:DockerfileLinter.testIoOpenShiftTagsExists: PASS (1.53 s)
(11/20) /usr/share/moduleframework/tools/modulelint.py:DockerLint.testBasic: PASS (13.75 s)
(12/20) /usr/share/moduleframework/tools/modulelint.py:DockerLint.testContainerIsRunning: PASS (14.19 s)
(13/20) /usr/share/moduleframework/tools/modulelint.py:DockerLint.testLabels: PASS (1.57 s)
(14/20) /usr/share/moduleframework/tools/modulelint.py:ModuleLintPackagesCheck.test: PASS (14.03 s)
(15/20) generated.py:GeneratedTestsConfig.test_processrunning: PASS (13.77 s)
(16/20) generated.py:GeneratedTestsConfig.test_selfcheck: PASS (13.85 s)
(17/20) generated.py:GeneratedTestsConfig.test_selcheckError: PASS (14.32 s)
(18/20) sanity1.py:SanityCheck1.testSettingTestVariable: PASS (13.86 s)
(19/20) sanity1.py:SanityCheck1.testBinExistsInRootDir: PASS (13.81 s)
(20/20) sanity1.py:SanityCheck1.test3GccSkipped: ERROR (13.84 s)
RESULTS    : PASS 19 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME   : 144.85 s
JOB HTML   : /root/avocado/job-results/job-2017-06-14T16.25-9ba3a3f/html/results.html
Makefile:6: recipe for target 'all' failed
make[1]: *** [all] Error 1
Makefile:14: recipe for target 'test' failed
make: *** [test] Error 2
$

To execute tests from the tests/ directory, type:

# run Python tests from the tests/ directory
$ sudo MODULE=docker avocado run ./*.py

The result looks like:

$ sudo MODULE=docker avocado run ./*.py
[sudo] password for phracek:
JOB ID     : 2a171b762d8ab2c610a89862a88c015588823d29
JOB LOG    : /root/avocado/job-results/job-2017-06-14T16.43-2a171b7/job.log
(1/6) ./generated.py:GeneratedTestsConfig.test_processrunning: PASS (24.79 s)
(2/6) ./generated.py:GeneratedTestsConfig.test_selfcheck: PASS (18.18 s)
(3/6) ./generated.py:GeneratedTestsConfig.test_selcheckError: ERROR (24.16 s)
(4/6) ./sanity1.py:SanityCheck1.testSettingTestVariable: PASS (18.88 s)
(5/6) ./sanity1.py:SanityCheck1.testBinExistsInRootDir: PASS (17.87 s)
(6/6) ./sanity1.py:SanityCheck1.test3GccSkipped: ERROR (19.30 s)
RESULTS    : PASS 4 | ERROR 2 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME   : 124.19 s
JOB HTML   : /root/avocado/job-results/job-2017-06-14T16.43-2a171b7/html/results.html

by Petr Hracek at June 28, 2017 10:50 AM

xkcd.com

June 26, 2017

Fedora Magazine

Upcoming Fedora Atomic Host lifecycle changes

The Fedora Project ships new Fedora Server and Workstation releases at roughly six-month intervals. It then maintains each release for around thirteen months. So Fedora N is supported by the community until one month after the release of Fedora N+2. Since the first Fedora Atomic Host shipped, as part of Fedora 21, the project has maintained separate ostree repositories for both active Fedora releases. For instance, there are currently trees available for Fedora Atomic 25 and Fedora Atomic 24.

Fedora Atomic sets out to be a particularly fast-moving branch of Fedora. It provides releases every two weeks and updates to key Atomic Host components such as Docker and Kubernetes. The release moves more quickly than one might expect from the other releases of Fedora.

Due in part to this faster pace, the Fedora Atomic Working Group has always focused its testing and integration efforts most directly on the latest stable release. The group encourages users of the older release to rebase to the newer tree as soon as possible. Releases older than the current tree are supported only on a best effort basis. This means the ostree is updated, but there is no organized testing of older releases.

Upcoming changes

This will change with either the Fedora 26 to 27 or the 27 to 28 upgrade cycle (depending on readiness). The Fedora Atomic Working Group will then collapse Fedora Atomic into a single version. That release will track the latest stable Fedora branch. When a new stable version of Fedora is released, Fedora Atomic users will automatically shift to the new version when they install updates.

Traditional OS upgrades can be disruptive and error-prone. Due to the image-based technologies that Atomic Hosts use for system components (rpm-ostree) and for applications (Linux containers), upgrading an Atomic Host between major releases is like installing updates within a single release. In both scenarios, the system updates are applied by running an rpm-ostree command and rebooting. The release provides rollback to the previous state available in case something goes wrong. Applications running in containers are unaffected by the host upgrade or update.

If you’d like to get involved in the Fedora Atomic Working Group, come talk to us in IRC in #fedora-cloud or #atomic on Freenode, or join the Atomic WG on Pagure.

by jasonbrooks at June 26, 2017 08:00 AM

xkcd.com

June 23, 2017

Fedora Magazine

gThumb: View and manage your photos in Fedora

Fedora uses Eye of GNOME to display images, but it’s a very basic program. Out of the box, Fedora doesn’t have a great tool for managing photos. If you’re familiar with the Fedora Workstation’s desktop environment, GNOME, then you may be familiar with GNOME Photos. This is a young app available in GNOME Software that seeks to make managing photos a painless task. You may not know that there’s a more robust tool out there that packs more features and looks just as at home on Fedora. It’s called gThumb.

What is gThumb?

gThumb is hardly a new piece of software. The program has been around since 2001, though it looks very different now than it did back then. As GNOME has changed, so has gThumb. Today it’s the most feature-rich way of managing images using a GNOME 3 style interface.

While gThumb is an image viewer that you can use to replace Eye of GNOME, that’s only the beginning of what it can do. Thanks to the inclusion of features you would normally find in photo managers like digiKam or the now discontinued Picasa, I use it to view the pictures I capture with my DSLR camera.

How gThumb handles photos

At its core, gThumb is an image viewer. While it can organize your collection, its primary function is to display pictures in the folders they’re already in. It doesn’t move them around. I consider this a plus.

I download images from my camera using Rapid Photo Downloader, which organized and renames files precisely as I want them. All I want from a photo manager is the ability to easily view these images without much fuss.

That’s not to say that gThumb doesn’t offer any of the extra organizational tools you may expect from a photo manager. It comes with a few.

Labeling, grouping, and organizing

Determining your photo’s physical location on your hard drive is only one of many ways to keep up with your images. Once your collection grows, you may want to use tags. These are keywords that can help you mark and recall pictures of a certain type, such as birthdays, visits to the park, and sporting events. To remember details about a specific picture, you can leave a comment.

gThumb lets you save photos to one of three collections, indicated by three flags in the bottom right corner. These groups are color coordinated, with the options being green, red, and blue. It’s up to you to remember which collections correspond with what color.

Alternatively, you can let gThumb organize your images into catalogs. Catalogs can be based on the date images were taken, the date they were edited, or by tags.

It’s also an image editor

gThumb provides enough editing functions to meet most of my needs. It can crop photos, rotate them, and adjust aspects such as contrast, lightness, and saturation. It can also remove red-eye. I still fire up the GIMP whenever I need to do any serious editing, but gThumb is a much faster way of handing the basics.

gThumb is maintained by the GNOME Project, just like Eye of GNOME and GNOME Photos. Each offers a different degree of functionality. Before you walk away thinking that GNOME’s integrated photo viewers are all too basic, give gThumb a try. It has become my favorite photo manager for Linux.

by Bertel King at June 23, 2017 08:00 AM

xkcd.com

June 21, 2017

Fedora Magazine

Controlling Windows via Ansible

For many Linux systems engineers, Ansible has become a way of life. They use Ansible to orchestrate complex deployment processes, to define multiple systems with a quick and simple configuration management tool, or somewhere in between.

However, Microsoft Windows users have generally required a different set of tools to manage systems. They also often needed a different mindset on how to handle them.

Recently Ansible has improved this situation quite a bit. The Ansible 2.3 release included a bunch of new modules for this purpose. Ansible 2.3.1 is already available for Fedora 26.

At AnsibleFest London 2017, Matt Davis, Senior Principal Software Engineer at Ansible, will lead a session covering this topic in some detail. In this article we look at how to prepare Windows systems to enable this functionality along with a few things we can do with it.

Preparing the target systems

There’s a couple of prerequisites that are required to prepare a Windows system to allow ansible to connect. The connection type used for this is “winrm” which is the Windows Remote Management protocol.

When using this ansible executes powershell on the target system. This requires a minimal version of Powershell 3.0 although it’s recommended to install the most recent version of Windows Management Framework, which at the time of writing is 5.1 and includes Powershell 5.1 as part of it.

With that in place the WinRM service needs to be configured on the Windows system. The easiest way to do this is with the ansible powershell script.

By default commands, but not scripts, can be executed by the ExecutionPolicy. However when running the script via the powershell executable this can be bypassed.

Run powershell as an an administrative user and then:

powershell.exe  -ExecutionPolicy Bypass -File ConfigureRemotingForAnsible.ps1 -CertValidityDays 3650 -Verbose

After this the WinRM service will be listening and any user with administrative privileges will be able to authenticate and connect.

Although it’s possible to use CredSSP or Kerberos for delegated (single sign-on) the simplest method just makes use of username and password via NTLM authentication.

To configure the winrm connector itself there’s a few different variables but the bare minimum to make this work for any Windows system will need:

ansible_user: 'localAdminUser'
ansible_password: 'P455w0rd'
ansible_connection: 'winrm'
ansible_winrm_server_cert_validation: 'ignore'

The last line is important with the default self-signed certificates that Windows uses for WinRM, but can be removed if using verified certificates from a central CA for the systems.

So with that in place how flexible is it? How much can really be remotely controlled and configured?

Well step one on the controlling computer is to install ansible and the winrm libraries:

dnf -y install ansible python2-winrm

With that ready there’s a fair number of the core modules avaliable but the majority of tasks are from windows specific modules.

Remote windows updates

Using ansible to define your Windows systems updates allows them to be remotely checked and deployed, whether they come directly from Microsoft or from an internal Windows Server Update Service:

ansible -i mywindowssystem, -c winrm -e ansible_winrm_server_cert_validation=ignore -u administrator -k -m win_updates

mywindowssytem | SUCCESS => {
    "changed": true, 
    "failed_update_count": 0, 
    "found_update_count": 3, 
    "installed_update_count": 3, 
    "reboot_required": true, 
    "updates": {
        "488ad51b-afca-46b9-b0de-bdbb4f56672f": {
            "id": "488ad51b-afca-46b9-b0de-bdbb4f56672f", 
            "installed": true, 
            "kb": [
                "4022726"
            ], 
            "title": "2017-06 Security Monthly Quality Rollup for Windows 8.1 for x64-based Systems (KB4022726)"
        }, 
        "94e2e9ab-e2f7-4f8c-9ade-602a0511cc08": {
            "id": "94e2e9ab-e2f7-4f8c-9ade-602a0511cc08", 
            "installed": true, 
            "kb": [
                "4022730"
            ], 
            "title": "2017-06 Security Update for Adobe Flash Player for Windows 8.1 for x64-based Systems (KB4022730)"
        }, 
        "ade56166-6d55-45a5-9e31-0fac924e4bbe": {
            "id": "ade56166-6d55-45a5-9e31-0fac924e4bbe", 
            "installed": true, 
            "kb": [
                "890830"
            ], 
            "title": "Windows Malicious Software Removal Tool for Windows 8, 8.1, 10 and Windows Server 2012, 2012 R2, 2016 x64 Edition - June 2017 (KB890830)"
        }
    }
}

Rebooting automatically is also possible with a small playbook:

- hosts: windows
  tasks:
    - name: apply critical and security windows updates 
      win_updates:
        category_names: 
          - SecurityUpdates
          - CriticalUpdates
      register: wuout
    - name: reboot if required
      win_reboot:
      when: wuout.reboot_required

Package management

There’s two ways to handle package installs on windows using ansible.

The first is to use win_package which can install any msi or run an executable installer from a network share or uri. This is useful for more locked down internal networks with no internet connectivity or for applications not on Chocolatey. In order to avoid re-running an installer and keep any plays safe to run it’s important to lookup the product ID from the registry so that win_package can detect if it’s already installed.

The second is to use the briefly referenced Chocolatey. There is no setup required for this on the target system as the win_chocolatey module will automatically install the Chocolatey package manager if it’s not already present. To install the Java 8 Runtime Environment via Chocolatey it’s as simple as:

ansible -i mywindowssystem, -c winrm -e ansible_winrm_server_cert_validation=ignore -u administrator -k -m win_chocolatey -a "name=jre8"
mywindowssystem | SUCCESS => {
    "changed": true, 
    "rc": 0
}

And the rest…

The list is growing as ansible development continues so always check the documentation for the up-to-date set of windows modules supported. Of course it’s always possible to just execute raw powershell as well:

ansible -i mywindowssystem, -c winrm -e ansible_winrm_server_cert_validation=ignore -u administrator -k -m win_shell -a "Get-Process"
mywindowssystem | SUCCESS | rc=0 >>

Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName          
-------  ------    -----      -----     ------     --  -- -----------          
     28       4     2136       2740       0.00   2452   0 cmd                  
     40       5     1024       3032       0.00   2172   0 conhost              
    522      13     2264       5204       0.77    356   0 csrss                
     83       8     1724       3788       0.20    392   1 csrss                
    106       8     1936       5928       0.02   2516   0 dllhost              
     84       9     1412        528       0.02   1804   0 GoogleCrashHandler   
     77       7     1448        324       0.03   1968   0 GoogleCrashHandler64 
      0       0        0         24                 0   0 Idle                 
      

With the collection of modules already available and the help of utilities like Chocolatey it’s already possible to manage the vast majority of the Windows estate with ansible allowing many of the same techniques and best practices already embedded in the Linux culture to make the transition over the fence, even with more complex actions such as joining or creating an Active Directory domain.

ansible -i mywindowssystem, -c winrm -e ansible_winrm_server_cert_validation=ignore -u administrator -k -m win_say -a "msg='I love my ansible, and it loves me'"

by James Hogarth at June 21, 2017 08:00 AM

xkcd.com

June 20, 2017

Fedora Magazine

Run OpenShift Locally with Minishift

OpenShift Origin is a distribution of Kubernetes optimized for continuous application development and multi-tenant deployment. OpenShift adds developer and free operations-centric tools on top of Kubernetes. This helps small and large teams rapidly develop applications, scale and deploy easily, and maintain an app throughout a long-term lifecycle. Minishift helps you run OpenShift locally by running a single-node OpenShift cluster inside a VM. With Minishift, you can try out OpenShift or develop with it daily on your local host. Under the hood it uses libmachine for provisioning VMs, and OpenShift Origin for running the cluster.

Installing and Using Minishift

Prerequisites

Minishift requires a hypervisor to start the virtual machine on which the OpenShift cluster is provisioned. Make sure KVM is installed and enabled on your system before you start Minishift on Fedora.

First, install libvirt and qemu-kvm on your system.

sudo dnf install libvirt qemu-kvm

Then, add yourself to the libvirt group to avoid sudo.

sudo usermod -a -G libvirt <username>

Update your current session for the group change to take effect.

newgrp libvirt

Next, start and enable libvirtd and virlogd services.

systemctl start virtlogd
systemctl enable virtlogd systemctl start libvirtd systemctl enable libvirtd

Finally, install the docker-machine-kvm driver binary to provision a VM. Then make it executable. The instructions below are using version 0.7.0.

sudo curl -L https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.7.0/docker-machine-driver-kvm -o /usr/local/bin/docker-machine-driver-kvm
sudo chmod +x /usr/local/bin/docker-machine-driver-kvm

Installation

Download the archive for your operating system from the releases page and unpack it. At the time of this writing, the latest version is 1.1.0:

wget https://github.com/minishift/minishift/releases/download/v1.1.0/minishift-1.1.0-linux-amd64.tgz
tar -xvf minishift-1.1.0-linux-amd64.tgz

Copy the contents of the directory to your preferred location.

cp minishift ~/bin/minishift

If your personal ~/bin folder is not in your PATH environment variable already (use echo $PATH to check), add it:

export PATH=~/bin:$PATH

Get started

Run the following command. The output will look similar to below:

$ minishift start
Starting local OpenShift cluster using 'kvm' hypervisor...
...
OpenShift server started.
The server is accessible via web console at:
https://192.168.99.128:8443

You are logged in as:
User:     developer
Password: developer

To login to your Minishift installation as administrator:
oc login -u system:admin

This process performs the following steps:

  • Downloads the latest ISO image based on boot2docker (~40 MB)
  • Starts a VM using libmachine
  • Downloads OpenShift client binary (oc)
  • Caches both oc and the ISO image into your $HOME/.minishift/cache folder
  • Finally, provisions OpenShift single node cluster in your workstation

Now, use minishift oc-env to display the command to add the oc binary to your PATH. The output of oc-env differs depending on the operating system and shell.

$ minishift oc-env
export PATH="/home/john/.minishift/cache/oc/v1.5.0:$PATH"
# Run this command to configure your shell:
# eval $(minishift oc-env)

Deploying an application

OpenShift provides various sample applications, such as templates, builder applications, and quickstarts. The following steps deploy a sample Node.js application from the command line.

First, create a Node.js example app.

oc new-app https://github.com/openshift/nodejs-ex -l name=myapp

Then, track the build log until the app is built and deployed.

oc logs -f bc/nodejs-ex

Next, expose a route to the service.

oc expose svc/nodejs-ex

Now access the application.

minishift openshift service nodejs-ex -n myproject

To stop the service, use the following command:

minishift stop

Refer to the official documentation for getting started with a single node OpenShift cluster.

Feedback

We’d love to get your feedback. If you hit a problem, please raise an issue in the issue tracker. Please search through the listed issues, though, before creating a new one. It’s possible a similar issue is already open.

Community

The community hangs out on the IRC channel #minishift on Freenode (https://freenode.net). You’re welcome to join, participate in the discussions, and contribute.

Resources

by kumarpraveen at June 20, 2017 08:00 AM

June 19, 2017

xkcd.com

June 16, 2017

Fedora Magazine

Ben Hart: How Do You Fedora?

We recently interviewed Ben Hart on how he uses Fedora. This is part of a series on the Fedora Magazine. The series profiles Fedora users and how they use Fedora to get things done. Contact us on the feedback form to express your interest in becoming a interviewee.

Who is Ben Hart?

Ben Hart is an information technology professional with over 19 years of experience. His first experience with Linux was with Mandrake on an old Compaq laptop. “Admittedly I did not keep it long, due to how well it didn’t want to work for me and supporting a full Windows environment made things difficult.”

One of his childhood heroes is Charles Babbage, the inventor of the first mechanical computer. Now Ben works as a Linux Systems Administrator. “I am a Linux SysAdmin working for Montana Interactive and I help manage over 60 servers that host over 300 web applications in the best state in the lower 48, Montana.”

Hart started his career in Alabama as phone tech support. He then spent several years as a technician for computer and network systems in the area of Arkansas and Mississippi. His winding trail finally landed him in Montana. “I again got hideously lucky and scored a gig here in Montana. So in addition to another life change in moving across the country I also scored a career change: Windows admin to Linux Admin.”

Ben loves the state of Montana and enjoys the great outdoors. “Since moving to Montana I hike, exploring the wilderness before it’s all gone is my primary, off-duty passion. But I also wood-work, perform shade-tree mechanicin’, hunt, fish, and enjoy my livestock.”

Ben Hart Livestock

When I asked Ben for more information about his livestock he talked about having both chickens and ducks. He claimed that, despite yard fowl reportedly having the intelligence of a three year old, they make amazingly good pets. Hart said, “not only do they keep the bug and weed population down but they give you fertilizer and food!”  He continued, “plus my oldest daughter is special needs and absolutely loves them, ducks especially calm her and is another reason to get outdoors.”

Ben is very new to using Fedora, but has already gotten involved in the community. “As a primary OS I’ve only been using Fedora for about 3 months now.  I dual-booted for about two weeks before the switch and just recently deleted my windows partitions. He struggled to find a decent Google Drive client, but found that he could use SpiderOak instead. Ben made the switch to Fedora because he was frustrated by blue screens of death, poor security and he just wanted something new.

The Fedora Community

Late one night roughly three months ago, Hart was doing some research to resolve frequent blue screen issues on his Windows 10 laptop when he realized it was time to make the switch. “I support about a 80/20 Linux over Windows environment now. Why do I continue to put up with this?” That same night he made the decision to help out in the Fedora community whenever and wherever he could.

How busy people in the Fedora community were was one of the first things that struck Ben. “The more senior folks seem very busy, but always willing to help. They are also very, very knowledgeable.” He feels more people might make the switch to Fedora if they knew how dedicated and seriously people in the Fedora community take their jobs.

“Since I can’t code my way out of a wet paper sack, and hardware interests me I joined the Infra-Apprentice group.” Recently a couple of the SOPs he created were committed upstream. Hart hopes to become involved with the automation sides of things and pick up some Python programming skills as well.

What Hardware and Software?

All of the servers Ben supports at work run CentOS. Hart told me, “my laptop is a Dell XPS 15 9550 running F25. 16GB RAM, a 500GB NVME SSD and a WD15 Thunderbolt dock powering two 34-inch ASUS LCDs.” Additionally, he uses an Logitech MX510 mouse and a Razer BlackWidow Ultimate mechanical keyboard. The only issue he has is that at times Plasma has issues with the two external monitors attached via the dock.

Ben Hart Desktop

What Software?

“I use Fedora 25, Slack, Evolution, KeePass, Konversation, Chrome, Konsole, KVM and the SpiderOak client daily.” Typically Ben just stays in the terminal for making text or configuration edits unless dealing with a huge file.  For huge files he uses cat to move it over to Sublime.  For visualizing git repos he makes use of gitKraken.  “I lucked into a Konsole theme while checking out /r/unixporn called bullet-train.”  He says it is absolutely, amazingly useful. “It has prompt changes for git, Perl, Python, Ruby and a lot more.  Plus it’s visually appealing.” Ben makes use of cowsay and fortune. Hart also makes use of pianobar for a CLI interface to Pandora.

Hart expanded on his use of SpiderOak by telling me he uses it exactly the same way he used Google Drive, but with additional features. “They are just a cloud storage provider, but in addition a zero-knowledge provider.  Data is deduped, compressed and encrypted.” While he noted that uploading takes a while his opinion was that it was worth it. “I use SpiderOak to store pictures from my android phone, storing Powershell and Bash scripts that I write, and pretty much anything I don’t want to lose.  I use it’s locally cached folder as my Documents, Work Stuff, Projects, and Desktop folders all in one.”

by Charles Profitt at June 16, 2017 08:00 AM

xkcd.com

June 15, 2017

Fedora Magazine

PSA: Errors after updating libdb

This is an important public service announcement for Fedora 24, 25 and 26 (pre-release) users, courtesy of the Fedora QA team.

The short version

If you recently updated and got some kind of error or crash, and now you’re getting RPM database errors, try this command to fix it (you can use sudo for root privileges):

sudo rpm --rebuilddb

If that’s not enough, try:

sudo rm -f /var/lib/rpm/__db*
sudo rpm --rebuilddb

Now all should be well again. We do apologize for this. Note that if you’re unlucky and have the updates-testing repository enabled, there’s a chance you may run into issues with more than one update: the same recovery steps should work each time.

The longer version

There’s a rather subtle and tricky bug in libdb (the database that RPM uses) which has been causing problems with upgrades from Fedora 24/25 to Fedora 26. The developers have made a few attempts to fix this, and testing this week had indicated that the most recent attempt — libdb-5.3.28-21 — was working well. We believed the fix needed to be applied both on the ‘from’ and the ‘to’ end of any affected transaction, so we went ahead and sent the -21 update out to Fedora 24, 25 and 26.

Unfortunately it turns out that updating to -21 along with other packages can possibly result in a crash at the very end of the process, which in turn causes a (as it happens, minor and fully recoverable) problem in the RPM database.

We initially sent a -22 update to updates-testing which reverts the changes from -21, but then found out that updating from -21 to -22 causes a similar result. At that point we decided it was probably best just to cut our losses, stick with -21, and document the issues for anyone who encountered them, and we have removed the -22 update from updates-testing again. There will be a -23 build soon which restores the fixes from -21 and adds another upgrade-related fix.

So if you’re affected by RPM database issues with any libdb update, just doing the old “rebuild the RPM database” trick will resolve the problem:

sudo rm -f /var/lib/rpm/__db*
sudo rpm --rebuilddb

And if you did wind up in -22, you may want to go back to -21. To do this, run the following command:

sudo dnf --refresh distro-sync

Note that you may need to do the rebuilddb step after downgrading from -22 to -21, or after upgrading from -22 to -23 when -23 arrives.

It’s unfortunate that we have to break that one out of cold storage, but it should at least get you back up and working for now. We do apologize sincerely for this mess, and we’ll try and do all we can to fix it up ASAP.

by Adam Williamson at June 15, 2017 11:48 PM

Fedora 26 Atomic/Cloud Test Day June 20th

Now that the Fedora Beta has been officially released the Fedora Atomic Working Group and Fedora Cloud SIG would like to get the community together next week to find and squash some bugs. We are organizing a test day for Tuesday, June 20th.

For this event we’ll test both Atomic Host content and Fedora Cloud Base content. Vagrant Boxes will be available to test with as well. See the Fedora Atomic Host Pre-Release Page for links to artifacts for Fedora Atomic Host and the Alternative Downloads Beta Page for links for the Beta Cloud Base Images. We have qcow, AMI, and ISO images ready for testing.

How do test days work?

A test day is an event where anyone can help make sure that changes in Fedora are working well in the upcoming release. Fedora community members often participate, but the public is welcome also. You only need to be able to download materials (including some large files), and read and follow technical directions step by step, to contribute.

The wiki page for the Atomic/Cloud test day has a lot of good information on what and how to test. After you’ve done some testing, you can log your results in the test day app. If you’re available on or around the day of the event, please do some testing and report your results.

Happy testing, and we hope to see you on test day.

by Dusty Mabe at June 15, 2017 01:45 PM

June 14, 2017

Fedora Magazine

Quick tip: calculator in the Fedora Workstation overview

Most Fedora users are probably aware that Fedora Workstation ships with a basic calculator application. This small app has pretty much always been a part of the Fedora desktop. However, did you know that the Calculator app in Fedora Workstation also has a built-in search provider allowing you to perform quick calculations directly in the overview? Great for quick, on-off calculations without having to launch a separate app.

Using the Overview calculator

To use the Search provider of the Calculator app, first open the overview by either clicking Activities in the top left of your desktop or pressing the Meta key on your keyboard. Type the calculation you wish to perform in the search box, and the results will appear:

Additionally, the predefined functions in the app can be used in the Overview as well. This allows more complex calculations using functions like Square Root (sqrt), Sine (sin), Cosine (cos),  Tangent (tan), Natural Logarithm (ln), and Logarithm (log):

Enabling or Disabling the search provider

If the calculator results aren’t showing in the overview, it is likely that the search provider is disabled. Enabling or disabling the search provider is in the Search settings section in the main settings for Fedora Workstation:

 

by Ryan Lerch at June 14, 2017 10:03 AM

xkcd.com

June 13, 2017

Fedora Magazine

Announcing the Release of Fedora 26 Beta

The Fedora Project is pleased to announce the immediate availability of Fedora 26 Beta, the next big step on our journey to the exciting Fedora 26 release in July.
Download the prerelease from our Get Fedora site:

Or, check out one of our popular variants, including KDE Plasma, Xfce, and other desktop environments, as well as images for ARM devices like the Raspberry Pi 2 and 3:

Looking for Fedora Cloud Base? This is replaced by Atomic as a Fedora Edition for the container use case, but we still produce it for those of you who want to build up your own cloud-computing environment in a more traditional way — see Alternative Downloads below.

Fedora’s journey is not simply about updating one operating system with the latest and greatest packages. It’s also about innovation for the many different platforms represented in the Fedora Project: Workstation, Server, Atomic, and the various Spins. Coordinating the efforts across the many working groups is no small task, and serves as a testament to the talent and professionalism found within the Fedora community.

As we move into this Beta phase of the Fedora 26 release cycle, what can users expect?

Fedora-Wide Changes

Fedora, always in the path of innovation, will ship with the latest version of the GNU Compiler Collection, also known as GCC, bringing the latest language features and optimizations to users and to the software we build. Also the Go Language is updated to the latest version, 1.8, which includes 32-bits MIPS support and speed
improvements.

One of the most important changes is the addition of “blivet-gui” to the installer. This provides a “building-blocks” style partitioning GUI for sysadmins and enthusiast users who are familiar with the details of storage systems.

More traditional partitioning interface able to handle complex configurations

Also, we’ve made and included many improvements in security, improving user experience and reducing the risks of the digital life.

 

Fedora Editions

The Workstation edition of Fedora 26 Beta features GNOME 3.24, which includes important changes like Night Light, which changes the color temperature of the display based on time of day. It also includes the latest update of LibreOffice.

Updated Fedora Media Writer able to search and downloads Spins directly

Our Atomic Host Edition also has many improvements, including more options to run  containers, the latest version of the docker container platform, the cockpit manager and the atomic CLI, improving the way containers are managed, making being a sysadmin easier.

Spins and Labs

The Fedora Project is proud to announce two new versions: The LXQt Spin, a lightweight desktop supporting the latest version of the Qt libraries; and the Python Classroom Lab, a new version focused in the teaching and learning of the Python programming language. And, in the Cinnamon Spin, the desktop is updated to the latest version.

Alternative Architectures and Other Downloads

We are also simultaneously releasing 64-bit F26 Beta for ARM (AArch64), Power (both little and big endian) and s390x architectures. You’ll also find minimal network installers and the Fedora 26 Beta Cloud Base image here:

What is the Beta Release?

A Beta release is code-complete and bears a very strong resemblance to the third and final release. The final release of Fedora 26 is expected in July. If you take the time to download and try out the Beta, you can check and make sure the things that are important to you are working. Every bug you find and report doesn’t just help you, it improves the experience of millions of Fedora users worldwide! Together, we can make Fedora rock-solid. We have a culture of coordinating new features and pushing fixes upstream as much as we can, and your feedback improves not only Fedora, but Linux and Free software as a whole.

Issues and Details

Since this is a Beta release, we expect that you may encounter bugs or missing features. To report issues encountered during testing, contact the Fedora QA team via the mailing list or in #fedora-qa on Freenode. As testing progresses, common issues are tracked on the Common F26 Bugs page.

For tips on reporting a bug effectively, read how to file a bug report.

More information

For more detailed information about what’s new on Fedora 26 Beta Release, you can consult our Talking Points and the F26 Change Set. They contain more technical information about the new packages and improvements shipped with this release.

by Eduard Lucena at June 13, 2017 02:00 PM

June 12, 2017

xkcd.com

June 09, 2017

Fedora Magazine

Alternate Tab GNOME shell extension

GNOME, the Fedora Workstation default environment, has a well known Alt+Tab feature to switch apps. This control groups windows for a single app together. For example, multiple terminal windows appear as a single terminal app. The Alt+` (backtick or backquote) shortcut switches between those windows in a single app. But a helpful GNOME extension, Alternate Tab, changes this behavior.

GNOME supports a Classic mode of operation. This mode allows GNOME version 3 to behave similarly to the previous version 2. The Classic mode groups a number of extensions together to achieve this goal. These extensions include the Alternate Tab extension.

The extension switches behavior of the Alt+Tab display. With this extension, each window appears separately. Some users find navigation easier with this behavior in place.

Installing the Alternate Tab extension

Fedora Workstation includes the Classic mode by default. That includes the Alternate Tab extension. If you have a different edition installed, you can still install this extension. There are many ways to enable the extension afterward. One way is to use the GNOME Tweak Tool. Use the Software app, or use sudo along with the dnf command, to install these packages if you don’t have them already:

sudo dnf install gnome-shell-extension-alternate-tab gnome-tweak-tool

Open the Tweak Tool from the GNOME Shell overview and go to the Extensions tab. Find AlternateTab and enable it using the On/Off switch:

Alternate Tab extension in GNOME Tweak Tool

Once you follow this process, you can use the new Alt+Tab behavior. Notice how in this example, each terminal has its own entry in the selector control.

 

by Paul W. Frields at June 09, 2017 08:00 AM

xkcd.com

June 08, 2017

Fedora Magazine

Flock submissions close soon

Flock is the annual conference where Fedora contributors meet up in person to collaborate and plan for future Fedora development. This year, Flock is in Cape Cod, Massachusetts, USA from the 29th of August to the 1st of September. If you are a Fedora contributor planning to submit a proposal for a talk or workshop, the submission window closes in a few days on June 15th 2017.

Máirín Duffy has an awesome post  over on the Fedora Community Blog outlining the focus of Flock this year, as well as some great tips on making a great proposal for Flock 2017.

by Ryan Lerch at June 08, 2017 11:27 PM

June 07, 2017

Fedora Magazine

How to verify a Fedora ISO file

After downloading a fresh version of a Fedora ISO, it is a good habit to get in to to verify the downloaded file. The benefits of verification are two-fold: integrity and security. Verification of your ISO confirms if the file you have downloaded was not corrupted during the Download process. Additionally, it also provides a check to help ensure that the ISO you have downloaded is in fact an ISO that the Fedora Project has published.

Verify with Fedora Media Writer

If you use Fedora Media Writer to download your fresh Fedora media, the verification process is super-simple. Fedora Media Writer automatically verifies your download using the appropriate SHA256 hash and MD5 checksum for the image. More details on this automatic verification is available in the Cryptography README in the Fedora Media Writer repository.

Screenshot of a Fedora Workstation ISO downloading in Fedora Media Writer

 

Verify an ISO manually

Verifying an ISO not obtained using Fedora Media Writer is a little more complicated. It requires you to download a CHECKSUM file for the specific ISO you have, and run a handful of commands in the terminal.

1. Get the CHECKSUM for your ISO

When you download a Fedora ISO from getfedora.org, there is a button in the splash page with a link to the CHECKSUM file. Download this file and save it in the same directory as the ISO image itself. However, if you previously downloaded an ISO, or got it from another source like a torrent, the verify page lists all the current CHECKSUMs.

2. Get the Fedora GPG keys & verify your CHECKSUM

The next step is to check the CHECKSUM file itself. To do this, first download the Fedora GPG public keys, and import them using the gpg utility:

curl https://getfedora.org/static/fedora.gpg | gpg --import

Next, use the gpg utility to verify the CHECKSUM file, for example:

gpg --verify-files Fedora-Workstation-25-1.3-x86_64-CHECKSUM

If your CHECKSUM checks out, you will see a line like this in the output:

gpg: Good signature from "Fedora 25 Primary (25) <[email protected]>"

3. Verify the ISO

Now we are sure the CHECKSUM file itself is valid, use it to validate and check the ISO downloaded, for example:

sha256sum -c Fedora-Workstation-25-1.3-x86_64-CHECKSUM

A line similar to the following line is presented if the ISO that you downloaded is valid. (in this example, the ISO is Fedora-Workstation-Live-x86_64-25-1.3.iso):

Fedora-Workstation-Live-x86_64-25-1.3.iso: OK

by Ryan Lerch at June 07, 2017 08:00 AM

xkcd.com

June 05, 2017

Fedora Magazine

Must-have GNOME extension: gTile

Tiling window managers have always interested me, but spending a lot of time tinkering with config files or learning how to wrangle them? Not so much. What I really want is a dead simple way to organize my windows and still use a friendly desktop. And I found it, finally: the gTile extension for GNOME.

If you are using GNOME, pop open Firefox and head to the extension page. Click “on” and go ahead and install the extension.

gTile Overlay

gTile Overlay

Once it’s installed, you can click the tile icon in the GNOME menu up top. You’ll see a little overlay with a bunch of squares. The gTile overlay will hover over an open window, and you can click one (or more) of the squares to place the window in that area.

The row of icons that display dimensions (e.g. “2×2”, “4×4”) controls how the screen is tiled.  If you just want to divvy up your screen in sixteen equal chunks, choose 4×4. If you have a lot of screen real estate and want many more windows, choose the 6×6. (I’m using gTile with a 4K monitor, and go with 3×2 for six windows.)

The really nice thing about gTile is you’re not locked into tiling. New windows aren’t automatically put on the grid, and existing windows aren’t “locked” so you can have the best of both worlds.

gTile works well with multiple workspaces, and with multiple monitors.

If you’re a GNOME user and want a lightweight solution for tiling windows, give gTile a try. It’s been a great tool for me, and maybe it’ll make you more productive as well.

by Joe Brockmeier at June 05, 2017 08:00 AM

xkcd.com

June 02, 2017

Fedora Magazine

Riley Brandt: How do you Fedora?

We recently interviewed Riley Brandt on how he uses Fedora. This is part of a series on the Fedora Magazine. The series profiles Fedora users and how they use Fedora to get things done. Contact us on the feedback form to express your interest in becoming a interviewee.

Who is Riley Brandt?

Riley Brandt uses a Mac running OS X and Adobe for work at a university in western Canada. “The job can be really amazing at times. I’ve watched a doctor perform brain surgery using a robotic arm, been in a lab used for quantum teleportation, met Olympic athletes, and taken photos from a helicopter.” However, for his personal photography work he uses Fedora and FOSS software to process and organize his photographs.

Riley Brandt Photographer

Brandt tried Linux for the first time in 2007. At that time he dual booted Windows and Ubuntu 7.04. He switched to Linux full time with the release of Ubuntu 7.10. Riley switched to Fedora, though, with version 21. “I was a big fan of the GNOME desktop, and I was tired of Ubuntu GNOME always being a version behind.”

His childhood heroes were filmmakers like John Carpenter and John Hughes. When asked for his favorite movies, Riley was hard pressed to name just two. “I love movies, so I don’t really have a favorite. But a couple that I loved growing up were Ferris Bueller’s Day Off and Big Trouble in Little China.”

Riley counts taekwondo and pixel art as hobbies. “I have been practicing taekwondo for the last year. It’s super challenging, but really rewarding.” His interest in pixel art was inspired by video games. “I think there is a lot of beautiful art work in video games and want to try and create some of my own.”

The Fedora community

By the time Brandt was running Fedora 22, he was giving back to the community by submitting bug reports, answering forum questions and writing articles. Riley also has a fantastic series of tutorials on Youtube that cover GIMP, Darktable and general photography workflow in Fedora.

Riley Brandt Photographer

Brandt was initially worried that he would have a more difficult time getting help when he was making the transition from Ubuntu to Fedora. “I was worried that since Fedora has a smaller user base than Ubuntu, I would have trouble getting support. But that wasn’t the case at all. Fedora users were quick to respond to my questions and full of useful info.”

His experience with the Fedora community helped him realize it should not just be the desktop environment or package manager that influences the decision on what distro to use. “Not enough people think about the community. Fedora’s community might be its biggest selling point.”

Riley thinks it’s awesome to see maintainers make changes to Fedora that reflect feedback from the community. “After I made a YouTube video about Fedora for photographers, Luya Tshimbalanga, a Fedora Design Suite maintainer, added extra GIMP plugins to the default install.”

As a content creator Brandt would like to see more applications provide packages for Fedora. “I would like to convince developers of creative applications like Photomatix HDR, Aesprite, and the Blackmagic DaVinci Resolve video editor to provide packages for Fedora, not just for Ubuntu.”

What hardware and software?

Brandt has a desktop computer equipped with an Intel Core i7 processor, 16GB of RAM and an AMD RX 470 video card. His laptop is the Dell XPS 13. Both run Fedora 25 Design Suite. If you are interested you can find Riley’s complete photography workflow in his 2015 blog post here.

The key photography apps are Geeqie, Rapid Photo Downloader, Darktable and GIMP. For recording his video tutorials he uses SimpleScreenRecorder and Kdenlive. “For an image viewer, I am just looking for something simple, fast and color managed. The image viewer just needs to be able to open all major photo formats quickly, so I can review my exported images. Geeqie does all that wonderfully.” Riley does not use Shotwell or Eye of GNOME because he requires color management.

Riley Brandt Desktop

by Charles Profitt at June 02, 2017 08:00 AM

xkcd.com

May 31, 2017

Fedora Magazine

EasyTAG: Organize your music on Fedora

Audio files in formats such as MP3, AAC, and Ogg Vorbis have made music ubiquitous and portable. With the explosive growth of storage capacity, you can store huge libraries of music. But how do you keep all that music organized? Just tag your music. Then you can access it easily locally and in the cloud. EasyTAG is a great choice for tagging music and is available in Fedora.

Many audio file types support tagging, including:

  • MP4, MP3, MP2
  • Ogg Speex, Ogg Vorbis, Ogg Opus
  • FLAC
  • MusePack
  • Monkey Audio

Installing EasyTAG

EasyTAG is easy to install from Fedora repositories. On Fedora Workstation, use the Software tool to find and install it. Or in a terminal, use the sudo command along with dnf:

sudo dnf install easytag

Then launch the program from the Software tool or the application menu for your desktop. EasyTAG’s straightforward interface works well in most desktop environments.

EasyTAG main screen

Tagging music

Select a folder where you have music you want to tag. By default, EasyTAG will also load subfolders. You can select each file and add tag information such as the artist, title, year, and so on. You can also add images to a file in JPG or PNG format, which most players understand.

Files you have altered appear in bold in the file listing. To save each, press Ctrl+S. You can also select the entire list and use Ctrl+Shift+S to save all the files at once.

One of the most powerful features of EasyTAG is the file scanner. The scanner recognizes patterns based on a template you provide. Once you provide the right template and scan files, EasyTAG automatically tags all of them for you. Then you can save them in bulk. This saves a lot of time and frustration when dealing with large libraries.

When you upload your tagged files to a cloud service, your tags allow you to quickly find and play the music you want anytime. Happy tagging!

by Paul W. Frields at May 31, 2017 08:00 AM

xkcd.com

May 29, 2017

Fedora Magazine

Flock 2017 registration and submissions open

Planning is heavily underway for the annual Fedora contributors conference, Flock 2017. The conference is in Cape Cod, Massachusetts USA from August 29 – September 1, 2017. If you’re a contributor, or want to become one, here are some ways you can get involved.

Flock registration

First, registration is now open on the website. The registration this year includes a small fee to offset swag and setup costs per attendee. The fee for USA attendees is $25.

This fee has been scaled via the Big Mac Index to other countries and geographic areas. This means the fee in each country should roughly be the same level of spending, rather than the exact equivalent in local currency. That makes it easier for people in each area to register.

When you register you also have the option to cover other people’s fees. This means anyone can contribute to make it easier for someone else to attend.

Submissions: Talks and workshops

Second, the call for submissions for talks and workshops is also open. However, before submitting, take heed. This year’s conference is highly focused on getting things done! So instead of “state of the project” talks, submissions are encouraged to focus on building skills and participation. Here are some examples of better submission topics:

  • Setting up and using Fedora Atomic Host
  • Gathering user feedback on a Fedora web app
  • Writing package tests in dist-git using Ansible

You can submit your talk or workshop on the same Flock registration site until June 15, 2017

Other resources

There is also a mailing list for communicating with other attendees, as well as a Freenode IRC channel. The website also lists several hints for transportation to the event venue.

We encourage you to get your registration and submission in as soon as you can — the conference will fill up quickly!

 

by Paul W. Frields at May 29, 2017 02:24 PM

xkcd.com

May 26, 2017

Fedora Magazine

Secure your webserver with improved Certbot

A year and a half ago the Let’s Encrypt project entered public beta. Just over a year ago, as the project left beta, the letsencrypt client was spun out of ISRG, which continues to maintain the Let’s Encrypt servers, into an EFF project and renamed certbot. The mission remained the same, however: to provide quick, simple access to free domain validated certificates, in order to encrypt the internet.

This week marked a significant point in the development of Certbot as the recommended Let’s Encrypt client, with the 0.14 release of the tool.

When the letsencrypt client was first released it only supported using the webroot of an existing HTTP server. This is a standalone mode where letsencrypt listens temporarily on port 80 to carry out the challenge, or a manual method where the admin puts the challenge presented into place before the ACME server proceeded to verify it. Now the letsencrypt client is even more functional.

Apache HTTPD plugin for Certbot

When the client was changed to be an EFF project, one of the first major features that appeared was the Apache HTTPD plugin. This plugin lets the Certbot application automatically configure the webserver to use certificates for one or more VirtualServer installations.

NOTE: If you encounter an issue with SELinux in enforcing mode while using the plugin, use the setenforce 0 command to switch to permissive mode when running the certbot –apache command. Afterward, switch back to enforcing mode using setenforce 1. This issue will be resolved in a future update.

When you start the Apache httpd server with mod_ssl, the service automatically generates a self signed certificate.

self signed certificate

Default mod_ssl self signed certificate not trusted by the browser.

Next, run this command:

certbot --apache

Certbot prompts for a few questions. You can also run it non-interactively and provide all the arguments in advance.

Questions at the terminal

After a few moments, the Apache server has a valid certificate in place.

Valid SSL certificate in place

Nginx plugin for Certbot

The nginx plugin requires the domain name in the configuration from my testing, whereas the httpd plugin modifies the default SSL virtualhost.

The process is similar to the httpd plugin. Answer a few questions, if you do not provide arguments on the command line, and the instance is then protected with a valid SSL certificate.

Python 3 compatibility

The Certbot developers have put a significant amount of work over the past several months to make Certbot fully compatible with Python 3. At the 0.12 release, the unit tests we carried out when building the RPMs passed. However, the developers were not yet happy to declare it ready, since they noticed some edge case failures on real world testing. As of the 0.14 release, developers have declared Certbot Python 3 compatible. This change brings it inline with the default, preferred Python version in Fedora.

To minimize possible issues, Rawhide and the upcoming Fedora 26 will be switched over to using certbot-3 first, whilst Fedora 25 remains using certbot-2 as the default.

Getting hooked on renewals

A recent update added a systemd timer to automate renewals of the certificates.The timer checks each day to see if any certificates need updating. To enable it, use this command:

systemctl enable --now certbot-renew.timer

The configuration in /etc/sysconfig/certbot can change the behavior of the renewals. It includes options for hooks that run before and after the renewal, and another hook that runs for each certificate processed. These are global behaviors. Optionally, you can configure hooks in the configuration files in /etc/letsencrypt/renewal on a per-certificate basis.

Some form of automation is advised, whether the systemd timer or another method, to ensure that certificates are refreshed periodically and don’t expire by accident.

Testing SSL security

A test of SSL security with CentOS7 and the Apache plugin provided a C rating. The nginx plugin resulted in a B rating.

Of course the Red Hat defaults lean towards compatibility in mind. If there’s no need to support older clients then you can tighten up the list of permitted ciphers.

Using this configuration on Fedora 25 on my own blog gets an A+ rating:

SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite "EECDH+aRSA+AESGCM EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA !aNULL !eNULL !LOW !MEDIUM !SEED !3DES !CAMELLIA !MD5 !EXP !PSK !SRP !DSS !RC4"
SSLCertificateFile /etc/pki/tls/certs/www-hogarthuk.com-ssl-bundle.crt
SSLCertificateKeyFile /etc/pki/tls/private/www-hogarthuk.com-decrypted.key

<IfModule mod_headers.c>
      Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
</IfModule>

What’s next?

There are always bugs to fix and improvements to make. Apart from improvements to SELinux compatibility as mentioned above, there’s also a future to look forward to. DNS based validation will make it easier to take Certbot beyond web servers. Mail, jabber, load balancers and other services can then more easily use Let’s Encrypt certificates using the Certbot client.

by James Hogarth at May 26, 2017 08:00 AM

xkcd.com

May 24, 2017

xkcd.com

May 23, 2017

Fedora Magazine

Improved high DPI display support in the pipeline

Support for high DPI monitors has been included in Fedora Workstation for some time now. If you use a monitor with a high enough DPI, Fedora Workstation automatically scales all the elements of the Desktop to a 2:1 ratio, and everything would display crisply and not too small.  However, there are a couple of caveats with the current support. The scaling can currently only be either 1:1 or 2:1, there is no way to have fractional ratios. Additionally, the DPI scaling applies to all displays attached to your machine. So if you have a laptop with a high DPI and an external monitor with lower DPI, the scaling can get a little odd. Depending on your setup, one of the displays will render either super-small, or super-large.

A mockup of how running the same scaling ratio on a low DPI and high DPI monitor might look. The monitor on the right is a 24inch desktop monitor with over sized window decorations.

A mockup of how running the same scaling ratio on a low DPI and high DPI monitor might look. The monitor on the right is a 24inch desktop monitor with over sized window decorations.

Both of these limitations have technical reasons; such as how to deal with fractions of pixels when scaling by something other than 2. However, in a recent blogpost, developer Matthias Clasen talks about how the technical issues in the underlying system have been addressed. To introduce mixed-DPI settings, the upstream developers have per-monitor framebuffers, updated the monitor configuration API, and added support for mixed DPIs to the Display Panel. Work is also underway upstream to tackle the fractional scaling issue. For further techincal details, be sure to read the post by Matthias. All this awesome work by the upstream developers means that in a Fedora release in the not to distant future, high DPI support will be much much better.

by Ryan Lerch at May 23, 2017 05:27 AM

May 22, 2017

Fedora Magazine

How to make a Fedora USB stick

The Fedora Media Writer application is the quickest and easiest way to create a Fedora USB stick. If you want to install or try out Fedora Workstation, you can use Fedora Media Writer to copy the Live image onto a thumbdrive. Alternatively, Fedora Media Writer will also copy larger (non-“Live”) installation images onto a USB thumb drive. Fedora Media Writer is also able to download the images before writing them.

Install Fedora Media Writer

Fedora Media Writer is available for Linux, Mac OS, and Windows. To install it on Fedora, find it in the Software application.

Screenshot of Fedora Media Writer in GNOME Software

Alternatively, use the following command to install it from a terminal:

sudo dnf install mediawriter

Links to the installers for Mac OS and Windows versions of the Fedora Media Writer are available from the Downloads page on getfedora.org

Creating a Fedora USB

After launching Fedora Media Writer, you will be greeted with a list of the Fedora editions available to download and copy to your USB drive. The two main options here are Fedora Workstation and Fedora Server. Alternatively, you can click the icon at the bottom of the list to display all the additional Spins and Labs that the Fedora community provides. These include the KDE Spin, the Cinnamon Spin, the XFCE spin, the Security lab, and the Fedora Design Suite.

Screenshot of the Fedora Media Writer main screen, showing all the Fedora Editions, Labs and Spins

Click on the Fedora edition, Spin or Lab you want to download and copy to your new USB. A description of the software will be presented to you:

Screenshot of the Fedora Workstation details page in Fedora Media Writer

Click the Create Live USB button in the top right to start the download of your new Fedora image. While the image is downloading, insert your USB drive into your computer, and choose that drive in the dropdown. Note that if you have previously downloaded a Fedora image with the Media Writer, it will not download it again; it will simply use the version you have already downloaded.

Screenshot of a Fedora Workstation ISO downloading in Fedora Media Writer

After the download is complete, double check you are writing to the correct USB drive, and click the red Write to Disk button.

Screenshot of writing Fedora Workstation to a Fedora USB in Fedora Media Writer

 

Already have an ISO downloaded?

But what if you have previously an ISO through your web browser?. Media Writer also has an option to copy any ISO already on your filesystem to a USB. Simply choose the Custom Image option from the main screen of Fedora Media Writer, then pick the ISO from the file browser, and choose Write to Disk.

by Ryan Lerch at May 22, 2017 11:57 AM

xkcd.com

May 19, 2017

Fedora Magazine

Sumantro Mukherjee: How Do You Fedora?

We recently interviewed Sumantro Mukherjee on how he uses Fedora. This is part of a series on the Fedora Magazine. The series profiles Fedora users and how they use Fedora to get things done. Contact us on the feedback form to express your interest in becoming a interviewee.

Who is Sumantro Mukherjee?

Sumantro Mukherjee started using Linux in his freshman year. His interest in web development exposed him to open standards which ignited a desire to use an open source operating system. He learned about Fedora from a post on ‘Digit’ about Fedora 13. He enjoys listening to music, traveling and collecting currencies of different countries. Mukherjee was involved with open source before using Linux. Sumantro contributed to Firefox OS, Mozilla and Wikipedia.

Biryani, a mixed rice dish, is Mukherjee’s favorite food. Interstellar and Inception are Sumantro’s favorite movies. “My favorite parts of of the movie is the docking scene.” Sumantro continued, “space exploration and science fiction are some things which I love reading and watching about.” He enjoys movies that promote how humans can achieve what seems impossible with patience and effort. “Interstellar portrays how people humans can do anything which might seem impossible at first but with patience and effort , everything is possible!”

The Fedora Community

Sumantro found the Fedora community open and receptive to new contributors. “The very first impression was warm and welcoming. Adamw, Kamil, Petr Schindl and Sudhir helped me a lot in getting started.” Mukherjee would like to see improvement in the onboarding process for new contributors. “The Project invites users and contributors from designers to documentation and coders to testers.” Every Fedora user has something good to contribute to Fedora. Making it easier for potential contributors to find an area to contribute in important. On March 2016 Sumantro joined Red Hat as an intern for Fedora Quality Assurance. “Adam Williamson and I started running onboarding calls for Fedora QA which was another essential part to welcome the new contributors and help them understand the testing process.”

Getting started guides:

Mukherjee is passionate about getting new contributors invovled in the Fedora project. “There is no harm in breaking things while learning and know that the community will help you if you ask the right question and follow the open source etiquette.” His recommendation to new contributors is to “Be vocal , be bold and ask as many times as you want.”

What Hardware and Software?

Sumantro prefers Lenovo T460s and X220s. His T460 is a beast. It has 20GiB of ram, an Intel Skylake i7 and handles his virtual machines with ease. Despite having a laptop he prefers a big screen and uses a Dell monitor. Makherjee also loves to boot Fedora on ARM processors. “I currently use a Raspberry Pi 3 and a Samsung Artik to test Fedora ARM.”

Sumantro Applications

His desktop environment is Gnome with Wayland. Sumantro uses Sublime for web development, and Vim for shell scripts and Python. Mukeherjee’s terminal of choice is Terminator. For version control he uses Git, Github and Arcanist. “Arcanist is a wrapper script that sits on top of other tools (e.g., Differential, linters, unit test frameworks, Git, Mercurial, and SVN) and provides pretty good command-line access to manage code review and perform some related revision control operations.”

by Charles Profitt at May 19, 2017 09:30 AM

xkcd.com

May 18, 2017

Fedora黑

May 17, 2017

Fedora Magazine

NetworkManager changes and improvements

NetworkManager is the default service in Fedora for interfacing with the low level networking in the Kernel. It was created to provide a high-level interface for initializing and configuring networking on a system without shell scripts. Over the past few Fedora releases, the NetworkManager developers have put in a lot of effort to make it even better. This article covers some of the major improvements that have been implemented in NetworkManager over the past few Fedora releases.

A brief history

The past few Fedora releases have highlighted the incredible amount of effort there has been in developing NetworkManager. Unfortunately NetworkManager has the legacy of Red Hat Enterprise Linux 6 (NM 0.8.1) in the minds of many people. The version in Red Hat Enterprise Linux 6 was pretty much only capable of handling a WiFi network and in all other scenarios had to be disabled and/or removed (the latter often being preferable).

Similar to how services used to be started and stopped by a series of shell scripts, network configuration in Fedora also used to be handled via several different shell scripts. These still exist as the “legacy network service” but they are fragile and have no concept of state. Anyone who has carried out changes to bonding or bridging knows the pain of carefully manually unpicking the present configuration with ifenslave, brctl or more recently ip and then hoping all the ifcfg-* files are correct. Or just bite the bullet and carry out that reboot.

Just as initially upstart and later systemd marked the end of running a series of shell script to configure a service with no concept of state, so NetworkManager marks the end of running a similar series of shell scripts to configure the network.

The Red Hat Enterprise Linux releases don’t line up precisely but this should give an idea of the accelerated development over time, especially when compared to the NEWS file in the source repository.

Fedora Release RHEL Release NetworkManager Version
12 0.7.996
13 6.X 0.8.1
14 0.8.1
15 0.8.999
16 0.9.1.90
17 0.9.4
18 0.9.7
19 0.9.8.2
20 7.0 0.9.9.0
21 0.9.10.0
22 7.1 1.0.2
23 7.2 1.0.6
24 1.2.2
25 7.3 1.4.2
26 1.8.0

So what’s the major changes in the last few Fedora releases? Why should you now pay attention to NetworkManager and not remove it on your Server instances?

Keeping out of the way

There are situations where a running daemon or any risk of dynamic behaviour is not desired. Typically this has been where the legacy network service has been preferred because of the nature of one time fire and forget shell scripts. A few Fedora releases ago at NM 1.0 the ability to just act once and then hide was added.

cat > /etc/NetworkManager/conf.d/c-and-q.conf <<EOF
[main]
configure-and-quit=true
EOF

Documentation round-up

On IRC there’s often questioning about what is valid in the ifcfg-* files when using NetworkManager. There’s been a strong effort to improve this documentation locally on the system. The man pages of most interest are:

nm-settings
The overall NetworkManager settings names that are valid for all types of interfaces. These are used on DBus to change NM behaviour or with the nmcli CLI command to configure the interfaces.
nm-settings-ifcfg-rh
The mapping of NM configuration options to how they are named in the ifcfg-* files. The terms used in the ifcfg-* files are not always the same as the property names on an interface so this is very useful to reference in a normal Red Hat environment of using those files.
nmcli-examples
A useful reference of many nmcli activities and this also includes the polkit policy information.
NetworkManager.conf
Configuration for the actual daemon itself and for lower level or default behaviours.

IPv6 is here! Pay attention to it!

As the doomsday clock for IPv4 continues to count down there are more and more networks enabling IPv6 connectivity. There’s been a lot of changes related to IPv6 in the last few releases. These are mostly bugfixes (for example an interface with only an automatic link-local fe80:: address is not considered connected) but the changes focusing on privacy are important to be aware of.

There’s been much concern about tracking of the MAC address of a system due to EUI64 encoding, which uses the MAC to automatically create an IPv6 address. There’s been two approaches to handle this from slightly different angles. First there was RFC4941 which involves automatically generating an address and using it for a period of time before generating a new address and so on. This can be configured in NM on a connection by the property ipv6.ip6-privacy but it’s better to handle it at the kernel level with net.ipv6.conf.default.use_tempaddr=2 to prefer using a temporary address, so that everything is aware of the configuration. NetworkManager will respect the sysctl setting by default. The sysctl property to set the lifetime this temporary address is valid for is net.ipv6.conf.default.temp_prefered_lft.

The downside of this is that anything which uses the IP to carry out session tracking (secure cookies could be an example here) risks losing the session with the change of IP.

The second approach to handle privacy (which can be used alongside the temporary addressing) is RFC7217 which allows for a random, but stable, IPv6 address on a connection. This works by creating a secret key for the system from /dev/urandom and then using the connection UUID with that to create the random address, but one which stays the same for the connection. This is now used instead of EUI64 by default, but the predictable address can be used instead in an environment that needs that predictability in SLAAC.

Privacy protection of the system MAC

Particularly with WiFi being a commonplace feature in our society it’s not just the IP layer that has privacy concerns but also the lowest level of the MAC address.

Just as recently as Fedora 24 (and EL7.3) NetworkManager began using a random MAC whilst scanning for access points to use. The default at present is to use whatever the MAC of the interface is (or preserve if it’s been set in advance with a tool like macchanger) however similar to the IP layer it’s now possible to set cloned-mac-address on a connection to RANDOM for a totally random MAC each time that connection is activated or STABLE to mimic the IPv6 behaviour of a randomly generated address that stays consistent with a connection.

Bridging, teams and bonding

Previously there were special virtual interface types of team-slave, bond-slave and bridge-slave that had to be declared when using a bridge, team or bond. Although the underlying framework supported stacking these together (along with vlan tagging as well) it wasn’t possible to directly create the “stack” via the nmcli utility, as each had an underlying assumption that they had to be on a physical interface (type ethernet).

Recently these special interface types were dropped with just a master connection property being used to arbitrarily stack this stuff together. This is particularly important on a server environment with a host that is used to house multiple guest virtual machines linked to different networks.

Prior to NM 1.2 this was the juggling of nmcli commands needed to bring three interfaces together, with vlans tagged and bridges defined on these for guests to connect to:

nmcli connection add type bond con-name bond0 mode active-backup
nmcli connection add type bond-slave ifname eth2 master mybond
nmcli connection add type bond-slave ifname ens9 master mybond
nmcli connection add type bond-slave ifname ens10 master mybond
nmcli connection add type bridge con-name bridge0 ifname bridge0 connection.autoconnect yes ipv4.method manual "10.0.0.1/24" 
nmcli connection add type bridge con-name bridge60 ifname bridge60 connection.autoconnect yes ipv4.method manual "10.0.60.1/24" 
nmcli connection add type bridge con-name bridge100 ifname bridge100 connection.autoconnect yes ipv4.method manual "10.0.100.1/24" 
nmcli connection add type vlan con-name vlan-60 dev bond0 id 60
nmcli connection add type vlan con-name vlan-100 dev bond0 id 100
nmcli connection down bond0
nmcli connection down vlan-60
nmcli connection down vlan-100
nmcli connection modify bond0 connection.master bridge0 connection.slave-type bridge
nmcli connection modify vlan-60 connection.master bridge60 connection.slave-type bridge
nmcli connection modify vlan-100 connection.master bridge100 connection.slave-type bridge
nmcli connection up bond-slave-eth2
nmcli connection up bond-slave-ens9
nmcli connection up bond-slave-ens10
nmcli connection up bond0
nmcli connection up bridge0
nmcli connection up vlan-60
nmcli connection up bridge60
nmcli connection up vlan-100
nmcli connection up bridge100

With the change to allow arbitrary layering and the removal the the special *-slave type this has simply becomes:

nmcli c add type bridge ifname bridge0 con-name bridge0 connection.autoconnect yes ipv4.method manual ipv4.addr "10.0.0.2/24"
nmcli c add type bridge ifname bridge60 con-name bridge60 connection.autoconnect yes ipv4.method manual ipv4.addr "10.0.60.2/24"
nmcli c add type bridge ifname bridge100 con-name bridge100 connection.autoconnect yes ipv4.method manual ipv4.addr "10.0.100.2/24"
nmcli c add type vlan con-name vlan-100 dev bond0 id 100 master bridge100 connection.autoconnect yes 
nmcli c add type vlan con-name vlan-60 dev bond0 id 60 master bridge60 connection.autoconnect yes 
nmcli c add type bond ifname bond0 con-name bond0 connection.autoconnect yes master bridge0 bond.options mode=active-backup 
nmcli c add type ethernet ifname eth1 con-name eth1 master bond0 connection.autoconnect yes
nmcli c add type ethernet ifname eth2 con-name eth2 master bond0 connection.autoconnect yes
nmcli c add type ethernet ifname eth3 con-name eth3 master bond0 connection.autoconnect yes

This release also brought the ability to manage many more types of devices such as macvlan, vxlan and tunnels.

So, what’s next?

Somewhat surprisingly the current Fedora release matches the Red Hat Enterprise Linux 7 version of NetworkManager for the moment, but Fedora 26 is right around the corner.

This will bring a jump all the way up to 1.8.0, which of course gets the 1.6.0 improvements in the process.

It’s worth checking out the developer blogs for 1.6.0 and 1.8.0 but some of the key things to look out for are MACsec support for networks that require Layer2 encryption, IPv6 connection sharing (which uses Prefix Delegation) and better handling of restarts of the NetworkManager service.

In researching this article there’s only a couple of areas left that I can see need the legacy network service.

  1. Use of openvswitch
  2. Openstack deployments

Outside of this there’s no reason to disable NetworkManager any longer.

As for the future? Well there’s always work to do!

by James Hogarth at May 17, 2017 09:27 AM

xkcd.com

May 15, 2017

Fedora Magazine

How to install a kernel from koji

Kernel developers frequently request bug reporters test on a different kernel. Sometimes this is a full new version. Other times it’s a test build with a patch. This article shows you how to install a kernel someone has built elsewhere.

The kernel build process produces a long list of RPM packages. The most important ones are kernel, kernel-core, and kernel-modules:

  • The kernel package doesn’t contain any files; its only purpose is to bring in the other two packages.
  • kernel-core contains the files that end up in /boot and a set of kernel modules needed for core functionality.
  • kernel-modules contains the rest of the modules that are installed with the system. (There is a kernel-modules-extra package as well which contains drivers for rare hardware.)

A developer who requests testing — such as for a bugfix or other change — typically gives a link to a koji build. Koji is the build system Fedora developers use to build software for inclusion into Fedora.

A build only for testing is called a scratch build. These scratch builds are only retained for a short time. After that, the Koji system collects them as garbage and gets rid of them. A scratch build isn’t signed, so to install it you need to turn off secure boot if it’s turned on. A koji build produces binaries for multiple architectures, as seen below.

A screenshot of a build of the Kernel in Koji

A build of the Kernel in Koji

Get and install the kernel

Find the architecture you want to test (typically x86_64) and click the download link next to the kernel, kernel-core, and kernel-modules packages. Once the RPMs are downloaded, you can install them on the command line using dnf with sudo:

sudo dnf install ./path/to/kernel-4.10.8-100.fc24.x86_64.rpm ./path/to/kernel-core-4.10.8-100.fc24.x86_64.rpm ./path/to/kernel-modules-4.10.8-100.fc24.x86_64.rpm

You can then reboot into your new kernel. If you want to remove it after testing, make sure to remove all three packages kernel, kernel-core, and kernel-modules to fully remove the files.

by Laura Abbott at May 15, 2017 01:16 PM

xkcd.com

May 14, 2017

Fedora黑

May 12, 2017

Fedora Magazine

Track the night sky with Stellarium on Fedora

Ever looked up at the night sky and tried to identify specific celestial bodies out of the millions you can see? Stellarium is an awesome open source planetarium application available in Fedora to help you identify and track objects in the night sky. Basically, it simulates the night sky and provides labels and other tools to help you know what you are actually looking at.

Finding items in the night sky

Stellarium labels the objects in the night sky that are of interest, and provides directional labels as well to help identify the objects in the sky. There are also options to show labels for deep-sky objects and exoplanets.

general

 Identifying constellations

Stellarium also draws lines between and labels the multiple stars that make up the constellations, and also has a mode that overlays constellation artwork over the simulated sky.

constell

View the night sky from anywhere

You can also set the location to anywhere on Earth (or Mars, or many other bodies) where you want to simulate the night sky

mars

 

Stellarium can also do a lot more, like view how Supernovae looked from earth at previous points in history, show meteor showers, identify and track satellites around earth like the International Space Station, and also follow specific bodies through the sky. Also, if you have a compatible telescope, you can use stellarium to control the positioning of your telescope.

Stellarium is available in the Official Fedora Repositories, so you can install via the Software application on Fedora Workstation, or via the command line with the command:

sudo dnf install stellarium

 

by Ryan Lerch at May 12, 2017 08:00 AM

xkcd.com

May 10, 2017

xkcd.com

May 09, 2017

Fedora Magazine

Native color temperature tweaking with Night Light

RedShift is a utility that we have previously featured here at the Fedora Magazine. It is a small utility that automatically tweaks the color temperature towards the red end of the spectrum after dark. Blue light — which is typically emitted by a monitor — is shown to negatively impact sleep patterns if you are exposed to it after dark. Night Light is a new feature arriving in Fedora 26 Workstation — thanks to it being introduced in GNOME 3.24. Night Light provides the functionality of RedShift without having to install a separate utility or extension.

 

Enabling Night Light color temperature tweaking.

Currently, Night Light is only available if you are running a Fedora 26 pre-release. Enable Night Light in Fedora 26 with the new item in the Display Settings. The quickest way to access this page is to right-click on your background wallpaper, and pick Display Settings. Once Night Light is turned on, there will be a new icon in the status area (top right) of your Desktop to show you which mode it is in.

One thing that cannot be tweaked in the new Display Settings dialog for Night Light is the temperature value. If you are feeling adventerous, this can be tweaked in the dconf Editor. The default value of 4000 was a little too red for my eyes, so I tweaked it to 4500.

by Ryan Lerch at May 09, 2017 11:00 AM

May 08, 2017

xkcd.com

May 05, 2017

Fedora Magazine

Full MP3 support coming soon to Fedora

Both MP3 encoding and decoding will soon be officially supported in Fedora. Last November the patents covering MP3 decoding expired and Fedora Workstation enabled MP3 decoding via the mpg123 library and GStreamer. This update allowed users with the gstreamer1-plugin-mpg123 package installed on their systems to listen to MP3 encoded music.

The MP3 codec and Open Source have had a troubled relationship over the past decade, especially within the United States. Historically, due to licensing issues Fedora has been unable to include MP3 decoding or encoding within the base distribution. However, many users utilized 3rd party repositories to enable MP3 support.

A couple of weeks ago IIS Fraunhofer and Technicolor terminated their licensing program and just a few days ago Red Hat Legal provided the permission to ship MP3 encoding in Fedora. There will be a bit of time whilst package reviews are carried out and tools that are safe to add are identified, as only MP3 is cleared and not other MPEG technologies. However, it will soon be possible to convert physical media or other formats to MP3 in Fedora without 3rd party repositories.

by James Hogarth at May 05, 2017 01:08 PM

GNU nano: a minimalist console editor

Text console editors are useful in many ways. For example, they’re indispensable for editing files while recovering from a failure. Fedora contains a wide selection of applications for editing text files, ranging from GUI editors like gedit and GNOME Builder to editors that run in the terminal like Vi and Emacs. A terminal based editor — developed under the auspices of the Free Software Foundation — is the GNU nano editor. Nano is a great little tool for getting started with editing files in the Terminal. It has a shallower learning curve than other terminal-based editors — such as Vi — as it displays shortcut for regularly used actions at the bottom of the screen.

GNU Nano

GNU nano was intended to be a replacement of Pico. Pico is a text editor for UNIX, and more specific for the Pine email suite. The original mission of nano: “emulate Pico as closely as possible and then include extra functionality,” although it’s short on extras.

Some of these features are:

  • Syntax highlighting
  • Mouse support
  • Move through pages
  • Copying and Pasting
  • Deleting Line
  • Multibuffer
  • Remote edition

Installing nano

GNU nano isn’t in the default installation of Fedora, but it’s in the official repositories. To install use the command:

sudo dnf install nano

Basic operations

The editor works with keyboard shortcuts you can identify at the bottom of the main screen:

Nano editor Main Screen

Nano editor main screen

To open a file, call it from the terminal with the nano command:

nano fileToOpen

If you don’t specify a file, nano opens an empty file.

In this article, the character ^ means the Ctrl key, and M- stands for Meta. For us in Linux, this usually means the Alt key. You can type normally to start a document, and use arrow keys to move around in it.

One of the most common tasks in an editor is copy and paste. To understand this task in the editor, you need to know that select is called mark, and the clipboard is called the buffer. Knowing this, the steps to copy and paste are:

  1. Move to the the place you are going to start the copy.
  2. Start marking the text with ^6
  3. When you reach the end of the text to copy, press M-6. This moves the marked text to the buffer.
  4. Move to the destination to paste the text and press ^U.

Cutting is the same process, but the combination after marking the text is ^K. Also notice that if you don’t mark the text, the whole line is sent to the buffer when you use M-6 (copy) or ^K (cut).

Other features

Another feature is the Multibuffer, which lets you open multiple files. Since this is a console utility, there are no tabs to check multiple files. To move between files, use the keyboard shortcuts: M-> or M-. for the next file and M-< or M-, for the previous file.

Moving through files in nano editor

Moving through files in nano editor

You can also search text with regular expressions. Use the combination ^W, type the text you’re searching and hit Enter. The cursor moves to the first character when the search pattern is found. To find the next instance, hit M-W.

To search and replace, the combination is ^. The editor prompts you to enter the word for search, and then the word that will replace the searched word. The editor asks you for each instance whether you want to replace:

Find and replace in nano editor

Find and replace in nano editor

To close the editor, use ^X at which point you’re asked to save the file. To save a file at any time, use the combination ^O.

There are many other shortcuts. For instance, check out this little list with some of those most used. Also, you can query the official documentation.

Final thought

GNU nano is a minimal editor intended for easy use. Although it may not be ideal for code, remember it was created as an email editor. It’s great for quick edits and to create documents, since it’s minimal and has no GUI — it does everything from your keyboard.

by Eduard Lucena at May 05, 2017 08:00 AM

xkcd.com

May 03, 2017

Fedora Magazine

How to install more wallpaper packs on Fedora Workstation

Every release, the Fedora Design team creates a new default wallpaper for Fedora. In addition to the default wallpaper, the Fedora repositories also contain a set of extra Supplemental Wallpapers for each release. These older wallpapers are not installed by default, but are easily installed from the Fedora Repositories. If you have just set up a fresh install of Fedora, and want to expand your choices for your desktop wallpaper, the older Fedora wallpapers are a great choice.

This post lists out the older wallpapers available in the Fedora repositories, and how to install them on your current Fedora install. On Fedora Workstation, after you have installed your desired pack, they will show up in the Wallpapers tab in the Background chooser in the Settings.

Note: If you are using a desktop environment other than the default for Fedora Workstation (GNOME), there are also packages tailored to some of the more popular alternative desktops. In most of the examples below, simply change gnome in the dnf install line to kde or mate or xfce when installing the package.

 

Fedora 25 Wallpapers

Fedora 25 Default Wallpaper

To install the Fedora 25 default wallpaper, use the following command in the Terminal:

sudo dnf install f25-backgrounds-gnome

Fedora 25 Supplemental Wallpapers

To install the Fedora 25 supplementary wallpapers, use the following command in the Terminal:

sudo dnf install f25-backgrounds-extras-gnome

Fedora 24 Wallpapers

Fedora 24 Default Wallpaper

To install the Fedora 24 default wallpaper, use the following command in the Terminal:

sudo dnf install f24-backgrounds-gnome

 

Fedora 24 Supplemental Wallpapers

To install the Fedora 24 supplementary wallpapers, use the following command in the Terminal:

sudo dnf install f24-backgrounds-extras-gnome

 


 

Fedora 23 Wallpapers

Fedora 23 Default Wallpaper

To install the Fedora 23 default wallpaper, use the following command in the Terminal:

sudo dnf install f23-backgrounds-gnome

Fedora 23 Supplemental Wallpapers

To install the Fedora 23 supplementary wallpapers, use the following command in the Terminal:

sudo dnf install f23-backgrounds-extras-gnome

Fedora 22 Wallpapers

Fedora 22 Default Wallpaper

To install the Fedora 22 default wallpaper, use the following command in the Terminal:

sudo dnf install f22-backgrounds-gnome

Fedora 22 Supplemental Wallpapers

To install the Fedora 22 supplementary wallpapers, use the following command in the Terminal:

sudo dnf install f22-backgrounds-extras-gnome

 


 

Fedora 21 Wallpapers

Fedora 21 Default Wallpaper

To install the Fedora 21 default wallpaper, use the following command in the Terminal:

sudo dnf install f21-backgrounds-gnome

Fedora 21 Supplemental Wallpapers

To install the Fedora 21 supplementary wallpapers, use the following command in the Terminal:

sudo dnf install f21-backgrounds-extras-gnome

 


 

Fedora 20 Wallpapers

Fedora 20 Default Wallpaper

To install the Fedora 20 default wallpaper, use the following command in the Terminal:

sudo dnf install heisenbug-backgrounds-gnome

Fedora 20 Supplemental Wallpapers

To install the Fedora 20 supplementary wallpapers, use the following command in the Terminal:

sudo dnf install heisenbug-backgrounds-extras-gnome

 


 

Fedora 19 Wallpapers

Fedora 19 Default Wallpaper

To install the Fedora 19 default wallpaper, use the following command in the Terminal:

sudo dnf install schroedinger-cat-backgrounds-gnome

Fedora 19 Supplemental Wallpapers

To install the Fedora 19 supplementary wallpapers, use the following command in the Terminal:

sudo dnf install schroedinger-cat-backgrounds-extras-gnome

 


 

Fedora 18 Wallpapers

Fedora 18 Default Wallpaper

To install the Fedora 18 default wallpaper, use the following command in the Terminal:

sudo dnf install spherical-cow-backgrounds-gnome

Fedora 18 Supplemental Wallpapers

To install the Fedora 18 supplementary wallpapers, use the following command in the Terminal:

sudo dnf install spherical-cow-backgrounds-extras-gnome

 


 

Fedora 17 Default Wallpaper

To install the Fedora 17 default wallpaper, use the following command in the Terminal:

sudo dnf install beefy-miracle-backgrounds-gnome

 


 

Fedora 16 Wallpapers

Fedora 16 Default Wallpaper

To install the Fedora 16 default wallpaper, use the following command in the Terminal:

sudo dnf install verne-backgrounds-gnome

Fedora 16 Supplemental Wallpapers

To install the Fedora 16 supplementary wallpapers, use the following command in the Terminal:

sudo dnf install verne-backgrounds-extras-gnome

 


 

Fedora 15 Wallpapers

Fedora 15 Default Wallpaper

The default wallpaper for Fedora 15 was a remix of the default GNOME wallpaper at the time. To install the Fedora 15 default wallpaper, use the following command in the Terminal:

sudo dnf install lovelock-backgrounds-stripes-gnome

Fedora 15 Alternate Wallpaper

Fedora 15 also shipped with an alternate wallpaper, that was used by default on non-GNOME spins. To get this wallpaper, use the following command in the Terminal:

sudo dnf install lovelock-backgrounds-gnome

 


 

Fedora 14 Wallpapers

Fedora 14 Default Wallpaper

To install the Fedora 14 default wallpaper, use the following command in the Terminal:

sudo dnf install laughlin-backgrounds-gnome

Fedora 14 Supplemental Wallpapers

To install the Fedora 14 supplementary wallpapers, use the following command in the Terminal:

sudo dnf install laughlin-backgrounds-extras-gnome

 

Fedora 13 Default Wallpaper

To install the Fedora 13 default wallpaper, use the following command in the Terminal:

sudo dnf install goddard-backgrounds-gnome

 


Fedora 12 Default Wallpaper

To install the Fedora 12 default wallpaper, use the following command in the Terminal:

sudo dnf install constantine-backgrounds

 


Fedora 11 Default Wallpaper

To install the Fedora 11 default wallpaper, use the following command in the Terminal:

sudo dnf install leonidas-backgrounds-lion

 


Fedora 10 Default Wallpaper

To install the Fedora 10 default wallpaper, use the following command in the Terminal:

sudo dnf install solar-backgrounds

 


Fedora 9 Default Wallpaper

To install the Fedora 9 default wallpaper, use the following command in the Terminal:

sudo dnf install desktop-backgrounds-waves

 


Fedora 8 Default Wallpaper

To install the Fedora 8 default wallpaper, use the following command in the Terminal:

sudo dnf install fedorainfinity-backgrounds

by Ryan Lerch at May 03, 2017 09:10 AM

xkcd.com

Fedora Magazine

Fedora at the Red Hat Summit 2017

This week is the huge, annual conference where Red Hat comes together with its customers, partners, and key communities. One of the main features of the Partner Pavilion here is the gigantic Community Central area. Anchoring that space are the Fedora and CentOS booths, back to back.

At the booth you’ll find intrepid Fedora Project Leader Matthew Miller. He’s handing out stickers and news about all the awesome things happening in Fedora.

FPL Matthew Miller at Summit booth

Are you into Fedora Badges? You’re in luck. You can pick up a special Summit 2017 badge at the booth as well.

You’ll also find long term Fedora superstar Tom “spot” Callaway. He’s showing off the latest in completely free and open source 3D printing technology:

If you’re in Boston this week and love open source, this is a fantastic event. We in the Fedora crew hope to see you there!

by Paul W. Frields at May 03, 2017 12:01 AM

May 01, 2017

Fedora Magazine

Share Fedora: Measuring Success

Last week the Fedora community was asked to share ideas about difficult conversations. Opensource.com collected many great responses. This week the blogging challenge continues with ideas on how to measure success.

Metrics are important to the Fedora Project.  You can see them as part of the Fedora Project Leader’s State of Fedora presentations.  You can also find them as a proposed Google Summer of Code project for Fedora.  Today, we can see statistics on topics such as the estimated usage of Fedora by version or the number of active contributors.  Are these the statistics we want? Do they help us guide the project? Share your thoughts and become part of the worldwide spread of open source and the ideas behind it.

What you can do

Write a blog post about this week’s theme and publish it. Please consider adding the link in the comments to this post. Tweet or use other social media to send your link to both opensource.com and us, by including the hashtags #osscommunities and #Fedora.

Opensource.com will publish a roundup of posts every Friday. Do you want to see your post included? Then let everyone know about it by Thursday.

This week’s theme is measuring success.

You’re free to write about anything related to the theme. Fedora and opensource.com offer the following suggested topics:

  • How does the Fedora Project use metrics in the areas where you contribute?
  • What metrics should the Fedora Project capture and why?
  • Are numbers important in measuring community success? Which numbers? How do you collect them?
  • What vanity metrics should you avoid?
  • What if your project doesn’t want more developers? How can an “open source” project close its door to new developers?
  • Do social media followers matter?
  • How do you count a contribution? Who qualifies as a “contributor”?
  • When is a contributor no longer a contributor?
  • How do you measure and report how well your community manager is doing?
  • X ways to know if your community is healthy and Y things to measure.

We look forward to seeing your posts!

by Brian (bex) Exelbierd at May 01, 2017 08:00 AM

xkcd.com

April 29, 2017

Fedora Magazine

Fedora Atomic Host available in Digital Ocean

The latest release of Fedora Atomic Host was announced earlier this week, and for the first time is also available on Digital Ocean. The Project Atomic blog has more details, including how to set up a new instance via either the Digital Ocean web interface or the dotctl CLI.

 

by Ryan Lerch at April 29, 2017 06:07 AM