# migrate a package to pkgng



## minimike (Dec 17, 2013)

Hi there

We are evaluating the proprietary software ESET File-Server Security from our anti-virus vendor_. T_hey still ship their packages in the old style package format. Is they a way to easily convert such a package to the new pkg2ng format?

Cheers Darko


----------



## fonz (Dec 17, 2013)

It has only been a few hours so give it some more time. But if nobody here knows, I suggest you ask on the freebsd-ports@ mailing list.


----------



## kpa (Dec 18, 2013)

I think there was talk about conversion tools for both directions (pkg-> pkg_* and pkg_* -> pkg) but none of the PKG developers have had time to implement them.

Edit: There is pkg-convert(8), I haven't tried it though.


----------



## SirDice (Dec 18, 2013)

The simple solution is to simply pkg_add(1) the old style package, use pkg2ng(8) to convert your system and then use pkg-create(8) to create a new style package. That should work.


----------



## minimike (Dec 19, 2013)

No luck 

I've installed a small VM with FreeBSD 8.4 for this Job. Because the Target is FreeBSD 10 


```
root@:/usr/ports/ports-mgmt/pkg # pkg_info
esets-4.0.10        ESET Security for BSD Servers.
pkg-1.2.4_1         New generation package manager
root@:/usr/ports/ports-mgmt/pkg # pkg2ng
Converting packages from /var/db/pkg
Converting pkg-1.2.4_1...
pkg: fopen(/usr/ports/Keywords/display.yaml): No such file or directory
pkg: unknown keyword display, ignoring @display
pkg: fopen(/usr/ports/Keywords/mtree.yaml): No such file or directory
pkg: unknown keyword mtree, ignoring @mtree
Installing pkg-1.2.4_1... done
Converting esets-4.0.10...
pkg: fopen(/usr/ports/Keywords/srcdir.yaml): No such file or directory
pkg: unknown keyword srcdir, ignoring @srcdir
Installing esets-4.0.10...pkg: package field incomplete: origin
pkg: the package is not valid
pkg: sqlite: cannot rollback - no transaction is active
```

This package is not from ports. Just distributed from another Vendor. Any ideas or we have to die


----------

