Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Own Package Repository

    Scheduled Pinned Locked Moved Development
    20 Posts 3 Posters 4.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      SenseFOX
      last edited by

      Hello,

      Problem 1: pkg_tester.php
      Problem 2: Connection from pfSense to Repository

      pfSense Version 2.1; Wampserver

      The approach:

      -following the steps at https://doc.pfsense.org/index.php/Creating_Your_Own_Package_Repository
      -> Step3 works test.php. It appears "Array ([0] => foo [1] => baz)"
      -> Step3 pkg_tester.php not work. In addition I have not found a useful solution in the internet and there are error messages I can not do anything.
      (Call to a member function kindof () on a non-object etc.)

      The connection to the repository shows the following: "Unable to retrieve package info from …". From the pfSense, this address can successfully ping.

      already read and tried ...
      https://forum.pfsense.org/index.php?topic=75163.0

      I appreciate any response ;-)

      In the attachement you see the content of the root folder.

      Many thanks!
      Fox
      rootordner.jpg
      rootordner.jpg_thumb

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        If pkg_tester.php doesn't work then your box won't be able to retrieve packages from there. Please post the complete errors given.

        I once set up a custom repo a long time ago and my biggest recollection is that it took ages and I made many mistakes.  ::)

        Steve

        1 Reply Last reply Reply Quote 0
        • S
          SenseFOX
          last edited by

          "it took ages"  -  YES! :-)

          It seems to me that I will not take a step forward.

          In the attachement you see the errors. They are all in xmlrpc_client.inc.

          errors_pkgtester.jpg
          errors_pkgtester.jpg_thumb

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            Hmm, I think this is beyond me. It's along while since I tried it and reading through the development forum there seem to have been a number of changes which render my own experience obsolete.
            Anyone else want to chime in here?  :-\

            Steve

            1 Reply Last reply Reply Quote 0
            • bmeeksB
              bmeeks
              last edited by

              Those paths appear to be from a Windows install.  I think you will do much better using a FreeBSD machine with Apache.  I created a FreeBSD 8.3 virtual machine and installed Apache and PHP on it.  You then clone the XMLRPC stuff from the pfsense-tools repository (once you have requested and been granted access).  Once you do that, and wave a magic wand and say the magic words, it may start working…  ;D

              OK, just kidding on the magic stuff.  However, it did take me quite a bit of fiddling around to get it working.  I'm not sure how successful you will be on Windows due the potential differences in PHP.  From my experience, the package repository must have a specific directory structure in order to work correctly.  That structure is driven by dependencies within the XMLRPC files.

              Bill

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                Yes, I was using FreeBSD 8.1 I think. I had to make some changes to the apache config to get it to run the php rather than serve it if I recall.

                Steve

                1 Reply Last reply Reply Quote 0
                • S
                  SenseFOX
                  last edited by

                  I will try  :-)

                  1 Reply Last reply Reply Quote 0
                  • S
                    SenseFOX
                    last edited by

                    here is my result.

                    freebsd_pkg_tester2.jpg_thumb
                    freebsd_pkg_tester2.jpg

                    1 Reply Last reply Reply Quote 0
                    • stephenw10S
                      stephenw10 Netgate Administrator
                      last edited by

                      Looks good, is the repo working?

                      Steve

                      1 Reply Last reply Reply Quote 0
                      • S
                        SenseFOX
                        last edited by

                        Thanks for helping so far!

                        For running pkg_tester.php I had to add one file in the folder "pfSense/packages". I copied the file "pkg_config.8.xml" and renamed in "pkg_config.xml. Otherwise it did not work because it can not find the version. This is not normal!? ;-)

                        I used the "tag" code from pfSense/xmlrps-server/RELENG_2_1_3  and  pfSense/packages/RELENG_2_1_5.

                        The repo is not working. The connection to the repository shows the following again: "Unable to retrieve package info from …". From the pfSense, this address can successfully ping. The folder structur of the root you can see in the attachment.

                        folder_structure.jpg
                        folder_structure.jpg_thumb
                        pfSense_package_pkg_config.jpg
                        pfSense_package_pkg_config.jpg_thumb

                        1 Reply Last reply Reply Quote 0
                        • S
                          SenseFOX
                          last edited by

                          I also tried these two types…it remains exciting.

                          folder_structure_poss.jpg
                          folder_structure_poss.jpg_thumb

                          1 Reply Last reply Reply Quote 0
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            The output from pkg_tester looks like it's not in the server root but inside a pfSense folder. Is that still the case?

                            Steve

                            1 Reply Last reply Reply Quote 0
                            • S
                              SenseFOX
                              last edited by

                              It is in both now.

                              localhost/pfSense/pkg_tester.php

                              and

                              localhost/pkg_tester.php

                              tmp.jpg_thumb
                              tmp.jpg

                              1 Reply Last reply Reply Quote 0
                              • S
                                SenseFOX
                                last edited by

                                It works! :-)) mistake in virtual machine

                                1 Reply Last reply Reply Quote 0
                                • S
                                  SenseFOX
                                  last edited by

                                  Version 2.0 and Version 2.1  works !

                                  but 2.1.5 the latest version does not want so far…

                                  1 Reply Last reply Reply Quote 0
                                  • stephenw10S
                                    stephenw10 Netgate Administrator
                                    last edited by

                                    Nice.  :)
                                    2.0 and 2.1 working but later versions not working are the exact symptoms described in the thread you linked to.

                                    Steve

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      SenseFOX
                                      last edited by

                                      To run pfSense Version 2.1.5 the URL must not be an ip address. It has to be a name. To resolve the address in an ip you can make an entry in /etc/hosts.  ;)

                                      To test the repo I downloaded a package. I changed the URL in <depends_on_package_base_url>.

                                      <depends_on_package_base_url>https://Webserver/packages/8/All/</depends_on_package_base_url>

                                      This works, but I can not change the URL from the <config_file><config_file>https://packages.pfsense.org/packages/config/phpsysinfo/phpsysinfo.xml</config_file>

                                      I think the problem is, that my Webserver can not show the xml file.</config_file></depends_on_package_base_url>

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        SenseFOX
                                        last edited by

                                        I followed the instructions at http://codenaut.blogspot.de/2009/03/setup-apache-to-serve-xml-files.html.

                                        I added these two lines in httpd.conf within "<ifmodule mime_module="">"

                                        AddType application/xhtml+xml .xhtml .xml

                                        AddEncoding xhtml xml

                                        still not works - an idea?

                                        In the Attachment you see the outputs from Firefox and FreeBSD Browser - different outputs…

                                        localhost/packages/config/phpsysinfo/phpsysinfo.xml

                                        The output is not the same to

                                        https://packages.pfsense.org/packages/config/phpsysinfo/phpsysinfo.xml

                                        xmlfile.jpg
                                        xmlfile.jpg_thumb</ifmodule>

                                        1 Reply Last reply Reply Quote 0
                                        • stephenw10S
                                          stephenw10 Netgate Administrator
                                          last edited by

                                          I do remember having to make some chage to the Apache config to allow it to serve files rather than interpreting them but I'm fairly sure that was php. Hmm, could be wrong it was a long time ago.  :-\

                                          Steve

                                          1 Reply Last reply Reply Quote 0
                                          • S
                                            SenseFOX
                                            last edited by

                                            I believe you mean the .htaccess file.

                                            The Browsers show the files different, so I downloaded the file to see exactly what is wrong.
                                            I get the file from my Webserver without the content in brackets.

                                            –-------------------------------------------
                                            It works! :-)

                                            There are two MIME Types of XML

                                            AddType text/xhtml+xml .xhtml .xml

                                            AddEncoding xhtml xml

                                            xml_with_brackets.jpg
                                            xml_with_brackets.jpg_thumb
                                            xml_without_brackets.jpg
                                            xml_without_brackets.jpg_thumb

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.