summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/base-files/base-files_3.0.14.bb
diff options
context:
space:
mode:
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.bb53
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 @@
1SUMMARY = "Miscellaneous files for the base system" 1SUMMARY = "Miscellaneous files for the base system"
2DESCRIPTION = "The base-files package creates the basic system directory structure and provides a small set of key configuration files for the system." 2DESCRIPTION = "The base-files package creates the basic system directory structure and provides a small set of key configuration files for the system."
3SECTION = "base" 3SECTION = "base"
4PR = "r89" 4LICENSE = "GPL-2.0-only"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f" 5LIC_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 "
26SRC_URI:append:libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd systemd-resolved', ' file://0001-add-nss-resolve-to-nsswitch.patch', '', d)}"
27
27S = "${WORKDIR}" 28S = "${WORKDIR}"
28 29
29INHIBIT_DEFAULT_DEPS = "1" 30INHIBIT_DEFAULT_DEPS = "1"
30 31
31docdir_append = "/${P}" 32docdir:append = "/${P}"
32dirs1777 = "/tmp ${localstatedir}/volatile/tmp" 33dirs1777 = "/tmp ${localstatedir}/volatile/tmp"
33dirs2775 = "" 34dirs2775 = ""
34dirs555 = "/sys /proc" 35dirs555 = "/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".
68hostname = "${MACHINE}" 69hostname = "${MACHINE}"
69 70
70BASEFILESISSUEINSTALL ?= "do_install_basefilesissue" 71BASEFILESISSUEINSTALL ?= "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#
80pkg_preinst_${PN} () { 81pkg_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
142do_install_append_libc-glibc () { 147do_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
146DISTRO_VERSION[vardepsexclude] += "DATE" 151DISTRO_VERSION[vardepsexclude] += "DATE"
147do_install_basefilesissue () { 152do_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}
163do_install_basefilesissue[vardepsexclude] += "DATE" 168do_install_basefilesissue[vardepsexclude] += "DATE"
164 169
165do_install_append_linuxstdbase() { 170do_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() {
175SYSROOT_DIRS += "${sysconfdir}/skel" 180SYSROOT_DIRS += "${sysconfdir}/skel"
176 181
177PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg" 182PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg"
178FILES_${PN} = "/" 183FILES:${PN} = "/"
179FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses" 184FILES:${PN}-doc = "${docdir} ${datadir}/common-licenses"
180 185
181PACKAGE_ARCH = "${MACHINE_ARCH}" 186PACKAGE_ARCH = "${MACHINE_ARCH}"
182 187
183CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname ${sysconfdir}/hosts'][(d.getVar('hostname') != '')]} ${sysconfdir}/shells" 188CONFFILES:${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname ${sysconfdir}/hosts'][(d.getVar('hostname') != '')]} ${sysconfdir}/shells"
184CONFFILES_${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile" 189CONFFILES:${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile"
190
191INSANE_SKIP:${PN} += "empty-dirs"