1 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
3 SRCREV_FORMAT = "opendev"
4 SRCREV_opendev = "d778e862571957ece3c404c0c37d325769772fde"
5 SUBPATH0 = "syslog-ng-config"
6 DSTSUFX0 = "stx-configfiles"
8 LICENSE_append = "& Apache-2.0"
10 file://stx-configfiles-LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
14 git://opendev.org/starlingx/config-files.git;protocol=https;destsuffix=${DSTSUFX0};branch="r/stx.3.0";subpath=${SUBPATH0};name=opendev \
15 file://syslog-ng-config-parse-err.patch;striplevel=3 \
16 file://syslog-ng-config-systemd-service.patch;striplevel=3 \
17 file://syslog-ng-conf-replace-match-with-message.patch;striplevel=3 \
22 bb.build.exec_func('do_copy_config_files', d)
25 do_copy_config_files () {
26 cp -pf ${WORKDIR}/${DSTSUFX0}/files/LICENSE ${S}/stx-configfiles-LICENSE
27 cp -pf ${WORKDIR}/${DSTSUFX0}/files/syslog-ng.conf ${S}/syslog-ng.conf
28 cp -pf ${WORKDIR}/${DSTSUFX0}/files/syslog-ng.service ${S}/syslog-ng.service
29 cp -pf ${WORKDIR}/${DSTSUFX0}/files/syslog-ng.logrotate ${S}/syslog-ng.logortate
30 cp -pf ${WORKDIR}/${DSTSUFX0}/files/remotelogging.conf ${S}/remotelogging.conf
31 cp -pf ${WORKDIR}/${DSTSUFX0}/files//fm_event_syslogger ${S}/fm_event_syslogger
34 do_install_append () {
35 rm -rf ${D}${systemd_unitdir}/system/multi-user.target.wants
37 chmod 644 ${D}/${sysconfdir}/syslog-ng/syslog-ng.conf
39 install -D -m644 ${S}/remotelogging.conf ${D}/${sysconfdir}/syslog-ng/remotelogging.conf
40 install -D -m700 ${S}/fm_event_syslogger ${D}/${sbindir}/fm_event_syslogger
43 install -D -m700 ${S}/fm_event_syslogger ${D}/${sbindir}/fm_event_syslogger
44 install -D -m644 ${S}/syslog-ng.logrotate ${D}/${sysconfdir}/logrotate.d/syslog
45 install -D -m644 ${S}/remotelogging.conf ${D}/${sysconfdir}/syslog-ng/remotelogging.conf
46 install -D -m644 ${S}/syslog-ng.conf ${D}/${sysconfdir}/syslog-ng/syslog-ng.conf
48 # install -D -m644 ${S}/syslog-ng.service ${D}/${sysconfdir}/systemd/system/syslog-ng.service
49 install -D -m644 ${S}/syslog-ng.service ${D}/${systemd_system_unitdir}/syslog-ng.service
50 # Fix the config version to avoid warning
51 sed -i -e 's/\(@version: \).*/\1 3.19/' ${D}${sysconfdir}/syslog-ng/syslog-ng.conf
52 # Workaround: comment out the udp source to aviod the service fail to start at boot time
53 sed -i -e 's/\(.*s_udp.*\)/#\1/' ${D}/${sysconfdir}/syslog-ng/syslog-ng.conf
54 # And replace default unit file with stx specific service file
55 rm -f ${D}/${systemd_system_unitdir}/syslog-ng@.service
59 # SYSTEMD_PACKAGES_append = "${PN}"
60 SYSTEMD_SERVICE_${PN} = "syslog-ng.service"
61 SYSTEMD_AUTO_ENABLE = "enable"
62 RDEPENDS_${PN}_append = " bash"