Re: Why are there no PKG_PATH defaults?

2014-09-25 Thread Paolo Aglialoro
This setup would be great and make life easier for the average user without
making the story complicated (i.e. a system with downloads working out of
the box without hassles)

Also ports.tar.gz fetch would be one further hassle less.
 Il 24/set/2014 23:36 Romain FABBRI - Alien Consulting 
romain.fab...@alienconsulting.net ha scritto:

 One think that could be done without hammering servers when you install
 from CD would be to add a question to the install script :

 Would you like to define the PKG PATH ? :
 - [1] : propose mirrors based on the timezone given (and then provide a
 menu and you just have to select the proxy)
 - [2] : manually define PKG PATH (type the string, could even check if the
 path seems valid)
 - [3] : nope thanks

 But would it really help much ?

 Romain

 -Message d'origine-
 De : owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] De la part de
 Alexander Hall
 Envoyé : mercredi 24 septembre 2014 23:20
 À : Ville Valkonen
 Cc : PPC Miscellaneous Discussions
 Objet : Re: Why are there no PKG_PATH defaults?

 On 09/24/14 23:09, Ville Valkonen wrote:
  Out of curiosity, what's wrong with the one that installer uses?

 Nothing, however the installer only cares about a mirror if you actually
 install from one of them. If you install from e.g. CD, you don't have a
 selected mirror.

 If you do install or upgrade (I'm pretty sure) from a mirror,
 /etc/pkg.conf will be updated accordingly.

 /Alexander

 
  --
  Regards,
  Ville
 
  On 24 September 2014 19:34, Alexander Hall alexan...@beard.se wrote:
  On September 24, 2014 6:09:04 PM CEST, openda...@hushmail.com wrote:
  Indeed, the installer only creates that if you install from a
  mirror.  Apart from that, as someone else pointed out, which mirror
  should one  choose?
 
  Cool, I didn't know that.
 
  Then, in the event that someone installed via an ISO or some
  pre-defined VM (ie. a DigitalOcean droplets) -- how about a one-time
  script upon first root login to ask for such info?
 
You do not have a `PKG_PATH` set for `pkg_add`. Would you like us
  to set it for you?  (Y/n) y
 
Choose your nearest mirror:
 
1. Continent
2. Whatever
3. ...
 
There is currently no ports collection in `/usr/ports`. Would you
  like us to get it for you? (Y/n)
 
  I can't speak for others, but I'd be terribly annoyed by this.
 
  Also, the script isn't trivial. Feel free to give it a go, share and
 use it for your own sake, but I'd be surprised to see it go in.
 
  /Alexander
 
 
  Thanks!
 
  O.D.
 
  On 24. september 2014 at 1:05 PM, Alexander Hall  wrote:On
  September 24, 2014 12:44:14 PM CEST, openda...@hushmail.com wrote:
  Because /etc/pkg.conf ?
 
  Sorry, no such file over here.
 
  Indeed, the installer only creates that if you install from a mirror.
  Apart from that, as someone else pointed out, which mirror should
  one choose?
 
  /Alexander
 
 
  O.D.
 
  On 23. september 2014 at 1:47 PM, Alexander Hall  wrote:On
  September
  23, 2014 3:00:41 PM CEST, openda...@hushmail.com wrote:
  Hi,
 
  Expanding on the whole
  http://en.wikipedia.org/wiki/Convention_over_configuration thing
  -- why aren't there any sane PKG_PATH defaults? Ie.:
 
  release=$(uname -r)
  architecture=$(uname -p)
 
  export
  PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/${release}/packages/${a
  rchitecture}/
 
  Because /etc/pkg.conf ?
 
  /Alexander
 
 
  Thanks!
 
  O.D.



Re: Why are there no PKG_PATH defaults?

2014-09-25 Thread Ville Valkonen
On 25 September 2014 01:30, Dmitrij D. Czarkoff czark...@gmail.com wrote:
 openda...@hushmail.com said:
 Then, in the event that someone installed via an ISO or some
 pre-defined VM (ie. a DigitalOcean droplets) -- how about a one-time
 script upon first root login to ask for such info?

   You do not have a `PKG_PATH` set for `pkg_add`. Would you like us to
 set it for you?  (Y/n) y

  Choose your nearest mirror:

  1. Continent
  2. Whatever
  3. ...

 FWIW the idea of presenting the list of mirrors suddenly starts to make
 sense, as now there is no browser in base install. But

 Alexander Hall said:
 I can't speak for others, but I'd be terribly annoyed by this.

 I absolutely agree with this sentiment.

 In my opinion, the best way to present list of mirrors would be to
 provide a command for fetching it, either in pkg_add(1) or in root.mail
 (the message root recieves upon completion of installation).  As I
 prefer the latter way, patch to root.mail follows.

 --
 Dmitrij D. Czarkoff

 Index: root.mail
 ===
 RCS file: /var/cvs/src/etc/root/root.mail,v
 retrieving revision 1.104
 diff -u -p -r1.104 root.mail
 --- root.mail   15 Jul 2014 22:05:29 -  1.104
 +++ root.mail   24 Sep 2014 22:05:12 -
 @@ -36,7 +36,9 @@ full list of packages for each architect
 ftp://ftp.openbsd.org/pub/OpenBSD/5.6/packages/

  If you do not find a package you want on the CD, please go look at your
 -nearest FTP mirror site.
 +nearest FTP mirror site.  To get a list of available mirrors, execute:
 +
 + ftp -o - http://ftp.openbsd.org/cgi-bin/ftplist.cgi

  Select your architecture and download the tarballs of your choice.  For 
 example
  to install the emacs package for amd64, execute:

Not that this would be a voting thing but I like the direction where
this is heading. More convenient than writing the address down or
remembering it.

--
Regards,
Ville



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread Ingo Schwarze
Hi,

Harald Dunkel wrote on Wed, Sep 24, 2014 at 07:14:21AM +0200:

 This is something that could be added to /etc/examples.
 See the attachment suggesting a first version.

I hate that.  Examples should not duplicate manual pages.
That merely causes double maintenance effort for developers.
Let's not make documentation maintenance harder on ourselves.

It also doesn't make things easier for users, quite to the contrary.
Chances are both copies of the documentation will eventually get
out of sync, and then it's overtly confusing.  And even if we manage
to prevent explicit contradictions from creeping in, there will be
some stuff documented only in one of the places, some stuff only
in the other place.  So now users have to look at *two* places where
formerly it was sufficient to look only at one.  They now have to
read the double amount of text for almost the same information -
and they have to stay very attententive because either copy might
contain the bit of information they are searching for, buried among
boring duplication.

Even if we manage to keep the two completely in sync, such that
both contain exactly the same information, it still improves nothing.
Then we merely train users to not read the documentation, which we
certainly don't want to do: It would hurt them, because in almost
all other places, not reading the documentation usually leads to
screwing up.

In general, i think we should handle examples roughly as follows:

 1. When something is completely trivial (like fullwidth=yes)
and there is no way to not understand it from the text of the
manual itself, there shouldn't be any example, neither in the
manual nor in an example file.  It would just make the
documentation longer for no gain.

 2. Examples make sense when something has a minimum level
of complexity such that looking at the examples make understanding
easier.  Examples should focus on the parts hard to understand
and never try to be exhaustive.  If the total amount of examples
required comfortably fits into the EXAMPLES section of the
manual, that's where they should go, and there should be no
separate examples file.

 3. Only when something is so difficult that it requires
a large amount of examples that would seem excessive in
the manual, I would deem a separate example file appropriate.

Don't take these as hard rules, each individual case requires
good judgement how it's easiest for the average user.

Note that some of the files in /etc/examples could use cleanup.  It
was the right thing to just move them and *not* mix moving and
cleanup, but now it's time for cleanup.  For example, from a *very*
superficial scan, exports, ftpchroot, hosts.lpd, mixerctl.conf,
rc.local, rc.securelevel, and rc.shutdown could be deleted outright,
and ntpd.conf, printcap, rbootd.conf, sasyncd.conf, sensorsd.conf
look suspicious.  But that's a separate matter.

Anyway, i oppose the addition of the file /etc/examples/pkg.conf,
no matter what the content.  I consider pkg.conf(1) a textbook
example of a file format so trivial that any examples would be
superfluous and distracting verbiage.

Yours,
  Ingo


 # Set to yes if you really want to use the full width of the
 # terminal for the progressmeter.
 # fullwidth = yes
 
 # pkg_add(1) and pkg_delete(1) will syslog(3) installations,
 # updates and deletions by default.  Set to 0 to avoid logging
 # entirely.  Levels higher than 1 may log more information in
 # the future.
 # loglevel = 0
 
 # URL to package repository updated during installation.  Used
 # for accessing packages if the environment variable PKG_PATH
 # is not defined and no further options are defined.
 # installpath = 
 
 # Set to yes to waive checksums during package deletions.
 # nochecksum = yes
 
 # Set to yes to display (done/total) number of package
 # messages.
 # ntogo = yes



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread Harald Dunkel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi Ingo,

On 09/24/14 11:29, Ingo Schwarze wrote:
 Hi,
 
 Harald Dunkel wrote on Wed, Sep 24, 2014 at 07:14:21AM +0200:
 
 This is something that could be added to /etc/examples. See the attachment 
 suggesting a first version.
 
 I hate that.  Examples should not duplicate manual pages. That merely causes 
 double maintenance effort for developers. Let's not make documentation 
 maintenance harder on ourselves.
 
 It also doesn't make things easier for users, quite to the contrary. Chances 
 are both copies of the documentation will eventually get out of sync, and 
 then it's overtly confusing.  And even if we manage to prevent explicit 
 contradictions from creeping in, there will be some stuff documented
 only in one of the places, some stuff only in the other place.  So now users 
 have to look at *two* places where formerly it was sufficient to look only at 
 one.  They now have to read the double amount of text for almost the same 
 information - and they have to stay very attententive because
 either copy might contain the bit of information they are searching for, 
 buried among boring duplication.
 

I completely agree, but that seems 2b the case for _all_ files in
/etc/examples (or for config files in general).

As a user I love to find a config file in /etc briefly showing me
the most important options, their default value (something that is
clearly missing in pkg.conf(5)) and some explaining words. One file
to read and edit. Its a starting point. The man page isn't.

Just imagine you had never configured dovecot before, and now you
have to create a config file from scratch, using just the man pages.

BTW, when I installed 5.6 for the first time, I thought that I made an
installation error, since the usual /etc/sysctl.conf and /etc/ntp.conf
and the others were gone. Its unexpected for openBSD that these files
are hidden somewhere else. Of course I understand the intention to
avoid upgrade problems.


Regards
Harri
iQEcBAEBCAAGBQJUIptoAAoJEAqeKp5m04HLmDgIAIHW7Mv2LTVD0IW5vyQSwa8n
e+7UvKcAqu3VIL28Z1zJMp0GyI4IbnqnnNECuBcyWIRBzHQXddL3r9kykfdjKEvH
723JIN1rlNl1DXd0yNt+2bX+6++9WScIdRmExEhH4w7IUKfOZqnDAHoY/DMUhe1/
g9+CcKh2yz5PtH500Qw6B0nImPvzNPUxZxqxtiLPWtoNnSrDACKPLXV6A/wtjDAQ
+RJAByqrCbA+CknbzXLosa/46NyOfOwKBr92CmBYKGNkGQDg8LJgdbqcBhJOxje3
MQGfIxQXWQDMnIOnKFJ6ZcWji2n+s4flG8wZXSa2lHgMHxDLZAnK5nC9USPlrwM=
=hr41
-END PGP SIGNATURE-



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread opendaddy
 Because /etc/pkg.conf ?

Sorry, no such file over here.

O.D.

On 23. september 2014 at 1:47 PM, Alexander Hall  wrote:On September
23, 2014 3:00:41 PM CEST, openda...@hushmail.com wrote:
Hi,

Expanding on the whole
http://en.wikipedia.org/wiki/Convention_over_configuration thing --
why aren't there any sane PKG_PATH defaults? Ie.:

release=$(uname -r)
architecture=$(uname -p)

export
PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/${release}/packages/${architecture}/

Because /etc/pkg.conf ?

/Alexander


Thanks!

O.D.



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread opendaddy
 OpenBSD solution is to ask the user to choose a mirror at
installation time.

I don't see this preference being remembered after the installation
though.

O.D.

On 23. september 2014 at 1:25 PM, ludovic coues  wrote: why aren't
there any sane PKG_PATH defaults? Ie.:

 release=$(uname -r)
 architecture=$(uname -p)

 export

PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/${release}/packages/${architecture}/

The point of such default would be to not change the server, resulting
in a big load on it.

Such problem prompted archlinux to throttle their main repository
server to force user to choose a mirror more adapted to geographic
situation. OpenBSD solution is to ask the user to choose a mirror at
installation time.

-- 

Cordialement, Coues Ludovic
+336 148 743 42



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread opendaddy
 Because your sane default includes ftp.openbsd.org, which is not
sane  at all. If PKG_PATH or /etc/pkg.conf were set to default to 
ftp.openbsd.org then that host would get hammered instead of the user 
being put in the position of choosing a local mirror.

The proper local mirror should ofcourse be set during the
installation.

O.D.

On 24. september 2014 at 5:37 AM, openbsd2012  wrote:| -Original
Message-
| From: owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] On
| Behalf Of openda...@hushmail.com
| Sent: Tuesday, September 23, 2014 6:01 AM
| Subject: Why are there no PKG_PATH defaults?
...
| Expanding on the whole
| http://en.wikipedia.org/wiki/Convention_over_configuration thing --
why
| aren't there any sane PKG_PATH defaults? Ie.:
| 
| release=$(uname -r)
| architecture=$(uname -p)
| 
| export
| PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/${release}/packages/${arc
| hitecture}/
| 

