Wednesday, April 13, 2011

HOWTO: Patch & Rebuild a Package asterisk now


HOWTO: Patch & Rebuild a Package

Postby Jerico James Flores Milo
Getting AsteriskNOW to do exactly what you need seems a little tricky at first for developers not familiar with conary. 


How do I recompile <somepackage>??
Where's the source code??
 



AsteriskNOW comes with all the development packages you need in order to get started, like gcc, libstdc++, etc.. 
But where's the source code? 


Short answer, there is none. 


This is because using rPath's technology, developers only need a set of instructions for the computer to follow in 
order to obtain the right results (binaries in this case). 


This is where recipes come in. Recipes tell conary where to get source code, what patches to add, and where to
 put it when its all done. Additionally, it can also specify libraries that it provides or requires in order to be built 
(this is a dream come true for packagers). I'm sure all the RedHat/Debian users all say 'but [RedHat,Debian] can do that' 


Well for anyone thats ever hosed a system by doing an 'apt-get upgrade' or something similar with redhat/yum you
 discover there are inherent problems with those package managers. Mainly due to their 'dumb' behavior, as in pull 
the latest package for that version of distribution. Well those binaries store limited amounts of history of buildtime 
dependencies (normally something libsomething.so.4) and can create problems when something like an api change 
made it into a non-major release of a library. 


This is where Conary is different. In each package, conary stores build & runtime dependency versions; down 
to what version of code, what version of recipe, and what build iteration. Granted it's still linux, but now
 with the ability to drill down to exactly where/when that package and its contents came from, as well as 
where to go for information on its dependencies. 


Now, after all thats out of the way, down to the nitty-gritty...

Making Conary changesets is a little different than making RPMS or debs (although if it makes you feel
 any better, some of the original developers of RPM created Conary) 


In this example will do a more complicated example which demonstrates the more advanced features 
of conary, just for good measure :wink: 


Say I want to add a patch to zaptel, (this requires building against kernel headers,
 hence more involved :o ) 


1. First, you'll need to checkout the recipe 


CODE: SELECT ALL
cd /home/admin/src
cvc co zaptel
cd zaptel




2. Now, place your patch in the dir, edit the recipe and add a line for your patch somewhere
 after the r.addArchive, but before the r.Configure 


CODE: SELECT ALL
r.addPatch('mypatchfile.diff')


NOTE: the patch will need to be generated from the top-level dir of the 
zaptel source (this is normally the case though)




3. Now we'll need to cook the recipe, you may need to specify a different kver 
and leave off the '[zaptel.smp]' if its non-smp


CODE: SELECT ALL
cvc cook --macro 'kver 2.6.17.11-1.1.smp.x86.cmov' zaptel.recipe[zaptel.smp]


This is where the 'complication' comes in. Normally you wouldnt need to supply 
all of these options, but since we need to build against a kernel we have to tell it exactly 
which one, otherwise CRASHBOOMBANG




4a. Now it might barf due to unmet dependencies which you can install with conary


CODE: SELECT ALL
sudo conary update <package>:<component> --resolve


4b. You may need to get the kernel headers too


CODE: SELECT ALL
conary update kernel:build-tree --sync-to-parents


If it builds successfully you'll end up with a <package>-<version>.ccs file, which will 
be in the directory from where you executed the 'cvc cook ..'




5. Finally. install the .ccs file via conary 


CODE: SELECT ALL
sudo conary update zaptel-1.4.0.ccs




Hope this answers most of your questions and best of luck! 8)

sabi ko lang.

umpisahan natin sa simpleng tanong na kamusta na kaya ako... well, as of now, I'm all okay.. nothing fancy.. just bouncin around... livin my life like a SHIT SANDWHICH... hhahaha and shit happens, man... hahaha but honestly I'm all okay, been moved and done shit like a dongz... been playing poker in Makati but im not that addict, just curious of what the hell poker is.. yeah.. what the hell, coz you got to play with some big shit ass politicians and bad ass businessman and a drunk old man with a chicksilog on the side... hahahaha.. i was just like what?? simple, and they even ask who I'am.. hahahaha edi sabi ko I'm Jerico James Milo... and they were like OHHHHH OKAY!!!! hahahahaha... taena mo bansot!!! hahaha joke lang... pero honestly magaling silang mag laro.. hahaha natural ako natalo hahaha pero meron isang game na nag ALL-IN ako at nanalo ako hihihihi oh ha... first timer pero nakatalo ako ng isang politician shit sa lipunan hahahaha... syempre nung nakita kong maganda ang card ko agad ako nag ALL-IN at sinabing "MUCK YO! SHIT!" hahahahaha  nagulat sila at sinabing galit ka? i told them sorry hehehe expression lang po ser! hahahaha.. pero syempre at the end natalo ako sa kabuuang laro... and then what? tapos na sa problemang PUSO.. pero tanong ko lang hehehehe kelan kaya muling titibok ang pusong pagod hahahaha oh ha pusong pagod what the hell... nah lets just say, im scouting... pero sana yung seryoso naman Lord. yung wlang sabit at single... hahaha pero nitong mga nakaraang araw merong nagpapasaya sakin pero hindi ko alam kung ano hehehe kaya nga im confuse.. but its okay.. let's see when we cross the bridge hehehe.. hindi ko alam kung ano eh.. pero parang isang miss pakipot.. hehehe YAN!!! pakipot yan ang  isang katangian ng isang girl ang nagugustuhan ko... ika nga sa kanta ng urban flow na miss pakipot, OKay lang sakin kung iyong sasabihin na akoy mayabang o mahangin. but i k now my chance pa ako na makamit ko ang matamis mong OO hahahaha.. What's the use of beauty kung ikaw ay ganyan. Pati ang puso ko ay nahihirapan. Halos araw-araw kitang inaabangan ,Sinusulyapan at napapanaginipan. Hindi ka na maaalis sa aking isipan Para kang si Eba at ako si Adan. Everything I do, I do it for you 'Cause there's no more love than my love for you. Ang pag-ibig ko sa 'yo 'sing bango ng Polo 'Sing tamis ng Milo, 'sing sarap ng Nido
I want you to know ang pag-ibig ko sa 'yo Ang pag-ibig ko sa 'yo sagad hanggang buto... hahahahahahaha CTG kita miss pakipot,suplada at maganda.. ehehehehe wal alang yun lang hahahaha chill lang... so bounce lang.. JAH!!!!

