GeoIP free databases and Geo::IP

2019-03-20 Thread francis picabia
The packages geoip-database in Debian relies
on static databases which are no longer being updated.

https://support.maxmind.com/geolite-legacy-discontinuation-notice/

All I need from this is a quick way on the shell to look up
a country from an IP.

On Debian I could do that with geoiplookup
or use a small perl script using Geo::IP

These tools still work, but the accuracy is drifting off over time.

I could make my own script solution around calls to https://freegeoip.app
but I can't be the only one looking into this issue.  Surely someone has
figured out something to do this well that gets that good ol' 1000 eyeballs
treatment.

Has anyone encountered something like Geo::IP which will work against
the other free resources?  Or has anyone encountered a solution
which will work against the new GeoIP databases available by subscription
from Maxmind, the previous supplier of the free GeoLite DB?

Something like this done in a script would work:

wget -qO - https://freegeoip.app/csv/$IP | awk -F, '{print $3}'

It is limited to 10,000 lookups per hour and it is much slower than
working against a local DB file.

Is there something better?


Re: youtube video downloader for chrome

2019-03-20 Thread Pierre Frenkiel

On Tue, 19 Mar 2019, riveravaldez wrote:


Maybe worth mentioning: youtube-dl, exceptionally useful and simple CLI tool.


  useful and simple... but it works only for urls with alphanumeric characters
  I tried with an url containing ? and &, and I got nothing
  I tried also by escaping ? and & with \, and it was not better.
  I'll send you an example later, if you are not convinced...

best regards,
--
Pierre Frenkiel



djbwares version 9

2019-03-20 Thread Jonathan de Boyne Pollard

The djbwares package is now up to version 9 .

 *

   http://jdebp.eu./Softwares/djbwares/

 *

   http://jdebp.info./Softwares/djbwares/

This version sees changes to the doco and to the DNS and HTTP servers.


FreeBSD binaries


I plan for this to be the last release with binaries built on FreeBSD 
10.  I am going to upgrade the build machine.



Doco


All of the manuals are now DocBook XML, and the hodgepodge admixture of 
manuals from three sources is gone.  A stylesheet is supplied for 
reading the manuals directly using a GUI WWW browser.  They can also be 
read using the |console-docbook-xml-viewer| tool from version 1.40 of 
the nosh toolset.


The long-missing |tcp-environ| manual is now present.


HTTP servers


Hand in hand with the documentation improvement, |httpd| now has content 
types for the |.xml| and |.xhtml| filename extensions.



DNS servers
===

 *

   http://jdebp.eu./Softwares/djbwares/qmail-patches.html#any-to-cname

 *

   http://jdebp.info./Softwares/djbwares/qmail-patches.html#any-to-cname

The |ANY| query type in the DNS has never meant ALL, and has never 
really been useful.  Pretty much only one software even made use of 
|ANY| for non-testing purposes.  That was qmail, which I patched not to 
do so back in 2003.


Although the diagnostic tools still support sending |ANY| queries, with 
one exception, in this release all of the DNS server softwares now 
synthesize non-responses, containing an invariant |HINFO| resource 
record set, to |ANY| queries.  The specialized content DNS servers 
simply return such responses straightforwardly, as they do not have to 
worry about |CNAME| chains, which they do not ever construct.  The other 
DNS servers have to handle |CNAME| chains.


The general-purpose |tinydns| and |axfrdns| content DNS servers will 
continue to process |CNAME| chains as before, but will return a 
synthesized |HINFO| resource record set at the end of the chain. 
|dnscache| also processes |CNAME| chains as before, again returning the 
chain with a synthesized |HINFO| resource record set at the end.  It no 
longer allows |ANY| queries as a loophole for retrieving cache contents, 
and will not issue |ANY| queries from its back end.


The diagnostic tool that is the exception is |tinydns-get|, whose 
operation is supposed to exactly replicate what |tinydns| does.  It, 
too, now synthesizes non-responses when an |ANY| lookup is requested.




Re: youtube video downloader for chrome

2019-03-20 Thread Brad Rogers
On Wed, 20 Mar 2019 10:34:42 +0100 (CET)
Pierre Frenkiel  wrote:

Hello Pierre,

> I tried also by escaping ? and & with \, and it was not better.

I wouldn't expect it to be.  It's more usual to replace each such
character with its HEX counterpart, thus;

  ? converts to %3F
  & converts to %26

-- 
 Regards  _
 / )   "The blindingly obvious is
/ _)radnever immediately apparent"
They said we'd be artistically free, but that was on a bit of paper
Complete Control - The Clash


