MantisBT - CMake
View Issue Details
0013118CMakeCPackpublic2012-04-10 15:292015-08-25 09:46
kiri 
Eric NOULARD 
normalmajoralways
closedfixed 
CMake 2.8.7 
CMake 2.8.9CMake 2.8.9 
0013118: CPack DEB generator does not use fakeroot for control.tar.gz
When automatically using fakeroot see 0010325 CPack DEB
does not use fakeroot for builing the control.tar.gz file
(which is part of the deb package) so that the ownership
in this file is not root/root as it is for data.tar.gz.
Original report text:
Though the user and permissions of entries in other tar files can be set via the environment variable TAR_OPTIONS, this is not observed for the control.tar.gz file in a generated debian package.
No tags attached.
related to 0011766closed Kitware Robot CPack using native TAR with adjustable command line options. 
related to 0012901closed Kitware Robot CPack should be able to set owner of files in the archive 
child of 0010325closed Eric NOULARD DEB packaging Set files ownership 
Issue History
2012-04-10 15:29kiriNew Issue
2012-04-10 15:31kiriNote Added: 0029120
2012-04-10 15:32kiriNote Added: 0029121
2012-04-10 15:33kiriNote Edited: 0029120bug_revision_view_page.php?bugnote_id=29120#r598
2012-04-10 15:33kiriNote Deleted: 0029121
2012-04-11 18:04Rolf Eike BeerCategoryCMake => CPack
2012-04-13 17:01Rolf Eike BeerAssigned To => Eric NOULARD
2012-04-13 17:01Rolf Eike BeerStatusnew => assigned
2012-04-15 14:43Daniel FrankeNote Added: 0029160
2012-04-16 06:37Eric NOULARDRelationship addedrelated to 0011766
2012-04-16 06:38Eric NOULARDRelationship addedrelated to 0012901
2012-04-16 15:47Eric NOULARDNote Added: 0029183
2012-04-16 15:47Eric NOULARDRelationship addedrelated to 0010325
2012-04-16 15:48Eric NOULARDNote Added: 0029184
2012-04-16 15:48Eric NOULARDStatusassigned => feedback
2012-04-16 16:47kiriNote Added: 0029191
2012-04-16 16:47kiriStatusfeedback => assigned
2012-04-16 17:25Eric NOULARDNote Added: 0029194
2012-04-17 02:00kiriNote Added: 0029196
2012-04-17 02:28Eric NOULARDNote Added: 0029197
2012-04-17 03:03Eric NOULARDRelationship replacedchild of 0010325
2012-04-17 03:08kiriNote Added: 0029198
2012-04-17 03:08Eric NOULARDSummaryCPack DEB generator unable to set user and permissions in control.tar.gz => CPack DEB generator does not use fakeroot for control.tar.gz
2012-04-17 03:08Eric NOULARDDescription Updatedbug_revision_view_page.php?rev_id=613#r613
2012-04-17 03:08Eric NOULARDAdditional Information Updatedbug_revision_view_page.php?rev_id=615#r615
2012-04-17 03:27Eric NOULARDNote Added: 0029199
2012-04-17 03:28Eric NOULARDProduct Version => CMake 2.8.7
2012-04-17 03:28Eric NOULARDTarget Version => CMake 2.8.8
2012-04-19 08:46David ColeTarget VersionCMake 2.8.8 => CMake 2.8.9
2012-04-20 14:48Eric NOULARDNote Added: 0029277
2012-04-20 14:48Eric NOULARDStatusassigned => resolved
2012-04-20 14:48Eric NOULARDFixed in Version => CMake 2.8.9
2012-04-20 14:48Eric NOULARDResolutionopen => fixed
2012-09-03 16:02David ColeNote Added: 0030891
2012-09-03 16:02David ColeStatusresolved => closed

Notes
(0029120)
kiri   
2012-04-10 15:31   
(edited on: 2012-04-10 15:33)
A consequence of this is that well formed packages are not, under normal circumstances, able to be made by a user other than root.

The solution to this bug could be related to Bug 0011766 , Bug 0012901 .

(0029160)
Daniel Franke   
2012-04-15 14:43   
Try `fakeroot make package`, see 0010325.
(0029183)
Eric NOULARD   
2012-04-16 15:47   
Hi all,

Daniel is right concerning deb package.
fakeroot cpack -G DEB
should make a perfectly ok package.

Moreover 0010325 shall handle this automatically (since 2.8.6)
for DEB package?

Kiri,
Why would you need mixed root/user ownership inside your deb package?
Is this even recommended for a .deb?
(0029184)
Eric NOULARD   
2012-04-16 15:48   
Waiting for feedback before going any futher because I don't see why we would
need something fancier than automatic fakeroot as provided by 0010325
(0029191)
kiri   
2012-04-16 16:47   
Maybe fakeroot is not be available on non-Linux systems. It operates by intercepting system calls - so I would not expect it to be universal. It is not a normal way to do something that requires no root privileges.

MS Windows has tar by MSys http://www.mingw.org/wiki/msys [^] .

Apparently Bug 0010325 needs to be re-opened, because fakeroot was installed on the system, but it did not create a correct package.

I my case, I did not wish mixed root/user ownership inside the deb package. The problem is that it happened though it is unwanted. What is mixed is the 2 'tar' files in the 'ar' file. 1 is owned by the user, 1 by root. This is bad.
(0029194)
Eric NOULARD   
2012-04-16 17:25   
Agreed, fakeroot may not be available on non-linux system
I didn't expect someone building a .deb package on anything but a linux system.

Then, you are saying that you build .deb package on Windows + MSYS ?
Where is the produced package installed on a sibling Windows system ?
If the produced package is installed on Linux system, are you
cross-compiling (on a Windows host toward a Linux target) ?
(0029196)
kiri   
2012-04-17 02:00   
No, I don't have MS Windows.
I was building on Debian with Debian package building tools installed.
(0029197)
Eric NOULARD   
2012-04-17 02:28   
So you are saying that

1) you build a .deb on Debian system
2) have fakeroot installed
3) get .deb with innappropriate ownership in "control.tar.gz"
   but correct in "data.tar.gz"

Am I right?

Could you try:

"fakeroot cpack -G DEB"

Does this produce a correct w.r.t. ownership .deb package?
(0029198)
kiri   
2012-04-17 03:08   
Yes, this is right.
Forseeably, I will be unable to test this within 1 month.
(0029199)
Eric NOULARD   
2012-04-17 03:27   
Ok I can reproduce the error.
I re-worded th e bug report because it was too vague.

I did push a fix for that on stage/CPackDeb-fixFakerootOnControl.
I did test it then pushed to next:

Merge topic 'CPackDeb-fixFakerootOnControl' into next

abc9b32 Use fakeroot for control.tar.gz as well

I think it could be worth an inclusion in 2.8.8 if there is at least
one rc left.
(0029277)
Eric NOULARD   
2012-04-20 14:48   
THis is already in next.
(0030891)
David Cole   
2012-09-03 16:02   
Closing resolved issues that have not been updated in more than 4 months.