Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: feat: Add RPM spec file for Fedora package generation #636

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

f-trivino
Copy link

This PR introduces an RPM spec file for the freeipa-webui, enabling Fedora package generation. The spec file is configured to use autochangelog and autorelease macros for streamlined changelog management and automated release numbering.

Fixes: #635

f-trivino and others added 2 commits February 12, 2025 21:10
This PR introduces an RPM spec file for the freeipa-webui, enabling Fedora package generation. The spec file is configured to use `autochangelog` and `autorelease` macros for streamlined changelog management and automated release numbering.

Fixes: freeipa#635
Signed-off-by: Francisco Trivino <[email protected]>
The spec file expects that a freeipa-server is already installed,
it also expects the freeipa-server to already be configured,
if it's not, then the package is not going to work correctly,
however, the server can be configured later and this package should
start to work without any issues.
The package should be as simple as possible for the end-user,
therefore an apache-httpd configuration is provided, as well as
restarting the service.

The workflow on how to generate the .rpm is as follows:
```
spectool -g freeipa-webui.spec
nodejs-packaging-bundler freeipa-webui 0.1.1 freeipa-webui-0.1.1.tar.gz
mv freeipa-webui-0.1.1.tar.gz ~/rpmbuild/SOURCES/
rpmbuild -ba freeipa-webui.spec
```

The package itself can be then installed using:
```
sudo rpm -i ~/rpmbuild/RPMS/noarch/freeipa-webui-0.1.1-1.fc41.noarch.rpm
```

Signed-off-by: David Hanina <[email protected]>
@duzda
Copy link
Contributor

duzda commented Feb 20, 2025

There's still a decent amount of caveats, however it should *work*, the requires are possibly wrong. Bundled requires have been omitted, but they should be listed as well. Lastly, we could hook up a github action and omit generating dist folder in the spec file, but this should be alright as well, even though documentation strictly says to not use npm. I believe they only do so to avoid internet access, which we're not using.

@duzda
Copy link
Contributor

duzda commented Feb 21, 2025

Lastly, documentation should also be added, which requires processing the files via sphinx, therefore adding python dependency etc., however as of right now our documentation is tiny anyways.

@duzda
Copy link
Contributor

duzda commented Feb 24, 2025

If we decide to go for the tarball only, we can also simply prepare the dist package during the release, however I'm not a huge fan of this approach, as this seems to be "less" according to the guidelines.

@abbra
Copy link

abbra commented Feb 24, 2025

The idea is not to have a separate RPM for the modern webui but rather integrate it into upstream freeipa release. Eventually, existing webui in freeipa upstream will get replaced by this version. This obsoletes the need to have a separate RPM package -- a separate one is only needed for development purposes.

An upstream development of the modern webui will stay separate as well -- in this repo. This will allow us to export releases when they are ready and import those releases into FreeIPA as required. FreeIPA has to maintain 3-4 branches at the same time, so if we just reference the same release, it will save us resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a spec file to generate Fedora RPM compatible with RHEL
3 participants