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

Unbuntu Core - configure hook, extensions registration, and folders owner/user changes #266

Merged
merged 7 commits into from
Dec 3, 2022

Conversation

Nox-MSFT
Copy link
Contributor

@Nox-MSFT Nox-MSFT commented Nov 30, 2022

Changes

  • Use SNAPCRAFT_* environment variable in snapcraft.yaml
  • Update document
  • Remove install and post-refresh hooks
  • Update configure hook to create required directories and register DU extensions
  • Create extension registration dirs using current user id and group id instead of 'adu'
  • Soft-linking DU folders to appropriate SNAP_* folders
  • Curl Content Downloader
    • Add a build option to support snap environment (executing curl from $SNAP/usr/bin/curl)
  • Script Handler
    • Add an option to run script using effective user (bypassing adu-shell)

- Use snapcraft environment vars in snapcraft.yaml
- Update doc
- Remove install and post-refresh hooks
- Update configure hook to setup dirs and register extensions
- Create extension registration dirs using current user id and group id.
- Add 'home' interface to the snap
- Update document
- Disable the Agent's 'command' support
- calling /usr/bin/curl-downloader (symlink to $SNAP/usr/bin/curl) for file download
- change ADUC_FILE_USER to 'root'
```sh
snap run --shell deviceupdate-agent
```shell
$ cp <home-dir>/du-config.json $SNAP_DATA/config
Copy link
Contributor

Choose a reason for hiding this comment

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

I used vi, but a little unsure about the cp here. Is it run inside the device-update snap shell? how do we specify the ?

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, this should be run inside the snap shell. Customer can choose their preferred method to author the du-config.json. As long as it is placed in the right location ($SNAP_DATA/config/du-config.json)

Copy link
Contributor

@shiyi-peng shiyi-peng left a comment

Choose a reason for hiding this comment

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

Approved with one comment

@Nox-MSFT Nox-MSFT merged commit c2875aa into feature/snap Dec 3, 2022
@Nox-MSFT Nox-MSFT deleted the user/nox-msft/snap/config-files branch December 3, 2022 00:20
shiyi-peng pushed a commit that referenced this pull request May 8, 2023
shiyi-peng pushed a commit that referenced this pull request May 31, 2023
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