Skip to content

Add function to package source codes tree to source rpm and tar packages

Xiaofeng Yan openembedded-core 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2package_rpm.bbclass: add srpm function in spec filemeta/classes/package_rpm.bbclass+55 -102 replies
2/2tar_archive.bbclass: Package source codes and log files to tar packagemeta/classes/tar_archive.bbclass+216 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Add function to package source codes tree to source rpm and tar packages

From: Xiaofeng Yan <[email protected]>

Add file "tar_archive.bbclass" and modify file "package_rpm.bbclass" for packaging source codes tree to source rpm and tar packages. After adding srpm function in file "package_rpm.bbclass", user can get source rpm packages beside rpm package. User also get tar packages of source codes tree according to the requirement from bug 1655. The final result is as follow:
Take qemux86 for an example:
Get source rpm pakcages
1 Inherit tar_archive.bbclass in package_rpm.bbclass.
2 Select the type of packaging source code tree in conf/local.conf(ARCHIVE_TYPE ?= "SRPM")
3 Run the following command

  $ bitbake core-image-sato -c copysources
4 Get source rpm packages:
  $ tree build/tmp/deploy/sources
  build/tmp/deploy/sources/
  └── qemux86
    ├── all-poky-linux
    │   ├── encodings-1.0.4-r2.1.src.rpm
        ......
    ├── i586-poky-linux
    │   ├── acl-2.2.51-r2.src.rpm
        ......
    └── qemux86-poky-linux
        ├── base-files-3.0.14-r70.src.rpm
        ......
Get tar packages:
1 Inherit tar_archive.bbclass in an suitable position (for example, package_rpm.bbclass).
2 Select the type of packaging source code tree in conf/local.conf(ARCHIVE_TYPE ?= "TARGZ")
3 Run the following command 
  $ bitbake core-image-sato -c copysources
4 Get tar packages: 
  $ tree build/tmp/deploy/sources
  buildx86/tmp/deploy/sources
  └── qemux86
    ├── all-poky-linux
    │   ├── encodings-1_1.0.4-r2.1
    │   │   ├── encodings-1_1.0.4-r2.1.tar.gz
    │   │   └── log.tar.gz
            ......
    ├── i586-poky-linux
    │   ├── acl-2.2.51-r2
    │   │   ├── acl-2.2.51-r2.tar.gz
            └── log.tar.gz
            ......
    └── qemux86-poky-linux
        ├── core-image-sato-1.0-r0
        ├── libzypp-0.0-git1+15b6c52260bbc52b3d8e585e271b67e10cc7c433-r17
        │   ├── libzypp-0.0-git1+15b6c52260bbc52b3d8e585e271b67e10cc7c433-r17.tar.gz
        │   └── log.tar.gz
            ......

if inheriting tar_archive.bbclass in one bb file, then only package source codes tree of this file. Take zlib for an example:
Get source rpm pakcage of zlib
1 Inherit tar_archive.bbclass in zlib_1.2.5.bb.
2 Select the type of packaging source code tree in conf/local.conf(ARCHIVE_TYPE ?= "SRPM") 3 Run the following command

  $ bitbake zlib
4 Get source rpm package:
  $ ls build/tmp/work/i586-poky-linux/zlib-1.2.5-r3/deploy-srpm/i586/
    zlib-1.2.5-r3.src.rpm

Get tar package of zlib
1 Inherit tar_archive.bbclass in zlib_1.2.5.bb.
2 Select the type of packaging source code tree in conf/local.conf(ARCHIVE_TYPE ?= "TARGZ") 3 Run the following command

  $ bitbake zlib 
4 Get tar package:
  $ ls build/tmp/work/i586-poky-linux/zlib-1.2.5-r3/
    zlib-1.2.5-r3.tar.gz log.tar.gz ......

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: xiaofeng/1655
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=xiaofeng/1655

Thanks,
Xiaofeng Yan <[email protected]>
---

Xiaofeng Yan (2):
package_rpm.bbclass: add srpm function in spec file tar_archive.bbclass: Package source codes and log files to tar
package

 meta/classes/package_rpm.bbclass |   65 ++++++++++--
 meta/classes/tar_archive.bbclass |  216 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 271 insertions(+), 10 deletions(-)
 create mode 100644 meta/classes/tar_archive.bbclass
Signature · 1 line
1.7.7