Because your sane default includes ftp.openbsd.org, which is not
sane at all. If PKG_PATH or /etc/pkg.conf were set to default to
ftp.openbsd.org then that host would get hammered instead of the user
being put in the position of choosing a local mirror.

-Breeno

PS - In anticipation of the typical follow-up argument, whether or not
there is a large existing base of lazy people who fail to choose a
local mirror is not a valid argument for defaulting all users to
ftp.openbsd.org. Such reasoning would merely exacerbate the trouble
with the hypothetical status quo.



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread Jay Patel
I think leave this to devs. to decide what they should and what they
shouldn't provide.  :)
All we can do is remember

echo installpath=ftp://ftp5.usa.openbsd.org/pub/OpenBSD/$(uname
-r)/packages/$(uname -m) | sudo tee /etc/pkg.conf


On Wed, Sep 24, 2014 at 4:15 PM, openda...@hushmail.com wrote:

  OpenBSD solution is to ask the user to choose a mirror at
 installation time.

 I don't see this preference being remembered after the installation
 though.

 O.D.

 On 23. september 2014 at 1:25 PM, ludovic coues  wrote: why aren't
 there any sane PKG_PATH defaults? Ie.:
 
  release=$(uname -r)
  architecture=$(uname -p)
 
  export
 
 PKG_PATH=
 ftp://ftp.openbsd.org/pub/OpenBSD/${release}/packages/${architecture}/

 The point of such default would be to not change the server, resulting
 in a big load on it.

 Such problem prompted archlinux to throttle their main repository
 server to force user to choose a mirror more adapted to geographic
 situation. OpenBSD solution is to ask the user to choose a mirror at
 installation time.

 --

 Cordialement, Coues Ludovic
 +336 148 743 42



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread Barbier, Jason
Just to point out if you do an install where you do select a mirror your
mirror settings do seem to persist beyond the install, so it sounds like
the problem is solved and user education is in order.

