diff options
Diffstat (limited to 'meta/recipes-core/base-files/base-files_3.0.14.bb')
-rw-r--r-- | meta/recipes-core/base-files/base-files_3.0.14.bb | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb index 94299431f6..42a8026e63 100644 --- a/meta/recipes-core/base-files/base-files_3.0.14.bb +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb | |||
@@ -1,8 +1,7 @@ | |||
1 | SUMMARY = "Miscellaneous files for the base system" | 1 | SUMMARY = "Miscellaneous files for the base system" |
2 | DESCRIPTION = "The base-files package creates the basic system directory structure and provides a small set of key configuration files for the system." | 2 | DESCRIPTION = "The base-files package creates the basic system directory structure and provides a small set of key configuration files for the system." |
3 | SECTION = "base" | 3 | SECTION = "base" |
4 | PR = "r89" | 4 | LICENSE = "GPL-2.0-only" |
5 | LICENSE = "GPLv2" | ||
6 | LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f" | 5 | LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f" |
7 | # Removed all license related tasks in this recipe as license.bbclass | 6 | # Removed all license related tasks in this recipe as license.bbclass |
8 | # now deals with this. In order to get accurate licensing on to the image: | 7 | # now deals with this. In order to get accurate licensing on to the image: |
@@ -24,11 +23,13 @@ SRC_URI = "file://rotation \ | |||
24 | file://share/dot.profile \ | 23 | file://share/dot.profile \ |
25 | file://licenses/GPL-2 \ | 24 | file://licenses/GPL-2 \ |
26 | " | 25 | " |
26 | SRC_URI:append:libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd systemd-resolved', ' file://0001-add-nss-resolve-to-nsswitch.patch', '', d)}" | ||
27 | |||
27 | S = "${WORKDIR}" | 28 | S = "${WORKDIR}" |
28 | 29 | ||
29 | INHIBIT_DEFAULT_DEPS = "1" | 30 | INHIBIT_DEFAULT_DEPS = "1" |
30 | 31 | ||
31 | docdir_append = "/${P}" | 32 | docdir:append = "/${P}" |
32 | dirs1777 = "/tmp ${localstatedir}/volatile/tmp" | 33 | dirs1777 = "/tmp ${localstatedir}/volatile/tmp" |
33 | dirs2775 = "" | 34 | dirs2775 = "" |
34 | dirs555 = "/sys /proc" | 35 | dirs555 = "/sys /proc" |
@@ -64,7 +65,7 @@ conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ | |||
64 | # hostnames. | 65 | # hostnames. |
65 | # | 66 | # |
66 | # The hostname can be changed outside of this recipe by using | 67 | # The hostname can be changed outside of this recipe by using |
67 | # hostname_pn-base-files = "my-host-name". | 68 | # hostname:pn-base-files = "my-host-name". |
68 | hostname = "${MACHINE}" | 69 | hostname = "${MACHINE}" |
69 | 70 | ||
70 | BASEFILESISSUEINSTALL ?= "do_install_basefilesissue" | 71 | BASEFILESISSUEINSTALL ?= "do_install_basefilesissue" |
@@ -77,7 +78,7 @@ BASEFILESISSUEINSTALL ?= "do_install_basefilesissue" | |||
77 | # Otherwise the directory creation will fail and we will have circular symbolic | 78 | # Otherwise the directory creation will fail and we will have circular symbolic |
78 | # links. | 79 | # links. |
79 | # | 80 | # |
80 | pkg_preinst_${PN} () { | 81 | pkg_preinst:${PN} () { |
81 | #!/bin/sh -e | 82 | #!/bin/sh -e |
82 | if [ x"$D" = "x" ]; then | 83 | if [ x"$D" = "x" ]; then |
83 | if [ -h "/var/lock" ]; then | 84 | if [ -h "/var/lock" ]; then |
@@ -112,23 +113,23 @@ do_install () { | |||
112 | ln -snf ../run ${D}${localstatedir}/run | 113 | ln -snf ../run ${D}${localstatedir}/run |
113 | ln -snf ../run/lock ${D}${localstatedir}/lock | 114 | ln -snf ../run/lock ${D}${localstatedir}/lock |
114 | 115 | ||
115 | install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts | 116 | install -m 0644 ${S}/hosts ${D}${sysconfdir}/hosts |
116 | ${BASEFILESISSUEINSTALL} | 117 | ${BASEFILESISSUEINSTALL} |
117 | 118 | ||
118 | rotation=`cat ${WORKDIR}/rotation` | 119 | rotation=`cat ${S}/rotation` |
119 | if [ "$rotation" != "0" ]; then | 120 | if [ "$rotation" != "0" ]; then |
120 | install -m 0644 ${WORKDIR}/rotation ${D}${sysconfdir}/rotation | 121 | install -m 0644 ${S}/rotation ${D}${sysconfdir}/rotation |
121 | fi | 122 | fi |
122 | 123 | ||
123 | install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab | 124 | install -m 0644 ${S}/fstab ${D}${sysconfdir}/fstab |
124 | install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile | 125 | install -m 0644 ${S}/profile ${D}${sysconfdir}/profile |
125 | sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile | 126 | sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile |
126 | sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile | 127 | sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile |
127 | install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells | 128 | install -m 0644 ${S}/shells ${D}${sysconfdir}/shells |
128 | install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile | 129 | install -m 0755 ${S}/share/dot.profile ${D}${sysconfdir}/skel/.profile |
129 | install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc | 130 | install -m 0755 ${S}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc |
130 | install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf | 131 | install -m 0644 ${S}/host.conf ${D}${sysconfdir}/host.conf |
131 | install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd | 132 | install -m 0644 ${S}/motd ${D}${sysconfdir}/motd |
132 | 133 | ||
133 | ln -sf /proc/mounts ${D}${sysconfdir}/mtab | 134 | ln -sf /proc/mounts ${D}${sysconfdir}/mtab |
134 | 135 | ||
@@ -137,15 +138,19 @@ do_install () { | |||
137 | echo ${hostname} > ${D}${sysconfdir}/hostname | 138 | echo ${hostname} > ${D}${sysconfdir}/hostname |
138 | echo "127.0.1.1 ${hostname}" >> ${D}${sysconfdir}/hosts | 139 | echo "127.0.1.1 ${hostname}" >> ${D}${sysconfdir}/hosts |
139 | fi | 140 | fi |
141 | |||
142 | if ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'false', 'true', d)}; then | ||
143 | sed -i '/^::1/s/ localhost//' ${D}${sysconfdir}/hosts | ||
144 | fi | ||
140 | } | 145 | } |
141 | 146 | ||
142 | do_install_append_libc-glibc () { | 147 | do_install:append:libc-glibc () { |
143 | install -m 0644 ${WORKDIR}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf | 148 | install -m 0644 ${S}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf |
144 | } | 149 | } |
145 | 150 | ||
146 | DISTRO_VERSION[vardepsexclude] += "DATE" | 151 | DISTRO_VERSION[vardepsexclude] += "DATE" |
147 | do_install_basefilesissue () { | 152 | do_install_basefilesissue () { |
148 | install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir} | 153 | install -m 644 ${S}/issue* ${D}${sysconfdir} |
149 | if [ -n "${DISTRO_NAME}" ]; then | 154 | if [ -n "${DISTRO_NAME}" ]; then |
150 | printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue | 155 | printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue |
151 | printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net | 156 | printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net |
@@ -162,7 +167,7 @@ do_install_basefilesissue () { | |||
162 | } | 167 | } |
163 | do_install_basefilesissue[vardepsexclude] += "DATE" | 168 | do_install_basefilesissue[vardepsexclude] += "DATE" |
164 | 169 | ||
165 | do_install_append_linuxstdbase() { | 170 | do_install:append:linuxstdbase() { |
166 | for d in ${dirs755-lsb}; do | 171 | for d in ${dirs755-lsb}; do |
167 | install -m 0755 -d ${D}$d | 172 | install -m 0755 -d ${D}$d |
168 | done | 173 | done |
@@ -175,10 +180,12 @@ do_install_append_linuxstdbase() { | |||
175 | SYSROOT_DIRS += "${sysconfdir}/skel" | 180 | SYSROOT_DIRS += "${sysconfdir}/skel" |
176 | 181 | ||
177 | PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg" | 182 | PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg" |
178 | FILES_${PN} = "/" | 183 | FILES:${PN} = "/" |
179 | FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses" | 184 | FILES:${PN}-doc = "${docdir} ${datadir}/common-licenses" |
180 | 185 | ||
181 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 186 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
182 | 187 | ||
183 | CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname ${sysconfdir}/hosts'][(d.getVar('hostname') != '')]} ${sysconfdir}/shells" | 188 | CONFFILES:${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname ${sysconfdir}/hosts'][(d.getVar('hostname') != '')]} ${sysconfdir}/shells" |
184 | CONFFILES_${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile" | 189 | CONFFILES:${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile" |
190 | |||
191 | INSANE_SKIP:${PN} += "empty-dirs" | ||