MantisBT - CMake
View Issue Details
0010292CMakeCPackpublic2010-02-15 15:002012-04-20 15:19
Thawan Kooburat 
Eric NOULARD 
normalfeaturealways
closedfixed 
CMake-2-8 
 
0010292: Patch for CPack Debian generator (auto-dependecy support via dpkg-shlibdeps)
I created a patch for CPack Debian generator. Here is the list of my
modification

- Automatically generate dependency list if dpkg-shlibdeps utility is
presented (unless CPACK_DEBIAN_PACKAGE_SHLIBDEPS is set to OFF)
       1. Detect if dpkg-shlibdeps is existed in the system
       2. Use "find" and "file" command to generate a list of file and its type
       3. Only dynamically linked ELF binary are sent to
dpkg-shlibdeps to generate the dependency list
       4. Final dependency list = dpkg-shlibdeps + user-specified depends

- Change how top-level directories are detected - existing method
ignores blank directories

- Automatically set permission of control scripts (prerm,
preinst, postrm, postinst) to 0755

- Add one more Debian control file field -
  CPACK_DEBIAN_PACKAGE_HOMEPAGE (optional field)

- Add more variables that control generator behavior
  CPACK_DEBIAN_PACKAGE_SHLIBDEPS (Default = ON)
  CPACK_DEBIAN_PACKAGE_DEBUG (Default = - )


The original discussions are listed here
http://www.cmake.org/pipermail/cmake/2010-February/035128.html [^]
http://www.cmake.org/pipermail/cmake/2010-February/035154.html [^]
No tags attached.
related to 0010296closed Eric NOULARD Wrong "Installed-Size" field in generated Debian packages 
related to 0012431closed Domen Vrankar CPackDeb.cmake creates debian directory only, DEBIAN sometimes needed - dpkg-shlibdeps bails out upon a $ORIGIN RPATH 
patch CPackDeb.patch (9,674) 2010-02-15 15:00
https://public.kitware.com/Bug/file/2865/CPackDeb.patch
patch installed-size.patch (497) 2010-02-20 09:16
https://public.kitware.com/Bug/file/2882/installed-size.patch
Issue History
2010-02-15 15:00Thawan KooburatNew Issue
2010-02-15 15:00Thawan KooburatFile Added: CPackDeb.patch
2010-02-20 09:16Eric NOULARDNote Added: 0019557
2010-02-20 09:16Eric NOULARDFile Added: installed-size.patch
2010-05-18 04:57DroscyNote Added: 0020779
2010-05-18 06:38Eric NOULARDRelationship addedrelated to 0010296
2010-07-28 11:05Eric NOULARDStatusnew => assigned
2010-07-28 11:05Eric NOULARDAssigned To => Eric NOULARD
2010-07-28 11:26Eric NOULARDNote Added: 0021516
2010-07-28 12:35Eric NOULARDNote Added: 0021518
2010-07-28 12:40Eric NOULARDNote Added: 0021519
2010-08-04 12:31Thawan KooburatNote Added: 0021638
2010-08-04 12:34Eric NOULARDNote Added: 0021641
2010-09-09 23:56David ColeFixed in Version => CMake 2.8.3
2010-09-09 23:56David ColeTarget Version => CMake 2.8.3
2010-09-10 00:01David ColeFixed in VersionCMake 2.8.3 =>
2010-09-10 00:01David ColeTarget VersionCMake 2.8.3 =>
2010-11-12 14:20Eric NOULARDNote Added: 0023222
2011-09-05 17:07Eric NOULARDRelationship addedrelated to 0012431
2012-04-20 15:19Eric NOULARDNote Added: 0029283
2012-04-20 15:19Eric NOULARDStatusassigned => closed
2012-04-20 15:19Eric NOULARDResolutionopen => fixed

Notes
(0019557)
Eric NOULARD   
2010-02-20 09:16   
Attach patch provided by Droscy on the ML:
http://www.cmake.org/pipermail/cmake/2010-February/035167.html [^]
(0020779)
Droscy   
2010-05-18 04:57   
The installed-size.patch has been edited to follow Debian Policy, see http://public.kitware.com/Bug/view.php?id=10296 [^]
(0021516)
Eric NOULARD   
2010-07-28 11:26   
Hi Thawan,

I'm currently reviewing/testing your patch.
Some remark:

1) Your patch was reverse built -> this is not a big deal

2) Try to avoid trailing whitespace (at the end of lines)
   since it is forbidden by CMake git hook pre-commit scripts.
   And this is a bad habit --> anoying but not a big deal either.

3) Try to split you patch in order to makes it simpler to test
   new feature/bug fixes independently.

I'll try to split it myself and ask for your help if it's
too much work.


To Droscy: the "edited" installed patch have been applied separately.
(0021518)
Eric NOULARD   
2010-07-28 12:35   
OK I have checked-in part of the fix to next

commit 8110c099449c3c78414429a40ba8ba4f9c149538
Merge: c1cf112 ded3a15
Author: Eric NOULARD <eric.noulard@gmail.com>
Date: Wed Jul 28 18:34:13 2010 +0200

    Merge branch 'CPackDEB-auto-dependency-support' into next

commit ded3a1585b5a7848df6f6e8e3cf2133aa99719a5
Author: Eric NOULARD <eric.noulard@gmail.com>
Date: Wed Jul 28 18:24:20 2010 +0200

    CPackDeb optionally generates auto-dependency list part fix of bug 10292
    
    The default behavior is not to activate this option because it may break
    DEB package building for project who does not use INSTALL RPATH.


Next comment will ask more questions for the remaining parts of the patch proposal.
(0021519)
Eric NOULARD   
2010-07-28 12:40   
Thawan,

In my commited fix I changed, the default for
CPACK_DEBIAN_PACKAGE_SHLIBDEPS to be OFF.

The reason if it is defaulted to ON and the using project is NOT
setting INSTALL RPATH (see http://www.cmake.org/Wiki/CMake_RPATH_handling [^])
the DEB packager would abort because dpkg-shlibdeps would not find
the libs which are part of the package itself :-(

May be there is a way to avoid this but I have not the time to
fix this now. May be you could help ?

Would you be able to open new bug reports and provide patch for the 2
remaining issues:

- Change how top-level directories are detected - existing method
ignores blank directories

- Automatically set permission of control scripts (prerm,
preinst, postrm, postinst) to 0755

I'd rather handle those separately.
(0021638)
Thawan Kooburat   
2010-08-04 12:31   
Hi Eric,

Thank you very much for your effort and comments.

I will try to find time to work on this but it might be a while.
(0021641)
Eric NOULARD   
2010-08-04 12:34   
OK no problem.

The CPACK_DEBIAN_PACKAGE_SHLIBDEPS has been merged back to
master so it should be in the next CMake release.
(0023222)
Eric NOULARD   
2010-11-12 14:20   
Hi Thawan,

The fix made it to 2.8.3 which is now released.

If you want the remaining issue to be fixed,
please file a separate bug report with a patch,
I'll find the time to merge those.

- Change how top-level directories are detected - existing method
ignores blank directories

- Automatically set permission of control scripts (prerm,
preinst, postrm, postinst) to 0755
(0029283)
Eric NOULARD   
2012-04-20 15:19   
All issue in this bug has been fixed but (may be):

- Change how top-level directories are detected - existing method
ignores blank directories

- Automatically set permission of control scripts (prerm,
preinst, postrm, postinst) to 0755

I'd rather handle those separately, I suggest the reporter create
2 new bugs for that,
Before that I suggest a sanity check in order to verify that
those bug are currently happening with 2.8.8.