Building chromium, how to pack it into rpm?

I recently downloaded at last chromium svn (bloody 2.5GB of data), i can succesfully build it for both architectures, how can i pack it into an rpm file?

I build it with make -r -j4 chrome BUILDTYPE=Release, the output goes to a folder out/Release/ , in that folder i’d like to omit the obj/ folder (lots of files, size of hundreds of MiB). How can i make an rpm from that?

I’d like to publish it for people to test out the chromium build but i don’t know at all how to build bloody rpm or spec file. Any help would be appreciated please.

Hi
So I’ve downloaded the tarball (840MB) and am just syncing it as per
this <http://dev.chromium.org/developers/how-tos/get-the-code> in a
11.1 64bit vmware machine. Once I get the code down, will look at rest
of the building process to identify your buildrequires etc :slight_smile:


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.29-0.1-default
up 3 days 9:20, 2 users, load average: 0.31, 0.67, 0.48
GPU GeForce 8600 GTS Silent - Driver Version: 190.18

Thanks for help, on the other hand i am trying to build an rpm with checkinstall :slight_smile: I wonder what will be the outcome of that experiment :slight_smile:

Hi
No worries, it should also be noted that there will be a need to
package up the depot tools as an rpm as well :wink:


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.29-0.1-default
up 3 days 10:15, 2 users, load average: 0.36, 0.88, 0.93
GPU GeForce 8600 GTS Silent - Driver Version: 190.18

Hmm, i managed to create nice package with checkinstall :slight_smile:

I found out how to nicely make an rpm from a folder or anything.

checkinstall --exclude=/ --inspect make (issue it anywhere where you have to use the make command), after that it will take You to vi where you can specify of what and where include in that rpm lol!)

Hi
Good going, so what does the spec file look like?


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.29-0.1-default
up 3 days 10:56, 2 users, load average: 4.91, 4.25, 2.83
GPU GeForce 8600 GTS Silent - Driver Version: 190.18

It didn’t create any spec files i guess.

If it will ease it up i could create an rpm file for those depot tools if you want. Where would you like them to be installed on the system?

I know it’s a bit against “normal” builds but i guess it will be faster than to write extensive spec files for those depot tools. I could create an rpm file for source too, just tell me where should they be installed after rpm -i on OBS.

Hi
Just a query on the libX11, did you install the 32bit libraries as per
<http://code.google.com/p/chromium/wiki/LinuxBuild64Bit>?
It barfed on the building at xdisplay checks, so added the --keep-going
option to skip over the error.


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.29-0.1-default
up 3 days 12:01, 2 users, load average: 1.72, 0.84, 0.85
GPU GeForce 8600 GTS Silent - Driver Version: 190.18

I didn’t install 32 bit libraries yet as i didn’t build 32 bit packages but yes, i installed what has been proposed. I will start building both packages if that helps :wink:

Looks like you’ll have to build 32 bit packages as it barfs a lot in here :wink: I installed every possible 32 bit devel package and it still barfs :slight_smile:

I’ve been using check install for a while, … and never noted that set of arguments before. Neat. I’ll have to try it.

A caution on the rpms built by checkinstall. Overall, they are not as good as rpms created the long way (which I do not know how to do) and you could read of people struggling with the checkinstall created rpm. Checkinstall tends to be best with rpms on one’s own PC.

I use checkinstall, so I can copy it to other PC’s on my LAN (where I keep the same configuration across all PCs) and if I have to do a re-install (rarely happens) than I do not have to rebuild … I just pull out the rpm I created for myself.

Well the thing is oldcpu, that while i built succesfully the browser i had no makefile to “make install”, so i was left with already built files which i can use and other people. So what i did is i put those built files where i’d like them to be after normal rpm installation, created the desktop file, symlink to exececutable. So while building may fail at all i can always add custom files/directories for it to be included in the rpm file (thanks to --inspect). So while normally the output of building chromium was in /home/<user>/Programs/chromium/src/out/Release/ i just copied it to /opt/google/chrome/ and then with --inspect i added it to the files that will be included in the rpm and --exclude=/ excludes every file from being included into rpm BUT i will include the directories myself won’t i :)??

So in practice i can make an rpm out of any file/directory, i just need one package that contains a Makefile to be able to invoke make because without that i can’t create rpm from the file/directory :slight_smile:

Hi Again
Ok I finally have it build by hand, there is a lot of prep work to do
including install of the 32bit versions of some rpms and creating
softlinks to the libraries as per their script. Having to do that and
the softlinks for the fonts pretty well excludes it from using the OBS
at the moment as far as I can see :frowning:

That being said, I’m goinf to build a new 64bit 11.1 machine and run a
further test to see if I’ve missed anything and document the build
environment I used. Then it’s just a matter of updating the source,
bzipping it, dumping in /usr/src/packages/SOURCES along with a spec
file and it should be good to go…


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.29-0.1-default
up 4 days 4:05, 2 users, load average: 0.17, 0.17, 0.24
GPU GeForce 8600 GTS Silent - Driver Version: 190.18

Yeah, it’s better to pack it even more :slight_smile: Sources alone will take 100MB and after unpacking 860 :)??

