pkgng Beta

There's currently no binary package support, in that there are no public repos as yet.

However, you can use portmaster (with the pkgng patch) to install stuff from the ports tree, and register it in the pkgng database. Then you can use the pkg(1) tool to query the database, remove packages, create packages, etc.

Once it's out of beta and ready for more widespread use, then public repos of binary packages will be created.
 
yoxter said:
Looks good, I want to see it in ports. Looks better than pacman.
It surely does not look better than pacman because of the mess represented by the Freebsd FreeBSD binary repositories. It looks more like pkg from Solaris 11, then pkg it is completely another story. It is a mature software, made by a professional software house for a professional distro and because of this it works like a charm when pkgng is the same, old mess again because of the lack of professionality in the FreeBSD world related with package management. That was and that still is the real black hole of an excellent OS. And this is also the reason because I did the same step back I did 15 years ago moving pretty much 95 per 100 of my FreeBSD administered machines to Solaris and Archlinux.
 
Would one of the mods be kind enough to ban piggy from this forum. He or she provides no substance in his or her posts and is a borderline troll that thread-jacks posts often.
 
Maybe piggy could be persuaded to move 100 percent of his servers away from FreeBSD and call it a day? Just an idea. Moreover: this is an end-user forum. Constructive criticism about developments in the base system belongs on the mailing lists where its developers and committers converge and where they may be inclined to respond and take suggestions on board. That is not going to happen in here, where it basically amounts to no much more than a pointless and largely ignored series of rants.
 
Giving this thread a well deserved bump. PKGNG is easily one of the best new developments in FreeBSD. It's now in a state where just about anyone could start using it in place of the old pkg tools.

Link to the PKGNG wiki:

http://wiki.freebsd.org/pkgng

I had very little trouble converting my system to pkgng, few packages had corrupted dependencies in /var/db/pkg and I had to delete them first and reinstall them afterwards with pkgng aware portmaster(8) but otherwise the conversion was very painless.
 
Here, pkg2ng always halts on nullmailer despite it reported being fixed a few versions ago. Also, the png2ng reports "some ports could not be registered" (paraphrased, less than one percent of them.). Maybe a third issue, but I've forgotten since yesterday.
 
You can start with what pkg2ng manages to convert and once you have your favorite ports management tool set up to use pkgng you can reinstall the ports that didn't register properly.
 
There's one handy feature that is not enabled by default and that's tracking of shared libraries. To enable it you have to add this to /usr/local/etc/pkg.conf:

Code:
SHLIBS: YES

Now you can query for example which packages link libxml2.so.5

Code:
# pkg shlib libxml2.so.5
libxml2.so.5 is linked to by the folowing packages:
libxml2-2.7.8_3
netpbm-10.35.85

Of course you'll have to recompile all ports to have the shared library linking information in the database. The above example is incomplete because I had only graphics/netpbm recompiled with SHLIBS set to YES.
 
kpa said:
You can start with what pkg2ng manages to convert and once you have your favorite ports management tool set up to use pkgng you can reinstall the ports that didn't register properly.

Sort of hesitant to do that, I've 38 that did not register (besides nullmailer). About five have newly official conflicts or other unofficial ones. About four have vulnerabilities. Only one I anticipate using this year.

So I'd rather wait until the pkg port goes through version revisions which may help it register a larger percentage on its own sometime in the next year(s)...
 
Make sure you have a consistent /var/db/pkg database before conversion, portmaster(8) can fix most of the problems:

# portmaster --check-depends
# portmaster -s
# portmaster --check-port-dbdir
 
Right now it's to install port ports-mgmt/pkg and run the pkg2ng conversion tool. The wiki has instructions how to use the ports management tools like ports-mgmt/portmaster and ports-mgmt/portupgrade with pkgng.

Note that the pkgng tools do not replace the old tools and the old package database in subdirectories of /var/db/pkg is left intact after the conversion so you'll have to keep in mind which set of tools you're using, especially if you have your own scripts that use the old pkg tools.
 