pgpQ5C8YmKgaV.pgp
Description: OpenPGP digital signature


nosh version 1.40

2019-03-20 Thread Jonathan de Boyne Pollard

The nosh package is now up to version 1.40 .

 *

   http://jdebp.eu./Softwares/nosh/

 *

   http://jdebp.info./Softwares/nosh/

 *

   https://github.com/freebsd/freebsd-quarterly/blob/master/2018q4/nosh.md

This version sees changes to the doco, improvements to network 
configuration, and a change to machine ID generation.



FreeBSD binaries



I plan for this to be the last release with binaries built on FreeBSD 
10.  I am going to upgrade the build machine.



|ifconfig|



 *

   https://unix.stackexchange.com/a/504084/5132

There is now an |ifconfig| command in the toolset, with a command-line 
interface and output similar to the FreeBSD |ifconfig|. It is primarily 
intended for use on non-FreeBSD systems, to provide a FreeBSD-like 
|ifconfig| where one does not have the actual FreeBSD tool.  The 
|ifconfig@*| services generated by the external configuration import 
subsystem make use of it on Linux operating systems, allowing the 
services themselves to be pretty much the same across platforms.


It handles multiple (unlabelled) addresses per interface and both IP 
version 6 and IP version 4 addressing, which are two of the 
long-standing complaints against the old |ifconfig| programs from GNU 
inetutils  and NET-3 net-tools 
.  It has no notion of 
overwriting a single "primary" address.  It has a |broadcast1| flag for 
calculating the broadcast address from the prefix length and address.  
It prefers the new (since 1993) notation for IP version 4 network 
masks.  It can do the FreeBSD style of EUI-64 address assignment for IP 
version 6 with an |eui64| flag.


