diff options
Diffstat (limited to 'meta/classes/rootfs-postcommands.bbclass')
-rw-r--r-- | meta/classes/rootfs-postcommands.bbclass | 375 |
1 files changed, 0 insertions, 375 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass deleted file mode 100644 index 1f27a3d07a..0000000000 --- a/meta/classes/rootfs-postcommands.bbclass +++ /dev/null | |||
@@ -1,375 +0,0 @@ | |||
1 | |||
2 | # Zap the root password if debug-tweaks feature is not enabled | ||
3 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password; ",d)}' | ||
4 | |||
5 | # Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks or allow-empty-password is enabled | ||
6 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}' | ||
7 | |||
8 | # Allow dropbear/openssh to accept root logins if debug-tweaks or allow-root-login is enabled | ||
9 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], "ssh_allow_root_login; ", "",d)}' | ||
10 | |||
11 | # Enable postinst logging if debug-tweaks is enabled | ||
12 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}' | ||
13 | |||
14 | # Create /etc/timestamp during image construction to give a reasonably sane default time setting | ||
15 | ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp; " | ||
16 | |||
17 | # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled | ||
18 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}' | ||
19 | |||
20 | # We also need to do the same for the kernel boot parameters, | ||
21 | # otherwise kernel or initramfs end up mounting the rootfs read/write | ||
22 | # (the default) if supported by the underlying storage. | ||
23 | # | ||
24 | # We do this with _append because the default value might get set later with ?= | ||
25 | # and we don't want to disable such a default that by setting a value here. | ||
26 | APPEND_append = '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", " ro", "", d)}' | ||
27 | |||
28 | # Generates test data file with data store variables expanded in json format | ||
29 | ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data; " | ||
30 | |||
31 | # Write manifest | ||
32 | IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest" | ||
33 | ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; " | ||
34 | # Set default postinst log file | ||
35 | POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log" | ||
36 | # Set default target for systemd images | ||
37 | SYSTEMD_DEFAULT_TARGET ?= '${@bb.utils.contains("IMAGE_FEATURES", "x11-base", "graphical.target", "multi-user.target", d)}' | ||
38 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target; systemd_create_users;", "", d)}' | ||
39 | |||
40 | ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile;' | ||
41 | |||
42 | inherit image-artifact-names | ||
43 | |||
44 | # Sort the user and group entries in /etc by ID in order to make the content | ||
45 | # deterministic. Package installs are not deterministic, causing the ordering | ||
46 | # of entries to change between builds. In case that this isn't desired, | ||
47 | # the command can be overridden. | ||
48 | # | ||
49 | # Note that useradd-staticids.bbclass has to be used to ensure that | ||
50 | # the numeric IDs of dynamically created entries remain stable. | ||
51 | # | ||
52 | # We want this to run as late as possible, in particular after | ||
53 | # systemd_sysusers_create and set_user_group. Using _append is not | ||
54 | # enough for that, set_user_group is added that way and would end | ||
55 | # up running after us. | ||
56 | SORT_PASSWD_POSTPROCESS_COMMAND ??= " sort_passwd; " | ||
57 | python () { | ||
58 | d.appendVar('ROOTFS_POSTPROCESS_COMMAND', '${SORT_PASSWD_POSTPROCESS_COMMAND}') | ||
59 | d.appendVar('ROOTFS_POSTPROCESS_COMMAND', 'rootfs_reproducible;') | ||
60 | } | ||
61 | |||
62 | systemd_create_users () { | ||
63 | for conffile in ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd.conf ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd-remote.conf; do | ||
64 | [ -e $conffile ] || continue | ||
65 | grep -v "^#" $conffile | sed -e '/^$/d' | while read type name id comment; do | ||
66 | if [ "$type" = "u" ]; then | ||
67 | useradd_params="--shell /sbin/nologin" | ||
68 | [ "$id" != "-" ] && useradd_params="$useradd_params --uid $id" | ||
69 | [ "$comment" != "-" ] && useradd_params="$useradd_params --comment $comment" | ||
70 | useradd_params="$useradd_params --system $name" | ||
71 | eval useradd --root ${IMAGE_ROOTFS} $useradd_params || true | ||
72 | elif [ "$type" = "g" ]; then | ||
73 | groupadd_params="" | ||
74 | [ "$id" != "-" ] && groupadd_params="$groupadd_params --gid $id" | ||
75 | groupadd_params="$groupadd_params --system $name" | ||
76 | eval groupadd --root ${IMAGE_ROOTFS} $groupadd_params || true | ||
77 | elif [ "$type" = "m" ]; then | ||
78 | group=$id | ||
79 | if [ ! `grep -q "^${group}:" ${IMAGE_ROOTFS}${sysconfdir}/group` ]; then | ||
80 | eval groupadd --root ${IMAGE_ROOTFS} --system $group | ||
81 | fi | ||
82 | if [ ! `grep -q "^${name}:" ${IMAGE_ROOTFS}${sysconfdir}/passwd` ]; then | ||
83 | eval useradd --root ${IMAGE_ROOTFS} --shell /sbin/nologin --system $name | ||
84 | fi | ||
85 | eval usermod --root ${IMAGE_ROOTFS} -a -G $group $name | ||
86 | fi | ||
87 | done | ||
88 | done | ||
89 | } | ||
90 | |||
91 | # | ||
92 | # A hook function to support read-only-rootfs IMAGE_FEATURES | ||
93 | # | ||
94 | read_only_rootfs_hook () { | ||
95 | # Tweak the mount option and fs_passno for rootfs in fstab | ||
96 | if [ -f ${IMAGE_ROOTFS}/etc/fstab ]; then | ||
97 | sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab | ||
98 | fi | ||
99 | |||
100 | # Tweak the "mount -o remount,rw /" command in busybox-inittab inittab | ||
101 | if [ -f ${IMAGE_ROOTFS}/etc/inittab ]; then | ||
102 | sed -i 's|/bin/mount -o remount,rw /|/bin/mount -o remount,ro /|' ${IMAGE_ROOTFS}/etc/inittab | ||
103 | fi | ||
104 | |||
105 | # If we're using openssh and the /etc/ssh directory has no pre-generated keys, | ||
106 | # we should configure openssh to use the configuration file /etc/ssh/sshd_config_readonly | ||
107 | # and the keys under /var/run/ssh. | ||
108 | if [ -d ${IMAGE_ROOTFS}/etc/ssh ]; then | ||
109 | if [ -e ${IMAGE_ROOTFS}/etc/ssh/ssh_host_rsa_key ]; then | ||
110 | echo "SYSCONFDIR=\${SYSCONFDIR:-/etc/ssh}" >> ${IMAGE_ROOTFS}/etc/default/ssh | ||
111 | echo "SSHD_OPTS=" >> ${IMAGE_ROOTFS}/etc/default/ssh | ||
112 | else | ||
113 | echo "SYSCONFDIR=\${SYSCONFDIR:-/var/run/ssh}" >> ${IMAGE_ROOTFS}/etc/default/ssh | ||
114 | echo "SSHD_OPTS='-f /etc/ssh/sshd_config_readonly'" >> ${IMAGE_ROOTFS}/etc/default/ssh | ||
115 | fi | ||
116 | fi | ||
117 | |||
118 | # Also tweak the key location for dropbear in the same way. | ||
119 | if [ -d ${IMAGE_ROOTFS}/etc/dropbear ]; then | ||
120 | if [ ! -e ${IMAGE_ROOTFS}/etc/dropbear/dropbear_rsa_host_key ]; then | ||
121 | echo "DROPBEAR_RSAKEY_DIR=/var/lib/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear | ||
122 | fi | ||
123 | fi | ||
124 | |||
125 | if ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then | ||
126 | # Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes | ||
127 | if [ -e ${IMAGE_ROOTFS}/etc/default/rcS ]; then | ||
128 | sed -i 's/ROOTFS_READ_ONLY=no/ROOTFS_READ_ONLY=yes/' ${IMAGE_ROOTFS}/etc/default/rcS | ||
129 | fi | ||
130 | # Run populate-volatile.sh at rootfs time to set up basic files | ||
131 | # and directories to support read-only rootfs. | ||
132 | if [ -x ${IMAGE_ROOTFS}/etc/init.d/populate-volatile.sh ]; then | ||
133 | ${IMAGE_ROOTFS}/etc/init.d/populate-volatile.sh | ||
134 | fi | ||
135 | fi | ||
136 | |||
137 | if ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "true", "false", d)}; then | ||
138 | # Create machine-id | ||
139 | # 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable | ||
140 | touch ${IMAGE_ROOTFS}${sysconfdir}/machine-id | ||
141 | fi | ||
142 | } | ||
143 | |||
144 | # | ||
145 | # This function is intended to disallow empty root password if 'debug-tweaks' is not in IMAGE_FEATURES. | ||
146 | # | ||
147 | zap_empty_root_password () { | ||
148 | if [ -e ${IMAGE_ROOTFS}/etc/shadow ]; then | ||
149 | sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/shadow | ||
150 | fi | ||
151 | if [ -e ${IMAGE_ROOTFS}/etc/passwd ]; then | ||
152 | sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/passwd | ||
153 | fi | ||
154 | } | ||
155 | |||
156 | # | ||
157 | # allow dropbear/openssh to accept logins from accounts with an empty password string | ||
158 | # | ||
159 | ssh_allow_empty_password () { | ||
160 | for config in sshd_config sshd_config_readonly; do | ||
161 | if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/$config ]; then | ||
162 | sed -i 's/^[#[:space:]]*PermitEmptyPasswords.*/PermitEmptyPasswords yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/$config | ||
163 | fi | ||
164 | done | ||
165 | |||
166 | if [ -e ${IMAGE_ROOTFS}${sbindir}/dropbear ] ; then | ||
167 | if grep -q DROPBEAR_EXTRA_ARGS ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear 2>/dev/null ; then | ||
168 | if ! grep -q "DROPBEAR_EXTRA_ARGS=.*-B" ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear ; then | ||
169 | sed -i 's/^DROPBEAR_EXTRA_ARGS="*\([^"]*\)"*/DROPBEAR_EXTRA_ARGS="\1 -B"/' ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear | ||
170 | fi | ||
171 | else | ||
172 | printf '\nDROPBEAR_EXTRA_ARGS="-B"\n' >> ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear | ||
173 | fi | ||
174 | fi | ||
175 | |||
176 | if [ -d ${IMAGE_ROOTFS}${sysconfdir}/pam.d ] ; then | ||
177 | for f in `find ${IMAGE_ROOTFS}${sysconfdir}/pam.d/* -type f -exec test -e {} \; -print` | ||
178 | do | ||
179 | sed -i 's/nullok_secure/nullok/' $f | ||
180 | done | ||
181 | fi | ||
182 | } | ||
183 | |||
184 | # | ||
185 | # allow dropbear/openssh to accept root logins | ||
186 | # | ||
187 | ssh_allow_root_login () { | ||
188 | for config in sshd_config sshd_config_readonly; do | ||
189 | if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/$config ]; then | ||
190 | sed -i 's/^[#[:space:]]*PermitRootLogin.*/PermitRootLogin yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/$config | ||
191 | fi | ||
192 | done | ||
193 | |||
194 | if [ -e ${IMAGE_ROOTFS}${sbindir}/dropbear ] ; then | ||
195 | if grep -q DROPBEAR_EXTRA_ARGS ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear 2>/dev/null ; then | ||
196 | sed -i '/^DROPBEAR_EXTRA_ARGS=/ s/-w//' ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear | ||
197 | fi | ||
198 | fi | ||
199 | } | ||
200 | |||
201 | python sort_passwd () { | ||
202 | import rootfspostcommands | ||
203 | rootfspostcommands.sort_passwd(d.expand('${IMAGE_ROOTFS}${sysconfdir}')) | ||
204 | } | ||
205 | |||
206 | # | ||
207 | # Enable postinst logging if debug-tweaks is enabled | ||
208 | # | ||
209 | postinst_enable_logging () { | ||
210 | mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/default | ||
211 | echo "POSTINST_LOGGING=1" >> ${IMAGE_ROOTFS}${sysconfdir}/default/postinst | ||
212 | echo "LOGFILE=${POSTINST_LOGFILE}" >> ${IMAGE_ROOTFS}${sysconfdir}/default/postinst | ||
213 | } | ||
214 | |||
215 | # | ||
216 | # Modify systemd default target | ||
217 | # | ||
218 | set_systemd_default_target () { | ||
219 | if [ -d ${IMAGE_ROOTFS}${sysconfdir}/systemd/system -a -e ${IMAGE_ROOTFS}${systemd_unitdir}/system/${SYSTEMD_DEFAULT_TARGET} ]; then | ||
220 | ln -sf ${systemd_unitdir}/system/${SYSTEMD_DEFAULT_TARGET} ${IMAGE_ROOTFS}${sysconfdir}/systemd/system/default.target | ||
221 | fi | ||
222 | } | ||
223 | |||
224 | # If /var/volatile is not empty, we have seen problems where programs such as the | ||
225 | # journal make assumptions based on the contents of /var/volatile. The journal | ||
226 | # would then write to /var/volatile before it was mounted, thus hiding the | ||
227 | # items previously written. | ||
228 | # | ||
229 | # This change is to attempt to fix those types of issues in a way that doesn't | ||
230 | # affect users that may not be using /var/volatile. | ||
231 | empty_var_volatile () { | ||
232 | if [ -e ${IMAGE_ROOTFS}/etc/fstab ]; then | ||
233 | match=`awk '$1 !~ "#" && $2 ~ /\/var\/volatile/{print $2}' ${IMAGE_ROOTFS}/etc/fstab 2> /dev/null` | ||
234 | if [ -n "$match" ]; then | ||
235 | find ${IMAGE_ROOTFS}/var/volatile -mindepth 1 -delete | ||
236 | fi | ||
237 | fi | ||
238 | } | ||
239 | |||
240 | # Turn any symbolic /sbin/init link into a file | ||
241 | remove_init_link () { | ||
242 | if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then | ||
243 | LINKFILE=${IMAGE_ROOTFS}`readlink ${IMAGE_ROOTFS}/sbin/init` | ||
244 | rm ${IMAGE_ROOTFS}/sbin/init | ||
245 | cp $LINKFILE ${IMAGE_ROOTFS}/sbin/init | ||
246 | fi | ||
247 | } | ||
248 | |||
249 | make_zimage_symlink_relative () { | ||
250 | if [ -L ${IMAGE_ROOTFS}/boot/zImage ]; then | ||
251 | (cd ${IMAGE_ROOTFS}/boot/ && for i in `ls zImage-* | sort`; do ln -sf $i zImage; done) | ||
252 | fi | ||
253 | } | ||
254 | |||
255 | python write_image_manifest () { | ||
256 | from oe.rootfs import image_list_installed_packages | ||
257 | from oe.utils import format_pkg_list | ||
258 | |||
259 | deploy_dir = d.getVar('IMGDEPLOYDIR') | ||
260 | link_name = d.getVar('IMAGE_LINK_NAME') | ||
261 | manifest_name = d.getVar('IMAGE_MANIFEST') | ||
262 | |||
263 | if not manifest_name: | ||
264 | return | ||
265 | |||
266 | pkgs = image_list_installed_packages(d) | ||
267 | with open(manifest_name, 'w+') as image_manifest: | ||
268 | image_manifest.write(format_pkg_list(pkgs, "ver")) | ||
269 | |||
270 | if os.path.exists(manifest_name) and link_name: | ||
271 | manifest_link = deploy_dir + "/" + link_name + ".manifest" | ||
272 | if os.path.lexists(manifest_link): | ||
273 | os.remove(manifest_link) | ||
274 | os.symlink(os.path.basename(manifest_name), manifest_link) | ||
275 | } | ||
276 | |||
277 | # Can be used to create /etc/timestamp during image construction to give a reasonably | ||
278 | # sane default time setting | ||
279 | rootfs_update_timestamp () { | ||
280 | if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" != "" ]; then | ||
281 | # Convert UTC into %4Y%2m%2d%2H%2M%2S | ||
282 | sformatted=`date -u -d @${REPRODUCIBLE_TIMESTAMP_ROOTFS} +%4Y%2m%2d%2H%2M%2S` | ||
283 | else | ||
284 | sformatted=`date -u +%4Y%2m%2d%2H%2M%2S` | ||
285 | fi | ||
286 | echo $sformatted > ${IMAGE_ROOTFS}/etc/timestamp | ||
287 | bbnote "rootfs_update_timestamp: set /etc/timestamp to $sformatted" | ||
288 | } | ||
289 | |||
290 | # Prevent X from being started | ||
291 | rootfs_no_x_startup () { | ||
292 | if [ -f ${IMAGE_ROOTFS}/etc/init.d/xserver-nodm ]; then | ||
293 | chmod a-x ${IMAGE_ROOTFS}/etc/init.d/xserver-nodm | ||
294 | fi | ||
295 | } | ||
296 | |||
297 | rootfs_trim_schemas () { | ||
298 | for schema in ${IMAGE_ROOTFS}/etc/gconf/schemas/*.schemas | ||
299 | do | ||
300 | # Need this in case no files exist | ||
301 | if [ -e $schema ]; then | ||
302 | oe-trim-schemas $schema > $schema.new | ||
303 | mv $schema.new $schema | ||
304 | fi | ||
305 | done | ||
306 | } | ||
307 | |||
308 | rootfs_check_host_user_contaminated () { | ||
309 | contaminated="${WORKDIR}/host-user-contaminated.txt" | ||
310 | HOST_USER_UID="$(PSEUDO_UNLOAD=1 id -u)" | ||
311 | HOST_USER_GID="$(PSEUDO_UNLOAD=1 id -g)" | ||
312 | |||
313 | find "${IMAGE_ROOTFS}" -path "${IMAGE_ROOTFS}/home" -prune -o \ | ||
314 | -user "$HOST_USER_UID" -print -o -group "$HOST_USER_GID" -print >"$contaminated" | ||
315 | |||
316 | sed -e "s,${IMAGE_ROOTFS},," $contaminated | while read line; do | ||
317 | bbwarn "Path in the rootfs is owned by the same user or group as the user running bitbake:" $line `ls -lan ${IMAGE_ROOTFS}/$line` | ||
318 | done | ||
319 | |||
320 | if [ -s "$contaminated" ]; then | ||
321 | bbwarn "/etc/passwd:" `cat ${IMAGE_ROOTFS}/etc/passwd` | ||
322 | bbwarn "/etc/group:" `cat ${IMAGE_ROOTFS}/etc/group` | ||
323 | fi | ||
324 | } | ||
325 | |||
326 | # Make any absolute links in a sysroot relative | ||
327 | rootfs_sysroot_relativelinks () { | ||
328 | sysroot-relativelinks.py ${SDK_OUTPUT}/${SDKTARGETSYSROOT} | ||
329 | } | ||
330 | |||
331 | # Generated test data json file | ||
332 | python write_image_test_data() { | ||
333 | from oe.data import export2json | ||
334 | |||
335 | deploy_dir = d.getVar('IMGDEPLOYDIR') | ||
336 | link_name = d.getVar('IMAGE_LINK_NAME') | ||
337 | testdata_name = os.path.join(deploy_dir, "%s.testdata.json" % d.getVar('IMAGE_NAME')) | ||
338 | |||
339 | searchString = "%s/"%(d.getVar("TOPDIR")).replace("//","/") | ||
340 | export2json(d, testdata_name, searchString=searchString, replaceString="") | ||
341 | |||
342 | if os.path.exists(testdata_name) and link_name: | ||
343 | testdata_link = os.path.join(deploy_dir, "%s.testdata.json" % link_name) | ||
344 | if os.path.lexists(testdata_link): | ||
345 | os.remove(testdata_link) | ||
346 | os.symlink(os.path.basename(testdata_name), testdata_link) | ||
347 | } | ||
348 | write_image_test_data[vardepsexclude] += "TOPDIR" | ||
349 | |||
350 | # Check for unsatisfied recommendations (RRECOMMENDS) | ||
351 | python rootfs_log_check_recommends() { | ||
352 | log_path = d.expand("${T}/log.do_rootfs") | ||
353 | with open(log_path, 'r') as log: | ||
354 | for line in log: | ||
355 | if 'log_check' in line: | ||
356 | continue | ||
357 | |||
358 | if 'unsatisfied recommendation for' in line: | ||
359 | bb.warn('[log_check] %s: %s' % (d.getVar('PN'), line)) | ||
360 | } | ||
361 | |||
362 | # Perform any additional adjustments needed to make rootf binary reproducible | ||
363 | rootfs_reproducible () { | ||
364 | if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" != "" ]; then | ||
365 | # Convert UTC into %4Y%2m%2d%2H%2M%2S | ||
366 | sformatted=`date -u -d @${REPRODUCIBLE_TIMESTAMP_ROOTFS} +%4Y%2m%2d%2H%2M%2S` | ||
367 | echo $sformatted > ${IMAGE_ROOTFS}/etc/version | ||
368 | bbnote "rootfs_reproducible: set /etc/version to $sformatted" | ||
369 | |||
370 | if [ -d ${IMAGE_ROOTFS}${sysconfdir}/gconf ]; then | ||
371 | find ${IMAGE_ROOTFS}${sysconfdir}/gconf -name '%gconf.xml' -print0 | xargs -0r \ | ||
372 | sed -i -e 's@\bmtime="[0-9][0-9]*"@mtime="'${REPRODUCIBLE_TIMESTAMP_ROOTFS}'"@g' | ||
373 | fi | ||
374 | fi | ||
375 | } | ||