rabbitmq-server: update for stx 5.0

* inherit stx-metadata to help install updated files
  from stx 'config-files' repo

* remove do_copy_config_files since it's not
  needed after using stx-metadata

* update the url for source tarball since the original
  one is not accessible now.

Story: 2008952
Task: 42576

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: Icdc300502813b824174d8d12c3202ec492e6e472
This commit is contained in:
Jackie Huang 2021-05-12 16:26:46 +08:00
parent ceaa9eb226
commit a5864ae489
2 changed files with 10 additions and 20 deletions

View File

@ -7,7 +7,7 @@ LICENSE = "MPL-1.1"
LIC_FILES_CHKSUM = "file://LICENSE-MPL-RabbitMQ;md5=ce8293a7cc187353c90cb24a8ecee4ce"
SRC_URI = " \
http://www.rabbitmq.com/releases/rabbitmq-server/v${PV}/${PN}-${PV}.tar.xz \
https://github.com/rabbitmq/${BPN}/releases/download/rabbitmq_v3_6_5/${BP}.tar.xz \
file://rabbitmq-server-0001-Remove-excessive-sd_notify-code.patch \
file://rabbitmq-server-0002-Add-systemd-notification-support.patch \
file://rabbitmq-server-0003-Revert-Distinct-exit-codes-for-CLI-utilities.patch \

View File

@ -1,23 +1,13 @@
SRCREV_FORMAT = "opendev"
SRCREV_opendev = "d778e862571957ece3c404c0c37d325769772fde"
inherit stx-metadata
STX_REPO = "config-files"
STX_SUBPATH = "rabbitmq-server-config"
LICENSE_append = " & Apache-2.0"
SUBPATH0 = "rabbitmq-server-config"
DSTSUFX0 = "stx-configfiles"
LIC_FILES_CHKSUM += "\
file://stx-configfiles-LICENSE;beginline=1;endline=10;md5=47a43f492f496b985b830ce47b8c5cec \
file://${STX_METADATA_PATH}/centos/rabbitmq-server-config.spec;beginline=1;endline=10;md5=47a43f492f496b985b830ce47b8c5cec \
"
SRC_URI += " \
git://opendev.org/starlingx/config-files.git;protocol=https;destsuffix=${DSTSUFX0};branch="r/stx.3.0";subpath=${SUBPATH0};name=opendev \
"
do_unpack_append() {
bb.build.exec_func('do_copy_config_files', d)
}
do_copy_config_files () {
cp -pf ${WORKDIR}/stx-configfiles/centos/rabbitmq-server-config.spec ${S}/stx-configfiles-LICENSE
}
do_install_append () {
@ -26,16 +16,16 @@ do_install_append () {
install -d ${D}/${sysconfdir}/systemd/system
install -d ${D}/${sysconfdir}/logrotate.d
install -m 0755 ${WORKDIR}/stx-configfiles/files/rabbitmq-server.ocf \
install -m 0755 ${STX_METADATA_PATH}/files/rabbitmq-server.ocf \
${D}/usr/lib/ocf/resource.d/rabbitmq/stx.rabbitmq-server
install -m 0644 ${WORKDIR}/stx-configfiles/files/rabbitmq-server.service.example \
install -m 0644 ${STX_METADATA_PATH}/files/rabbitmq-server.service.example \
${D}/${sysconfdir}/systemd/system/rabbitmq-server.service
sed -i -e 's/notify/simple/' ${D}/${sysconfdir}/systemd/system/rabbitmq-server.service
# Remove lib/systemd/
rm -rf ${D}/${nonarch_base_libdir}
install -m 0644 ${WORKDIR}/stx-configfiles/files/rabbitmq-server.logrotate \
install -m 0644 ${STX_METADATA_PATH}/files/rabbitmq-server.logrotate \
${D}/${sysconfdir}/logrotate.d/rabbitmq-server
}