And it colours its output if writing to a terminal.  (-:


Machine ID generation

=

FreeBSD from 2007 onwards used the SMBIOS system UUID from the machine 
firmware as a fallback source for a machine ID. |setup-machine-id| prior 
to this release of the toolset would do the same for compatibility.  
This has now been removed from |setup-machine-id|. The privacy problems 
that it entails have turned out to outweigh what little utility it had.


Systems that would have fallen back upon the SMBIOS system UUID will now 
fall back to creating UUIDs using the C library.  Note that the FreeBSD 
C library still uses MAC addresses to create UUIDs.  The OpenBSD and GNU 
C libraries use CSPRNGs.


There is also now an |erase-machine-id| command that resets all of the 
machine ID storage locations set by |setup-machine-id| to a nil UUID.  
The |machine-id| service now calls |erase-machine-id| at shutdown.


Thus: Machine IDs (when using the supplied service bundles) now have a 
lifetime from bootstrap to shutdown, will not persist across reboots, do 
not reveal the SMBIOS system UUID and are not constant and correlatable 
because of it even when explicitly wiped, and can still reveal MAC 
addresses on FreeBSD.


The new |machine-id|(7) manual page lists some of the known users of 
machine IDs, explains where machine IDs are stored, and gives some of 
the history of machine IDs.



Square mode

===

Square mode is now switchable in |console-terminal-emulator|, using DEC 
Private Mode 1369. |console-control-sequence| has a |--square| option 
for changing it.



Other tools

===

|ucspi-socket-rules-check| has gained the ability to check |uid/self/| 
and |gid/self/| subdirectories when handling UCSPI-UNIX connections.



Doco



The Guide now includes the original command manuals, written in DocBook 
XML.  These are directly readable using a GUI WWW browser and the 
supplied stylesheet.  The conversions to HTML are still supplied, but 
reading the original DocBook XML format is better.


TUI WWW browsers such as lynx cannot read DocBook XML.  Their deficiency 
has inspired a new |console-docbook-xml-viewer| tool that parses and 
displays the manual pages with a simple full-screen interface on a 
terminal.  This can of course display other DocBook XML manual pages as 
well.



External configuration import improvements

==

The external configuration import subsystem now allows various 
extensions in a |/etc/network/interfaces| file, including |ipv4ll| 
stanzas (which will cause |avahi-autoipd| services to be set up) and 
|eui64| stanzas.  A "|broadcast +|" setting is now transformed into the 
aforementioned |broadcast1| flag for |ifconfig|.


It also now once more treats |false| for the login shell as signifying a 
non-personal user account.



More service bundles



There are a few more service bundles in this release, including ones for 
Laurent Bercot's mdev, for two-ftp, and for NcFTPd.




loop module

2019-03-20 Thread Michael Grant
I’m seeing this error in my syslog on reboot:

/var/log/syslog:Mar 20 11:12:10 top kernel: [1.540080] loop: module loaded
/var/log/syslog:Mar 20 11:12:10 top systemd-modules-load[381]: Failed to lookup 
module alias 'loop': Function not implemented


In /etc/modules I have:

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

loop

lsmod reports an empty list:

# lsmod
Module  Size  Used by


Any ideas what (if anything) I should do about this 'Function not implemented' 
error?




signature.asc
Description: PGP signature


Re: youtube video downloader for chrome

2019-03-20 Thread Greg Wooledge
On Wed, Mar 20, 2019 at 10:34:42AM +0100, Pierre Frenkiel wrote:
> On Tue, 19 Mar 2019, riveravaldez wrote:
> 
> > Maybe worth mentioning: youtube-dl, exceptionally useful and simple CLI 
> > tool.
> 
>   useful and simple... but it works only for urls with alphanumeric characters
>   I tried with an url containing ? and &, and I got nothing

You probably forgot to quote the URL in your shell command.  If you don't
quote it, the & is special to the shell and will cause the command to
be split at that point, with the first half being run as a background
command, and the second half being run as a foreground command.

>   I tried also by escaping ? and & with \, and it was not better.
>   I'll send you an example later, if you are not convinced...

That should work.  An example of the failure would be helpful.

Generally speaking, though, just wrap the whole URL in single quotes
and you should be fine.



Mederos

2019-03-20 Thread Eddy Mederos
Hi, I want to know how I get an ISO image of Debian-Med.
Thank you
EMederos


Re: Mederos

2019-03-20 Thread Dan Ritter
Eddy Mederos wrote: 
> Hi, I want to know how I get an ISO image of Debian-Med.

At this time, you can't. Install debian, and then you can get
the debian-med packages as you need them.

https://wiki.debian.org/DebianMed/HowToGet

-dsr-



Re: why key repeating fails?

2019-03-20 Thread David Wright
On Wed 20 Mar 2019 at 06:30:28 (+), Long Wind wrote:
> holding down a key is equal to repeatedly pressing a keythis usually work in 
> stretch at firstbut after some time, it mysteriously fails
> it can't be solved by logging out and logging again
> 
> how to troubleshoot it?? Thanks!
For consoles:

setterm --repeat on/off can change whether the keys repeat or not,
and that can differ for each console. It lasts on that console
until you fully logoff from it.

But perhaps something is messing with kbdrate. Logging out and
back in won't affect that unless you set the repetition rate in
your startup files.¹ The values attach to the keyboard, not to
each individual console, whether it's logged in or not.
To find out the current values, you have to set new ones, whereupon
it prints the previous values too. Try that and see if repetition
comes back to life.

X is different:

Try   xset r on   to see if that fixes it. If not, try
xset r rate 200 5   and see if that produces a very slow repeat.
If so, use values to your taste. The values are global to the
server instance AIUI.

¹ I think I recall Cindy talking about keys double-striking when
entering the password. I tested adding a line to root's crontab:
 @reboot /sbin/kbdrate -r 5 -d 500 -s
and found that you can see the slower rate kick in if you hold down
a key at the first login: prompt. (This cures the double-striking.)

Cheers,
David.



change up real directory from soft link

2019-03-20 Thread mick crane

hello,
If I doing something buried a couple of directories down from home I 
make a soft link to that directory in ~/ just for convenience.
If I cd softlink then want to go up a directory from the real directory 
I'm put back to ~/


Is it possible to get the behavior going up a directory from softlink 
actually goes up a directory the softlink refers to ?


maybe hard links  ? but I've been loathe to experiment with those as it 
makes me nervous I'll delete the original directory



mick

--
Key ID4BFEBB31



Re: change up real directory from soft link

2019-03-20 Thread Greg Wooledge
On Wed, Mar 20, 2019 at 03:08:51PM +, mick crane wrote:
> If I cd softlink then want to go up a directory from the real directory I'm
> put back to ~/
> 
> Is it possible to get the behavior going up a directory from softlink
> actually goes up a directory the softlink refers to ?

wooledg:~$ ln -s /usr/local/bin binlink
wooledg:~$ cd binlink
wooledg:~/binlink$ cd ..
wooledg:~$ cd binlink
wooledg:~/binlink$ cd -P ..
wooledg:/usr/local$ 



Re: change up real directory from soft link

2019-03-20 Thread mick crane

On 2019-03-20 15:12, Greg Wooledge wrote:

On Wed, Mar 20, 2019 at 03:08:51PM +, mick crane wrote:
If I cd softlink then want to go up a directory from the real 
directory I'm

put back to ~/

Is it possible to get the behavior going up a directory from softlink
actually goes up a directory the softlink refers to ?


wooledg:~$ ln -s /usr/local/bin binlink
wooledg:~$ cd binlink
wooledg:~/binlink$ cd ..
wooledg:~$ cd binlink
wooledg:~/binlink$ cd -P ..
wooledg:/usr/local$



thank you.

mick
--
Key ID4BFEBB31



Re: Disable left-ctrl?

2019-03-20 Thread Selim T . Erdoğan
On Mon, Jan 28, 2019 at 06:16:32PM -0500, Boyan Penkov wrote:
> 
> I am now writing my thesis, and have the genesis of some pretty 
> significant EMACs pinky.  (I use my left pinky for the left ctrl most 
> of the time, which is setting me up for failure.).
> 
> To this end, I’d like to disable the left ctrl key only, and force 
> my brain to use the right one.  Better yet, I’d like the screen to 
> flash or something then I inadvertently hit left-ctrl.
> 
> Any thoughts?

Have you tried making the Caps Lock key function as a Ctrl key?
It makes things much easier on pinkies.



Re: youtube video downloader for chrome

2019-03-20 Thread David Wright
On Wed 20 Mar 2019 at 08:08:56 (-0400), Greg Wooledge wrote:
> On Wed, Mar 20, 2019 at 10:34:42AM +0100, Pierre Frenkiel wrote:
> > On Tue, 19 Mar 2019, riveravaldez wrote:
> > 
> > > Maybe worth mentioning: youtube-dl, exceptionally useful and simple CLI 
> > > tool.
> > 
> >   useful and simple... but it works only for urls with alphanumeric 
> > characters
> >   I tried with an url containing ? and &, and I got nothing
> 
> You probably forgot to quote the URL in your shell command.  If you don't
> quote it, the & is special to the shell and will cause the command to
> be split at that point, with the first half being run as a background
> command, and the second half being run as a foreground command.
> 
> >   I tried also by escaping ? and & with \, and it was not better.
> >   I'll send you an example later, if you are not convinced...
> 
> That should work.  An example of the failure would be helpful.
> 
> Generally speaking, though, just wrap the whole URL in single quotes
> and you should be fine.

This is a trick I find very useful too: RightClick on a google hit,
type a, then paste the address into this function on an xterm:

function gy-in-quotes {
[ -z "$1" ] && printf '%s\n' "Usage:$FUNCNAME 'URL' (must be in 
single quotes!)
strips the google prefix (up to url=) and suffix (from &usg=) from the 
argument,
translates various common %nn sequences in the URL, and retrieves it." 
>&2 && return 1
youtube-dl $(sed -e 
's/http.*url=//;s/&usg=.*$//;s/%2F/\//g;s/%3A/:/g;s/%3D/=/g;s/%3F/?/g;s/%25/%/g'
 <<<"$1") # % characters must be edited last
}

