LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2302|回复: 22

树大招风,我发现lunar,sourcemage等的源码编译版本都要和Gentoo比较:)

[复制链接]
发表于 2006-4-11 20:07:26 | 显示全部楼层 |阅读模式
Lunar的比较大家可能看过了,现在大家看看:
http://www.sourcemage.org/Gentoo
Differences with Gentoo
Submitted by sandalle on Fri, 2005-07-15 18:32.
This is the place if you've ever wondered why you should use SMGL instead of Gentoo. (Scroll to the bottom to see the original Page intact.)

DisclaimerMaking a document that describes differences will always be a moving target as both systems have stable and development versions at varying levels of completion and feature-richness, both may have different concepts that are better for one thing and worse for another but yet may provide the same power with differences in usability. This document doesn't intend to incite a flame war, and it must be remembered that some information was had by maybe not the best of evidence (i.e. gentoo users themselves).

Package Manager


Sorcery is written in Bash (smaller), Portage is written in Python.
33,000 lines of code in Sorcery.
Sorcery has default dependency and configuration support, which is similar to, but easier than portage's USE flag functionality, guiding you with descriptive prompts and even letting you override configure switches by hand on a per-spell basis.
Sorcery will ask if you want aalib support for mplayer, then adjust ./configure options explicitly wherever possible. Configure flags can also be edited on a per-spell basis easily (now supported in Portage as well). Ebuilds send different configure flags too, when different USE flags are sent, and they are enforced with a verify script. They also support user-custom configure flags with EXTRA_ECONF like how sorcery does configure overrides.
Sorcery has a curses menu to choose most of the useful options, Portage requires you to read their 6 section guide: (http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3 working with portage) for optimal use.
Sorcery has parallel download and compile, portage has this implemented in cvs, but it is possible to do manually in stable due to download locking (emerge -f list &); emerge list.
Sorcery has full-tree problem resolution, where it doesn't just stop compiling everything if one compile breaks, it stops compiling only those that depend on it. Gentoo kills the entire compile.
Sorcery is less serial and more organized. Portage could use some cleanup. The old sorcery codebase from Sorcerer days has been completely rewritten and modularized.
Gentoo supports multiple package versions installed at the same time (slots), but this is only on some ebuilds and on the few ebuilds where this is needed. Source Mage tends to have a second spell for the older version, instead when this is needed.
Large, one-shot casts in Source Mage allow full-tree dependency ordering on upgrades so that upgrades are computed and done in the proper order (upgrading XFCE or freedesktop.org's Xserver becomes a snap). Portage supports this with the -D option, but not by default. You have to specify if you want upgrades in portage with -u, also.
Source Mage has providers, Gentoo has virtuals (many spells/packages that satisfy a single dependency).
Sorcery has enhanced resurrect support for binary caches. Portage has similar functionality, but it isn't as self-contained as a spell's tableted cache file.
The cleanse tool for self-healing dependency problems and file corruption through many integrity checks. Gentoo has three ways to do something like this: revdep-rebuild, depclean, equery.
Downstream and upstream dependency casting (-R and -B) to also fix dependency problems due to even more complex api problems. I haven't found a gentoo equivalency yet for this, but it could probably be scripted.
Prelinking and symbol stripping are supported for those who use big C++ apps like KDE. Gentoo is also prelink-aware and can strip symbols.
A C++ compiler is not required as part of the basesystem for even tighter installs. Gentoo is supposed to support this eventually, no ETA yet that I am aware of.
Source Mage has a rich provider and conflicts logic and optional dependency system that is competitive with gentoo (for the most part identical in power except their triggers replacement, "cdepends" is not yet in CVS).
triggers support strange ABI/API problems that are always the case (kernel upgrades, python spell upgrades) or are hard for a cleanse to detect.
Again, it's all written in bash, and we consider Sorcery an example of the power of bash for high-level application development.
Possible disadvantages


Sorcery had no config update merging tool(no dispatch-conf like on gentoo). The init config supports merging directly. Support for advanced config file merging is in devel sorcery, as well.
Platform SupportSource Mage prioritizes polish over more direct arch support, however, archspecs are available for many platforms.

Sourcemage: x86, AMD64, PowerPC, and UltraSparc
Gentoo: at least: x86, AMD64, PowerPC(MacOS/32/64), UltraSparc, Alpha, MIPS, SO X, s390, arm, and HPPA processors
Init System


Source Mage supports parallel init like Midori Linux does. Gentoo supports parallel init as well, although their boot sequences are derived from dependencies statically. Source Mage's are derived on-the-fly.
Installer


Source Mage has had an official ISO since its inception. It only installs the bare minimum. Users are expected to use it to rebuild and bootstrap into a fully-featured server or desktop. Curses-based unguided and guided menus make it simple to install for short- and long-time Linux users, and the shell is always there to customize further.
Gentoo has no official ISO installers, although they have installers and liveCDs at different stages of the install process. Users are expected to build it from their long documentation (althouth the stage ISOs available have lowered this expectation).
Community


The Source Mage community consists mostly of developers and users in open exchange and easy access on the mailing lists and IRC channels. Source Mage has always existed based upon a Social Contract similar to Debian, but slightly more FSF-based. Source Mage's community is older than Gentoo's, but not as large. Source Mage doesn't advertise itself heavily, and would rather concentrate on solid code than the next way to self-promote.
Gentoo has highly active forums, but their users are known for their Slashdot flame wars, thread hijacking, and poor behavior (c.f. their freenode IRC channel). Gentoo started as a for-profit corporate entity, but became non-profit later.
Spell Grimoires vs. PackagesSource Mage


The Source Mage grimoires are similar to Debian, but with a much shorter turnaround time. Devel, test, and stable grimoires are available as well as the ancillary z-rejected and games grimoires.
Tablet and custom-grimoire support allow a Source Mage user to easily keep old versions behind. Sorcery allows spell downgrading to previous versions of spells that have already been compiled easily. Sorcery also allows spell holding and the use of scribbler to keep a spell downgraded.
Security updates are rarely backports and usually version updates, unless the upstream maintainer is not releasing version updates. Version updates typically fix more than a backport will fix, so this can be considered a security enhancement, but see possible disadvantages below.
Source Mage supports the latest versions and stable versions directly. There is very little reason to stay back versions in Source Mage because it is source-based and our binary dependency fixing is literally unmatched. Even C++ ABI changes are relatively painless with our cleanse --fix tool.
Packages with a devel and stable branch will typically allow an option to compile the stable or devel version in the spell directly, with both being supported.
Bug fixes go into devel first and once working, go into test. From test, after a couple weeks of stability, they will go into stable. Exceptions usually are made for API-consistency such as gcc major version updates as we update or patch spells for consistency before major integrations like that.
Source Mage grimoires are designed to be API-consistent unless they explicitly conflict.
300,000 lines of code in the devel grimoire alone.
Gentoo


Gentoo packages are masked rather than integrated to static grimoires. This makes the package database rather large and old versions, though they are kept, may not be entirely useful due to API changes and the complexity they introduce for the user to manage. It can be said that Gentoo's masking is a feature to improve choice and allow easier multiple version use. In Source Mage this feature is rarely asked for due to the high quality and freshness of the spells and the ease in which older versions can be used with the use of scribbler.
Possible DisadvantagesA digression on update philosophies


Source Mage doesn't keep old versions of our spells around, nor spells for older versions. Although they are maintained in the Source Code Manager, the maintenance overhead for publishing it is problematic. Even Gentoo is unable to tackle the systematic complexities of supporting arbitrary multiple versions. Focussing on the ability to mix and match the various spells in different ways and high configurability is a higher priority in Source Mage. This makes Source Mage ideally targetted for tinkerers and people on the bleeding edge. Moreover, the possibility that a program you installed when you first install Source Mage is not adequate and the current version in the grimoires is not adequate for your needs is primarily a rare event. The programs where this is most likely to happen are in fact the largest and most likely to require security updates anyways. As the GLSA and security teams don't in fact backport their security patches, the desired support for backport-updating rather than upgrade-updating philosophy installs must come from a vendor specifically targetting a particular snapshot branch as is found in the binary distributions (Red Hat, Mandrake, SuSE? and Debian are common examples) and so-called Linux Standard Base conformant distributions that may target a particular ABI for proprietary binary-compiled application development. Gentoo really wants to claim the advantages of binary distributions with consistent APIs and ABIs and claim the advantages of a continually-updated source-based system. It's stretched at both ends of the stick, and not able to meet both ends completely. Source Mage makes no promises that the ABI will be the same across updates (hence the cleanse tool, for example) and makes no promises that the API will be the same across updates (although it does strive to have API-consistent spells within the main grimoire, and grimoire integrations are planned thusly). [1] Since we are pure in our philosophy, we think you'll have a better overall experience with Source Mage, despite the so-called folk-wisdom of the dark days of the 80's and 90's era CIO.
Devices filesystem (/dev)


Source Mage supports static /dev and udev.
Gentoo supports udev (and /dev with gentoo=nodevfs).
both support devfs, although it is deprecated.
Security


both support selinux enhancements.
both support converting to PAM easily.
both support grsecurity.
Kernel


In Gentoo, you use the normal kernel build process and emerge kernel sources only.
In Source Mage you can do it the old way, or use the linux spell, which will allow you to select patch sets and old versions at will. Source Mage sticks to the vanilla kernel when at all possible, except for major bugs, where the Source Mage team provides patches, although this is not frequent, since the philosophy of Source Mage is to use the upstream sources or as close to them as is possible.
GPG upgrades

Sorcery and the grimoire are GPG-checked to make sure you don't get upgrades from a malicious mirror or man-in-the-middle attack. Spell sources are md5sum or sha1sum checked (or any other installed hashsum) and have gpg-checking.
gentoo portage and anything else emerged is md5sum checked. The portage tree though is rsync'd without verification by default. You can apply this patch http://marc.theaimsgroup.com/?l= ... 75445610083&w=2 and download a gpg file and put it somewhere and edit make.conf to finagle your way into verified snapshot. About the rsync verification, haven't seen a patch for that one yet, just the one implemented by Peter here: http://marc.theaimsgroup.com/?l= ... 13869026476&w=2
Full Disclosure

Source Mage believes in Full Disclosure of security and other problems, as noted in the Social Contract.
Gentoo has agreed to a disclosure embargo through membership in the vendor-sec security list where security researchers and companies are rewarded for reporting security vulnerabilities to the private, limited-membership vendor-sec membership where they are chronologically embargoed for synchronized announcement. This makes them no better than Microsoft's monthly update cycle, purposefully allowing vulnerabilities to fester in the wild. See:
http://www.internetnews.com/dev-news/article.php/3458961
http://lists.debian.org/debian-project/2004/02/msg00059.html
http://www.fedora.us/wiki/VendorSec
GentooSecurity
Multiple Host Management

Source Mage has the cabal feature for managing multiple boxes via ssh. Boxes can be added to the "cabal" and have the same commands run on them all at once.
Gentoo has no multiple host management yet, although there is discussion of a possible corba-based system in the chat room for the future.
How Programs Are Built

Source Mage uses installwatch to get an accurate snapshot of the spell's installation and builds a package after it's been installed in most cases. Devel sorcery (with the new resurrect enhancements) contains support for file-atomic installs as well based on the INSTALL_ROOT feature of Sorcery. Sorcery also supports different *_ROOTs to make cross-compilation and iso development integrated into Sorcery.
Gentoo builds to a separate location (preinstall) and copies it over in shotgun format.
Gentoo Enhancements that already exist in Source MageSome Common Features in Sorcery and Corresponding Feature Requests in GentooSee http://www.gentoo.org/proj/en/glep/

GLEP 3: Ebuild maintainter extension GLEP
Sorcery has supported a MAINTAINER field for five years.

GLEP 4: Gentoo top-level management structure proposal
Source Mage has scheduled admin meetings, a social contract, and a voting process for team leaders.

GLEP 5: Moving data from ebuilds to Metadata.xml
What? Moving data into XML? Heavens, why?

GLEP 9: Package Updating System
Perforce and Scribbler handle all our spell needs. We don't holds stale files and patches around in our spells.

GLEP 11: Web Application Installation
They are installed to /usr/share/$SPELL/, where they should be, as make sense according to the FHS.

GLEP 13: Providing the users with a Gentoo Handbook
We minimally install with an install guide and have extensive wiki documentation from there.

GLEP 14: Security updates based on GLSA
sorcery queue; sorcery review-queue will show you if a proposed update contains a SECURITY FIX (those two works in all caps appear in every security update history entry).

GLEP 15: Gentoo Script Repository
guru-tools spell for gurus, and the smgl spell section for other tools.

GLEP 16: Gentoo Menu System
enthrall handles .desktop files for other WMs using plugin-style backends.

GLEP 17: Resolution for Aging EBuilds
They seem to have a problem keeping up with new ebuild submissions, and are writing many off. Centralized at all?

GLEP 21: User-defined Package Sets
Custom grimoires and symlinks would do what this does -- we never had a system and world target concept to begin with.

GLEP 23: Portage handling of ACCEPT_LICENSE
FSF-approved licenses are located in the main grimoires. FSF-unapproved licenses go into z-rejected grimoire.

GLEP 25: Distfile Patching Support
We md5sum check the uncompressed source. Xdelta is also supported but rarely used because it doesn't operate on bzip2.

GLEP 26: Handling Kernels in Portage
Sorcery has had this for five years. We're on our third generation of kernel configuration.

GLEP 27: Portage Management of UIDs/GIDs
Sorcery has had uid/gid management for a while.

GLEP 29: USE flag groups
Huh? More cruft? Just make the configuration system easy, like it is in Sorcery, with visible, explained, and sane per-spell defaults.

GLEP 33: Eclass Restructure/Redesign
Tablet support in Sorcery, cascading grimoire libraries, and a well-defined sorcery-to-grimoire API allow us to avoid this issue. The GLEP proposal is also mediocre and is only a partial solution.

Original FaqDiff?_Gentoo text:

[The statements I wrote below were things I either learned from gentoo users (for example "pretending to let you install two versions at once" was told to me by a gentoo user), from my own brief experiences using it or from reading the portage code, I did not make any of these claims up, and if you believe they are false (now) please remember that they either werent then, or those gentoo users were confused about their own distribution, which is hardly my fault. Again the comparison below the conversation is more complete and kept up to date. -afrayedknot]

[Here are the main differences between Portage (gentoo's package management) and Sorcery (smgl's package management) according to what said Afrayedknot (Sorcery leader) on our IRC chan.

21:08 <+e-type> I have this boy in my class that's whining about gentoo, but since I don't know anything about it, I can't
tell him any differences between smgl and them
21:10 <+lejatorn> e-type: honestly I don't think there are that many differences, smgl is just well...leeter . I've heard

sorcery's better than portage but I couldn't say since I don't know portage (and I'm not aware of
sorcery's arcanes).
21:10 <+e-type> same here
21:11 <@afrayedknot> sorcery has a lot more cool stuff in it than portage
21:12 <+lejatorn> we would need someone like afrayedknot to really test portage to be sure about which one's the best.
21:12 <+lejatorn> lol

21:12 <@afrayedknot> specifically our --fix code, and the dependency system
21:12 <@afrayedknot> ive read most of the code for portage
21:12 <+lejatorn> sw33t
21:12 <@afrayedknot> our depends system is much more rich and interesting than theirs
21:13 <+lejatorn> hehe

21:13 <@afrayedknot> we also download and compile in parallel for larger casts
21:13 <@afrayedknot> which they dont do
21:13 <+e-type> alrighty :-)
21:13 <@afrayedknot> they have that stuff serialized
21:13 <+lejatorn> that sux

21:13 <@afrayedknot> they beat us on more platforms supported though
21:13 <+e-type> so we're faster when there's a great bulk of packages to cast
21:14 <@afrayedknot> assuming that most of the packages arent downloaded
21:14 <@afrayedknot> if they're all downloaded its about the same
21:14 -!- tommy [~tommy@lns-th2-4f-81-56-223-253.adsl.proxad.net] has joined #sourcemage

21:14 <+e-type> guess you can't speed up GCC
21:14 <@afrayedknot> smgl users will have to spend slightly more time answering our depends questions, but thats justified flexibility IMO
21:15 <@afrayedknot> gentoo just doesnt do that...
21:15 <@afrayedknot> they let you use previous versions of packages whereas we just have our head of line system for most stuff

21:15 <@afrayedknot> and they also pretend to let you install two versions of something at once
21:16 <@afrayedknot> we can sort of do that with install_root+state_root
21:16 <+e-type> so they claim to be flexible, but we have more dependency options
21:16 <+ruskie> total 0wn4g3 )
21:17 < ib> You can run a quick Google search on a subject with: ib google your search string

