Commit 3debc5c1 authored by Micha Müller's avatar Micha Müller

Various changes and improvements to RPM spec files

It is now possible to create proper RPM packages of Pusher and associated dependencies
After package installation one should consider modifying the config files in /etc/dcdb first
The package build process is still anything but good practice
parent 9a424b21
## Keep this directory in git
## Ignore all files except .gitignore
*
!.gitignore
## Keep this directory in git
## Ignore all files except .gitignore
*
!.gitignore
## Keep this directory in git
## Ignore all files except .gitignore
*
!.gitignore
global {
mqttBroker 127.0.0.1:1883
mqttprefix /test
threads 24
maxMsgNum 100
verbosity 5
daemonize false
tempdir .
cacheInterval 120
qosLevel 1
}
;restAPI {
; address 127.0.0.1:8000
; certificate ../../deps/openssl-1.1.1c/test/certs/ca-cert.pem
; privateKey ../../deps/openssl-1.1.1c/test/certs/ca-key.pem
; dhFile ../../deps/openssl-1.1.1c/crypto/dh/dh2048.pem
; user admin {
; password admin
; PUT
; GET
; }
; user asdf {
; password qwertz
; GET
; }
;}
plugins {
plugin perfevent {
path usr/lib64/dcdb
config
}
plugin procfs {
path usr/lib64/dcdb
config
}
plugin sysfs {
path usr/lib64/dcdb
config
}
}
operatorPlugins {
}
[Unit]
Description=DCDB Pusher
After=collectagent.service
[Service]
Environment=LD_LIBRARY_PATH=/usr/lib64/dcdb/
ExecStart=/usr/bin/dcdbpusher /etc/dcdb/
StandardOutput=journal
StandardError=journal
Restart=always
[Install]
WantedBy=multi-user.target
......@@ -31,17 +31,21 @@ More information, source code, and the full DCDB project can be found at
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/lib
mkdir -p %{buildroot}/bin
#mkdir -p %{buildroot}%{_libdir}
#mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_libdir}/dcdb
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_sysconfdir}
mkdir -p %{buildroot}%{_sysconfdir}/dcdb
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
#does not install to correct paths. Install manually instead
#make DCDBDEPLOYPATH=%{buildroot} install
#make DCDBDEPLOYPATH=%{buildroot} install_conf
install -p -m 755 dcdbpusher %{buildroot}%{_bindir}
install -p -m 755 libdcdbplugin_*.so %{buildroot}%{_libdir}/dcdb/
install -p -m 644 config/* %{buildroot}%{_sysconfdir}/dcdb/
#custom systemd service file and pusher config as the ones provided in the repo
#had to be adapted for package install paths
install -p -m 644 %{_sourcedir}/dcdbpusher.conf %{buildroot}%{_sysconfdir}/dcdb/
install -p -m 644 %{_sourcedir}/pusher.service %{buildroot}%{_unitdir}
%post
%systemd_post pusher.service
......@@ -57,12 +61,10 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root)
/lib/*.so
/bin/dcdbpusher
#%%{_libdir}/*.so
#%%{_bindir}/dcdbpusher
%{_libdir}/dcdb/*.so
%{_bindir}/dcdbpusher
%{_unitdir}/pusher.service
%{_sysconfdir}/*.conf
%{_sysconfdir}/dcdb/*.conf
%changelog
* Tue Dec 10 2019 Micha Mueller <micha.mueller@lrz.de> 0.3-1
......
......@@ -25,18 +25,20 @@ More information, source code, and the full DCDB project can be found at
%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/
mkdir -p %{buildroot}%{_libdir}/dcdb
cd ../../../install/lib
install -p -m755 libboost_*.so.1.70.0 %{buildroot}%{_libdir}/dcdb/
install -p -m755 libcrypto.so.1.1 %{buildroot}%{_libdir}/dcdb/
install -p -m755 libfreeipmi.so.17 %{buildroot}%{_libdir}/dcdb/
#install -p -m755 libgcrypt.so* %{buildroot}%{_libdir}/dcdb/
#install -p -m755 libgpg-error.so* %{buildroot}%{_libdir}/dcdb/
install -p -m755 libmosquitto*.so.1 %{buildroot}%{_libdir}/dcdb/
install -p -m755 libnetsnmp*.so.35 %{buildroot}%{_libdir}/dcdb/
#install -p -m755 libopamgt.so* %{buildroot}%{_libdir}/dcdb/
install -p -m755 libssl.so.1.1 %{buildroot}%{_libdir}/dcdb/
#install -p -m755 libuv.so* %{buildroot}%{_libdir}/dcdb/
#-p /sbin/ldconfig deprecated since ca. Fedora28
%post -p /sbin/ldconfig
%clean
......@@ -45,11 +47,12 @@ rm -rf %{buildroot}
%preun
#nothing to do pre-uninstallation
#-p /sbin/ldconfig deprecated since ca. Fedora28
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
/lib/lib*.so*
%{_libdir}/dcdb/lib*.so*
%changelog
* Wed Dec 11 2019 Micha Mueller <micha.mueller@lrz.de> 0.3-1
......
## Keep this directory in git
## Ignore all files except .gitignore
*
!.gitignore
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