Skip to content

Commit

Permalink
Fix display of openHABian announcements (#973)
Browse files Browse the repository at this point in the history
Fixes #974

Signed-off-by: Ethan Dye <[email protected]>
  • Loading branch information
ecdye authored Jun 17, 2020
1 parent 84e9763 commit 0eaaa06
Show file tree
Hide file tree
Showing 12 changed files with 121 additions and 66 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn

# bats tests on a minimal install will require additional packages to run properly:
# - lsb-release (influx, homegear)
# - apt-transport-https (homegear)
# - apt-transport-https (homegear, AdoptOpenJDK)
# - unzip (java)
# those packages would normally be included in our standard install
RUN apt-get update -qq \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.i386
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn

# bats tests on a minimal install will require additional packages to run properly:
# - lsb-release (influx, homegear)
# - apt-transport-https (homegear)
# - apt-transport-https (homegear, AdoptOpenJDK)
# - unzip (java)
# those packages would normally be included in our standard install
RUN apt-get update -qq \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.raspberry-pi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn

# bats tests on a minimal install will require additional packages to run properly:
# - lsb-release (influx, homegear)
# - apt-transport-https (homegear)
# - apt-transport-https (homegear, AdoptOpenJDK)
# - unzip (java)
# those packages would normally be included in our standard install
RUN apt-get update -qq \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.raspberry-pi2
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn

# bats tests on a minimal install will require additional packages to run properly:
# - lsb-release (influx, homegear)
# - apt-transport-https (homegear)
# - apt-transport-https (homegear, AdoptOpenJDK)
# - unzip (java)
# those packages would normally be included in our standard install
RUN apt-get update -qq \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.raspberrypi3
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn

# bats tests on a minimal install will require additional packages to run properly:
# - lsb-release (influx, homegear)
# - apt-transport-https (homegear)
# - apt-transport-https (homegear, AdoptOpenJDK)
# - unzip (java)
# those packages would normally be included in our standard install
RUN apt-get update -qq \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.raspberrypi3-64
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn

# bats tests on a minimal install will require additional packages to run properly:
# - lsb-release (influx, homegear)
# - apt-transport-https (homegear)
# - apt-transport-https (homegear, AdoptOpenJDK)
# - unzip (java)
# those packages would normally be included in our standard install
RUN apt-get update -qq \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.raspberrypi4-64
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn

# bats tests on a minimal install will require additional packages to run properly:
# - lsb-release (influx, homegear)
# - apt-transport-https (homegear)
# - apt-transport-https (homegear, AdoptOpenJDK)
# - unzip (java)
# those packages would normally be included in our standard install
RUN apt-get update -qq \
Expand Down
66 changes: 43 additions & 23 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,53 @@
This is the new announcement page to pop up whenever you start openhabian-config and there's significant news we would like to share with you.
Hit tab to unselect buttons and scroll through the text using UP/DOWN/PG UP/PG DOWN.
When you choose 'I have read this' the message will not appear on startup anymore.
All announcements will be stored in /opt/openhabian/docs/NEWSLOG for you to lookup.
This is the new announcement page that will pop up whenever you start
`openhabian-config` and the developers have significant news they would like to
share with you.

Hit tab to unselect the buttons and scroll through the text using UP/DOWN or
PGUP/PGDN.

All announcements will be stored in /opt/openhabian/docs/NEWSLOG.md for you to
lookup.

## June 17, 2020
### removed support for PINE A64(+) and older Linux distributions
openhabian-config will now issue a warning if you start on unsupported hardware or OS releases.
See [README](README.md) for supported HW and OS.
In short, PINE A64 is no longer supported and OS releases other than the current `stable` and the previous one are deprecated.
Running on any of those may still work or not.
The current and previous Debian / Raspbian releases are 10 ("buster") and 9 ("stretch"). Most current Ubuntu LTS releases are 20.04 ("focal") and 18.04 ("bionic").

### Removed support for PINE A64(+) and older Linux distributions
`openhabian-config` will now issue a warning if you start on unsupported
hardware or OS releases. See [README](README.md) for supported HW and OS.

In short, PINE A64 is no longer supported and OS releases other than the current
`stable` and the previous one are deprecated. Running on any of those may still
work or not.

The current and previous Debian / Raspberry Pi OS (previously called Raspbian)
releases are 10 ("buster") and 9 ("stretch"). Most current Ubuntu LTS releases
are 20.04 ("focal") and 18.04 ("bionic").

## June 10, 2020
### new parameters in `openhabian.conf`
See `/etc/openhabian.conf` for a number of new parameters such as the useful `debugmode`, a fake hardware mode, to disable ipv6 and the ability to update from some repository other than the default `master` and `stable`.

### New parameters in `openhabian.conf`
See `/etc/openhabian.conf` for a number of new parameters such as the useful
`debugmode`, a fake hardware mode, the option to disable ipv6 and the ability to
update from a custom repository other than the `master` and `stable` branches.

In case you are not aware, there is a Debug Guide in the `docs/` directory.

### New Java options
Preparing for openHAB 3, new options for the JDK that runs openHAB are now available:
Preparing for openHAB 3, new options for the JDK that runs openHAB are now
available:

- Java Zulu 8 32-Bit OpenJDK (default on ARM based platforms)
- Java Zulu 8 64-Bit OpenJDK (default on x86 based platforms)
- Java Zulu 11 32-Bit OpenJDK
- Java Zulu 11 64-Bit OpenJDK
- AdoptOpenJDK 11 OpenJDK (potential replacement for Zulu)

- Java Zulu 8 32-Bit OpenJDK (default on ARM based platforms)
- Java Zulu 8 64-Bit OpenJDK (default on x86 based platforms)
- Java Zulu 11 32-Bit OpenJDK
- Java Zulu 11 64-Bit OpenJDK
- AdoptOpenJDK 11 OpenJDK (replacement for Zulu)
openHAB 3 will be Java 11 only. 2.5.X is supposed to work on both, Java 8 and
Java 11. Running the current openHAB 2.X on Java 11 however has not been tested
on a wide scale. Please be aware that there is a small number of known issues in
this: v1 bindings may or may not work.

openHAB 3 will be Java 11 only. 2.5.X is supposed to work on both, Java 8 and Java 11.
Running the current openHAB 2.X on Java 11 however has not been tested on a wide scale.
Please be aware that there is a small number of known issues in this: v1 bindings may or may not work.
Please participate in beta testing to help create a smooth transition user
experience for all of us.

Please participate in beta testing to help create a smooth transition user experience for all of us.
See [announcement thread](https://community.openhab.org/t/Java-testdrive/99827) on the community forum.
See [announcement thread](https://community.openhab.org/t/Java-testdrive/99827)
on the community forum.
90 changes: 61 additions & 29 deletions docs/NEWSLOG.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,74 @@
### removed support for PINE A64(+) and older Linux distributions
openhabian-config will now issue a warning if you start on unsupported hardware or OS releases.
See [README](README.md) for supported HW and OS.
In short, PINE A64 is no longer supported and OS releases other than the current `stable` and the previous one are deprecated.
Running on any of those may still work or not.
The current and previous Debian / Raspbian releases are 10 ("buster") and 9 ("stretch"). Most current Ubuntu LTS releases are 20.04 ("focal") and 18.04 ("bionic").

### new parameters in `openhabian.conf`
See `/etc/openhabian.conf` for a number of new parameters such as the useful `debugmode`, a fake hardware mode, to disable ipv6 and the ability to update from some repository other than the default `master` and `stable`.
## June 17, 2020

### Removed support for PINE A64(+) and older Linux distributions
`openhabian-config` will now issue a warning if you start on unsupported
hardware or OS releases. See [README](README.md) for supported HW and OS.

In short, PINE A64 is no longer supported and OS releases other than the current
`stable` and the previous one are deprecated. Running on any of those may still
work or not.

The current and previous Debian / Raspberry Pi OS (previously called Raspbian)
releases are 10 ("buster") and 9 ("stretch"). Most current Ubuntu LTS releases
are 20.04 ("focal") and 18.04 ("bionic").

## June 10, 2020

### New parameters in `openhabian.conf`
See `/etc/openhabian.conf` for a number of new parameters such as the useful
`debugmode`, a fake hardware mode, the option to disable ipv6 and the ability to
update from a custom repository other than the `master` and `stable` branches.

In case you are not aware, there is a Debug Guide in the `docs/` directory.

### New Java options
Preparing for openHAB 3, new options for the JDK that runs openHAB are now available:
Preparing for openHAB 3, new options for the JDK that runs openHAB are now
available:

- Java Zulu 8 32-Bit OpenJDK (default on ARM based platforms)
- Java Zulu 8 64-Bit OpenJDK (default on x86 based platforms)
- Java Zulu 11 32-Bit OpenJDK
- Java Zulu 11 64-Bit OpenJDK
- AdoptOpenJDK 11 OpenJDK (potential replacement for Zulu)

openHAB 3 will be Java 11 only. 2.5.X is supposed to work on both, Java 8 and
Java 11. Running the current openHAB 2.X on Java 11 however has not been tested
on a wide scale. Please be aware that there is a small number of known issues in
this: v1 bindings may or may not work.

- Java Zulu 8 32-Bit OpenJDK (default on ARM based platforms)
- Java Zulu 8 64-Bit OpenJDK (default on x86 based platforms)
- Java Zulu 11 32-Bit OpenJDK
- Java Zulu 11 64-Bit OpenJDK
- AdoptOpenJDK 11 OpenJDK (replacement for Zulu)
Please participate in beta testing to help create a smooth transition user
experience for all of us.

openHAB 3 will be Java 11 only. 2.5.X is supposed to work on both, Java 8 and Java 11.
Running the current openHAB 2.X on Java 11 however has not been tested on a wide scale.
Please be aware that there is a small number of known issues in this: v1 bindings may or may not work.
See [announcement thread](https://community.openhab.org/t/Java-testdrive/99827)
on the community forum.

Please participate in beta testing to help create a smooth transition user experience for all of us.
See [announcement thread](https://community.openhab.org/t/Java-testdrive/99827) on the community forum.

## May 31, 2020

### Stable branch
Introducing a new versioning scheme to openHABian. Please welcome `stable` branch.
Similar to openHAB where there's releases and snapshots, you will from now on be using the stable branch. It's the equivalent of an openHAB release.
We will keep providing new changes to the master branch first as soon as we make them available, just like we have been doing in the past. If you want to keep living on the edge, want to make use of new features fast or volunteer to help a little in advancing openHABian, you can choose to switch back to the master branch.
Anybody else will benefit from less frequent but well better tested updates to happen to the stable branch in batches, whenever the poor daring people to use `master` have reported their trust in these changes to work flawlessly.
You can switch branches at any time using the menu option 01.
Introducing a new versioning scheme to openHABian. Please welcome the `stable`
branch.

### Supported hardware and Operating Systems
openHABian now fully supports all Raspberry Pi SBCs with our fast-start image. As a manual add-on, it is supposed to run on all Debian based OSs like Ubuntu.
Similar to openHAB where there's releases and snapshots, you will from now on be
using the stable branch. It's the equivalent of an openHAB release. We will keep
providing new changes to the master branch first as soon as we make them
available, just like we have been doing in the past. If you want to keep living
on the edge, want to make use of new features fast or volunteer to help a little
in advancing openHABian, you can choose to switch back to the master branch.
Anybody else will benefit from less frequent but well better tested updates to
happen to the stable branch in batches, whenever the poor daring people to use
`master` have reported their trust in these changes to work flawlessly.

Check the [README](#README.md) to see what "supported" actually means and what you can do if you want to run on other HW or OS.
You can switch branches at any time using the menu option 01.

### ZRAM per default
Swap, logs and persistence files are now put into ZRAM per default.
See [ZRAM status thread](https://community.openhab.org/t/zram-status/80996) for more information.
See [ZRAM status thread](https://community.openhab.org/t/zram-status/80996) for
more information.

### Supported hardware and Operating Systems
openHABian now fully supports all Raspberry Pi SBCs with our fast-start image.
As an add-on package, it is supposed to run on all Debian based OSs.

Check the [README](README.md) to see what "supported" actually means and what
you can do if you want to run on other HW or OS.
7 changes: 5 additions & 2 deletions functions/java-jre.bash
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ java_install_or_update() {
fi
fi
fi
cond_redirect java -version
if [ -x "$(command -v java)" ]; then
cond_redirect java -version
echo "OK"
fi
}

## Install Java Zulu prerequisite libc
Expand Down Expand Up @@ -401,7 +404,7 @@ adoptopenjdk_fetch_apt() {
if ! add_keys "https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public"; then return 1; fi

echo -n "$(timestamp) [openHABian] Adding AdoptOpenJDK repository to apt... "
echo "deb http://adoptopenjdk.jfrog.io/adoptopenjdk/deb buster main" > /etc/apt/sources.list.d/adoptopenjdk.list
echo "deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb buster main" > /etc/apt/sources.list.d/adoptopenjdk.list
if cond_redirect apt-get update; then echo "OK"; else echo "FAILED (update apt lists)"; return 1; fi

echo -n "$(timestamp) [openHABian] Fetching AdoptOpenJDK... "
Expand Down
2 changes: 1 addition & 1 deletion functions/openhabian.bash
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ openhabian_announcements() {

if ! diff -q "$newsfile" "$readnews" >/dev/null 2>&1; then
# shellcheck disable=SC2086
if (whiptail --title "openHABian announcements" --yes-button "Stop Displaying" --no-button "Keep Displaying" --defaultno --scrolltext --yesno "$(cat $newsfile)" 27 120); then
if (whiptail --title "openHABian announcements" --yes-button "Stop Displaying" --no-button "Keep Displaying" --defaultno --scrolltext --yesno "$(cat $newsfile)" 27 85); then
cp "$newsfile" "$readnews";
fi
fi
Expand Down
8 changes: 4 additions & 4 deletions functions/packages.bash
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ firemotd_setup() {
if echo -e "\\necho\\nFireMotD --theme Gray \\necho" >> /home/"${username:-openhabian}"/.bash_profile; then echo "OK"; else echo "FAILED"; return 1; fi
fi

echo "$(timestamp) [openHABian] Setting up FireMotD apt updates count service... "
cond_echo "Make FireMotD check for new updates every night... "
echo -n "$(timestamp) [openHABian] Setting up FireMotD apt updates count service... "
cond_echo "\nMake FireMotD check for new updates every night... "
echo "# FireMotD system updates check (randomly execute between 0:00:00 and 5:59:59)" > /etc/cron.d/firemotd
echo "0 0 * * * root perl -e 'sleep int(rand(21600))' && /bin/bash /usr/local/bin/FireMotD -S &>/dev/null" >> /etc/cron.d/firemotd
cond_echo "Make FireMotD check for new updates after using apt... "
cond_echo "\nMake FireMotD check for new updates after using apt... "
echo "DPkg::Post-Invoke { \"if [ -x /usr/local/bin/FireMotD ]; then echo -n 'Updating FireMotD available updates count ... '; /bin/bash /usr/local/bin/FireMotD --skiprepoupdate -S; echo ''; fi\"; };" > /etc/apt/apt.conf.d/15firemotd
cond_echo "Initial FireMotD updates check"
cond_echo "\nInitial FireMotD updates check"
if cond_redirect FireMotD -S; then echo "OK"; else echo "FAILED"; return 1; fi
}

Expand Down

0 comments on commit 0eaaa06

Please sign in to comment.