The wget script experiment didn't work.
macintoshzoom wrote:
> I forgot CC to the mailist, sorry to all!
> I have just added the "reply all" button to the toolbar of my thunderbird.
>
> As per your advise, here is what I am going to do, at least for this
> week and to be able to update my new -current system.
> I have already rebuilt the kernel, running OK, I have set up already
> some tweakings as per the page current.html, and now I have to update
> all my installed packages and ports.
>
> Later I will try to build xenocara and setup my radeonhd ATI videocard,
> as it seem that this new xenocara supports it...
>
>
> Well my fetch-via-wget.sh brand new script is ready as per your tip:
> -----
> #!/bin/sh
> dsocks-torify.sh wget -O - $3
> -----
>
> Placed in my Local_scripts folder.
> Given executable permission for root only
>
> Now what?:
>
> edit /root/.profile and add
> FETCH_CMD="path-to-the-script"
> (for my next reboot-or how to relod this .profile without rebooting?)
>
> As I am not yet sure what .profile is the one that works, I am currently
> creating the same .profile file in /, in /root and in /home/username,
> just in case.(?)
>
> open my konsole (ksh)
>
> $su
> blabla
> #export FETCH_CMD="path-to-the-script"
> (or reboot to load the new .profile)(?)
> #pkg_add -F alwaysupdate,update,updatedepends -u -v -i
> ..
>
> and now wait and see what happens and if it can get the ftp distfiles,
> that it's my problem.
> (ftp honors OKAY my HTTP_PROXY environment for http fetchs and goes okay
> throught the privoxy+tor socks4a/5 exit proxy server to the world, the
> problem is how to socksify ftp for ftp files)
>
> I will tell you later or tomorrow.
>
> Thanks Nick!
>
> Mac
>
>
>
> Nick Guenther wrote:
>>> Nick Guenther wrote:
>>>> On Wed, Jul 30, 2008 at 12:17 PM, macintoshzoom
>>>> <[EMAIL PROTECTED]> wrote:
>>>>> I need an alternative to the default system fetch ftp used by pkg_add,
>>>>> that could be socksified via dsocks,
>>>>> e.g. FETCH_CMD="dsocks-torify.sh newsocksifiableftp"
>>>>>
>>>>> Okay only passive ftp.
>>>>>
>>>>> BUT, as pkg_add man says, this alternative must:
>>>>> <<<<<<<
>>>>> man pkg_add :
>>>>> FETCH_CMD Override use of ftp(1). Must point to a command that
>>>>> understands ${FETCH_CMD} -o - url.
>>>>> I like wget, BUT it don't understands the command -o as ftp, it uses -O
>>>>> instead I think, so wget can't be used as a straight replacement to ftp
>>>>> for pkg_add ... ? (unless tweaking the perl pkg_add code?)
>>>>>
>>>>> I want to run pkg_add -u routed via my (only) exit socks 4a/5 proxy
>>>>> server (tor).
>>>>> (dsocks-torify.sh ftp don't work)
>>>>>
>>>> What if you wrote a script that looked for -o that then called wget
>>>> with -O and used that for FETCH_CMD?
>>>>
>>>> -Nick
>>>>
>> On Wed, Jul 30, 2008 at 1:23 PM, macintoshzoom
>> <[EMAIL PROTECTED]> wrote:
>>> Yes, I like that, but I don't know (yet) how to write this script.
>>> My script knowledge ends by now to just simple basic things like:
>>> ------
>>> #! /bin/sh
>>> kdesu 'pfctl -Fa -f /etc/pf.conf-443+80' && display
>>> /home/xx/pf.conf-reloaded-to-pf.conf-443+80-OKAY.png &
>>> --------
>>> (I am building an OpenBSD-KDE Desktop)
>>>
>>> I think pkg_add calls ftp with the "-o" command via many different
>>> (perl?) scripts.
>>> Doing a context text file search for "-o", or "fetch", or "FETCH_CMD",
>>> in / can give a clue of where to tweak.
>>>
>>> I think pkg_add -u uses also sysmerge:
>>> The /usr/sbin/sysmerge script mentions the FETCH_CMD= and has a
>>> "FETCH_CMD="/usr/bin/ftp -V -m -k" at line 39.
>>> .. perhaps tweaking all those scripts (which ones?) for wget use
>>> instead of ftp...
>>>
>>>
>>> A script to enable the use of wget for FETCH_CMD= for me should be
>>> excellent.
>>>
>>> Any link where I can learn how to do this kind of scripts?
>>> Or any very similar script to tweak?
>>>
>>> Thanks.
>>> Mac.
>>
>> No... don't tweak pkg_add (at least, not without thinking it through
>> and making it worthy of a patch). Maintaining your own little branch
>> of pkg_add is bad. Use the hook they gave you.
>>
>> Perhaps google for a shell programming tutorial a bit? Shell
>> programming sucks, but it's useful to have in your back pocket. You'll
>> want to use getopt(1)
>> (http://www.openbsd.org/cgi-bin/man.cgi?query=getopt&sektion=1).
>> Alternatively, if you want to hack it (since you know exactly what the
>> command line is going to look like) just do:
>> -----
>> #!/bin/sh
>> wget -O - $3
>> -----
>> Doing it this way will break things down the road, but it'll work for
>> this week and if you just want to get your system up that's probably
>> better for you.
>> (note: $3 means the fourth argument token in the command line, but I'm
>> not 100% that will work so please test it yourself).
>>
>>
>> -Nick
>> [by the way, not to nitpick at you personally, but if you could
>> remember to CC the mailing list (unless the discussion has clearly
>> been taken Offline) then everyone else can benefit from the knowledge
>> that we share :)]
>>
>
> _______________________________________________
> Openbsd-newbies mailing list
> [email protected]
> http://mailman.theapt.org/listinfo/openbsd-newbies
>
_______________________________________________
Openbsd-newbies mailing list
[email protected]
http://mailman.theapt.org/listinfo/openbsd-newbies