
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.sabayonlinux.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.sabayonlinux.org/index.php?title=Converting&amp;feed=atom&amp;action=history</id>
		<title>Converting - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.sabayonlinux.org/index.php?title=Converting&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://wiki.sabayonlinux.org/index.php?title=Converting&amp;action=history"/>
		<updated>2013-06-19T07:09:20Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.4</generator>

	<entry>
		<id>http://wiki.sabayonlinux.org/index.php?title=Converting&amp;diff=11190&amp;oldid=prev</id>
		<title>Noir.baumann: /* Arch Linux */</title>
		<link rel="alternate" type="text/html" href="http://wiki.sabayonlinux.org/index.php?title=Converting&amp;diff=11190&amp;oldid=prev"/>
				<updated>2012-02-08T17:24:02Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Arch Linux&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Wip}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This page is supposed to show people coming from or going to a different distribution how some things compare with gentoo. It's a pragmatic comparison and doesn't judge which one is better.&lt;br /&gt;
&lt;br /&gt;
This is very incomplete. Please add anything you know about any distro you think is important. Please note, some distros are using another distro's CLI interface (for example, the same package manager), in that case, please use the name of the distribution which was the first to use it.&lt;br /&gt;
&lt;br /&gt;
== Package management ==&lt;br /&gt;
Where Gentoo has portage and emerge, Debian has, among others, apt. This is to show you how you use either to handle updates, installs, and so forth. Debian has mainly two package management tools: apt and aptitude ( the first with supercow powers, checkout apt-get moo; the second unfortunately not ). This TIP will show commands with both tools for the sake of clarity.&lt;br /&gt;
&lt;br /&gt;
{{Box Note|Be careful with the pacman commands for Arch Linux. The option -S means it'll try to synchronize, so every time the option -S is given, pacman will try to contact with the Arch repository servers.}}&lt;br /&gt;
=== Updating package database on your system ===&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
 emerge --sync&lt;br /&gt;
==== Debian ====&lt;br /&gt;
 apt-get update&lt;br /&gt;
 aptitude update&lt;br /&gt;
Note: The use of aptitude is recommended over apt-get due to more intelligent dependency handling&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
 pacman -Sy&lt;br /&gt;
&lt;br /&gt;
=== Updating packages on your system ===&lt;br /&gt;
Updating all packages, only pretending the operation:&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
 emerge --deep --update --pretend world&lt;br /&gt;
or&lt;br /&gt;
 emerge -Dupv world&lt;br /&gt;
&lt;br /&gt;
To keep the consistency of your system (with clean), it's better to type :&lt;br /&gt;
 emerge -DNauv world&lt;br /&gt;
 emerge --depclean -av&lt;br /&gt;
 revdep-rebuild&lt;br /&gt;
&lt;br /&gt;
==== Debian ====&lt;br /&gt;
 apt-get upgrade --simulate&lt;br /&gt;
 aptitude upgrade --simulate&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
 pacman -Qu&lt;br /&gt;
&lt;br /&gt;
=== Update a particular package ===&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
 emerge --update package1 package2&lt;br /&gt;
or&lt;br /&gt;
 emerge -u package1 package2&lt;br /&gt;
&lt;br /&gt;
==== Debian ====&lt;br /&gt;
 apt-get upgrade package1 package2&lt;br /&gt;
 aptitude upgrade package1 package2&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
 pacman -S package1 package2&lt;br /&gt;
&lt;br /&gt;
=== Installing packages ===&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
 emerge package1 package2&lt;br /&gt;
==== Debian ====&lt;br /&gt;
 apt-get install package1 package2&lt;br /&gt;
 aptitude install package1 package2&lt;br /&gt;
Debian source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get source package1&lt;br /&gt;
(optional: customize the build by modifying the debian/rules makefile)&lt;br /&gt;
(or set environmental variables like DEB_BUILD_OPTIONS)&lt;br /&gt;
(note that this will make your bug reports invalid to the maintainer)&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -uc -b&lt;br /&gt;
 dpkg -i generatedpackagename&lt;br /&gt;
Simplified source compile:&lt;br /&gt;
 apt-get build-dep package1&lt;br /&gt;
 apt-get -b source package1&lt;br /&gt;
 (the packages are automatically generated using the -b switch above)&lt;br /&gt;
Apt-Build, clean and easy way ( install the package apt-build )&lt;br /&gt;
 apt-build install package1 package2&lt;br /&gt;
{{Box Note|This process can be used to backport packages from testing and unstable by simply adding their respective source repositories to sources.list, which is similar to adding ~x86 to package.keywords in Gentoo. This is explored further in &amp;quot;arch and repositories&amp;quot; below.}}&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
 pacman -S package1 package2&lt;br /&gt;
&lt;br /&gt;
=== Reinstall a particular package ===&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
 emerge --oneshot package1 package2&lt;br /&gt;
==== Debian ====&lt;br /&gt;
 apt-get install --reinstall package1 package2&lt;br /&gt;
 aptitude reinstall package1 package2&lt;br /&gt;
{{Box Note|You ''rarely'' need to reinstall a package on Debian}}&lt;br /&gt;
&lt;br /&gt;
for those of us who tinker with things we should not, reinstalling does not always work, for those occasions we can use&lt;br /&gt;
 dpkg --purge --force-depends apache2-common&lt;br /&gt;
and then&lt;br /&gt;
 apt-get install apache2-common&lt;br /&gt;
[http://www.debian-administration.org/articles/176 http://www.debian-administration.org/articles/176]&lt;br /&gt;
&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
 pacman -Sf package1 package2&lt;br /&gt;
&lt;br /&gt;
=== Searching package database ===&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
To search the package names and descriptions:&lt;br /&gt;
 emerge --searchdesc searchword&lt;br /&gt;
On Gentoo, it's actually much better to install and use either the esearch package or the eix package to do a search. You use them like this:&lt;br /&gt;
 eix searchword&lt;br /&gt;
or&lt;br /&gt;
 esearch searchword&lt;br /&gt;
==== Debian ====&lt;br /&gt;
 apt-cache search searchword&lt;br /&gt;
 aptitude search searchword&lt;br /&gt;
Both emerge, aptitude and apt-cache search support [[regex|regular expressions]].&lt;br /&gt;
To get the long package information on Debian (searching only in package names):&lt;br /&gt;
 aptitude show searchword&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
 pacman -Ss searchword&lt;br /&gt;
&lt;br /&gt;
To get more information about a package in Arch Linux, run&lt;br /&gt;
&lt;br /&gt;
 pacman -Si packagename&lt;br /&gt;
&lt;br /&gt;
=== List of Packages Installed ===&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
 equery list&lt;br /&gt;
equery is part of the gentoolkit package. If you don't have it, emerge that first:&lt;br /&gt;
 emerge gentoolkit&lt;br /&gt;
==== Debian====&lt;br /&gt;
 dpkg -l&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
 pacman -Qs  #This will list all packages with their descriptions&lt;br /&gt;
 pacman -Q   #This lists all packages with their versions&lt;br /&gt;
 pacman -Qq  #This lists just the package names&lt;br /&gt;
&lt;br /&gt;
=== Removing packages ===&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
 emerge --unmerge package1 package2&lt;br /&gt;
or&lt;br /&gt;
 emerge -C package1 package2&lt;br /&gt;
&lt;br /&gt;
==== Debian ====&lt;br /&gt;
 apt-get remove package1 package2&lt;br /&gt;
 aptitude remove package1 package2&lt;br /&gt;
or to remove along with all configuration files&lt;br /&gt;
 apt-get remove --purge package1 package2&lt;br /&gt;
 aptitude purge package1 package2&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
 pacman -R package1 package2&lt;br /&gt;
&lt;br /&gt;
=== Only downloading packages ===&lt;br /&gt;
This can be useful e.g. if you're on a dial-up connection and want to download everything first and install later.&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
 emerge --fetchonly package1 package2&lt;br /&gt;
or &lt;br /&gt;
 emerge -f package1 package2&lt;br /&gt;
&lt;br /&gt;
==== Debian ====&lt;br /&gt;
 apt-get install --download-only package1 package2&lt;br /&gt;
 aptitude install --download-only package1 package2&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
 pacman -Sw package1 package2&lt;br /&gt;
&lt;br /&gt;
=== Cleaning up downloaded packages ===&lt;br /&gt;
Compressed packages that were downloaded for installation can easily consume gigs of hdd space.&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
 rm -rf /usr/portage/distfiles/*&lt;br /&gt;
To only remove outdated packages you will need to install the gentoolkit package and use eclean:&lt;br /&gt;
 eclean distfiles&lt;br /&gt;
Cleaning temporary files from emerging packages:&lt;br /&gt;
 rm -rf /var/tmp/portage/*&lt;br /&gt;
==== Debian ====&lt;br /&gt;
 apt-get clean&lt;br /&gt;
 aptitude clean&lt;br /&gt;
Only remove outdated packages:&lt;br /&gt;
 apt-get autoclean&lt;br /&gt;
 aptitude autoclean&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
 pacman -Scc #Removes ALL packages&lt;br /&gt;
 pacman -Sc  #Only removes the packages that are not installed on the system and/or not the latest version of the package&lt;br /&gt;
&lt;br /&gt;
=== GUI frontends for package management ===&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
himerge, kuroo, portato, porthole&lt;br /&gt;
==== Debian ====&lt;br /&gt;
aptitude, dselect (both ncurses based and a bit cryptic), synaptic (gtk), adept (qt)&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
jacman, gtkpacman, alunn, guzuta, pacmon-svn, pacmanager-svn, kpacupdate, YAPG, shaman&lt;br /&gt;
&lt;br /&gt;
=== Reverse dependencies ===&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
Reverse dependencies are a major drawback of '''Gentoo's''' current portage implementation: It does not take care of them at all at the moment.&lt;br /&gt;
This means that you can uninstall packages needed by others without being warned about it. E.g. you can remove the x server package without portage warning you that kde (which you have installed as well) depends on it. This way you can actually break your entire system (e.g. by removing glibc).&lt;br /&gt;
&lt;br /&gt;
{{Codeline|revdep-rebuild}} can fix broken dependencies broken by {{Codeline|emerge --depclean}}.&lt;br /&gt;
==== Debian ====&lt;br /&gt;
In '''Debian''', reverse dependencies are taken care of by dpkg.&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
Also automatically removed when needed.&lt;br /&gt;
&lt;br /&gt;
== Runlevel &amp;amp; Initscripts ==&lt;br /&gt;
Runlevels work pretty conventionally on Debian. On Gentoo, they are a bit different.&lt;br /&gt;
=== Directories and files ===&lt;br /&gt;
In '''Debian''' runlevels are named conventionally (0-6 and S). They are represented by directories in {{filename|/etc/}} called rc*.d (when the default sysv-rc boot loader package is installed; file-rc can be installed instead, and then the relevant file is runlevel.conf).&lt;br /&gt;
* {{Filename|/etc/rc0.d}}&lt;br /&gt;
* {{Filename|/etc/rc1.d}}&lt;br /&gt;
* {{Filename|/etc/rcS.d}}&lt;br /&gt;
* {{Filename|/etc/rc2.d}}&lt;br /&gt;
* {{Filename|/etc/rc3.d}}&lt;br /&gt;
* {{Filename|/etc/rc4.d}}&lt;br /&gt;
* {{Filename|/etc/rc5.d}}&lt;br /&gt;
* {{Filename|/etc/rc6.d}}&lt;br /&gt;
&lt;br /&gt;
In '''Gentoo''', runlevels have the same names, but these are mapped to more self explanatory ones (in {{filename|/etc/inittab}}): &amp;quot;boot&amp;quot;, &amp;quot;default&amp;quot;, &amp;quot;nonetwork&amp;quot;, with the option to [[HOWTO create a run level|add more]]. The directories that represent them are in {{filename|/etc/runlevels/}}:&lt;br /&gt;
* {{Filename|/etc/runlevels/boot}}&lt;br /&gt;
* {{Filename|/etc/runlevels/default}}&lt;br /&gt;
* {{Filename|/etc/runlevels/nonetwork}}&lt;br /&gt;
&lt;br /&gt;
In Gentoo, if a service is not explicitly started in a runlevel, it is stopped when switching to that runlevel! There is no explicit stopping of runlevels as in Debian (/etc/rc?.d/K??service).&lt;br /&gt;
&lt;br /&gt;
In '''both Debian and Gentoo''', which things are started (and stopped) in which runlevels is controlled by links in the runlevel directories to scripts in {{filename|/etc/init.d/}}, e.g.:&lt;br /&gt;
{{Box Code|gentoo $ ls -l /etc/runlevels/boot/hostname|&lt;br /&gt;
 lrwxrwxrwx  1 root root 20 Mar 25  2004 /etc/runlevels/boot/hostname -&amp;gt; /etc/init.d/hostname&lt;br /&gt;
}}&lt;br /&gt;
{{Box Code| debian $ ls -l rcS.d/S40hostname.sh |&lt;br /&gt;
 lrwxrwxrwx  1 root root 21 2004-11-07 00:19 rcS.d/S40hostname.sh -&amp;gt; ../init.d/hostname.sh&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Runlevel management: rc-update, update-rc.d ===&lt;br /&gt;
To manage which things to start in which runlevels, use the following commands:&lt;br /&gt;
&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
 rc-update&lt;br /&gt;
 rc-status --all  (To see the current status and other runlevels)&lt;br /&gt;
To add the cupsd to the default runlevel, do:&lt;br /&gt;
 rc-update add cupsd default&lt;br /&gt;
To remove alsasound from the boot runlevel, do:&lt;br /&gt;
 rc-update del alsasound boot&lt;br /&gt;
Also see this wiki page about [[Rc-update|gentoo runlevel management with rc-update]]&lt;br /&gt;
&lt;br /&gt;
==== Debian ====&lt;br /&gt;
 update-rc.d&lt;br /&gt;
Configure cupsd to be started in runlevels 2, 3, 4, 5, and stopped in 0, 1, 6, with sequence code 20:&lt;br /&gt;
 update-rc.d cupsd start 20 2 3 4 5 . stop 20 0 1 6 . &lt;br /&gt;
or simply:&lt;br /&gt;
 update-rc.d cupsd defaults &lt;br /&gt;
Remove cupsd from all runlevels:&lt;br /&gt;
 update-rc.d -f cupsd remove&lt;br /&gt;
&lt;br /&gt;
== Config Files ==&lt;br /&gt;
&lt;br /&gt;
=== /etc/make.conf and use flags ===&lt;br /&gt;
While in gentoo there are a large number of configuration files which exist to control the behaviour of the package management system, there are comparatively fewer in Debian, as there is no need to dictate how to compile software which is downloaded and tweak/alter this purpose. In gentoo, the file {{filename|/etc/make.conf}} is used for much configuration; this includes ''USE'' flags, which influence which elements of packages are compiled, and which libraries to build support for - common USE flags (USE or -USE to specifically negate support) include 'gtk gnome' for gnome users (and a corresponding -qt -kde -arts) and 'qt kde arts' for kde users. A gentoo user's complete set of use flags may look something like this:&lt;br /&gt;
&lt;br /&gt;
'''USE=&amp;quot;-kde -arts -qt xv truetype bluetooth crypt slang readline gpm berkdb mmx gdbm tcpd pam libwww ssl nls ethereal perl python esd gif imlib sdl oggvorbis mpeg gnome gtk X motif opengl avi png tiff nptl pcmcia nptl ldap eds&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
=== arch and repositories ===&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
Also in {{filename|/etc/make.conf}} is the '''ACCEPT_KEYWORDS''' setting, with (for an X86-based processor) two settings, '''x86''' for stabler packages, and '''~x86''' for bleeding edge packages. It is however not recommended to make this change in {{filename|/etc/make.conf}}. Rather configure this per-package in {{filename|/etc/portage/package.keywords}}. It's enough to put a line into that file naming the package. That file might look like this:&lt;br /&gt;
&lt;br /&gt;
   app-crypt/gpg-agent&lt;br /&gt;
   app-text/docbook-xsl-stylesheets&lt;br /&gt;
   =app-text/docbook-xml-dtd-4.3-r1&lt;br /&gt;
&lt;br /&gt;
The last line says, that ''only'' version 4.3-r1 should be unmasked. Older and newer versions will still be ignored.&lt;br /&gt;
&lt;br /&gt;
==== Debian ====&lt;br /&gt;
Setting this in Debian is slightly more complicated, and is accomplished by setting different 'repositories' in {{filename|/etc/apt/sources.list}} - along with which 'tree' to use for packages; in debian, these are '''stable''', '''testing''', and '''unstable'''. An {{filename|/etc/apt/sources.list}} file for a debian testing user may look something like this:&lt;br /&gt;
&lt;br /&gt;
  deb http://mirrors.kernel.org/debian testing main non-free contrib&lt;br /&gt;
  deb http://www.debian-multimedia.org testing main&lt;br /&gt;
  deb http://security.debian.org testing/updates main contrib non-free&lt;br /&gt;
&lt;br /&gt;
Alternatively, {{filename|/etc/apt/sources.list}} can contain any number of repositories for any trees, and a default tree (this can be overridden using the -t switch on the command line) in {{filename|/etc/apt/apt.conf}}:&lt;br /&gt;
&lt;br /&gt;
   APT::Default-Release &amp;quot;testing&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Per-package settings go in {{filename|/etc/apt/preferences}}, somewhat like Gentoo's {{filename|/etc/portage/package.keywords}}.&lt;br /&gt;
&lt;br /&gt;
=== network ===&lt;br /&gt;
To configure your ethernet interfaces, take a look at:&lt;br /&gt;
&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
{{Box File|/etc/conf.d/net|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
config_eth0=( &amp;quot;192.168.1.100 netmask 255.255.255.0&amp;quot;&lt;br /&gt;
              &amp;quot;192.168.2.100 netmask 255.255.255.0&amp;quot; )&lt;br /&gt;
routes_eth0=( &amp;quot;default via 192.168.1.1&amp;quot; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Note that this has changed recently. For more information please refer to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&lt;br /&gt;
&lt;br /&gt;
==== Debian ====&lt;br /&gt;
{{Box File| /etc/network/interfaces|&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 auto eth0&lt;br /&gt;
 iface eth0 inet static&lt;br /&gt;
  address 192.168.0.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.0.255&lt;br /&gt;
&lt;br /&gt;
 auto eth0:0&lt;br /&gt;
 iface eth0:0 inet static&lt;br /&gt;
  address 192.168.1.1&lt;br /&gt;
  netmask 255.255.255.0&lt;br /&gt;
  broadcast 192.168.1.255&lt;br /&gt;
 # etc.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== X ===&lt;br /&gt;
To configure your X server, take a look at:&lt;br /&gt;
&lt;br /&gt;
==== Gentoo ====&lt;br /&gt;
As root:&lt;br /&gt;
&lt;br /&gt;
 X --configure&lt;br /&gt;
 cp /root/xorg.conf.new /etc/X11/xorg.conf&lt;br /&gt;
&lt;br /&gt;
==== Debian ====&lt;br /&gt;
&lt;br /&gt;
To get a basic X configuration at {{filename|/etc/X11/xorg.conf}} in Debian Stable (codenamed Etch) and unstable (codenamed sid):&lt;br /&gt;
&lt;br /&gt;
 dpkg-reconfigure xserver-xorg&lt;br /&gt;
&lt;br /&gt;
In the older stable release (codenamed sarge) used XFree86 4.3, which uses {{filename|/etc/X11/XF86Config-4}}:&lt;br /&gt;
&lt;br /&gt;
 dpkg-reconfigure xserver-xfree86&lt;br /&gt;
&lt;br /&gt;
=== TODO ===&lt;br /&gt;
&lt;br /&gt;
other configuration files;&lt;br /&gt;
[[zh:TIP Converting from or to Debian]]&lt;br /&gt;
&lt;br /&gt;
=== External Links ===&lt;br /&gt;
&lt;br /&gt;
[http://markhobley.yi.org:9098/FromDebian From Debian To Gentoo]&lt;br /&gt;
&lt;br /&gt;
[http://www.runmap.com/blog/restarting-services-with-php/ Debian Restarting Services]&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Management]]&lt;/div&gt;</summary>
		<author><name>Noir.baumann</name></author>	</entry>

	</feed>