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

intro stable branch #882

Merged
merged 20 commits into from
May 30, 2020
Merged

intro stable branch #882

merged 20 commits into from
May 30, 2020

Conversation

mstormi
Copy link
Contributor

@mstormi mstormi commented May 11, 2020

Introduce stable as the default branch to clone openHABian from on self-update.

See #692 for the background.
The idea is to have 'patch days' to merge the diffs master has over stable by (manually) creating PRs to promote those commits that have proven to work from master to stable. This can be all diffs or a selected subset only. Promoting commits via PRs implicitly creates a changelog, too.

The branch to fetch can be selected in menu option 01 (choices: stable and master).
It can also be overridden by setting clonebranch=mybranch in /etc/openhabian.conf for the purpose of providing a special version to some openHABian user to have them test it).
$repositoryurl cannot be made point outside to someone's personal repo for safety reasons to avoid accidents and manipulation

TODO:

  • make mode=debug_maximum take effect for interactive openhabian-config, too
  • make clonebranch=(branch) take effect for openHABian repo if set
  • inform/ask/allow user to permanently switch branches stable<->master
  • tidy up: do we use master elsewhere?
  • more testing. You can select stable or master or enter any branch in /etc/openhabian.conf
    "testbuild" is available as a branch for testing. It contains this PR already (plus Adopt JDK to try).

Fixes #692
Fixes #881

Signed-off-by: Markus Storm [email protected]

@mstormi mstormi marked this pull request as draft May 11, 2020 15:17
@mstormi mstormi self-assigned this May 11, 2020
mstormi added a commit that referenced this pull request May 12, 2020
* make mode=debug_maximum take effect for interactive, too.\nmake clonebranch take effect for openHABian repo if set
* shellchecked
* remove testing exit

