You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by om...@apache.org on 2018/08/09 20:02:13 UTC
orc git commit: ORC-393. Add ORC snapcraft definition.
Repository: orc
Updated Branches:
refs/heads/master 689dd5e27 -> 0268f6efd
ORC-393. Add ORC snapcraft definition.
Fixes #298
Signed-off-by: Owen O'Malley <om...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/orc/repo
Commit: http://git-wip-us.apache.org/repos/asf/orc/commit/0268f6ef
Tree: http://git-wip-us.apache.org/repos/asf/orc/tree/0268f6ef
Diff: http://git-wip-us.apache.org/repos/asf/orc/diff/0268f6ef
Branch: refs/heads/master
Commit: 0268f6efd988621d667faedb1d6a6c19a80d1321
Parents: 689dd5e
Author: Owen O'Malley <om...@apache.org>
Authored: Fri Aug 3 12:53:37 2018 -0700
Committer: Owen O'Malley <om...@apache.org>
Committed: Thu Aug 9 13:01:57 2018 -0700
----------------------------------------------------------------------
snap/.gitignore | 5 ++++
snap/README.md | 44 +++++++++++++++++++++++++++++++++++
snap/Vagrantfile | 35 ++++++++++++++++++++++++++++
snap/snapcraft.yaml | 53 ++++++++++++++++++++++++++++++++++++++++++
snap/vagrant-provision.sh | 19 +++++++++++++++
5 files changed, 156 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/orc/blob/0268f6ef/snap/.gitignore
----------------------------------------------------------------------
diff --git a/snap/.gitignore b/snap/.gitignore
new file mode 100644
index 0000000..4ff5e06
--- /dev/null
+++ b/snap/.gitignore
@@ -0,0 +1,5 @@
+*.snap
+parts
+prime
+snap
+stage
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/orc/blob/0268f6ef/snap/README.md
----------------------------------------------------------------------
diff --git a/snap/README.md b/snap/README.md
new file mode 100644
index 0000000..11042e2
--- /dev/null
+++ b/snap/README.md
@@ -0,0 +1,44 @@
+This directory is for building [snaps](https://snapcraft.io/) of the ORC tools.
+
+If you are running on a non-Linux system, you'll need to create a VM. Vagrant
+scripts are provided to accomplish that.
+
+```bash
+% vagrant up
+% vagrant ssh
+% git clone https://github.com/apache/orc.git -o apache
+```
+
+If you don't use VM, you'll need to install snapcraft, which is the tool to build
+snaps.
+
+```bash
+% sudo apt-get install snapcraft
+```
+
+In both cases, go into the snap directory and build the snap:
+
+```bash
+% cd orc/snap
+% snapcraft
+```
+
+To publish to the snapcraft store, you need to:
+
+```bash
+% snapcraft login
+% snapcraft push orc_*.snap
+```
+
+For users to install the snap, they'll use:
+
+```bash
+% sudo snap install orc
+```
+
+The commands are:
+
+* orc.contents - C++ ORC tool for displaying data contents
+* orc.java - Java ORC tool
+* orc.metadata - C++ ORC metadata tool
+* orc.statistics - C++ ORC statistics tool
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/orc/blob/0268f6ef/snap/Vagrantfile
----------------------------------------------------------------------
diff --git a/snap/Vagrantfile b/snap/Vagrantfile
new file mode 100644
index 0000000..8fccfdf
--- /dev/null
+++ b/snap/Vagrantfile
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+Vagrant.require_version ">= 1.9.1"
+
+VAGRANTFILE_API_VERSION = "2"
+
+Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
+ if Vagrant.has_plugin?("vagrant-cachier")
+ # Configure cached packages to be shared between instances of the same base box.
+ config.cache.scope = :box
+ end
+ config.ssh.insert_key = false
+
+ config.vm.provider :virtualbox do |vb|
+ vb.customize ["modifyvm", :id, "--memory", 2048]
+ vb.customize ["modifyvm", :id, "--cpus", 2]
+ vb.customize ["modifyvm", :id, "--ioapic", "on"]
+ end
+
+ config.vm.box = "hashicorp-vagrant/ubuntu-16.04"
+ config.vm.provision :shell, path: "vagrant-provision.sh"
+end
http://git-wip-us.apache.org/repos/asf/orc/blob/0268f6ef/snap/snapcraft.yaml
----------------------------------------------------------------------
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
new file mode 100644
index 0000000..ed78a83
--- /dev/null
+++ b/snap/snapcraft.yaml
@@ -0,0 +1,53 @@
+name: orc
+version: '1.5.2'
+summary: Apache ORC is the fastest columnar file format for big data.
+description: |
+ Apache ORC is the smallest, fastest columnar file format for Spark
+ or Hadoop workloads. This snap includes the command line tools to
+ inspect, read, and write ORC files.
+
+grade: stable
+confinement: strict
+
+parts:
+ orc:
+ source: https://github.com/apache/orc.git
+ source-type: git
+ source-tag: rel/release-1.5.2
+ plugin: cmake
+ configflags:
+ - -DLZ4_HOME=/usr
+ - -DPROTOBUF_HOME=/usr
+ - -DSNAPPY_HOME=/usr
+ - -DZLIB_HOME=/usr
+ build-packages:
+ - build-essential
+ - cmake
+ - liblz4-dev
+ - make
+ - libprotobuf-dev
+ - libprotoc-dev
+ - libsasl2-dev
+ - libsnappy-dev
+ - maven
+ - openjdk-8-jdk-headless
+ - protobuf-compiler
+ - zlib1g-dev
+ stage-packages:
+ - libdb5.3
+ - libsasl2-2
+ - openjdk-8-jre-headless
+
+apps:
+ contents:
+ command: bin/orc-contents
+ plugs: [home, network, removable-media]
+ java:
+ command: usr/lib/jvm/java-8-openjdk-amd64/bin/java -jar "$(ls $SNAP/share/orc-tools*.jar)"
+ plugs: [home, network, removable-media]
+ metadata:
+ command: bin/orc-metadata
+ plugs: [home, network, removable-media]
+ statistics:
+ command: bin/orc-statistics
+ plugs: [home, network, removable-media]
http://git-wip-us.apache.org/repos/asf/orc/blob/0268f6ef/snap/vagrant-provision.sh
----------------------------------------------------------------------
diff --git a/snap/vagrant-provision.sh b/snap/vagrant-provision.sh
new file mode 100644
index 0000000..be08316
--- /dev/null
+++ b/snap/vagrant-provision.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apt-get update
+DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
+apt-get install -y \
+ emacs-nox \
+ snapcraft