| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When run-postinsts is installed, a service is added for system which can run
while the package is still being installed. This calls "opkg configure" and if
package management is still running, it can deadlock and error.
To work around this, call fcntl-lock on the opkg lock file and if the lock
was held, it would wait to obtain it. This wait gives the package management
time to finish the install before the configure can then take the lock and run.
Note the dependency in SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS otherwise we'd see
sstate selftest failures.
Also ensure that if the configure fails, the scripts returns an error. This
applies to opkg and dpkg.
(From OE-Core rev: 96d37df074dc1fe1578c1406235dff7e328b62b7)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a package with a postsints script requires ldconfig, the package class adds
a ldconfig postinst fragment to initialize it before. Systemd has its own
ldconfig.service to initialize it and sometimes if both services are running
at the same time in the first boot, the first one will work, but the second
one will fail with the following error:
ldconfig[141]: /sbin/ldconfig: Renaming of /etc/ld.so.cache~ to /etc/ld.so.cache failed: No such file or directory
This commit adds a ordering dependency between them to make sure that only one
service is running at the same time.
(From OE-Core rev: 4e9d812e127dc6743f52f4881e509e8e2e833afe)
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Repo-wide replacement to use newer variable to represent systemd
system unitdir directory.
(From OE-Core rev: 5ace3ada5c54500c71becc8e0c6eddeb8bc053e3)
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When running on the systems having read-only rootfs backed by overlayfs,
removing the whole directory lead to create a special char device file
on the upperdir to reflect directory's removal. Once it is required to
upgrade the whole read-only image that might contain new postinsts scripts,
it will be impossible to run such scripts with a "deletion mark" file
on the overlayfs -- the whole directory will be marked as deleted regardless
new files in it.
(From OE-Core rev: 1a27b62b225ffeecec47c249a0b86cc54d775add)
Signed-off-by: Anton D. Kachalov <gmouse@google.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Added HOMEPAGE and DESCRIPTION for recipes with missing decriptions or homepage
[YOCTO #13471]
(From OE-Core rev: bb05814335e7101bfd8df0a11dc18a044e867bed)
Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
run-postinsts is only expected to run once, but during startup, but if
any dependency is pulled into a transaction, even once it has been
marked disabled, then it can be restarted.
This leads to occasional failures during QA if an ssh session starts
whilst the existing transaction is still running:
Finished Run pending postinsts.
run-postinsts.service: Succeeded.
Condition check resulted in Commit a transient machine-id on disk being skipped.
Condition check resulted in Bind mount volatile /srv being skipped.
Condition check resulted in Bind mount volatile /var/spool being skipped.
Condition check resulted in Bind mount volatile /var/lib being skipped.
Condition check resulted in Bind mount volatile /var/cache being skipped.
Condition check resulted in Platform Persistent Storage Archival being skipped.
Condition check resulted in Rebuild Hardware Database being skipped.
Starting Run pending postinsts...
Condition check resulted in Kernel Configuration File System being skipped.
Condition check resulted in FUSE Control File System being skipped.
Condition check resulted in Load Kernel Modules being skipped.
Condition check resulted in File System Check on Root Device being skipped.
Condition check resulted in Huge Pages File System being skipped.
Condition check resulted in Journal Audit Socket being skipped.
dropbear@125-192.168.7.2:22-192.168.7.1:44226.service: Succeeded.
Condition check resulted in Platform Persistent Storage Archival being skipped.
Started SSH Per-Connection Server (192.168.7.1:44226).
dropbear@124-192.168.7.2:22-192.168.7.1:44224.service: Succeeded.
Started SSH Per-Connection Server (192.168.7.1:44224).
Condition check resulted in Commit a transient machine-id on disk being skipped.
Condition check resulted in Bind mount volatile /srv being skipped.
Condition check resulted in Bind mount volatile /var/spool being skipped.
Condition check resulted in Bind mount volatile /var/lib being skipped.
Condition check resulted in Bind mount volatile /var/cache being skipped.
Condition check resulted in Platform Persistent Storage Archival being skipped.
Condition check resulted in Rebuild Hardware Database being skipped.
Failed to start Run pending postinsts.
run-postinsts.service: Failed with result 'start-limit-hit'.
run-postinsts.service: Start request repeated too quickly.
Setting RemainAfterExit ensures that the unit remains active and is not
gratuitously restarted, unless done so explicitly using systemctl
restart.
(From OE-Core rev: 9f5830375064af920c807b57b5b36691ad346199)
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
run-postinsts runs a given set of scripts during the first boot of the
device, when one of these scripts prints something to stdout (isnt
daemonized correctly), since stdout is not available at that time,
the script execution immediately returns with an error (exit_group()),
this error causes the script to terminate all threads within the process,
causing undesired behavior since the script might still had to execute
some other code.
Replace eval built-in with (), since () executes in a subshell,
even if one of the scripts exits, all threads of that process will only
be within that session, this ensures other scripts meant to be run are
still run afterwards.
[YOCTO #13266]
(From OE-Core rev: 706410c847ac9c89317d098de5d5c580736edbbb)
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Start opkg/dpkg as soon as the respective package managers status
file is present, no matter whether /etc/$pm-postinsts exists. This
decouples the implicit link between postinsts scripts in /etc and
the package manager: Currently the package manager is only started
if those scripts are present, although the package manager does not
use those scripts at all! Package managers install their own set of
postinst scripts.
The behavior when using rpm packages stays the same.
Note that using the package managers capability to execute postinst
scripts is preferred for good reasons: It makes sure that the
package managers database reflects that the packages have been
completely installed and configured.
This change allows to drop installation of the postinsts scripts
when package management is present. This will be done in a separate
change.
Note: Before commit 5aae19959a44 ("rootfs.py: Change logic to
unistall packages") rootfs.py did not install /etc/$pm-postinsts
when package management is installed! The change caused YOCTO #8235
which lead to the behavior change of run-postinsts in first place.
(From OE-Core rev: 1af421fcf05457223bf271f3951599b6c150cdff)
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit 5159ddcb62682e1b7e63a20a9218ea96e3fe10a2 string length test
performed against pi_dir has effectively never been able to succeed.
Change this to rather test if pi_dir is not an existing directory. By
doing we remove the chance of seeing the following console error message
during first boot to a pristine rootfs:
'ls: /etc/ipk-postinsts: No such file or directory'
(From OE-Core rev: b1600ec8991dfbd3b73d209b9c620a171c5b13c4)
Signed-off-by: Niko Mauno <niko.mauno@iki.fi>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In case a systemd service disables itself while init is still in its
boot sequence the reloading of the service files can be problematic.
In that case: It seems that systemd looses the state of .device units,
and some services depend on such units (namely serial consoles such as
serial-getty@ttymxc0.service). As a result no getty is spawned on the
affected serial tty.
After a power-cycle the second boot (which does not disable services)
succeeds.
The following sequence shows this problem:
| Jan 09 16:36:28 apalis-t30 systemctl[162]: Removed /etc/systemd/system/sysinit.target.wants/run-postinsts.service.
| Jan 09 16:36:28 apalis-t30 systemd[1]: Reloading.
| ...
| And then the failing one:
| Feb 22 15:33:15 apalis-t30 systemd[1]: dev-ttyS0.device: Job dev-ttyS0.device/start timed out.
| Feb 22 15:33:15 apalis-t30 systemd[1]: Timed out waiting for device dev-ttyS0.device.
| Feb 22 15:33:15 apalis-t30 systemd[1]: Dependency failed for Serial Getty on ttyS0.
| Feb 22 15:33:15 apalis-t30 systemd[1]: serial-getty@ttyS0.service: Job serial-getty@ttyS0.service/start failed with result 'dependency'.
| Feb 22 15:33:15 apalis-t30 systemd[1]: dev-ttyS0.device: Job dev-ttyS0.device/start failed with result 'timeout'.
| Feb 22 15:33:15 apalis-t30 systemd[1]: Reached target Login Prompts.
(the time has been updated between this two events, but that does not
influence the issue)
Using --no-reload in the service file avoids the "Reloading." message
above and seems to not cause such issues anymore.
Reported-by: Stefan Agner <stefan.agner@toradex.com>
(From OE-Core rev: 23b359b6e26d0b17037bf955bd15a16a3fd9ab8f)
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
(cherry picked from commit 4a425d05bac5dcba023b67aa3d726f7e7869404f)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Opkg can defer running postinst scripts to first boot, which can take
a while on some systems. The output of `opkg configure` (or whatever pm
is used) is redirected to a file when logging is enabled
(I.e. $POSTINST_LOGGING == 1), making the machine appear hung during
this process. This change simply prints a wait message on the console
to inform the user of this potentially long and silent operation so
that they do not mistakenly reboot their machine.
Why not simply `tee` the output instead?
Tee might be provided by BusyBox in some distros, which may need to run
update-alternatives in the very postinst scripts being executed by this
process. It's therefore not safe to assume Tee (or any other packaged
util) is available until the configure process finishes.
(From OE-Core rev: 3f8f1d8e4b129e5dfdd63d450887320aa0e33228)
Signed-off-by: Haris Okanovic <haris.okanovic@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently run-postinsts script has code to run postinst scripts
via opkg/dpkg configure but that code is never used. The advantage
of using package managers instead of just executing the scripts is
to keep the package manager DB updated.
Fix the script so that the package managers are used when appropriate.
Also use $localstatedir for the opkg runtime file location.
Fixes [YOCTO #10478].
(From OE-Core rev: b645919f173512f9e75aeb26348d60b63dcdc53c)
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several recipes reference the LICENSE file in their LIC_FILES_CHKSUM
variable as ${COREBASE}/LICENSE. This forces distribution providers to
keep this file verbatim or to overload the affected recipes. The section
"Moving to the Yocto Project 1.6 Release" in the Yocto manual suggests
removing the LICENSE file where possible.
Remove LICENSE in cases where COPYING.MIT is also given and replace
LICENSE with COPYING.MIT if the former was the only entry. All modified
recipes specify LICENSE = "MIT" and none of the in-tree files specify a
different license either.
As the packages do not change (the license files are not contained in
them), do not increase PR.
(From OE-Core rev: 0059e0661826c857a07c862bcb46162671e0e330)
Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
| |
(From OE-Core rev: 45048442913687f2817ef9a52352fe3214f5f023)
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes required:
- Rename opkg-cl to opkg
- Add libarchive dependency
- Drop backport patches
- Drop obsolete directory options
- Add patch to handle empty index files
Based on initial work by Paul Barker.
(From OE-Core rev: 1dd2a9ea54f5a5497e23814f144f35ff15430d71)
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
CC: Paul Barker <paul@paulbarker.me.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
| |
(From OE-Core rev: 48d735a8938ec7c49754a57019182ebcd9a2d8b6)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
run-postinsts always mark ipk package management as true, causing
problems when try to execute opkg-cl and isn't present.
(From OE-Core rev: 84dcc8dded5761e24e09dbcc822445ce3dd69497)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After removal of auto-creating S we must ensure that all recipes are
using a proper value for S.
Fix all recipes that only need to set S equals to WORKDIR.
[YOCTO #5627]
(From OE-Core rev: 9d220b1bfe4589736604dd5a7129e3699377d830)
Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
The basic.target itself requires sysinit.target, so there's no
need to write this redundant line in the run-postinsts unit file.
(From OE-Core rev: 28835fcd78fd35db6d3bd7ee2be16904ddf11991)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old implementation was wrong. It was not very generic and it checked
IMAGE_FEATURES while building the recipe, which led to various issues
with the generation of the final script. That is, the run-postinsts
script was generated once, while building the package for the first
time. Hence, any other changes to IMAGE_FEATURES, like removing/adding
'package-management' did not reflect in the final script.
This commit makes run-postinsts script autodetect the backend used for
creating the image, making it generic.
[YOCTO #5666]
[YOCTO #5972]
(From OE-Core rev: 44902f7550e490a9d4d2e2bcdf8c577329b4af75)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, opkg/dpkg have their own postinstalls that create a
run-postinsts script which is run at first boot.
This commit prepares the run-postinsts recipe/script to be used by
opkg/dpkg when DISTRO_FEATURES includes package-management.
[YOCTO #5666]
(From OE-Core rev: f33555f52a4ee83f0bd205cdf483045fcd0578b2)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch mainly adds a systmd service file for run-postinsts,
which is started at first boot to run the post-install scripts.
Apart from this, this patch also modifies the installation location
of run-postinsts to ${sbindir}. This is because this script would be
used by both sysvinit and systemd based images. So it's more reasonable
to make it locate under ${sbindir}.
[YOCTO #5719]
(From OE-Core rev: 5933fbef26ffbc8140248ffb28957f36a813054b)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we enable ipk/deb package back-end, and we have 'package-management'
in our IMAGE_FEATURES, then the /etc/rcS.d/S99run-postinsts would
still exist in our system after a clean start-up.
The initial design for run-postinsts requires the related init script
to be removed if there's no more post-install script left in the system.
This patch fixes this problem.
[YOCTO #5718]
(From OE-Core rev: 08a2f48cb95256c6d44c8574949fabafe1466969)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
| |
(From OE-Core rev: bbd88aebcabbb19c27a7d752d4a5b8ad9ff9412e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A lot of our recipes had short one-line DESCRIPTION values and no
SUMMARY value set. In this case it's much better to just set SUMMARY
since DESCRIPTION is defaulted from SUMMARY anyway and then the SUMMARY
is at least useful. I also took the opportunity to fix up a lot of the
new SUMMARY values, making them concisely explain the function of the
recipe / package where possible.
(From OE-Core rev: b8feee3cf21f70ba4ec3b822d2f596d4fc02a292)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently, when opkg/dpkg and run-postinsts are installed in the same
time, opkg/dpkg postinstall overwrites the run-postinsts link in rcS.d.
This will make run-postinsts script useless and the delayed postinstalls
will not be run.
This issue happens only when 'package-management' is disabled and, in
the same time, dpkg/opkg ends up in the image: either pulled by some
dependency or manually installed.
With this patch, both opkg/dpkg and run-postinsts scripts will run but
the former will silently fail because the package metadata is removed from
the image since 'pacakge-management' is disabled.
[YOCTO #4484]
(From OE-Core rev: 882da38f226acc40c041155218549edad461b7d7)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When all postinsts scripts succeed at system startup, it's very possible
that the log file /var/log/postinstall.log is empty. This is kind of
confusing, as that file is supposed to hold information about the postinsts.
Add more logging to the log file to make things clearer.
(From OE-Core rev: d60926b3fc4ba5780aef5b5226d05170892a7133)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
| |
The run-postinsts script also handles the #SYSCONFDIR#/rpm-postinsts
directory. Add it to the comment for clarity.
(From OE-Core rev: ca32f9c3f7749aa31d1ea83eda1ca39a2678215b)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
Fix a typo for stderr redirection.
(From OE-Core rev: b03c670d44b28c673393468bbe62919f3f8186de)
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This recipe is used only when the package manager is not deployed on
target and there still are delayed postinstalls that need to be run on
target. At the moment, run-postinsts is targeted to dpkg/opkg. RPM uses another
recipe, called rpm-postinsts which, in turn, is used even when the rpm
package is deployed.
This patch intends to make run-postinsts generic and deprecate
rpm-postinsts. Here's why:
* when opkg/dpkg are not deplyed, the meta-data files are useless.
Hence, the awk script is not needed. The postinstall files are already
saved in /etc/(deb|ipk)-postinsts directory and we can use the same
procedure as in rpm's case;
Also, the recipe is moved out from meta/recipes-devel/dpkg to
meta/recipes-devel/run-postinsts.
(From OE-Core rev: 0222e6740ee4670bbf42d246ab3ecad415ffcdee)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|