21:17 <+e-type> ib google my assµ
21:17 < ib> e-type: http://www.cs.wisc.edu/~kovar/hall.html
21:17 <+e-type> hehe
21:19 <@afrayedknot> what else...oh they let you set arbitrary CFLAGS, which we dont fully do (yet) but we will in 1.12
21:19 <@afrayedknot> of course most of the useful options you can choose through our menu anyway

21:19 <@afrayedknot> they have "use flags" as their depends system, which is basically answering yes for all
optional_depends for a certain package, you can do similar things in 1.11 once i finish testing it
21:19 <+lejatorn> afrayedknot: thx for all the explanations, now I can explain ppl why smgl is better.
21:19 <@afrayedknot> they let you run the individual pieces of a package whereas we dont

21:19 <@afrayedknot> but once i write delve, you can do that too
21:20 -!- nick125 [~nick@67-42-116-44.albq.qwest.net] has quit [Killed by sagan.freenode.net (Nick collision)]
21:20 -!- nick125_ [~nick@67-42-116-44.albq.qwest.net] has joined #sourcemage
21:20 -!- nick125 [~nick@nick125.user] has joined #sourcemage
21:20 -!- nick125 [~nick@nick125.user] has quit [Connection timed out]
21:20 <+lejatorn> afrayedknot: I think someone should copy all your monologue and put it on our website so that we can
redirect ppl who come here and ask the question.

