Linux Journal

Git Your July 2018 Issue of Linux Journal: Now Available

3 months 2 weeks ago
by Carlie Fairchild

Along with Microsoft buying Github recently, we received hundreds of questions and comments about all things git. How does one install and run GitLab themselves? Should they? What's the difference between GitHub and GitLab? How can one migrate repositories from GitHub and host on their own Linux server? So with this July issue of Linux Journal, we take a Deep Dive in to... git. Enjoy!

Feature articles include:

A Git Origin Story by Zack Brown

A look at the Linux kernel developers' various revision control solutions through the years, Linus Torvalds' decision to use BitKeeper and the controversy that followed, and how Git came to be created.

Git Quick Start Guide by Patrick Whelan

Ditch USBs and start using real version control, and if you follow this guide, you can start using git in 30 minutes!

Building a Bare-Bones Git Environment by Andy Carlson

How to migrate repositories from GitHub, configure the software and get started with hosting Git repositories on your own Linux server.

Take Your Git In-House by John S. Tonello

If you're wary of the Microsoft takeover of GitHub, or if you've been looking for a way to ween yourself off free public repositories, or if you want to ramp up your DevOps efforts, now's a good time to look at installing and running GitLab yourself. It's not as difficult as you might think, and the free, open-source GitLab CE version provides a lot of flexibility to start from scratch, migrate or graduate to more full-fledged versions.

Terrible Ideas in Git by Corey Quinn

This article was derived from a talk that GitHub Universe faithfully rejects every year. I can't understand why....

Opinion: GitHub vs GitLab by Matt Lee

Free software deserves free tools, not Microsoft-owned GitHub.

Other articles in this issue:

Encrypting NFSv4 with Stunnel TLS by Charles Fisher

NFS clients and servers push file traffic over clear-text connections in the default configuration, which is incompatible with sensitive data. TLS can wrap this traffic, finally bringing protocol security. Before you use your cloud provider's NFS tools, review all of your NFS usage and secure it where necessary.

Advertising 3.0 by Doc Searls

Road to RHCA—Preparation Meets Opportunity by Taz Brown

FOSS Project Spotlight: ONLYOFFICE, an Online Office Suite by Tatiana Kochedykova

At Rest Encryption by Kyle Rankin

Progress with Your Image by Kyle Rankin

FOSS Project Spotlight: Pydio Cells, an Enterprise-Focused File-Sharing Solution by Italo Vignoli

Atomic Modeling with GAMGI by Joey Bernard

News Briefs by Jill Franklin

Kyle Rankin's Hack and /: What Really IRCs Me: Slack

Reuven M. Lerner's At the Forge: Introducing Python 3.7's Dataclasses

Go to Full Article
Carlie Fairchild

Terrible Ideas in Git

3 months 2 weeks ago
by Corey Quinn

This article was derived from a talk that GitHub Universe faithfully rejects every year. I can't understand why....

For better or worse, git has become one of the Open Source community's more ubiquitous tools. It lets you manage code effectively. It helps engineers who are far apart collaborate with each other. At its heart, it's very simple, which is why the diagram in so many blog posts inevitably looks something like the one shown in Figure 1.

