Add tor to haikuports Haiku
Difficulty: Medium Status: Closed Time to complete: 72 hrs Mentors: Dario Casalinuovo Tags: .bep, haikuporter, package, haikuports, tor, the onion router, haiku, porting

http://ports.haiku-files.org/

Your .bep file should be able to handle gcc2 or gcc4 builds.  If it fails to build with gcc2, then adding a Message into the .bep file explaining that should be added.

There are lots of example .bep files in svn on the Haikuports site.

NOTE: The tool is known to compile without any change in the source code (maybe just some headers naming or preprocessor changes...), your job is to make a .bep file that would automate these steps using haikuporter.

You should also configure properly the binary, setting the appropriated settings directory using configure command line arguments.

---------

The tool is available at the following URL :

https://www.torproject.org/

Uploaded Work
File name/URL File size Date submitted
tor-0.2.2.34.bep 617 bytes December 11 2011 00:08 UTC
tor-0.2.2.34.bep 659 bytes December 12 2011 03:42 UTC
Comments Click here to login and leave a comment.
Task Claimed by Thomas Turney December 7 2011 00:45 UTC

I would like to work on this task.

Task informations by Barrett80 December 7 2011 00:57 UTC

Hello Thomas,


to begin working on this task, i think you should set-up a installation of Haiku. The easiest way is likely to download a recent nightly image (http://haiku-files.org/) and run Haiku in a virtual machine, with an appropriate software like VirtualBox or VMWare. To install and run Haiku on these software is simple and you can obtain documentation in the Haiku official website : www.haiku-os.org.


I'll assign the task to you, for any help and clarification don't hesitate to ask!

Task Assigned by Barrett80 December 7 2011 00:57 UTC

This task has been assigned to Thomas Turney. You have 72 hours to complete this task, good luck!

Which image? by Thomas Turney December 7 2011 01:05 UTC

Hi there!


  I have downloaded HaikuOS and even contributed to writing .bep files before for haikuports, but the HaikuOS I have is currently with gcc2. Which nightly build would I need for the anyboot/iso x86 of gcc4? Is there a way to have both gcc2 and gcc4 and test each individually in Haiku?


Thanks!


-Thomas

Question reply by Barrett80 December 7 2011 01:24 UTC

Basically you can begin to work on the task using a gcc2 build. The tool will presumably work with both as well, so you can just test at the end of the work if it fail under a gcc4 environment.


You can download a pure gcc4 nightly build at this link :


http://haiku-files.org/unsupported-builds/x86-gcc4/


About your question, yes there's a way to do that, but it's unsure and can make serious problems with dynamic libraries. So for safety the best way, is to copy the svn tree in a gcc4 build and test if it work as well.

Port under way by Thomas Turney December 9 2011 02:06 UTC

Thanks for the build tips!


 


  I've got nightly builds for both gcc2 and gcc4, so I will be testing for these. However, I'm unsure of how long this may take in case of errors (apparently anyboot images do not work on vmware, but iso images do. The other vm-specific images have fixed sizes, which complicates installs). Could I get a time extension on this? I should still have it complete though during the "action needed" phase.


 


Thanks!


-Thomas

Questions reply by Barrett80 December 9 2011 02:50 UTC

You can download a iso image and install Haiku in a previously created virtual hd.


Just to help you a bit more, here some suggestions :



  • The package need libevemt install it (it's present in haikuports)

  • If you have some compile error, you should create a patch, and patch the source before compiling it in bep command instructions.


To configure the settings you can configure the tool this way :


"./configure --prefix=/boot/common"


but be sure to check that all files go to the right directory.


You can apply a patch using the command "patch -p0 < file_name.patch" from terminal.


More infos here : http://ports.haiku-files.org/wiki/AddingPorts


About the time extension, sure i can do it. If you need some help, as you know i'm here.


 

Correction by Barrett80 December 9 2011 02:53 UTC

For libevemt i meant libevent. As other additional help, you can see many other informations here : http://ports.haiku-files.org/wiki/Guidelines

Deadline extended by Barrett80 December 9 2011 02:53 UTC

The deadline of the task has been extended with 1 days and 0 hours.

Thanks by Thomas Turney December 9 2011 17:08 UTC

I have made pretty great progress, and next am going to try compiling on gcc4. I have been browsing Haikuports though and am having trouble finding the right place to put tor. Would it be classified as www-client? Or perhaps one of the net directories?


 


Thanks again for all your help!

Reply by Barrett80 December 9 2011 20:02 UTC

Good to know : ), i think the best dir is net-misc.

.bep coming soon! by Thomas Turney December 10 2011 23:18 UTC

I'll have the .bep file in the next hour. I had some trouble tracking down all dependencies, but according to this site (one which is a different OS building tor from scratch): http://wiki.chumby.com/index.php/Running_Tor_on_chumby_One


They used openssl as well as libevent, so I included that in the depencency area. I believe zlib should already be part of haiku, thus it's not necessary to list?


While the .bep file is almost done, making it is posing to be much of a problem. At one point it crashes because of a -lm flag. I then removed the -lm flag since the library is part of rootlib of haiku, but now I'm recieving many messages stating many variables are "unkown" in some way. however, this was only on the gcc2 build trial (build rev43413-x86). I am in the process of trying the gcc4 build, but compiling for openssl and libevent is very long and strenuous under vmware. I will post news as soon as I can, and if needed further modify the file (if the gcc4 doesn't work, which it probably won't). Any suggestions on dealing with those errors for make? It's based in /src/or portion of tor when compiling.


 


Thanks for the great help!


-Thomas

Ready for review by Thomas Turney December 11 2011 00:26 UTC

The work on this task is ready to be reviewed.

No more Work can be submitted by Melange December 11 2011 00:58 UTC

Melange has detected that the deadline has passed and no more work can be submitted. The submitted work should be reviewed.

Task Needs More Work by Barrett80 December 11 2011 01:57 UTC

One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.

Building problems etc. by Barrett80 December 11 2011 02:13 UTC

I have checked the source code of tor, and the solution is adding -lnetwork to the various MakeFile* in the sources and removing manually -lm, basically i'll accept the task doing these changes :



  1. Remove the MESSAGE, it's not useful at this point.

  2. Check, and be sure that your sed command isn't broking the files, if it's broking the files remove the line and remove the -lm strings manually. Basically after removing the "-lm" strings, if you are getting undefined reference errors, you are in the right way and the build system isn't broken, otherwise there's something bad with your sed expression.


Then, submit both your source archive and bep file.

Deadline extended by Barrett80 December 11 2011 03:44 UTC

The deadline of the task has been extended with 2 days and 0 hours.

License? by Thomas Turney December 12 2011 03:06 UTC

trying to install the .bep file gives me an error (one with https, for which I put a comment saying wget requires your ssl certificate in) on the license since it's not in haiku's license folder. The license is called an open data license, which is specific to Tor ( https://gitweb.torproject.org/tor.git?a=blob_plain;hb=HEAD;f=LICENSE ) 


I replaced it with OpenGroup for the purposes of running the .bep through. Should I keep that? I'll also be sending the new .bep file by tonight (it's compiled successfully on gcc2, so I'm trying gcc4 now)

Ready for review by Thomas Turney December 12 2011 03:42 UTC

The work on this task is ready to be reviewed.

Reply by Barrett80 December 12 2011 14:38 UTC

Good work, the package is ok as is. I'm going to approve your task, congratulation!


I would like to suggest you another task, that with your knowledge you can complete in about 30 minutes, since the apps compiles with just "make" :


http://google-melange.appspot.com/gci/task/view/google/gci2011/7176214


Regards

Task Closed by Barrett80 December 12 2011 14:38 UTC

Congratulations, this task has been completed successfully.

Thanks! by Thomas Turney December 12 2011 15:10 UTC

I had lots of fun working on this task.


  And thank you for referring me to another task! I'll be sure to get on it quickly!


-Thomas

Thanks! by Thomas Turney December 12 2011 15:10 UTC

I had lots of fun working on this task.


  And thank you for referring me to another task! I'll be sure to get on it quickly!


-Thomas

This task will be unpublished and you cannot publish them back manually. Are you sure you want to unpublish?