View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013609CMakeCPackpublic2012-10-26 08:552013-11-07 02:51
ReporterBarthelemy von Haller 
Assigned ToEric NOULARD 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSRHELOS Version5
Product VersionCMake 2.8.9 
Target VersionFixed in VersionCMake 2.8.12 
Summary0013609: RPM generator wrongly add parents directories to the package
DescriptionWhen an install instruction is added such as :
install(FILES xxx.conf DESTINATION /etc/httpd/conf.d)

then the section %files in the generated spec file contains :
%dir "/etc"
%dir "/etc/httpd"
%dir "/etc/httpd/conf.d"

It is wrong as the RPM must not own system directories.
TagsNo tags attached.
Attached Filespatch file icon CpackRPM.patch [^] (2,024 bytes) 2013-04-03 11:06 [Show Content]
patch file icon 0001-CPackRPM-add-mechanism-to-remove-path-from-generated.patch [^] (3,300 bytes) 2013-04-05 06:55 [Show Content]
patch file icon 0002-CPackRPM-add-usr-lib64-to-the-list-of-builtin-to-be-.patch [^] (1,720 bytes) 2013-04-05 06:55 [Show Content]

 Relationships
duplicate of 0012864closedEric NOULARD CPackRPM additional variable CPACK_RPM_FILTER_FILELIST to remove well-known directories from %files list 
related to 0012305closedEric NOULARD RPM should include directories 
has duplicate 0013854closedEric NOULARD rpm built with cmake failing with file conflict errors 
has duplicate 0013860closedEric NOULARD RPMs created by CPack don't install on Fedora 18 

  Notes
(0031340)
Eric NOULARD (developer)
2012-10-26 10:18

This bug a a duplicate of 0012864, the later has been backlogged because no one has time to work on it.

Would you be willing to work on a patch?
(0031341)
Barthelemy von Haller (reporter)
2012-10-26 11:09

Hello,

Sorry, I didn't find the duplicate.

I could work on a patch depending on the complexity of the task. I have never taken a look at the code of CPack. Are there instructions for contributors somewhere ?
(0031410)
Eric NOULARD (developer)
2012-11-04 04:36

Hi Barthelemy,

Sorry for delayed answer.
No there aren't any centralized contributors instructions besides
instructions for the CMake workflow using git:
http://www.cmake.org/Wiki/CMake/Git/Develop [^]

Concerning the CPack code you'll find it in
<CMakeSource>/Source/CPack/ for the C++ part
and
<CMakeSource>/Modules/CPack*.cmake for the CMake script part.

Source file must be limited to 80 columns,
and CMake script should be using lower case for cmake commands/macros
UPPERCASE being used for variable name and/or CMake command arguments.

If you have further general questions please ask them on the
cmake-developers ML: http://www.cmake.org/mailman/listinfo/cmake-developers [^]

For question related to this specific issue, ask them on the tracker
I'll try to answer as-fast-as-possible.
(0032748)
Ari (reporter)
2013-04-03 11:11

Hi Eric,

This patch tackles the problem that RPM packages generated with CPack takes ownership of directories owned be other packages (chkconfig and filesystem in my case).

By default /etc /etc/init.d /usr /usr/share /usr/bin /usr/lib /usr/include are removed from the file list. The user can add to this list by providing CPACK_RPM_EXCLUDE_LIST in the CMake/CPack configuration.

Please consider reviewing and considering this patch.
(0032754)
Eric NOULARD (developer)
2013-04-05 06:49

Hi Ari,

I did commit a modified & enhanced version of you patch.

Merge topic 'CPackRPM-avoidOwningSystemDirs' into next

bac5772 CPackRPM add mechanism to remove path from generated list of file in RPM spec.

It is in stage/CPackRPM-avoidOwningSystemDirs
and merged to next.

May be you can try it, tell me if it's Ok for you.
I'll attach the patch to the tracker as well just in case it's more handy for you.
(0032755)
Eric NOULARD (developer)
2013-04-05 06:56

I did update the previous patch in order to add /usr/lib64 to the builtin list of exclusion. Just merged to next as well.

Merge topic 'CPackRPM-avoidOwningSystemDirs' into next

f055c99 CPackRPM add /usr/lib64 to the list of builtin to-be-excluded path
(0032763)
Ari (reporter)
2013-04-05 09:27

Hi Eric,

I have installed the enhanced patch and build most of our RPMs without problems.

Everything works great!

Thank you for your attention.
(0032764)
Eric NOULARD (developer)
2013-04-05 09:37

Ok I'm glad then.
If ever some more default paths seems reasonable to add
then tell me I may add them before the merge to master.

Even if any extra dir exclusion can now be done using
CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
(0033105)
Ari (reporter)
2013-05-21 07:52

Hi Eric,

I have not ran into any more default paths to add. I'm just wondering there is something in particular keeping you from merging this to master? Can I help with anything?
(0033239)
Dubrovskiy Viacheslav (reporter)
2013-06-05 07:00

> add /usr/lib64 to the builtin list of exclusion

I think you need to include all dirs from filesystem package.
This package is always installed in the system and there is no sense to pack a directory belonging to it.

