Kodi Community Forum

Full Version: How to create your own Ubuntu XBMC packages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Update: building process is due of change

I'm able to build my own Ubuntu XBMC specific packages. For those interested in doing this, this is the complete setup. I'm using Ubuntu 9.04 for this:

Update your system with all necessary packages:

Code:
sudo apt-get update

Code:
sudo apt-get install subversion make g++ gcc gawk pmount libtool nasm automake cmake gperf unzip bison libsdl-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libsdl-sound1.2-dev libfribidi-dev liblzo-dev libfreetype6-dev libsqlite3-dev libogg-dev libasound-dev python-sqlite libglew-dev x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-dev libmad0-dev libogg-dev libvorbis-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper-dev libfontconfig-dev libbz2-dev libboost-dev libfaac-dev libenca-dev libxt-dev libxtst-dev libxmu-dev libpng-dev libjpeg-dev libpulse-dev mesa-utils libcdio-dev libsamplerate-dev libmms-dev liblzo2-dev libfaad-dev libsmbclient-dev libwavpack-dev libmpeg2-4-dev libdts-dev liba52-0.7.4-dev libswscale-dev libpostproc-dev libavformat-dev libavcodec-dev libnotify-bin bzr checkinstall dput devscripts debhelper dpatch seahorse pbuilder debootstrap

Add the build user and correct rights:

I'm using a different user (buildd) for the building process. These are the instructions for setting it up.

Code:
sudo adduser buildd

Give the buildd user the correct rights,
enter name, e-mail, etc

Code:
sudo pico /etc/sudoers

Code:
## lines to be added in order to build XBMC
buildd ALL=NOPASSWD: ALL

Code:
su buildd

Code:
cd

Setup GPG key for the build user:

A gpg key is needed for this user, you can either follow this guide; https://help.ubuntu.com/community/GnuPrivacyGuardHowto or use the instructions below:

Code:
gpg --cert-digest-algo=SHA256 --default-preference-list="h10 h8 h9 h11 s9 s8 s7 s3 z2 z3 z1 z0" --gen-key

- select (5) RSA (sign only)
- select keysize of 2048
- Enter your name, e-mail and comments according the buildd user created before.
- Don't use a Passphrase


Get a copy of the XBMC source:

Now it's time to checkout the development branch:

Code:
svn checkout https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk/

Setup the pbuilder and temp directory:

This is where all the packages will be stored and be built:
I had a "out of space" problem, so that why decided to create symbolic links instead;

Code:
mkdir /home/buildd/tmp
sudo ln -s /home/buildd/tmp /tmp/buildd

mkdir /home/buildd/pbuilder
sudo rm -rf /var/cache/pbuilder
sudo ln -s /home/buildd/pbuilder /var/cache/pbuilder

Create the base image

Now we can use the pbuilder-dist script to create our base set. (Jaunty corresponds with 9.04. Karmic with 9.10)

Code:
cd trunk/tools/Linux/packaging/
./pbuilder-dist karmic create

Start the building process:

You can now initiate the building process by using the following commands:

Code:
cd trunk/tools/Linux/packaging/
./ppa-builder.sh -p karmic
Do you still have this problem ?

Quote:E: xbmc source: depends-on-build-essential-package-without-using-version make [build-depends: make]
E: xbmc source: depends-on-build-essential-package-without-using-version g++ [build-depends: g++]
E: xbmc source: depends-on-build-essential-package-without-using-version gcc [build-depends: gcc]
W: xbmc source: dpatch-build-dep-but-no-patch-list xbmc

Can you give a link to the following file ?
xbmc_24303-jaunty1.diff.gz
wattazoum Wrote:Do you still have this problem ?

Can you give a link to the following file ?
xbmc_24303-jaunty1.diff.gz

Yes, still same issue. Full log: http://pastebin.ubuntu.com/325199/
File you requested: http://piethein.serverthuis.nl/xbmc_2488...y1.diff.gz
Do you have a file called bootstrap in your source folder ?
wattazoum Wrote:Do you have a file called bootstrap in your source folder ?