Figure 1. Git Model (Source: https://nvie.com)

The unfortunate truth that's rarely discussed in detail is that git has a dark side: it makes us feel dumb. I don't care who you are—we all hit a point wherein we shrug, give up and go scrambling for Stack Overflow (motto: "This thread has been closed as Off Topic") to figure out how best to get out of the terrible situations we've caused for ourselves. The only question is how far down the rabbit hole you can get before the madness overtakes you, and you begin raising goats for a living instead.

At its core, all git does is track changes to files and folders. git commit effectively takes a snapshot of the filesystem (as represented by the items added to the staging area) at a given point in time:

cquinn@1d732dc08938 ~/demo1 % git init Initialized empty Git repository in /home/cquinn/demo1/.git/ cquinn@1d732dc08938(master|...) ~/demo1 % git add ubuntu.iso cquinn@1d732dc08938(master|·1) ~/demo1 % git commit ↪-m "Initial commit" [master (root-commit) b0d3bfb] Initial commit 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 ubuntu.iso cquinn@1d732dc08938(master|✓) ~/demo1 % git rm --cached ↪ubuntu.iso rm 'ubuntu.iso' cquinn@1d732dc08938(master|·1✓) ~/demo1 % git ↪commit -m "There I fixed it" [master 2d86934] There I fixed it 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 ubuntu.iso cquinn@1d732dc08938(master|...) ~/demo1 % du -hs .git 174M .git

So if you do something foolish, such as committing large binaries, you can't just revert the commit—it's still going to live in your git repository. If you've pushed that thing elsewhere, you get to rewrite history forcibly, either with git-filter-branch or the bfg. Either way, it's extra work that's unpleasant to others who share your repository.

Fundamentally, all that git does is create a .git folder in the top level of the repository. This subdirectory contains files and folders that change over time. Wait, isn't there a tool for that?

Go to Full Article
Corey Quinn

SUSE Acquired by EQT, Google Becomes Newest Platinum Member of The Linux Foundation, MintBox Mini 2 Launches and More

3 months 2 weeks ago

News briefs for July 2, 2018.

SUSE is being acquired by EQT. SUSE.com notes that with this partnership "SUSE expects to be equipped to further exploit the excellent market opportunity both in the Linux operating system area as well as in emerging product groups in the open source space." SUSE CEO Nils Brauckmann will continue to lead SUSE, and "the SUSE business expects staffing, customer relationships, partnerships, product and service offering, commitment to open source leadership and support for the key open source communities to remain unchanged."

The Linux Foundation recently announced that Google has become a Platinum Member of the foundation. From the press release: "'Google is one of the biggest contributors to and supporters of open source in the world, and we are thrilled that they have decided to increase their involvement in The Linux Foundation,' said Jim Zemlin, executive director, The Linux Foundation. "We are honored that Sarah Novotny, one of the leading figures in the open source community, will join our board—she will be a tremendous asset.'"

MintBox Mini 2 launched yesterday. The MintBox Mini 2 is the 4th generation of the miniature, ready-to-use, fanless mini PCs from Compulab and Linux Mint. The MBM2 is based on the quad-core Intel Celeron J3455 and ships with the latest Linux Mint 19 "Tara" Cinnamon pre-installed. Compulab provides a 5-year warranty on MBM2 and donates 5% to Linux Mint for each MBM2 sold. See the press release for specs and more details.

The OpenShot Video Editor has released version 2.4.2, which features "new effects, tons of bug fixes, and more stability and performance enhancements!" New improvements include seven new effects (crop, hue, color shift, pixelate, bars, wave and shift), auto audio mixing, auto rotate, improved audio playback, improved stability and more.

BusyBox version 1.29.0 has just been released. According to post on the Appuals site, "This new release might end up seeing more serious use as part of boxed network routing solutions. For instance, companies that manufacture a Linux-based router that doesn't have a proper GNU userspace could include BusyBox with it and therefore provide a useful coding environment."

News SUSE The Linux Foundation Google Linux Mint Hardware multimedia Audio/Video BusyBox Embedded
Jill Franklin

Weekend Reading: Multimedia

3 months 2 weeks ago
by Carlie Fairchild

Put the fun back in computing. With this weekend's reading, we encourage you to build yourself an internet radio station, create your own Audible or even live-stream your pets on YouTube. Sky's the limit with Linux. Enjoy!

 

Building Your Own Audible

by Shawn Powers

I have audiobooks from a variety of sources, which I've purchased in a variety of ways. I have some graphic audio books in MP3 format, a bunch of Audible books in their DRM'd format and ripped CDs varying from m4b (Apple format for books) to MP3 and even some OGG. That diversity makes choosing a listening platform difficult. Here I take a quick look at some options for streaming audio books.

 

Linux Gets Loud

by Joshua Curry

Linux is ready for prime time when it comes to music production. New offerings from Linux audio developers are pushing creative and technical boundaries. And, with the maturity of the Linux desktop and growth of standards-based hardware setups, making music with Linux has never been easier.

 

Using gphoto2 to Automate Taking Pictures

by Shawn Powers

With my obsession—er, I mean hobby—regarding BirdCam, I've explored a great number of camera options. Whether that means trying to get Raspberry Pi cameras to focus for a macro shot of a feeder or adjusting depth of field to blur out the neighbor's shed, I've fiddled with just about every webcam setting there is. Unfortunately, when it comes to lens options, nothing beats a DSLR for quality. Thankfully, there's an app for that.

 

Creating an Internet Radio Station with Icecast and Liquidsoap

by Bill Dengler

Ever wanted to stream prerecorded music or a live event, such as a lecture or concert for an internet audience? With Icecast and Liquidsoap, you can set up a full-featured, flexible internet radio station using free software and open standards.

 

Live Stream Your Pets with Linux and YouTube!

by Shawn Powers

Anyone who reads Linux Journal knows about my fascination with birdwatching. I've created my own weatherproof video cameras with a Raspberry Pi. I've posted instructions on how to create your own automatically updating camera image page with JavaScript. Heck, I even learned CSS so I could make a mobile-friendly version of BirdCam that filled the screen in landscape mode.

 

Nativ Vita

by James Gray

Go to Full Article
Carlie Fairchild

Gentoo's GitHub Account Hacked, New Raspbian Release, Kubernetes 1.11 Now Available, Databricks Partners with RStudio and More

3 months 2 weeks ago

News briefs for June 29, 2018.

Gentoo's GitHub account has been hacked and is temporarily locked down by GitHub support. The Gentoo team has identified the ingress point, and the repositories with malicious commits have been reset. According to Gentoo, "This does NOT affect any code hosted on the Gentoo infrastructure. Since the master Gentoo ebuild repository is hosted on our own infrastructure and since Github is only a mirror for it, you are fine as long as you are using rsync or webrsync from gentoo.org."

Raspbian 2018-06-27 has been released. This new version includes a setup wizard, a new PDF viewer, updated Chromium browser to version 65 and more. See Simon Long's release announcement for more details, download links and a video run-through on how to update an existing image.

Kubernetes 1.11 was released this week, marking the second release of the year. Key new features include IPVS-based in-cluster service load balancing is now stable; Core DNS is now available as a cluster DNS add-on option; Kubelet configuration is now in beta; and more. The Kubernetes team notes that "the features in this release make it increasingly possible to plug any infrastructure, cloud or on-premise, into the Kubernetes system." You can download it from GitHub.

Eighteen Chromebooks from Acer, Asus, Lenovo and Dell—all based on Intel Apollo Lake—to receive Linux app support. According to xda Developers, "as the change has only just landed, Canary and Developer channels will see this first in the coming days and weeks. Stable or Beta channel users will have to wait until Chrome OS version 69."

Databricks, founded by the creators of Apache Spark, announced this week its partnership with RStudios, the providers of a free and open-source integrated development environment for R, "to increase the productivity of data science teams". According to the announcement, "RStudio provides the most popular way for data science teams to analyze data with R through open source and enterprise ready tools for the R computing environment. By integrating both solutions, data scientists can easily use RStudio from within a Databricks implementation."

News Gentoo GitHub Raspbian Raspberry Pi Kubernetes Chromebooks R Big Data
Jill Franklin

Clearing Out /boot

3 months 2 weeks ago
by Adam McPartlan

The /boot partition sometimes needs a bit of attention. If you enable automatic updates, it will fill up with old kernels that you'll probably never need. It also will stop you from running aptitude to install or remove anything. If you find yourself in this situation, you can use dpkg to get around it. dpkg is the higher-level package manager in Debian-based distributions, and it's very useful when aptitude has broken.

To see the status of your partitions run: df -h:

Filesystem Size Used Avail Use% Mounted on udev 3.0G 12K 3.0G 1% /dev tmpfs 597M 528K 597M 1% /run /dev/dm-0 97G 14G 78G 15% / none 4.0K 0 4.0K 0% /sys/fs/cgroup none 5.0M 0 5.0M 0% /run/lock none 3.0G 0 3.0G 0% /run/shm none 100M 0 100M 0% /run/user /dev/sda1 228M 219M 0 100% /boot

If you look in the directory /boot you will see it full of old kernels and images. it is not advisable to just delete them as you can break your system. Run the following command, this will tell you what kernel you are currently on: uname -r:

3.13.0-137-generic

Lets find out what kernels are installed and which ones can be purged from your system. To do this, run the following:

dpkg --list "linux-image*" | grep -v $(uname) | grep ii

This will use dpkg to list all linux kernel images excluding the one you are using, that is installed.

The output might still be quite big, let's refine it by piping the results in to awk. The awk command below is an instruction to print the second column from the output.

dpkg --list "linux-image*" | grep -v $(uname -r) | ↪grep ii | awk '{ print $2 }'

This gives us a list to work with. We can stick this in a script or run it from the command line to purge them all.

CAUTION: make sure that the kernel you are using is not in the list. We should have eliminated that when we specified grep -v $(uname -r). The -v part tell grep exclude anything that contains the output of uname -r.

If you are happy and have sudo privileges, go ahead:

sudo dpkg --purge $(dpkg --list "linux-image*" | grep -v ↪$(uname -r) | grep ii | awk '{ print $2 }')

To finish off run sudo update-grub2 - This will ensure grub is updated with the available kernels - otherwise you may be heading for trouble. Then fix aptitude by running: sudo apt-get -f install followed by sudo apt-get autoremove to clear the images out of aptitude.

Look at your partition you will see it has free space.

Go to Full Article
Adam McPartlan