Age | Commit message (Collapse) | Author | Files |
|
The refactor of shell function rootfs_uninstall_unneeded is incorrect,
it should check and update the installed_pkgs.txt file for the existance
of the packages that were removed.
...
rootfs_uninstall_unneeded () {
if ${@base_contains("IMAGE_FEATURES", "package-management", "false", "true", d)}; then
if [ -z "$(delayed_postinsts)" ]; then
# All packages were successfully configured.
# update-rc.d, base-passwd, run-postinsts are no further
# use, remove them now
remove_run_postinsts=false
if [ -e ${IMAGE_ROOTFS}${sysconfdir}/init.d/run-postinsts ]; then
remove_run_postinsts=true
fi
# Remove package only if it's installed
pkgs_to_remove="update-rc.d base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
for pkg in $pkgs_to_remove; do
# regexp for pkg, to be used in grep and sed
pkg_regexp="^`echo $pkg | sed 's/\./\\\./'` "
if grep -q "$pkg_regexp" ${WORKDIR}/installed_pkgs.txt; then
rootfs_uninstall_packages $pkg
sed -i "/$pkg_regexp/d" ${WORKDIR}/installed_pkgs.txt
fi
done
...
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
Move the bb.utils.remove(self.image_rootfs, True) from the base class
constructor, to Opkg/Ipkg constructors after super's constructor is
called.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
- Implementation RpmRootfs class
- Refactor list_installed_packages in python
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
- Implementation RpmPM class
- Support rpm incremental image generation
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
Implementation RpmManifest class.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
The old code no more needed since the job is done in python now.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
Since rootfs_install_complementary() is now implemented in python for
each backend, remove it from POPULATE_SDK_POST_TARGET_COMMAND. Call it
directly in python.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
Lose the old shell populate_sdk_image() function and use the new python
implementation.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
This new file contains the python 'populate sdk' implementation of the
old bash populate_sdk_image() function for Opkg and Dpkg.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
This commit contains the following fixes:
* pass the apt config directory to the DpkgPM constructor, so one can
instantiate this class multiple times and give it different config
files (like for creating SDK);
* change constructor argument name from 'dpkg_archs' to 'base_archs';
* export APT_CONFIG environment variable before calling apt-get, not in
constructor. If done in constructor, the last class instantiation,
sets the environment, which is note desireable;
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
Since the Manifest class has this property, use it. This contains the
default package installation order.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
This commit contains several changes:
* it is possible to create manifests for following types of images:
regular image, target SDK and host SDK. To distinguish between these
types of manifests, one has to pass the manifest_type argument to the
contructor or create_manifest() wrapper. The manifest type can have
the following values: image, sdk_host, sdk_target;
* move image_rootfs variable to _create_dummy_initial() since it's used
only here. This function will probably be removed in the future;
* fix a bug in the Dpkg class;
* add INSTALL_ORDER property to Manifest class which contains the
default install order for the packages and will be used Rootfs/Sdk
classes;
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
Remove the directory, manually, in the Rootfs.create() function.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
This commit cleans up the functions that were ported to python.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
Additionaly, the commit contains a couple of minor changes
(comments, error printing, etc).
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
This commit will revert on using the bitbake APT_ARGS variable, so users
can alter the way apt is called without needing to change it in code.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
This is needed in order to serialize the index file creation when
multiple do_rootfs tasks are running in the same time.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
Manifest class clients don't really need to know how package types are
encoded.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
If the packages are created from cache, we need to remove the stamp so
that we re-generate the index files at do_rootfs time.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
In this commit:
* add ability to create initial manifest for opkg;
* make var_map available to all backends;
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
This commit will:
* remove old bash code common to all backends;
* create a new do_rootfs() python function that will use the new
rootfs/image creation routines;
* allow creation of dpkg based images;
* fail for rpm/opkg (not implemented yet);
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
This library will be used to generate the rootfs.
Recommended usage:
create_rootfs(d, manifest_file)
this will determine the PM backend used, save the shell environment and
will call the appropriate backend implementation (DpkgRootfs(d,
manifest_file).create()).
NOTE: this commit adds Dpkg support.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
This new library is intended to be used by the new python rootfs
creation code.
It implements the rpm/dpkg/opkg package management backends: RpmPM,
DpkgPM and OpkgPM.
The base API is this:
update()
install()
install_complementary()
remove()
write_index()
remove_packaging_data()
list_installed()
All implementations have to provide these functions. Some backends may
need to implement additional functions though.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
This new library allows for the creation of 2 types of manifests:
* initial manifest - used by the new rootfs creation routines to
generate the rootfs;
* final_manifest - this will contain all the packages in the image,
after all installations finished;
Usage:
Manifest(d, manifest_dir).create_initial()
Manifest(d, manifest_dir).create_final()
or using the provided wrapper function:
create_manifest(d, False, manifest_dir) -> creates initial manifest
create_manifest(d, True, manifest_dir) -> creates final manifest
If manifest_dir argument is ommited, it defaults to ${WORKDIR}.
NOTE: this commit creates fixed manifests for minimal/sato/sato-sdk
images, for Rpm & Opkg backends, in order to help speed up
development of rootfs refactoring. Dpkg initial manifest creation is
implemented.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
This will replace the old bash image creation code. This needs the
rootfs to be already generated in order to work.
Usage:
Image(d).create()
or using the provided wrapper function:
create_image(d)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
This helper function will be used to execute pre/post process commands.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
Changes:
* Refreshed no-static-link.patch;
* LGPL&MIT license files changed names;
* MIT license file added a contributor to the list;
* README.rst license snippet changed to reflect the filename changes
and the new contributor;
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
License file changed slightly: a new person has been added to the list
of authors.
Add dependency of presentproto.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
This is needed by xserver-xorg 1.15. Since presentproto has just been
created, use a git recipe because the initial version is missing some
fixes, license file, etc.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Some recipes are installing libraries into ${base_libdir} (typically /lib) and
also use a foo-config binary to identify compile paths, for example
libusb-compat. Without mangling ${base_libdir} the ${base_libdir} path is
passed to the compiler, where it looks like a host path and results in
compile-host-path QA errors.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
[YOCTO #5436]
Automatic selection of static uid/gid is needed for a dynamically generated
passwd and group file to have a deterministic outcome.
When a package is installed and instructs the system to add a new user or
group, unless it selects a static uid/gid value, the next available uid/gid
will be used. The order in which packages are installed is dynamically
computed, and may change from one installation to the next. This results
in a non-deterministic set of uid/gid values.
Enabling this code by adding USERADDEXTENSION = "useradd-staticids", and
adding a preconfigured passwd/group file will allow the continued dynamic
generation of the rootfs passwd/group files, but will ensure a deterministic
outcome. (Dynamic generation is desired so that users and groups that have
no corresponding functionality are not present within the final system image.)
The rewrite params function will override each of the fields in the
useradd and groupadd calls with the values specified. Note, the password
field is ignored as is the member groups field in the group file. If the
field is empty, the value will not be overridden. (Note, there is no way
to 'blank' a field, as this would only generally affect the 'comment' field
and there really is no reason to blank it.)
Enabling USERADD_ERROR_DYNAMIC will cause packages without static uid/gid
to generate an error and be skipped for the purpose of building. This is
used to prevent non-deterministic behavior.
USERADD_UID_TABLES and USERADD_GID_TABLES may be used to specify the name
of the passwd and group files. By default they are assumed to be
'files/passwd' and 'files/group'. Layers are searched in BBPATH order.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
When the system attempts to populate the sysroot's passwd/group files, it
does so in a single block. However, with the way it was previously
implemented, the system would always run through the code necessary to
populate the sysroot, even in the case of target packages. This had
the side effect that a cross-installed filesystem may not match a
target installed filesystem.
The code was slightly reorganized to ensure that the cross/target installed
pre-install script behavior is the same. It also moves the block that
configures the sysroot parameters to the sysroot specific section of
the code.
Also some minor validation was occuring even on nativesdk packages.
Nativesdk packages should be skipped when processing useradd ops.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Regardless if the tests passed or not the script returned 0,
which isn't what one would expect.
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
minicom tarball is now downloaded from
the recommended web location.
Final fix for [YOCTO #5781].
Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
no-introspection.patch has been merged upstream.
Update license checksum as copyright dates have been updated.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Instead of simply creating partitions large enough to contain the
contents of a --source partition (and adding a pre-specified amount of
padding), use the --size used in the partition .wks statement.
If --size isn't used, or is smaller than the actual --source size,
retain the current behavior.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
|
Fixing the following warning:
WARNING: Variable rootfs_deb_bad_recommendations contains tabs, please remove these (/srv/ssd/sgw/poky/meta/recipes-extended/images/core-image-lsb-dev.bb)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|