The same idea works of course for wget:

function wg-in-quotes {
[ -z "$1" ] && printf '%s\n' "Usage:$FUNCNAME 'URL' (must be in 
single quotes!)
strips the google prefix (up to url=) and suffix (from &usg=) from the 
argument,
translates various common %nn sequences in the URL, and retrieves it." 
>&2 && return 1
wget $(sed -e 
's/http.*url=//;s/&usg=.*$//;s/%2F/\//g;s/%3A/:/g;s/%3D/=/g;s/%3F/?/g;s/%25/%/g'
 <<<"$1") # % characters must be edited last
}

Of course, I only type gy- or wg-, but the function name
reminds me to add the quotes, else all hell breaks loose.

Actually I don't call youtube-dl as above, because I have two helper
functions which do things like history logging to prevent me
accidentally downloading the same video twice.

Cheers,
David.



Re: youtube video downloader for chrome

2019-03-20 Thread Pierre Frenkiel

On Wed, 20 Mar 2019, Greg Wooledge wrote:


On Wed, Mar 20, 2019 at 10:34:42AM +0100, Pierre Frenkiel wrote:

On Tue, 19 Mar 2019, riveravaldez wrote:


Maybe worth mentioning: youtube-dl, exceptionally useful and simple CLI tool.


  useful and simple... but it works only for urls with alphanumeric characters
  I tried with an url containing ? and &, and I got nothing


