Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake/cpack] Debian packages generation #9987

Merged
merged 7 commits into from Jul 20, 2016
Merged

Conversation

hudokkow
Copy link
Member

@hudokkow hudokkow commented Jun 16, 2016

This is the work to generate debian packages with our shiny CMake/CPack system.

It currently generates deb packages following stable, unstable or nightly release conventions for name/version:
kodi-bin_16.1git20160425.1001-final-0xenial_amd64.deb / 2:16.1git20160425.1001-final-0xenial
kodi-bin_17.0git20160703.1014-alpha2-0xenial_amd64.deb / 2:17.0git20160703.1014-alpha2-0xenial
kodi-bin_17.0git20160714.0200-b0970fe-0xenial_amd64.deb / 2:17.0git20160714.0200-b0970fe-0xenial

Packages currently generated

kodi
kodi-addon-dev
kodi-audio-dev
kodi-bin
kodi-eventclients-common
kodi-eventclients-dev
kodi-eventclients-ps3
kodi-eventclients-j2me
kodi-eventclients-wiiremote
kodi-eventclients-xbmc-send
kodi-inputstream-dev
kodi-pvr-dev
kodi-screensaver-dev
kodi-tools-texturepacker
kodi-visualization-dev
xbmc removed

Design decisions

  • CPackConfig.cmake file contains variables and logic common to all generators (DEB/RPM/NSIS/etc.)
  • CPackConfigDEB.cmake file contains variables and logic specific to DEB packaging system
  • scripts/linux/Install.cmake handles install targets logic separated by components. It calls (includes) CPackConfigDEB.cmake for package generation. In turn CPackConfigDEB.cmake is the only file calling CPackConfig.cmake
  • Variables and logic are enclosed in if statements. Should provide an easy way to manipulate packages naming/version/etc. using command-line only.
  • CMake/CPack >=3.6.0 is required for proper package naming generation because it introduced CPACK_DEBIAN_component_name_FILE_NAME. It will work with lower versions but resulting package names are meh.

Todo

  • Add documentation to packages (copyright, license, etc.)
  • Generate debian changelog on-the-fly and add it to packages (ping @wsnipex for ideas)
  • Generate xbmc -> kodi symlinks and add them to packages symlinks removed. They mess cpack DEB generation and xbmc to kodi transition as lasted long enough.
  • Generate kodi-eventclients-j2me package (I saw that j2me-remote needs ant and immediately lost motivation. 😉 I'm sure I'll find it again after I'm done with all the TODOs) Support for this client was removed in [eventclients] Nuke J2ME #10049
  • Generate kodi-eventclients-ps3
  • Generate kodi-eventclients-wiiremote
  • Generate xbmc (dummy package)
  • Generate source tar.gz
  • Cleanup files
  • Add documentation to README

As always opinions are welcome.

cc/ @wsnipex, @fetzerch, @notspiff and anyone else interested

@hudokkow hudokkow added Type: Feature non-breaking change which adds functionality RFC PR submitted for gathering feedback Type: Improvement non-breaking change which improves existing functionality WIP PR that is still being worked on v17 Krypton Platform: Linux CMake labels Jun 16, 2016
@@ -38,98 +38,273 @@ configure_file(${CORE_SOURCE_DIR}/tools/Linux/kodi-standalone.sh.in
# Configure cmake files
configure_file(${PROJECT_SOURCE_DIR}/KodiConfig.cmake.in
${CORE_BUILD_DIR}/scripts/${APP_NAME}Config.cmake @ONLY)
configure_file(${PROJECT_SOURCE_DIR}/XBMCConfig.cmake.in
${CORE_BUILD_DIR}/scripts/XBMCConfig.cmake @ONLY)

This comment was marked as spam.

@wsnipex
Copy link
Member

wsnipex commented Jun 16, 2016

as for generating changelog. I use this simple bash function: https://github.com/wsnipex/xbmc-packaging-ws/blob/master/buildscripts/buildfromgit.sh#L151-L172

@hudokkow hudokkow force-pushed the cpack_debian branch 5 times, most recently from 33cf0a6 to afe5d12 Compare June 29, 2016 22:00
@hudokkow
Copy link
Member Author

Second iteration:

  • separated metadata from logic as per @notspiff's suggestion
  • added source tar.gz package generation
  • lintian is happy (apart from warnings)
  • nuked XBMCConfig.cmake

@wsnipex, any reason why nightly packages use PACKAGE_PROVIDES xbmc-audio-dev instead of PACKAGE_PROVIDES kodi-audio-dev?

@hudokkow hudokkow force-pushed the cpack_debian branch 13 times, most recently from aef1f75 to 4d50414 Compare July 6, 2016 14:29
@hudokkow
Copy link
Member Author

Do not merge this.
I forgot to fetch my origin first and rebased on wrong branch. I'll fix it tomorrow when I get to the office.
Not enough ale, I tell you...

@hudokkow hudokkow force-pushed the cpack_debian branch 3 times, most recently from 256f62f to 7896955 Compare July 19, 2016 12:39
@hudokkow
Copy link
Member Author

If no objections, this is going in tonight.
jenkins cmake build: http://jenkins.kodi.tv/job/LINUX-64/8423/

if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(PACKAGE_NAME_VERSION ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}~git${PACKAGE_TIMESTAMP}-${RELEASE_IDENTIFIER}-${DISTRO_CODENAME})
else()
set(PACKAGE_NAME_VERSION ${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}~git${PACKAGE_TIMESTAMP}-${RELEASE_IDENTIFIER}-${DISTRO_CODENAME})

This comment was marked as spam.

This comment was marked as spam.

@fetzerch
Copy link
Member

Sorry that it took so long to review. Great work! (found mostly minors, but it would be great if you could fix the find modules)

@hudokkow
Copy link
Member Author

Fixed cmake minors.
I'll have a look at the find modules / pre and post scripts tonight.

Thanks for the review!

@hudokkow
Copy link
Member Author

Minors addressed, Find modules rewritten and retested locally and with jenkins
Going in in 3... 2...

@hudokkow hudokkow merged commit cb5829c into xbmc:master Jul 20, 2016
@hudokkow hudokkow deleted the cpack_debian branch July 20, 2016 17:46
@hudokkow hudokkow added this to the Krypton 17.0-alpha3 milestone Jul 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake Platform: Linux Type: Feature non-breaking change which adds functionality Type: Improvement non-breaking change which improves existing functionality v17 Krypton
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants