Add 3.3.0-1 and 4.0.0-1.201512150335 RPM specs 46/33146/2
authorDaniel Farrell <dfarrell@redhat.com>
Wed, 20 Jan 2016 19:43:12 +0000 (14:43 -0500)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 21 Jan 2016 00:53:49 +0000 (00:53 +0000)
These were logically created after the build_vars changes that defined
their RPMs, but I neglected to copy the spec files back from the build
Vagrant box and commit them with the RPM build definition changes.

31376 logically added 4.0.0-1.201512150335
31221 logically added 3.3.0-1

They are auto-generated via ./spec/build_specs.py, but imho they should
explicitly exist in the repo as well (clarity, docs, easy sharing, etc).

Change-Id: Iebfbf778998b2ca65d358a2c00e80ad3ebad3e31
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
rpm/specs/opendaylight-3.3.0-1.spec [new file with mode: 0644]
rpm/specs/opendaylight-4.0.0-1.201512150335.spec [new file with mode: 0644]

diff --git a/rpm/specs/opendaylight-3.3.0-1.spec b/rpm/specs/opendaylight-3.3.0-1.spec
new file mode 100644 (file)
index 0000000..cfce8e0
--- /dev/null
@@ -0,0 +1,68 @@
+# ODL is a noarch package, so this isn't necessary. It's also very slow.
+%define __jar_repack 0
+
+Name:       opendaylight
+Version:    3.3.0
+# The Fedora/CentOS packaging guidelines *require* the use of a disttag. ODL's
+#   RPM build doesn't do anything Fedora/CentOS specific, so the disttag is
+#   unnecessary and unused in our case, but both the docs and the pros (apevec)
+#   agree that we should include it.
+# See: https://fedoraproject.org/wiki/Packaging:DistTag
+Release:    1.el7
+BuildArch:  noarch
+Summary:    OpenDaylight SDN Controller
+Group:      Applications/Communications
+License:    EPL-1.0
+URL:        http://www.opendaylight.org
+Source0:    https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.3.3-Lithium-SR3/distribution-karaf-0.3.3-Lithium-SR3.tar.gz
+Source1:    %name-c6d7ee1f21d62ff8ffb741c7a12c3d8d3aa3d6ed.service.tar.gz
+Buildroot:  /tmp
+# Required for ODL at run time
+Requires:   java >= 1:1.7.0
+# Required for creating odl group
+Requires(pre): shadow-utils
+# Required for configuring systemd
+BuildRequires: systemd
+
+%pre
+# Create `odl` user/group
+# Short circuits if the user/group already exists
+# Home dir must be a valid path for various files to be created in it
+getent passwd odl > /dev/null || useradd odl -M -d $RPM_BUILD_ROOT/opt/%name
+getent group odl > /dev/null || groupadd odl
+
+%description
+OpenDaylight Lithium-SR3
+
+%prep
+# Extract Source0 (ODL archive)
+%autosetup -n distribution-karaf-0.3.3-Lithium-SR3
+# Extract Source1 (systemd config)
+%autosetup -T -D -b 1 -c -n %name-c6d7ee1f21d62ff8ffb741c7a12c3d8d3aa3d6ed.service
+
+%install
+# Create directory in build root for ODL
+mkdir -p $RPM_BUILD_ROOT/opt/%name
+# Copy ODL from archive to its dir in build root
+cp -r ../distribution-karaf-0.3.3-Lithium-SR3/* $RPM_BUILD_ROOT/opt/%name
+# Create directory in build root for systemd .service file
+mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
+# Copy ODL's systemd .service file to correct dir in build root
+cp ../../BUILD/%name-c6d7ee1f21d62ff8ffb741c7a12c3d8d3aa3d6ed.service/%name-c6d7ee1f21d62ff8ffb741c7a12c3d8d3aa3d6ed.service $RPM_BUILD_ROOT/%{_unitdir}/%name.service
+
+%postun
+# When the RPM is removed, the subdirs containing new files wouldn't normally
+#   be deleted. Manually clean them up.
+#   Warning: This does assume there's no data there that should be preserved
+rm -rf $RPM_BUILD_ROOT/opt/%name
+
+%files
+# ODL will run as odl:odl, set as user:group for ODL dir, don't override mode
+%attr(-,odl,odl) /opt/%name
+# Configure systemd unitfile user/group/mode
+%attr(0644,root,root) %{_unitdir}/%name.service
+
+
+%changelog
+* Fri Dec 11 2015 Daniel Farrell <dfarrell@redhat.com> - 3.3.0-1
+- Create Lithium SR3 RPM
diff --git a/rpm/specs/opendaylight-4.0.0-1.201512150335.spec b/rpm/specs/opendaylight-4.0.0-1.201512150335.spec
new file mode 100644 (file)
index 0000000..c4c233d
--- /dev/null
@@ -0,0 +1,68 @@
+# ODL is a noarch package, so this isn't necessary. It's also very slow.
+%define __jar_repack 0
+
+Name:       opendaylight
+Version:    4.0.0
+# The Fedora/CentOS packaging guidelines *require* the use of a disttag. ODL's
+#   RPM build doesn't do anything Fedora/CentOS specific, so the disttag is
+#   unnecessary and unused in our case, but both the docs and the pros (apevec)
+#   agree that we should include it.
+# See: https://fedoraproject.org/wiki/Packaging:DistTag
+Release:    1.201512150335.el7
+BuildArch:  noarch
+Summary:    OpenDaylight SDN Controller
+Group:      Applications/Communications
+License:    EPL-1.0
+URL:        http://www.opendaylight.org
+Source0:    https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.4.0-Test-beryllium-v201512150335/distribution-karaf-0.4.0-Test-beryllium-v201512150335.tar.gz
+Source1:    %name-c6d7ee1f21d62ff8ffb741c7a12c3d8d3aa3d6ed.service.tar.gz
+Buildroot:  /tmp
+# Required for ODL at run time
+Requires:   java >= 1:1.7.0
+# Required for creating odl group
+Requires(pre): shadow-utils
+# Required for configuring systemd
+BuildRequires: systemd
+
+%pre
+# Create `odl` user/group
+# Short circuits if the user/group already exists
+# Home dir must be a valid path for various files to be created in it
+getent passwd odl > /dev/null || useradd odl -M -d $RPM_BUILD_ROOT/opt/%name
+getent group odl > /dev/null || groupadd odl
+
+%description
+OpenDaylight Test-beryllium-v201512150335
+
+%prep
+# Extract Source0 (ODL archive)
+%autosetup -n distribution-karaf-0.4.0-Test-beryllium-v201512150335
+# Extract Source1 (systemd config)
+%autosetup -T -D -b 1 -c -n %name-c6d7ee1f21d62ff8ffb741c7a12c3d8d3aa3d6ed.service
+
+%install
+# Create directory in build root for ODL
+mkdir -p $RPM_BUILD_ROOT/opt/%name
+# Copy ODL from archive to its dir in build root
+cp -r ../distribution-karaf-0.4.0-Test-beryllium-v201512150335/* $RPM_BUILD_ROOT/opt/%name
+# Create directory in build root for systemd .service file
+mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
+# Copy ODL's systemd .service file to correct dir in build root
+cp ../../BUILD/%name-c6d7ee1f21d62ff8ffb741c7a12c3d8d3aa3d6ed.service/%name-c6d7ee1f21d62ff8ffb741c7a12c3d8d3aa3d6ed.service $RPM_BUILD_ROOT/%{_unitdir}/%name.service
+
+%postun
+# When the RPM is removed, the subdirs containing new files wouldn't normally
+#   be deleted. Manually clean them up.
+#   Warning: This does assume there's no data there that should be preserved
+rm -rf $RPM_BUILD_ROOT/opt/%name
+
+%files
+# ODL will run as odl:odl, set as user:group for ODL dir, don't override mode
+%attr(-,odl,odl) /opt/%name
+# Configure systemd unitfile user/group/mode
+%attr(0644,root,root) %{_unitdir}/%name.service
+
+
+%changelog
+* Tue Dec 15 2015 Daniel Farrell <dfarrell@redhat.com> - 4.0.0-1.201512150335
+- Create Beryllium Experimental Release Preview RPM