You probably forgot to quote the URL in your shell command.  If you don't
quote it, the & is special to the shell and will cause the command to
be split at that point, with the first half being run as a background
command, and the second half being run as a foreground command.


  I tried also by escaping ? and & with \, and it was not better.
  I'll send you an example later, if you are not convinced...


That should work.  An example of the failure would be helpful.

Generally speaking, though, just wrap the whole URL in single quotes
and you should be fine.


 Greg,
 I don't really understand your mail:
 in the 1st part, you tell me to quote the URL
 in the 2nd one, you seem aware that I actually did that
 BTW, escaping with \ or quoting the whole URL with '
 gives the same thing
 I'll send later the history of all my tries.



Re: youtube video downloader for chrome

2019-03-20 Thread rhkramer
On Wednesday, March 20, 2019 02:10:57 PM David Wright wrote:
> Actually I don't call youtube-dl as above, because I have two helper
> functions which do things like history logging to prevent me
> accidentally downloading the same video twice.

Are you willing to share?



Re: Disable left-ctrl?

2019-03-20 Thread Anders Andersson
On Wed, Mar 20, 2019 at 4:42 PM Selim T. Erdoğan
 wrote:
> On Mon, Jan 28, 2019 at 06:16:32PM -0500, Boyan Penkov wrote:
> > I am now writing my thesis, and have the genesis of some pretty
> > significant EMACs pinky.  (I use my left pinky for the left ctrl most
> > of the time, which is setting me up for failure.).
> >
> > To this end, I’d like to disable the left ctrl key only, and force
> > my brain to use the right one.  Better yet, I’d like the screen to
> > flash or something then I inadvertently hit left-ctrl.
>
> Have you tried making the Caps Lock key function as a Ctrl key?
> It makes things much easier on pinkies.

This is the only valid answer and is often easy to do in Linux (Gnome
Tweaks has a simple checkbox for this). I have to do it on every
computer I use with a PC keyboard. On a *real* computer, the control
key is placed in a sensible location, see for example
http://xahlee.info/kbd/i/kb/sun_keyboard_left.jpg or
https://upload.wikimedia.org/wikipedia/commons/f/fc/Amiga_1200_Nahaufnahme.jpg

I would like to have a long talk in a locked room with the person who
thought that HEY IM AN IMPORTANT MANAGER AND I ALWAYS TYPE IN CAPS SO
LETS PUT CAPS LOCK IN THE MOST PROMINENT POSITION.



smbclient not finding share for localhost

2019-03-20 Thread Frank Miles
My home linux/Debian/buster machine has suddenly made samba 'shares' 
invisible to my Win7 virtual machine (running under kvm/qemu).

Using smbclient I get two different responses:

  smbclient -L localhost

only gives the error-message response:

  Unable to initialize messaging context
  Connection to localhost failed (Error NT_STATUS_UNSUCCESSFUL)

But if I given the IP address:
   smbclient -L 192.168.1.20
it asks for a password, then tells me about the shares:
  Unable to initialize messaging context
  Enter WORKGROUP\user's password:
   ...shares...
   server info
   workgroup info

If I do the same thing on another computer (running Stretch), I
don't get the messaging-context whining, and after entering my
password get the information whether I've given it 'localhost'
or the IP address as an argument.  Unfortunately the sambas
are a different version, so I don't think I can directly compare
their configuration.  In case you wonder, testparm's [global]
output is:
[global]
bind interfaces only = Yes
deadtime = 1440
dns proxy = No
domain master = Yes
interfaces = br0 eth0 127.0.0.0/8
keepalive = 5
log file = /var/log/samba/log.%m
map to guest = Bad User
max log size = 1000
name resolve order = wins lmhosts bcast
obey pam restrictions = Yes
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd chat = *Enter\snew\s*\spassword:* %n\n 
*Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
passwd program = /usr/bin/passwd %u
server role = standalone server
unix password sync = Yes
username map = /etc/samba/username.map
usershare allow guests = Yes
wins server = 192.168.1.20
idmap config * : backend = tdb
hosts allow = 192.168.0.0/16 127.0.0.1
hosts deny = ALL

