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

    New Package: Filer

    Scheduled Pinned Locked Moved pfSense Packages
    14 Posts 4 Posters 9.4k 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.
    • N
      Nachtfalke
      last edited by

      Hi,

      • Sinup at https://github.com/bsdperimeter/

      • Go to pfsense packages and click "fork" https://github.com/bsdperimeter/pfsense-packages

      • Here you can edit existing files and packages. Then click "pull request" an your changes will be send to pfsense-packages and someone of the core team will accept them or not

      The pkg_config.8.xml and pkg_config.8.amd64.xml contain the information where your files are located, package name, version numer and so on. You have to enter your package there so that it appears in the pfsense Package Manager Menu.

      The only way to upload file I know is:
      a) Send to pfsense core team member and ask for upload
      b) Follow this tutorial: http://help.github.com/fork-a-repo/

      I choose b).
      I installed a VM with PC-BSD (you could use any BSD/Linux) and install "git".

      Then:

      
      This clones your fork to your PC:
      git clone https://Nachtfalkeaw@github.com/Nachtfalkeaw/pfsense-packages.git
      
      Then change to the folder "Git" created and do that:
      git remote add upstream git://github.com/Nachtfalkeaw/pfsense-packages.git
      git fetch upstream
      
      Change your username and so on:
      git config --global user.name "surname name"
      git config --global user.email "nachtfalkeaw@web.de"
      git config --global github.user Nachtfalke
      
      Then create folders and copy there the files (.inc, .xml, .php) of your "filer" package to the place where it should be.
      freeradius2 package for example is in /pfsense-packages/config/freeradius2/
      You could create a folder /pfsense-packages/config/Filer/ and place there all your files.
      
      Then add the files you put in to the repo.
      git add FILNAME
      
      After this do:
      git commit -a
      
      You can enter a comment there and you can see which files you have changed.
      
      At least upload your files:
      git push origin master
      
      

      Then go to your github fork and you will see that you have uploaded files. No do a "Pull request" to the original pfsense-packages.

      Thats the way I do it with NEW files because I do not know if the github.com page has a butto to upload files :(
      If I just want to change/edit an existing file I am doing that directly on my fork I did on github.

      1 Reply Last reply Reply Quote 0
      • B
        Briantist
        last edited by

        Thanks; I actually do have my own local repo already and a github account from the changes I made to the HAProxy package. For whatever reason the pull request thing did not work and I had to manually edit each file on github so that marcello could approve them. In this case though, since it's a new package I can't go that route.

        I guess I'll try to again to get the git pull thing working properly, as that's probably the best way to do it going forward, and I will be wanting to make more changes and new packages in the future.

        1 Reply Last reply Reply Quote 0
        • marcellocM
          marcelloc
          last edited by

          Hi Briantist,

          Good to see you on packages again  :)

          Try the way Nachtfalke show you and Tell me if you need help on this.

          To include a file on your repo after git clone, just copy new files to It's new folder under config dir and then:

          git add file1 file2 file3
          git commit –author "yourlogin"
             Include edit info
          git push

          Note that all packages stay under config dir with It's own folder.

          Treinamentos de Elite: http://sys-squad.com

          Help a community developer! ;D

          1 Reply Last reply Reply Quote 0
          • C
            cmb
            last edited by

            I added the category to that page. Just need [[Category:Packages]] in the page.

            1 Reply Last reply Reply Quote 0
            • B
              Briantist
              last edited by

              Okay cool, I was able to do it the right way with the git pull request and such.

              I have a question though. Since I'm running my own repo, I have my pfSense boxes pointed at the repo, and in the config, I have to put my repo URL in order for me to pull the packages. Then when I go to make them public, I have to change them to point to the main pfSense repo. But if I want to make more changes I once again have to change all the URLs. Is there a better way to manage this?

              1 Reply Last reply Reply Quote 0
              • marcellocM
                marcelloc
                last edited by

                you cant try to fake repo ip pointing to your local repo

                Treinamentos de Elite: http://sys-squad.com

                Help a community developer! ;D

                1 Reply Last reply Reply Quote 0
                • N
                  Nachtfalke
                  last edited by

                  @Briantist:

                  Okay cool, I was able to do it the right way with the git pull request and such.

                  I have a question though. Since I'm running my own repo, I have my pfSense boxes pointed at the repo, and in the config, I have to put my repo URL in order for me to pull the packages. Then when I go to make them public, I have to change them to point to the main pfSense repo. But if I want to make more changes I once again have to change all the URLs. Is there a better way to manage this?

                  I am only using the repo on my computer if I need to add new file(s). If I just want to edit some lines I do this in my favourite editor (Notepadd++) and after I finished coding I just copy and paste these using the GitHub page.
                  To see if my changes are working on pfSense I just copy all .XML and .INC files to /usr/local/pkg. That's all.

                  1 Reply Last reply Reply Quote 0
                  • B
                    Briantist
                    last edited by

                    @marcelloc:

                    you cant try to fake repo ip pointing to your local repo

                    Yeah I thought about doing that maybe.. redirecting www.pfsense.org to my repo. I suppose I could still get to the site through the .com. I figured I'd ask in case you guys had any better ideas.

                    I see that the pull request I did was merged, but when I actually try to load the packages on any of my installations, my package is not listed. Is there something else I have to do?

                    1 Reply Last reply Reply Quote 0
                    • N
                      Nachtfalke
                      last edited by

                      @Briantist:

                      @marcelloc:

                      you cant try to fake repo ip pointing to your local repo

                      Yeah I thought about doing that maybe.. redirecting www.pfsense.org to my repo. I suppose I could still get to the site through the .com. I figured I'd ask in case you guys had any better ideas.

                      I see that the pull request I did was merged, but when I actually try to load the packages on any of my installations, my package is not listed. Is there something else I have to do?

                      I think you don't have to.
                      I have similar "problems". I have updated freeradius2 package yesterday to pkg v1.4.3 but it still shows me v1.4.2 in pfsense Package Manager. But on github there are the updated files as far as I can see that. I had this problem on monday I think.

                      Then jimp wrote in another thread that there were problems with the repo and syncing…but not sure at all whats the problem now. :(

                      1 Reply Last reply Reply Quote 0
                      • marcellocM
                        marcelloc
                        last edited by

                        Briantist,

                        I made some improvements on filer package.

                        • Field input check

                        • Option to load an existing file instead of always writing contents to it

                        • script option to run after file update/sync

                        Can you test these changes on your config before I publish it on github?

                        filer.inc.txt
                        filer.xml.txt
                        filer_sync.xml.txt

                        Treinamentos de Elite: http://sys-squad.com

                        Help a community developer! ;D

                        1 Reply Last reply Reply Quote 0
                        • B
                          Briantist
                          last edited by

                          marcello, I am facing a huge backlog of work right now, but I would love to test those changes. Do you mind waiting, maybe a week or so?

                          Thanks; these changes sound good.

                          1 Reply Last reply Reply Quote 0
                          • marcellocM
                            marcelloc
                            last edited by

                            I did a backup of first release.

                            I'll publish it and when you have time test it.

                            If you find any issues, just let me know.

                            Treinamentos de Elite: http://sys-squad.com

                            Help a community developer! ;D

                            1 Reply Last reply Reply Quote 0
                            • B
                              Briantist
                              last edited by

                              Okay that sounds fine; it will be easier for me to test it that way anyway.

                              Also a great add-on to firefox is called "It's All text!" It adds a little edit button to any text box on a web page and lets you "open" it in a text editor of your choice,t hen when you save the file it gets put back into the box. Helpful for editing shell scripts and such with syntax highlighting without having to work on a local file and then upload it again. It makes a great helper to filer!

                              https://addons.mozilla.org/en-US/firefox/addon/its-all-text/

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