Commit Graph

149 Commits

Author SHA1 Message Date
Changqing Li
7c70ac58da initscripts: add function log_success_msg/log_failure_msg/log_warning_msg
* add function log_success_msg/log_failure_msg/log_warning_msg, some
packages still use these functions, like mariadb, refer [1], without
these function, with sysV init manager, mariadb will report error:

root@qemux86-64:~# /etc/init.d/mysqld status
/etc/init.d/mysqld: line 383: log_success_msg: command not found

* remove RCONFLICTS with lsbinitscripts, LSB support already remove in
  [2]

[1] https://github.com/MariaDB/server/blob/main/support-files/mysql.server.sh#L104
[2] https://git.openembedded.org/openembedded-core/commit/?id=fb064356af615d67d85b65942103bf943d84d290
[3] https://refspecs.linuxbase.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html

(From OE-Core rev: b57824d0ec593898abd9eb957c2ff1317bb74440)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-04-08 15:49:17 +01:00
Richard Purdie
a290c63449 init-system-helpers: upgrade 1.67 -> 1.68
(From OE-Core rev: e901a0f154fe6149b9cfb9b0e7b9289f31f441b9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-03 10:51:27 +00:00
Wang Mingyu
e7abf0c665 init-system-helpers: upgrade 1.66 -> 1.67
(From OE-Core rev: 39453acfb61ed698d03a2472ff1dcc7df5a4bfeb)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-09-30 17:00:50 +01:00
Changqing Li
2f46b6f27d bitbake.conf: drop VOLATILE_TMP_DIR, use FILESYSTEM_PERMS_TABLES instead
* Drop VOLATILE_TMP_DIR, use FILESYSTEM_PERMS_TABLES instead. By default,
FILESYSTEM_PERMS_TABLES ?=  "files/fs-perms.txt \
                             files/fs-perms-volatile-log.txt \
                             files/fs-perms-volatile-tmp.txt"
it contains 'files/fs-perms-volatile-tmp.txt', which means volatile tmp
is enabled. User can disable volatile tmp by remove
'files/fs-perms-volatile-tmp.txt' from FILESYSTEM_PERMS_TABLES.
* If volatile tmp is disabled, both /tmp and /var/tmp are persistent

(From OE-Core rev: 8d1ae67b89c45f78162e070228086c7ef88c3264)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-28 09:14:26 +01:00
Changqing Li
2f8806deb7 bitbake.conf: drop VOLATILE_LOG_DIR, use FILESYSTEM_PERMS_TABLES instead
Drop VOLATILE_LOG_DIR, use FILESYSTEM_PERMS_TABLES instead. By default,
it contains 'files/fs-perms-volatile-log.txt', which means volatile log
is enabled. User can disable volatile log by remove
'files/fs-perms-volatile-log.txt' from FILESYSTEM_PERMS_TABLES.

(From OE-Core rev: 91128c6517066715f2afe6b46aa3206c7cf3653e)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-08-28 09:14:26 +01:00
Richard Purdie
d6ae8d2004 recipes: Switch away from S = WORKDIR
Where recipes use S = ${WORKDIR}, change them to set UNPACKDIR to
a subdir of WORKDIR and make S point at this instead.

I've chosen not to force S into any standard UNPACKDIR we may pick in
future just so the S = UNPACKDIR case is clearly visible by the
directory naming under WORKDIR as that should aid usability.

(From OE-Core rev: d9328e3b0b062f0621de3d114584b44f384a1c02)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-21 12:08:04 +01:00
Richard Purdie
3288587aeb recipes: Update S = WORKDIR recipes to use ${S} correctly
Where recipes use S = ${WORKDIR}, ensure they are referencing ${S} correctly
to access files as soon we want to stop doing this in WORKDIR at which point
they would break unless corrected.

(From OE-Core rev: f25dd633fffe6560f191526d1869e657e129bad9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-02 15:15:51 +01:00
Colin McAllister
3bb286730b initscripts: Add custom mount args for /var/lib
Adds bitbake variable to set additional mount flags for the /var/lib
overlayfs or bind mount when using a read-only root filesystem. This
can be used to set additional options like "-o nodev".

(From OE-Core rev: c3109e40e2c2c881996dd3fcc95fca74f098646d)

Signed-off-by: Colin McAllister <colin.mcallister@garmin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-02 10:38:28 +00:00
Wang Mingyu
61638b4d85 init-system-helpers: upgrade 1.65.2 -> 1.66
Changelog:
==========
* d/init.lintian-overrides: Silence warning about "Important" field
  'Important: yes' instructs APT to warn the user before removing this
  package.
* script/update-rc.d: DPKG_ROOT support for sysvinit
* Add "Protected: yes" to package "init" The "Protected" field does the
  same as "Important" already did in apt, but is also understood by dpkg
  (since dpkg 1.20.1).
* Bump Standards-Version to 4.6.2, no changes
* Override Lintian warning for Protected: yes
* deb-systemd-invoke: support reload/reexec. This is useful for the
  --user case, to provide a shortcut that loops over all active user
  sessions over D-Bus.
* deb-systemd-invoke: support --no-dbus for reload/reexec. Provide
  common implementation for SIGHUP/SIGRTMIN+25 to reload/reexec the
  system or user instances.

(From OE-Core rev: 1d3af466f58dc1e5299c55f7ad6179128da3a553)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-02 17:18:57 +00:00
Richard Purdie
1b94ea8b25 recipes: Drop remaining PR values from recipes
We've been removing PR values from recipes at upgrade time for a while. In general
anyone maintaining a binary distro would end up having to curate these themselves
so the values in OE-Core aren't really that useful anymore. In many ways it makes
sense to clear out the remaining ones (which are mostly for 'config' recipes that
are unlikely to increase in PV) and leave a clean slate for anyone implementing
a binary distro config.

References are left in meta-selftest since the tests there do involve them and
their removal upon upgrade.

(From OE-Core rev: d4c346e8ab8f3cae25d1b01c7331ed9f6d4f96ef)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-22 07:45:17 +01:00
Trevor Woerner
d5d40479d7 VOLATILE_TMP_DIR: add
Provide a mechanism to allow users to choose whether the /tmp directory
is on persistent storage (non-volatile) or a RAM-based tmpfs (volatile).
The default is volatile.

Works for both sysvinit-based and systemd-based systems.

(From OE-Core rev: 8b76c0637eaeaf5bd5e696680cd74b7a642f4157)

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-28 07:53:54 +00:00
wangmy
bbdc561884 init-system-helpers: upgrade 1.64 -> 1.65.2
(From OE-Core rev: d8bfff1b18ea7c406d6e251f9ef1090a2c8802fb)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-10-26 12:28:38 +01:00
Alexander Kanavin
603e1af68f init-system-helpers: exclude experimental tags from version check
(From OE-Core rev: d70776fcbb0c426096061d1d8e8d47fd2ac73107)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-17 07:47:07 +01:00
Shruthi Ravichandran
25248acfdf initscripts: run umountnfs as a KILL script
`rc` runs all the KILL scripts in a runlevel before the START scripts.
The umountnfs script is currently configured as a START script, and
runs after the networking KILL script. During shutdown, this causes a
~3 minute timeout after networking is shutdown when the system tries
to connect to and unmount any mounted network shares.
Fix this by changing the script configuration to "stop" so that it can
run before networking is stopped and unmount any network shares
safely.

(From OE-Core rev: c419bd4537756e9f6c2fe6da3a9b798526e27eca)

Signed-off-by: Shruthi Ravichandran <shruthi.ravichandran@ni.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-23 13:55:26 +01:00
wangmy
368720f90d init-system-helpers: upgrade 1.63 -> 1.64
License-Update: year updated to 2022

Changelog:
=========
  * Team upload.
  * d-s-h: break infinite recursion on symlinks. (Closes: #1014119)
  * Bump Standards-Version to 4.6.1, no changes
  * Update date ranges in d/copyright

(From OE-Core rev: 267521e66560f214d3b037a7c268c26699d84988)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-12 23:56:10 +01:00
wangmy
f67210f9ed init-system-helpers: upgrade 1.62 -> 1.63
Changelog:
==========
  * Remove constraints unnecessary since buster
    * init-system-helpers: Drop versioned constraint on perl-base in Depends.
    * init: Drop versioned constraint on init-system-helpers in Depends.

  * t/helpers.pm: use installed version of deb-systemd-helper if
    TEST_INSTALLED is set
  * add DPKG_ROOT support (Closes: #983421)

  * Add additional error checking on write operations.
    The 'close()' call can fail on both read and write - while the read is
    usually relatively benign, for the write counter part can include "fun"
    errors. Most of these would most likely be persistent issues, but it makes
    sense to detect errors as early possible.

  * service: use 'grep -F' instead of 'egrep'
    'egrep' and 'fgrep' have been deprecated in GNU grep since 2007, and in
    current post 3.7 Git they have been made to emit obsolescence warnings.
    The occurrence in 'service' uses a non-regex argument, so switch to 'grep
    -F' instead of '-E'.

(From OE-Core rev: abf37e040faf510e6e087d97bf76cf07aef05e18)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-05-27 23:50:47 +01:00
Richard Purdie
d677826f85 initscripts: Clean up license handling/identifiers
The license is clear, add an SPDX license identification headers to the scripts
and drop the weird patch, we don't need it.

(From OE-Core rev: 540041ac80cfc91df61b45d48f9c9ebbc9b2e71e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-01 23:11:37 +01:00
wangmy
60214a618e init-system-helpers: upgrade 1.60 -> 1.62
Changelog:
=========
* use fakechroot instead of unsharing the mount namespace and mounting tmpfs
* deb-systemd-invoke: systemctl --machine @<UID> is now available in
  v249.10. Adjust the version check accordingly
* Skip build-time tests if DEB_BUILD_OPTIONS=nocheck is set
* Fix typos found by Lintian
* Set Rules-Requires-Root: no

(From OE-Core rev: 5ee6558c4364d49a0e003648ac49f58f1fb41765)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-25 12:41:24 +00:00
Richard Purdie
b0130fcf91 meta/meta-selftest/meta-skeleton: Update LICENSE variable to use SPDX license identifiers
An automated conversion using scripts/contrib/convert-spdx-licenses.py to
convert to use the standard SPDX license identifiers. Two recipes in meta-selftest
were not converted as they're that way specifically for testing. A change in
linux-firmware was also skipped and may need a more manual tweak.

(From OE-Core rev: ceda3238cdbf1beb216ae9ddb242470d5dfc25e0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-20 16:45:25 +00:00
Richard Purdie
ddcf16d1f7 meta: Add explict branch to git SRC_URIs
There is uncertainty about the default branch name in git going forward.
To try and cover the different possible outcomes, add branch names to all
git:// and gitsm:// SRC_URI entries.

This update was made with the script added to contrib in this patch which
aims to help others convert other layers.

(From OE-Core rev: b51c405faf6f8c0365f7533bfaf470d79152a463)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-30 18:56:47 +01:00
Richard Purdie
bb6ddc3691 Convert to new override syntax
This is the result of automated script conversion:

scripts/contrib/convert-overrides.py <oe-core directory>

converting the metadata to use ":" as the override character instead of "_".

(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00
Matthias Schiffer
7edb25bc99 initscripts: fix creation order for /var/log with VOLATILE_LOG_DIR=true
Create the /var/log symlink directly after /var/volatile/log, so
/var/log is available for the creation of /var/log/wtmp a few lines
later.

(From OE-Core rev: 64b659b9e40da3280ba8911b4044b19aa7366262)

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-24 16:33:46 +01:00
Matthias Schiffer
2b45c7253f initscripts: populate-volatile.sh: run create_file synchronously
The behavior of running create_file in the background was introduced in
d44816bedade ("initscripts: Populate volatile from existing file")
without further explanation. Besides its questionable benefit, this
causes actual issues:

- Not all create_file processes may have finished by the time the
  initscript exits (or when it moves /etc/volatile.cache.build !)
- By making the order of commands nondeterminstic, it could hide
  dependency issues where it was attempted to create files before their
  containing directories

(From OE-Core rev: 1a4ddb0d3f1289e0b67b6eba9be58374d3d7a80b)

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-24 16:33:46 +01:00
Matthias Schiffer
9448e5f17d initscripts: populate-volatile.sh: do not log to tty0
tty0 may not be the intended console for log messages, or it may not
exist at all in kernel configurations without CONFIG_VT. Just use the
default stdout/stderr instead.

(From OE-Core rev: 669e74d358db59768862515fe584aa1edf6cec04)

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-24 16:33:46 +01:00
Alexander Kanavin
8ef66328c1 init-system-helpers: upgrade 1.58 -> 1.60
(From OE-Core rev: 3ae7b7f72d4b55d66e6f8f8a9bc71e14fb826c47)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-30 14:01:06 +00:00
Khem Raj
8736019681 initscripts: Use initctl on sysvinit only
Check if init system is sysvinit to recreate initctl, this ensures that
it can be used with busybox init system as well

(From OE-Core rev: 15c467d0206ee30fe708f76b7d5e0033ab687475)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Sinan Kaya <okaya@kernel.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20 00:03:05 +00:00
Khem Raj
a8af9db08c initscripts: use quotes for shell variable comparision
Helps to execute it with busybox shell

(From OE-Core rev: 45ba0ca0352bca46f974d28781ac935d8e9ec3ea)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-20 00:03:05 +00:00
Diego Sueiro
e8d24de4a1 initscripts: Change execution order between checkroot and modutils
When '/' is first mounted as read-only, we want to have the checkroot.sh
initscript (which then remounts '/' as rw if allowed) running before the
modutils.sh.
This is because modutils.sh initscript might need to run depmod depending on
the status of the modules.dep file to update it and the '/' needs to be
writable.

(From OE-Core rev: 39f16d7dc42dcfe4a3fcceb8e476ac3c1e0ba3a2)

Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-06 23:17:28 +00:00
Andrei Gherzan
48ba352755 initscripts: Fix populate-volatile.sh bug when file/dir exists
The blocks which test for entry exitence (file or directory) use a
`A && B || C` syntax. This form is not behaving as a if-then-else block
even the code logic assumes that. C may run when A is true which breaks
the case where VERBOSE is 'no' but the file/directory exists.

Along with fixing these specific issues, this patch fixes the other
instances where blocks of form `A && B || C` are used as if-then-else.

(From OE-Core rev: 1b9ea22acb66554925720e04cf24100664234574)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-27 10:37:58 +01:00
Andrei Gherzan
383b86e921 initscripts: Fix various shellcheck warnings in populate-volatile.sh
(From OE-Core rev: 0a128a238f63d52aa82f8c63ee2f84ab528b3346)

Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-27 10:37:58 +01:00
Richard Purdie
e1a1f58152 init-system-helpers: upgrade 1.57 -> 1.58
(From OE-Core rev: fd0cae10e4b769d80b036ed2325965bdd30d7e09)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-18 11:06:32 +01:00
Changqing Li
617a658804 initscripts: update postinst
in container image, it don't have init system,
install package initscripts will report error:
systemctl: command not found

fix by use same way as systemd.bbclass to decide if systemctl
mask will run

(From OE-Core rev: 790276bde066ecc9876120c3097dcd57a9936f00)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-30 23:03:02 +01:00
Alexander Kanavin
a5581080ef init-system-helpers: use https for fetching
git:// protocol seems to be down.

(From OE-Core rev: 97da539d49de979c9a303a5ecda09515d188673e)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-09 13:14:00 +01:00
Jens Rehsack
ccbeea1c0b init-system-helpers: avoid superfluous update-rc.d
Debians init-system-helpers bundle an own, perl written update-rc.d which
doesn't fulfill embedded/cross-build requirements as our own in
    meta/recipes-core/update-rc.d
does. To avoid unnecessary conflicts or questions, do not bundle it by
default. Whoever wants it is invited to have an .bbappend.

(From OE-Core rev: 4e5a55c7ecf7100bb87dcad31723ee27b7006ac2)

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-04 13:27:32 +01:00
Jens Rehsack
850abc548b initscripts/init-system-helpers: fix mountnfs.sh dependency
With commit c9fc9110be
    Author: Yue Tao <Yue.Tao@windriver.com>
    Date:   Fri May 25 10:48:08 2018 +0800

	initscripts: Avoid starting rpcbind daemon twice

	Check the status before start it to avoid duplicates.

the use of a script {/usr/sbin/}service is introduced - maybe earlier
provided by systemd, nowadays mostly by init-system-helpers from
debian project.

For the very first shot, maybe discussions and improvements based
on that script collection, use just the init-system-helpers-service
in initscripts/mountnfs.sh to avoid problems mounting NFS in later
boot stage.

(From OE-Core rev: db690c3bf4664ce71fc21650fbcd8b6ac2eb71f1)

Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-04 13:27:32 +01:00
Haris Okanovic
b30c1f5e46 initscripts/sysfs.sh: Mount /sys/firmware/efi/efivars when possible
Without this change, efibootmgr is unable to recover BootOrder if lost
during a previous write operation, e.g. exceeded storage capacity. This
is problematic using EFI to manage boot flow from Linux (E.g. via RAUC).

https://www.kernel.org/doc/Documentation/filesystems/efivarfs.txt

(From OE-Core rev: 0fb92b500b7d6b84368ca3a85e675400c6473987)

Signed-off-by: Haris Okanovic <haris.okanovic@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-10 14:06:10 +00:00
Andre McCurdy
3db7ba108e initscripts: enable alignment.sh init script for big endian ARM
(From OE-Core rev: 2e00755bf231f1de5ab96ee5de0859cb0930d544)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-18 12:09:02 +01:00
Martin Hundebøll
4cac7b1553 initscripts: remove warnings on read-only-rootfs (again)
When the populate-volatile.sh initscript tests if a configured symlink
is already in place, it uses readlink with the '-f' (follow) option:

> [ "$(readlink -f $source)" = "$dest" ]

If the test fails, it proceeds to delete the exisiting folder/file, and
create the configured symlink.

However, the '-f' option to readlink makes it follow symlinks pointing
at symlinks. If the $dest argument is a symlink, the above test fails,
and warnings are printed due to changing a read-only rootfs.

This is the case for /tmp, and /etc/resolv.conf:
> /tmp -> /var/tmp -> /var/volatile/tmp
> /etc/resolv.conf -> /var/run/resolv.conf -> /run/resolv.conf

Fix the warnings by removing the '-f' option, so that the test matches
the configuration.

[ YOCTO #10814 ]

(From OE-Core rev: fb028a0a25c02ab56ad262afd8e6e9495a44673d)

Signed-off-by: Martin Hundebøll <martin@geanix.com>
Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-28 11:31:21 +01:00
Jeroen Hofstee via Openembedded-core
ad80524404 initscripts: Add support for /etc/default/timestamp
Source /etc/default/timestamp if present. This allows the rootfs to be
read-only / store the file in a persistant location if the whole rootfs
is updated.

(From OE-Core rev: b4de37b7176630d9585b12c50d537cd561c7aeb9)

Signed-off-by: Jeroen Hofstee <jhofstee@victronenergy.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-04 22:57:05 +00:00
Joshua Watt
96e05ff4ce initscripts: Update volatiles documentation to include binds
Volatiles processing now handles bind mounts, so update the comment in
the core file to indicate this.

(From OE-Core rev: 520e8f5721aab90815186533038c2f9f834546d5)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-19 16:14:57 +00:00
Kosta Zertsekel
92027161b5 meta: Use double colon for chown OWNER:GROUP
Rationale - excerp from `info chown`
====================================

OWNER‘:’GROUP
     If the OWNER is followed by a colon and a GROUP (a group name or
     numeric group ID), with no spaces between them, the group ownership
     of the files is changed as well (to GROUP).

   Some older scripts may still use ‘.’ in place of the ‘:’ separator.
POSIX 1003.1-2001 (*note Standards conformance::) does not require
support for that, but for backward compatibility GNU ‘chown’ supports
‘.’ so long as no ambiguity results.  New scripts should avoid the use
of ‘.’ because it is not portable, and because it has undesirable
results if the entire OWNER‘.’GROUP happens to identify a user whose
name contains ‘.’.

(From OE-Core rev: 185918234a07cb506d7d7464a49ac33972c7d963)

Signed-off-by: Kosta Zertsekel <zertsekel@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-07 23:08:55 +00:00
Joshua Watt
2844a495c6 initscripts: populate-volatiles: Speed up processing
Checking the requirements for each volatiles file in the
populate-volatiles script can be very slow when there are a large number
of volatiles files, easily consuming over 80% of the processing time.
These checks don't usually uncover any problems so concatenate all the
volatiles files together and process them as one large file for a "fast
path" option. This ensures that the penalty for checking the
requirements is only incurred once. In the event that checking the
requirements for the unified file fails, fall back to the slow process
of checking each one individually so that the offending one can be
skipped.

The core file is handled separately because it is responsible for
creating the temp directory used by check_requirements and thus must
always run first and without having its requirements checked.

[YOCTO #12949]

(From OE-Core rev: f380fac8a43a75861f3157777b12a317b985a5e1)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-14 09:20:56 +01:00
Joshua Watt
2848e37111 initscripts: read-only-rootfs-hook: Use overlay if available
Copying files from the read-only /var/lib to tmpfs can be slow and waste
memory. If the kernel supports the overlay file system, use it to mount
a writable tmpfs on top of the read-only /var/lib and avoid the file
copy.

(From OE-Core rev: 370fda1b2e8d5dc011522131bba4106de26bfb19)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-12 16:57:21 +01:00
Yue Tao
c9fc9110be initscripts: Avoid starting rpcbind daemon twice
Check the status before start it to avoid duplicates.

(From OE-Core rev: ca3ef7d1ef9b1f0dc4d3170b1ad20d5f725872a1)

Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-29 21:07:17 +01:00
Markus Lehtonen
68f020f368 initscripts: rrecommend initscripts-functions
In order to make that the default provider for initd-functions.

[YOCTO #10944]

(From OE-Core rev: d32eaebed5726c6157a2ac993baeb6d16683ade7)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-02 11:25:33 +00:00
Markus Lehtonen
6ceac4eabf initscripts: don't use update-alternatives
Stop using update-alternatives for managing /etc/init.d/functions. Also,
make the initscripts-functions subpackage to (runtime) conflict with
lsbinitscripts.

[YOCTO #10944]

(From OE-Core rev: cdcebd81c872cb7386c658998e27cf24e1d0447c)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-02 11:25:33 +00:00
Huang Qiyu
a9f6f48e7a initscripts: Add HOMEPAGE info into recipe file.
(From OE-Core rev: 19f4e69c81653a4fa197fba2c46e48fcd554a12e)

Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-21 09:05:49 +01:00
Jackie Huang
b0ebd9cbaf initscripts: split sushell into sub package
* sushell is required by systemd service debug-shell
  when selinux is enabled, but it doesn't make sense
  to make systemd depend on initscripts, so split sushell
  into sub package initscripts-sushell.

* The bash dependency has been removed by:
  '''
  4917e36a77bd6821b45db52caa43939d344d92f6
  initscripts: Fix regression for requiring /bin/bash
  '''
  so remove bash from RDEPENDS when selinux is enabled.

(From OE-Core rev: 9c84ca86f396886ae68774032724b53664ecf0ed)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-23 12:06:52 +01:00
Chen Qi
8c69b6ab85 initscripts: support persistent /var/log
Respect VOLATILE_VAR_LOG variable so that if it's set to any valid boolean
false value, we could have persistent /var/log on the final image.

[YOCTO #6132]

(From OE-Core rev: 50914c4a84e0fb6b9bf6bb1864a2d653218753ce)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-18 10:40:26 +01:00
David Vincent
225b809456 initscripts: start bootmisc.sh at 36 instead of 55
bootmisc.sh is responsible for setting the system date to a sane
default. Currently, it is the last script to be run from the rcS
runlevel.

Problem is that the files created before appear to have been created
on 1/1/1970. Most notably, /var/log/dmesg created in dmesg.sh cannot be
properly rotated with logrotate which does not consider it a valid date
and stops processing.

There is no blocker on moving this script right before populating
volatiles because it just requires the local and virtual filesystems to
be mounted to work.

(From OE-Core rev: a0f6508847a28a78cb0a1e9613b6e5cc3047d995)

Signed-off-by: David Vincent <freesilicon@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21 22:51:37 +01:00