View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010736CMakeCPackpublic2010-05-20 07:102010-10-06 14:40
ReporterStefan Sablatnoeg 
Assigned ToEric NOULARD 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionCMake 2.8.3Fixed in VersionCMake 2.8.3 
Summary0010736: Enable CPack generators to produce more than one package
DescriptionIt would be nice if it would be possible to build multiple packages from one cmake project using cpack. Especially for the "simple" generators like ZIP etc. a seperation based on the COMPONENT given in the install command woould be very helpful (and probably easy to implement), but even for "active installers" there might be the need to provide different modules from one source tree.

TagsNo tags attached.
Attached Filespatch file icon 0001-CPack-enable-generators-to-produce-more-than-one-pac.patch [^] (22,505 bytes) 2010-08-03 20:18 [Show Content]
patch file icon 0002-CPack-enable-generators-to-produce-more-than-one-pac.patch [^] (4,554 bytes) 2010-08-03 20:18 [Show Content]
patch file icon 0003-CPack-enable-generators-to-produce-more-than-one-pac.patch [^] (12,085 bytes) 2010-08-03 20:18 [Show Content]
patch file icon 0004-CPack-enable-generators-to-produce-more-than-one-pac.patch [^] (11,474 bytes) 2010-08-04 10:08 [Show Content]
patch file icon 0005-CPack-enable-generators-to-produce-more-than-one-pac.patch [^] (5,469 bytes) 2010-08-05 18:30 [Show Content]
patch file icon 0001-CPackArchiveGenerator-use-cmArchiveWrite-wrapper.patch [^] (12,927 bytes) 2010-08-21 07:44 [Show Content]
patch file icon 0002-CPackArchiveGenerator-add-component-supports.patch [^] (13,331 bytes) 2010-08-21 07:44 [Show Content]
patch file icon 0003-CPackArchiveGenerator-improve-usability-and-robustne.patch [^] (3,354 bytes) 2010-08-22 12:21 [Show Content]

 Relationships
related to 0009900closedEric NOULARD Make CPack generic generator delegate the name of the file to specific generator 
parent of 0007645closedEric NOULARD Add support of CPack Component to CPack RPM generator 
related to 0010130closedEric NOULARD cpack components for non-component generators 

  Notes
(0020798)
Bill Hoffman (manager)
2010-05-20 08:14

Is this what you are looking for:
http://www.vtk.org/Wiki/CMake:Component_Install_With_CPack [^]
(0020804)
Eric NOULARD (developer)
2010-05-20 13:36

To Bill:
Currently there is only two CPack generators that supports components:
NSIS and PackageMaker.

This is pending for a long time for RPM because:
   - lack of time (as usual)
   - because generic generator was not meant to support
     "several files" generation in the first place
     see there
     http://public.kitware.com/Bug/view.php?id=9900 [^]

I'll add relationship with those related bugs / features requests
(0021592)
Eric NOULARD (developer)
2010-08-02 07:24

Hi All,

Here comes a patch which provides the necessary changes to
all CPack Generators for supporting the requested features.

The patch contains changes to the Archive Generators which will
produce a set of files for a componentized project.
For example using the example from
http://www.itk.org/Wiki/CMake:Component_Install_With_CPack [^]
using the ZIP generator it produces:

$ cpack -G ZIP
CPack: Create package using ZIP
CPack: Install projects
CPack: - Run preinstall target for: MyLib
CPack: - Install project: MyLib
CPack: - Install component: applications
CPack: - Install component: libraries
CPack: - Install component: headers
CPack: Compress package
CPack: Finalize package
CPack: Created package: MyLib-1.0.0-Linux-applications.zip
CPack: Created package: MyLib-1.0.0-Linux-headers.zip
CPack: Created package: MyLib-1.0.0-Linux-libraries.zip


Waiting for feedback before going on...
(0021601)
Stefan Sablatnoeg (reporter)
2010-08-03 03:04

Hi all,
first of all many thanks for providing a patch.
I tried it on an small example yesterday and it worked as expected
(I patched against cmake 2.8.2), a larger test will follow as soon as I
find the time.

One minor thing (maybe a different issue?),
I am not quite sure of yet is how to handle the destination
of the packages? Is there already way to produce (or copy) the packages
to a user defined place (we usually put our final deliveries under revision
control, so it would be ideal if the package would be in the "right" place
automatically after each build.)
(0021621)
Eric NOULARD (developer)
2010-08-03 20:23

Updated patch set.

0001 and 0002 contains the change of API for compressFile
0003 contains the updated ArchiveGenerator(s) for handling
     the 1 component == 1 package case.

A next patch should enable the
         1 component group == 1 package case.

Could someone test those patches (at least 0001 and 0002)
on Windows and/or OS X, I won't be able to test on those platforms.

Unless someone has more remarks concerning the change of API
I think 0001 and 0002 may be applied now to next/master.
(0021632)
Eric NOULARD (developer)
2010-08-04 10:09

Adding 0004 patch to patchset.
With 0004 the Archive Generators will produce 1 package file per component group
unless there is no group or CPACK_COMPONENT_IGNORE_COMPONENT_GROUP=1
is specified.
(0021637)
Eric NOULARD (developer)
2010-08-04 12:28

Small note:

The patch series are cumulative.
One must apply 0001 before 0002 etc...
Applying all those patches using git should be as simple as

git apply 000?-CPack-enable-generators-to-produce-more-than-one-pac.patch
(0021692)
harmy (reporter)
2010-08-08 13:09

