That is my first package I adopted, and was expecting a simple upgrade, and made it in a cow-boy way: updating the package before testing that it works.
We do it in a special way, basically we use InstallFromWorkspace.cobra, but as it is executed under fakeroot, we specify:
echo "$pkgdir"/opt/cobra > install-directory.text
where $pkgdir is a local directory where we build the package.
We do patch the InstallFromWorkspace.cobra, to avoid some tests that won't work because we don't really run under root.
Now here is the code I get while trying to make the new package:
- Code: Select all
[paul@brebis cobra]$ makepkg
==> Making package: cobra 2:0.9.6-2 (Tue Dec 24 23:12:34 EST 2013)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Downloading Cobra-0.9.6.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4508k 100 4508k 0 0 587k 0 0:00:07 0:00:07 --:--:-- 623k
-> Found install.patch
==> Validating source files with sha512sums...
Cobra-0.9.6.tar.gz ... Passed
install.patch ... Passed
==> Extracting sources...
-> Extracting Cobra-0.9.6.tar.gz with bsdtar
==> Starting prepare()...
patching file Source/InstallFromWorkspace.cobra
==> Entering fakeroot environment...
==> Starting package()...
Compiling installation program...
The Cobra Programming Language
Install From Workspace
Working...
==== Print Platform Description
Platform: Arch Linux 3.12.5-1-ARCH (pacman 4.1.2)
Uname: Linux brebis 3.12.5-1-ARCH #1 SMP PREEMPT Thu Dec 12 13:32:40 CET 2013 i686 GNU/Linux
Virtual Machine: Mono
CLR Version: v4.0.30319
Env Command Line: /home/paul/test2/cobra/src/Cobra-0.9.6/Source/InstallFromWorkspace.exe
Env Current Dir: /home/paul/test2/cobra/src/Cobra-0.9.6/Source
Env OS Version: Unix 3.12.5.1
Env System Dir:
Env Version: 4.0.30319.17020
Mono: Mono JIT compiler version 3.2.3 (tarball Sun Sep 22 20:59:58 UTC 2013) ; Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com ; TLS: __thread ; SIGSEGV: altstack ; Notifications: epoll ; Architecture: x86 ; Disabled: none ; Misc: softdebug ; LLVM: supported, not enabled. ; GC: sgen
==== Verify running as admin user
==== Verify installation directory
make dir : /home/paul/test2/cobra/pkg/cobra/opt/cobra
==== Verify running in workspace
Verified.
==== Verify Novell Mono version
Mono Version 3.2.3 (tarball Sun Sep 22 20:59:58 UTC 2013)
Verified >= 2.10
==== Locate and test Cobra Snapshot compiler
run: Snapshot/cobra.exe -about
: The Cobra Programming Language svn:3030 (post 0.9.4) / 2013-08-16
: on Mono 3.2.3 CLR v4.0.30319 on Arch Linux 3.12.5-1-ARCH (pacman 4.1.2)
: at /home/paul/test2/cobra/src/Cobra-0.9.6/Source/Snapshot/cobra.exe
:
: Copyright (C) 2003-2013 by Cobra Language LLC. All Rights Reserved.
:
: On the web: http://cobra-language.com/
: Source: http://cobra-language.com/source
: Support: http://cobra-language.com/support
: License: http://www.opensource.org/licenses/mit-license.php
:
: Usage: cobra -h
==== Build new Cobra compiler
run: Snapshot/cobra.exe -compile -turbo -ert:yes cobra.cobra -files:files-to-compile.text
: Compiler.cobra(392): warning: "System.CodeDom.Compiler.CompilerResults.Evidence" is obsolete
: Compilation succeeded - 1 warning
==== Retrieve Cobra base version number
run: cobra.exe -version
: Cobra 0.9.6 on Mono 3.2.3 CLR v4.0.30319 on Arch Linux 3.12.5-1-ARCH (pacman 4.1.2)
base version: 0.9.6
==== Locate gacutil.exe
found in system PATH
Found: gacutil
==== Locate xbuild
found in system PATH
Found: xbuild
==== Build Cobra.Core library
run: cobra.exe -build-standard-library -debug -turbo -out:Cobra.Core.dll -key-file:Cobra.Core/Cobra.Core.snk Cobra.Core/AssemblyAttrs.cobra
: Compilation succeeded
==== Build Cobra.Compiler library
run: cobra.exe -c -t:lib -embed-version -ert:yes -namespace:Cobra.Compiler -files:files-to-compile.text -debug -turbo -out:Cobra.Compiler.dll -key-file:Cobra.Core/Cobra.Core.snk cobra.cobra
: Compiler.cobra(392): warning: "System.CodeDom.Compiler.CompilerResults.Evidence" is obsolete
: Compilation succeeded - 1 warning
==== Build Cobra.MSBuild library
run: cobra.exe -c -t:lib -embed-version -debug -turbo -out:Cobra.MSBuild.dll -key-file:Cobra.Core/Cobra.Core.snk Cobra.MSBuild/CobraCompiler.cobra
: Compilation succeeded
==== Verify newly built Cobra compiler
run: cobra.exe -about
: The Cobra Programming Language 0.9.6
: on Mono 3.2.3 CLR v4.0.30319 on Arch Linux 3.12.5-1-ARCH (pacman 4.1.2)
: at /home/paul/test2/cobra/src/Cobra-0.9.6/Source/cobra.exe
:
: Copyright (C) 2003-2013 by Cobra Language LLC. All Rights Reserved.
:
: On the web: http://cobra-language.com/
: Source: http://cobra-language.com/source
: Support: http://cobra-language.com/support
: License: http://www.opensource.org/licenses/mit-license.php
:
: Usage: cobra -h
run: cobra.exe -ert:no hello.cobra
: Hello, world.
run: cobra.exe hello.cobra
: Hello, world.
run: cobra.exe -ert:yes hello.cobra
: Hello, world.
==== Copy files to install directory
found dir: /home/paul/test2/cobra/pkg/cobra/opt/cobra
make dir : /home/paul/test2/cobra/pkg/cobra/opt/cobra/Cobra-0.9.6
copy from: /home/paul/test2/cobra/src/Cobra-0.9.6/HowTo
to: /home/paul/test2/cobra/pkg/cobra/opt/cobra/Cobra-0.9.6/HowTo
copy from: /home/paul/test2/cobra/src/Cobra-0.9.6/Reusables
to: /home/paul/test2/cobra/pkg/cobra/opt/cobra/Cobra-0.9.6/Reusables
copy from: /home/paul/test2/cobra/src/Cobra-0.9.6/Samples
to: /home/paul/test2/cobra/pkg/cobra/opt/cobra/Cobra-0.9.6/Samples
copy from: /home/paul/test2/cobra/src/Cobra-0.9.6/Supplements
to: /home/paul/test2/cobra/pkg/cobra/opt/cobra/Cobra-0.9.6/Supplements
make dir : /home/paul/test2/cobra/pkg/cobra/opt/cobra/Cobra-0.9.6/bin
copy bin: /home/paul/test2/cobra/pkg/cobra/opt/cobra/Cobra-0.9.6/bin
copy from: WebAssets
to: /home/paul/test2/cobra/pkg/cobra/opt/cobra/Cobra-0.9.6/bin/WebAssets
copy from: Cobra.Core
to: /home/paul/test2/cobra/pkg/cobra/opt/cobra/Cobra-0.9.6/bin/Cobra.Core
run: xbuild /property:Configuration="";Platform="" /target:DisplayMSBuildExtensionsPath ./Cobra.MSBuild/Targets/Cobra.targets
make dir : /usr/lib/mono/xbuild/Cobra
** ERROR: Unable to create installation directory.
Access to the path "/usr/lib/mono/xbuild/Cobra" is denied.
Run as admin, or put a correct install path into a file called "install-directory.text".
Need help with the above error?
* Make sure you ran with sudo or as root.
* Mono 2.10.x or higher are recommended.
* Review http://cobra-language.com/troubleshooting
* Ask at http://cobra-language.com/discuss
* Ask at http://cobra-language.com/irc
sed: can't read opt/cobra/bin/cobra: No such file or directory
==> ERROR: A failure occurred in package().
Aborting...
[paul@brebis cobra]$
Do we need a new install-directory.text specifically for xbuild? if so in which directory?