metron-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject [4/7] incubator-metron git commit: METRON-302 Add rpm spec file
Date Wed, 20 Jul 2016 15:00:51 GMT
METRON-302 Add rpm spec file


Project: http://git-wip-us.apache.org/repos/asf/incubator-metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-metron/commit/bf7c527a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-metron/tree/bf7c527a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-metron/diff/bf7c527a

Branch: refs/heads/master
Commit: bf7c527a73b6ade10d164ba205df6935b4440733
Parents: 13c5a4c
Author: Michael Miklavcic <michael.miklavcic@gmail.com>
Authored: Wed Jul 13 13:37:13 2016 -0400
Committer: David Lyle <dlyle65535@gmail.com>
Committed: Wed Jul 20 10:59:53 2016 -0400

----------------------------------------------------------------------
 .../packaging/docker/rpm-docker/.gitignore      |  5 ++
 .../docker/rpm-docker/SPECS/metron.spec         | 83 ++++++++++++++++++++
 .../packaging/docker/rpm-docker/build.sh        | 22 ++++++
 3 files changed, 110 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/bf7c527a/metron-deployment/packaging/docker/rpm-docker/.gitignore
----------------------------------------------------------------------
diff --git a/metron-deployment/packaging/docker/rpm-docker/.gitignore b/metron-deployment/packaging/docker/rpm-docker/.gitignore
new file mode 100644
index 0000000..a2dcda5
--- /dev/null
+++ b/metron-deployment/packaging/docker/rpm-docker/.gitignore
@@ -0,0 +1,5 @@
+BUILD/
+BUILDROOT/
+RPMS/
+SOURCES/
+SRPMS/

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/bf7c527a/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec
----------------------------------------------------------------------
diff --git a/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec b/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec
new file mode 100644
index 0000000..dc1bb94
--- /dev/null
+++ b/metron-deployment/packaging/docker/rpm-docker/SPECS/metron.spec
@@ -0,0 +1,83 @@
+#
+#  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.
+#
+%define timestamp           %(date +%Y%m%d%H%M)
+%define version             %{?_version}%{!?_version:UNKNOWN}
+%define base_name           metron
+%define versioned_app_name  %{base_name}-%{version}
+%define buildroot           %{_topdir}/BUILDROOT/%{versioned_app_name}-root
+%define installpriority     %{_priority} # Used by alternatives for concurrent version installs
+%define __jar_repack        %{nil}
+
+%define metron_home         %{_prefix}/%{base_name}/%{version}
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Name:           %{base_name}
+Version:        %{version}
+Release:        %{timestamp}
+BuildRoot:      %{buildroot}
+BuildArch:      noarch
+Summary:        Apache Metron provides a scalable advanced security analytics framework
+License:        ASL 2.0
+URL:            https://metron.incubator.apache.org
+Group:          Applications/Internet
+Source0:        metron-common-%{version}-archive.tar.gz
+
+%description
+Apache Metron provides a scalable advanced security analytics framework
+
+%prep
+rm -rf %{_rpmdir}/%{buildarch}/%{versioned_app_name}*
+rm -rf %{_srcrpmdir}/%{versioned_app_name}*
+
+%build
+rm -rf %{_builddir}
+mkdir -p %{_builddir}/%{versioned_app_name}
+
+%clean
+rm -rf %{buildroot}
+rm -rf %{_builddir}/*
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{metron_home}
+
+# copy source files and untar
+tar -xzf %{SOURCE0} -C %{buildroot}%{metron_home}
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+%package        common
+Summary:        Metron Common
+Group:          Applications/Internet
+Provides:       common = %{version}
+
+%description common
+This package installs the Metron common files %{metron_home}
+
+%files common
+
+%defattr(-,root,root,755)
+%{metron_home}/bin/zk_load_configs.sh
+%attr(0644,root,root) %{metron_home}/lib/metron-common-%{version}.jar
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+%changelog
+* Tue Jul 12 2016 Michael Miklavcic <michael.miklavcic@gmail.com> - 0.2.1
+- First packaging
+

http://git-wip-us.apache.org/repos/asf/incubator-metron/blob/bf7c527a/metron-deployment/packaging/docker/rpm-docker/build.sh
----------------------------------------------------------------------
diff --git a/metron-deployment/packaging/docker/rpm-docker/build.sh b/metron-deployment/packaging/docker/rpm-docker/build.sh
new file mode 100755
index 0000000..ad25188
--- /dev/null
+++ b/metron-deployment/packaging/docker/rpm-docker/build.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+#  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.
+#
+
+rm -rf SRPMS/ RPMS/ && \
+rpmbuild -v -ba --define "_topdir $(pwd)" --define "_version 0.2.0BETA" SPECS/metron.spec
&& \
+rpmlint -i SPECS/metron.spec RPMS/*/metron* SRPMS/metron
+


Mime
View raw message