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

Fix remote build #6

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from

Conversation

sergio-costas
Copy link
Contributor

@sergio-costas sergio-costas commented Oct 20, 2023

The remote build seems to put all the files in a different place than /root, so it must be taken into account.

Pull Request Template

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please check only the options that are relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Test Configuration:

  • OS (please include version):
  • Any other relevant environment information:

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have checked my code and corrected any misspellings

The remote build seems to put all the files in a different
place than /root, so it must be taken into account.
Copy link
Contributor

@jssotomdz jssotomdz left a comment

Choose a reason for hiding this comment

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

makes sense

Copy link
Contributor

@jssotomdz jssotomdz left a comment

Choose a reason for hiding this comment

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

@kenvandine comments

then we should be able to replace "prefix=/root/stage" in that sed with "prefix=$CRAFT_STAGE"
without the python script

sed -i "s#prefix=$CRAFT_STAGE/usr#prefix=$CRAFT_STAGE#g" $CRAFT_STAGE/usr/lib/pkgconfig/$PCFILE

if we want to use a script like this, we should put it in a shared repository and reference it in a part of it's own
like maybe github.com/ubuntu/desktop-snaps/build-scripts
the use a part to get those scripts into the build env

@jssotomdz jssotomdz self-requested a review October 20, 2023 15:51
@sergio-costas
Copy link
Contributor Author

Mmm... yes, I think that that would work too...

@kenvandine
Copy link
Member

It might be useful to have a build-scripts dir under the desktop-snaps repo with convenient scripts like that so they can be reused during the builds of other snaps. @sergio-costas do you have other useful scripts like this? Or was this just created for this one use case?

@sergio-costas
Copy link
Contributor Author

Anyway, the script should be modified to ensure that all variables have $prefix appended.

@sergio-costas
Copy link
Contributor Author

I have this repo: https://github.com/sergio-costas/snap-build-tools I can add this script there.

@sergio-costas
Copy link
Contributor Author

@kenvandine @jssotomdz I created a MR to add the script to snap-build-tools: sergio-costas/snap-build-tools#1

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.

3 participants