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] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match. #26547

Closed
wants to merge 1 commit into from

Conversation

ericonr
Copy link
Member

@ericonr ericonr commented Nov 21, 2020

common/shlibs match.

@ericonr ericonr changed the title [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and [WIP] hooks/shlib-provides: verify that shlibs in shlib-provides and common/shlibs match. Nov 21, 2020
@ericonr
Copy link
Member Author

ericonr commented Nov 21, 2020

I think what this also needs to check is that the file exists in the package.

common/shlibs have sane values.

- Check if shlib-provides and common/shlibs agree
- Check if file for shlib is actually present in final package
@ericonr
Copy link
Member Author

ericonr commented Nov 21, 2020

How do I get the current package's name from inside a hook?

@ahesford
Copy link
Member

I haven't looked at the implementation details, but this is a great idea. Failing when common/shlibs declares something not provided by the package will help catch shlib changes that would otherwise fly under the radar and break dependencies.

Copy link
Member

@Chocimier Chocimier left a comment

Choose a reason for hiding this comment

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

Good idea, but realization needs some improvements.

msg_red "file for shlib '$1' isn't in ${pkgname}\n"
fi
fi
shift 2
Copy link
Member

Choose a reason for hiding this comment

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

There is third optional column in shlibs. 99-pkglint.sh use grep shlibs -e ... | while read conflictFile conflictPkg ignore; do ... to handle that. And then interpretation of third column is needed for glibc.

while [ $# -gt 0 ]
do
if [ "$($XBPS_UHELPER_CMD getpkgname "$2")" = ${pkgname} ]; then
if [[ "${pkgshlibs}" != *"$1"* ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

This need be a loop over shlib-provides lines to avoid matching substrings.

@@ -53,4 +86,6 @@ hook() {
collect_sonames ${PKGDESTDIR}
# 32bit pkg
collect_sonames ${_destdir32}

verify_sonames ${PKGDESTDIR} || return 1
Copy link
Member

Choose a reason for hiding this comment

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

Do we want it to run when noshlibprovides is set?

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Apr 30, 2022
@github-actions github-actions bot closed this May 14, 2022
@ericonr ericonr reopened this May 16, 2022
@ericonr ericonr removed the Stale label May 16, 2022
@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions
Copy link

Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Nov 13, 2022
@github-actions github-actions bot closed this Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants