The pfSense Store

Author Topic: HOWTO: Build your own package repository  (Read 3940 times)

0 Members and 1 Guest are viewing this topic.

Offline kaarposoft

  • Jr. Member
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
HOWTO: Build your own package repository
« on: May 28, 2010, 01:17:59 pm »
Dear pfSense 2.0 package users,

There has been some issues with wrong FreeBSD package versions lately:

In order to work around those issues and provide a patch, I have set up my own package repository.

I provide this "HOWTO" in the hope that it may help others with the same problems to debug and/or work around similar issues.

First of all: There is some documentation on this on the Wiki already. Read those first:

Step 1: Webserver
Set up your own webserver (visible from the pfSense box).
Enable php. On an Apache2 server this would be

AddHandler php5-script php
AddType text/html php


Step 2: Packages
Go to the root of the Webserver and:

git clone http://gitweb.pfsense.org/xmlrpc-server/mainline.git pfSense
git clone http://gitweb.pfsense.org/pfsense-packages/mainline.git packages


Step 3: Test
browse http://yourserver/pfSense/test.php
and http://yourserver/pfSense/pkg_tester.php
Both should show a php array.

Step 4: Have pfSense use the repository
Go to the pfSense GUI.
Paste this as the path: /pkg_mgr_settings.php
Enter the URL of your server

Step 5: Check it out
And now - yo and behold - go to the GUI under System -> Packages
and those should be served by your own new repository

Step 6: Patch and play
Now you can patch the package configuration files, and install your own modified packages!

Step 7: Report bugs
Open a ticket at http://redmine.pfsense.org with your patched changes so they can be fixed for everyone else

/Henrik
« Last Edit: May 29, 2010, 05:09:37 am by kaarposoft »

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14976
  • Karma: +4/-0
    • View Profile
Re: HOWTO: Build your own package repository
« Reply #1 on: May 28, 2010, 02:16:24 pm »
Step 7:

Open a ticket at http://redmine.pfsense.org with your patched changes so they can be fixed for everyone else :D
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline kaarposoft

  • Jr. Member
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: HOWTO: Build your own package repository
« Reply #2 on: May 28, 2010, 04:02:29 pm »

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14976
  • Karma: +4/-0
    • View Profile
Re: HOWTO: Build your own package repository
« Reply #3 on: May 28, 2010, 04:04:29 pm »
Well I meant for others who read this later. If they go through the trouble of making their own package repo and they know how to fix a bug, it would be nice if they fed their patches back into the system.

I may take some of this post and fill out the "Developing Packages" page on the Wiki if you don't mind, and/or make this a sticky.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline kaarposoft

  • Jr. Member
  • **
  • Posts: 44
  • Karma: +0/-0
    • View Profile
Re: HOWTO: Build your own package repository
« Reply #4 on: May 29, 2010, 05:11:32 am »
I added step 7 to the original post.
And yes, by all means: You are welcome to use the content of the post in any way you see fit!

Offline Evgeny

  • Hero Member
  • *****
  • Posts: 1808
  • Karma: +0/-0
    • View Profile
Re: HOWTO: Build your own package repository
« Reply #5 on: May 31, 2010, 11:32:24 am »
Is it version 2.0 specific? It seems the same procedure is correct for 1.2.3 users, no?
Thanks.

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14976
  • Karma: +4/-0
    • View Profile
Re: HOWTO: Build your own package repository
« Reply #6 on: May 31, 2010, 11:37:07 am »
It should work for both, but altering the package repo setting as described only works on 2.0. On 1.2.3 you need to edit /etc/inc/globals.inc and alter the xmlrpcbaseurl setting by hand.

As for the package definitions, for 2.0 you edit pkg_config.8.xml (or the amd64 version) and for 1.2.3 it's pkg_config.7.xml.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14976
  • Karma: +4/-0
    • View Profile
Re: HOWTO: Build your own package repository
« Reply #7 on: June 21, 2010, 12:20:41 pm »
I beefed this up a bit and imported it into the Doc Wiki:

http://doc.pfsense.org/index.php/Creating_Your_Own_Package_Repository
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!