Opened 15 years ago

Closed 15 years ago

#21155 closed submission (fixed)

Submission of the arb port

Reported by: matt.cottrell@… Owned by: mf2k (Frank Schima)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: arb

Description

I would like to submit this port of the ARB DNA sequence analysis program to the science category of MacPorts.

Attachments (6)

Portfile-arb.diff (3.4 KB) - added by matt.cottrell@… 15 years ago.
Portfile diff
patch-ARB-config.makefile.diff (875 bytes) - added by matt.cottrell@… 15 years ago.
Revised patch-ARB-config.makefile.diff
patch-ARB-DARWIN.pl.diff (786 bytes) - added by matt.cottrell@… 15 years ago.
Revised patch-ARB-DARWIN.PL.diff
patch-ARB-makefile.diff (1.6 KB) - added by matt.cottrell@… 15 years ago.
Revised patch-ARB-Makefile.diff
patch-ARB-RNA3D_GlobalHeader.hxx.diff (304 bytes) - added by matt.cottrell@… 15 years ago.
Revised patch-ARB-RNA3D_GlobalHeader.hxx.diff
Portfile (7.0 KB) - added by matt.cottrell@… 15 years ago.
Portfile no longer creates macro dir

Download all attachments as: .zip

Change History (35)

comment:1 Changed 15 years ago by matt.cottrell@…

Cc: matt.cottrell@… added

Cc Me!

Changed 15 years ago by matt.cottrell@…

Attachment: Portfile-arb.diff added

Portfile diff

comment:2 in reply to:  description ; Changed 15 years ago by matt.cottrell@…

Replying to matt.cottrell@…:

I would like to submit this port of the ARB DNA sequence analysis program to the science category of MacPorts.

Patched the Portfile (Portfile-arb.diff) to reinplace sed in the sources instead of softlinking to gsed. Added a more informative description and a link to the ARB Yahoo! discussion group in the long description.

comment:3 in reply to:  2 Changed 15 years ago by matt.cottrell@…

Replying to matt.cottrell@…:

This port is for the 64-bit version of ARB and builds on Snow Leopard (10.6) only. It does not build on Leopard (10.5) now, but a 32-bit version could be done for 10.5.

comment:4 Changed 15 years ago by mf2k (Frank Schima)

Cc: matt.cottrell@… removed

This is going to need a few changes.

comment:5 Changed 15 years ago by mf2k (Frank Schima)

Cc: macsforever2000@… added

Cc Me!

comment:6 in reply to:  4 ; Changed 15 years ago by matt.cottrell@…

Replying to macsforever2000@…:

This is going to need a few changes.

  • The patches patch-ARB-makefile.diff and patch-ARB-DARWIN.pl.diff hardcode /opt/local/.
  • I will contact the upstream developer about incorporating these patches so we don't have to.
  • But just out of curiosity how could I avoid using the hard path /opt/local/ in the Makefile. Would make know what to do with ${prefix} in the patch below?
 ifdef DARWIN
-	XMKMF := /usr/X11/bin/xmkmf
+	XMKMF := ${prefix}/bin/xmkmf
 else
 	XMKMF := /usr/bin/X11/xmkmf
 endif
  • Your email address should be obfuscated.
  • I see others using the the obfuscated format "domain:user". Would that be acceptable?
  • I was unable to obtain the desired source using advanced fetch because I assumed incorrectly that revision numbers are tags. I will contact the upstream developer about tags when he returns from travel in a couple of days.

comment:7 in reply to:  6 Changed 15 years ago by matt.cottrell@…

Replying to matt.cottrell@…:

Replying to macsforever2000@…:

This is going to need a few changes.

  • The patches patch-ARB-makefile.diff and patch-ARB-DARWIN.pl.diff hardcode /opt/local/.
  • Okay, I'm starting to see how to avoid hard paths.

The Portfile gets a line like this:

build.env-append    PREFIX=${prefix}

So the Makefile can then look like this:

 ifdef DARWIN
-	XMKMF := /usr/X11/bin/xmkmf
+	XMKMF := $(PREFIX)/bin/xmkmf
 else
 	XMKMF := /usr/bin/X11/xmkmf
 endif

