Commit Graph

207 Commits

Author SHA1 Message Date
Scott Garman c8bd9ff2a4 package_rpm.bbclass: make RPM use on-disk permissions
Instruct RPM to use the on-disk permissions, owners, groups,
and directory permissions, instead of defaulting to root:root

Code changes suggested by Mark Hatle.

(From OE-Core rev: a6464f9484f56f596e3215184ad56ac6769ebb0c)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-06 15:58:42 +01:00
Lianhao Lu 16f06f7135 classes/package_xxx.class: Use PKGE/PKGV/PKGR.
Use PKGE/PKGV/PKGR to build various package feed in tasks of pacakge_write_xxx.

(From OE-Core rev: c2872315905fcdf6e4bf11fe96e5ca62af3475f8)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:49 +01:00
Chris Larson e3d0d9897e Move packagedata code into oe.packagedata (sync from OE)
(From OE-Core rev: e6858627ab087f2f25ebbd6c4422eeae35f3b0ac)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-20 19:07:51 +01:00
Dexuan Cui 9fbd9b93ae package-index.bb: add support for deb and rpm.
[YOCTO #1024]
Currently package-index.bb only supports ipk. This commit adds the support
for rpm and deb, too.

------------------------------
How to generate and use repos:

1) run "bitbake package-index" after building some target,
e.g., core-image-sato-sdk;

2) export ${DEPLOY_DIR_RPM}, ${DEPLOY_DIR_IPK} and ${DEPLOY_DIR_DEB} by a
webserver on the host, assuming the host IP is 192.168.7.1, at
http://192.168.7.1/rpm
http://192.168.7.1/ipk
http://192.168.7.1/deb

3) inside the target, according to the packaging system (rpm, ipk or deb) used
when we generate the target image, we can use different ways to manage
packages:

3.1) RPM
    run "zypper addrepo http://192.168.7.1/rpm main; zypper refresh"
    to retrieve info about the repo; next, we can use "zypper install/remove"
    to manage packages.

3.2) IPK
    add the repo info into opkg config file, i.e., in
    /etc/opkg/arch.conf, we can add something like
    "src i586 http://192.168.7.1/ipk/i586", and next, we run "opkg update" to
    make opkg update the list of available packages. And later, we can use
    "opkg install/remove" to manage packages.

3.3) DEB
    Currently in target, some important config files, like
/var/lib/dpkg/status and /etc/apt/sources.list, for deb/apt are missing. So
we can't install/remove package in target at present.

(From OE-Core rev: 01e34bdb43e0cc27c1cfffd6730c384f40c404c1)

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-20 12:40:44 +01:00
Adrian Alonso 9ebafcf5e2 package_rpm: use target vendor information
* Instead of hardcoding target vendor string "-poky"
  use TARGET_VENDOR information in case of using external
  toolchains

(From OE-Core rev: 0638c470410b7ac3057d8f64ae0d389b5c3da838)

Signed-off-by: Adrian Alonso <aalonso@secretlab.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-10 09:56:20 +01:00
Richard Purdie 68baef9065 package_rpm: Ensure we take the sstate shared lockfile in the place we write files
The point we need to take the lock is when the rpm files are written into the
deploy rpm directory. Since sstate makes the actual installation of the files,
that is the point we need to take the lock. This also stops the deploy/rpm
directory being accessed for a lock before it exists.

