Forums

problem upgrading arch linux (AUR) package to 0.9.6

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

problem upgrading arch linux (AUR) package to 0.9.6

Postby pauld » Tue Dec 24, 2013 9:36 pm

Well, the old packager have orphan the Arch Linux AUR package for cobra, and I have tried to update it from 0.9.4 to 0.9.6.
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?
pauld
 
Posts: 2

Re: problem upgrading arch linux (AUR) package to 0.9.6

Postby nerdzero » Wed Dec 25, 2013 1:29 am

For 0.9.6, I modified the installer to create a "Cobra" subdirectory wherever the msbuild/xbuild MSBuildExtensionsPath variable points to. The "Cobra.targets" and "Cobra.MSBuild.dll" files are then moved there.

This line during the installation process:
Code: Select all
run: xbuild /property:Configuration="";Platform="" /target:DisplayMSBuildExtensionsPath ./Cobra.MSBuild/Targets/Cobra.targets

asks xbuild (or msbuild on .NET) what the MSBuildExtensionsPath is. For Mono on Linux, this will usually return "/usr/lib/mono/xbuild".

I don't know much about packaging for Arch. Does that help?
nerdzero
 
Posts: 286
Location: Chicago, IL

Re: problem upgrading arch linux (AUR) package to 0.9.6

Postby pauld » Wed Dec 25, 2013 6:17 am

Thanks, that did help.
Both the old maintainer and myself were able to build 0.9.6 with your explanation.
Mine is only to modify the build xml file with:
sed -i "s|\$(MSBuildExtensionsPath)|$pkgdir/usr/lib/mono/xbuild|" Cobra.MSBuild/Targets/Cobra.targets

His solution is a perl replacement in many, all? files, I am not too sure, I don't understand it much.
Still discussing it on AUR Arch Linux cobra package's page.
pauld
 
Posts: 2

Re: problem upgrading arch linux (AUR) package to 0.9.6

Postby Charles » Wed Dec 25, 2013 10:16 am

Charles
 
Posts: 2515
Location: Los Angeles, CA


Return to Discussion

Who is online

Users browsing this forum: No registered users and 31 guests