hi, Eric:
thanks for your patches,can you post a sixth patch that makes CPackDebGenerator work?
(0021696)
Eric NOULARD (developer)
2010-08-08 14:08

Hi Harmy,

I will certainly work on a multi-package for DEB and RPM
but there are some overlapping change going on
(related to bug http://public.kitware.com/Bug/view.php?id=11020 [^])
so I may have to stall this in order to avoid to "double"
the work.

So the short answer is: Yes I will but not now.
You can monitor this bug and you will be kept informed.

Thank you for your interest in this.
(0021869)
Eric NOULARD (developer)
2010-08-21 07:54

Here comes a new set of patches for Archive Generators (ZIP, TGZ, STGZ etc...)
0001-CPackArchiveGenerator-use-cmArchiveWrite-wrapper.patch
0002-CPackArchiveGenerator-add-component-supports.patch

the previous work has been rebased on the redesigned CPack API.

The patches may be applied starting from current master.
you may pull the same content from my github branch:
http://github.com/TheErk/CMake/tree/CPackArchiveGenerator-ComponentSupport [^]

I think this can now go in upstream CMake and I will ask for this.
A usual I'm not able to test on Windows or MacOS so testers are welcomed.

I will send more "user" information on CMake ML.
Basically the patch introduces 3 new variables:

CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE
CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE
CPACK_COMPONENTS_IGNORE_GROUPS

which may set at CPack time in order to chose how
many package files are generated and how the "grouping"
takes place.

The default behavior is to create 1 package for each component group.
(0021933)
Eric NOULARD (developer)
2010-08-24 16:37

latest patch proposal have been pushed to next
(0022037)
Eric NOULARD (developer)
2010-08-31 16:37

Merged to master:

commit 65fa0f02351e1564d60b266594b425094dce1959
Merge: f95074b a986daf
Author: Brad King <brad.king@kitware.com>
Date: Tue Aug 31 14:24:32 2010 -0400

    Merge topic 'CPackArchiveGenerator-ComponentSupport'
    
    a986daf CPack fix broken compilation for CygwinSource generator
    873e99a CPackArchiveGenerator improve usability and robustness
    654683a CPackArchiveGenerator add component supports
    36a550a CPackArchiveGenerator use cmArchiveWrite wrapper

 Issue History
Date Modified Username Field Change
2010-05-20 07:10 Stefan Sablatnoeg New Issue
2010-05-20 08:14 Bill Hoffman Note Added: 0020798
2010-05-20 13:36 Eric NOULARD Note Added: 0020804
2010-05-20 13:36 Eric NOULARD Relationship added related to 0009900
2010-05-20 13:36 Eric NOULARD Relationship added parent of 0007645
2010-08-02 07:15 Eric NOULARD Status new => assigned
2010-08-02 07:15 Eric NOULARD Assigned To => Eric NOULARD
2010-08-02 07:21 Eric NOULARD File Added: 0001-CPack-enable-generators-to-produce-more-than-one-pac.patch
2010-08-02 07:24 Eric NOULARD Note Added: 0021592
2010-08-02 19:03 Eric NOULARD Relationship added related to 0010130
2010-08-03 03:04 Stefan Sablatnoeg Note Added: 0021601
2010-08-03 20:18 Eric NOULARD File Deleted: 0001-CPack-enable-generators-to-produce-more-than-one-pac.patch
2010-08-03 20:18 Eric NOULARD File Added: 0001-CPack-enable-generators-to-produce-more-than-one-pac.patch
2010-08-03 20:18 Eric NOULARD File Added: 0002-CPack-enable-generators-to-produce-more-than-one-pac.patch
2010-08-03 20:18 Eric NOULARD File Added: 0003-CPack-enable-generators-to-produce-more-than-one-pac.patch
2010-08-03 20:23 Eric NOULARD Note Added: 0021621
2010-08-04 10:08 Eric NOULARD File Added: 0004-CPack-enable-generators-to-produce-more-than-one-pac.patch
2010-08-04 10:09 Eric NOULARD Note Added: 0021632
2010-08-04 12:28 Eric NOULARD Note Added: 0021637
2010-08-05 18:30 Eric NOULARD File Added: 0005-CPack-enable-generators-to-produce-more-than-one-pac.patch
2010-08-08 13:09 harmy Note Added: 0021692
2010-08-08 14:08 Eric NOULARD Note Added: 0021696
2010-08-21 07:44 Eric NOULARD File Added: 0001-CPackArchiveGenerator-use-cmArchiveWrite-wrapper.patch
2010-08-21 07:44 Eric NOULARD File Added: 0002-CPackArchiveGenerator-add-component-supports.patch
2010-08-21 07:54 Eric NOULARD Note Added: 0021869
2010-08-22 12:21 Eric NOULARD File Added: 0003-CPackArchiveGenerator-improve-usability-and-robustne.patch
2010-08-24 16:37 Eric NOULARD Note Added: 0021933
2010-08-31 16:37 Eric NOULARD Note Added: 0022037
2010-08-31 16:37 Eric NOULARD Status assigned => closed
2010-08-31 16:37 Eric NOULARD Resolution open => fixed
2010-08-31 16:37 Eric NOULARD Fixed in Version => CMake-2-8
2010-08-31 18:03 David Cole Target Version => CMake 2.8.3
2010-10-06 14:40 David Cole Fixed in Version CMake-2-8 => CMake 2.8.3


Copyright © 2000 - 2018 MantisBT Team