[arch-general] trinity pkgbuild: rewrite to dl svn - Use fixed svn rev or latest?
Guys, I'm rewriting a set trinity pkgbuilds to download the trinity/<module> code in the pkgbuild instead of using the existing source in the local copy of the complete trinity svn tree. This will also allow the packages to be built in an archroot and get around the empty src problem I was having with makechrootpkg using the code in the existing tree. My PKGBUILD question is can I use the latest svn revision to build from, or do I need to use a fixed svn revision for $pkgver? The examples I've looked at do something like: pkgver=123456 <snip> build() { cd $srcdir msg "Connecting to $_svntrunk SVN server...." if [ -d $_svnmod/.svn ]; then (cd $_svnmod && svn up -r $pkgver) else svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod fi <snip> I want to vary this to use the latest revision instead of a fixed revision: pkgver=123456 <snip> build() { cd ${srcdir} msg "Connecting to SVN server...." if [ -d ${_svn_module}/.svn ]; then (cd ${_svn_module} && svn up) [[ $? -eq 0 ]] || _co_failed=1 else (svn co $_svn_trunk ${_svn_module}) [[ $? -eq 0 ]] || _co_failed=1 fi cd ${_svn_module} pkgver=$(getsvnrev) <snip> Is this OK, or should I avoid using the latest version to prevent potential inconsistencies? Also, if you see anything else that will bite me, let me know. Thanks. -- David C. Rankin, J.D.,P.E.
On 8 February 2011 15:57, David C. Rankin <drankinatty@suddenlinkmail.com> wrote:
Guys,
I'm rewriting a set trinity pkgbuilds to download the trinity/<module> code in the pkgbuild instead of using the existing source in the local copy of the complete trinity svn tree. This will also allow the packages to be built in an archroot and get around the empty src problem I was having with makechrootpkg using the code in the existing tree.
My PKGBUILD question is can I use the latest svn revision to build from, or do I need to use a fixed svn revision for $pkgver?
The examples I've looked at do something like:
pkgver=123456 <snip> build() { cd $srcdir
msg "Connecting to $_svntrunk SVN server...." if [ -d $_svnmod/.svn ]; then (cd $_svnmod && svn up -r $pkgver) else svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod fi <snip>
I want to vary this to use the latest revision instead of a fixed revision:
pkgver=123456 <snip> build() {
cd ${srcdir}
msg "Connecting to SVN server...." if [ -d ${_svn_module}/.svn ]; then (cd ${_svn_module} && svn up) [[ $? -eq 0 ]] || _co_failed=1 else (svn co $_svn_trunk ${_svn_module}) [[ $? -eq 0 ]] || _co_failed=1 fi
cd ${_svn_module} pkgver=$(getsvnrev) <snip>
Is this OK, or should I avoid using the latest version to prevent potential inconsistencies? Also, if you see anything else that will bite me, let me know. Thanks.
-- David C. Rankin, J.D.,P.E.
makepkg automatically updates the pkgver to the latest svn revision when you build an svn package, unless you pass --holdver. -- Tavian Barnes
On 02/08/2011 04:19 PM, Tavian Barnes wrote:
makepkg automatically updates the pkgver to the latest svn revision when you build an svn package, unless you pass --holdver.
Does this also work when building from makechrootpkg? -- David C. Rankin, J.D., P.E.
On 8 February 2011 18:54, David C. Rankin <drankinatty@suddenlinkmail.com> wrote:
On 02/08/2011 04:19 PM, Tavian Barnes wrote:
makepkg automatically updates the pkgver to the latest svn revision when you build an svn package, unless you pass --holdver.
Does this also work when building from makechrootpkg?
As far as I know, the only options makechrootpkg passes to makepkg are "-s --noconfirm". -- Tavian Barnes
On 10/02/11 11:43, Tavian Barnes wrote:
On 8 February 2011 18:54, David C. Rankin <drankinatty@suddenlinkmail.com> wrote:
On 02/08/2011 04:19 PM, Tavian Barnes wrote:
makepkg automatically updates the pkgver to the latest svn revision when you build an svn package, unless you pass --holdver.
Does this also work when building from makechrootpkg?
As far as I know, the only options makechrootpkg passes to makepkg are "-s --noconfirm".
You can add mre options after "--". e.g. I often run: makechrootpkg -c -r /path/to/chroot -- -L -i
On 02/09/2011 07:51 PM, Allan McRae wrote:
Does this also work when building from makechrootpkg?
As far as I know, the only options makechrootpkg passes to makepkg are "-s --noconfirm".
You can add mre options after "--".
e.g. I often run:
makechrootpkg -c -r /path/to/chroot -- -L -i
The reason I asked was because the 2 svn PKGBUILDs I've created do not get $pkgver updated to the latest svn when building with makechrootpkg. Specifically, I do the following in the PKGBUILD: getsvnrev() { msg "Determining SVN revision for $pkgname..." [[ -d .svn ]] && echo $(sed -n '4p' .svn/entries) || echo 9999 } pkgbase=trinity pkgname=trinity-tqtinterface pkgver=9999 # just a temp number here _svn_trunk="svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/tqtinterface" _svn_module=tqtinterface build() { cd ${srcdir} msg "Connecting to SVN server...." if [ -d ${_svn_module}/.svn ]; then (cd ${_svn_module} && svn up) [[ $? -eq 0 ]] || _co_failed=1 else (svn co $_svn_trunk ${_svn_module}) [[ $? -eq 0 ]] || _co_failed=1 fi cd ${_svn_module} pkgver=$(getsvnrev) and the pkgver variable never gets updated when used with makechrootpkg. It is updated just fine when run with a simple makepkg call. So I can't figure out whey the makechrootpkg call makes the difference? Full PKGBUILD: http://www.3111skyline.com/dl/dt/trinity/arch/svn/dependencies/tqtinterface/... One other issue with putting the svn co in the build() function is you loose the ability to use -o makpkg option to only download and extract. Is there a way around this building with makechrootpkg? So for the build in arch in VirtualBox has been much more straight forward that an archroot build. But the convenience of an archroot can't be beat. -- David C. Rankin, J.D.,P.E.
participants (3)
-
Allan McRae
-
David C. Rankin
-
Tavian Barnes