Welcome, Guest. Please login or register.
+  pfSense Forum
|-+  pfSense English Support» Packages» Testing new packages?
Username:
Password:
 
 

Pages: [1] 2 3   Go Down
  Print  
Author Topic: Testing new packages?  (Read 8228 times)
0 Members and 1 Guest are viewing this topic.
fernandotcl
Full Member
***
Offline Offline

Posts: 59


View Profile
« on: December 20, 2005, 09:31:05 am »

Hey,

How do I test the packages I created? Apparently, one solution would be creating a local mirror to serve the XML-RPC stuff and then use some ugly hacks to make pfSense point to this mirror instead of the official ones, so that I could install new packages.

The problem is: I can't create a local mirror. To do so, I'd need to rsync to rsync://cvs.pfsense.org/mirrors, but rsync won't connect cause I'm not authorized to connect. I'd have to drop a line to the core team so that they added my IP to their firewall so that I could use rsync to create a local mirror. I'm not doing that cause this is really a local mirror, I don't have the bandwidth to host a real mirror.

I just wanted to test some packages. I'm running out of ideas...


Thanks in advance.
Logged
sullrich
Administrator
Hero Member
*****
Offline Offline

Posts: I am a geek!!



View Profile WWW
« Reply #1 on: December 20, 2005, 01:21:11 pm »

Setup the XMLRPC then wget http://www.pfsense.com/packages/

We do not have mirror functionality in 1.0.  It's in 1.1.

The other alternative is to copy your XML file to /usr/local/pkg/ and then invoke pkg_mgr.php?xml=mytestpackage.xml
Logged

pfSense Commercial Support

Paying customers receive support priority and detailed answers
through the official commercial support channels, forum users receive
as much help as time permits.
colin_
Hero Member
*****
Offline Offline

Posts: I am a geek!!


View Profile
« Reply #2 on: December 20, 2005, 06:34:38 pm »

Until the new package code (which will make repositories far easier to create) is integrated for 1.1, the easiest option would be to manually add a package entry in get_pkg_info(), located in pkg-utils.inc. This function calls the pfsense.com XMLRPC server and returns whatever information is needed by the package system.

A simple way to accomplish this would be to make an array containing your package entries, and then array_merge() $resp and your own array together before returning it.
Logged
fernandotcl
Full Member
***
Offline Offline

Posts: 59


View Profile
« Reply #3 on: December 21, 2005, 10:57:06 am »

Thanks for the ideas, I'll try it out.
Logged
fernandotcl
Full Member
***
Offline Offline

Posts: 59


View Profile
« Reply #4 on: December 21, 2005, 12:57:46 pm »

Setup the XMLRPC then wget http://www.pfsense.com/packages/
Well, that's what I first tried, but I have no mens of setting up XML-RPC, cause that would require me to grab the contents of cvs.pfsense.com/pfSense. They are PHP scripts, so insteading of downloading them, I end up executing them.

If someone with access to the website could send me those files, it'd help a lot, I think.

The other alternative is to copy your XML file to /usr/local/pkg/ and then invoke pkg_mgr.php?xml=mytestpackage.xml
Hmm that didn't go well... I wonder how that would be possible if the package information is split in two files: pkg_config.xml and <packagename>.xml.

the easiest option would be to manually add a package entry in get_pkg_info(), located in pkg-utils.inc. This function calls the pfsense.com XMLRPC server and returns whatever information is needed by the package system.

A simple way to accomplish this would be to make an array containing your package entries, and then array_merge() $resp and your own array together before returning it.
I did that. The problem is that although I have now my package in the packages list, installing it isn't that simple, apparently. What am I missing? I think I'll have to hack pkg-utils.inc even more, and maybe that'll take longer than if I got a XML-RPC server working.
Logged
sullrich
Administrator
Hero Member
*****
Offline Offline

Posts: I am a geek!!



View Profile WWW
« Reply #5 on: December 21, 2005, 02:00:40 pm »

XMLRPC Code is available: www.pfsense.com/xmlrpc.tgz

In terms of splitting the items into 2, this is already how it works.  pkg_config.xml is the manifest.   Each package then has a xml file.

Take a look at http://cvs.pfsense.com/cgi-bin/cvsweb.cgi/tools/packages/
Logged

pfSense Commercial Support

Paying customers receive support priority and detailed answers
through the official commercial support channels, forum users receive
as much help as time permits.
fernandotcl
Full Member
***
Offline Offline

Posts: 59


View Profile
« Reply #6 on: December 22, 2005, 07:39:02 am »

Thanks a lot, that clarified things. But now I'm puzzled.

I've set up a local "mirror", editing globals.inc to point to this mirror, etc.. It seems to work.

I created a few packages, but I don't know where to place them. What's puzzling me is that I have lots of XML files in $DOCROOT/config and $DOCROOT/config/packages. Those are package files, and are mostly the same, except for a few of them. The problem is: they're nothing like the packages we see at http://cvs.pfsense.com/cgi-bin/cvsweb.cgi/tools/packages/ . For example, take a look at nmap.xml. It starts with <package> in the cvs /tools dir, but it starts with <packagegui> in $DOCROOT/config. One specifies the FreeBSD package as a "dependence", whereas the other doesn't.

In short, it seems to me that those packages at /tools are the real packages, and the ones at $DOCROOT/config were created by some sort of script, that also updated pkg_config.xml. Am I right? What script is that?

Also, regarding the xml=<mypackage>.xml trick, it didn't work out.  I checked pkg_mgr.php and pkg_mgr_install.php, and none of them parse $_GET['xml'], apparently.