Any hints or pointers to the Fine Manual gratefully received!
   -Frank
{AFAICR I hadn't changed smb.conf since when it had been working.
And I've tried this with the firewall completely off}



Re: Format an MS-DOS floppy on /dev/sdc

2019-03-20 Thread Anders Andersson
On Sun, Mar 17, 2019 at 1:46 PM Curt  wrote:
>
> On 2019-03-17, Anders Andersson  wrote:
> >   I got myself a USB 3.5" disk drive and want to format a 3.5" HD disk
> > so that it Just Works™ as a standard MS-DOS floppy.
> >   Normally I would have used mformat from the mtools package, but it
> > appears that I can not supply a device name, just "emulated names"
> > like A: which are then translated to /dev/fd0 etc.
>
> It seems you're supposed to use '/etc/mtools.conf' for this kind of
> thing.
>
>  drive m: file="/dev/sdc"
>
> Then:
>
>  mformat m:

Thanks! This worked well, all the mtools utilities now works with the USB drive.

I wonder when the GNU people will understand that no one wants their
enforced info files and start write actual manual pages for the tools.
Normally the manual pages has a "See Also" section, but mformat does
not mention the configuration file or refers to the mtools manual page
which does.



Re: Format an MS-DOS floppy on /dev/sdc

2019-03-20 Thread Anders Andersson
On Sun, Mar 17, 2019 at 5:43 PM David Wright  wrote:
>
> On Sun 17 Mar 2019 at 13:19:29 (+0100), Anders Andersson wrote:
> >   I got myself a USB 3.5" disk drive and want to format a 3.5" HD disk
> > so that it Just Works™ as a standard MS-DOS floppy.
>
> I'm not sure that you really can. What's your reasoning for
> doing this? Are you just spoiling for an unnecessary fight?
> Or do you really want to boot off it?

I want to use a floppy disk to transfer information between computers
and other devices which expects 3.5" HD diskette formatted for use
with DOS. Since it was the industry standard for "sneakernet" file
transfer for over a decade, I don't think it's a strange use case.
What did I miss?



Re: Format an MS-DOS floppy on /dev/sdc

2019-03-20 Thread Stefan Monnier
>   I got myself a USB 3.5" disk drive and want to format a 3.5" HD disk
> so that it Just Works™ as a standard MS-DOS floppy.

Reading the manpage of mkfs.fat gives me the impression that

mkfs.fat /dev/sdc

should do the trick.  Have you tried?


Stefan



Re: Format an MS-DOS floppy on /dev/sdc

2019-03-20 Thread Stefan Monnier
> Since it was the industry standard for "sneakernet" file
> transfer for over a decade, I don't think it's a strange use case.
> What did I miss?

The two decades that passed by since?  ;-)

Especially since the media was notoriously unreliable back then and it
probably hasn't gotten better with age.


Stefan



How to get a non random IPv6 address on buster ?

2019-03-20 Thread Erwan David
When I look on my IPv6 address on buster I see I have only a random one
and not anymore the address based on mac address. Resukt : my computer
cannot be reached by other compiuters, cannot be put in DNS, etc.

How to get back the EUI64 Mac based address ?



Re: How to get a non random IPv6 address on buster ?

2019-03-20 Thread Erwan David


Le 20/03/2019 à 21:47, Erwan David a écrit :
> When I look on my IPv6 address on buster I see I have only a random one
> and not anymore the address based on mac address. Resukt : my computer
> cannot be reached by other compiuters, cannot be put in DNS, etc.
>
> How to get back the EUI64 Mac based address ?
>
>

I forgot to tell that my sysctl is

sysctl -a | grep tempaddr
net.ipv6.conf.all.use_tempaddr = 0
net.ipv6.conf.default.use_tempaddr = 0
net.ipv6.conf.eth0.use_tempaddr = 0
net.ipv6.conf.lo.use_tempaddr = -1
net.ipv6.conf.wlan0.use_tempaddr = 0

So maybe it is network-manager which does this ? (privacy extensions set
to Default)



Re: youtube video downloader for chrome

2019-03-20 Thread Celejar
On Wed, 20 Mar 2019 10:34:42 +0100 (CET)
Pierre Frenkiel  wrote:

> On Tue, 19 Mar 2019, riveravaldez wrote:
> 
> > Maybe worth mentioning: youtube-dl, exceptionally useful and simple CLI 
> > tool.
> 
>useful and simple... but it works only for urls with alphanumeric 
> characters
>I tried with an url containing ? and &, and I got nothing
>I tried also by escaping ? and & with \, and it was not better.
>I'll send you an example later, if you are not convinced...

You can also try putting the url(s) in a file, and feeding the file to
youtube-dl via its -a option.

Celejar



Re: youtube video downloader for chrome

2019-03-20 Thread Celejar
On Wed, 20 Mar 2019 15:00:12 -0400
rhkra...@gmail.com wrote:

> On Wednesday, March 20, 2019 02:10:57 PM David Wright wrote:
> > Actually I don't call youtube-dl as above, because I have two helper
> > functions which do things like history logging to prevent me
> > accidentally downloading the same video twice.
> 
> Are you willing to share?

