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.bb58
1 files changed, 18 insertions, 40 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 9fab53ce63..3f01bb35d9 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
@@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f"
11 11
12SRC_URI = "file://rotation \ 12SRC_URI = "file://rotation \
13 file://nsswitch.conf \ 13 file://nsswitch.conf \
14 file://nsswitch-resolved.conf \
14 file://motd \ 15 file://motd \
15 file://hosts \ 16 file://hosts \
16 file://host.conf \ 17 file://host.conf \
@@ -23,14 +24,13 @@ SRC_URI = "file://rotation \
23 file://share/dot.profile \ 24 file://share/dot.profile \
24 file://licenses/GPL-2 \ 25 file://licenses/GPL-2 \
25 " 26 "
26SRC_URI:append:libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd systemd-resolved', ' file://0001-add-nss-resolve-to-nsswitch.patch', '', d)}"
27 27
28S = "${WORKDIR}" 28S = "${UNPACKDIR}"
29 29
30INHIBIT_DEFAULT_DEPS = "1" 30INHIBIT_DEFAULT_DEPS = "1"
31 31
32docdir:append = "/${P}" 32docdir:append = "/${P}"
33dirs1777 = "/tmp ${localstatedir}/volatile/tmp" 33dirs1777 = "/tmp ${localstatedir}/${@bb.utils.contains('FILESYSTEM_PERMS_TABLES', 'files/fs-perms-volatile-tmp.txt', 'volatile/', '', d)}tmp"
34dirs2775 = "" 34dirs2775 = ""
35dirs555 = "/sys /proc" 35dirs555 = "/sys /proc"
36dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \ 36dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
@@ -43,7 +43,7 @@ dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
43 ${localstatedir}/backups ${localstatedir}/lib \ 43 ${localstatedir}/backups ${localstatedir}/lib \
44 ${localstatedir}/lib/misc ${localstatedir}/spool \ 44 ${localstatedir}/lib/misc ${localstatedir}/spool \
45 ${localstatedir}/volatile \ 45 ${localstatedir}/volatile \
46 ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log \ 46 ${localstatedir}/${@bb.utils.contains('FILESYSTEM_PERMS_TABLES', 'files/fs-perms-volatile-log.txt', 'volatile/', '', d)}log \
47 /home ${prefix}/src ${localstatedir}/local \ 47 /home ${prefix}/src ${localstatedir}/local \
48 /media" 48 /media"
49 49
@@ -54,7 +54,8 @@ dirs755-lsb = "/srv \
54 ${prefix}/lib/locale" 54 ${prefix}/lib/locale"
55dirs2775-lsb = "/var/mail" 55dirs2775-lsb = "/var/mail"
56 56
57volatiles = "${@'log' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''} tmp" 57volatiles = "${@bb.utils.contains('FILESYSTEM_PERMS_TABLES', 'files/fs-perms-volatile-log.txt', 'log', '', d)} \
58 ${@bb.utils.contains('FILESYSTEM_PERMS_TABLES', 'files/fs-perms-volatile-tmp.txt', 'tmp', '', d)}"
58conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ 59conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \
59 ${sysconfdir}/issue /${sysconfdir}/issue.net \ 60 ${sysconfdir}/issue /${sysconfdir}/issue.net \
60 ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \ 61 ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \
@@ -70,29 +71,6 @@ hostname = "${MACHINE}"
70 71
71BASEFILESISSUEINSTALL ?= "do_install_basefilesissue" 72BASEFILESISSUEINSTALL ?= "do_install_basefilesissue"
72 73
73# In previous versions of base-files, /run was a softlink to /var/run and the
74# directory was located in /var/volatlie/run. Also, /var/lock was a softlink
75# to /var/volatile/lock which is where the real directory was located. Now,
76# /run and /run/lock are the real directories. If we are upgrading, we may
77# need to remove the symbolic links first before we create the directories.
78# Otherwise the directory creation will fail and we will have circular symbolic
79# links.
80#
81pkg_preinst:${PN} () {
82 #!/bin/sh -e
83 if [ x"$D" = "x" ]; then
84 if [ -h "/var/lock" ]; then
85 # Remove the symbolic link
86 rm -f /var/lock
87 fi
88
89 if [ -h "/run" ]; then
90 # Remove the symbolic link
91 rm -f /run
92 fi
93 fi
94}
95
96do_install () { 74do_install () {
97 for d in ${dirs555}; do 75 for d in ${dirs555}; do
98 install -m 0555 -d ${D}$d 76 install -m 0555 -d ${D}$d
@@ -113,23 +91,23 @@ do_install () {
113 ln -snf ../run ${D}${localstatedir}/run 91 ln -snf ../run ${D}${localstatedir}/run
114 ln -snf ../run/lock ${D}${localstatedir}/lock 92 ln -snf ../run/lock ${D}${localstatedir}/lock
115 93
116 install -m 0644 ${WORKDIR}/hosts ${D}${sysconfdir}/hosts 94 install -m 0644 ${S}/hosts ${D}${sysconfdir}/hosts
117 ${BASEFILESISSUEINSTALL} 95 ${BASEFILESISSUEINSTALL}
118 96
119 rotation=`cat ${WORKDIR}/rotation` 97 rotation=`cat ${S}/rotation`
120 if [ "$rotation" != "0" ]; then 98 if [ "$rotation" != "0" ]; then
121 install -m 0644 ${WORKDIR}/rotation ${D}${sysconfdir}/rotation 99 install -m 0644 ${S}/rotation ${D}${sysconfdir}/rotation
122 fi 100 fi
123 101
124 install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab 102 install -m 0644 ${S}/fstab ${D}${sysconfdir}/fstab
125 install -m 0644 ${WORKDIR}/profile ${D}${sysconfdir}/profile 103 install -m 0644 ${S}/profile ${D}${sysconfdir}/profile
126 sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile 104 sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}${sysconfdir}/profile
127 sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile 105 sed -i 's#@BINDIR@#${bindir}#g' ${D}${sysconfdir}/profile
128 install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells 106 install -m 0644 ${S}/shells ${D}${sysconfdir}/shells
129 install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile 107 install -m 0755 ${S}/share/dot.profile ${D}${sysconfdir}/skel/.profile
130 install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc 108 install -m 0755 ${S}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc
131 install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf 109 install -m 0644 ${S}/host.conf ${D}${sysconfdir}/host.conf
132 install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd 110 install -m 0644 ${S}/motd ${D}${sysconfdir}/motd
133 111
134 ln -sf /proc/mounts ${D}${sysconfdir}/mtab 112 ln -sf /proc/mounts ${D}${sysconfdir}/mtab
135 113
@@ -145,12 +123,12 @@ do_install () {
145} 123}
146 124
147do_install:append:libc-glibc () { 125do_install:append:libc-glibc () {
148 install -m 0644 ${WORKDIR}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf 126 install -m 0644 ${S}/${@bb.utils.contains('DISTRO_FEATURES', 'systemd systemd-resolved', 'nsswitch-resolved.conf', 'nsswitch.conf', d)} ${D}${sysconfdir}/nsswitch.conf
149} 127}
150 128
151DISTRO_VERSION[vardepsexclude] += "DATE" 129DISTRO_VERSION[vardepsexclude] += "DATE"
152do_install_basefilesissue () { 130do_install_basefilesissue () {
153 install -m 644 ${WORKDIR}/issue* ${D}${sysconfdir} 131 install -m 644 ${S}/issue* ${D}${sysconfdir}
154 if [ -n "${DISTRO_NAME}" ]; then 132 if [ -n "${DISTRO_NAME}" ]; then
155 printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue 133 printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue
156 printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net 134 printf "${DISTRO_NAME} " >> ${D}${sysconfdir}/issue.net