I'll upload a new Portfile and set of patch files after Labor Day.

comment:8 Changed 15 years ago by blb@…

There's an entry on not hardcoding /opt/local on the PortfileRecipes page, which should help.

For svn fetching, you can set svn.revision to specify the revision to check out if you just want to use trunk; that way, everyone is at least using the same rev you tested.

comment:9 in reply to:  6 Changed 15 years ago by mf2k (Frank Schima)

Replying to matt.cottrell@…:

  • Your email address should be obfuscated.
  • I see others using the the obfuscated format "domain:user". Would that be acceptable?

Yes, that is the correct way to handle it.

comment:10 in reply to:  8 Changed 15 years ago by matt.cottrell@…

Replying to blb@…:

There's an entry on not hardcoding /opt/local on the PortfileRecipes page, which should help.

For svn fetching, you can set svn.revision to specify the revision to check out if you just want to use trunk; that way, everyone is at least using the same rev you tested.

Using svn.revision I now get the desired source revision, but I'm running into another problem. It appears that the build phase uses information from the .svn directories in the source.

When I do:

fetch {system "svn co --username coder --password gimmeARBsource http://svn.mikro.biologie.tu-muenchen.de/svn/trunk -r 6192 ${worksrcpath}/"}

I get the .svn directories.

But the .svn directories are not downloaded when I do:

fetch.type              svn
svn.url			http://svn.mikro.biologie.tu-muenchen.de/svn/trunk/
svn.revision            6192
fetch.user              coder
fetch.password          gimmeARBsource

Any way to coax advanced fetch into downloading the .svn directories contained within the source?

comment:11 Changed 15 years ago by blb@…

If you need the .svn dirs as well, you need to set svn.method as well:

svn.method checkout

By default it uses export, hence the missing .svn dirs (see irssi-devel for a concrete example).

comment:12 in reply to:  11 Changed 15 years ago by matt.cottrell@…

Replying to blb@…:

If you need the .svn dirs as well, you need to set svn.method as well:

I got an "invalid command" error the first time I tried the svn.method checkout.

cottrell% portindex
Creating software index in /Users/cottrell/Documents/Programming/MacPorts/ports
Failed to parse file science/arb/Portfile: invalid command name "svn.method"

But I can now use that command after running "portindex" one time with the following in the portfile.

if {[info exists svn.method]} {
svn.method checkout
}

I'm using 1.8.0

cottrell% port -v
MacPorts 1.8.0

Shrug

Changed 15 years ago by matt.cottrell@…

Revised patch-ARB-config.makefile.diff

Changed 15 years ago by matt.cottrell@…

Attachment: patch-ARB-DARWIN.pl.diff added

Revised patch-ARB-DARWIN.PL.diff

Changed 15 years ago by matt.cottrell@…

Attachment: patch-ARB-makefile.diff added

Revised patch-ARB-Makefile.diff

Changed 15 years ago by matt.cottrell@…

Revised patch-ARB-RNA3D_GlobalHeader.hxx.diff

comment:13 in reply to:  4 Changed 15 years ago by matt.cottrell@…

Replying to macsforever2000@…:

This is going to need a few changes.

A revised set of Portfile and diff files are now attached that address:

  • hard coding of /opt/local
  • email address obfuscation
  • svn fetching.

Many thanks to blb for suggesting "svn.method checkout."

comment:14 Changed 15 years ago by mf2k (Frank Schima)

I attempted to install but I the svn fetch is failing for me:

