Offizielle Binärpakete für pkg

Rakor

Administrator
Teammitglied
Das FreeBSD-Team hat heute das lange ersehnte offizielle Repository für das neue Paketmanagementsystem pkg (auch pkgng genannt) freigegeben.

Ab FreeBSD 10 wird es das Standardwerkzeug für Binärpakete werden.

Vor der Verwendung von pkg muss eine bereits bestehende Paketdatanbank auf pkg portiert werden. Wer die offiziellen Pakete verwenden möchte muss anschliessend noch die Konfiguration von pkg anpassen.

We are pleased to announce that official binary packages are now
available for pkg, the next generation package management tool for FreeBSD.

Pkg allows you to either use ports with portmaster/portupgrade or to
have binary remote packages without ports.

We have binary packages available for i386 and amd64 on
8.3,8.4,9.1,9.2,10.0 and 11 (head).

Pkg will be the default starting in FreeBSD 10.

The pkg_install suite of tools pkg_create(1), pkg_add(1), and
pkg_info(1) (which ports also use), are deprecated and will be
discontinued in roughly 6 months. A communication regarding the
deprecation of the pkg_install suite of tools will be sent separately in
the future.

If you are currently not using pkg and wish to, run the following as
root. Be sure not to add WITH_PKGNG=yes to your make.conf until after
pkg is installed.

# cd /usr/ports/ports-mgmt/pkg && make install clean
# echo WITH_PKGNG=yes >> /etc/make.conf
# pkg2ng

You can now either continue to use ports with portmaster/portupgrade, as
before or switch to using binary packages only.


To use binary packages:

1. Ensure your pkg(8) is up-to-date. 'pkg -v' should say at least
1.1.4_8. If it does not, first upgrade from ports.
2. Remove any repository-specific configuration from
/usr/local/etc/pkg.conf, such as PACKAGESITE, MIRROR_TYPE, PUBKEY.
If this leaves your pkg.conf empty, just remove it.
3. mkdir -p /usr/local/etc/pkg/repos
4. Create the file /usr/local/etc/pkg/repos/FreeBSD.conf with:
FreeBSD: {
url: "http://pkg.FreeBSD.org/${ABI}/latest",
mirror_type: "srv",
enabled: "yes"
}

* Note that pkg.FreeBSD.org does not have a browsable web page on it and
does not have a DNS A record. This is intended as it is an SRV host.
pkg(8) knows how to properly use it. You can use 'pkg search' to browse
the available packages in the repository.

Mirrors you may use instead of the global pkg.FreeBSD.org:

pkg.eu.FreeBSD.org
pkg.us-east.FreeBSD.org
pkg.us-west.FreeBSD.org

Your system is now ready to use packages!

Refer to the handbook section on pkgng for usage at
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/pkgng-intro.html.
Also see 'man pkg' for examples or 'pkg help'.


Packages are built weekly from a snapshot of the Ports Collection every
Wednesday morning 01:00 UTC. They typically will be available in the
repository after a few days.

Pkg 1.2 will be released in the coming month which will bring many
improvements including officially signed packages. FreeBSD 10's pkg
bootstrap now also supports signed pkg(8) installation.


Regards,
Bryan Drewery
on behalf of portmgr@
 
Sehr schön. Das Ende einer langen Reise. :)

Man sollte zu "pkg2ng" vielleicht noch sagen, dass die alte Paketdatenbank einfach nicht alle notwendigen Informationen für pkg beinhaltet und die entsprechenden Werte auf Standardvorgaben gesetzt werden. Das hat Nebenwirkungen. Die prominenteste Nebenwirkung ist, dass "pkg autoremove" nicht funktioniert, da nicht erkennbar ist, was vom Nutzer und was als Abhängigkeit installiert wurde. Außerdem können Abhängigkeiten nicht registriert sein. Das ist zwar alles kein Beinbruch, aber wer eh Pakete nutzen will und eine schnelle Internetverbindung hat, tut gut daran von vorn zu beginnen:
Code:
# Backup 
cp -r /usr/local/etc /root/local_etc

# Alle Pakete wegschmeißen
pkg_delete -a

# Aufräumen
rm -Rf /usr/local/ /var/db/pkg/*

# pkg einschalten (nur 8.x und 9.x)
echo 'WITH_PKGNG=yes' >> /etc/make.conf

# Und von vorn (siehe die Ankündigung)
pkg
pkg und Ports lassen sich auch gut miteinander nutzen, solange man sowohl das Repo (was ja gemacht wird) als auch /usr/ports regelmäßig aktualisiert und der Abstand zwischen beiden nicht zu groß wird. Allerdings sollte man beim Nutzen des offiziellen Repos keine Optionen with WITH_NEW_XORG gesetzt haben, denn sonst baut man sich bchstäblich tot. portmaster macht ein Upgrade auf etliche Ports, pkg erzwingt ein Downgrade auf die Repo-Versionen. Große Mengen Pakete mit "pkg lock" zu sperren, ist prinzipbedingt auch nicht so das Wahre.
 
Wobei man vorerst noch überlegen sollte ob man nicht doch noch irgendwas in /usr/local liegen hat! Ich habe z.B. das eine oder andere noch von Hand in /usr/local/bin und dergleichen liegen.
Sinnvoll kann es auch sein sich erst (mit z.B. portmaster) eine Liste aller aktuell installierten Pakete zu sichern (portmaster --list-origins > ~/installed-port-list). Diese Liste natürlich nicht blind wieder reininstallieren da man sonst wieder das autoremove-Feature verliert, aber um später sicher zu sein alles zu haben ist das praktisch.
 
Ich würde nach dem
Code:
pkg_delete -a
noch ein
Code:
find /usr/local \! -name etc -ls
ausführen, dann gucken, was da noch in /usr/local herumliegt und man ggf. noch braucht.
 
Zurück
Oben