There are some problems with the SHLIBS feature, pkg(8) can core dump with certain ports when scanning for shared libraries. The work around is to set SHLIBS to NO in enviroment for such ports.

# env SHLIBS=NO portmaster print/teTeX-base

print/teTeX-base was the first such port I found.
 
I've given it a try, and I think it's very promising. However, one thing that I can't find or understand.. If I install php5 for instance, I get the CLI only, no apache module. There seems to be no seperate package for the apache module. Is the only way to build my own repos?

And, the conversion of the usual ports structure, or pkg_* structure is possible, but it doesn't seem to work the other way around? Installing a package with pkg does not give me any entry in /var/db/pkg. So using both together doesn't seem an option. Am I right?
 
Pkgng doesn't change the breakdown of ports in any way, it just updates the package database into a much better one. If the precompiled (with default options) lang/php5 package didn't have the apache module before pkgng it won't have it in pkgng either. You do have the advantage of knowing the options that were set or unset when the package was made in pkgng.

The directories and files under them in /var/db/pkg are rendered obsolete by pkgng, the old database can not express some of the properties of the pkgng database so there is no good way to convert the information backwards. I deleted the subdirectories of /var/db/pkg as soon as I was convinced pkgng works well enough for me. This of course means that you have to update scripts that depend on the old pkg tools to use the pkgng tools to work.
 
kpa said:
Pkgng doesn't change the breakdown of ports in any way, it just updates the package database into a much better one. If the precompiled (with default options) lang/php5 package didn't have the apache module before pkgng it won't have it in pkgng either. You do have the advantage of knowing the options that were set or unset when the package was made in pkgng.

The directories and files under them in /var/db/pkg are rendered obsolete by pkgng, the old database can not express some of the properties of the pkgng database so there is no good way to convert the information backwards. I deleted the subdirectories of /var/db/pkg as soon as I was convinced pkgng works well enough for me. This of course means that you have to update scripts that depend on the old pkg tools to use the pkgng tools to work.

You, or someone else, may know the answer to several questions.

1... If one has a program installed, but failed to register (binaries present but
/var/db/pkg creation failed), is there a way to add it to pkg?
2... I've repeated terse error results using several forms of
Code:
pkg register -l -f -m /var/db/pkg...
...Is there a correct way to do that?
3... pkg2ng catches quite a lot of ports that do not register because two ports install
files into the same place. Is there a way to fix it so they would register (something
like q. 1 above) ?

Unsure if I'd put the answers to use soon, so no great importance...
 
1) 2) I didn't bother trying to fix stuff that had broken/missing/corrupted /var/db/pkg entries and caused pkg2ng to skip them. I deleted and reinstalled those ports.

3) Multiple ports that install the same exact files will not work in pkgng because each file can have only one owner package. Ports that install files into directories owned by some other port will continue to be a problem if the ports are deinstalled out of order.
 
That's my first day with FreeBSD and to tell you the truth, this tool solves all the issues I've encountered in day-1. Good timing :)
 
The latest version of pkg...as far as I can tell... after
Code:
 pkg2ng
had moved all the packages that successfully registered from /var/db/pkg to /var/db/pkg.bak, I was worried until I moved them back (Don't ask me how) and deinstalled pkg... This is a radical change in its result AFAIK.
 
You are supposed to run pkg2ng ever only once and then forget that it exists. The change was to remedy a situation where you run it again unnecessarily overwriting the existing database.
 
I could not see in the FAQ how to tab-complete "into pkg" rather than "into /var/db/pkg/ while...
Code:
portmaster -d -B -P -i -g [FILE]/var/db/pkg/...[/FILE] [FILE]/var/db/pkg/...[/FILE]
. Will that have an
equivalent? The shell autocompletes the command... typing a few characters of the pkg-name in full, and this helps
portmaster choose only one port where if it was given a more inexplicit term, it may want to
upgrade more packages without cause.
 
I'm missing the tab completions too.

pkgng still stores details of installed packages in /var/db/pkg, but they are now in an sqlite database. This means setting up tab completion isn't simply a matter of changing a path in the zsh/bash completions.
 
Back
Top