--->  Fetching arb
DEBUG: Executing org.macports.fetch (arb)
DEBUG: Environment: CPATH='/opt/local/include' LIBRARY_PATH='/opt/local/lib' MACOSX_DEPLOYMENT_TARGET='10.6'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_mports_trunk_dports_science_arb/work" && /usr/bin/svn --non-interactive --trust-server-cert checkout -r 6192 http://svn.mikro.biologie.tu-muenchen.de/svn/branches/stable_5.0'
svn: OPTIONS of 'http://svn.mikro.biologie.tu-muenchen.de/svn/branches/stable_5.0': authorization failed: Could not authenticate to server: rejected Basic challenge (http://svn.mikro.biologie.tu-muenchen.de)
Error: Target org.macports.fetch returned: Subversion check out failed
DEBUG: Backtrace: Subversion check out failed
    while executing
"svnfetch"
    (procedure "portfetch::fetch_main" line 12)
    invoked from within
"$procedure $targetname"
Warning: the following items did not execute (for arb): org.macports.activate org.macports.fetch org.macports.extract org.macports.checksum org.macports.patch org.macports.configure org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.

comment:15 in reply to:  14 Changed 15 years ago by matt.cottrell@…

Replying to macsforever2000@…:

I attempted to install but I the svn fetch is failing for me:

Can you do me a favor and do this:

cd ~/Desktop
/usr/bin/svn --non-interactive --trust-server-cert checkout -r 6192 http://svn.mikro.biologie.tu-muenchen.de/svn/branches/stable_5.0'

If that works then we know the server on the other end is fine and I have to tweak something in the Portfile.

In the mean time I'll look into that "--trust-server-cert" option. Never seen that before.

comment:16 Changed 15 years ago by mf2k (Frank Schima)

That did not work for me either.

$ /usr/bin/svn --non-interactive --trust-server-cert checkout -r 6192 http://svn.mikro.biologie.tu-muenchen.de/svn/branches/stable_5.0
svn: OPTIONS of 'http://svn.mikro.biologie.tu-muenchen.de/svn/branches/stable_5.0': authorization failed: Could not authenticate to server: rejected Basic challenge (http://svn.mikro.biologie.tu-muenchen.de)

comment:17 in reply to:  16 ; Changed 15 years ago by matt.cottrell@…

Replying to macsforever2000@…:

That did not work for me either.

$ /usr/bin/svn --non-interactive --trust-server-cert checkout -r 6192 http://svn.mikro.biologie.tu-muenchen.de/svn/branches/stable_5.0
svn: OPTIONS of 'http://svn.mikro.biologie.tu-muenchen.de/svn/branches/stable_5.0': authorization failed: Could not authenticate to server: rejected Basic challenge (http://svn.mikro.biologie.tu-muenchen.de)

I think I need to log out and log back in as another user to debug two unexpected things that are happening.

  • There is a problem with the way username and password are being passed to or interpreted by the svn server. If I edit the Portfile with an incorrect username and password I can still checkout the source.
fetch.user        wrong-user
fetch.password    wrong-password

Let's me download the source.

  • If I comment out the username and password commands the Portfile still works for me.
#fetch.user        coder
#fetch.password    gimmeARBsource

But on the command line things are different

  • Using the correct username and password work as expected
    svn co --username coder --password gimmeARBsource http://svn.mikro.biologie.tu-muenchen.de/svn/branches/stable_5.0
    
  • Giving no username or password also works. It should not.
    svn co http://svn.mikro.biologie.tu-muenchen.de/svn/branches/stable_5.0
    
  • But giving the wrong username and password causes a prompt. If I then enter the correct credentials the checkout proceeds.
    svn co --username foo --password bar http://svn.mikro.biologie.tu-muenchen.de/svn/branches/stable_5.0Authentication realm: <http://svn.mikro.biologie.tu-muenchen.de:80> Subversion Repository
    Username: foo
    Password for 'foo': 
    Authentication realm: <http://svn.mikro.biologie.tu-muenchen.de:80> Subversion Repository
    Username: coder
    Password:
    

It seems like my svn client is passing some cached credentials. Does svn do that sort of thing?

I'm going to logout and log back in as a different user and see what happens.

comment:18 in reply to:  17 Changed 15 years ago by matt.cottrell@…

Replying to matt.cottrell@…:

I'm going to logout and log back in as a different user and see what happens.

When logged in under the guest account I could not obtain the source by svn when no username and password were given as options.

guest% svn co http://svn.mikro.biologie.tu-muenchen.de/svn/branches/stable_5.0
Authentication realm: <http://svn.mikro.biologie.tu-muenchen.de:80> Subversion Repository
Password for 'guest':

Notice that the svn server has already acknowledged me as username "guest". The required username is "coder", so I am unable to checkout even when I give the correct password.

But if I do the checkout once on the command line with the correct username and password given as arguments, then on subsequent tries I can omit the credentials from the command and the checkout proceeds.

I think this is what is happening from my Portfile as well. When macsforever2000 ran "port install arb" the username sent to the svn server was "macsforever2000" not "coder" as is coded in my Portfile.

I bet that doing this would achieve a successful checkout from the command line.

svn co --username coder --password gimmeARBsource http://svn.mikro.biologie.tu-muenchen.de/svn/branches/stable_5.0

And subsequently doing this would work too.

port install arb

comment:19 in reply to:  17 ; Changed 15 years ago by matt.cottrell@…

Replying to matt.cottrell@…:

It seems like my svn client is passing some cached credentials. Does svn do that sort of thing?

Yes, svn is caching credentials in:

~/.subversion/auth/svn.simple

When I empty that directory my Portfile no longer works.

cottrell% sudo port install arb
--->  Computing dependencies for arb
--->  Fetching arb
Error: Target org.macports.fetch returned: Subversion check out failed
Error: Status 1 encountered during processing.

Is there anything missing from my svn commands below:

fetch.type              svn
svn.url                 http://svn.mikro.biologie.tu-muenchen.de/svn/branches/stable_5.0
svn.revision            6192
svn.method              checkout
fetch.user              coder              
fetch.password          gimmeARBsource

comment:20 in reply to:  19 Changed 15 years ago by matt.cottrell@…

Replying to matt.cottrell@…:

Is there anything missing from my svn commands below:

fetch.type              svn
svn.url                 http://svn.mikro.biologie.tu-muenchen.de/svn/branches/stable_5.0
svn.revision            6192
svn.method              checkout
fetch.user              coder              
fetch.password          gimmeARBsource

I went looking for coding examples that I could follow.

A search of the ports tree identified 52 ports that use the command "svn.url"

But none of those ports use the commands "fetch.user" or "fetch.password"

There are only 4 ports that use "fetch.user" or "fetch.password"

  • ksh93
  • libranlib
  • trafshow
  • webalizer

And they use http or ftp.

There are no ports that use svn with username and password.

I'm going out on a limb to propose that nobody is aware that "fetch.user" and "fetch.password" are not working correctly with "svn.url".

comment:21 Changed 15 years ago by blb@…

It definitely looks like fetch.user and fetch.password aren't used for svn fetching (which I think is a bug, so ticket #21232). For now, try

svn.args --username coder --password gimmeARBsource

See if that does the trick.

comment:22 in reply to:  21 Changed 15 years ago by matt.cottrell@…

Replying to blb@…:

It definitely looks like fetch.user and fetch.password aren't used for svn fetching (which I think is a bug, so ticket #21232). For now, try

 svn.args --username coder --password gimmeARBsource

See if that does the trick.

Yes, that works.

comment:23 in reply to:  14 ; Changed 15 years ago by matt.cottrell@…

Replying to macsforever2000@…:

I attempted to install but I the svn fetch is failing for me:

A revised Portfile that uses the svn workaround suggested by blb is now attached.

Fetching arb now works properly.

comment:24 in reply to:  23 Changed 15 years ago by matt.cottrell@…

Replying to matt.cottrell@…:

Portfile recognizing darwin 9 and 10 that builds 32-bit ARB on darwin 9 and 64-bit ARB on darwin 10 now attached.

comment:25 Changed 15 years ago by mf2k (Frank Schima)

Cc: macsforever2000@… removed
Owner: changed from macports-tickets@… to macsforever2000@…
Status: newassigned
Version: 1.8.0

comment:26 in reply to:  25 Changed 15 years ago by matt.cottrell@…

Replying to macsforever2000@…: Portfile now prompts user how to set ARBHOME after build

comment:27 Changed 15 years ago by mf2k (Frank Schima)

It fetches and installs fine, and I set ARBHOME as per the note, but when I ran it, I see the following error:

$ arb
Environment Variable ARBHOME was empty
Using ARBHOME='/opt/local'
Directory /Users/frank/.arb_prop not found - creating ...
Directory /Users/frank/.arb_prop/macros not found - creating ...
Directory /opt/local/lib/macros not found - creating ...
mkdir: /opt/local/lib/macros: Permission denied
/opt/local/bin/arb: line 128: /opt/local/lib/config.Darwin: No such file or directory

I then ran it with sudo and it created the macros directory in /opt/local/lib (this directory should be created in post-destroot), but then I see:

$ sudo arb
Environment Variable ARBHOME was empty
Using ARBHOME='/opt/local'
Directory /opt/local/lib/macros not found - creating ...
/opt/local/bin/arb: line 128: /opt/local/lib/config.Darwin: No such file or directory

So I copied the config.Darwin file from /opt/local/share/arb/lib/config.Darwin and tried to run again, but I see the following error:

$ arb
Environment Variable ARBHOME was empty
Using ARBHOME='/opt/local'
Please wait while the program ARB is starting .....
Hyperspace:arb frank$ ARB: Loading '.arb_prop/ntree.arb'
file .arb_prop/status.arb not found
file .arb_prop/ntree.arb not found
 database .arb_prop/ntree.arb created
 database .arb_prop/status.arb created

-------------------- ARB-backtrace for 'received signal 11':

-------------------- ARB-backtrace for 'received signal 11':
0   arb_ntree                           0x00000001000c5785 GBK_dump_backtrace + 53
1   arb_ntree                           0x00000001000c7995 sigsegv_handler_dump + 53
0   arb_ntree                           0x00000001000c5785 GBK_dump_backtrace + 53
1   arb_ntree                           0x00000001000c7995 sigsegv_handler_dump + 53
2   libSystem.B.dylib                   0x00007fff8707114a _sigtramp + 26
3   ???                                 0x0000000000000000 0x0 + 0
4   arb_ntree                           0x00000001001296a7 _Z15aw_create_shellP9AW_windowbbiiii + 183
5   arb_ntree                           0x00000001001322f6 _ZN17AW_window_message4initEP7AW_rootPKcb + 102
6   arb_ntree                           0x00000001001238df _Z11aw_questionPKcS0_bS0_ + 303
7   arb_ntree                           0x0000000100123d87 _Z11aw_ask_surePKcbS0_ + 23
2   libSystem.B.dylib                   0x00007fff8707114a _sigtramp + 26
3   ???                                 0x0000000000000000 0x0 + 0
8   arb_ntree                           0x000000010011dbfa _Z29aw_create_selection_box_awarsP7AW_rootPKcS2_S2_S2_P17gb_data_base_typeb + 442
4   arb_ntree                           0x00000001001296a7 _Z15aw_create_shellP9AW_windowbbiiii + 183
5   arb_ntree                           0x00000001001322f6 _ZN17AW_window_message4initEP7AW_rootPKcb + 102
9   arb_ntree                           0x000000010012a828 _ZN7AW_root14init_variablesEP17gb_data_base_type + 296
10  arb_ntree                           0x00000001001242d0 _Z13aw_initstatusv + 192
11  arb_ntree                           0x000000010007d0d0 main + 64
12  arb_ntree                           0x00000001000039d8 start + 52
-------------------- End of backtrace
[Terminating with signal 11]
6   arb_ntree                           0x00000001001238df _Z11aw_questionPKcS0_bS0_ + 303
7   arb_ntree                           0x0000000100123d87 _Z11aw_ask_surePKcbS0_ + 23
8   arb_ntree                           0x000000010011dbfa _Z29aw_create_selection_box_awarsP7AW_rootPKcS2_S2_S2_P17gb_data_base_typeb + 442
9   arb_ntree                           0x000000010012a828 _ZN7AW_root14init_variablesEP17gb_data_base_type + 296
10  arb_ntree                           0x000000010007d11b main + 139
11  arb_ntree                           0x00000001000039d8 start + 52
-------------------- End of backtrace
[Terminating with signal 11]
ARB done

comment:28 Changed 15 years ago by mf2k (Frank Schima)

Never mind. PEBKAC. I had to modify my .bash_profile and then it ran.

comment:29 Changed 15 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: assignedclosed

Committed revision r57345. Thanks!

Changed 15 years ago by matt.cottrell@…

Attachment: Portfile added

Portfile no longer creates macro dir

Note: See TracTickets for help on using tickets.