Signed-off-by: Markus Storm <[email protected]>
mstormi added a commit that referenced this pull request May 12, 2020
… day (#885)

* make mode=debug_maximum take effect for interactive, too.
* make clonebranch take effect for openHABian repo if set
* change menu option 01 to allow for selection of openHABian version

Signed-off-by: Markus Storm <[email protected]>
@mstormi mstormi force-pushed the config-interactive branch from b46a028 to 2998f4f Compare May 12, 2020 21:50
@mstormi mstormi marked this pull request as ready for review May 12, 2020 21:54
@mstormi mstormi requested a review from holgerfriedrich May 12, 2020 21:54
@mstormi mstormi force-pushed the config-interactive branch from 2dfa8be to 005c3cb Compare May 12, 2020 22:03
@mstormi mstormi added this to the Refinement and Refocus milestone May 13, 2020
@mstormi mstormi force-pushed the config-interactive branch 3 times, most recently from 6882115 to d0205bf Compare May 18, 2020 10:51
mstormi added a commit to mstormi/openhabian that referenced this pull request May 19, 2020
…ay (openhab#884)

* make mode=debug_maximum take effect for interactive, too.\nmake clonebranch take effect for openHABian repo if set
* shellchecked
* remove testing exit

Signed-off-by: Markus Storm <[email protected]>
mstormi added a commit to mstormi/openhabian that referenced this pull request May 19, 2020
…r patch day (openhab#885)

* make mode=debug_maximum take effect for interactive, too.
* make clonebranch take effect for openHABian repo if set
* change menu option 01 to allow for selection of openHABian version

Signed-off-by: Markus Storm <[email protected]>
@mstormi mstormi force-pushed the config-interactive branch 2 times, most recently from 52edc73 to db3540b Compare May 19, 2020 16:42
mstormi added a commit to mstormi/openhabian that referenced this pull request May 21, 2020
…ay (openhab#884)

* make mode=debug_maximum take effect for interactive, too.\nmake clonebranch take effect for openHABian repo if set
* shellchecked
* remove testing exit

Signed-off-by: Markus Storm <[email protected]>
mstormi added a commit to mstormi/openhabian that referenced this pull request May 21, 2020
…r patch day (openhab#885)

* make mode=debug_maximum take effect for interactive, too.
* make clonebranch take effect for openHABian repo if set
* change menu option 01 to allow for selection of openHABian version

Signed-off-by: Markus Storm <[email protected]>
@mstormi mstormi force-pushed the config-interactive branch from af656fa to fa3b2ac Compare May 21, 2020 19:35
@mstormi mstormi force-pushed the config-interactive branch from cecf7f7 to 257beff Compare May 22, 2020 13:44
mstormi added a commit to mstormi/openhabian that referenced this pull request May 25, 2020
…ay (openhab#884)

* make mode=debug_maximum take effect for interactive, too.\nmake clonebranch take effect for openHABian repo if set
* shellchecked
* remove testing exit

Signed-off-by: Markus Storm <[email protected]>
mstormi added a commit to mstormi/openhabian that referenced this pull request May 25, 2020
…r patch day (openhab#885)

* make mode=debug_maximum take effect for interactive, too.
* make clonebranch take effect for openHABian repo if set
* change menu option 01 to allow for selection of openHABian version

Signed-off-by: Markus Storm <[email protected]>
@mstormi mstormi force-pushed the config-interactive branch from 257beff to a489ef1 Compare May 25, 2020 13:14
mstormi added a commit to mstormi/openhabian that referenced this pull request May 27, 2020
…ay (openhab#884)

* make mode=debug_maximum take effect for interactive, too.\nmake clonebranch take effect for openHABian repo if set
* shellchecked
* remove testing exit

Signed-off-by: Markus Storm <[email protected]>
mstormi added a commit to mstormi/openhabian that referenced this pull request May 27, 2020
…r patch day (openhab#885)

* make mode=debug_maximum take effect for interactive, too.
* make clonebranch take effect for openHABian repo if set
* change menu option 01 to allow for selection of openHABian version

Signed-off-by: Markus Storm <[email protected]>
@mstormi mstormi force-pushed the config-interactive branch from a489ef1 to 9a652a3 Compare May 27, 2020 18:46
@mstormi
Copy link
Contributor Author

mstormi commented May 28, 2020

@holgerfriedrich could you please review this next (after RPi4 one) ?
I'd like to get that out by Pentecost (Pfingsten).
I intend to ask for a public testdrive of the testbuild branch (to contain new Java providers) on the community forum. This PR (to allow for switching between branches) unfortunately is a prerequisite.
cc: @ecdye

EDIT seems something went wrong it has parts of the upcoming Java patch.
Will redo tomorrow.

if ! sel=$(whiptail --title "openHABian version" --radiolist "$introtext" 14 75 3 stable "recommended standard version of openHABian" off master "very latest version of openHABian" off "$current" "some other version you fetched yourself" on 3>&1 1>&2 2>&3); then return 0; fi
fi
sed -i "s@^clonebranch=.*@clonebranch=$sel@g" "/etc/openhabian.conf"
fi
Copy link
Member

Choose a reason for hiding this comment

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

So on patch day, are we dumping everyone straight to stable? If so, we are making them aware of the change, correct?

Copy link
Contributor Author

@mstormi mstormi May 29, 2020

Choose a reason for hiding this comment

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

Yes, we put them on stable.
Haven't decided yet how to make users aware of it. Maybe a popup on start ?
I'm not even sure we should ?

Copy link
Member

Choose a reason for hiding this comment

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

I think we should at least make a statement in the output, perhaps one that contains a link to a community post regarding the change and the new behavior of the utility.

I don't think it is right to introduce a major change in the functionality / inner workings of the tool without making the user aware.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well it's not really a functionality change, is it ? Less than those we do every day ...
But you're right let's not annoy anybody by hiding that. I'll insert a popup.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Like so ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ecdye @holgerfriedrich
Just wondering, according to the install docs
https://www.openhab.org/docs/installation/openhabian.html#other-linux-systems-add-openhabian-just-like-any-other-software
if someone git cloned openhabian, he would be getting whatever branch is marked as 'default', wouldn't he ? That's currently 'master'.
Now as we want new users to get stable from now on, would we need to change the default branch ? I guess (but do not know for sure) that that would have unwanted side effects such as whenever you create PRs they will (unless manually changed) also be against stable which also is not what we want.
So question: change default ? or change download instructions to include the stable branch ?

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, good question. Perhaps better to open a separate issue discuss it in.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added clone -b stable to the docs that's the safe route

Copy link
Member

Choose a reason for hiding this comment

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

I noticed that just after commenting.

Copy link
Member

Choose a reason for hiding this comment

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

You are correct in your assumption, GitHub would default to the stable branch if we marked that as the default branch. For now I think that the documentation change should be enough to avoid most of the issues with manual cloning.

mstormi added 15 commits May 30, 2020 14:49
Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
@mstormi mstormi force-pushed the config-interactive branch from 4e6e74e to d4b23a0 Compare May 30, 2020 12:51
mstormi added 5 commits May 30, 2020 14:56
Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
@mstormi mstormi removed the request for review from holgerfriedrich May 30, 2020 13:29
@mstormi mstormi merged commit 0708445 into openhab:master May 30, 2020
mstormi added a commit that referenced this pull request May 30, 2020
* Enhanced and more verbose testing in Travis (#859)
* ZRAM tests to work if on ARM but lxc
* cond_echo cmd in tryUntil()
* restrict container to 1G for RPi3
* dont allow for failure of BATS tests
* add warning 64bit on aarch64 is NOT supposed to work; check if OH downgrades to 32bit
* reduce to a single shellcheck run (else builds succeed when there's no error in the last run)
* increased verbosity on test cases

Signed-off-by: Markus Storm <[email protected]>

* Grafana/InfluxDB installation enhancements (#860)
* Timeouts for service start #760
* Grafana admin password length is enforced #562
* Local installation of InfluxDB now also patches existing installations
* Password reset for existing Grafana and local InfluxDB installations
* In interactive mode, display a warning if less than 1GB RAM is detected

Signed-off-by: Holger Friedrich <[email protected]>

* Setting timezone based on IP geolocation now uses python3, fixes #862 (#864)
* Switched installation of tzupdate to python3, as py2 is no longer supported
  cdown/tzupdate#34

Signed-off-by: Holger Friedrich <[email protected]>

* Use Zulu API v1 when upgrading Java (#848)
Additionally, to clarify what Java version this will install, when
available, the API will prefer downloading a JRE. However, when a JRE is
not available it will use a JDK instead. However, when JDK's are
installed only the essential binaries are linked to update-alternatives
so extra JDK related software is unlinked (i.e. javac).

At the moment, Azul appears to only provide JDK builds for ARM platforms
and so, as such, ARM platforms are most often the ones to not get a JRE
installed and the resulting installation tends to be a bit larger (~100
MB).

One minor inconvenience is that with the current Azul API it does not
allow explicitly choosing builds without the JavaFX additional binaries.
So at times, the Java version installed will have extra JavaFX binaries.
This is usually seen when the architecture being installed is x86 based.

Fixes #714
Fixes #723
See Also #629

Signed-off-by: Ethan Dye <[email protected]>

* Refuse to install 64-bit JDK on 32-bit OS

armv8 builds in theory should work on the RPi3+/RPi4, however the
current Raspbian kernel uses a armv7l base which works because armv8 is
backwards compatible. However, this has the effect of making the builds
targeting aarch64 provided by Azul unable to work on the RPi3+/RPi4. On
the other hand, this is not a huge issue as the use of 64-bit Java on
low-memory boards brings few benefits and mostly issues.

Additionally, this adds checking for other platforms to ensure that the
OS is actually 64-bit before trying to install a 64-bit JDK. If the OS
is not actually 64-bit the installer defaults to installing a 32-bit
JDK.

Signed-off-by: Ethan Dye <[email protected]>

* fix nginx install (#867)

* add missing #REDIR to nginx.conf template

Signed-off-by: Markus Storm <[email protected]>

* fix install webif port in docs (#873)

Signed-off-by: Markus Storm <[email protected]>

* hotfix to download aarch32hf instead of sf on multiple returns in Azul REST API (#877)

Signed-off-by: Markus Storm <[email protected]>

* point to new openHABian debug guide

* point to new debug guide

* Remove python2 from openHABian (#876)

* replace all occurences of python and python-pip by python3 equivalent
* fixes #875 (compatibility with Ubuntu 20.04)
* timezone setting: added python3-setuptools before installing tzupdate
* java installer: show version after install

Signed-off-by: Holger Friedrich <[email protected]>

* Run apt-get update on startup in background (#724)

* move apt-get update to background on openhabian-config start, catch up in menu selections

Signed-off-by: Markus Storm <[email protected]>

* add intermediate output when selecting a menu option while apt-get update hasnt finished (#880)

Signed-off-by: Markus Storm <[email protected]>

* Use Markdown in LICENSE and update copyright year (#847)

Co-authored-by: Thomas Dietrich <[email protected]>

Signed-off-by: Ethan Dye <[email protected]>

* Remove setting gnuio options on serial ports (#883)

* Remove setting gnuio options on serial

Signed-off-by: Markus Storm <[email protected]>

* allow for disabling IPv6 in openhabian.conf (#888)

* allow for ipv6=disable in openhabian.conf

Signed-off-by: Markus Storm <[email protected]>

* allow for ipv6=disable in openhabian.conf (#891)

Signed-off-by: Markus Storm <[email protected]>

* installation of additional bluetooth packages on RPi (#898)

* python3-bluez not installed on stretch based installations, fixes #893
* additional bluetooth packages are now installed also on RPi4

Signed-off-by: Holger Friedrich <[email protected]>

* Fix bluetooth package installation

Signed-off-by: Holger Friedrich <[email protected]>

* return instead of exit if installing non existent BT packages fails (#903)

Signed-off-by: Markus Storm <[email protected]>

* add hw,hwarch,release parameters (#901)

* add hw, hwarch, release parameters to "fake" HW, OS

Signed-off-by: Markus Storm <[email protected]>

* added missing calls to apt-get update after adding repositories. (#911)

Fixes grafana install issue, #906.

Signed-off-by: Holger Friedrich <[email protected]>

* Add openhab-cli backup/restore to menu 50 (#910)

* added openhab-cli backup/restore implementation to 50 menu

Signed-off-by: Markus Storm <[email protected]>

* run Docker in foreground in BATS testing stage (#918)

* run Docker in foreground in BATS testing stage to get to see output in Travis builds
* allow for dev and BATS testing stages to fail while BATS tests still fail

Signed-off-by: Markus Storm <[email protected]>

* CORS fix (#830)

* fix CORS (#528)

Signed-off-by: Markus Storm <[email protected]>

* Grafana installation fixed (#915)

* wait for Grafana service to setup grafana.db before using grafana-cli to avoid side effects, fixes #914
* adapted bats test to check connection to InfluxDB, to store settings in Grafana, to validate connection and settings file grafana.db

Signed-off-by: Holger Friedrich <[email protected]>

* Grafana installation fixed (#925)

* race condition due to db migration during installer run, #921

Signed-off-by: Holger Friedrich <[email protected]>

* add RPi4 to bluetooth and WiFi functions; add CM1,CM3(+) support (#861)

* Add CM1,CM3(+) to supported models so now we support all RPis
* add RPi4 to bluetooth and WiFi functions
* add disable-wifi to option 36

Signed-off-by: Markus Storm <[email protected]>

* another instance of safe grep'ing (#929)

* fix another safe grep instance

Signed-off-by: Markus Storm <[email protected]>

* Insert missing semi-colons

Signed-off-by: Ethan Dye <[email protected]>

* Fixes in preparation of upcoming changes (#932)

* Fixes in preparation of upcoming changes

Signed-off-by: Ethan Dye <[email protected]>

* replace fstab by explicit systemd mount units to ensure proper order (#807)

* Replace fstab by explicit systemd units to ensure right mount order (#807)
  To ensure ZRAM and Samba properly work together on sharing
  /srv/openhab2-*, we need to change the order of mounts.
  As this cannot be done in fstab, I removed them and setup separate
  systemd mount units instead.

* change Samba shares
  Include logs, exclude /srv overview share, remove Samba defaults like printers

Signed-off-by: Markus Storm <[email protected]>

* intro stable branch (#882)

* introduce stable branch (#882)
* renamed mode parameter to debugmode; new values are off/on/maximum
* Add popup announcement function
* add docs/NEWSLOG.md

Signed-off-by: Markus Storm <[email protected]>

Co-authored-by: Holger Friedrich <[email protected]>
Co-authored-by: Ethan Dye <[email protected]>
Co-authored-by: Holger Friedrich <[email protected]>
mstormi added a commit to mstormi/openhabian that referenced this pull request May 30, 2020
* introduce stable branch (openhab#882)
* renamed mode parameter to debugmode; new values are off/on/maximum
* Add popup announcement function
* add docs/NEWSLOG.md

Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
mstormi added a commit to mstormi/openhabian that referenced this pull request Jun 10, 2020
* introduce stable branch (openhab#882)
* renamed mode parameter to debugmode; new values are off/on/maximum
* Add popup announcement function
* add docs/NEWSLOG.md

Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
mstormi added a commit to mstormi/openhabian that referenced this pull request Jun 10, 2020
* introduce stable branch (openhab#882)
* renamed mode parameter to debugmode; new values are off/on/maximum
* Add popup announcement function
* add docs/NEWSLOG.md

Signed-off-by: Markus Storm <[email protected]>
Signed-off-by: Markus Storm <[email protected]>
@mstormi mstormi deleted the config-interactive branch March 7, 2021 17:37
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.

openhabian-config to enforce use of openhabian.conf Staging/Versioning tags
2 participants