Skip to content
This repository was archived by the owner on Apr 16, 2026. It is now read-only.

RPM Build script && Use host glibmm#96

Merged
dhilst merged 4 commits intorepo-classfrom
rpm-build
Mar 17, 2025
Merged

RPM Build script && Use host glibmm#96
dhilst merged 4 commits intorepo-classfrom
rpm-build

Conversation

@dhilst
Copy link
Copy Markdown
Collaborator

@dhilst dhilst commented Feb 25, 2025

Add a small script and a .spec file to generate the RPM

-- Edit --

  • glibmm was linking dynamically from connan
  • The problem is that the generated rpm cannot depend on connan shared objects because they will not exist in the host (if the tool wasn't built there)
  • To solve this, we have to link against host's glibmm
  • To do that, I load pkg-config module into cmake before conan
  • And use it to find glibmm-2.4
  • I decided to test with RHEL10, and the build fails because glibmm is at 2.68 version (we're using 2.66), and pkg-config can't find glibmm-2.4 package. 2.4 was the ABI, which was supposed to be stable, but here we are. All the code depending on glibmm was moved to files.cpp to mitigate the problem and should be kept there
  • I added the buildrpm.sh script to generate an RPM in the host, so this is expected to run in the build machine with the proper OS, etc, the rpm is generated at ~/rpmbuild/RPMS/ folder, as usual. The .spec file is not being generated by CPack

@dhilst dhilst self-assigned this Feb 25, 2025
@dhilst dhilst force-pushed the rpm-build branch 2 times, most recently from ac7d337 to 1521f2c Compare February 25, 2025 17:57
@dhilst dhilst marked this pull request as ready for review February 25, 2025 18:00
@dhilst dhilst marked this pull request as draft February 25, 2025 18:05
@dhilst dhilst marked this pull request as ready for review March 7, 2025 18:16
@dhilst dhilst changed the title RPM Build script RPM Build script && Use host glibmm Mar 7, 2025
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 7, 2025

@dhilst
Copy link
Copy Markdown
Collaborator Author

dhilst commented Mar 17, 2025

I'm merging this into repo-class to narrow the number of PR stacked

@dhilst dhilst merged commit ae1436e into repo-class Mar 17, 2025


std::string checksum(const std::string& data);
std::string checksum(const std::filesystem::path& path, const std::size_t chunkSize = 16384);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic number should be a constexpr std::uint_fast16_t elsewhere.

Comment thread rpmspecs/opencattus.spec
License: Apache 2.0
URL: https://versatushpc.com.br/opencattus/
Source0: opencattus-%{VERSION}.tar.gz
BuildRequires: make,cmake,cppcheck,ninja-build,newt-devel,gcc-toolset-14,gcc-toolset-14-libubsan-devel,gcc-toolset-14-libasan-devel
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good idea to target what will be shipped in RHEL 10. I don't remember the version they are targetting.

Comment thread rpmspecs/opencattus.spec
/usr/bin/cloysterhpc

%changelog
* Tue Feb 25 2025 Daniel Hilst <danielhilst@versatushpc.com> - 1.0-1
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your own email address is wrong.

@viniciusferrao
Copy link
Copy Markdown
Owner

Oh that was already merged @dhilst? Can you look at the comments? And maybe address in other PR?

@dhilst
Copy link
Copy Markdown
Collaborator Author

dhilst commented Mar 24, 2025

Oh that was already merged @dhilst? Can you look at the comments? And maybe address in other PR?

@viniciusferrao This was merged in another PR, not in the master, you can review the changes in that PR:

#95

dhilst added a commit that referenced this pull request Jul 2, 2025
* WIP: Repository class refactoring

* Add parse() and unparse() methods, fix more things

* Add stringstream read specialization, as suggested by @dhilst

* Move some common functions to functions.h

* Remove this->

* Fix repo class

* Fix const ref and declaration name

* Fix naming

* Rename required files

* fixup! Rename required files

* WIP repositories class sketches

* Make Cluster generic over Runner

This commit adds a type parameter in Cluster class regarding
the Runner. This is in an intetion to decouple cluster
from the Runner in the near future. Then all these type
parameters spreding all over the place can be removed

Runner is a special case here, it what runs commands so
I want to be very strict in where we can use it.

Another thing to pay attention is that Cluster is a kind
of "god" object where every other parts of the code rely
into, we want to break this into smaller pieces and have
the code depending on more atomic parts, this will help
with testability.

* Removing Runner from Cluster

* Detach the presenter/view build from the rest of the code

The intent is that this become an internal library in future

Rationale: Having better separation of concerns and less coupling
between some complex components (like the UI) from the remaining
of the code. This may make the building faster on average aftewars.

* WIP Refactoring RepoManager

* Isolating Glib::KeyFile

* Add name spaces and move files to their places

I'm favoring to move stuff to models/ or services/
folders/namespaces. There is a lot of moves to do
yet but this already outlines some structure

* Refactoring RepoManager

* Testing RepoManager refactoring

* Run clang-format

* Testing release build

* Run clang-format again

* Remove empty file

* Remove commented code

* Add RPMRepoManager sketch implementation

* Replace old code with RPMRepositoryManager in repos.cpp

* Remove unused code

* Save RPMRepositoryFile only once for multiple enable calls

* Run clang-format

* RPM Build script && Use host glibmm (#96)

* Add script to build rpms

* Fix debug build

* Link against host Glibmm using pkg-config

* Extract glibmm from diskImage, move it to files.cpp

---------

Co-authored-by: Daniel Hilst <daniel@versatushpc.com.br>

* OFED doca + Revam repos + Remove deps (#97)

* Adding OFED option and Cluster singleton with global getter

* Add singleton class

* Use Singleton<T> class for other singletons

* Make all Dry Run message LOG_INFO

* Remove print and test option

* Implement DOCA kernel driver installation into the netboot image

* Fix OFED installation in headnode

* Fix review comments

* Generalize testing and fix createHTTPRepo function

* Remove CATTUS_... environment variables in favor of --force + --skip flags

* Rename BaseRunner to IRunner for consistency

* Wrap magic_enum lib

* Remove package_manager in favor of IOSService interface

* Deduplicate code

* Run clang-format

* Remove hwinfo, cloyster/hardware.h and tests

The tests are breaking because of the refactoring, I'll
redo the tests after I finish it

* Remove inifile in favor of KeyFile

* Removing old repository code

* Add comments and FIXME

* Use boost to parse options

* Run clang-format

* Decouple message bus from implementors

* Fix test command handling

* Fix warning in options.h

* Restores runtime behavior after refactoring (WIP)

* Replace boost::program_options with CLI11

* Implement repository sanity checking logic in repos.cpp

* WIP generalizing repository addition

* Restore testing code infra

* Add test on the CI

* Move singletons initalization to its own file

* [WIP] Add libbacktrace to the dependencies

* Decouple I/O from repository config classes to make them testable

* Remove stacktrace attempt

There is no libstdc++exp.a in Rocklinux repositories, stacktrace
requires it.

* Continuing the repositories core logic implementation

* Remove old repository installation for xCAT and OFED

* Add test files

* Add ScriptBuilder service

* Update NFS with script builder

* Refactor NFS to use ScriptBuilder for installation and image customization.

* WIP Fixing repositories bugs after the revamp

* Fixing image generation and bugs after revamp

* Fix the tests

---------

Co-authored-by: Daniel Hilst <daniel@versatushpc.com.br>

---------

Co-authored-by: Daniel Hilst <daniel@versatushpc.com.br>
Co-authored-by: Daniel Hilst <danielhilst@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants