10.12., 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 7e4fd8ab authored by Micha Müller's avatar Micha Müller

Adds (experimental) .spec and Make-files to package pusher into RPM

Experimental status! Creates installable package, but actually installing it may break the system. For tests a disposable VM is recommended
parent 170289bf
.PHONY: info all clean pusher
info:
@echo "Makefile to build RPM packages from this DCDB installation"
@echo "Targets: "
@echo "info: Print this info message"
@echo "all: Build all packages"
@echo "pusher: Build pusher- and required libs-package"
pusher:
rpmbuild --define "_topdir `pwd`" -bb SPECS/dcdb-pusher-0.3.spec
rpmbuild --define "_topdir `pwd`" -bb SPECS/dcdb-pusher-libs-0.3.spec
#Deprecated by dcdb-pusher-deps package.
#May get useful again if the build system gets overhauled and only dependencies
#that require actual patching are shipped with DCDB.
#mosquitto:
# cp ../../deps/distfiles/mosquitto-1.5.5.tar.gz SOURCES/
# cp ../patches/mosquitto-1.5.5.patch SOURCES/
# rpmbuild --define "_topdir `pwd`" -ba SPECS/libmosquitto-dcdb-1.5.5.spec
all: pusher
clean:
rm -rf BUILD/* BUILDROOT/* RPMS/* SOURCES/* SRPMS/*
Name: dcdb-pusher
Summary: Pusher component of the DCDB project
Version: 0.3
Release: 1
License: GPLv2+
URL: https://dcdb.it/
Source: https://gitlab.lrz.de/dcdb/dcdb/tree/master/dcdbpusher
Packager: DCDB project <info@dcdb.it>
Requires: dcdb-pusher-libs
BuildRequires: systemd-rpm-macros
BuildRequires: sed
%description
Pusher is the data acquisition component for the DataCenter Data Base (DCDB)
project. DCDB is a holistic monitoring solution for HPC environments. This
package bundles the Pusher framework binary as well as the following plugin
libraries: sysfs, perfevent, ipmi, pdu, bacnet, snmp, procfs, tester, gpfsmon,
opa, msr.
More information, source code, and the full DCDB project can be found at
https://dcdb.it
%prep
#nothing to prepare
%build
#nothing to build
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/lib
mkdir -p %{buildroot}/bin
#mkdir -p %{buildroot}%{_libdir}
#mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_sysconfdir}
cd ../../dcdbpusher
make DCDBDEPLOYPATH=%{buildroot} install
make DCDBDEPLOYPATH=%{buildroot} install_conf
cd ../scripts
sed -e 's|%%DCDB_PREFIX%%|''|g' pusher.service > %{buildroot}%{_unitdir}/pusher.service
%post
%systemd_post pusher.service
%clean
rm -rf %{buildroot}
%preun
%systemd_preun pusher.service
%postun
%systemd_postun_with_restart pusher.service
%files
%defattr(-,root,root)
/lib/*.so
/bin/dcdbpusher
#%%{_libdir}/*.so
#%%{_bindir}/dcdbpusher
%{_unitdir}/pusher.service
%{_sysconfdir}/*.conf
%changelog
* Tue Dec 10 2019 Micha Mueller <micha.mueller@lrz.de> 0.3-1
- Initial release
Name: dcdb-pusher-libs
Summary: Required runtime libraries for dcdb-pusher
Version: 0.3
Release: 1
License: Various
URL: https://dcdb.it/
Source: https://gitlab.lrz.de/dcdb/dcdb/tree/master/dcdbpusher
Packager: DCDB project <info@dcdb.it>
%description
This is a supplimentary package for dcdb-pusher. Pusher relies on a set of
runtime libraries that are either not (yet) available on the end user system or
require custom patches. This package bundles all runtime libraries required
for Pusher to run.
More information, source code, and the full DCDB project can be found at
https://dcdb.it
%prep
#nothing to prepare
%build
#nothing to build
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/lib
install -m755 ../../../install/lib/libboost_*.so %{buildroot}/lib/
install -m755 ../../../install/lib/libcrypto.so %{buildroot}/lib/
install -m755 ../../../install/lib/libfreeipmi.so %{buildroot}/lib/
#install -m755 ../../../install/lib/libgcrypt.so* %{buildroot}%{_libdir}/dcdb/
#install -m755 ../../../install/lib/libgpg-error.so* %{buildroot}%{_libdir}/dcdb/
install -m755 ../../../install/lib/libmosquitto*.so %{buildroot}/lib/
install -m755 ../../../install/lib/libnetsnmp*.so %{buildroot}/lib/
#install -m755 ../../../install/lib/libopamgt.so* %{buildroot}%{_libdir}/dcdb/
install -m755 ../../../install/lib/libssl.so %{buildroot}/lib/
#install -m755 ../../../install/lib/libuv.so* %{buildroot}%{_libdir}/dcdb/
%post -p /sbin/ldconfig
%clean
rm -rf %{buildroot}
%preun
#nothing to do pre-uninstallation
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
/lib/lib*.so*
%changelog
* Wed Dec 11 2019 Micha Mueller <micha.mueller@lrz.de> 0.3-1
- Initial release
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment