Skip to content

Commit

Permalink
Merge pull request #51 from joseph-reynolds/OP940-nginx-downgrade
Browse files Browse the repository at this point in the history
nginx: OP940 prepare for downgrade
  • Loading branch information
rfrandse committed Oct 4, 2019
2 parents 5f09d3c + fd76ae5 commit 2fdaaec
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
13 changes: 13 additions & 0 deletions meta-ibm/recipes-httpd/nginx/files/nginx-prep-downgrade.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=Prepare file system for downgrade to nginx
After=network.target

[Service]
Restart=no
Type=oneshot
RemainAfterExit=true
SyslogIdentifier=nginx-prep-downgrade
ExecStart=/bin/mkdir -p /etc/ssl/certs/nginx

[Install]
WantedBy=multi-user.target
24 changes: 24 additions & 0 deletions meta-ibm/recipes-httpd/nginx/nginx-prep-downgrade.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
SUMMARY = "IBM nginx prepare for downgrade"
DESCRIPTION = "Prepare file system for downgrade to nginx release"
PR = "r1"
HOMEPAGE = "http://github.com/openbmc/meta-ibm"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

inherit systemd
inherit obmc-phosphor-systemd

# Add a service to create the directory needed to store nginx
# certificates. This is needed in case the BMC uses code update to go
# to a firmware image that uses nginx. The directory must be created
# in the overlay filesystem (not in the generated file system) to
# survive the downgrade. The service is "harmless" and only creates
# one additional subdirectory.

# This service can be removed in the first release that does not
# support a downgrade path to an OpenBMC 2.6 or earlier release.

SERVICE = "nginx-prep-downgrade.service"
SYSTEMD_SERVICE_${PN} += " ${SERVICE}"
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
RDEPENDS_${PN}-logging += "ibm-logging"
RDEPENDS_${PN}-logging += "ibm-logging"
RDEPENDS_${PN}-software += "nginx-prep-downgrade"

0 comments on commit 2fdaaec

Please sign in to comment.