Closed Autumn-Roy closed 1 year ago
I have to update the RPM packages for our systems as well (different user, ...), so here is how I do it:
v0.x.y-<myversion>
At step (*) you can manipulate the spec file to change the BuildRequires
.
You could also remove go-toolset
from the spec file and download the golang version you want. We do that for Debian packages. For the RPM builds (Alma8.5 and UBI8), I found usable go-toolset
RPMs. Since golang is only a build requirement and using a more recent version is often beneficial (security, ...), we do not use the golang versions provided by the distributions itself. So, if I don't find recent golang as RPMs for Alma8.5, I will switch to a manual download as well.
Thanks! Now I can build the cc-metric-collector as a RPM package.
I also have another question: in the service and conf file, I find that the user and group are 'clustercockpit', but some types of collector get the information use 'root'. Is it right here in service and conf file?
When I install the RPM package, there is an error in %pre, so I ignore %sysusers_create_package scripts/%{name}.sysusers
. Is it this step cause the service start fail?
It depends on the center whether they want to run cc-metric-collector as root. We don't run it as root but with a separate user. We cannot use some collectors but if we would like to, we could enable password-less sudo access for the user to required commands with args like /usr/bin/lctl get_param
for the LustreCollector.
The %sysusers_create_package
macro might require a package installation. We used BuildRequires: systemd-rpm-macros
hoping it contains the macro. The macro takes the .sysusers
file and creates the listed users. So it this step fails, there is no user to start your service. You can create the user differently in %pre
if you want.
Note: RedHat recommends to add Requires(pre): /usr/bin/systemd-sysusers
to the spec file when using the %sysusers_create_package
macro.
Can I close the issue or are there more questions?
I have no more questions, thanks.
I want to build the cc-metric-collector as a RPM package. When I followed the README in docs/building.md, there is an error that go-toolset not found. Then I search go-toolset on Google, but only find go-toolset-7 can be installed by yum. However the error also occurred after I installed the go-toolset-7. Can I change the
BuildRequires: go-toolset
toBuildRequires: go-toolset-7
?