Note that you can apparently do something like this natively with
youtube-dl itself - see its --download-archive option.

Celejar



Re: How to get a non random IPv6 address on buster ?

2019-03-20 Thread Andy Smith
Hi Erwan,

On Wed, Mar 20, 2019 at 10:28:55PM +0100, Erwan David wrote:
> > How to get back the EUI64 Mac based address ?

[…]

> So maybe it is network-manager which does this ? (privacy extensions set
> to Default)

Before we go on too much of a wild goose chase, can you confirm that
you do actually use Network Manager to set up your networking?

I do not use N-M anywhere where I have felt a need to modify its
behaviour, but I understand that you can use "nmcli" to disable the
privacy addresses:

https://librehacker.com/2018/04/04/network-manager-and-ipv6-privacy/

Personally I find privacy addresses a useful feature, so in your
position I would continue using them but also add static IPv6
addresses that are used for well-known services. So I'd have the
best of both worlds: outbound connections using unpredictable source
address, but known address for inbound connections.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: youtube video downloader for chrome

2019-03-20 Thread David Wright
On Wed 20 Mar 2019 at 15:00:12 (-0400), rhkra...@gmail.com wrote:
> On Wednesday, March 20, 2019 02:10:57 PM David Wright wrote:
> > Actually I don't call youtube-dl as above, because I have two helper
> > functions which do things like history logging to prevent me
> > accidentally downloading the same video twice.
> 
> Are you willing to share?

Sure. geto(thers) is what gy-in-quotes calls:

function geto {
local History="$HOME/.get-youtube-download-history"
local Youtube="$HOME/Youtube"
[ -z "$1" ] && printf '%s\n' "Usage: $FUNCNAME [-e] [--force] [-s] http...
gets the specified video into $Youtube.
If the file already exists (any .ext), it just continues.
-e just echoes the command that would be used for downloading.
--force overrides the check that prevents redownloading a file.
Downloads are logged in $History" >&2 && return 1
[ ! -r "$History" ] && printf '%s\n' "$History not found!" >&2 && return 1
[ ! -d "$Youtube" ] && printf '%s\n' "Destination directory $Youtube not 
found!" >&2 && return 1
local Echoonly="" Forcing="" Theurl=""
while [ $# -gt 0 ] ; do
case "$1" in
-e)
Echoonly=echo
;;
--force)
Forcing=force
;;
*)
[ -n "$Theurl" ] && printf '%s\n' "Too many operands" && return 
1
Theurl="$1"
;;
esac
shift
done
[ -z "$Theurl" ] && printf '%s\n' "Missing operand" && return 1
grep -q -e "$Theurl" "$History"
[ $? -eq 0 -a -z "$Forcing" ] && printf '%s\n' "$Theurl already in download 
history - override with --force" && return 1
printf '%s\n' "youtube-dl $Theurl"
[ -n "$Echoonly" ] && return 0
( cd "$Youtube" && youtube-dl -k "$Theurl" && printf '%s\n' "$Theurl" >> 
"$History" )
printf '%s\n' "Remember to remove the audio/video files as appropriate."
}

geto handles all the different sites that youtube-dl supports.

The second helper I use is similar except that it only uses the last
11 characters of the argument (only with youtube.com), which can be
useful when cutting is awkward, or the code has to be typed from, say,
an image.

function gy {
local History="$HOME/.get-youtube-download-history"
local Youtube="$HOME/Youtube"
[ -z "$1" ] && printf '%s\n' "Usage: $FUNCNAME [-e] [--force] [-s] 
foo-9_bar-8
gets the specified video from www.youtube.com into $Youtube
Only the last 11 characters of the argument are used.
If the file already exists (any .ext), it just continues.
-e just echoes the command that would be used for downloading.
--force overrides the check that prevents redownloading a file.
-s use a different format appropriate for my.strathspey.org
Downloads are logged in $History" >&2 && return 1
[ ! -r "$History" ] && printf '%s\n' "$History not found!" >&2 && return 1
[ ! -d "$Youtube" ] && printf '%s\n' "Destination directory $Youtube not 
found!" >&2 && return 1
local Echoonly="" Forcing="" Programmecode=""
while [ $# -gt 0 ] ; do
case "$1" in
-e)
Echoonly=echo
;;
--force)
Forcing=force
;;
-s)
Spey=spey
;;
*)
[ -n "$Programmecode" ] && printf '%s\n' "Too many operands" && 
return 1
Programmecode="$1"
;;
esac
shift
done
[ -z "$Programmecode" ] && printf '%s\n' "Missing operand" && return 1
Programmecode="${Programmecode:0-11:11}"
[ -z "$Programmecode" ] && printf '%s\n' "Operand too short" && return 1
grep -q -e "$Programmecode" "$History"
[ $? -eq 0 -a -z "$Forcing" ] && printf '%s\n' "$Programmecode already in 
download history - override with --force" && return 1
local Theurl=http://www.youtube.com/watch?v="$Programmecode";
[ "$Spey" = "spey" ] && 
Theurl=https://www.youtube.com/v/"$Programmecode"?version=3
printf '%s\n' "youtube-dl $Theurl"
[ -n "$Echoonly" ] && return 0
( cd "$Youtube" && youtube-dl -k "$Theurl" && printf '%s\n' "$Theurl" >> 
"$History" )
printf '%s\n' "Remember to remove the audio/video files as appropriate."
}