[slava@dubrwork ~]$ rpm -ql filesystem
/bin
/boot
/etc
/etc/X11
/etc/X11/applnk
/etc/X11/serverconfig
/etc/X11/starthere
/etc/X11/sysconfig
/etc/binfmt.d
/etc/hooks
/etc/hooks/hostname.d
/etc/hooks/resolv.conf.d
/etc/modules-load.d
/etc/opt
/etc/sysconfig
/etc/sysctl.d
/etc/tmpfiles.d
/etc/xdg
/etc/xdg/autostart
/etc/xdg/menus
/home
/initrd
/lib
/lib/binfmt.d
/lib/i686
/lib/i686/tls
/lib/modules
/lib/modules-load.d
/lib/security
/lib/sysctl.d
/lib/tls
/lib/tmpfiles.d
/lib64
/lib64/security
/media
/media/cdrom
/media/floppy
/mnt
/mnt/cdrom
/mnt/disk
/mnt/floppy
/opt
/proc
/root
/run
/sbin
/selinux
/srv
/sys
/tmp
/tmp/.ICE-unix
/tmp/.X11-unix
/tmp/.esd
/usr
/usr/bin
/usr/etc
/usr/games
/usr/include
/usr/lib
/usr/lib/debug
/usr/lib/debug/.build-id
/usr/lib/debug/bin
/usr/lib/debug/lib
/usr/lib/debug/lib64
/usr/lib/debug/sbin
/usr/lib/debug/usr
/usr/lib/debug/usr/bin
/usr/lib/debug/usr/games
/usr/lib/debug/usr/lib
/usr/lib/debug/usr/lib64
/usr/lib/debug/usr/libexec
/usr/lib/debug/usr/sbin
/usr/lib/games
/usr/lib/helper
/usr/lib/menu
/usr/lib/tls
/usr/lib64
/usr/lib64/debug
/usr/lib64/games
/usr/libexec
/usr/local
/usr/local/bin
/usr/local/doc
/usr/local/etc
/usr/local/games
/usr/local/include
/usr/local/lib
/usr/local/lib64
/usr/local/libexec
/usr/local/man
/usr/local/sbin
/usr/local/share
/usr/local/share/info
/usr/local/share/man
/usr/sbin
/usr/share
/usr/share/applications
/usr/share/desktop-directories
/usr/share/dict
/usr/share/doc
/usr/share/empty
/usr/share/fonts
/usr/share/games
/usr/share/icons
/usr/share/icons/hicolor
/usr/share/icons/hicolor/16x16
/usr/share/icons/hicolor/16x16/apps
/usr/share/icons/hicolor/32x32
/usr/share/icons/hicolor/32x32/apps
/usr/share/icons/hicolor/48x48
/usr/share/icons/hicolor/48x48/apps
/usr/share/icons/large
/usr/share/icons/mini
/usr/share/info
/usr/share/man
/usr/share/man/man1
/usr/share/man/man2
/usr/share/man/man3
/usr/share/man/man4
/usr/share/man/man5
/usr/share/man/man6
/usr/share/man/man7
/usr/share/man/man8
/usr/share/man/man9
/usr/share/man/mann
/usr/share/mime
/usr/share/misc
/usr/share/pixmaps
/usr/share/sounds
/usr/share/wallpapers
/usr/src
/usr/src/debug
/usr/tmp
/var
/var/adm
/var/cache
/var/db
/var/empty
/var/lib
/var/lib/games
/var/lib/misc
/var/local
/var/lock
/var/lock/serial
/var/lock/subsys
/var/lock/uucp
/var/log
/var/mail
/var/nis
/var/nobody
/var/opt
/var/preserve
/var/run
/var/spool
/var/spool/mail
/var/tmp
/var/yp
(0034405)
Eric NOULARD (developer)
2013-11-07 02:51

One can now use
CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST
to populate the list of dir to be excluded from CPackRPM automatic handling.

 Issue History
Date Modified Username Field Change
2012-10-26 08:55 Barthelemy von Haller New Issue
2012-10-26 10:11 Eric NOULARD Assigned To => Eric NOULARD
2012-10-26 10:11 Eric NOULARD Status new => assigned
2012-10-26 10:15 Eric NOULARD Relationship added related to 0012305
2012-10-26 10:16 Eric NOULARD Relationship added duplicate of 0012864
2012-10-26 10:18 Eric NOULARD Note Added: 0031340
2012-10-26 11:09 Barthelemy von Haller Note Added: 0031341
2012-11-04 04:36 Eric NOULARD Note Added: 0031410
2013-01-17 13:34 Eric NOULARD Relationship added has duplicate 0013854
2013-04-03 11:06 Ari File Added: CpackRPM.patch
2013-04-03 11:11 Ari Note Added: 0032748
2013-04-05 06:49 Eric NOULARD Note Added: 0032754
2013-04-05 06:51 Eric NOULARD File Added: 0001-CPackRPM-add-mechanism-to-remove-path-from-generated.patch
2013-04-05 06:55 Eric NOULARD File Deleted: 0001-CPackRPM-add-mechanism-to-remove-path-from-generated.patch
2013-04-05 06:55 Eric NOULARD File Added: 0001-CPackRPM-add-mechanism-to-remove-path-from-generated.patch
2013-04-05 06:55 Eric NOULARD File Added: 0002-CPackRPM-add-usr-lib64-to-the-list-of-builtin-to-be-.patch
2013-04-05 06:56 Eric NOULARD Note Added: 0032755
2013-04-05 06:59 Eric NOULARD Relationship added has duplicate 0013860
2013-04-05 09:27 Ari Note Added: 0032763
2013-04-05 09:37 Eric NOULARD Note Added: 0032764
2013-05-21 07:52 Ari Note Added: 0033105
2013-06-05 07:00 Dubrovskiy Viacheslav Note Added: 0033239
2013-11-07 02:51 Eric NOULARD Note Added: 0034405
2013-11-07 02:51 Eric NOULARD Status assigned => closed
2013-11-07 02:51 Eric NOULARD Resolution open => fixed
2013-11-07 02:51 Eric NOULARD Fixed in Version => CMake 2.8.12


Copyright © 2000 - 2018 MantisBT Team