Thanks once again.
« Last Edit: December 22, 2005, 08:03:33 am by fernandotcl » Logged
colin_
Hero Member
*****
Offline Offline

Posts: I am a geek!!


View Profile
« Reply #7 on: December 22, 2005, 04:05:17 pm »

I created a few packages, but I don't know where to place them. What's puzzling me is that I have lots of XML files in $DOCROOT/config and $DOCROOT/config/packages. Those are package files, and are mostly the same, except for a few of them. The problem is: they're nothing like the packages we see at http://cvs.pfsense.com/cgi-bin/cvsweb.cgi/tools/packages/ . For example, take a look at nmap.xml. It starts with <package> in the cvs /tools dir, but it starts with <packagegui> in $DOCROOT/config. One specifies the FreeBSD package as a "dependence", whereas the other doesn't.

The packages you are seeing that start with <package> are from the (old) reorganization branch that was created to test some early 1.1 code. Only packages that follow the <packagegui> format are compatible with the current installer.

Also, regarding the xml=<mypackage>.xml trick, it didn't work out.  I checked pkg_mgr.php and pkg_mgr_install.php, and none of them parse $_GET['xml'], apparently.

Correct - only packages defined by the repository can be installed at the moment.

You may want to wait to begin development until some releases are built with the new package code from HEAD, which should make many of the headaches you're currently running into disappear.
Logged
sullrich
Administrator
Hero Member
*****
Offline Offline

Posts: I am a geek!!



View Profile WWW
« Reply #8 on: November 22, 2006, 06:03:23 pm »

For the archives:

    "xmlrpcbaseurl" => "www.pfsense.com",
    "xmlrpcpath" => "/pfSense/xmlrpc.php",

Then have a look at the master package manifest located at: http://pfsense.com/cgi-bin/cvsweb.cgi/tools/pkg_config.xml

Then have a look at the packages themselves:

http://pfsense.com/cgi-bin/cvsweb.cgi/tools/packages/

Finally add your package info to pkg_config.xml on the webserver and then populate the packages folder.  pfSense.com example is here: http://www.pfsense.com/packages/

CoreGUI information is located at: (Note, we are switching over to CoreGUI2, we recommend you learn this)
http://wiki.pfsense.com/wikka.php?wakka=CoreGUI2
http://wiki.pfsense.com/wikka.php?wakka=CoreGUI

Good luck!!
Logged

pfSense Commercial Support

Paying customers receive support priority and detailed answers
through the official commercial support channels, forum users receive
as much help as time permits.
dvserg
Hero Member
*****
Offline Offline

Posts: 741


View Profile
« Reply #9 on: November 24, 2006, 07:02:07 am »

How i make this:
Modify only
"xmlrpcbaseurl" => "10.0.0.1", // "www.pfsense.com", // 10.0.0.1 - ip my pfsense

extract 'xmlrpc.tgz' to '/usr/local/www' =>>  '/usr/local/www/pfSense'

Put 'pkg_config.xml' to '/usr/local/www/packages'
Put you files to '/usr/local/www/packages/config'
- need use external FTP server, because on www server .inc files downloaded wrong

NOTE:
!!! for http access to you files - create and put to '/usr/local/www/packages' and '/usr/local/www/packages/config' index.php files with catalog list !!!

« Last Edit: December 21, 2006, 02:04:35 am by dvserg » Logged
alexus
Hero Member
*****
Offline Offline

Posts: 259


View Profile
« Reply #10 on: January 23, 2007, 12:49:07 am »

I just red everithing 3 times and not really sure if i really know what to do  Angry
Why wouldnt you do the IDE for packages? Also how about ability to read packaes from manual inputed servers as core GUI (no editing)
Logged
sullrich
Administrator
Hero Member
*****
Offline Offline

Posts: I am a geek!!



View Profile WWW
« Reply #11 on: January 23, 2007, 01:14:08 am »

I just red everithing 3 times and not really sure if i really know what to do  Angry
Why wouldnt you do the IDE for packages? Also how about ability to read packaes from manual inputed servers as core GUI (no editing)

Huh?
Logged

pfSense Commercial Support

Paying customers receive support priority and detailed answers
through the official commercial support channels, forum users receive
as much help as time permits.
alexus
Hero Member
*****
Offline Offline

Posts: 259


View Profile
« Reply #12 on: January 23, 2007, 02:27:04 pm »

what?
Logged
DanielSHaischt
Sr. Member
****
Offline Offline

Posts: 134


[REVOLUTIONARY AND GEEKPRIMAS]


View Profile
« Reply #13 on: January 23, 2007, 03:04:26 pm »

 Huh  <- thats the equivalent for Huh.

Try using complete english sentences! For example I don't understand whether you are requesting an IDE plugin for developing pfSense packages...

Cheers
Daniel S. Haischt
Logged

Mit freundlichen Gruessen / With kind regards
DAn.I.El S. Haischt
alexus
Hero Member
*****
Offline Offline

Posts: 259


View Profile
« Reply #14 on: January 23, 2007, 03:11:46 pm »

i know what huh means...
as to IDE, i just would apreciate if you have some more tools for easier package development... because I alredy have the tested script that i manually added to Advanced Config page, but now I need to put togather a package and i need to learn all your structure and related stuff which i dont really can use anywhere else... so you could of build the tool that would automaticaly generate the package ...
Logged
Pages: [1] 2 3   Go Up
  Print  
 
Jump to:  

 

Page created in 0.168 seconds with 19 queries.