gy developed from getradio which treats 8 character BBC programme
codes in a similar way for get_iplayer, but the latter maintains
its own history cache. However, downloaded files don't retain their
timestamp, so bbc-redate does that empirically:

function getradio {
[ -z "$1" ] && printf '%s\n' "Usage:$FUNCNAME p00hgjc5
gets the specified programme from the BBC radio website.
Only the last 8 characters of the argument are used." >&2 && return 1
local Programmecode="${1:0-8:8}"
shift
"$HOME"/bin/get_iplayer --pid "$Programmecode" --type radio 
--radiomode=worst,worse,good,vgood,better,best,daf,haf,hlsaac "$@"
 

Re: youtube video downloader for chrome

2019-03-20 Thread rhkramer
Thanks!

On Wednesday, March 20, 2019 08:22:35 PM David Wright wrote:
> On Wed 20 Mar 2019 at 15:00:12 (-0400), rhkra...@gmail.com wrote:
> > Are you willing to share?
> 
> Sure. geto(thers) is what gy-in-quotes calls:
> 
> function geto {



Re: Format an MS-DOS floppy on /dev/sdc

2019-03-20 Thread David Wright
On Wed 20 Mar 2019 at 21:01:00 (+0100), Anders Andersson wrote:
> On Sun, Mar 17, 2019 at 5:43 PM David Wright  wrote:
> > On Sun 17 Mar 2019 at 13:19:29 (+0100), Anders Andersson wrote:
> > >   I got myself a USB 3.5" disk drive and want to format a 3.5" HD disk
> > > so that it Just Works™ as a standard MS-DOS floppy.
> >
> > I'm not sure that you really can. What's your reasoning for
> > doing this? Are you just spoiling for an unnecessary fight?
> > Or do you really want to boot off it?
> 
> I want to use a floppy disk to transfer information between computers
> and other devices which expects 3.5" HD diskette formatted for use
> with DOS. Since it was the industry standard for "sneakernet" file
> transfer for over a decade, I don't think it's a strange use case.
> What did I miss?

I think *I* missed, or rather misread, the first two lines of your
post (assuming the drive was what's commonly called a hard drive).
I think I understand what you're asking now, so you can delete at
least my first paragraph.

Unless you've a stack of real 3.5" diskettes which you haven't yet
got round to transferring onto a better format¹, then I think you
probably wasted your money on the drive. The port that you plug
your drive into would support a wide range of cheap drives that
could be formatted with FAT16/32±VFAT if and as required. Or you
could just use USB sticks instead, which I would recognise as
being the modern sneakernet. Why limit yourself to 1.4MB?²

¹ There are scads of LPs, VHS tapes, and probably 78s, musicassettes,
  reel-to-reel, etc. that need conversion, but there's more excuse
  here for tardiness.

² Floppy storage appears to cost around 1$/MB. Without suggesting
  your devices could handle 10TB drives, the cost of storage on
  these can be as low as 2¢/GB. (Best Buy throws in a 32GB stick.)

Cheers,
David.



Re: djbwares version 9

2019-03-20 Thread 황병희
On Wed, Mar 20 2019, Jonathan de Boyne Pollard wrote:
> ...snip...
>http://jdebp.eu./Softwares/djbwares/qmail-patches.html#any-to-cname

just comment:
whenever i see these patches, i think qmail is not easy to handle.

Sincerely, Byung-Hee.

-- 
^고맙습니다 _地平天成_ 감사합니다_^))//



Re: Format an MS-DOS floppy on /dev/sdc

2019-03-20 Thread Kenneth Parker
I've often wanted to be a Curator, for a Computer History Museum.

Kenneth Parker