-
Notifications
You must be signed in to change notification settings - Fork 23
spec file: quality assurance for test-cases #289
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
Conversation
- Introduce `%defattr(-,root,root,-)` in `%files` section - Prefix / alter package name: `test-cases`→`patchmanager-testcases` - Obey [SailfishOS:Chum PR 70](sailfishos-chum/main#70) - Overhaul descriptions: `Summary:` and `%description` - Generically applied `%{url}` at many places and `%{name}` at a few additional ones.
|
@nephros, too late I became aware, that I did not really review the test cases branch.
|
|
Checks & Balances question: Does the |
rpm/patchmanager.spec
Outdated
|
|
||
| %package test-cases | ||
| Summary: test cases for %{name} | ||
| %package %{name}-testcases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn´t do what we want.
A subpackage in a .spec is automatically prefixed with the main package name.
This change would result in a patchmanager-patchmanager-testcases rpm.
Either use
%package -n %{name}-testcases
which would work but is redundant
or
%package testcases
if you want to drop the hyphen
PS: example build here: https://build.sailfishos.org/package/binaries/home:nephros:devel/patchmanager?repository=sailfishos_4.3_arm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for reviewing: While I have ("involuntary" due to packaging my little scripts for SFOS) some extended experience with RPM, I never used sub-packages before. Hence I was not aware of this detail, the automatic prefixing with %{name}-.
So I reverted this (three times), but left out what ultimately did become the "second hyphen", see commit 6e5a006.
rpm/patchmanager.spec
Outdated
| systemctl-user daemon-reload | ||
|
|
||
| %files test-cases | ||
| %files %{name}-testcases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, see comment on %package above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… and a third time for the sub-package's %description (commit 6e5a006).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure all the macros using %{url} and friends don't trip up rpmlint somewhere.
Have you tested that those do what they are intended to do? [EDIT:] Nope, rpmlint at least is fune with it according to https://build.sailfishos.org/package/binaries/home:nephros:devel/patchmanager test build.
Also see inline coments about package name.
Yes it is and should be there. |
|
I took a closer look at the
Reference, e.g., http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html#S3-RPM-INSIDE-DIR-DIRECTIVE Please re-review! P.S.:
No, as so often due to being "outta time", unfortunately.
One does not need to perform separate test builds: On every commit to a PR destined for the master branch a test build is automatically performed at Patchmanager's GitHub-actions build-runner. A freshly built RPM is usually available a few minutes after each commit. BTW, the
They also nicely displayed here (above) at the |
Yes, but it builds the exactly branch the PR originates from, while my "obs" branch is master plus whatever changes I want to test against (usually the pr branch plus maybe some quick fixes if, or another branch I want to test together with the PR). |
Thanks that's better indeed. |
%defattr(-,root,root,-)in%filessectiontest-cases→testcases, because it becomes prefixed with%{name}-topatchmanager-testcases(avoiding two hyphens).Summary:,%descriptionand "Chum metadata"%{url}at many places and%{name}at a few additional ones.%files testcasesection conforming to classic, authoritative references.