Well i have a file /home/buildd/trunk/bootstrap
but not in /home/buildd/xbmc-24887/ , the copy of the source I assume. Thanks for looking into this!
I think I understood the cause your problem.

I have updated the build script. The problem is certainly the following:

Quote:- change SVNSRC=$SRC_BRANCH/XBMC to SVNSRC=$SRC_BRANCH/xbmc (upper, lower case problem for trunk)

The XBMC folder I was refering to where from the way the SVN repository were before. The linuxport branch were like this.

linuxport
| - XBMC
| - docs
` - sources

But now, "trunk" is the equivalent of the "XBMC" folder. So the folder you were getting were wrong when doing "trunk/xbmc". If you update the ppa-building-scripts folder you will understand what I mean.
Edit;

I updated all directories (including debian*, ppa-etc), noticed that you updated the scripts
(Didn't change the SRC_BRANCH=trunk or SVNSRC=$SRC_BRANCH in the svn build script.)

Hold on.. Trying again... And seems to getting further!! XBMC is compiling now.. Now I just have to wait!

I think I got there:

Code:
dh_link: I have no package to build
dh_strip --dbg-package=xbmc-common-dbg
dh_strip: I have no package to build
dh_fixperms
dh_fixperms: I have no package to build
dh_installdeb
dh_installdeb: I have no package to build
dh_gencontrol
dh_gencontrol: I have no package to build
dh_md5sums
dh_md5sums: I have no package to build
dh_builddeb
dh_builddeb: I have no package to build
make[1]: Leaving directory `/tmp/buildd/xbmc-24925'
dpkg-genchanges  >../xbmc_24925-jaunty1_i386.changes
dpkg-genchanges: including full source code in upload
dpkg-buildpackage: full upload (original source is included)
Copying back the cached apt archive contents
-> unmounting dev/pts filesystem
-> unmounting proc filesystem
-> cleaning the build env
    -> removing directory /home/buildd/pbuilder/build/8364 and its subdirectories
Current time: Mon Nov 23 16:15:19 UTC 2009
pbuilder-time-stamp: 1258992919

Code:
(T: XBMCLive)buildd@XBMCLive:~/pbuilder/result$ ls
xbmc_24925-jaunty1.diff.gz                       xbmc-eventclients-wiiremote_24925-jaunty1_i386.deb
xbmc_24925-jaunty1.dsc                           xbmc-eventclients-xbmc-send_24925-jaunty1_i386.deb
xbmc_24925-jaunty1_i386.changes                  xbmc-live_24925-jaunty1_i386.deb
xbmc_24925-jaunty1_i386.deb                      xbmc-scripts-example_24925-jaunty1_i386.deb
xbmc_24925.orig.tar.gz                           xbmc-skin-confluence_24925-jaunty1_i386.deb
xbmc-common_24925-jaunty1_i386.deb               xbmc-skin-pm3-hd_24925-jaunty1_i386.deb
xbmc-common-dbg_24925-jaunty1_i386.deb           xbmc-standalone_24925-jaunty1_i386.deb
xbmc-eventclients-common_24925-jaunty1_i386.deb  xbmc-web-eflexweb_24925-jaunty1_i386.deb
xbmc-eventclients-dev_24925-jaunty1_i386.deb     xbmc-web-iphone-tlrobinson_24925-jaunty1_i386.deb
xbmc-eventclients-j2me_24925-jaunty1_i386.deb    xbmc-web-pm_24925-jaunty1_i386.deb
xbmc-eventclients-ps3_24925-jaunty1_i386.deb     xbmc-web-pm3_24925-jaunty1_i386.deb
(T: XBMCLive)buildd@XBMCLive:~/pbuilder/result$

I'll update my guide with more information!
wattazoum,

On a ./pbuilder-dist karmic create I get:

Code:
W: GPG error: http://ppa.launchpad.net karmic Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 26F4EF8440618B66
W: GPG error: http://ppa.launchpad.net karmic Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1DABDBB4CEC06767
[b]W: Failed to fetch http://ppa.launchpad.net/xbmc-addons/ppa/ubuntu/dists/karmic/main/binary-i386/Packages.gz  404  Not Found[/b]