Thursday, December 9, 2010

Meteor Shower and Total Lunar Eclipse to Wow Skywatchers This Month

Meteor Shower and Total Lunar Eclipse to Wow Skywatchers This Month

Skywatchers, grab your blankets. December's night sky spectacular will feature the best meteor shower of 2010 as well as the only total lunar eclipse of the year -- sights that should outshine any New Year's Eve fireworks display in terms of sheer wonder.
The massive Geminid meteor shower returns every year, so you'll have more chances if the cold proves too daunting on the night of Dec. 13. But anyone in North America who skips the total lunar eclipse on the night of Dec. 20 will be missing what promises to be the best lunar eclipse show until April 2014.
This year's Geminid meteor shower is expected to be the best display of so-called "shooting stars" of the year and will peak during the overnight hours of Dec. 13 and Dec. 14.
Dazzling Geminid meteor shower
Like most meteor showers, the Geminids will be at their best after midnight (early on the morning of Dec. 14), when the Earth is heading directly into the meteoroid stream. But some will be visible earlier in the night, on the evening of Dec. 13, because the meteors' radiant (where they appear to originate) is nearly circumpolar, so they will stay in view above the horizon all night.
This sky map shows where to look to see the Geminid meteor shower in the direction of the constellation Gemini. Clear dark skies, of course, promise the best viewing conditions.
Anyone venturing outside should dress much more warmly than normal to prepare for a long night vigil while sitting still.
Don't forget to get comfortable: A lawn chair with a reclining back and a blanket or sleeping bag should keep skywatchers snug — no binoculars or telescope are necessary.
Most meteor showers are caused by fragments of old comets scattered along a comet's orbit. When the Earth passes through a comet's orbit, it sweeps up the fragments, which become visible as bright streaks of light in the atmosphere.
The Geminid shower is unique in being associated not with a comet, but with an asteroid called 3200 Phaethon.
The Geminids' radiant is, as the name implies, in the direction of the constellation Gemini, just north of the northernmost of Gemini's two brightest stars, Castor and Pollux. In the early evening of Dec. 13, the radiant is low in the northeast. By 1 a.m. EST, after the date has changed to Dec. 14, the radiant is almost directly overhead. By 6.a.m. EST, when the shower is at its peak in the Eastern Time Zone, the radiant is low in the west.
Moon's holiday treat
The December holiday sky show doesn't end with the Geminid meteor shower. On the nights of Dec. 20 and Dec. 21, parts of four continents will be treated to a total eclipse of the moon — the only one to occur in 2010.
This NASA lunar eclipse chart shows the visibility of the eclipse from different regions around the world.
The last total lunar eclipse occurred on Feb. 20, 2008. While there are two total lunar eclipses in 2011, North American skywatchers will have to wait until April 2014 for one as potentially spectacular as the eclipse occurring this month. [Amazing Total Lunar Eclipse Photos]
Lunar eclipses occur when the moon passes through a point in its orbit in which the Earth is directly between it and the sun. When the moon enters the shadow of Earth, it creates a lunar eclipse. Unlike a solar eclipse, no precautions to protect the eyes are needed.
A total lunar eclipse is when the entire moon is completely inside the Earth's shadow. Since the sun's rays are bent by Earth's atmosphere so that some still reach the moon, the moon is still visible in an eclipse. 
Lunar eclipse skywatching tips
For the Western Hemisphere, the eclipse will "officially" begin on Dec. 21 at 12:29 a.m. EST (9:29 p.m. PST on Dec. 20) as the moon begins to enter Earth's outer, or penumbral, shadow. 
As for the Geminid meteor shower, don't forget to dress warm. But you won't be outside all night moongazing. This total lunar eclipse lasts only 72 minutes from start to finish.
But even in clear weather, skywatchers will not notice any changes in the moon's appearance until about 45 minutes into the event, when a slight "smudge," or shading, begins to become evident on the upper left portion of the moon's disk.  
The entire total lunar eclipse will be visible from all of North and South America, the northern and western parts of Europe, and a small part of northeast Asia, including Korea and much of Japan.
Totality will also be visible in its entirety from the North Island of New Zealand and Hawaii. In all, an estimated 1.5 billion people will have an opportunity to enjoy the best part of this lunar show. 
In other parts of the world, only the partial stages of the eclipse will be visible or the eclipse will occur when it's daytime and the moon is not above their local horizon.
Portions of western Africa and central Europe can catch the opening stages of the eclipse before the moon sets below the horizon during the morning hours of Dec. 21, while the eastern third of Asia and central and eastern Australia can catch the closing stages just after moonrise on the evening of Dec. 21. 
December's total lunar eclipse and Geminid meteor shower promise to ring the year 2010 out with a dazzling show, weather permitting, this holiday season. But bundle up and stay warm!
SPACE.com Skywatching columnist Joe Rao and Starry Night Software's Geoff Gaherty contributed to this December skywatching tips report.