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

base: recipes-support: fioconfig: add toml helper support #164

Merged
merged 2 commits into from
Apr 29, 2020

Conversation

mike-scott
Copy link
Contributor

ficonfig has been updated to include an aktualizr-toml-update
helper script. By using fioctl devices config updates command,
we can now easily set the docker-apps and tags settings for
aktualizr-lite.

Signed-off-by: Michael Scott [email protected]

@mike-scott mike-scott self-assigned this Apr 29, 2020
@@ -31,6 +31,8 @@ do_install_append() {
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/fioconfig.service ${D}${systemd_system_unitdir}/
install -m 0644 ${WORKDIR}/fioconfig-extract.service ${D}${systemd_system_unitdir}/
install -d ${D}${bindir}
install -m 0755 ${S}/src/${GO_IMPORT}/contrib/aktualizr-toml-update ${D}${bindir}
Copy link
Member

Choose a reason for hiding this comment

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

this is shear curiosity - my version of this same change had 0655 for the file mode. I didn't find any clear guidance on what you should mark binaries with?

Copy link
Member

Choose a reason for hiding this comment

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

As this is a script it should have +x by default, otherwise I'm surprised it worked.

Copy link
Member

Choose a reason for hiding this comment

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

I believe it is probably better to have this script available via /usr/share or /usr/lib instead, in a folder that is specific to fioconfig, otherwise it could later create conflicts with other binaries, besides the confusion on the script scope.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@doanac
A value of 6 for user (vs. 5 for group and other) would be: read + write
Where a value of 7 for user would be: read + write + execute

You could in theory leave this as 0644 (u=read+write, go=read) and make sure to call it with:
/bin/sh /usr/bin/aktualizr-toml-update
But I don't think we want that as some handlers may not be shell scripts.

Copy link
Member

Choose a reason for hiding this comment

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

It is fine for the script to have +x for every user.

@mike-scott mike-scott force-pushed the fioconfig-update branch 2 times, most recently from c3e473a to 9ede7a1 Compare April 29, 2020 18:26
@mike-scott
Copy link
Contributor Author

Changes:

  • moved helper to /usr/share/fioconfig/handlers
  • bumped fioconfig to include last commit from @doanac
  • added a path monitor service to make sure fioconfig service is started once /var/sota/sota.toml exists

Copy link
Member

@doanac doanac left a comment

Choose a reason for hiding this comment

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

+1

doanac added a commit to foundriesio/fioctl that referenced this pull request Apr 29, 2020
@doanac
Copy link
Member

doanac commented Apr 29, 2020

I've updated fioctl now as well: foundriesio/fioctl@97f9a68

@mike-scott
Copy link
Contributor Author

Change:

  • changed the file addition to not be so specific:
FILES_${PN} += " \
	${systemd_unitdir}/system/fioconfig.service \
	${systemd_unitdir}/system/fioconfig.path \
	${systemd_unitdir}/system/fioconfig-extract.service \
-	${datadir}/fioconfig/handlers/aktualizr-toml-update \
+	${datadir}/fioconfig/handlers \
"

ficonfig has been updated to include an aktualizr-toml-update
helper script.  By using fioctl devices config updates command,
we can now easily set the docker-apps and tags settings for
aktualizr-lite.

Signed-off-by: Michael Scott <[email protected]>
Once /var/sota/sota.toml is created, we should start the fioconfig
service automatically.

Signed-off-by: Michael Scott <[email protected]>
@mike-scott
Copy link
Contributor Author

Rebased on current master

Copy link
Member

@ricardosalveti ricardosalveti left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mike-scott mike-scott merged commit e9db4a1 into foundriesio:master Apr 29, 2020
@mike-scott mike-scott deleted the fioconfig-update branch September 23, 2020 06:42
quaresmajose pushed a commit that referenced this pull request Nov 9, 2022
Relevant changes:
- bcfa079 Merge pull request #167 from chrisdimich/hardknott
- 1d0c237 nitrogen8mp: add device trees
- b7840d2 linux-boundary: bump revision
- 7ca4269 Merge pull request #164 from chrisdimich/hardknott
- 0d4f8c0 nitrogen8mp: update DDR binaries
- af3457a Merge pull request #162 from chrisdimich/hardknott
- a65ed1a nitrogen8mp: define variables needed for imx-boot recipe
- bbc9522 Merge pull request #159 from Freescale/backport-157-to-hardknott
- e77fd19 imx7d-pico: Set UBOOT_SUFFIX to img
- d81507f imx7s-warp: Set UBOOT_SUFFIX to imx

Signed-off-by: Ricardo Salveti <[email protected]>
quaresmajose pushed a commit that referenced this pull request Jan 10, 2023
Bumping pflag to version v1.0.5-4-gd5e0c06, which comprises the following commits:

    d5e0c06 allow for blank ip addresses (#316)
    85dd5c8 Add IPNetSlice and unit tests (#170)
    6971c29 remove dead code for checking error nil (#282)
    81378bb Add exported functions to preserve `pkg/flag` compatibility (#220)
    14457a6 Remove require pflag v1.0.3
    e8f2996 Fix typo in go.mod
    8e39cc4 gofmt
    68f4136 Add SliceValue Comments
    b22fc70 Expand SliceValue support to all slice and array types.
    c6c0f0f Add first SliceValue implementations
    9722382 Added String-To-Int64 option parsing (#211)
    4890c25 Fix package doc
    b3e76d4 Fix descriptions for StringSlice functions
    24fa697 fix misspell (#197)
    916c5bf Fix typo in count.go (#196)
    aea12ed add int32 & int64 slice support (#194)
    454a7fb add float32 & float64 slice support (#192)
    082b515 Travis: test on 1.9 as well (#191)
    252d3ee travis: update to 1.10 and 1.11 in travis tests (#190)
    0873577 Fix golint import path (#189)
    b5e1a80 Sentence restructure and grammar fix (#188)
    298182f Fix panic when parsing unknown flag followed by empty argument (#173)
    d929dcb Handle single string=>string flags without quotes (#179)
    947b89b Add map valued (string->string, string->int) flags. (#133)
    9a97c10 bytes: add support for base64 encoded flags (#177)
    3ebe029 Allow bubbling up of -test.* flags (#169)
    583c0c0 Typo correction in flag.go (#164)
    329ebf1 Allow Users To Show Deprecated Flags (#163)
    1ce0cc6 make x.Parsed() return true after AddGoFlagSet(x) and pflag.Parse() (#162)
    1cd4a0c add ability to ignore unknown flags (#160)
    ad68c28 Add multiline wrapping support (#155)
    45e82a3 Implement BytesHex type of argument (#115)
    ee5fd03 doc: clarify difference between string slice vs. array (#158)
    6a877eb DurationSlice: implementation and tests (#122)
    4c012f6 Add uintSlice and boolSlice to name prettifier (#150)
    97afa5e Prevent printing when using ContinueOnError (#144)
    1f33b80 add int16 flag (#143)
    a9789e8 Remove redundant break
    2c300e7 Fixing Count flag usage string (#141)
    be7121d Fix SetNormalizeFunc (#137)
    5c2d607 Generate flag error output for errors returned from the parseFunc (#138)
    7aff26d New: renamed intSlice to ints in usage
    230e229 Fixed: updated unittest
    adc6ccc New: added a default name to avoid stringSlice in the usage message.
    e57e3ee Delete example, what isn't even shown in docs
    80fe0fb Testing for Shorthand Lookup
    75859d1 Add example to FlagSet.ShorthandLookup
    86425cb Add example to ShorthandLookup
    10b28b3 Add note about panic in ShorthandLookup
    a84f757 Allow lookup by shorthand (#106)
    c990990 Add Go 1.8.1 to .travis.yml
    af3f947 Update .travis.yml
    f1d95a3 Unify error message for panic and f.out
    314c91c Use comparison a string with "" instead of comparison of len
    1cd6182 Prevent parsing if there are no arguments
    9c8891d Add more verbosity to panic of shorthand redefinition
    1d9fab4 Use f.out in output flag deprecation
    4995a3e Make more detailed error in Set
    9421342 Add comments for better understanding of parsing short flags
    159e1d7 Document Count function
    e466d44 Delete setFlag
    686edd7 Fix alreadythere variable name
    af10531 Note about SortFlags in README
    e453343 flag_test: fix go vet (#123)
    0328f15 Cache sorted flags
    9a906f1 Prevent changing order of flags after SetNormalizeFunc() (#121)
    d16db1e Modified to display a string default value as double quoted and escaped (#118)
    d90f37a Add SortFlags option (#113)
    b205ad1 Change `ogier` to `spf13` in docs and README
    9ff6c69 Add FlagSet.FlagUsagesWrapped(cols) which wraps to the given column (#105)
    3f939ad Removed unused field "exitOnError".

Signed-off-by: Bruce Ashfield <[email protected]>
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