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

feat: add route for sw update client python tool #77

Conversation

janfeemers
Copy link
Contributor

if the update server is behind a reverse proxy a route is needed. The route should be optional and also work with web-sever without an additional route.

Usage:

python ./main.py ./swu.swu 192.168.0.100 80 /update

@github-actions
Copy link

github-actions bot commented Sep 8, 2023

Contributing to SWUpdate

Contributions are welcome ! Please follow the following guideline for
contributions.

Contribution Checklist

These are mostly general recommendations and are common practice in a
lot of FOSS projects.

  • use git to manage your changes [recomended]

  • follow as much as possible kernel codestyle [recomended]
    Nevertheless, some rules are not so strict as in kernel. The maximum
    line length can be extended over 80 chars if this increase code
    readability.

  • add the required copyright header to each new file introduced
    [required]

    • add signed-off to all patches [required]

      • to certify the "Developer's Certificate of Origin", see
        below
      • check with your employer when not working on your own!
    • add version number for your patches if follow-up versions are
      requested [recomended]

      • Add a "Change from Vx" description under the commit message
        to take track of the history of the patch.
      • It is suggested to use excellent "patman" tool to manage
        patches series. This is part of U-Boot's project
        (tools/patman), but it can be used in other projects, too.
  • check that your patches do not break build [required]

    • There is a set of configuration files in the
      configs/ directory. Please run a
      build for all files in the directory to ensure that SWUpdate is
      still buildable from configurations different as yours.
    • post patches to mailing list [required]

      • use git format-patch to
        generate your patches.
      • use git send-email if
        possible. This avoid corruptions due to the mailers
      • add a prefix [meta-swupdate] if patches are intended to
        the Yocto's meta layer.
      • send patches inline, do not append them
      • no HTML emails!
  • do not use github Pull Request. github facilities are not used for
    this project. The review is done in a single place : the Mailing
    List. PR from github are ignored.

Patches are tracked by patchwork (see
http://jk.ozlabs.org/projects/patchwork/). You can see the status of
your patches at http://patchwork.ozlabs.org/project/swupdate/list.

Developer's Certificate of Origin 1.1

When signing-off a patch for this project like this

Signed-off-by: Random J Developer <[email protected]>

using your real name (no pseudonyms or anonymous contributions), you
declare the following:

By making a contribution to this project, I certify that:

  1. The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or
  2. The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part by
    me, under the same open source license (unless I am permitted to
    submit under a different license), as indicated in the file; or
  3. The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified it.
  4. I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

if the update server is behind a reverse proxy a route is needed.
The route should be optional and also work with websever without an
additional route.

Usage:
```shell
python ./main.py ./swu.swu 192.168.0.100 80 /update
```

Signed-off-by: Jan Feemers <[email protected]>
ran the cmd: `black swupdateclient`

Signed-off-by: Jan Feemers <[email protected]>
@janfeemers janfeemers force-pushed the feat/addRouteForSWUpdateClientPythonTool branch from ed6a534 to 19d378d Compare September 8, 2023 10:29
@janfeemers janfeemers closed this Sep 8, 2023
@embetrix
Copy link
Contributor

embetrix commented Sep 8, 2023

@janfeemers
I don't get the point of this MR ?

does this already not work ?

python ./main.py ./swu.swu 192.168.0.100/path/to/update 80

@janfeemers
Copy link
Contributor Author

@embetrix because this does not work.

you have the url_upload variable:

url_upload = "http://{}:{}/upload"
self.url_status.format(self._host_name, self._port)
# results in: http://{self._host_name}:{self._port}/upload -> http://example.com/update:80/upload

What we would need is:

--http://example.com/update:80/upload
++http://example.com:80/update/upload

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.

2 participants