Re: A few questions from a current linux user
On Mon, 11 Aug 2008 04:15:07 -0700, "Krishna Mohan Gundu" <[EMAIL PROTECTED]> wrote: >>> 2) Is it possible to compile multiple versions of gcc? If so what is >>> the best way to do it? >> >> Yes, of course. >> >> The "base system" of FreeBSD includes _one_ version of gcc, installed as >> `/usr/bin/gcc', but this does not mean that you are limited to *that* >> version only. You can use the Ports tree to install one or more >> versions[...] >> >> # pwd >> /usr/ports/lang >> # ls -ld gcc* | nl >> 1 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc-ooo >> 2 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc28 >> 3 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc295 >> 4 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc32 >> 5 drwxr-xr-x 3 root wheel - 512 Jul 22 05:03 gcc33 >> 6 drwxr-xr-x 3 root wheel - 512 Jul 29 04:46 gcc34 >> 7 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc41 >> 8 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc41-withgcjawt >> 9 drwxr-xr-x 3 root wheel - 512 Jul 22 05:03 gcc42 >> 10 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc42-withgcjawt >> 11 drwxr-xr-x 3 root wheel - 512 Jul 29 04:46 gcc43 >> 12 drwxr-xr-x 3 root wheel - 512 Aug 7 02:25 gcc44 >> # > > So I believe each gcc port keeps track of various dependencies and > their versions for a chosen gcc version. However if I need gcc40 (lets > say, not available from ports) or if I need to enable certain features > that ports disable then I guess I am on my own in that there are no > guarantees that it will compile. Then it's usually much easier to tweak the port than start from scratch. The Ports tree also includes various patches, updates and it supports a lot of things other than ``run the ./configure script with all the right options''. Some of these extra features are: * Dependency tracking of the package. * Conflicts tracking. If there are possible conflicts with already installed packages, you will get notified. * Recursive or simple one-port fetching of all the sources from their standard FTP, or HTTP site, including checksum verification of the distfiles. * Patching of the source tree with `make patch', as an integrated part of the port itself. * Package registration in `/var/db/pkg'. With this comes also the ability to pkg_delete the installed port in one, well-defined step. The alternative of manually tracking what was installed, where it was installed, which files it touched or added, and so on, may also work, but it's not really as nice as pkg_add/pkg_delete. * Package creation. You can build on one system, then `make package' and transfer the pre-compiled port to another system (i.e. your small sub-notebook EeePC that can do better things than build gcc all the time). Enabling a new option in a port is often just a matter of editing the port Makefile and adding a few extra arguments to CONFIGURE_ARGS, i.e.: # I like my gcc ports to have --enable-foo too (keramida) CONFIGURE_ARGS += --enable-foo Then you get to keep all the nice features of Ports, and if you find the new option useful, you can send it back to the Port maintainer :) > Coming from linux background, the different way of managing base > system and ports bothers me. I understand the reasons behind the > division but not the necessity to manage them differently. For > example how would I know if a package is in the base system or not? > Looks like for ports this can done with 'make search name=whatever'. > Is there an equivalent of freebsd-update for ports? The separation comes with its own advantages. For example, if you are tracking the 6.X-STABLE branch of the base system, then you can keep updating the base system as many times as you want and leave the Ports unchanged. The binary compatibility of the 6.X-STABLE branch guarantees that a thirdparty package you compiled on 6.0-RELEASE will keep working with a base system of 6.1-RELEASE, 6.2-RELEASE or 6.10-STABLE. As long as there are not major security issues with a specific port you do *not* have to upgrade it. The base system itself is not a package, and all the ports intstall software _exclusively_ under `/usr/local'. So you know that something is part of the Ports because it is installed under `/usr/local'. The opposite is also true: if something is in /usr/{bin,sbin,lib} then in a well-managed FreeBSD system it is *not* part of the Ports, but of the base system. To answer the question about updates, yes, there are tools like freebsd-update for Ports too. They are usually Ports themselves too, and they are found in the `/usr/ports/ports-mgmt' category of software. AFAIK, the most popular ones are `portupgrade', `portmanager' and `portmaster'. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, s
Re: A few questions from a current linux user
First of all, let me thank everyone who has responded to my questions on this mailing list. Hi Giorgos, > I've been meaning to respond to this post for a couple of days, but it > took me a little longer than I originally hoped... Thank you for taking time to write a detailed response. > This may be totally unrelated to the real question, but doesn't Fedora > use pre-compiled packages by default? I thought that was pretty much > the One True Way(TM) of updating Fedora systems. Yes it is. I have friends who are happy doing dist-upgrades with one command. But I have been using Fedora from the beginning and I have had a few bad experiences with distribution upgrades leaving me to spend more time fixing the problems. I have decided not to risk upgrades after Fedora Core 4 and two years down the line I think it is a good decision with a few side effects, mainly keeping pace with newer versions of packages of interest. >> 1) Is a feature similar to magic SysRq in linux necessary for FreeBSD? >> (As I understand there is no such feature in FreeBSD) > > Not really. SysRq has a few nice characteristics, i.e. it can unmount > local filesystems gracefully to avoid `fsck' runs during the next boot. > It's a nice, handy tool in some cases. But it also comes at a cost: it > modifies the in-memory state of the running kernel. > > FreeBSD has a kernel debugger that can be enabled, called DDB. When the > kernel locks up or panics because something bogus happened, the DDB can > dump the state of the kernel into a preconfigured swap area, and the > startup scripts of the next boot will pick up the kernel coredump from > swap, save it in `/var/crash', and let you run post-mortem analysis on > the kernel core dump. > > If this is combined with something like SysRq, and there's really a bug > in the parts of the kernel that SysRq has to use to perform its final > steps, you lose. You may be modifying the parts of the kernel memory > that actually exhibit the bug, and make the kernel dump unusable. Should one risk losing the data or should one be able to debug reliably? I think letting the user decide on this option is a better solution than not implementing SysRq at all. But after reading the mailing lists, I got a feeling that most experienced FreeBSD users don't really need the SysRq feature. However I still don't understand how the data is safe even if one enables SoftUpdate with disk caching disabled. >> 2) Is it possible to compile multiple versions of gcc? If so what is >> the best way to do it? > > Yes, of course. > > The "base system" of FreeBSD includes _one_ version of gcc, installed as > `/usr/bin/gcc', but this does not mean that you are limited to *that* > version only. You can use the Ports tree to install one or more > versions. The snapshot of Ports I have on the laptop I am using to type > this includes 12 different gcc ports (and that does not include the > Fortran, Objective C, or Java backends GCC supports): > > # pwd > /usr/ports/lang > # ls -ld gcc* | nl > 1 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc-ooo > 2 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc28 > 3 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc295 > 4 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc32 > 5 drwxr-xr-x 3 root wheel - 512 Jul 22 05:03 gcc33 > 6 drwxr-xr-x 3 root wheel - 512 Jul 29 04:46 gcc34 > 7 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc41 > 8 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc41-withgcjawt > 9 drwxr-xr-x 3 root wheel - 512 Jul 22 05:03 gcc42 > 10 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc42-withgcjawt > 11 drwxr-xr-x 3 root wheel - 512 Jul 29 04:46 gcc43 > 12 drwxr-xr-x 3 root wheel - 512 Aug 7 02:25 gcc44 > # > > So yes, you can install several different versions of GCC at the same > time. So I believe each gcc port keeps track of various dependencies and their versions for a chosen gcc version. However if I need gcc40 (lets say, not available from ports) or if I need to enable certain features that ports disable then I guess I am on my own in that there are no guarantees that it will compile. >> 3) Is it possible to perform a binary update from one release to >> another? If so can you please point me to the documentation? How are >> config files updated in this case? (Could not locate documentation on >> binup) > > Yes. In recent FreeBSD releases, the "base system" of FreeBSD includes > freebsd-update. This is a utility authored by Colin Percival, who is > currently the Security Officer of FreeBSD, and a very smart fellow :) > > What freebsd-update does is described in its manpage > >http://www.freebsd.org/cgi/man.cgi?query=freebsd-update&format=ascii > > but the basic idea is that is can do one of the following things: > >* Download binary update packs in `/var/db/freebsd-update'. These > are not installed immediatelly, so you can periodically pull the >
Re: A few questions from a current linux user
Polytropon wrote: >> 4) If a binary update leads to an unstable system, how easy it is to >> backtrack to an earlier working version along with working config >> files? > > An update set provided via freebsd-update should not render a system > unstable / unusable; at least it's possible that the system is not > in a working state when the update process gets interrupted at a > critical point, but I never had such a problem. In the worst case, > you can restore the base system from the installation CD (or via > bootonly + network) and try the update again. There's a "freebsd-update rollback", but I've never had the need to use it, so I can't say how well it works. But I guess it does what you're asking. signature.asc Description: OpenPGP digital signature
Re: A few questions from a current linux user
On Thu, 7 Aug 2008 23:20:08 -0400, "Krishna Mohan Gundu" <[EMAIL PROTECTED]> wrote: > Hi, > I am currently using Fedora Core 4 linux distribution for my everyday > needs like programming, checking emails etc on my two year old HP > laptop. I feel that time has come for me to move away from Fedora. I > wasted a lot of time compiling libraries and their dependencies. I > could benefit from better packaging systems that come with systems > like FreeBSD. Hi Krishna, I've been meaning to respond to this post for a couple of days, but it took me a little longer than I originally hoped... This may be totally unrelated to the real question, but doesn't Fedora use pre-compiled packages by default? I thought that was pretty much the One True Way(TM) of updating Fedora systems. > I tried to gather as much information as I could from the > documentation available on freebsd.org, but the following questions > remain unanswered. I would be glad if you can take time to educate me > > 1) Is a feature similar to magic SysRq in linux necessary for FreeBSD? > (As I understand there is no such feature in FreeBSD) Not really. SysRq has a few nice characteristics, i.e. it can unmount local filesystems gracefully to avoid `fsck' runs during the next boot. It's a nice, handy tool in some cases. But it also comes at a cost: it modifies the in-memory state of the running kernel. FreeBSD has a kernel debugger that can be enabled, called DDB. When the kernel locks up or panics because something bogus happened, the DDB can dump the state of the kernel into a preconfigured swap area, and the startup scripts of the next boot will pick up the kernel coredump from swap, save it in `/var/crash', and let you run post-mortem analysis on the kernel core dump. If this is combined with something like SysRq, and there's really a bug in the parts of the kernel that SysRq has to use to perform its final steps, you lose. You may be modifying the parts of the kernel memory that actually exhibit the bug, and make the kernel dump unusable. > 2) Is it possible to compile multiple versions of gcc? If so what is > the best way to do it? Yes, of course. The "base system" of FreeBSD includes _one_ version of gcc, installed as `/usr/bin/gcc', but this does not mean that you are limited to *that* version only. You can use the Ports tree to install one or more versions. The snapshot of Ports I have on the laptop I am using to type this includes 12 different gcc ports (and that does not include the Fortran, Objective C, or Java backends GCC supports): # pwd /usr/ports/lang # ls -ld gcc* | nl 1 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc-ooo 2 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc28 3 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc295 4 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc32 5 drwxr-xr-x 3 root wheel - 512 Jul 22 05:03 gcc33 6 drwxr-xr-x 3 root wheel - 512 Jul 29 04:46 gcc34 7 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc41 8 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc41-withgcjawt 9 drwxr-xr-x 3 root wheel - 512 Jul 22 05:03 gcc42 10 drwxr-xr-x 3 root wheel - 512 Jul 17 03:01 gcc42-withgcjawt 11 drwxr-xr-x 3 root wheel - 512 Jul 29 04:46 gcc43 12 drwxr-xr-x 3 root wheel - 512 Aug 7 02:25 gcc44 # So yes, you can install several different versions of GCC at the same time. > 3) Is it possible to perform a binary update from one release to > another? If so can you please point me to the documentation? How are > config files updated in this case? (Could not locate documentation on > binup) Yes. In recent FreeBSD releases, the "base system" of FreeBSD includes freebsd-update. This is a utility authored by Colin Percival, who is currently the Security Officer of FreeBSD, and a very smart fellow :) What freebsd-update does is described in its manpage http://www.freebsd.org/cgi/man.cgi?query=freebsd-update&format=ascii but the basic idea is that is can do one of the following things: * Download binary update packs in `/var/db/freebsd-update'. These are not installed immediatelly, so you can periodically pull the binary update files and install them later, when you have the time for an upgrade. The default `fetch' mode of `freebsd-update' downloads binary updates for the release & branch of FreeBSD that you have installed on the local system. Staying on the same branch has various advantages that are nicely described in the online article about ` * Download binary update packs for _upgrading_ to a new release. This is slightly different from an update that sticks to a single FreeBSD release-branch, and there are official release notes about the changes of every major release. They are published online at http://www.FreeBSD.org/releases/ Downloading the binary packs for new release st
Re: A few questions from a current linux user
On Fri, 8 Aug 2008 07:01:14 +0200, Polytropon <[EMAIL PROTECTED]> wrote: > On Thu, 7 Aug 2008 23:20:08 -0400, "Krishna Mohan Gundu" <[EMAIL PROTECTED]> > wrote: >> 5) Does FreeBSD have support for PCMCIA-USB cards? > > Don't know. Yes. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RE: A few questions from a current linux user
Krishna Mohan Gundu wrote: > I feel that time has come for me to move away from Fedora. > PS: I am considering Debian as another alternative. I've done both Red Hat and Debian, and prefer FreeBSD. I suggest that you get yourself some 7.0-RELEASE CD's, buy this book, and go for it: http://nostarch.com/abs_bsd2.htm Even if you decide BSD doesn't meet your needs, your time and money will have been well spent expanding your horizons. HTH, David ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: A few questions from a current linux user
Hi! On Thu, 7 Aug 2008 23:20:08 -0400, "Krishna Mohan Gundu" <[EMAIL PROTECTED]> wrote: > 1) Is a feature similar to magic SysRq in linux necessary for FreeBSD? > (As I understand there is no such feature in FreeBSD) As far as I know, most window managers are able to be configured in a way that you can assign differnt functionalities like shutting the system down to a custom key combination (WindowMaker can); if a xdm like login manager (in the state of "nobody logged in") can, I'm not sure. On the text mode consoles, Ctrl-Alt-Del can be used to shut the system down, but the feature can be disabled (kernel configuration). > 2) Is it possible to compile multiple versions of gcc? If so what is > the best way to do it? For example from ports, but I'm not sure if you can define which binaries are acutally used; at least you should be able to run the compiler from within the port's work/ directory (you don't install the port, then), as long as there are no problems with depending libraries. > 3) Is it possible to perform a binary update from one release to > another? If so can you please point me to the documentation? The tool freebsd-update can be used to achieve this goal. The command % man freebsd-update is a good start for learning more. > How are > config files updated in this case? (Could not locate documentation on > binup) I think mergemaster can be used to do this; you usually run this program if you perform an update using the make command ("make update", "make buildworld", "make buildkernel" etc.). > 4) If a binary update leads to an unstable system, how easy it is to > backtrack to an earlier working version along with working config > files? An update set provided via freebsd-update should not render a system unstable / unusable; at least it's possible that the system is not in a working state when the update process gets interrupted at a critical point, but I never had such a problem. In the worst case, you can restore the base system from the installation CD (or via bootonly + network) and try the update again. > 5) Does FreeBSD have support for PCMCIA-USB cards? Don't know. -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
A few questions from a current linux user
Hi, I am currently using Fedora Core 4 linux distribution for my everyday needs like programming, checking emails etc on my two year old HP laptop. I feel that time has come for me to move away from Fedora. I wasted a lot of time compiling libraries and their dependencies. I could benefit from better packaging systems that come with systems like FreeBSD. I tried to gather as much information as I could from the documentation available on freebsd.org, but the following questions remain unanswered. I would be glad if you can take time to educate me 1) Is a feature similar to magic SysRq in linux necessary for FreeBSD? (As I understand there is no such feature in FreeBSD) 2) Is it possible to compile multiple versions of gcc? If so what is the best way to do it? 3) Is it possible to perform a binary update from one release to another? If so can you please point me to the documentation? How are config files updated in this case? (Could not locate documentation on binup) 4) If a binary update leads to an unstable system, how easy it is to backtrack to an earlier working version along with working config files? 5) Does FreeBSD have support for PCMCIA-USB cards? thanks, Krishna. PS: I am considering Debian as another alternative. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"