Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, Jul 17, 2014 at 11:25 AM, Craig Rodrigues rodr...@freebsd.org wrote: For (2), encouraging people to move away from Linux to FreeBSD on the server, may be something where we can get more wins. I think we can do this by having more HOWTO articles on the FreeBSD web page that explain the following: (1) We need a HOWTO article that explains for each command using apt or yum for installing packages, how can I do the same thing using pkg. Even if we have a web page with a table, contrasting the apt/yum commands, and pkg commands, that would be super useful. A lot of folks have moved away from FreeBSD, purely because they are sick of pkg_add. We need to explain to folks that we have something better, that is quite competitive to apt/yum, and it is easy to use. (2) We need a HOWTO article that explains how to set up a FreeBSD environment with some of the major cloud providers, i.e. Amazon, Rackspace, Microsoft Azure, etc. Hi, While I appreciate the enthusiasm of the responses to this e-mail thread, especially the patches to service(8), I feel that my original e-mail was hijacked into the weeds, and none of the questions that I asked were answered. :) So, I am assuming that no one is working on the HOWTO's that I mentioned in my original e-mail. :) In the latest edition of BSDNow ( http://www.bsdnow.tv/episodes/2014_07_23-des_challenge_iv ), they refer to a blog article where someone who was used to Linux posted their experience setting up FreeBSD: http://thiagoperrotta.wordpress.com/2014/07/20/here-be-dragons-freebsd-overview-part-i/ http://thiagoperrotta.wordpress.com/2014/07/21/here-be-packages-freebsd-overview-part-ii/ The Part II article goes in-depth into installing packages, and the user had a positive experience with using pkg, which is great. What I'd like to see is an article on freebsd.org either on the wiki or in the handbook, which compares using apt, yum, rpm, whatever to pkg. Is anyone interested in working on an article like this? I don't have the bandwidth right now. -- Craig ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Fri, 25 Jul 2014, Craig Rodrigues wrote: What I'd like to see is an article on freebsd.org either on the wiki or in the handbook, which compares using apt, yum, rpm, whatever to pkg. Is anyone interested in working on an article like this? I don't have the bandwidth right now. A person to write that article needs detailed knowledge of pkg and the Linux package systems. I don't have that, but would be willing to help you develop an outline for the article. Having a design like that makes it easier to write when time and resources are available. Writing an article is hard. Writing a small section on how deleting packages is different between pkg and, say, apt, is much easier. The scope is known. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Fri, Jul 25, 2014 at 03:05:32PM -0600, Warren Block wrote: On Fri, 25 Jul 2014, Craig Rodrigues wrote: What I'd like to see is an article on freebsd.org either on the wiki or in the handbook, which compares using apt, yum, rpm, whatever to pkg. Is anyone interested in working on an article like this? I don't have the bandwidth right now. A person to write that article needs detailed knowledge of pkg and the Linux package systems. I don't have that, but would be willing to help you develop an outline for the article. Having a design like that makes it easier to write when time and resources are available. My 2 cents as someone who uses both Ubuntu and FreeBSD: I find that pkg is basically identical to using apt. The basic commands are the same. Lookfeel and configuration files are different but that is to be expected, and neither require much tweaking. The big difference between them from a user POV is that pkg still requires a bit of knowledge of ports and how it works (what options are, categories etc.) whereas using apt requires no knowledge of the Ubuntu package infrastructure or how .deb files are built. I was already familiar with ports long before Pngng came around, but to a new user migrating from Linux I can see how trying to use pkg while bypassing the ports documentation could result in later confusion. -- Dylan -- Dylan Leigh // VU# s4081906 // www.dylanleigh.net ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
[PATCHES] Extend service(8) and rc(8) was: Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Fri, Jul 18, 2014 at 12:10:34PM -0700, Adrian Chadd wrote: Hi! On 18 July 2014 07:28, Lars Engels lars.eng...@0x20.net wrote: On Thu, Jul 17, 2014 at 10:21:17PM +0200, Andreas Nilsson wrote: On Thu, Jul 17, 2014 at 10:15 PM, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? They sure are. Well, pkg install $service ; sysrc ${service}_enable=YES would do. Although some services have different names than the packge, which is sort of annoying. I hacked up a solution for service(8): http://bsd-geek.de/FreeBSD/service.sh.enable-disable.patch The patch adds the following directives to service(8): enable: Grabs an rc script's rcvar value and runs sysrc foo_enable=YES disable: The opposite of enable rcdelete: Deletes an rc script's rcvar value from /etc/rc.conf using sysrc -x foo_enable The nice thing about is that you can use one of the new directives on one line with the old ones, as long as the new are the first argument: # service syslogd enable # service apache24 disable stop # service apache24 rcdelete stop # service nginx enable start So after installing a package, to start and enable a daemon permanently all you have to run is # service foo enable start Lars P.S.: Thansk to Devin for his hard work on sysrc! Having a way for sysrc and service to know what particular options and services are exposed by a given package or installed thing would be nice. Right now the namespace is very flat and it's not obvious in all instances what needs to happen to make it useful and what the options are. Oh, hm, I'd like to know what options there are for controlling the installed apache24 package, let's see... I remember IRIX having that command to list services, stop them and start them, configure them enabled and disabled. Solaris grew something like that with Solaris 10 and after the initial learning curve it was great. Hving something like that would be 100% awesome. I've updated the patch and extended it a little: https://phabric.freebsd.org/D451 It can now print the rc options for a service. It needs however to have the options listed as comments between the KEYWORDS section and the sourcing of /etc/rc.subr. And I've made some changes to rc.subr itself: https://phabric.freebsd.org/D452 So now you can use # service sshd describe Secure Shell Daemon and # service sshd extracommands configtest keygen reload Sorry for the mess in phabricator's SUMMARY. I will learn the markup syntax later... Lars pgpwjm22pgrSF.pgp Description: PGP signature
Re: [PATCHES] Extend service(8) and rc(8) was: Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
Hi! I like it! It's a useful command line API. Eventually people will realise there needs to be a more formal method for describing/controlling the underlying framework, but I leave that up to bapt to figure out and .. well, push people to do. :) Thanks! -a On 19 July 2014 09:08, Lars Engels lars.eng...@0x20.net wrote: On Fri, Jul 18, 2014 at 12:10:34PM -0700, Adrian Chadd wrote: Hi! On 18 July 2014 07:28, Lars Engels lars.eng...@0x20.net wrote: On Thu, Jul 17, 2014 at 10:21:17PM +0200, Andreas Nilsson wrote: On Thu, Jul 17, 2014 at 10:15 PM, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? They sure are. Well, pkg install $service ; sysrc ${service}_enable=YES would do. Although some services have different names than the packge, which is sort of annoying. I hacked up a solution for service(8): http://bsd-geek.de/FreeBSD/service.sh.enable-disable.patch The patch adds the following directives to service(8): enable: Grabs an rc script's rcvar value and runs sysrc foo_enable=YES disable: The opposite of enable rcdelete: Deletes an rc script's rcvar value from /etc/rc.conf using sysrc -x foo_enable The nice thing about is that you can use one of the new directives on one line with the old ones, as long as the new are the first argument: # service syslogd enable # service apache24 disable stop # service apache24 rcdelete stop # service nginx enable start So after installing a package, to start and enable a daemon permanently all you have to run is # service foo enable start Lars P.S.: Thansk to Devin for his hard work on sysrc! Having a way for sysrc and service to know what particular options and services are exposed by a given package or installed thing would be nice. Right now the namespace is very flat and it's not obvious in all instances what needs to happen to make it useful and what the options are. Oh, hm, I'd like to know what options there are for controlling the installed apache24 package, let's see... I remember IRIX having that command to list services, stop them and start them, configure them enabled and disabled. Solaris grew something like that with Solaris 10 and after the initial learning curve it was great. Hving something like that would be 100% awesome. I've updated the patch and extended it a little: https://phabric.freebsd.org/D451 It can now print the rc options for a service. It needs however to have the options listed as comments between the KEYWORDS section and the sourcing of /etc/rc.subr. And I've made some changes to rc.subr itself: https://phabric.freebsd.org/D452 So now you can use # service sshd describe Secure Shell Daemon and # service sshd extracommands configtest keygen reload Sorry for the mess in phabricator's SUMMARY. I will learn the markup syntax later... Lars ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, Jul 17, 2014 at 01:00:03PM -0700, Adrian Chadd wrote: On 17 July 2014 12:57, Andreas Nilsson andrn...@gmail.com wrote: On Thu, Jul 17, 2014 at 9:28 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; I disagree on this. For network services on linux ( apart from ssh ), I want that started very seldom. But I do want the package installed so that when I need it, it is there. Having it autostart as part of being installed is breaking KISS and in some way unix philosophy: I asked for something to be installed, not installed and autostarted. That's cool. We can disagree on that. But the fact that you have to edit a file to enable things and hope you get the right start entry in /etc/rc.conf or /usr/local/etc/rc.conf, or wherever you put it is, is a pain. No, Sir! No need to edit anything: root@testjail: # pkg install apache24 Updating repository catalogue The following 5 packages will be installed: Installing pcre: 8.33 Installing gdbm: 1.10 Installing db42: 4.2.52_5 Installing apr: 1.4.8.1.5.3 Installing apache24: 2.4.6_1 The installation will require 47 MB more space 5 MB to be downloaded Proceed with installing packages [y/N]: y gdbm-1.10.txz 100% 83KB 83.2KB/s 83.2KB/s 00:00 db42-4.2.52_5.txz 100% 1457KB 1.4MB/s 1.4MB/s 00:00 apr-1.4.8.1.5.3.txz 100% 390KB 389.5KB/s 389.5KB/s 00:00 apache24-2.4.6_1.txz 100% 3649KB 3.6MB/s 3.6MB/s 00:00 Checking integrity... done [1/5] Installing pcre-8.33... done [2/5] Installing gdbm-1.10... done [3/5] Installing db42-4.2.52_5... done [4/5] Installing apr-1.4.8.1.5.3... done [5/5] Installing apache24-2.4.6_1...=== Creating users and/or groups. Using existing group 'www'. Using existing user 'www'. /usr/local/share/examples/apache24/httpd.conf - /usr/local/etc/apache24/httpd.conf done To run apache www server from startup, add apache24_enable=yes in your /etc/rc.conf. Extra options can be found in startup script. Your hostname must be resolvable using at least 1 mechanism in /etc/nsswitch.conf typically DNS or /etc/hosts or apache might have issues starting depending on the modules you are using. root@testjail: # sysrc apache24_enable=yes apache24_enable: - yes root@testjail: # service apache24 start Performing sanity check on apache24 configuration: AH00557: httpd: apr_sockaddr_info_get() failed for testjail AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message Syntax OK Starting apache24. AH00557: httpd: apr_sockaddr_info_get() failed for testjail AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message root@testjail: # That's 3 commands to enter. Admittedly 2 more than on some OS that blindly starts any service you install, but 2 steps more logical and even a newbie can do this. What could be done is that pkg looks for rc scripts in a package, extracts the enable line and prints a message how to enable the script / daemon permanently. Like: - To start the script apache24 once run service apache24 onestart. - To start the script apache24 at boot time run sysrc apache24_enable=yes - The script apache24 has the following optional settings for /etc/rc.conf: apache24_profiles (str): Set to by default. Define your profiles here. apache24limits_enable (bool):Set to NO by default. Set it to yes to run `limits $limits_args` just before apache starts. apache24_flags (str):Set to by default. Extra flags passed to start command. apache24limits_args (str): Default to -e -C daemon Arguments of pre-start limits run. apache24_http_accept_enable (bool): Set to NO by default. Set to yes to check for accf_http kernel module on start up and load if not loaded. apache24_fib (str): Set an altered default network view for apache pgpIEpFVOIfJI.pgp Description: PGP signature
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Fri, Jul 18, 2014 at 02:10:25PM +0200, Lars Engels wrote: On Thu, Jul 17, 2014 at 01:00:03PM -0700, Adrian Chadd wrote: On 17 July 2014 12:57, Andreas Nilsson andrn...@gmail.com wrote: On Thu, Jul 17, 2014 at 9:28 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; I disagree on this. For network services on linux ( apart from ssh ), I want that started very seldom. But I do want the package installed so that when I need it, it is there. Having it autostart as part of being installed is breaking KISS and in some way unix philosophy: I asked for something to be installed, not installed and autostarted. That's cool. We can disagree on that. But the fact that you have to edit a file to enable things and hope you get the right start entry in /etc/rc.conf or /usr/local/etc/rc.conf, or wherever you put it is, is a pain. No, Sir! No need to edit anything: root@testjail: # pkg install apache24 Updating repository catalogue The following 5 packages will be installed: Installing pcre: 8.33 Installing gdbm: 1.10 Installing db42: 4.2.52_5 Installing apr: 1.4.8.1.5.3 Installing apache24: 2.4.6_1 The installation will require 47 MB more space 5 MB to be downloaded Proceed with installing packages [y/N]: y gdbm-1.10.txz 100% 83KB 83.2KB/s 83.2KB/s 00:00 db42-4.2.52_5.txz 100% 1457KB 1.4MB/s 1.4MB/s 00:00 apr-1.4.8.1.5.3.txz 100% 390KB 389.5KB/s 389.5KB/s 00:00 apache24-2.4.6_1.txz 100% 3649KB 3.6MB/s 3.6MB/s 00:00 Checking integrity... done [1/5] Installing pcre-8.33... done [2/5] Installing gdbm-1.10... done [3/5] Installing db42-4.2.52_5... done [4/5] Installing apr-1.4.8.1.5.3... done [5/5] Installing apache24-2.4.6_1...=== Creating users and/or groups. Using existing group 'www'. Using existing user 'www'. /usr/local/share/examples/apache24/httpd.conf - /usr/local/etc/apache24/httpd.conf done To run apache www server from startup, add apache24_enable=yes in your /etc/rc.conf. Extra options can be found in startup script. Your hostname must be resolvable using at least 1 mechanism in /etc/nsswitch.conf typically DNS or /etc/hosts or apache might have issues starting depending on the modules you are using. root@testjail: # sysrc apache24_enable=yes apache24_enable: - yes root@testjail: # service apache24 start Performing sanity check on apache24 configuration: AH00557: httpd: apr_sockaddr_info_get() failed for testjail AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message Syntax OK Starting apache24. AH00557: httpd: apr_sockaddr_info_get() failed for testjail AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message root@testjail: # That's 3 commands to enter. Admittedly 2 more than on some OS that blindly starts any service you install, but 2 steps more logical and even a newbie can do this. What could be done is that pkg looks for rc scripts in a package, extracts the enable line and prints a message how to enable the script / daemon permanently. Like: - To start the script apache24 once run service apache24 onestart. - To start the script apache24 at boot time run sysrc apache24_enable=yes - The script apache24 has the following optional settings for /etc/rc.conf: apache24_profiles (str): Set to by default. Define your profiles here. apache24limits_enable (bool):Set to NO by default. Set it to yes to run `limits $limits_args` just before apache starts. apache24_flags (str):Set to by default. Extra flags passed to start command. apache24limits_args (str): Default to -e -C daemon Arguments of pre-start limits run. apache24_http_accept_enable (bool): Set to NO by default. Set to yes to check for accf_http kernel module on start up and load if not loaded. apache24_fib (str): Set an altered default network view for apache Sorry for no reading the whole thread first. This was already suggested in another part of the thread. pgp5bG5Xyw8GZ.pgp Description: PGP signature
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, Jul 17, 2014 at 7:25 PM, Craig Rodrigues rodr...@freebsd.org wrote: Hi, I attend a lot of different Meetup groups in the San Francisco Bay Area / Silicon Valley. What I am seeing is the following usage pattern for new developers, especially for web apps and cloud applications. (1) On their desktop/laptop, they will generally be using a Mac running OS X. This is their desktop Unix environment. This seems to be true of almost 90% of the people that I meet. The 10% of people who run a PC laptop, will mostly be running Windows. Very few seem to run Linux on their laptops, but if they do, it will likely be Ubuntu Linux. (2) For their deployed application, generally they will deploy to a Linux environment on a server. These days, the server will very likely be in a cloud environment: Amazon, Rackspace, Heroku. For (1), encouraging people to move away from a Mac to FreeBSD for their desktop environment is a tough sell. Apple is a multi-billion dollar company, and they make beautiful hardware, and software with a fantastic end-user experience. The PC-BSD project is fighting the good fight in terms of making a usable FreeBSD desktop, but its a touch battle to fight. For (2), encouraging people to move away from Linux to FreeBSD on the server, may be something where we can get more wins. I think we can do this by having more HOWTO articles on the FreeBSD web page that explain the following: (1) We need a HOWTO article that explains for each command using apt or yum for installing packages, how can I do the same thing using pkg. Even if we have a web page with a table, contrasting the apt/yum commands, and pkg commands, that would be super useful. A lot of folks have moved away from FreeBSD, purely because they are sick of pkg_add. We need to explain to folks that we have something better, that is quite competitive to apt/yum, and it is easy to use. (2) We need a HOWTO article that explains how to set up a FreeBSD environment with some of the major cloud providers, i.e. Amazon, Rackspace, Microsoft Azure, etc. Do we have such articles today, or is anybody working on something like that? I haven't such specific articles. However I did create a project which lets people more easily install and 'try out' FreeBSD. It runs ontop of either FreeNAS, pfSense or NAS4Free. The idea is that because you can boot those distress off of a USB stick, (it's like a liveCD). However you can then install the full FreeBSD generic onto any suitably-formatted attached hard disk. (including PKGNG and ports tree). None of my documentation is aimed specifically at linux - FreeBSD. However I can say that it's utterly true (if you have Mac OS X). The desktop experience is definately nicer (much less niggly / annoying problems). And on Macs we have brew install… which is allright. But you can't use Macs as effectively for server stuff. It doesn't really feel right for that purpose. And homebrew is like ports or gentoo (compiles everything, no binary packages). For me, the FreeBSD is what I decide to for server (more than linux) *not just only* for PKGNG. We are glad that is here now. But also (very important). If FreeBSD jails. Which isn't as-good-as, but often superior to such linux equivalent (if any). In terms of both security, and efficiency. Here you can see my FreeBSD jails HowTo: http://dreamcat4.github.io/finch/jails-how-to/ Which is as simple as I could ever be able to make it. Sorry I don't have any other ideas in regards to how to address the overwhelming popularity of Linux over FreeBSD. It often isn't justified. However in some ways linux is like windows now. For example with overwhelming hardware support (that sometimes is not as good on FreeBSD). And Linux is more success on embedded because it can run on many different kinds of CPUs. Wheras FreeBSD isn't very much support for embedded CPU (unless they happen to be X86). I get the (maybe not justified) impression that even ARM isn't so well supported on FreeBSD. Some things you can't change with just only a better How-To. Even if FreeBSD is super-great / rocks so well now. I think if we had these two HOWTO articles today, and we could aggressively point people at them, this would be a huge win for expanding the number of people who try out FreeBSD for modern server applications. -- Craig ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, Jul 17, 2014 at 9:54 PM, Baptiste Daroussin b...@freebsd.org wrote: On Thu, Jul 17, 2014 at 10:21:17PM +0200, Andreas Nilsson wrote: On Thu, Jul 17, 2014 at 10:15 PM, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? They sure are. Well, pkg install $service ; sysrc ${service}_enable=YES would do. Although some services have different names than the packge, which is sort of annoying. Maybe service needs to be extended (seriously sysrc ${service}_enable=YES is not user friendly) we have service -l that list the services, maybe a service This might be a pretty good idea. (barring technical obstacles). ${service} on that create /etc/rc.conf.d/${service} with ${service}_enable=YES in it and service ${service} off to remove it I think we should hope for an API / service interface that can try to avoid (as much as it can) to require specifically rc.conf file and no other possible way. Because FreeBSD may replace the current rc.d system in future with something else better / next generation. For example the on-going openlaunchd project. That question is more about when rather than if. maybe service -l could also be extended to show the current status (maybe with a -v switch) but for sure having the service off by default is a good idea :) It wouldn't hurt very much to have some optional flag to the pkg install command that allowed a user to do in 1 command. Then the global configuration of services being installed off by default would remain as always. Yet allowing that little extra switch would achieve the stated goal. And help towards FreeBSD being a slightly more polished OS that is more user-friendly. Since, you know do the math. It is 1 fewer total commands to type in. Such savings all adds up. If enough such minor improvement can be made all across the board. Then it makes a difference. regards, Bapt ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, Jul 17, 2014 at 10:21:17PM +0200, Andreas Nilsson wrote: On Thu, Jul 17, 2014 at 10:15 PM, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? They sure are. Well, pkg install $service ; sysrc ${service}_enable=YES would do. Although some services have different names than the packge, which is sort of annoying. I hacked up a solution for service(8): http://bsd-geek.de/FreeBSD/service.sh.enable-disable.patch The patch adds the following directives to service(8): enable: Grabs an rc script's rcvar value and runs sysrc foo_enable=YES disable: The opposite of enable rcdelete: Deletes an rc script's rcvar value from /etc/rc.conf using sysrc -x foo_enable The nice thing about is that you can use one of the new directives on one line with the old ones, as long as the new are the first argument: # service syslogd enable # service apache24 disable stop # service apache24 rcdelete stop # service nginx enable start So after installing a package, to start and enable a daemon permanently all you have to run is # service foo enable start Lars P.S.: Thansk to Devin for his hard work on sysrc! pgpXcgD203Myq.pgp Description: PGP signature
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, Jul 17, 2014 at 11:07:39PM +0200, Baptiste Daroussin wrote: On Thu, Jul 17, 2014 at 01:57:52PM -0700, Adrian Chadd wrote: On 17 July 2014 13:54, Baptiste Daroussin b...@freebsd.org wrote: On Thu, Jul 17, 2014 at 10:21:17PM +0200, Andreas Nilsson wrote: On Thu, Jul 17, 2014 at 10:15 PM, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? They sure are. Well, pkg install $service ; sysrc ${service}_enable=YES would do. Although some services have different names than the packge, which is sort of annoying. Maybe service needs to be extended (seriously sysrc ${service}_enable=YES is not user friendly) we have service -l that list the services, maybe a service ${service} on that create /etc/rc.conf.d/${service} with ${service}_enable=YES in it and service ${service} off to remove it maybe service -l could also be extended to show the current status (maybe with a -v switch) but for sure having the service off by default is a good idea :) Yeah, maybe having it populate an entry of service_enable=NO for now . then you need to extend rcng to support /usr/local/etc/rc.conf.d so the packages can install them without touching base :) and we will need to wait for all supported FreeBSD version to have the said modification) Here's a totally untested patch to do that. I was rather surprised that this wasn't configurable already. -- Brooks Index: defaults/rc.conf === --- defaults/rc.conf(revision 268825) +++ defaults/rc.conf(working copy) @@ -56,6 +56,7 @@ local_startup=/usr/local/etc/rc.d # startup script dirs. script_name_sep= # Change if your startup scripts' names contain spaces rc_conf_files=/etc/rc.conf /etc/rc.conf.local +rc_conf_dirs=/etc/rc.conf.d /usr/local/etc/rc.conf.d # ZFS support zfs_enable=NO# Set to YES to automatically mount ZFS file systems Index: rc.subr === --- rc.subr (revision 268825) +++ rc.subr (working copy) @@ -1289,10 +1289,12 @@ fi _rc_conf_loaded=true fi - if [ -f /etc/rc.conf.d/$_name ]; then - debug Sourcing /etc/rc.conf.d/${_name} - . /etc/rc.conf.d/$_name - fi + for _dir in ${rc_conf_dirs}; do + if [ -f $_dir/$_name ]; then + debug Sourcing ${_dir}/${_name} + . $dir/$_name + fi + done # Set defaults if defined. for _var in $rcvar; do pgp70OxID1KyT.pgp Description: PGP signature
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
Hi! On 18 July 2014 07:28, Lars Engels lars.eng...@0x20.net wrote: On Thu, Jul 17, 2014 at 10:21:17PM +0200, Andreas Nilsson wrote: On Thu, Jul 17, 2014 at 10:15 PM, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? They sure are. Well, pkg install $service ; sysrc ${service}_enable=YES would do. Although some services have different names than the packge, which is sort of annoying. I hacked up a solution for service(8): http://bsd-geek.de/FreeBSD/service.sh.enable-disable.patch The patch adds the following directives to service(8): enable: Grabs an rc script's rcvar value and runs sysrc foo_enable=YES disable: The opposite of enable rcdelete: Deletes an rc script's rcvar value from /etc/rc.conf using sysrc -x foo_enable The nice thing about is that you can use one of the new directives on one line with the old ones, as long as the new are the first argument: # service syslogd enable # service apache24 disable stop # service apache24 rcdelete stop # service nginx enable start So after installing a package, to start and enable a daemon permanently all you have to run is # service foo enable start Lars P.S.: Thansk to Devin for his hard work on sysrc! Having a way for sysrc and service to know what particular options and services are exposed by a given package or installed thing would be nice. Right now the namespace is very flat and it's not obvious in all instances what needs to happen to make it useful and what the options are. Oh, hm, I'd like to know what options there are for controlling the installed apache24 package, let's see... I remember IRIX having that command to list services, stop them and start them, configure them enabled and disabled. Solaris grew something like that with Solaris 10 and after the initial learning curve it was great. Hving something like that would be 100% awesome. -a ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Fri, Jul 18, 2014 at 12:10:34PM -0700, Adrian Chadd wrote: Hi! On 18 July 2014 07:28, Lars Engels lars.eng...@0x20.net wrote: On Thu, Jul 17, 2014 at 10:21:17PM +0200, Andreas Nilsson wrote: On Thu, Jul 17, 2014 at 10:15 PM, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? They sure are. Well, pkg install $service ; sysrc ${service}_enable=YES would do. Although some services have different names than the packge, which is sort of annoying. I hacked up a solution for service(8): http://bsd-geek.de/FreeBSD/service.sh.enable-disable.patch The patch adds the following directives to service(8): enable: Grabs an rc script's rcvar value and runs sysrc foo_enable=YES disable: The opposite of enable rcdelete: Deletes an rc script's rcvar value from /etc/rc.conf using sysrc -x foo_enable The nice thing about is that you can use one of the new directives on one line with the old ones, as long as the new are the first argument: # service syslogd enable # service apache24 disable stop # service apache24 rcdelete stop # service nginx enable start So after installing a package, to start and enable a daemon permanently all you have to run is # service foo enable start Lars P.S.: Thansk to Devin for his hard work on sysrc! Having a way for sysrc and service to know what particular options and services are exposed by a given package or installed thing would be nice. Right now the namespace is very flat and it's not obvious in all instances what needs to happen to make it useful and what the options are. Oh, hm, I'd like to know what options there are for controlling the installed apache24 package, let's see... I remember IRIX having that command to list services, stop them and start them, configure them enabled and disabled. Solaris grew something like that with Solaris 10 and after the initial learning curve it was great. Hving something like that would be 100% awesome. you are asking for rcng2 with a declarative init config rather the a script regards, Bapt pgpybwPAn1ApH.pgp Description: PGP signature
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On 18 July 2014 14:21, Baptiste Daroussin b...@freebsd.org wrote: On Fri, Jul 18, 2014 at 12:10:34PM -0700, Adrian Chadd wrote: Hi! On 18 July 2014 07:28, Lars Engels lars.eng...@0x20.net wrote: On Thu, Jul 17, 2014 at 10:21:17PM +0200, Andreas Nilsson wrote: On Thu, Jul 17, 2014 at 10:15 PM, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? They sure are. Well, pkg install $service ; sysrc ${service}_enable=YES would do. Although some services have different names than the packge, which is sort of annoying. I hacked up a solution for service(8): http://bsd-geek.de/FreeBSD/service.sh.enable-disable.patch The patch adds the following directives to service(8): enable: Grabs an rc script's rcvar value and runs sysrc foo_enable=YES disable: The opposite of enable rcdelete: Deletes an rc script's rcvar value from /etc/rc.conf using sysrc -x foo_enable The nice thing about is that you can use one of the new directives on one line with the old ones, as long as the new are the first argument: # service syslogd enable # service apache24 disable stop # service apache24 rcdelete stop # service nginx enable start So after installing a package, to start and enable a daemon permanently all you have to run is # service foo enable start Lars P.S.: Thansk to Devin for his hard work on sysrc! Having a way for sysrc and service to know what particular options and services are exposed by a given package or installed thing would be nice. Right now the namespace is very flat and it's not obvious in all instances what needs to happen to make it useful and what the options are. Oh, hm, I'd like to know what options there are for controlling the installed apache24 package, let's see... I remember IRIX having that command to list services, stop them and start them, configure them enabled and disabled. Solaris grew something like that with Solaris 10 and after the initial learning curve it was great. Hving something like that would be 100% awesome. you are asking for rcng2 with a declarative init config rather the a script It can be a series of scripts. The problem is that the namespace for options has nothing else attached, like Hi I'm an option that starts/stops a service, Hi I'm an option that's for this package, Hi I'm an option that's for this class of things. Right now there's just a series of shell variables with educated guesses about what package they're related to and what they do, rather than anything that specifically says what they do. -a ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Jul 17, 2014, at 13:00, Adrian Chadd adr...@freebsd.org wrote: On 17 July 2014 12:57, Andreas Nilsson andrn...@gmail.com wrote: On Thu, Jul 17, 2014 at 9:28 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; I disagree on this. For network services on linux ( apart from ssh ), I want that started very seldom. But I do want the package installed so that when I need it, it is there. Having it autostart as part of being installed is breaking KISS and in some way unix philosophy: I asked for something to be installed, not installed and autostarted. That's cool. We can disagree on that. But the fact that you have to edit a file to enable things and hope you get the right start entry in /etc/rc.conf or /usr/local/etc/rc.conf, or wherever you put it is, is a pain. In the context of the email thread, no one in their sane mind will configure Amazon/Heroku/etc. VMs manually. They will use ansible/puppet/chef/etc. to install packages and to start services after they are installed and configured. I honestly don't see what the big deal is. Most of the time you will need to configure your apache server before you can start it. -- Rui Paulo ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
Hi, I attend a lot of different Meetup groups in the San Francisco Bay Area / Silicon Valley. What I am seeing is the following usage pattern for new developers, especially for web apps and cloud applications. (1) On their desktop/laptop, they will generally be using a Mac running OS X. This is their desktop Unix environment. This seems to be true of almost 90% of the people that I meet. The 10% of people who run a PC laptop, will mostly be running Windows. Very few seem to run Linux on their laptops, but if they do, it will likely be Ubuntu Linux. (2) For their deployed application, generally they will deploy to a Linux environment on a server. These days, the server will very likely be in a cloud environment: Amazon, Rackspace, Heroku. For (1), encouraging people to move away from a Mac to FreeBSD for their desktop environment is a tough sell. Apple is a multi-billion dollar company, and they make beautiful hardware, and software with a fantastic end-user experience. The PC-BSD project is fighting the good fight in terms of making a usable FreeBSD desktop, but its a touch battle to fight. For (2), encouraging people to move away from Linux to FreeBSD on the server, may be something where we can get more wins. I think we can do this by having more HOWTO articles on the FreeBSD web page that explain the following: (1) We need a HOWTO article that explains for each command using apt or yum for installing packages, how can I do the same thing using pkg. Even if we have a web page with a table, contrasting the apt/yum commands, and pkg commands, that would be super useful. A lot of folks have moved away from FreeBSD, purely because they are sick of pkg_add. We need to explain to folks that we have something better, that is quite competitive to apt/yum, and it is easy to use. (2) We need a HOWTO article that explains how to set up a FreeBSD environment with some of the major cloud providers, i.e. Amazon, Rackspace, Microsoft Azure, etc. Do we have such articles today, or is anybody working on something like that? I think if we had these two HOWTO articles today, and we could aggressively point people at them, this would be a huge win for expanding the number of people who try out FreeBSD for modern server applications. -- Craig ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; 5) .. and then we need examples of actually deploying useful scenarios, like so here's what you type to get django working right, here's how you get a default memcached that works well, here's how you bring up node.js, etc. 6) Then make VMs of the above so people can just clone and install them. -a On 17 July 2014 11:25, Craig Rodrigues rodr...@freebsd.org wrote: Hi, I attend a lot of different Meetup groups in the San Francisco Bay Area / Silicon Valley. What I am seeing is the following usage pattern for new developers, especially for web apps and cloud applications. (1) On their desktop/laptop, they will generally be using a Mac running OS X. This is their desktop Unix environment. This seems to be true of almost 90% of the people that I meet. The 10% of people who run a PC laptop, will mostly be running Windows. Very few seem to run Linux on their laptops, but if they do, it will likely be Ubuntu Linux. (2) For their deployed application, generally they will deploy to a Linux environment on a server. These days, the server will very likely be in a cloud environment: Amazon, Rackspace, Heroku. For (1), encouraging people to move away from a Mac to FreeBSD for their desktop environment is a tough sell. Apple is a multi-billion dollar company, and they make beautiful hardware, and software with a fantastic end-user experience. The PC-BSD project is fighting the good fight in terms of making a usable FreeBSD desktop, but its a touch battle to fight. For (2), encouraging people to move away from Linux to FreeBSD on the server, may be something where we can get more wins. I think we can do this by having more HOWTO articles on the FreeBSD web page that explain the following: (1) We need a HOWTO article that explains for each command using apt or yum for installing packages, how can I do the same thing using pkg. Even if we have a web page with a table, contrasting the apt/yum commands, and pkg commands, that would be super useful. A lot of folks have moved away from FreeBSD, purely because they are sick of pkg_add. We need to explain to folks that we have something better, that is quite competitive to apt/yum, and it is easy to use. (2) We need a HOWTO article that explains how to set up a FreeBSD environment with some of the major cloud providers, i.e. Amazon, Rackspace, Microsoft Azure, etc. Do we have such articles today, or is anybody working on something like that? I think if we had these two HOWTO articles today, and we could aggressively point people at them, this would be a huge win for expanding the number of people who try out FreeBSD for modern server applications. -- Craig ___ freebsd-curr...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, Jul 17, 2014 at 9:28 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; I disagree on this. For network services on linux ( apart from ssh ), I want that started very seldom. But I do want the package installed so that when I need it, it is there. Having it autostart as part of being installed is breaking KISS and in some way unix philosophy: I asked for something to be installed, not installed and autostarted. 5) .. and then we need examples of actually deploying useful scenarios, like so here's what you type to get django working right, here's how you get a default memcached that works well, here's how you bring up node.js, etc. Oh yes. I think that quite a few packages have default options that make them unsuitable for out-of-box usage, ie some lack the sane default dbi-stuff and so on. 6) Then make VMs of the above so people can just clone and install them. At least zfs-datasets ready to be run as jails would be really good too. /A -a On 17 July 2014 11:25, Craig Rodrigues rodr...@freebsd.org wrote: Hi, I attend a lot of different Meetup groups in the San Francisco Bay Area / Silicon Valley. What I am seeing is the following usage pattern for new developers, especially for web apps and cloud applications. (1) On their desktop/laptop, they will generally be using a Mac running OS X. This is their desktop Unix environment. This seems to be true of almost 90% of the people that I meet. The 10% of people who run a PC laptop, will mostly be running Windows. Very few seem to run Linux on their laptops, but if they do, it will likely be Ubuntu Linux. (2) For their deployed application, generally they will deploy to a Linux environment on a server. These days, the server will very likely be in a cloud environment: Amazon, Rackspace, Heroku. For (1), encouraging people to move away from a Mac to FreeBSD for their desktop environment is a tough sell. Apple is a multi-billion dollar company, and they make beautiful hardware, and software with a fantastic end-user experience. The PC-BSD project is fighting the good fight in terms of making a usable FreeBSD desktop, but its a touch battle to fight. For (2), encouraging people to move away from Linux to FreeBSD on the server, may be something where we can get more wins. I think we can do this by having more HOWTO articles on the FreeBSD web page that explain the following: (1) We need a HOWTO article that explains for each command using apt or yum for installing packages, how can I do the same thing using pkg. Even if we have a web page with a table, contrasting the apt/yum commands, and pkg commands, that would be super useful. A lot of folks have moved away from FreeBSD, purely because they are sick of pkg_add. We need to explain to folks that we have something better, that is quite competitive to apt/yum, and it is easy to use. (2) We need a HOWTO article that explains how to set up a FreeBSD environment with some of the major cloud providers, i.e. Amazon, Rackspace, Microsoft Azure, etc. Do we have such articles today, or is anybody working on something like that? I think if we had these two HOWTO articles today, and we could aggressively point people at them, this would be a huge win for expanding the number of people who try out FreeBSD for modern server applications. -- Craig ___ freebsd-curr...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org ___ freebsd-curr...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On 17 July 2014 12:57, Andreas Nilsson andrn...@gmail.com wrote: On Thu, Jul 17, 2014 at 9:28 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; I disagree on this. For network services on linux ( apart from ssh ), I want that started very seldom. But I do want the package installed so that when I need it, it is there. Having it autostart as part of being installed is breaking KISS and in some way unix philosophy: I asked for something to be installed, not installed and autostarted. That's cool. We can disagree on that. But the fact that you have to edit a file to enable things and hope you get the right start entry in /etc/rc.conf or /usr/local/etc/rc.conf, or wherever you put it is, is a pain. -a ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Regards, Alberto Mijares ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? -a ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, Jul 17, 2014 at 3:42 PM, Adrian Chadd adr...@freebsd.org wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? # service appname onestart For the rest, read the manual and understand your OS. ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, Jul 17, 2014 at 10:15 PM, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? They sure are. Well, pkg install $service ; sysrc ${service}_enable=YES would do. Although some services have different names than the packge, which is sort of annoying. I wouldn't mind though if pkg via dialog or some such mechanism asked if wanted it enabled. Or via pkg-message told me howto enable it. /A ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On 17 July 2014 13:15, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? Yup, and if the default is going to be off, then you want the instructions to be type this in, not edit this file. There's odd things too, like oh look I installed xorg, but then I can't run it without enabling hald/dbus, then starting it.. oh wait, no mouse, so I have to reboot for them to come up right kind of crap. That's the kind of thing that turns people away. -a ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, Jul 17, 2014 at 10:21 PM, Adrian Chadd adr...@freebsd.org wrote: On 17 July 2014 13:15, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? Yup, and if the default is going to be off, then you want the instructions to be type this in, not edit this file. There's odd things too, like oh look I installed xorg, but then I can't run it without enabling hald/dbus, then starting it.. oh wait, no mouse, so I have to reboot for them to come up right kind of crap. That's the kind of thing that turns people away. But this is more of a desktop/laptop setup, right? If services had an option ( the ones provided via ports anyway) for autostart, and package sets for different use cases was provided, like server and desktop say, there could for desktop be the default to have the option set for autostart and for server the option would be to not autostart. /A ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, Jul 17, 2014 at 10:21:17PM +0200, Andreas Nilsson wrote: On Thu, Jul 17, 2014 at 10:15 PM, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? They sure are. Well, pkg install $service ; sysrc ${service}_enable=YES would do. Although some services have different names than the packge, which is sort of annoying. Maybe service needs to be extended (seriously sysrc ${service}_enable=YES is not user friendly) we have service -l that list the services, maybe a service ${service} on that create /etc/rc.conf.d/${service} with ${service}_enable=YES in it and service ${service} off to remove it maybe service -l could also be extended to show the current status (maybe with a -v switch) but for sure having the service off by default is a good idea :) regards, Bapt pgpJFDQvbZfZe.pgp Description: PGP signature
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, 2014-07-17 at 13:21 -0700, Adrian Chadd wrote: On 17 July 2014 13:15, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? Yup, and if the default is going to be off, then you want the instructions to be type this in, not edit this file. There's odd things too, like oh look I installed xorg, but then I can't run it without enabling hald/dbus, then starting it.. oh wait, no mouse, so I have to reboot for them to come up right kind of crap. That's the kind of thing that turns people away. I see your point, and agree that there should be clear instructions after installing a port/package. Most ports I install already do a good job at this. But I would not like anything to autostart just because I install it. Prefer to enable rather than disable something, or worse, having it autostart without knowing. That's the kind of thing that turned me to FreeBSD :-) -a ___ freebsd-...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-doc To unsubscribe, send any mail to freebsd-doc-unsubscr...@freebsd.org ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, Jul 17, 2014 at 01:21:32PM -0700, Adrian Chadd wrote: On 17 July 2014 13:15, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? Yup, and if the default is going to be off, then you want the instructions to be type this in, not edit this file. There's odd things too, like oh look I installed xorg, but then I can't run it without enabling hald/dbus, then starting it.. oh wait, no mouse, so I have to reboot for them to come up right kind of crap. yes that is why xorg needs to have devd instead of hal support by default :) regards, Bapt pgp006GaASOyO.pgp Description: PGP signature
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On 17 July 2014 13:54, Baptiste Daroussin b...@freebsd.org wrote: On Thu, Jul 17, 2014 at 10:21:17PM +0200, Andreas Nilsson wrote: On Thu, Jul 17, 2014 at 10:15 PM, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? They sure are. Well, pkg install $service ; sysrc ${service}_enable=YES would do. Although some services have different names than the packge, which is sort of annoying. Maybe service needs to be extended (seriously sysrc ${service}_enable=YES is not user friendly) we have service -l that list the services, maybe a service ${service} on that create /etc/rc.conf.d/${service} with ${service}_enable=YES in it and service ${service} off to remove it maybe service -l could also be extended to show the current status (maybe with a -v switch) but for sure having the service off by default is a good idea :) Yeah, maybe having it populate an entry of service_enable=NO for now . It's even more unclear-ish - it's not obvious which options control services and which ones are configuration things. We don't call it service_xxx_enable, right? -a ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, Jul 17, 2014 at 01:57:52PM -0700, Adrian Chadd wrote: On 17 July 2014 13:54, Baptiste Daroussin b...@freebsd.org wrote: On Thu, Jul 17, 2014 at 10:21:17PM +0200, Andreas Nilsson wrote: On Thu, Jul 17, 2014 at 10:15 PM, Navdeep Parhar npar...@gmail.com wrote: On 07/17/14 13:12, Adrian Chadd wrote: On 17 July 2014 13:03, Alberto Mijares amijar...@gmail.com wrote: On Thu, Jul 17, 2014 at 2:58 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; No. Please NEVER do that! The user must be able to edit the files and start the service by himself. Cool, so what's the single line command needed to type in to start a given package service? Aren't sysrc(8) and service(8) for this kind of stuff? They sure are. Well, pkg install $service ; sysrc ${service}_enable=YES would do. Although some services have different names than the packge, which is sort of annoying. Maybe service needs to be extended (seriously sysrc ${service}_enable=YES is not user friendly) we have service -l that list the services, maybe a service ${service} on that create /etc/rc.conf.d/${service} with ${service}_enable=YES in it and service ${service} off to remove it maybe service -l could also be extended to show the current status (maybe with a -v switch) but for sure having the service off by default is a good idea :) Yeah, maybe having it populate an entry of service_enable=NO for now . then you need to extend rcng to support /usr/local/etc/rc.conf.d so the packages can install them without touching base :) and we will need to wait for all supported FreeBSD version to have the said modification) It's even more unclear-ish - it's not obvious which options control services and which ones are configuration things. We don't call it service_xxx_enable, right? imho this is obvious xxx_enable == control service. regards, Bapt pgp3MU6Pix1ZM.pgp Description: PGP signature
Re: HOWTO articles for migrating from Linux to FreeBSD, especially for pkg?
On Thu, Jul 17, 2014 at 09:57:44PM +0200, Andreas Nilsson wrote: On Thu, Jul 17, 2014 at 9:28 PM, Adrian Chadd adr...@freebsd.org wrote: Hi! 3) The binary packages need to work out of the box 4) .. which means, when you do things like pkg install apache, it can't just be installed and not be enabled, because that's a bit of a problem; I disagree on this. For network services on linux ( apart from ssh ), I want that started very seldom. But I do want the package installed so that when I need it, it is there. Having it autostart as part of being installed is breaking KISS and in some way unix philosophy: I asked for something to be installed, not installed and autostarted. 5) .. and then we need examples of actually deploying useful scenarios, like so here's what you type to get django working right, here's how you get a default memcached that works well, here's how you bring up node.js, etc. Oh yes. I think that quite a few packages have default options that make them unsuitable for out-of-box usage, ie some lack the sane default dbi-stuff and so on. Reporting them is very much needed, we try to change this but without report it is hard, as much as I can I use vanilla packages now, and I discovered that they are now pretty much sane, a few example has been found and modified recently like nginx not supporting https by default, so do not hesitate to report any unsuitable options for out-of-box usage. regards, Bapt pgpXV_Hvpzx3a.pgp Description: PGP signature