[YOCTO #797]
[YOCTO #925]

(From OE-Core rev: 833a1e970f087dfcb32967cee3e24540f041cde0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-29 14:01:52 +01:00
Mark Hatle c180383885 package_rpm: Fix rootfs generation
[YOCTO #797]

During rootfs generation, if other RPM packages are being wrtten
this could cause a failure during the solvedb generation.  We
add a shared lock around the RPM package building.  This will allow
multiple RPM packages to continue to be written at the same time, but
prevent rootfs generation and RPM package generation at the same time.

(From OE-Core rev: 1d5ca654a482f582c75faf546140dfd6064da73b)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-10 18:46:02 -08:00
Mark Hatle 08c8f7bb73 rootfs_rpm: Fix rootfs generation using RPM packages
[BUG #756]

Fix bug #756.  The rootfs contains a control file /etc/rpm/platform
that specifies the default system platform, as well as patterns for
compatible architectures.  This file was not being setup properly due
to a misunderstanding of the format in a previous patch.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-25 17:31:50 -06:00
Mark Hatle ab0e1bed22 package_rpm: Fix solverdb generation
The RPM solverdb was potentially being generated multiple times.
Fix this by ensuring we only process each directory once.

Also correct an issue where the solution did not necessarily follow
the preferred architecture ordering, reverse the default Poky ordering
so that preferred is listed first.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-16 07:34:51 -08:00
Mark Hatle ca649ef825 rpm: Add the ability to use the platform file during install
Add a new rpm macro, rpmrc_platform_path to specify an alternative platform
file.  This is required to allow the dep resolver to identify compatible
packages.

Also workaround a minor problem with the --showrc command in RPM.  A bug
has been reported upstream on this.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-02-16 07:34:51 -08:00
Lianhao Lu 382075a9c2 rootfs_rpm/package_rpm.bbclass: Move func from rootfs_rpm to package_rpm
package_deb.bbclass:
1. Modified package_update_index_rpm() and package_generate_rpm_conf()
to generate sperate depsolver db and rpm configuration, for target
packages and host packages respectively.

2. Added new function package_install_internal_rpm() to install a list
deb packages to a specified root directory, with the specified package
architecutre information.

3. Added new function resolve_package_rpm() to resolve package names to
filepaths.

rootfs_deb.bbclass:
Used the above new functions to install the rootfs.

[sgw: merged changes for createrepo]
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-02-01 23:59:37 +00:00
Lianhao Lu 5b7e96d852 image/package_xx/rootfs_xx.bbclass: move rootfs_xx_log_check().
Move function rootfs_xx_log_check() from rootfs_xx.bbclass to relevant
package_xx.bbclass. (Where xx is rpm/ipk/deb).

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2011-01-31 16:58:15 +00:00
Mark Hatle 612d59f7d1 package_rpm: Fix package-split summary
The package-split summaries were being pulled in from the main package, not
the split package metadata.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-01-30 12:09:53 -08:00
Mark Hatle f6ddba2a9d rpm: Uprev to RPM 5.4.0
Update RPM to the latest release, RPM 5.4.0.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-01-28 17:52:55 +00:00
Richard Purdie 48b42dae51 classes: Only enable fakeroot on setscene tasks with packaging
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22 16:34:06 +01:00
Richard Purdie 36f1ae42fe pseudo/fakeroot: Move the pseudo directory creation into bitbake
If sstate was used to accelerate a build, the pseudo directory might not have
been created leading to subsequent task failures.

Also, sstate packages were not being installed under pseudo context meaning
file permissions could have been lost.

Fix these problems by creating a FAKEROOTDIRS variable which bitbake ensures
exists before running tasks and running the appropriate setscene tasks under
fakeroot context.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22 13:00:40 +01:00
Richard Purdie 13f116b1ad package_rpm: Don't check for the existence of dvar as its never used
If a sstate package exists for the package task but not for the rpm packaging
task, the output from the package task will be used. The directory pointed
to by dvar will not exist under this scenario.

Since the directory is never used by the packaging process remove the
check, substituting the pkgd variable which is always present and used.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-22 12:56:20 +01:00
Mark Hatle b2f2590e6c Add Summary/Description support to packaging
[BUGID #281]

Add the ability for the deb, ipk and rpm classes to use the new summary
and description fields.  The Description is wrapped around 75 characters
to ensure a reasonably nice, presentable description.

(Summary defaults to the description if Summary is not defined.)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-10-11 22:13:14 +01:00
Richard Purdie df41bd46dd package_rpm: Disable nativesdk/canadian package indexes for now as these are being incorrectly used for target rootfs generation, breaking the images
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-10-11 12:13:43 +01:00
Richard Purdie 2d93cb0a0d Revert "classes: Disable setscene tasks for initial testing"
This reverts commit 084ec86402.
2010-10-05 22:26:33 +01:00
Mark Hatle c849ec75e7 rpm: Fix autoconf/libtool usage
In order to resolve a host-contamination problem, we re-work the way that
autoconf and friends are invoked during the compilation of RPM.

This has a side effect of fixing another bug where RPM was being renamed
HOST_ARCH-HOST_OS-rpm.  So we remove the "fixes" for that behavior as well.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-09-03 18:30:47 -07:00
Mark Hatle 2f68de1e88 roots_rpm: Enable installation of recommended packages
Within RPM there is a field called "Suggests".  This filed behaves like
"Recommends" does in ipk.  So we write out the packages using the Suggests
field with the Poky 'Recommends' values... and then use the arbitrary tags to
capture the Poky 'Suggests' within a new "Recommends" tag.

Slightly confusing, but the end result is a functioning install.

Also some performance enhancements were add at the same time.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-09-03 09:44:56 +01:00
Mark Hatle 84e1f5a689 package_rpm: Start packaging directories
Match ipkg behavior and unconditionally include directories in the packages

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-09-03 09:43:14 +01:00
Mark Hatle 4b611b6674 package_rpm: Enable debian style tags
Enable debian style tags including suggests, enhances, recommends

Note, these are not yet used by the dependency resolver.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-09-02 10:01:22 +01:00
Mark Hatle 379ba0e9d7 rootfs_rpm: Optimize rpm database processing
Optimize the creation of the solverdb by disabling fsyncs and
database caches that are not used when generating a solution.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-09-02 10:01:22 +01:00
Mark Hatle 84f7f70308 package_rpm: Enable per file dependencies
Switch the per file dependency handing to passing the information to
rpm via the standard 'external' dependency scripting.  This ensures that
the dependencies found by RPM exactly match the ones presented by
package.bbclass.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-09-02 10:01:22 +01:00
Richard Purdie e6566322bd meta/classes: Fix whitespace mismatch and broken functions
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-31 12:02:24 +01:00
Mark Hatle 9a8b6447c6 package_rpm: Temporary workaround for perfile dependencies
Until the pseudo code is fully integrated, we need to roll up the
per file dependencies into package dependencies for rpm.

Signed-off-by: Mark Hatle <mhatle@windriver.com>
2010-08-23 21:04:20 +01:00
Mark Hatle 59a3e98b04 rootfs_rpm: Enable multi dep solverdbs
Update package_rpm.bbclass to generate dep solver databases for each
package arch.  Following the example of the deb and ipk integration

Revise the rootfs_rpm to solve the installation based on the multiple
dep solvers.

Note, recommends, locale and attemptonly pckages are still to be
implemented.

Signed-off-by: Mark Hatle <mhatle@windriver.com>
2010-08-23 20:56:47 +01:00
Mark Hatle 55a046bd4c package_rpm: Rewrite the way the spec files are generated
Use a single spec file to generate all of the split packages.  This allows
us to ensure the RPM package source package meta data is correct, and also
speeds up the package generation process.

Signed-off-by: Mark Hatle <mhatle@windriver.com>
2010-08-23 20:55:14 +01:00
Richard Purdie 084ec86402 classes: Disable setscene tasks for initial testing
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-19 22:36:26 +01:00
Richard Purdie 3c539be84c package_*.bbclass: Always run these tasks under fakeroot
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-19 22:36:26 +01:00
Joshua Lock 0769e847cb package_(deb|rpm): Update to use packaged-staging2
Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-08-19 20:06:25 +01:00
Joshua Lock 8760cde94a rpm: switch to using RPM 5
Switch to RPM5 as our rpm provider of choice and update the recipe to the latest
stable release.

Signed-off-by: Joshua Lock <josh@linux.intel.com>

Modify the package_rpm.bbclass to understand the macro and command line changes
present in rpm5.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-07-24 00:46:57 +01:00
Joshua Lock 29d5edffb0 Use pseudo rather than fakeroot for fake root privileges
Make use of the ability to configure the fake root provider and use Wind
River's pseudo utility.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-07-16 15:40:32 +01:00
Richard Purdie 4d4b7922b1 package_*.bbclass: Only set pkg in overrides. These are the only values we're interested in expanding and this makes sure we obtain the expected data
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-07-07 12:53:46 +01:00
Richard Purdie 1497af07fa Revert "classes/package_ipk|_deb|_rpm.bbclass: Fix setting of OVERRIDES when packaging"
This reverts commit 3abe7a0624 which was incorrect
in some assumptions about OVERRIDE handling order.
2010-07-07 12:15:11 +01:00
Joshua Lock 3abe7a0624 classes/package_ipk|_deb|_rpm.bbclass: Fix setting of OVERRIDES when packaging
The OVERRIDES variable was being incorrectly set with the end result of the
runtime dependencies of the package not being encoded in it's package metadata.

This broke opkg-native in meta-toolchain.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
2010-07-01 16:14:21 +01:00
Richard Purdie b772c8cde5 bitbake.conf/base.bbclass: Rename the staging directory to sysroots and the populate_staging task to populate_sysroot
This change makes the purpose of the staging directory more obvious and
the taskname more true to what it now actually does.

The layout version number is increased due to the change in layout
but code to convert existing directories and insert a symlink for
backwards compatibility is included.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-13 12:15:42 +00:00
Richard Purdie c54117458a classes: Remove and sanitise import statements
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-13 12:15:28 +00:00
Rob Bradford ea868f9c9c package_rpm.bbclass: Don't use the system wide RPM macros.
This fixes the build on Fedora 10 where the RPM system macros obliterate the
value of BuildRoot that is set in the spec file.
2008-10-28 18:52:19 +00:00
Marcin Juszkiewicz 690a699ec1 package_rpm.bbclass: save value of RPMBUILDPATH as it is needed for packaging
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5413 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-10-03 21:32:46 +00:00
Richard Purdie 19855de1e1 package_rpm.bbclass: Fix dependency rebuilding bug
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5397 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-10-02 21:31:05 +00:00
Richard Purdie 785f33dfaa package_rpm.bbclass: Fix package version fixing for PKG renamed packages
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5393 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-10-02 20:56:59 +00:00
Richard Purdie 3c5eae8fec package_rpm.bbclass: Improve handling of '-' characters in Requires and Recommends fields
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5390 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-10-02 19:57:34 +00:00
Richard Purdie 66d13479c4 classes: Split rpm feeds by PACKAGE_ARCH
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5381 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-10-02 15:21:36 +00:00
Richard Purdie 36d8198031 package_rpm.bbclass: Add support for postinst and preinst scripts
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5131 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-09-03 20:59:09 +00:00
Richard Purdie 6269c57167 package_rpm.bbclass: Fix problems with package version with '-' in the version (replace with '+'), improve the Requires and Recommends generation code
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5129 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-09-03 14:49:22 +00:00
Marcin Juszkiewicz b8ce2fb82e package_rpm.bbclass: files needs to start from /
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5116 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-08-28 07:35:31 +00:00
Richard Purdie b7b95fa1df package_rpm.bbclass: Stop autogenerated dependencies for now, its not functioning correctly
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5111 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-08-26 12:26:08 +00:00
Richard Purdie 317a8473c9 package_rpm.bbclass: Fix empty package handling, handle package dependency renaming by adding a missing function call and expand RPMBUILD before changing the dictonary so local PV/PR changes don't break the WORKDIR variable expansion
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5100 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-08-25 20:50:46 +00:00
Richard Purdie ded39e22cd package_rpm.bbclass: Update against recent packaging changes and start to implement dependency handling. Drop pointless rpm_core class.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5067 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-08-18 08:01:41 +00:00
Marcin Juszkiewicz d862b5758c package_{ipk|deb|tar|rpm): append depend-tasks instead of overwriting
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3265 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-11-28 20:01:41 +00:00
Richard Purdie 48fd37f5f9 packaging: Split deb and ipk creation into separate tasks so changing the packaging type means the new type of packages are automatically generated.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2526 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-08-21 09:37:30 +00:00
Richard Purdie e2b821a834 package.bbclass: Split into two tasks, one which prepares the packages and then package_write which actually generates the packages. The two stage approach allows us to avoid circular dependency issues from classes like debian.bbclass. As the data being emitted into pkgdata/ changed, you need to either wipe tmp or rerun the do_install/do_package tasks (wipe the do_xyz stamps from the stamps dir). Everything will repackage anyway due to the new task.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@807 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-10-20 16:09:05 +00:00
Chris Larson 4fa2d11bb1 Sync up.. all the deb/dpkg changes which I have locally are now in svn.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@728 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-09-19 09:04:09 +00:00
Richard Purdie b2f192faab Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-07-21 10:10:31 +00:00