*washes hands of the problem*

-- 
Jason Barbier | jab...@serversave.us
Pro Patria Vigilans



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread Ville Valkonen
On 24 September 2014 14:12, Barbier, Jason jab...@serversave.us wrote:
 Just to point out if you do an install where you do select a mirror your
 mirror settings do seem to persist beyond the install, so it sounds like
 the problem is solved and user education is in order.

 *washes hands of the problem*

 --
 Jason Barbier | jab...@serversave.us
 Pro Patria Vigilans

And once you are behind a slow Internet connection and use a local
medium... all you can do is to remember :(

--
Regards,
Ville



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread Ingo Schwarze
Hi,

Harald Dunkel wrote on Wed, Sep 24, 2014 at 12:22:32PM +0200:

 I completely agree, but that seems 2b the case for _all_ files in
 /etc/examples (or for config files in general).

Not really all.  Take dhcpd.conf for example.  Here the complexity
comes from the fact that a wide variety of statements is supported,
that most are unneeded for a typical simple configuration, but that
it's all the same easy to forget one of the things that are needed
for a typical simple configuration.  Besides, even a simple
configuration usually requires more than one level of nesting.
So the example file can show: This is what you probably don't
want to forget, and how to assemble it all.

Another example that is not useless is the new httpd.conf.
Yet another example that is useful is sysctl.conf, even though
the reasons are different.  It lists a selection of variables
more likely to need tweaking than others.  No doubt, there are
more that already are useful, and maybe some could be made useful.

 As a user I love to find a config file in /etc briefly showing me
 the most important options, their default value (something that is
 clearly missing in pkg.conf(5))

Not true.  If you read the options list in the manual carefully,
the defaults of all five options are obvious:

  fullwidth = no
  loglevel = 1
  installpath (unset)
  nochecksum = no
  ntogo = no

 and some explaining words. One file to read and edit.

That's exactly why it's such a bad idea.  Users don't read the
manual, miss important stuff, and hurt themselves.

 Its a starting point. The man page isn't.

That's not true.  The pkg.conf(1) manual is a perfect example of
how to do it, let me cite:

 The file /etc/pkg.conf contains system-wide options related to
 package handling, as a list of `keyword=value' lines.
 [...]

 Currently defined options are as follows:
 [... list ...]

Concise, crystal clear, the perfect starting point.  And it all
fits on one screen (56 lines including headers and footers).

 Just imagine you had never configured dovecot before, and now you
 have to create a config file from scratch, using just the man pages.

Well, dovecot definitely is the prime example of how *NOT* to do
it.  It's the ultimate mess.  The example file is so long that you
almost certainly don't want to read it completely, at least 95% of
it is completely irrelevant for almost all users.  And they
gratuitiouly change large portions of it for each minor release,
so keeping that file in sync is a nightmare.  While i update all
daemons as often as i can, dovecot is an exception.  I update that
one as rarely as i can, for the very reason of not wasting my time
on that horrible mess of a config file that doesn't even deserve
the name config file, it should rather be called misformatted
documentation.

 BTW, when I installed 5.6 for the first time, I thought that I made an
 installation error, since the usual /etc/sysctl.conf and /etc/ntp.conf
 and the others were gone. Its unexpected for openBSD that these files
 are hidden somewhere else. Of course I understand the intention to
 avoid upgrade problems.

Yeah, that's the downside of improvement, it's unavoidable that
it causes surprise at first.  But as long as things get simpler,
not more complicated, that's acceptable, i think.

Yours,
  Ingo



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread Alexander Hall
On September 24, 2014 12:44:14 PM CEST, openda...@hushmail.com wrote:
 Because /etc/pkg.conf ?

Sorry, no such file over here.

Indeed, the installer only creates that if you install from a mirror. Apart 
from that, as someone else pointed out, which mirror should one choose?

/Alexander


O.D.

On 23. september 2014 at 1:47 PM, Alexander Hall  wrote:On September
23, 2014 3:00:41 PM CEST, openda...@hushmail.com wrote:
Hi,

Expanding on the whole
http://en.wikipedia.org/wiki/Convention_over_configuration thing --
why aren't there any sane PKG_PATH defaults? Ie.:

release=$(uname -r)
architecture=$(uname -p)

export
PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/${release}/packages/${architecture}/

Because /etc/pkg.conf ?

/Alexander


Thanks!

O.D.



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread opendaddy
 Indeed, the installer only creates that if you install from a
mirror.  Apart from that, as someone else pointed out, which mirror
should one  choose?

Cool, I didn't know that.

Then, in the event that someone installed via an ISO or some
pre-defined VM (ie. a DigitalOcean droplets) -- how about a one-time
script upon first root login to ask for such info?

  You do not have a `PKG_PATH` set for `pkg_add`. Would you like us to
set it for you?  (Y/n) y

  Choose your nearest mirror:

  1. Continent
  2. Whatever
  3. ...

  There is currently no ports collection in `/usr/ports`. Would you
like us to get it for you? (Y/n)

Thanks!

O.D.

On 24. september 2014 at 1:05 PM, Alexander Hall  wrote:On September
24, 2014 12:44:14 PM CEST, openda...@hushmail.com wrote:
 Because /etc/pkg.conf ?

Sorry, no such file over here.

Indeed, the installer only creates that if you install from a mirror.
Apart from that, as someone else pointed out, which mirror should one
choose?

/Alexander


O.D.

On 23. september 2014 at 1:47 PM, Alexander Hall  wrote:On
September
23, 2014 3:00:41 PM CEST, openda...@hushmail.com wrote:
Hi,

Expanding on the whole
http://en.wikipedia.org/wiki/Convention_over_configuration thing --
why aren't there any sane PKG_PATH defaults? Ie.:

release=$(uname -r)
architecture=$(uname -p)

export
PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/${release}/packages/${architecture}/

Because /etc/pkg.conf ?

/Alexander


Thanks!

O.D.



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread openbsd2012
| -Original Message-
| From: owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] On
| Behalf Of openda...@hushmail.com
| Sent: Tuesday, September 23, 2014 6:01 AM
| Subject: Why are there no PKG_PATH defaults?
...
| Expanding on the whole
| http://en.wikipedia.org/wiki/Convention_over_configuration thing -- why
| aren't there any sane PKG_PATH defaults? Ie.:
| 
| release=$(uname -r)
| architecture=$(uname -p)
| 
| export
| PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/${release}/packages/${arc
| hitecture}/
| 

Because your sane default includes ftp.openbsd.org, which is not sane at all. 
If PKG_PATH or /etc/pkg.conf were set to default to ftp.openbsd.org then that 
host would get hammered instead of the user being put in the position of 
choosing a local mirror.

-Breeno

PS - In anticipation of the typical follow-up argument, whether or not there is 
a large existing base of lazy people who fail to choose a local mirror is not a 
valid argument for defaulting all users to ftp.openbsd.org. Such reasoning 
would merely exacerbate the trouble with the hypothetical status quo.



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread Alexander Hall
On September 24, 2014 6:09:04 PM CEST, openda...@hushmail.com wrote:
 Indeed, the installer only creates that if you install from a
mirror.  Apart from that, as someone else pointed out, which mirror
should one  choose?

Cool, I didn't know that.

Then, in the event that someone installed via an ISO or some
pre-defined VM (ie. a DigitalOcean droplets) -- how about a one-time
script upon first root login to ask for such info?

  You do not have a `PKG_PATH` set for `pkg_add`. Would you like us to
set it for you?  (Y/n) y

  Choose your nearest mirror:

  1. Continent
  2. Whatever
  3. ...

  There is currently no ports collection in `/usr/ports`. Would you
like us to get it for you? (Y/n)

I can't speak for others, but I'd be terribly annoyed by this.

Also, the script isn't trivial. Feel free to give it a go, share and use it for 
your own sake, but I'd be surprised to see it go in.

/Alexander


Thanks!

O.D.

On 24. september 2014 at 1:05 PM, Alexander Hall  wrote:On September
24, 2014 12:44:14 PM CEST, openda...@hushmail.com wrote:
 Because /etc/pkg.conf ?

Sorry, no such file over here.

Indeed, the installer only creates that if you install from a mirror.
Apart from that, as someone else pointed out, which mirror should one
choose?

/Alexander


O.D.

On 23. september 2014 at 1:47 PM, Alexander Hall  wrote:On
September
23, 2014 3:00:41 PM CEST, openda...@hushmail.com wrote:
Hi,

Expanding on the whole
http://en.wikipedia.org/wiki/Convention_over_configuration thing --
why aren't there any sane PKG_PATH defaults? Ie.:

release=$(uname -r)
architecture=$(uname -p)

export
PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/${release}/packages/${architecture}/

Because /etc/pkg.conf ?

/Alexander


Thanks!

O.D.



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread Mihai Popescu
I thought this kind of suggestion are not answered anymore on this list ...

@Ingo Schwarze: why don't you remove the files in /etc/examples and
put some examples in man pages, for the apps that have no such thing
yet?



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread Ingo Schwarze
Hi Mihai,

Mihai Popescu wrote on Wed, Sep 24, 2014 at 08:19:39PM +0200:

 I thought this kind of suggestion are not answered anymore
 on this list ...

What i saw didn't look like a troll to me.
Sorry for the noise in case i accidentally fed one.

 @Ingo Schwarze: why don't you remove the files in /etc/examples

Not all of them should be removed.  In some cases, having more or
more complex examples than a manual can usefully contain seems
helpful.  The notable example of an example file that needs improvement
is pf.conf - though putting the right things there isn't exactly
trivial, so sending patches for that one requires *lots* of experience
and knowledge.

I think *some* example files can be removed, and maybe i might do
that, if i come round to make specific suggestions and get OKs for
them.

 and put some examples in man pages, for the apps that have
 no such thing yet?

That may be useful in some cases, though i cannot say in which ones
without looking at the details.  If you think that a particular
page can be improved by sparingly adding examples, feel free to
send patches, that might speed up the process.

Yours,
  Ingo



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread Liviu Daia
On 24 September 2014, Mihai Popescu mih...@gmail.com wrote:
 I thought this kind of suggestion are not answered anymore on this
 list ...

 @Ingo Schwarze: why don't you remove the files in /etc/examples and
 put some examples in man pages, for the apps that have no such thing
 yet?

I believe the new sysmerge looks at /etc/examples?

Regards,

Liviu Daia



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread Ville Valkonen
Out of curiosity, what's wrong with the one that installer uses?

--
Regards,
Ville

On 24 September 2014 19:34, Alexander Hall alexan...@beard.se wrote:
 On September 24, 2014 6:09:04 PM CEST, openda...@hushmail.com wrote:
 Indeed, the installer only creates that if you install from a
mirror.  Apart from that, as someone else pointed out, which mirror
should one  choose?

Cool, I didn't know that.

Then, in the event that someone installed via an ISO or some
pre-defined VM (ie. a DigitalOcean droplets) -- how about a one-time
script upon first root login to ask for such info?

  You do not have a `PKG_PATH` set for `pkg_add`. Would you like us to
set it for you?  (Y/n) y

  Choose your nearest mirror:

  1. Continent
  2. Whatever
  3. ...

  There is currently no ports collection in `/usr/ports`. Would you
like us to get it for you? (Y/n)

 I can't speak for others, but I'd be terribly annoyed by this.

 Also, the script isn't trivial. Feel free to give it a go, share and use it 
 for your own sake, but I'd be surprised to see it go in.

 /Alexander


Thanks!

O.D.

On 24. september 2014 at 1:05 PM, Alexander Hall  wrote:On September
24, 2014 12:44:14 PM CEST, openda...@hushmail.com wrote:
 Because /etc/pkg.conf ?

Sorry, no such file over here.

Indeed, the installer only creates that if you install from a mirror.
Apart from that, as someone else pointed out, which mirror should one
choose?

/Alexander


O.D.

On 23. september 2014 at 1:47 PM, Alexander Hall  wrote:On
September
23, 2014 3:00:41 PM CEST, openda...@hushmail.com wrote:
Hi,

Expanding on the whole
http://en.wikipedia.org/wiki/Convention_over_configuration thing --
why aren't there any sane PKG_PATH defaults? Ie.:

release=$(uname -r)
architecture=$(uname -p)

export
PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/${release}/packages/${architecture}/

Because /etc/pkg.conf ?

/Alexander


Thanks!

O.D.



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread Alexander Hall

On 09/24/14 23:09, Ville Valkonen wrote:

Out of curiosity, what's wrong with the one that installer uses?


Nothing, however the installer only cares about a mirror if you actually 
install from one of them. If you install from e.g. CD, you don't have a 
selected mirror.


If you do install or upgrade (I'm pretty sure) from a mirror, 
/etc/pkg.conf will be updated accordingly.


/Alexander



--
Regards,
Ville

On 24 September 2014 19:34, Alexander Hall alexan...@beard.se wrote:

On September 24, 2014 6:09:04 PM CEST, openda...@hushmail.com wrote:

Indeed, the installer only creates that if you install from a

mirror.  Apart from that, as someone else pointed out, which mirror
should one  choose?

Cool, I didn't know that.

Then, in the event that someone installed via an ISO or some
pre-defined VM (ie. a DigitalOcean droplets) -- how about a one-time
script upon first root login to ask for such info?

  You do not have a `PKG_PATH` set for `pkg_add`. Would you like us to
set it for you?  (Y/n) y

  Choose your nearest mirror:

  1. Continent
  2. Whatever
  3. ...

  There is currently no ports collection in `/usr/ports`. Would you
like us to get it for you? (Y/n)


I can't speak for others, but I'd be terribly annoyed by this.

Also, the script isn't trivial. Feel free to give it a go, share and use it for 
your own sake, but I'd be surprised to see it go in.

/Alexander



Thanks!

O.D.

On 24. september 2014 at 1:05 PM, Alexander Hall  wrote:On September
24, 2014 12:44:14 PM CEST, openda...@hushmail.com wrote:

Because /etc/pkg.conf ?


Sorry, no such file over here.


Indeed, the installer only creates that if you install from a mirror.
Apart from that, as someone else pointed out, which mirror should one
choose?

/Alexander



O.D.

On 23. september 2014 at 1:47 PM, Alexander Hall  wrote:On

September

23, 2014 3:00:41 PM CEST, openda...@hushmail.com wrote:

Hi,

Expanding on the whole
http://en.wikipedia.org/wiki/Convention_over_configuration thing --
why aren't there any sane PKG_PATH defaults? Ie.:

release=$(uname -r)
architecture=$(uname -p)

export
PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/${release}/packages/${architecture}/


Because /etc/pkg.conf ?

/Alexander



Thanks!

O.D.




Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread Romain FABBRI - Alien Consulting
One think that could be done without hammering servers when you install from CD 
would be to add a question to the install script :

Would you like to define the PKG PATH ? :
- [1] : propose mirrors based on the timezone given (and then provide a menu 
and you just have to select the proxy)
- [2] : manually define PKG PATH (type the string, could even check if the path 
seems valid)
- [3] : nope thanks

But would it really help much ?

Romain

-Message d'origine-
De : owner-m...@openbsd.org [mailto:owner-m...@openbsd.org] De la part de 
Alexander Hall
Envoyé : mercredi 24 septembre 2014 23:20
À : Ville Valkonen
Cc : PPC Miscellaneous Discussions
Objet : Re: Why are there no PKG_PATH defaults?

On 09/24/14 23:09, Ville Valkonen wrote:
 Out of curiosity, what's wrong with the one that installer uses?

Nothing, however the installer only cares about a mirror if you actually 
install from one of them. If you install from e.g. CD, you don't have a 
selected mirror.

If you do install or upgrade (I'm pretty sure) from a mirror, /etc/pkg.conf 
will be updated accordingly.

/Alexander


 --
 Regards,
 Ville

 On 24 September 2014 19:34, Alexander Hall alexan...@beard.se wrote:
 On September 24, 2014 6:09:04 PM CEST, openda...@hushmail.com wrote:
 Indeed, the installer only creates that if you install from a
 mirror.  Apart from that, as someone else pointed out, which mirror 
 should one  choose?

 Cool, I didn't know that.

 Then, in the event that someone installed via an ISO or some 
 pre-defined VM (ie. a DigitalOcean droplets) -- how about a one-time 
 script upon first root login to ask for such info?

   You do not have a `PKG_PATH` set for `pkg_add`. Would you like us 
 to set it for you?  (Y/n) y

   Choose your nearest mirror:

   1. Continent
   2. Whatever
   3. ...

   There is currently no ports collection in `/usr/ports`. Would you 
 like us to get it for you? (Y/n)

 I can't speak for others, but I'd be terribly annoyed by this.

 Also, the script isn't trivial. Feel free to give it a go, share and use it 
 for your own sake, but I'd be surprised to see it go in.

 /Alexander


 Thanks!

 O.D.

 On 24. september 2014 at 1:05 PM, Alexander Hall  wrote:On 
 September 24, 2014 12:44:14 PM CEST, openda...@hushmail.com wrote:
 Because /etc/pkg.conf ?

 Sorry, no such file over here.

 Indeed, the installer only creates that if you install from a mirror.
 Apart from that, as someone else pointed out, which mirror should 
 one choose?

 /Alexander


 O.D.

 On 23. september 2014 at 1:47 PM, Alexander Hall  wrote:On
 September
 23, 2014 3:00:41 PM CEST, openda...@hushmail.com wrote:
 Hi,

 Expanding on the whole
 http://en.wikipedia.org/wiki/Convention_over_configuration thing 
 -- why aren't there any sane PKG_PATH defaults? Ie.:

 release=$(uname -r)
 architecture=$(uname -p)

 export
 PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/${release}/packages/${a
 rchitecture}/

 Because /etc/pkg.conf ?

 /Alexander


 Thanks!

 O.D.



Re: Why are there no PKG_PATH defaults?

2014-09-24 Thread Dmitrij D. Czarkoff
openda...@hushmail.com said:
 Then, in the event that someone installed via an ISO or some
 pre-defined VM (ie. a DigitalOcean droplets) -- how about a one-time
 script upon first root login to ask for such info?

   You do not have a `PKG_PATH` set for `pkg_add`. Would you like us to
 set it for you?  (Y/n) y

  Choose your nearest mirror:

  1. Continent
  2. Whatever
  3. ...

FWIW the idea of presenting the list of mirrors suddenly starts to make
sense, as now there is no browser in base install. But

Alexander Hall said:
 I can't speak for others, but I'd be terribly annoyed by this.

I absolutely agree with this sentiment.

In my opinion, the best way to present list of mirrors would be to
provide a command for fetching it, either in pkg_add(1) or in root.mail
(the message root recieves upon completion of installation).  As I
prefer the latter way, patch to root.mail follows.

-- 
Dmitrij D. Czarkoff

Index: root.mail
===
RCS file: /var/cvs/src/etc/root/root.mail,v
retrieving revision 1.104
diff -u -p -r1.104 root.mail
--- root.mail   15 Jul 2014 22:05:29 -  1.104
+++ root.mail   24 Sep 2014 22:05:12 -
@@ -36,7 +36,9 @@ full list of packages for each architect
ftp://ftp.openbsd.org/pub/OpenBSD/5.6/packages/
 
 If you do not find a package you want on the CD, please go look at your
-nearest FTP mirror site.
+nearest FTP mirror site.  To get a list of available mirrors, execute:
+
+ ftp -o - http://ftp.openbsd.org/cgi-bin/ftplist.cgi
 
 Select your architecture and download the tarballs of your choice.  For example
 to install the emacs package for amd64, execute:



Why are there no PKG_PATH defaults?

2014-09-23 Thread opendaddy
Hi,

Expanding on the whole
http://en.wikipedia.org/wiki/Convention_over_configuration thing --
why aren't there any sane PKG_PATH defaults? Ie.:

release=$(uname -r)
architecture=$(uname -p)

export
PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/${release}/packages/${architecture}/

Thanks!

O.D.



Re: Why are there no PKG_PATH defaults?

2014-09-23 Thread Alexander Hall
On September 23, 2014 3:00:41 PM CEST, openda...@hushmail.com wrote:
Hi,

Expanding on the whole
http://en.wikipedia.org/wiki/Convention_over_configuration thing --
why aren't there any sane PKG_PATH defaults? Ie.:

release=$(uname -r)
architecture=$(uname -p)

export
PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/${release}/packages/${architecture}/

Because /etc/pkg.conf ?

/Alexander


Thanks!

O.D.



Re: Why are there no PKG_PATH defaults?

2014-09-23 Thread Harald Dunkel
On 09/23/14 15:48, Alexander Hall wrote:
 On September 23, 2014 3:00:41 PM CEST, openda...@hushmail.com wrote:
 Hi,

 Expanding on the whole
 http://en.wikipedia.org/wiki/Convention_over_configuration thing --
 why aren't there any sane PKG_PATH defaults? Ie.:

 release=$(uname -r)
 architecture=$(uname -p)

 export
 PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/${release}/packages/${architecture}/
 
 Because /etc/pkg.conf ?
 

This is something that could be added to /etc/examples. See the
attachment suggesting a first version.


Regards
Harri

# Set to yes if you really want to use the full width of the
# terminal for the progressmeter.
# fullwidth = yes

# pkg_add(1) and pkg_delete(1) will syslog(3) installations,
# updates and deletions by default.  Set to 0 to avoid logging
# entirely.  Levels higher than 1 may log more information in
# the future.
# loglevel = 0

# URL to package repository updated during installation.  Used
# for accessing packages if the environment variable PKG_PATH
# is not defined and no further options are defined.
# installpath = 

# Set to yes to waive checksums during package deletions.
# nochecksum = yes

# Set to yes to display (done/total) number of package
# messages.
# ntogo = yes



signature.asc
Description: OpenPGP digital signature