Wrażenia z używania Debiana

Kompilowanie pakietów

Ściąganie pakietów potrzebnych do kompilacji ze źródeł: apt-get build-dep nazwa_pakietu

Ściąganie i kompilacja:apt-get source --compile nazwa_pakietu

W Debianie kwestia instalacji pakietów binarnych została rozwiązana w sposób chyba ostateczny. Nieco trudniej skompilować pakiet źródłowy z własnymi flagami kompilatora. Nie ma (?) żadnego pliku konfiguracyjnego w którym można by zapisać takie flagi. Jedyny sposób to ustawienie zmiennych środowiskowych CFLAGS dla gcc i CXXFLAGS dla g++ i wyeksportowanie. Na razie (po skompilowaniu 6 pakietów)

CFLAGS="-march=i686 -O3"
CXXFLAGS="-march=i686 -O3"

działało za każdym razem bez błędów. Chociaż nie zawsze te flagi są uwzględniane i wtedy trzeba już grzebać się w konfiguracji pakietu. Np. gimpowi potrzebna jest zmienna CC="gcc -march=i686 -O3"

Doinstalowywanie dodatkowych pakietów z unstable do testing

Z maila Matijsa van Zuijlena:

Put both testing and unstable in sources.list, then tell apt-get to use testing by default by putting this in /etc/apt/apt.conf: Apt::Default-Release "testing"; Then, when you want to intall something from unstable (e.g., galeon), say (after apt-get update'ing of course): apt-get -t unstable install galeon That's it. You may want to see what will be installed from unstable first using the -s flag. Matijs

Depending on how your APT sources and APT preferences is set, and how you specify the installation command, that situation can occur E.g. if you install a package and it exists in testing but the libraries it depends on exist in stable but the package depends on versions from stable, and you have set stable to a higher priority than testing, then you cannot just install it by e.g. apt-get install somepackagename, in that case you'll have to set the target to testing so that it takes the dependencies from testing also, e.g. with apt-get install somepackagename -t testing Depending on exactly how you have configured APT to behave, these situations aren't uncommon. But to avoid this kind of issue, have apt sources for the version you want to run primarily, and have your APT preferences set to highest priority for that one as well. Example: I run Debian testing ('etch') primarily but also have APT sources present for the others Relevant portion from my /etc/apt/sources.list: Code: # Sarge (stable 3.1) deb http://ftp.se.debian.org/debian sarge main contrib non-free # Etch (testing) deb http://ftp.se.debian.org/debian etch main contrib non-free # Sid (unstable) deb http://ftp.se.debian.org/debian sid main contrib non-free # Experimental deb http://ftp.se.debian.org/debian ../project/experimental main contrib non-free # Security updates deb http://security.debian.org/ sarge/updates main contrib non-free deb http://security.debian.org/ etch/updates main contrib non-free And my /etc/apt/preferences, with testing set to highest priority Code: Package: * Pin: release a=stable Pin-Priority: 500 Package: * Pin: release a=testing Pin-Priority: 700 Package: * Pin: release a=unstable Pin-Priority: 600 Package: * Pin: release a=experimental Pin-Priority: 1 dastrike

Różne przydatne funkcje:

Wydruk wszystkich aktualnych pakietów:dpkg -l

,,Aby stworzyć kopię lokalnie wybranych pakietów:'' dpkg --get-selections > mojepakiety

Ten plik można przenieść do innego systemu i zainstalować te pakiety poprzez: dpkg --set-selections < mojepakiety