21:21 <+ruskie>
21:21 <+e-type> indeed, thx afrayedknot, nice presentation
21:21 <@afrayedknot> of course not many people care that much either
21:21 <+lejatorn> hmm, I'm doing it right now.
21:22 <+lejatorn> I'll put that on the wiki
21:22 <@afrayedknot> hmm, im not sure if you can set random ./configure options on a per-package basis in gentoo, but you can in smgl

21:22 <@afrayedknot> i cant think of anything else off the top of my head
21:23 <@afrayedknot> oh, they have package masking, and we dont, that seems to be their version of conflicts

That's about it.
If you have anything to add (in favor of gentoo for example) or to correct, please don't touch the original text above and share your knowledge below. -lejatorn]

Updates as of 01/02/2005

delve (allows you to run various portions of a spell) is written and in devel (1.12) sorcery
we have default dependency answers in 1.11.x (current stable) which is effectively the same functionality as use flags but can also be on a finer scale.
footnotes[1] Why is this even a problem in the first place? Because, typically, in the 80s, and 90s, the application developer and the operating system developer were two distinct entities, each trying to force the other into their own static black box of consistent behavior while continually-developing their own programs dynamically. Thus third-party software vendors often preferred single-version, rarely-patched operating systems. Operating system developers wanted single versions of programs to test against. A proposed solution to this is POSIX, the portable operating system interface, and other industry standards. POSIX, for example, is a standard that allows both the OS side and the Application side of software development to continue innovating to a consistent interface so that they can interoperate between versions. While this helped, it didn't help enough. Now what is needed are people who will take the OS, interface, and applications, and integrate them together into a cohesive whole. These are called distributors, another word for "vendor", but more generally-implied. Microsoft experienced its own rise to power on the wave of being a monopoly distributor. It integrated a browser, web server, dns services, ftp services, and office programs -- now even antivirus and spyware programs. Despite the piss-poor quality of their products, their win was that it was integrated into a single distribution. Many of the programs indeed came from their own disparate ventures (DoubleSpace?, Diskkeeper, SpyGlass?, Giant, for example). Microsoft, now that security is important, is forcing software vendors to target unknown future updates, frequently breaking past behaviors. This serves to help push people out of using non-Microsoft products. Source Mage takes a similar but different approach -- we instead support first the basesystem -- the part of the system that is absolutely required as an Operating System foundation. Second, we support packages, called spells, as an integrated whole, meant to work well with each other. Third, we support not just one package, we support all free software packages that have become spells. However, in order to support these three aspects, the source code must be available. Having source code means first that ABI compatibility problems are now minimized and second that distribution is a doable proposition. Debugging a pre-compiled, debug-stripped proprietary application is virtually intractable, even on a Microsoft platform. Source Mage thus offers the latest thinking in distribution management available, in ideal form: the Free Software distribution paradigm.
发表于 2006-4-11 20:15:36 | 显示全部楼层
Gentoo 的壮大,必然会有这些后果(结果) 的。。嘿嘿。。
回复 支持 反对

