Eigene PBI-Paketquelle erstellen

From PC-BSD Wiki
Jump to: navigation, search
This page is a translated version of a page Create Your Own PBI Repository/10.1 and the translation is 12% complete.

By default, AppCafe® displays the PBIs which are available from the official PC-BSD® repository. It also supports custom repositories.

In order to create a custom repository, you need to:

  • create the OpenSSL signing key which will be used to sign the repository's INDEX
  • create the customized modules using EasyPBI
  • generate the custom INDEX and sign it with the key

This section describes these steps in more detail.


Create the Signing Key

The INDEX of a PBI repository must be digitally signed for security and identification purposes. In order to sign the INDEX, first create an OpenSSL key pair using the following commands:

openssl genrsa -out privkey.pem 4096 Generating RSA private key, 4096 bit long modulus ..................++ .............................................................................++ e is 65537 (0x10001) openssl rsa -in privkey.pem -pubout > pub.key writing RSA key

These commands will create the files privkey.pem and pub.key.

Create the Customized Modules

To create the customized PBI modules, follow the instructions in EasyPBI and Bulk Module Creator. If the repository directory is ~/myrepo/, make sure that all of the custom modules are listed as subdirectories of that directory.

Next, configure a FTP, HTTP, or HTTPS server to host the directory containing the custom PBI modules. The server can be a public URL on the Internet or a private LAN server, as long as it is accessible to your target audience. Ensure that this directory is browsable by an FTP client or web browser from a client system before moving on to the next step.

Generate the Custom INDEX

To generate the signed INDEX, cd to the directory containing the PBI modules and run pbi_makeindex, specifying the path to the private key. In this example, the PBI modules are located in ~/myrepo and the key is located in the user's home directory (~). Be patient as it will take a few minutes to generate the INDEX and return the command prompt.

cd ~/myrepo
fetch https://github.com/pcbsd/pcbsd/raw/master/pbi-modules/PBI-categories
pbi_makeindex ../privkey.pem
Building PBI-INDEX... This may take a few moments...
Fetching PBI ratings file...
/tmp/.PBI.19956/.ratings                      100% of   71 kB  134 kBps 00m00s
Adding additional package information to PBI-INDEX...
Compressing PBI-INDEX...

This will create the files PBI-INDEX.txz and PBI-INDEX.txz.sha1.

Import the Repository

To configure AppCafe® to use the custom repository, go to Configure → Repository Settings. Click "Custom" in the screen shown in Figure 7.4a, then the "+" button. Input the URL to the repository and click "OK".

Figure 7.4a: Add the Custom Repository to AppCafe®

It will take a few minutes for AppCafe® to read in the INDEX for the custom repository.

Other languages:German 12% • ‎English 100%
Personal tools