Re: if I were to make a pkg-add diff

2016-01-20 Thread Luke Small
>> So the program basically makes several network connections to >> potentially some 120 servers all across the world and the "winner" is >> calculated based on the "speed" it took downloading a 1.9K text file >> from each of them? > > Which isn't even a big enough transfer to get TCP out of slow

Re: if I were to make a pkg-add diff

2016-01-20 Thread Michael Lambert
> On 19 Jan 2016, at 03:57, Erling Westenvik wrote: > >> On Tue, Jan 19, 2016 at 01:26:15AM -0600, Luke Small wrote: >> then it changes all the parsed http and ftp mirrors into http and ftp >> downloads and changes them to non redundant http mirrors (it has to to >>

Re: if I were to make a pkg-add diff

2016-01-20 Thread Stuart Henderson
On 2016-01-20, Michael Lambert wrote: >> On 19 Jan 2016, at 03:57, Erling Westenvik > wrote: >> >>> On Tue, Jan 19, 2016 at 01:26:15AM -0600, Luke Small wrote: >>> then it changes all the parsed http and ftp mirrors into http and ftp >>> downloads

Re: if I were to make a pkg-add diff

2016-01-20 Thread Stuart Henderson
On 2016-01-20, Luke Small wrote: > with /etc/pkg.conf, you can > actually specify several mirrors: > > installpath = ... > installpath += ... > > I'm not sure if that downloads from multiple mirrors at a time or if there > is

Re: if I were to make a pkg-add diff

2016-01-19 Thread Erling Westenvik
On Tue, Jan 19, 2016 at 01:26:15AM -0600, Luke Small wrote: > I made a small 500 line program I call pkg_ping that calls uname -rm, > ftp, sed, on openbsd.org/ftp.html. A "program"? In what language? Is your code available somewhere? > then it changes all the parsed http and ftp mirrors into

Re: if I were to make a pkg-add diff

2016-01-19 Thread Eric Furman
FOR GOD'S SAKE STOP TALKING. Submit your code to tech@ and it will be considered on its merits. The OpenBSD team is very open to good code. If it's shite you will get no response. If it has potential you will get comments. But NOTHING will happen until they see CODE. On Tue, Jan 19, 2016, at

Re: if I were to make a pkg-add diff

2016-01-19 Thread Stuart Henderson
On 2016-01-19, Eric Furman wrote: > FOR GOD'S SAKE STOP TALKING. > Submit your code to tech@ and it will be considered on its merits. Code without listening to the feedback which has already been given based on the design isn't very useful either. Whether it's good code

Re: if I were to make a pkg-add diff

2016-01-19 Thread Luke Small
here you go! Enjoy! -Luke On Tue, Jan 19, 2016 at 2:57 AM, Erling Westenvik < erling.westen...@gmail.com> wrote: > On Tue, Jan 19, 2016 at 01:26:15AM -0600, Luke Small wrote: > > I made a small 500 line program I call pkg_ping that calls uname -rm, > > ftp, sed, on openbsd.org/ftp.html. > > A

Re: if I were to make a pkg-add diff

2016-01-19 Thread Christoph R. Murauer
> here you go! Enjoy! > > -Luke > > On Tue, Jan 19, 2016 at 2:57 AM, Erling Westenvik < > erling.westen...@gmail.com> wrote: [ ... ] > > [demime 1.01d removed an attachment of type text/x-csrc which had a > name of pkg_ping.c] Luke RTFM. http://www.openbsd.org/mail.html *The only mailing list

Re: if I were to make a pkg-add diff

2016-01-19 Thread Luke Small
Go to: *I have a mirror testing program for you.* in the tech mailing list. It copied there. -Luke On Tue, Jan 19, 2016 at 11:18 PM, Luke Small wrote: > here you go! Enjoy! > > -Luke > > On Tue, Jan 19, 2016 at 2:57 AM, Erling Westenvik < >

Re: if I were to make a pkg-add diff

2016-01-19 Thread Luke Small
wrote: > On Tue, Jan 19, 2016 at 01:26:15AM -0600, Luke Small wrote: > > I made a small 500 line program I call pkg_ping that calls uname -rm, > > ftp, sed, on openbsd.org/ftp.html. > > A "program"? In what language? Is your code available somewhere? > > > then it changes all the parsed http and

Re: if I were to make a pkg-add diff

2016-01-18 Thread Luke Small
I made a small 500 line program I call pkg_ping that calls uname -rm, ftp, sed, on openbsd.org/ftp.html. then it changes all the parsed http and ftp mirrors into http and ftp downloads and changes them to non redundant http mirrors (it has to to easily call ftp on it). It takes them and downloads

Re: if I were to make a pkg-add diff

2016-01-04 Thread Kamil CholewiƄski
On Mon, 04 Jan 2016, Janne Johansson wrote: > What you meant was thousands of users sending handful of pings across > the world to a lot of the mirrors each time they (re)restart pkg_add? http://packages.debian.org/unstable/net/netselect-apt http://http.debian.net/

Re: if I were to make a pkg-add diff

2016-01-04 Thread Luke Small
I am realistically thinking more along the lines of less than once a release cycle. More like whenever it comes upon a user that their mirror of choice chooses to no longer be a mirror. I had that happen to me. It would be convenient to have a program that can easily compare mirror latencies and

Re: if I were to make a pkg-add diff

2016-01-04 Thread Luke Small
Miniroot isn't available after install is it? I suspect mirrors choose to change mid-cycle too and should a user have to put in the install disk to find a more convenient mirror selection method? I want to be able to offer statistics about the mirrors maybe piped to 'more', so the user can choose

Re: if I were to make a pkg-add diff

2016-01-04 Thread Peter Hessler
All of the functionality you are requesting is already provided. look at finish_up() in src/distrib/miniroot/install.sub. There is no reason at all to modify pkg_add. Just setup /etc/pkg.conf. On 2016 Jan 04 (Mon) at 04:02:07 -0600 (-0600), Luke Small wrote: :I am realistically thinking more

Re: if I were to make a pkg-add diff

2016-01-04 Thread Stuart Henderson
On 2016-01-04, Luke Small wrote: > What I meant is, if a program sends a handful of pings to each mirror, > would it think it is being spammed and shutdown any further connections. I > didn't mean to say that I want to connect the pkg_ping program to a of > anchor. I

Re: if I were to make a pkg-add diff

2016-01-04 Thread Janne Johansson
2016-01-04 4:22 GMT+01:00 Luke Small : > What I meant is, if a program sends a handful of pings to each mirror, > would it think it is being spammed and shutdown any further connections. > > What you meant was thousands of users sending handful of pings across the world

Re: if I were to make a pkg-add diff

2016-01-03 Thread Mihai Popescu
I'll say we should go for the spaceship project ... with lasers.

Re: if I were to make a pkg-add diff

2016-01-03 Thread Theo de Raadt
>I'll say we should go for the spaceship project ... with lasers. Index: pkg_add.1 === RCS file: /cvs/src/usr.sbin/pkg_add/pkg_add.1,v retrieving revision 1.134 diff -u -p -u -r1.134 pkg_add.1 --- pkg_add.1 4 Nov 2015 16:59:58

Re: if I were to make a pkg-add diff

2016-01-03 Thread Luke Small
I just got consistent internet for my laptop and got the ftp and sed call pipes and stuff to work. What I want to know is if I make multiple fork() to execl() ping calls, should I limit the number of a standard argument-free call to my pkg_ping to 8 or so threads which pings each of the mirrors 9

Re: if I were to make a pkg-add diff

2016-01-03 Thread Luke Small
What I meant is, if a program sends a handful of pings to each mirror, would it think it is being spammed and shutdown any further connections. I didn't mean to say that I want to connect the pkg_ping program to a of anchor. I tried an initial localhost pinging, pkg_ping program in virtualbox

Re: if I were to make a pkg-add diff

2015-12-27 Thread Stuart Henderson
On 2015-12-27, Raf Czlonka wrote: > On Sun, Dec 27, 2015 at 01:58:53AM GMT, Luke Small wrote: > >> Come to think about it, it might to be good to do tiny standalone >> program called pkg_ping and then I could make it in C like I'd prefer. >> I'd hope to make a port maybe, but

Re: if I were to make a pkg-add diff

2015-12-27 Thread Raf Czlonka
On Sun, Dec 27, 2015 at 01:40:04AM GMT, Luke Small wrote: > pkg_add initialization and mirror selection can be automated ... As already mentioned here, this part is already done during installation. One can either accept the suggested mirror or choose one manually from the list, your choice is

Re: if I were to make a pkg-add diff

2015-12-27 Thread Raf Czlonka
On Sun, Dec 27, 2015 at 01:58:53AM GMT, Luke Small wrote: > Come to think about it, it might to be good to do tiny standalone > program called pkg_ping and then I could make it in C like I'd prefer. > I'd hope to make a port maybe, but then it would functionally defeat > the intent. I think

Re: if I were to make a pkg-add diff

2015-12-27 Thread Christoph R. Murauer
> Come to think about it, it might to be good to do tiny standalone > program called pkg_ping and then I could make it in C like I'd prefer. > I'd hope to make a port maybe, but then it would functionally defeat > the intent. I find it not usefull to continue this kind of conversation because you

Re: if I were to make a pkg-add diff

2015-12-27 Thread Luke Small
I guess I didn't really answer your question. It wouldn't rely upon the ramdisk. It is meant to run after install. So it would presumably have all the firmware. I was thinking about running it similarly to the install output though. I setup a local mirror once and it crapped out after a while and

Re: if I were to make a pkg-add diff

2015-12-27 Thread Luke Small
You could do that if you want to have noobs connect to one of the mirrors into perpituty that brings down the server like a ddos every release! > I think the best that can be done relatively easily would be to have >pkg_add fetch ftplist.cgi and pick the first result as a default if neither

Re: if I were to make a pkg-add diff

2015-12-27 Thread Raf Czlonka
On Sun, Dec 27, 2015 at 12:05:43PM GMT, Stuart Henderson wrote: > This would work for releases, though unless pkg_add was changed to > cache the redirect it would slow things down compared to fetching > directly from the mirror. > > For snapshots, caching the redirect would be essential,

Re: if I were to make a pkg-add diff

2015-12-27 Thread Alexander Hall
On Sun, Dec 27, 2015 at 02:52:16PM -0600, Luke Small wrote: > You could do that if you want to have noobs connect to one of the mirrors > into perpituty that brings down the server like a ddos every release! Are you aware of the magic that ftplist.cgi does? Stuart is. /Alexander > > I think

Re: if I were to make a pkg-add diff

2015-12-27 Thread Christoph R. Murauer
> I guess I didn't really answer your question. It wouldn't rely upon > the ramdisk. It is meant to run after install. So it would presumably > have all the firmware. Then I think, you have to be more clear. Because it is not to modify the installer and also not, to modify pkg_add - as you wrote

Re: if I were to make a pkg-add diff

2015-12-27 Thread Luke Small
Even though I don't have an internet connection for my laptop I started the C program that pipes an execl call from ftp, to sed, (like the suggestions offered earlier in the thread, and back to the parent and it will use kqueue to test the pipe buffer capacities to a local buffer (I love

Re: if I were to make a pkg-add diff

2015-12-26 Thread Christoph R. Murauer
Quote from dan mclaughlin : [ ... ] > (i am really starting to feel for the devs. this gets wearying.) [ ... ] > whenever i want something to work the way i want, i just script around > it. > the beauty of unix. Explains it very good. I personally think, OpenBSD is simple not for Luke. What Luke

Re: if I were to make a pkg-add diff

2015-12-26 Thread Stuart Henderson
On 2015-12-26, dan mclaughlin wrote: > ftp -o - http://www.openbsd.org/ftp.html | more > > will display the html source of the page, which is pretty easy to read even > unrendered. No need to parse the html, ftp -o - http://www.openbsd.org/build/mirrors.dat | grep -e ^U

Re: if I were to make a pkg-add diff

2015-12-26 Thread Luke Small
Come to think about it, it might to be good to do tiny standalone program called pkg_ping and then I could make it in C like I'd prefer. I'd hope to make a port maybe, but then it would functionally defeat the intent. On 12/26/15, Luke Small wrote: > I just figure that

Re: if I were to make a pkg-add diff

2015-12-26 Thread Luke Small
I just figure that adding a little complexity that doesn't adversely affect security, to ease initial entry into the system for new users could be good. pkg_add initialization and mirror selection can be automated in a way to not discourage someone from picking up a fresh install and running with

Re: if I were to make a pkg-add diff

2015-12-25 Thread Peter Hessler
On 2015 Dec 24 (Thu) at 20:23:38 -0600 (-0600), Luke Small wrote: :I wanna make a c program that checks for a PKG_PATH that exists and :connects to a workable link for pkg_add(). If you ever upgraded using :http mirrors on the install disk, it offers list# which links directly :to numbered

Re: if I were to make a pkg-add diff

2015-12-25 Thread dan mclaughlin
On Fri, 25 Dec 2015 16:09:27 -0600 Luke Small wrote: > I suppose folks could opt for the more stable yet higher latency > official mirrors even if they aren't local to canada and they would > never be surprised. It may not be too much trouble for me to implement > a mere

Re: if I were to make a pkg-add diff

2015-12-25 Thread Mihai Popescu
> if I were to make a pkg-add diff Mr. Skywalker, make that damn modification for yourself if you really think it helps you. If you want you can send a diff, too, but please go away with these idiotic talks about what you can do but you will not. I guarantee you that nobody will be upset when

Re: if I were to make a pkg-add diff

2015-12-25 Thread Christoph R. Murauer
Luke, ... Are you sure that you're not in politics ? > I suppose folks could opt for the more stable yet higher latency > official mirrors even if they aren't local to canada and they would > never be surprised. It may not be too much trouble for me to implement > a mere stdout statement in the

Re: if I were to make a pkg-add diff

2015-12-25 Thread Luke Small
I suspect that if you did, it wouldn't check whether there was an astronaut ready to control the on-board computer and would sit there continuously trying to rev the rocket engines with no jet fuel. That is the way pkg-add acts right now. I felt pretty ridiculous wondering why pkg-add wasn't

Re: if I were to make a pkg-add diff

2015-12-25 Thread Luke Small
I suppose folks could opt for the more stable yet higher latency official mirrors even if they aren't local to canada and they would never be surprised. It may not be too much trouble for me to implement a mere stdout statement in the perl pkg-add to advise the user to update PKG-PATH to randomly

Re: if I were to make a pkg-add diff

2015-12-24 Thread Luke Small
I wanna make a c program that checks for a PKG_PATH that exists and connects to a workable link for pkg_add(). If you ever upgraded using http mirrors on the install disk, it offers list# which links directly to numbered mirrors. It would likely ease the initial startup for whomever uses it while

Re: if I were to make a pkg-add diff

2015-12-24 Thread Ingo Schwarze
Hi, pkg_add(1) is about the hardest program in base to get patches into, even for experienced developers who know what they are doing, even if the patches are of reasonable quality and well thought out. Almost all of my own attempts at improving it led to nowhere, with very few exceptions for

Re: if I were to make a pkg-add diff

2015-12-24 Thread Theo de Raadt
>I wanna make a c program that checks for a PKG_PATH that exists and >connects to a workable link for pkg_add(). and I wanna build a rocket ship...

Re: if I were to make a pkg-add diff

2015-12-24 Thread Ted Unangst
Luke Small wrote: > Assuming i could do it: If I were to make a sloppy perl-based pkg-add > program that used c and the installer code to (re)set the PKG-PATH > environment variable using the "http" settings that are available for > installing the modules from mirrors, if I made changes to it to >