Skip to content

Create initial spec for RPM packaging#288

Merged
rootfs merged 2 commits intoopenshift:mainfrom
mangelajo:rpm-spec
Sep 20, 2021
Merged

Create initial spec for RPM packaging#288
rootfs merged 2 commits intoopenshift:mainfrom
mangelajo:rpm-spec

Conversation

@mangelajo
Copy link
Contributor

@mangelajo mangelajo commented Sep 20, 2021

This can be built with the following commands for a release (download the source from github)

$ spectool -g -R microshift.spec
$ rpmbuild -ba microshift.spec

And with the following commands for local development and changes:

# build an rpm for your local architecture and distro
$ make devel-rpm

# build an srpm which you can upload to a builder service
$ make devel-srpm

Related-Issue: #278

Signed-off-by: Miguel Angel Ajo majopela@redhat.com

This can be built with:
```
$ spectool -g -R microshift.spec
$ rpmbuild -ba microshift.spec
```

Related-Issue: openshift#278

Signed-off-by: Miguel Angel Ajo <majopela@redhat.com>
@openshift-ci openshift-ci bot requested review from copejon and oglok September 20, 2021 12:29
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 20, 2021

Hi @mangelajo. Thanks for your PR.

I'm waiting for a redhat-et member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 20, 2021
microshift.spec Outdated

%install
install -d %{buildroot}%{_bindir}
install -p -m 755 ./_output/microshift %{buildroot}%{_bindir}/microshift
Copy link
Member

Choose a reason for hiding this comment

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

can you also add selinux modules here? or it goes to another rpm?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that was my plan as per conversation in #277 (comment)

I can do that if @cooktheryan is ok :)


Name: microshift
Version: %{version}
Release: %{release}%{dist}
Copy link
Member

Choose a reason for hiding this comment

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

where is dist defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It comes from rpmbuild, normally the distro where you are building, or, a mock envionment created by the builder that you request for a specific distro.

I passed the output SRPM from this, and https://copr.fedorainfracloud.org/coprs/mangelajo/microshift/build/2829853/

I was thinking that we could automate that for every tag, and then have one for every new git commit in the form of "devel" version and "%{timestamp}.git%{commit-sha}" release.

Copy link
Member

Choose a reason for hiding this comment

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

i see, thanks for the education.

@rootfs
Copy link
Member

rootfs commented Sep 20, 2021

/approve
/assign @copejon

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 20, 2021
@mangelajo
Copy link
Contributor Author

Thanks for the eyes @rootfs

@rootfs
Copy link
Member

rootfs commented Sep 20, 2021

/lgtm
(good for me, waiting for @cooktheryan for selinux and @copejon on build decisions)

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 20, 2021
@mangelajo
Copy link
Contributor Author

@rootfs Probably we should add the service definition and install it/enable it as soon as the RPM is installed?

@mangelajo
Copy link
Contributor Author

Probably we should also add dependencies (cri-o cri-tools)

@cooktheryan
Copy link
Contributor

@mangelajo feel free to package them together. I can get you the required steps to generate the .pp file if you need them. Most items you should be able to derive from the install.sh

* Support local builds + `make devel-rpm` and `make devel-srpm`.
* Started changelog
* Add systemd unit files
* Create necessary directories (from install.sh)
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 20, 2021
@mangelajo mangelajo requested a review from rootfs September 20, 2021 17:46
@rootfs
Copy link
Member

rootfs commented Sep 20, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 20, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 20, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rootfs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants