Add initial meta-stx to support StarlingX build
[pti/rtp.git] / meta-stx / recipes-support / drbd / drbd-utils_8.4.3.bbappend
1 #
2 ## Copyright (C) 2019 Wind River Systems, Inc.
3 #
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15
16 FILESEXTRAPATHS_append := ":${THISDIR}/${PN}:"
17
18
19 SRC_URI += " \
20         file://0001-skip_wait_con_int_on_simplex.patch \
21         file://0002-drbd-conditional-crm-dependency.patch \
22         file://0003-drbd_report_condition.patch \
23         file://0004-drbdadm-ipaddr-change.patch \
24         file://0005-drbd_reconnect_standby_standalone.patch \
25         file://0006-avoid-kernel-userspace-version-check.patch \
26         file://0007-Update-OCF-to-attempt-connect-in-certain-states.patch \
27         file://0008-Increase-short-cmd-timeout-to-15-secs.patch \
28         file://0009-Check-for-mounted-device-before-demoting-Primary-DRB.patch \
29         file://0010-Include-sysmacros-for-major-minor-macros.patch \
30         file://0011-Disable-documentation.patch \
31         file://drbd.service \
32         "
33
34 EXTRA_OECONF = " \
35                 --with-utils                    \
36                 --with-initdir=/etc/init.d      \
37                 --without-km                    \
38                 --with-pacemaker                \
39                 --with-rgmanager                \
40                 --with-bashcompletion           \
41                 --with-udev                     \
42                 --with-heartbeat                \
43                 --with-distro debian            \
44                "
45
46 FILES_${PN} = "\
47         /var/lib/drbd \
48         /run \
49         ${base_sbindir}/drbdsetup \
50         ${base_sbindir}/drbdadm \
51         ${base_sbindir}/drbdmeta \
52         ${nonarch_base_libdir}/drbd/drbdsetup-83 \
53         ${nonarch_base_libdir}/drbd/drbdadm-83 \
54         ${sysconfdir}/init.d/drbd \
55         ${sysconfdir}/drbd.conf \
56         ${sysconfdir}/xen \
57         ${sysconfdir}/drbd.d \
58         ${sbindir}/drbd-overview \
59         ${libdir}/drbd/outdate-peer.sh \
60         ${libdir}/drbd/snapshot-resync-target-lvm.sh \
61         ${libdir}/drbd/unsnapshot-resync-target-lvm.sh \
62         ${libdir}/drbd/notify-out-of-sync.sh \
63         ${libdir}/drbd/notify-split-brain.sh \
64         ${libdir}/drbd/notify-emergency-reboot.sh \
65         ${libdir}/drbd/notify-emergency-shutdown.sh \
66         ${libdir}/drbd/notify-io-error.sh \
67         ${libdir}/drbd/notify-pri-lost-after-sb.sh \
68         ${libdir}/drbd/notify-pri-lost.sh \
69         ${libdir}/drbd/notify-pri-on-incon-degr.sh \
70         ${libdir}/drbd/notify.sh \
71         ${libdir}/drbd/rhcs_fence \
72         ${sysconfdir}/udev/rules.d/65-drbd.rules \
73         ${libdir}/drbd/crm-fence-peer.sh \
74         ${libdir}/drbd/crm-unfence-peer.sh \
75         ${libdir}/drbd/stonith_admin-fence-peer.sh \
76         ${libdir}/ocf/resource.d/linbit/drbd \
77         ${datadir}/cluster/drbd.sh.drbd-utils \
78         ${datadir}/cluster/drbd.metadata \
79         ${sysconfdir}/ha.d/resource.d/drbddisk \
80         ${sysconfdir}/ha.d/resource.d/drbdupper \
81         ${sysconfdir}/bash_completion.d/drbdadm* \
82         ${systemd_system_unitdir}/drbd.service \
83         "
84
85 inherit update-alternatives
86 ALTERNATIVE_PRIORITY = "80"
87 ALTERNATIVE_${PN} = "drbd.sh"
88 ALTERNATIVE_LINK_NAME[drbd.sh] = "${datadir}/cluster/drbd.sh"
89
90 do_install_append() {
91         mv ${D}${datadir}/cluster/drbd.sh ${D}${datadir}/cluster/drbd.sh.drbd-utils
92         install -d -m 755 ${D}/${systemd_system_unitdir}
93         install -p -D -m 644 ${WORKDIR}/drbd.service ${D}/${systemd_system_unitdir}
94 }
95
96 #inherit systemd
97 #SYSTEMD_PACKAGES += "${PN}"
98 #SYSTEMD_SERVICE_${PN} = "drbd.service"
99
100 pkg_postinst_ontarget_drbd-utils() {
101         ${base_bindir}/systemctl enable drbd.service
102 }