使用道具 举报

发表于 2007-4-4 18:29:40 | 显示全部楼层
好样的,顶一下!
回复 支持 反对

使用道具 举报

发表于 2007-4-5 00:12:25 | 显示全部楼层
有竞争,才有进步。
回复 支持 反对

使用道具 举报

发表于 2007-4-5 00:33:58 | 显示全部楼层
lunar 没用过,听说是全部源码编译?
回复 支持 反对

使用道具 举报

发表于 2007-4-5 09:24:24 | 显示全部楼层
这个世界真是疯狂啊。。。。
回复 支持 反对

使用道具 举报

发表于 2007-4-5 09:30:22 | 显示全部楼层
如果一定要我选源码编译类的linux, GENTOO是首选啦, 我感觉它在编译类中算是最容易上手的说。。。至于LFS就太过手动话了, 基本是敲出来的, 已经再也没有这个热情了
回复 支持 反对

使用道具 举报

发表于 2007-4-5 11:11:12 | 显示全部楼层
我就是对portage那一大堆小文件很不满,我的硬盘在sync和emerge的时候都会疯响,几个月之后就坏道了。。。。。
应该好好想想优化一下emerge的过程了。。
回复 支持 反对

使用道具 举报

发表于 2007-4-5 18:23:16 | 显示全部楼层
我的笔记本就这么sync了3年
现在还跑的挺欢
回复 支持 反对

使用道具 举报

发表于 2007-4-5 19:13:12 | 显示全部楼层
Post by zhllg
我的笔记本就这么sync了3年
现在还跑的挺欢

好强!貌似这就是差异?!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表