Add file for package?



  • Dear folks,

    for developing packages, is there any way to add a .tbz file to this url?

    http://files.pfsense.org/packages/8/All/



  • What package did you did?



  • Hey, I need the sudo.tbz for the NRPE package, which I am updating.



  • Install manually from freebsd packages, when you finish devel and tests, you can include package dependencie on pkg_config XML file.

    I'm not sure if I have sudo on my package repo, take a look on e-sac.siteseguro.ws/packages



  • Thanks! Yes I did install in manually. Does that mean when the pkg_config8.xml is pulled it will automatically add the sudo.tbz to the server specified at in depends_on_package_base_url?

    EDIT: No, it's not there either, but the depends_on_package_base_url URL already contains a path because there are other dependencies that are there. Or is there a way to specify multiple sources (kind of on a per-dependency basis?)



  • When you specify ports path and compile args, it will be compiled via cron job. Check package dates on files.pfsense.org



  • Apologies, but I don't understand.

    All I want to do is this:

    Original code (pkgconfig.8.xml)

    
    	 <package><name>NRPE v2</name>
    		<website>http://wiki.nagios.org/index.php/Howtos:nrpe_nsca</website>
    		<descr>NRPE is an addon for Nagios that allows you to execute plugins on remote Linux/Unix hosts. This is useful if you need to monitor local resources/attributes like disk usage, CPU load, memory usage, etc. on a remote host.</descr>
    		<category>Services</category>
    		<depends_on_package_base_url>http://files.pfsense.org/packages/8/All/</depends_on_package_base_url>
    		<depends_on_package>nrpe-2.12_3.tbz</depends_on_package>
    		<depends_on_package>nagios-plugins-1.4.15_1,1.tbz</depends_on_package>
    		 <depends_on_package_pbi>nrpe-2.12_3-i386.pbi</depends_on_package_pbi> 
    		<build_port_path>/usr/ports/net-mgmt/nrpe2</build_port_path>
    		<build_port_path>/usr/ports/net-mgmt/nagios-plugins</build_port_path>
    		<build_options>WITH_SSL=true WITHOUT_ARGS=true</build_options>
    		<config_file>http://www.pfsense.com/packages/config/nrpe2/nrpe2.xml</config_file>
    		<version>2.12_3 v2</version>
    		<status>Beta</status>
    		<required_version>1.2</required_version>
    		<maintainer>erik@erikkristensen.com</maintainer>
    		<configurationfile>nrpe2.xml</configurationfile></package> 
    
    

    And I want to modify it like so and have the packages added be available:

    
    	 <package><name>NRPE v2</name>
    		<website>http://wiki.nagios.org/index.php/Howtos:nrpe_nsca</website>
    		<descr>NRPE is an addon for Nagios that allows you to execute plugins on remote Linux/Unix hosts. This is useful if you need to monitor local resources/attributes like disk usage, CPU load, memory usage, etc. on a remote host. This version also includes scripts for monitoring various aspects of a PFSense system</descr>
    		<category>Services</category>
    		<depends_on_package_base_url>http://files.pfsense.org/packages/8/All/</depends_on_package_base_url>
    		<depends_on_package>nrpe-2.12_3.tbz</depends_on_package>
    +++		<depends_on_package>sudo.tbz</depends_on_package>
    		<depends_on_package>nagios-plugins-1.4.15_1,1.tbz</depends_on_package>
    +++		<depends_on_package>nagios-pfsense-specific-0.1.tbz</depends_on_package>
    		 <depends_on_package_pbi>nrpe-2.12_3-i386.pbi</depends_on_package_pbi> 
    		<build_port_path>/usr/ports/net-mgmt/nrpe2</build_port_path>
    		<build_port_path>/usr/ports/net-mgmt/nagios-plugins</build_port_path>
    		<build_options>WITH_SSL=true WITHOUT_ARGS=true</build_options>
    		<config_file>http://www.pfsense.com/packages/config/nrpe2/nrpe2.xml</config_file>
    		<version>2.12_3 v2</version>
    		<status>Beta</status>
    		<required_version>1.2</required_version>
    		<maintainer>erik@erikkristensen.com</maintainer>
    		<configurationfile>nrpe2.xml</configurationfile></package> 
    
    


  • Fill up build port package info too



  • Thank you for your patience with my ignorance, marcelloc.

    I've gone through these two pieces of documentation:
    http://doc.pfsense.org/index.php/Creating_Your_Own_Package_Repository#Step_1:_Web_Server
    http://doc.pfsense.org/index.php/Developing_Packages

    However, nowhere could I find what build_port_path or the other values mean, do, or what they should be set at.

    Is there another document I am missing that explains these things?



  • Just look five lines below your XML change and you will find it.

    Take a look on postfix or squid package XML info to see how it works



  • Thank you, and apologies if I was unclear.

    Of course I saw that in the xml code I edited and elsewhere for other packages, and it always seems to point to something in /usr/ports/www/.
    However, I can find this path on neither the local pfsense system nor the github PFSense repository.

    Looking at other packages did not help me understand what the path does or how it is used.
    In other words, what is a build port path? A google search yielded no useful information on it either.
    And how does that path help getting the tbz file to where it belongs?

    ??? ???



  • Anyone have any idea how to use this build port package, etc??
    I can't find any documentation on it.
    All I would like to do is add this line:

    <depends_on_package>sudo.tbz</depends_on_package>
    

    Then, I would like to copy the sudo.tbz form the FreeBSD repo (http://ftp2.FreeBSD.org/pub/FreeBSD/ports/amd64/packages-8.2-release/All/) to the pfsense repo (http://files.pfsense.org/packages/amd64/8/All/).

    Is there something I'm missing here?
    It seems that this process is clear to those who do it all the time, but it is hard for someone on the:outside" to understand.
    I would love to commit those changes, as they make PFSense monitoring infinitely easier.



  • @namezero111111:

    Anyone have any idea how to use this build port package, etc??
    I can't find any documentation on it.
    All I would like to do is add this line:

    <depends_on_package>sudo.tbz</depends_on_package>
    

    Then, I would like to copy the sudo.tbz form the FreeBSD repo (http://ftp2.FreeBSD.org/pub/FreeBSD/ports/amd64/packages-8.2-release/All/) to the pfsense repo (http://files.pfsense.org/packages/amd64/8/All/).

    Is there something I'm missing here?
    It seems that this process is clear to those who do it all the time, but it is hard for someone on the:outside" to understand.
    I would love to commit those changes, as they make PFSense monitoring infinitely easier.

    you can add any freebsd package(using the same version) via cmd with pkg_add -r http://path_to_package.tbz

    if you need i386 version of sudo , then the link to it's package is

    pkg_add -r http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/8.1-RELEASE/packages/Latest/sudo.tbz



  • You need to specify the <build_port_path>as well which will build the necessary .tbz</build_port_path>



  • Hmmm… I think we're still at a misunderstanding here.

    I have so far been using pkg_add, but I can't use that if I wish to modify a package as I understand.

    From the previous posts I understand I have to "define" build_port_path.

    However, I cannot find any documentation as to what a "build port path" is, what it should be set to, let alone how to test whether it works.

    Can you maybe give me an example with the sudo in this case so on future packages I (and quite possibly others) can understand how to use this build directives?



  • Ports is where we compile almost everything for freebsd/pfsense

    When you define build_port_path, you are specifying where in ports tree your package is compiled.

    For example, ntop stays at /usr/ports/net/ntop

    Take a look on freebsd site to learn about ports
    http://www.freebsd.org/ports/index.html



  • Thanks!

    So adding ports/security/sudo/ (or is it /usr/ports/security/sudo/) to the build_path_port will ensure a compiled sudo.tbz appear at http://files.pfsense.org/packages/amd64/8/All/ ?

    Or am I wrong again here?



  • @namezero111111:

    Thanks!

    So adding ports/security/sudo/ (or is it /usr/ports/security/sudo/) to the build_path_port will ensure a compiled sudo.tbz appear at http://files.pfsense.org/packages/amd64/8/All/ ?

    Or am I wrong again here?

    It's /usr/ports/security/sudo

    This is the first step. The second is to ask core team to include this package on a daily build.




  • Rebel Alliance Developer Netgate

    You are probably fine with the default sudo options so don't worry about those. Just add build_port_path tags to your package and then the builder should make one on the next package run (happens nightly) if not we may have to kick it by hand but it can be made to work either way.



  • Thank you everyone!

    I have submitted a proper (I think) patch for both 8* configs now. I'm eagerly waiting to see if the nightly build will pick it up if approved, like jimp suggested.
    That should complete the framework I had in mind.

    I assume dropping additional files into a directory can be accomplished as so (like the widescreen package):

    
    	 <additional_files_needed><prefix>/usr/local/pkg/widescreen/</prefix>
    		<chmod>644</chmod>
    		http://www.pfsense.org/packages/config/widescreen/bin/all.css_</additional_files_needed> 
    
    

    EDIT: How do I issue a pull request for new files uploaded to my repository (via Git gui??)
    The files I'm talking about are here: https://github.com/namezero111111/pfsense-packages/tree/master/config/nrpe2


Log in to reply