Hi
Ok, have built the 64bit version added a link to flashplayer in
plugins, linked to all the fonts added a desktop file yadda yadda :wink:

I had to build on the SLED machine as I need more RAM to allocate RAM
for the VM…

Anyway, here are links to src rpm and my 64bit build;
<http://www.fileden.com/files/2009/4/6/2393623/RPMs/openSUSE_11_1/google-chrome-unstable-4.0.203-svn20090824.1.src.rpm>
<http://www.fileden.com/files/2009/4/6/2393623/RPMs/openSUSE_11_1/google-chrome-unstable-4.0.203-svn20090824.1.x86_64.rpm>

Here is a link to the spec file to build;
<http://www.nopaste.com/p/adPVzEAmu>

You just need to rename the Release directory, add the Author and
License file directory before bzipping it up.

Since it’s only the build file and other bits and not the true source
(2+ GB) I think you should write a short text file on how you built it
on your machine and the add to the Release directory before bzipping,
then update the %doc part of the %files section with the name so it
gets added to your rpm.

The whole build process could also be automated via a cron job to
update the source, build a new release, copy files, bzip and build the
rpm as well which may be worth looking at :slight_smile:

Note technically, I think someone could ask you for your build
environment source as well, but that is unlikely…


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.29-0.1-default
up 5 days 8:33, 3 users, load average: 0.96, 0.79, 0.40
GPU GeForce 8600 GTS Silent - Driver Version: 190.18

That’s great malcolm, thanks!! Unfortunatelly i will be off to germany for about two weeks so i won’t be able to do anything with that, THANK YOU ONCE AGAIN!!

Hi
Here are the depot tools packaged up for you as well;
<http://www.fileden.com/files/2009/4/6/2393623/RPMs/openSUSE_11_1/depot_tools-1.0-1.1.src.rpm>
<http://www.fileden.com/files/2009/4/6/2393623/RPMs/openSUSE_11_1/depot_tools-1.0-1.1.noarch.rpm>

I have also updated the source and build for chrome. Fixed it so the
flash works (forgot to enable plugins) and added the 64bit flash;
<http://www.fileden.com/files/2009/4/6/2393623/RPMs/openSUSE_11_1/google-chrome-unstable-4.0.203-svn20090826.1.src.rpm>
<http://www.fileden.com/files/2009/4/6/2393623/RPMs/openSUSE_11_1/google-chrome-unstable-4.0.203-svn20090826.1.x86_64.rpm>

Updated spec file;
<http://www.nopaste.com/p/amYNpgJCob>

Here is a script to automate the zipping etc for the file as well
direct from the …/src directory which is where you need to be :wink:


#!/bin/bash
NAME=google-chrome-unstable
VERSION=4.0.203
RELEASE=$NAME-$VERSION
cd out
echo "Deleting obj build directory..."
/bin/rm -Rf Release/obj/
echo "Finding and deleting .d files..."
/usr/bin/find -iname '*.d' -print -exec /bin/rm {} \;
/bin/mv Release $RELEASE
/bin/cp ../AUTHORS $RELEASE/
/bin/cp ../LICENSE $RELEASE/
echo "Bzipping file..."
/bin/tar -cf $RELEASE.tar $RELEASE
echo "Stage 1 completed"
/usr/bin/gzip $RELEASE.tar
echo "Stage 2 completed"
/usr/bin/bznew $RELEASE.tar.gz
echo "Stage 3 completed"
/bin/mv $RELEASE.tar.bz2 /usr/src/packages/SOURCES/
/bin/mv $RELEASE Release
cd ..
echo "*** Finished and moved to SOURCES ***"

Note to others, this 11.1 rpm also works with SLE11 :slight_smile:


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.29-0.1-default
up 6 days 2:37, 4 users, load average: 0.21, 0.20, 0.12
GPU GeForce 8600 GTS Silent - Driver Version: 190.18

Hi
Now also noticed that I can add the gecko-mediaplayer libs so that you
can play mp4, quicktime etc hmmm needs to do some testing…


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.29-0.1-default
up 6 days 5:18, 3 users, load average: 0.29, 0.61, 0.75
GPU GeForce 8600 GTS Silent - Driver Version: 190.18

Hi
I have updated the source (yet again) build for chrome this morning
and also have enable extensions now in the startup.
<http://www.fileden.com/files/2009/4/6/2393623/RPMs/openSUSE_11_1/google-chrome-unstable-4.0.203-svn20090827.1.src.rpm>
<http://www.fileden.com/files/2009/4/6/2393623/RPMs/openSUSE_11_1/google-chrome-unstable-4.0.203-svn20090827.1.x86_64.rpm>

Updated spec file;
<http://www.nopaste.com/p/a8FxhQjLG>

On this system I’ve installed adsweep and sticky notes extensions.
Hopefully someone has Mplayer (gnome-mplayer) installed and see how the
gecko-mediaplayer goes.

To see installed extensions in the URL bar enter;
chrome://extensions

For plugins it’s like Firefox about:plugins


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.29-0.1-default
up 6 days 21:03, 2 users, load average: 0.38, 0.54, 0.47
GPU GeForce 8600 GTS Silent - Driver Version: 190.18