E: Some index files failed to download, they have been ignored, or old ones used instead.

Seems that http://ppa.launchpad.net/xbmc-addons/ppa/ubuntu/dists/ karmic is missing.
Maybe you can have a look this? In the mean time I'll try to comment the pbuilder-dist reference to xbmc-addons
Update: I noticed that the building scripts have been changed.

Try building with instead:

Code:
ln -s /var/cache/pbuilder /home/buildd/pbuilder
sudo chown buildd:buildd /home/buildd/pbuilder -R
cd /home/buildd/trunk/tools/Linux/packaging/
chmod +x ppa-builder.sh
chmod 755 pbuilder-dist
./pbuilder-dist karmic create
./pbuilder-dist jaunty create
./pbuilder-dist hardy create
./pbuilder-dist intrepid create
./ppa-builder.sh -t SRC_BRANCH=/home/buildd/trunk -p $@
I have taken some time this weekend to try simplifying the package build process.
Can you try it ?

It's just as you noticed :

Code:
cd trunk/tools/Linux/packaging/
./ppa-builder.sh -p karmic
Code:
-p => pbuilder
karmic => builds for karmic
set PBUILDER_XBMC_BASE_DIR environment variable to the folder in which you have your pbuilder folders.
for the moment I am stabilizing these modifications, Then I will drop the old way of building.

By the way, starting from Revision 25124, you shouldn't need the chmod +x part.
wattazoum Wrote:I have taken some time this weekend to try simplifying the package build process.
Can you try it ?

It's just as you noticed :

Code:
cd trunk/tools/Linux/packaging/
./ppa-builder.sh -p karmic
Code:
-p => pbuilder
karmic => builds for karmic
set PBUILDER_XBMC_BASE_DIR environment variable to the folder in which you have your pbuilder folders.
for the moment I am stabilizing these modifications, Then I will drop the old way of building.

By the way, starting from Revision 25124, you shouldn't need the chmod +x part.

Superb!! I only have one problem. My /tmp left me out of space. Therefor I changed the tmp and pbuilder dir with symbolic links:

Code:
mkdir /home/buildd/tmp
sudo ln -s /home/buildd/tmp /tmp/buildd

mkdir /home/buildd/pbuilder
sudo mv /var/cache/pbuilder/*/home/buildd/pbuilder
sudo rm -rf /var/cache/pbuilder
sudo ln -s /home/buildd/pbuilder /var/cache/pbuilder

Maybe you also need to set the rights on these directories so the buildd user is at least able to write. Once I'm able to rebuild I'll update the guide.
I have the following error when building jaunty packages:

E: Failed to fetch http://ppa.launchpad.net/team-xbmc/ppa/u...3_all.deb: 404 Not Found
E: Unable to correct for unavailable packages

Any idea?
yes, do the following:

Code:
./pbuilder-dist jaunty update --override-config

The packages were deleted from the repository but are still in your pbuilder indexes.
top thread! thanks for the info, was able to build successfully! Now I can build and package confident that it's likely to work when i move the builds over to my htpc!

thanks again!
wattazoum,

I have the following errors;

Code:
dpkg-source: warning: ignoring deletion of file xbmc-9.11+svn29023/tools/Mach5/bit-struct/char-field.rb
dpkg-source: warning: ignoring deletion of file xbmc-9.11+svn29023/tools/Mach5/bit-struct/text-field.rb
dpkg-source: unrepresentable changes to source
dpkg-buildpackage: error: dpkg-source -b xbmc-9.11+svn29023 gave error exit status 1
debuild: fatal error at line 1334:
dpkg-buildpackage -rfakeroot -d -us -uc -S -sa failed
'pbuilder' is set. Trying into pbuilder
E: Command line parameter [xbmc_9.11+svn29023-karmic1.dsc] is not a valid .dsc file name

Do you have any idea?
Pages: 1 2