Please do NOT reply to this thread. Use the discussion thread for comments. This thread is being managed as a tutorial. Thank you. ~Eric
The topic reveals a little.I know some users in here love to dig under the hood in their Linux OS. So this is exactly what we will look into little deeper in Foresight Linux and Conary.Lets look how we create a package from scratch (even with creating accounts).If you didnt use development iso to install FL, you might need to install devel packages. Just install this group and you are on the way:sudo conary update group-gnome-dist-devel1: create an account at: Rbuilder online (rpath) + seems to hard to reach at the moment. (poked the rpath guys about it)create a own repo, with an easy label.Guide to setup a personal repo here: https://github.com/z...onal-repository (more info in there about create the rpath account and info, + more)2: Create ~.conaryrc and ~.rmakerc filesconaryrc: first 3 lines is personal info, 3 line is the nick and pass from Rbuilder online.Line 8 is the name we will use as a context. So conary knows what label we want to use. Easy to specify multiple labels to create packages for.Line 9 is the repo name i created in section 1 with the label @fl:2.Line 10 is the repo I want to use for the packages i creating for. Like those repo have buildreqs for anything i build online.rmakercline 4,5,6 is the info we adds manually.line 4: is context, that points out what repo we want to use.line 5: make sure troves get resolvedline 6: what buildlabel i plan to use. Same repo name we created in rbuilder online.these 2 aren't needed if I plan to build a local package only. This is only needed for creating a package for you to easily use on several computers and share with other FL users.Also can be private repo, that you can specify that only users you want to get access, get access to it. (can be good for stuff that you own and so on)So far: created an account and created a repo. Created .conaryrc and .rmakerc files.now its time to create a folder in computer where we should work in. Open up Terminal and write:
mkdir -p ~/conary/personal
cd conary/personalTime to point out the context:
cvc context gamewayThe context name can be anything, just make sure it's the same context name in rmakerc and conaryrc file and the context we just pointed out in "personal" folder.all done. Time to create the package from scratch:We still are in "personal" folder and write:
cvc newpkg --template=binary spotifycvc newpkg = telling conary to create a new package.--template=binary = use a template recipe called binaryspotify = the name of the package we want to create.That will create a folder in personal folder called spotify, will have 2 files: CONARY and spotify.recipeWe are interested in spotify.recipelets open it with gedit or something similar.as i know where spotify packages are located, i specify package location, and change dir to / instead. As rpm and deb files should go into that directory to go in to right places in Foresight. (and yes, conary can do packages from rpm and deb too)And we add a version number, then save the file.Back to terminal:
cd spotifyTime to cook the recipe.
cvc cook spotify.recipe-This happens-After the cook are done, we need to add the buildreqs, they are written for you already from cvc cook..warning: Suggested buildRequires additions: ['binutils:runtime', 'desktop-file-utils:runtime']we add them in spotify.recipeNow we can test the package out:
sudo conary update spotify-0.4.8.306.ccsif we hate it, uninstall or rollback:
sudo conary erase spotifyAll done testing it.Now V.T. Eric Layton want to try it.Well im a nice dude and share my unique package with him then
cvc ci -m "spotify client"ci = commit-m = message and the message of the source gets written afterwards.you see something similar:The following commits will be performed: spotify:source=/gameway.rpath.org@fl:2/1.1-1continue with commit? [Y/n] push enter.Now the recipe and source file are online on rbuilder.time to make a online package.Doesn't mather where you are in terminal and write:
rmake build --context gameway spotify{{x86,x86_64}}rmake build = build onlione--context gameway = says to look for gameway in rmakerc file and build against that repo.spotify{{x86,x86_64}} = package spotify and 32bit and 64bit. (as i got 64bit computer with fl 64bit, can build both)now you see this:Added Job 821 spotify:source=gameway.rpath.org@fl:2/1.1-1[14:32:23] Watching job 821 [14:32:25] [821] Downloading 1 recipes...[14:32:26] [821] Loading 1 out of 2: spotify:source[14:32:29] [821] Downloading 1 recipes...[14:32:29] [821] Loading 2 out of 2: spotify:source[14:32:30] [821] - State: Loaded [14:32:31] [821] - job troves set [14:32:31] [821] - State: Building [14:32:31] [821] - Building troves [14:32:32] [821] - spotify:source{x86} - State: Queued[14:32:32] [821] - spotify:source{x86_64} - State: Queued[14:32:32] [821] - spotify:source{x86} - State: Resolving[14:32:32] [821] - spotify:source{x86_64} - State: Resolving[14:32:58] [821] - spotify:source{x86} - State: Queued[14:32:59] [821] - spotify:source{x86_64} - State: Queued[14:32:59] [821] - spotify:source{x86} - State: Creating Chroot[14:32:59] [821] - spotify:source{x86_64} - State: Creating Chroot[14:33:40] [821] - spotify:source{x86_64} - State: Building [14:33:41] [821] - spotify:source{x86} - State: Building [14:34:05] [821] - spotify:source{x86_64} - State: Built [14:34:07] [821] - spotify:source{x86} - State: Built[14:34:07] [821] - State: Built [14:34:07] [821] - build job finished successfullypush Q to be able to write in terminal again.now time to send the built online files to my repo:rmake ci 821you see something like:
[tforsman@fdev ~]$ rmake ci 821Creating database transaction (10 of 10) Committed job 821: spotify:source=/gameway.rpath.org@fl:2/1.1-1[is: x86(~cmov,~i486,~i586,~i686,~mmx,~nx,~sse,~sse2)]{x86} -> spotify=/gameway.rpath.org@fl:2/1.1-1-1[is: x86] spotify:source=/gameway.rpath.org@fl:2/1.1-1[is: x86_64(~3dnow,~3dnowext,~nx)]{x86_64} -> spotify=/gameway.rpath.org@fl:2/1.1-1-1[is: x86_64]to get V.T. Eric Layton to install it in his computer:sudo conary update spotify=gameway.rpath.org@fl:2to get him to update to later version later on: sudo conary updateall (as it will be auto updated with the rest of computer)to uninstall it: sudo conary erase spotifyTook longer to write this than i thought :)Hope its readable :hysterical:Edit 01: added info about install group-gnome-dist-develEdit 02: Added link: https://github.com/z...onal-repository
Edited by tforsman, 17 December 2010 - 11:26 AM.








