Re: [gentoo-user] x11-bas/xorg-x11 removal

2022-10-29 Thread David Haller
Hello,

On Sat, 29 Oct 2022, ralfconn wrote:
>Rather than adding the whole x11-base/xorg-apps and x11-base/xorg-fonts, I'd
>like to build a list of the x11 utilities currently installed on my systems
>to add them to world in preparation of the xorg-x11 package removal.
>
>Is anybody aware of some ready to use tool for the purpose, without
>re-inventing the wheel?

for c in x11-base/ x11-apps/; do
eix '-I*' --format '' "$c"
done

HTH,
-dnh

-- 
panic("Oh boy, that early out of memory?");
linux-2.2.16/arch/mips/mm/init.c



Re: [gentoo-user] C compiler cannot create executables

2022-09-10 Thread David Haller
Hello,

On Sat, 10 Sep 2022, Jack wrote:
>I now get this error trying to emerge two different packages: libofx-0.10.7
>and gnupg (both 2.2.39 and 2.3.6).  It might also be the same problem for a
>few bugs on b.g.o found by searching on "cannot create exectuables."
>
>The relevant lines from build.log are
>
>checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
>checking whether the C compiler works... no
>configure: error: in
>`/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
>configure: error: C compiler cannot create executables
>See `config.log' for more details
>
>and from config.log:
>
>configure:2941: x86_64-pc-linux-gnu-gcc -V >&5
>x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option '-V'
>x86_64-pc-linux-gnu-gcc: fatal error: no input files
>compilation terminated.
>configure:2952: $? = 1
>configure:2941: x86_64-pc-linux-gnu-gcc -qversion >&5
>x86_64-pc-linux-gnu-gcc: error: unrecognized command-line option '-qversion';
>did you mean '--version'?
>x86_64-pc-linux-gnu-gcc: fatal error: no input files
>compilation terminated.
>configure:2952: $? = 1

These tests are normal fails with gcc, they are version checks for
other compilers.

>configure:2972: checking whether the C compiler works
>configure:2994: x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -og -ggdb 
>-Wl,-O1 -Wl,--as-needed conftest.c  >&5
>configure:2998: $? = 0
>configure:3036: result: no
>configure: failed program was:
[..boilerplate..]
>configure:3041: error: in
>`/var/tmp/portage/dev-libs/libofx-0.10.7/work/libofx-0.10.7':
>configure:3043: error: C compiler cannot create executables
>See `config.log' for more details
>
>The thing I find curious is that it appears to me that the output of the test
>compile is a file called "g" which I don't recall ever seeing, and so I
>wonder if the problem is that something has changed with gcc defaults and
>configure does not yet recognize that change.  I also don't know the 
>significance of the two "fatal error: no input files".
>
>The fact that this happens with two unrelated packages suggests that it's 
>not specific to either of them, but something in my system or configuration.

And it's a standard autoconf macro, namely AC_PROG_CC that results in
the error and the stuff before that is also standard. And as no
autoreconf is called, autotools versions should not matter.

>Any thoughts or suggestions?

I use gcc 11.3.0 here as well, and have no problem. Check for the
variables CC, CFLAGS, CPPFLAGS, LDFLAGS and LIBS in
/var/tmp/portage/dev-libs/libofx-0.10.7/temp/environment.

Somehow, that '-og' must have crept in there.

HTH,
-dnh

-- 
printk("%s: Boo!\n", dev->name);
linux-2.6.19/drivers/net/depca.c



Re: [gentoo-user] Getting maximum space out of a hard drive

2022-08-26 Thread David Haller
Hello,

On Thu, 25 Aug 2022, Dale wrote:
>Jack wrote:
[..]
>> Related question - how much space would you actually save by
>> decreasing the number of inodes by 90%?  Enough for one or two more
>> videos?
>
>Now I have to admit, that is a question I have too.

From my tests with a swapfile (which matches what I remember from real
FSen), I think '-T largefile' vs. default frees up around 1.6% of the
capacity, so for 9.1T it'd be around 150G which might be worthwhile
_iff_ you are sure about what kind of files will go on that FS.

FWIW, in a pinch if you run out of Inodes, you can create an image
file on that fs, taking just 1 Inode, format that image differently,
loop-mount it and put ton's of files inside the image. It'll eat a bit
of performance though.

And about the average filesize in a dir: Just find out the size (e.g.: 
 du -msx /foo
) and the number of used inodes (e.g.:
find /foo -xdev | wc -l
[1]) and then just divide:
summed_size_in_unit / number_of_files = avg_size_in_unit
for FSen, just divide used space by used inodes.

HTH,
-dnh

[1] assuming you have no files with '\n' in the filename

-- 
printk (KERN_ERR "%s: Oops - your private data area is hosed!\n", ...)
linux-2.6.6/drivers/net/ewrk3.c



Re: [gentoo-user] Getting maximum space out of a hard drive

2022-08-18 Thread David Haller
Hello,

On Thu, 18 Aug 2022, Dale wrote:
>Rich Freeman wrote:
>> On Thu, Aug 18, 2022 at 2:04 PM Dale  wrote:
>>>
>>> Part. # SizePartition TypePartition Name
>>> 1007.0 KiB  free space
>>>19.1 TiB Linux filesystem  10Tb
>>> 1007.5 KiB  free space
>>>
>>>
>>> I'm not sure why there seems to be two alignment spots.  Is that
>>> normal?  Already, there is almost 1TB lost somewhere.
>> 10 TB = 9.09495 TiB.  You aren't missing much of anything.
[..]
>Well, I realize it would be less than advertised but I just want to
>maximize it as much as I can.  I found the -m option for the file system
>a good while back and it saves a lot on these larger drives.  Since this
>is a external drive, no point in reserving any root space, since root
>will likely never access it after the file system is put on it. 

Also, if you're using ext2/3/4, there's the preset, i.e. if you're
rather sure about what kind of data is going to be on there, you
can tune it so that it reserves more or less place for metadata like
inodes, which can be another bit.

I made some experiments with a temp-repurposed swapfile of 2051M size:

Output of 'df -m':
1M-blocks  Used Available   Inodes   mke2fs-options used
201667  1847131072-j -t ext4
201667  1949131072-j -t ext4 -m 0
204867  18782048  -j -t ext4 -T largefile
204867  19812048  -j -t ext4 -T largefile -m 0

So, defaults uses about 1.7% of the space for metadata, and -T
largefile only about 0.15% of the space. Of course, there are rather
few inodes with '-T largefile'. But if you want to put basically only
some big videos on there, 2048 inodes seems a lot for a mere 2G of
space ;) This should scale linearly (in steps) for bigger devices and
can amount to quite some more space.

Anyway, see /etc/mke2fs.conf, 'man mke2fs' and 'man mke2fs.conf for
details.

I've done this in the past and got bitten by too few inodes, but you
can get around that for "inode-hogs" like news-spools etc. by using a
loop-filesystem with different parameters or a different fs. Just
beware: reiserfs on reiserfs is a recipie for desaster.

HTH,
-dnh

-- 
There are two major products that come out of Berkeley:
LSD and UNIX. We don't believe this to be a coincidence.
   -- Jeremy S. Anderson



Re: [gentoo-user] The old wine/harfbuzz/freetype circle ...

2021-09-18 Thread David Haller
Hello,

On Sat, 18 Sep 2021, antlists wrote:
>I've got stuck on this merry-go-round ...
>
>I'm trying to emerge wine, and it's come up with this. It insisted on adding
>abi_x86_32 or whatever it is to loads of things, but it's now blowing up with
>this circular dependency. If I try and install one with "use = -theother" it
>won't go ...

This should work:

# USE="-harfbuzz" emerge media-libs/freetype
# emerge media-libs/harfbuzz
# emerge media-libs/freetype

HTH,
-dnh

-- 
Sheridan: "If you're gonna wait for the universe to start making
sense you'll have a *long* wait ahead of you."
 -- Babylon 5 - 4x12 - Conflicts of Interest



Re: [gentoo-user] faded images with Gwenview

2021-09-13 Thread David Haller
Hello,

On Sun, 12 Sep 2021, Philip Webb wrote:
>It remains a puzzle.  Any further comments from anyone are most welcome.

Gwenview uses color-management via media-libs/lcms, feh does not.
See "Rendering intent" and "Color profile" under "Advanced" in
Gwenview's configure dialog.

HTH,
-dnh

-- 
Hey, what do you expect from a culture that
*drives* on *parkways* and *parks* on *driveways*?
--Gallagher



Re: [gentoo-user] SNAFU

2021-09-02 Thread David Haller
Hello,

On Thu, 02 Sep 2021, David Haller wrote:
>On Thu, 02 Sep 2021, Neil Bothwick wrote:
>>Yes it does, but only on the testing version. If you are running stable,
>>you won't have it.
>
>I beg to differ on that point:
>
>$ cd $(portageq get_repo_path / gentoo)
>$ for f in sys-libs/glibc/glibc-*.ebuild; do \
>if grep -q 'KEYW.* amd64' "$f"; then \
>  printf "${f##*\/}:"; \
>  sed -n -e 's/IUSE.*\( +\?crypt \).*/\1/p' "$f"; \
>fi; \
>  done
>glibc-2.25-r11.ebuild:glibc-2.30-r9.ebuild: +crypt 
>glibc-2.31-r7.ebuild: +crypt 
>glibc-2.32-r8.ebuild: +crypt 
>glibc-2.33-r1.ebuild: +crypt 
>glibc-2.33.ebuild: +crypt 
>
>$ [same as above but with 'KEYW.* ~amd64']:
>glibc-2.33-r6.ebuild: +crypt 
>glibc-2.33-r7.ebuild: +crypt 
>glibc-2.34.ebuild: +crypt 
>glibc-.ebuild: +crypt
>
>Repo synced earlier today.

Ah yes, of course there is this:

$ grep -r sys-libs/glibc.*crypt  profiles/
profiles/base/package.use.force:=sys-libs/glibc-2.33-r2 crypt

-dnh

-- 
panic("huh?\n");
linux-2.2.16/arch/i386/kernel/smp.c



Re: [gentoo-user] SNAFU

2021-09-02 Thread David Haller
Hello,

On Thu, 02 Sep 2021, Neil Bothwick wrote:
>Yes it does, but only on the testing version. If you are running stable,
>you won't have it.

I beg to differ on that point:

$ cd $(portageq get_repo_path / gentoo)
$ for f in sys-libs/glibc/glibc-*.ebuild; do \
if grep -q 'KEYW.* amd64' "$f"; then \
  printf "${f##*\/}:"; \
  sed -n -e 's/IUSE.*\( +\?crypt \).*/\1/p' "$f"; \
fi; \
  done
glibc-2.25-r11.ebuild:glibc-2.30-r9.ebuild: +crypt 
glibc-2.31-r7.ebuild: +crypt 
glibc-2.32-r8.ebuild: +crypt 
glibc-2.33-r1.ebuild: +crypt 
glibc-2.33.ebuild: +crypt 

$ [same as above but with 'KEYW.* ~amd64']:
glibc-2.33-r6.ebuild: +crypt 
glibc-2.33-r7.ebuild: +crypt 
glibc-2.34.ebuild: +crypt 
glibc-.ebuild: +crypt

Repo synced earlier today.

HTH,
-dnh

-- 
printk(KERN_ERR "happy meal: Eieee, rx config register gets greasy fries.\n");
linux-2.6.19/drivers/net/sunhme.c



Re: [gentoo-user] dev-python/isodate breaks my emerge because it's at EAPI?

2021-08-02 Thread David Haller
Hello,

On Mon, 02 Aug 2021, n952162 wrote:
>!!! All ebuilds that could satisfy
>"dev-python/isodate[python_targets_python3_8(-)?,python_targets_python3_9(-)?]"
>have been masked.
>!!! One of the following masked packages is required to complete your
>request:
>- dev-python/isodate-0.6.0-r2::gentoo (masked by: EAPI 8)
>
>The current version of portage supports EAPI '7'. You must upgrade to a
 ^^
>newer version of portage before EAPI masked packages can be installed.

You should read a bit more carefully... It seems your sys-apps/portage
is a bit dated.

Upgrade sys-apps/portage first, then it should work.

HTH,
-dnh

-- 
printk(KERN_DEBUG "%s: burped during tx load.\n", dev->name)
linux-2.6.6/drivers/net/3c501.c



Re: [gentoo-user] Rationalizing log files

2021-05-14 Thread David Haller
Hello,

On Thu, 13 May 2021, Walter Dnes wrote:
[..]
>  And maybe either stop logging Facebook, or else log iptables messages
>to a separate file (how is that done?).  The Facebook tracker messages
>are generated by iptables rules...
>
>-A INPUT -s 31.13.24.0/21 -j FECESBOOK
>-A INPUT -s 31.13.64.0/18 -j FECESBOOK
[..]
>-A OUTPUT -d 31.13.24.0/21 -j FECESBOOK
>-A OUTPUT -d 31.13.64.0/18 -j FECESBOOK

FWIW:

For one: why not filter the iptables messages into a seperate logfile?

E.g. for syslog-ng (you'll need to add the filter to other
filters/log, having them in the filters you can use those
more intuitively):


filter f_iptables   { facility(kern) and message("IN=") and message("OUT="); };
filter f_console{ ... and not filter(f_iptables); }
filter f_messages   { ... and not filter(f_iptables); };
filter f_warn   { ... and not filter(f_iptables); };
[..]
log { source(src); source(chroots); filter(f_messages); destination(messages); 
};

# Firewall (iptables) messages in one file:
destination firewall { file("/var/log/firewall" suppress(30)); };
log { source(src); source(chroots); filter(f_iptables); destination(firewall); 
};


You might be logging more specifically, so you could add more specific
filters. That's what those filters (and log-prefixes in iptables) are
for after all :)

Also add a matching logrotate entry:


/var/log/firewall {
delaycompress
missingok
notifempty
size +4096k
sharedscripts
postrotate
/etc/init.d/syslog-ng reload > /dev/null 2>&1 || true
endscript
}


or some such as /etc/logrotate.d/firewall (or however you name you
iptables-logfile.

And second, how about setting up a local dnsmasq to send all fb-crap
to NXDOMAIN on the DNS-level?

 dnsmasq.conf or e.g. /etc/dnsmasq.d/blocklist.conf [1] 
address=/fb.com/
address=/fb.me/
address=/facebook.net/
address=/facebook.de/
address=/facebook.fr/
address=/facebook.co.uk/
address=/facebook.com/
address=/fbcdn.net/
address=/instagram.com/
address=/instagram.de/
address=/whatsapp.de/
address=/whatsapp.com/
address=/whatsapp.net/


That has the effect that all (sub-)domains with those names give
NXDOMAIN, i.e. are non-existant. Compare to:

$ nslookup there.is.no.such.domain.invalid

Depending on what sites you visit, you might add more domains like
e.g. facebook.ca, facebook.mx, facebook.es or whatever fb-domains
sites that you visit include...

Just as ideas,
-dnh

[1] you'll need a matching conf-dir or conf-file directive, preferably
at the end of the main /etc/dnsmasq.conf then, I use:

conf-dir=/etc/dnsmasq.d,*.conf

which includes all *.conf files from /etc/dnsmasq.d/ (and ignores
other files there like *.conf~ or Makefile or whatnot, so you can
be creative and e.g. generate your blocklist from a simple list of
domains ;) E.g.:
 /etc/dnsmasq.d/Makefile
all: blocklist.conf
blocklist.conf: blocklist.conf.in
sort -u $< | sed 's@\(.*\)@address=/&/@' > $@


You get the ideas ;) (and if not: ask!)

-- 
Of course. Anything with more than 2 buttons is too complex. This includes
things with 2 or less buttons. This may include clothing.  -- Satya



Re: [gentoo-user] Q: What is "python-exec2c"? Why would "python3" dispatched through it not see an installed copy of pyyaml?

2021-03-06 Thread David Haller
Hello,

On Sat, 06 Mar 2021, Steven Lembark wrote:
>Question then is why "python-exec2c" dispatched via a symlink from
>"python3" would fail to see the installed copy of pyyaml (or how
>should I check with modules are avalable via "python3")?
[..]
>I think that pyyaml is installed:
>
>*  dev-python/pyyaml
>  Latest version available: 5.4.1
>  Latest version installed: 5.4.1
>  Size of files: 170 KiB
>  Homepage:  https://pyyaml.org/wiki/PyYAML 
> https://pypi.org/project/PyYAML/ https://github.com/yaml/pyyaml
>  Description:   YAML parser and emitter for Python
>  License:   MIT

Check with 'eix dev-python/pyyaml' or 'equery uses dev-python/pyyaml'
for what python versions that module is actually installed for and
compare that with the default python3 version (check 'python3 --version')

You probably need to re-emerge dev-python/pyyaml if PYTHON_TARGETS has
changed. You probably have it installed just for one target (which is
not your current default python3).

$ equery uses dev-python/pyyaml
[..]
 + + python_targets_python3_7 : Build with Python 3.7
 + + python_targets_python3_8 : Build with Python 3.8
 - - python_targets_python3_9 : Build with Python 3.9
[..]

So I have it installed for python 3.7.x and 3.8.x ...

HTH,
-dnh

-- 
It's simply unbelievable how much energy and creativity people have
invested into creating contradictory, bogus and stupid licenses...
--- Sven Rudolph about licences in debian/non-free.



Re: [gentoo-user] cmake-3.18.5 build fails

2021-02-12 Thread David Haller
Hello,

On Fri, 12 Feb 2021, Jack wrote:
>On 2021.02.12 14:49, Walter Dnes wrote:
>>   64-bit Gentoo on a new 12-core machine.  The build fails in the compile
>> phase.  Switching makeopts from -j4 to -j1 didn't help.  Build log is
>> attached.
>The error seems to be at linking:
>
>/usr/lib/gcc/x86_64-pc-linux-gnu/7.5.0/../../../../x86_64-pc-linux-gnu/bin/ld:
>/usr/lib64/libjsoncpp.so: undefined reference to
>`std::__cxx11::basic_ostringstream,
>std::allocator >::basic_ostringstream()@GLIBCXX_3.4.26'
>
>/usr/lib64/libjsoncpp.so belongs to dev-libs/jsoncpp.  cmake depends on
>>=dev-libs/jsoncpp-1.9.2-r2:0=
>
>I have 1.9.4 installed.  (1.9.3 is the only other one I see in Portage.)  Is
>it possible you have an older version, and the dep needs to be updated?

I needs just to be recompiled, I think. With '-std=c++11' or later. 
Search for
'undefined reference to std::__cxx11::basic_'
(no quotes) on your least untrusted search engine, or better, if your
search-engine supports the 'site:' parameter, for 
'undefined reference to std::__cxx11::basic_ site:gentoo.org'

AFAIR, there were both at least one news item and tons of
mails/forum-posts about this issue with 'std::__cxx11::basic.*string'
stuff. It's that C++ ABI change for all that string related stuff. It
all basically boils down to just recompile all your C++ libs using
some form of (basic_)string (and all stuff depending on those) using
the new cxx11 ABI. ISTR that was rather well communicated in the news
items and on this ML. And there's stuff on the wiki, e.g.:
https://wiki.gentoo.org/wiki/Upgrading_GCC

ISTR there's more specific stuff, but that's the gist of it. Rebuild
what depends on libstdc++. IIRC:

$ revdep-rebuild -v -p --library  /usr/lib/libstdc++.so.5

(change /usr/lib/ to whatever matches your platform and don't forget
/usr/lib32 if you do multilib ;)

>Also, might it be related to gcc version?  I'm currently using 10.2.0-r5
>~amd64.

Nah. It's libstdc++ ;)

HTH,
-dnh

-- 
The only languages that can comfortably be written with the repertoire of
US-ASCII happen to be Latin, Swahili, Hawaiian and American English without
most typographic frills. It is rumoured that there are more languages in the
world. -- Roman Czyborra



Re: [gentoo-user] forcing Gentoo to accept simple password

2021-02-07 Thread David Haller
Hello,

On Sat, 06 Feb 2021, the...@sys-concept.com wrote:
>What changing one need to make to force gentoo log-in to accept
>simple password. The system is not a high security risk so I have no
>need for a sophisticated password.

>I think it has to do something with file: /etc/pam.d/system-auth
[..]
>passwordrequiredpam_passwdqc.so 
>config=/etc/security/passwdqc.conf

Uninstall sys-auth/passwdqc... From it's manpage:


DESCRIPTION
 The pam_passwdqc module is a simple password strength checking
 module for PAM.


You need to remove the 'passwdqc' USE flag from sys-auth/pambase, else
it'll get pulled in again.

HTH,
-dnh

-- 
Linux is not a desktop OS for people whose VCRs are still
flashing "12:00". -- Paul Tomblin



Re: [gentoo-user] HOWTO: Freezing/unfreezing (groups of) processes

2021-02-05 Thread David Haller
Hello,

On Fri, 05 Feb 2021, Walter Dnes wrote:
>On Fri, Feb 05, 2021 at 06:55:12AM -0500, Rich Freeman wrote
>> On Fri, Feb 5, 2021 at 2:45 AM Walter Dnes  wrote:
>> >   So far, so good, but running "ps -ef | grep whatever" and then
>> > typing the kill -SIGSTOP/SIGCONT command on the correct pid is grunt
>> > work, subject to typos.

It's much easier to use the '-o' option of ps, i.e.:

$ ps -eo pid,cmd

That gives you a much easier format to work with. There's a lot more
fields to use, e.g. tname or tty, args or cmd, comm, and many more see
'man ps' under "STANDARD FORMAT SPECIFIERS".

>  My reading of the "killall" man page is that it works on command
>names.  For my script, "pstop palemoon" stops all instances of Pale
>Moon.  But my script greps the entire line, so "pstop slashdot" will
>stop the process...
>
>/home/waltdnes/pm/palemoon/palemoon -new-instance -p slasdot
>
>  Does "killall" have that ability to stop a process based on any
>parameters in the command line?

The following script does:

 ~/bin/pstop && ln -s pstop ~/bin/pcont 
#!/usr/bin/gawk -f
BEGINFILE { if( FILENAME != "" ) { exit(0); } }
BEGIN {
### determine if were run as pstop or pcont
cmdlinefile = "/proc/" PROCINFO["pid"] "/cmdline" ;
getline cmdline < cmdlinefile;
n = split(cmdline, argv, "\0");
IAM=argv[3];
if( IAM ~ /pstop$/) { SIG="STOP"; } else { SIG="CONT"; };

### now to work ...
printf("%s-ing pids: ", SIG); 
bcmd = sprintf("kill -%s ", SIG);
pscmd = "ps -eo pid,cmd";

# IGNORECASE=1 ### uncomment for case insensitive matching
while ( pscmd | getline ) {
if( $1 != PROCINFO["pid"] ) { ### ignore ourself
p = $1; $1 = ""; ### save pid to p; prune pid from $0
for(i=1; i < (ARGC); i++) {
if( $0 ~ ARGV[i] ) {
printf("%s ", p);
cmd = bcmd p;
system(cmd);
}
}
}
}
}
END { printf("\n"); }


Arguments can be any number of (quoted where neccessary) regular
expressions described under 'Regular Expressions' in 'man gawk'
(basically Extended POSIX REs as in egrep, see 'man 7 regex').

Example use:

$ pstop palemoon firefox slashdot 'chrom(e|ium)'

(and the same for pcont)

HTH,
-dnh

-- 
Love your enemies: they'll go crazy trying to figure out what you're up
to. -- BSD fortune file



Re: [gentoo-user] merged on \${HOST} with notice"

2021-01-17 Thread David Haller
Hello,

On Sun, 17 Jan 2021, the...@sys-concept.com wrote:
>On 1/17/21 2:04 PM, David Haller wrote:
>> On Sun, 17 Jan 2021, the...@sys-concept.com wrote:
>>> I have in a new machine (as on all other boxes) in make.conf
>>> PORTAGE_ELOG_MAILSUBJECT="package \${PACKAGE} merged on \${HOST} with 
>>> notice"
>> [..]
>>> Which file define "${HOST}"
>> 
>>  /etc/hosts 
>> [..]
>> # IP-Address  Full-Qualified-Hostname  Short-Hostname
>> 
>> 127.0.0.1   syscon3.domain.tld   syscon3 localhost
>> ::1 syscon3.domain.tld   syscon3 localhost
>> 
>
>THANK YOU! It is working.
>Does placement of the name make a difference? 
>eg:  
>127.0.0.1   syscon3.domain.tld   syscon3 localhost
>
>vs.
>127.0.0.1   localhost  syscon3  syscon3.domain.tld 

Yes. That's why I quoted the comment that the FQDN has to be first.

You can check with:

$ hostname
$ hostname -f

The former must give the short name ("syscon3"), the second one the FQDN
("syscon3.domain.tld").

HTH,
-dnh

-- 
>Wow, and everyone swears [Python]'s better than Perl. Wait, you don't say
>it's worse, never mind.  -- Satya
The axis on which Perl sits is rotated 90 degrees with respect to the
rest of language-goodness-space.-- Garrett Wollman



Re: [gentoo-user] merged on \${HOST} with notice"

2021-01-17 Thread David Haller
Hello,

On Sun, 17 Jan 2021, the...@sys-concept.com wrote:
>I have in a new machine (as on all other boxes) in make.conf
>PORTAGE_ELOG_MAILSUBJECT="package \${PACKAGE} merged on \${HOST} with notice"
[..]
>Which file define "${HOST}"

 /etc/hosts 
[..]
# IP-Address  Full-Qualified-Hostname  Short-Hostname

127.0.0.1   syscon3.domain.tld   syscon3 localhost
::1 syscon3.domain.tld   syscon3 localhost


Use 'localdomain' as domain.tld if you don't have a domain.

HTH,
-dnh

-- 
Less is more or less more



Re: [gentoo-user] [OT] Differences between wget and browser file retrieval?

2021-01-14 Thread David Haller
Hello,

On Thu, 14 Jan 2021, Walter Dnes wrote:
>  I'm bored, so I do a regular daily report at the DSL Reports "CanChat"
>sub-forum, on the Covid-19 case counts for Ontario, using provincial
>data.  I download 2 files daily as source data.  One of them is a PDF
>file, which is run through "pdftotext" and then parsed by a bash script
>(don't ask).  Today, the command...
>
>  wget https://files.ontario.ca/moh-covid-19-report-en-2021-01-14.pdf
>
>...returns a zero-byte file.  *BUT*, sticking the URL into the URL bar
>of Pale Moon and Google Chrome (and I assume Firefox/etc) brings up the
>PDF file just fine.  Is "wget" being blocked?
[..]
>  I've tried setting --user-agent= with my browser's string as shown by
>https://www.whatismybrowser.com/detect/what-is-my-user-agent  but no
>luck.  Is there some way to get around this?  I have not updated this
>past week, so I don't think the problem is at my end.

I could download that file just fine just now[1]. Try running 'wget'
with the '-S' option. Oh and:

[..]
WARNING: cannot verify files.ontario.ca's certificate, issued by
[..]

If you sent stderr to /dev/null ...

So, try:

wget -S --no-check-certificate -U 'Mozilla/5.0 ...' \
https://files.ontario.ca/moh-covid-19-report-en-2021-01-14.pdf

BTW: you know that you can let date format that URL? e.g.:

wget -S --no-check-certificate -U 'Mozilla/5.0 ...' \
  "$(date '+https://files.ontario.ca/moh-covid-19-report-en-%Y-%m-%d.pdf')"

There just are no unescaped '%' allowed besides the format strings for
the date/time. So if an URL contains one, you need to escape those
with another '%', as in e.g.
$(date '+foo%%20bar-%Y-%m-%d.pdf')
^^ this fella

In your case, the URL is clean ;)

HTH,
-dnh

[1] $ TZ=America/Toronto date
Thu Jan 14 16:50:15 EST 2021

-- 
"Airplane travel is nature's way of making you look like your passport
photo." -- Al Gore



Re: [gentoo-user] ISO verification question.

2020-12-24 Thread David Haller
Hello,

On Thu, 24 Dec 2020, bobwxc wrote:
>With the cryptographic signature validated, next verify the checksum to make
>sure the downloaded ISO file is not corrupted. The.DIGESTS.ascfile contains
>multiple hashing algorithms, so one of the methods to validate the right one
>is to first look at the checksum registered in the.DIGESTS.ascfile. For
>instance, to get the SHA512 checksum:
>
>|user $||grep -A 1 -i sha512 install-amd64-minimal-20141204.iso.DIGESTS.asc|
[..]
>As both checksums match, the file is not corrupted and the installation can
>continue.

It's easier not to compare manually:

$ grep -A1 SHA512 install-iso.DIGESTS | sha512sum -c -

Analog for whirlpool:

$ grep -A1 WHIRLPOOL install-iso.DIGESTS | whirlpool-hash -c -

HTH,
-dnh

-- 
To resist the influence of others, knowledge of one's self is
most important.   -- Teal'C, Stargate SG-1, 9x14 - Stronghold



Re: [gentoo-user] Rearranging hard drives and data.

2020-12-19 Thread David Haller
Hello,

On Sat, 19 Dec 2020, antlists wrote:
>On 19/12/2020 18:49, David Haller wrote:
>> -dnh, the MoBo though is quite a fine piece with 8 SATA + 2 eSATA
>>  ports onboard:)  I'm gonna miss eSATA in newer HW:(  Hot-plug
>>  almost like USB but full SATA feature set and speed (e.g. SMART).
>
>Buy add-in sata cards. The ones I've been looking at are two-port cards, with
>two internal and two external (jumper-selected) connectors.

I already got one. Yes, I'd pitch MoBo w/many SATA vs. MoBo w/fewer
SATA plus AddIn, but PCI(e) slots are also limited and >=2 port cards
get expensive rather quick, say a card with >= 4 internal and
_extra_[0] 1-2 eSATA ... So, I'll rather have a MoBo with lots of SATA
+ addin than MoBo plus tons of addin cards...

My MoBo has the AMD 710 "Southbridge" with 6 int. SATA2/3G [1] ports,
a MV9128 with 2 int. SATA3/6G ports and a JMB362 with 2 ext. eSATA2/3G
ports. Try to find _anything_ even remotely resembling that (with any
SATA rev) ;) My guess is, with most MoBos you'd need two 4-port addin
cards even for that. And my MoBo was not even expensive, just ~80 EUR
in 04/2010. BTW: GA-770TA-UD3, hosting a AMD Athlon II X2 250 for then
~65 EUR :) Still running as champs :))

Again: find me a MoBo + Addin Card(s) Combo with: >= 9 internal SATA
ports, >=1 eSATA ports (dedicated, not switched with one of the
internal ones!). An IDE port would be a nice extra.

Were it not for gentoo and large stuff needing 6+ hours to compile,
the occasional reencoding of a video[3], and some fucking websites
which take ages to load (which was one reason for me to update 10
years ago from my then Athlon 500[2])... *ELIDED* those *ELIDED*
webdevs *ELIDED* - sideways - *ELIDED* that *ELIDED* *ELIDED* so
called webpages that gobble CPU as if there's no tomorrow! And
*ELIDED* I know, I built webpages that (besides larger pictures) load
snappy over a 4kB/56kBit/s modem in fractions of a second (no wonder,
being typically <0.5KB in size and no JS or other crud, there's a lot
you can fit in 1 KB :).

What was I saying, ahh, yes: ... I'd not even consider upgrading.

Well, more RAM would be nice by now, what with those *ELIDED* browsers
and *ELIDED* Java-Apps gobbling RAM as if there's TiBs of it for
free... *ARG*&*()#@*{!@_)(@I*CONNECTION RESET BY BEER*

-dnh

[0] i.e. working in parallel to the internal ports

[1] SATA2 was still normal then

[2] yep, the original, slowest Athlon ever sold, sufficed for me for
many many years, along with an even older Matrox Mystique (the
original 150MHz RAMDAC but as the beefy 4MB SGRAM version)

[3] BTW: it's astonishing how inefficient some streamed videos are
encoded, just today I crunched down one from 2.9GiB to about
639MiB. Albeit, I scaled down from 720p to 576p, but do the maths.

I regularly get to <50% of the size of the original without any
scaling, and all without any visible loss (x264 with crf=23:nr=750,
that codec-internal noise reduction alone can get you ~10% less
size ;) Well, it's what you get when you don't know about codecs
or you just run HW-encoders at defaults, I guess...

-- 
"That time in Seattle... was a nightmare.  I came out of it dead broke,
without a house, without anything except a girlfriend and a knowledge of
UNIX."  "Well, that's something," Avi says.  "Normally those two are
mutually exclusive."--Neal Stephenson, "Cryptonomicon"



Re: [gentoo-user] Rearranging hard drives and data.

2020-12-19 Thread David Haller
Hello,

On Sat, 19 Dec 2020, antlists wrote:
>On 19/12/2020 16:51, David Haller wrote:
>> Beware: I use a lot of disks and I tried running it with then 8 (or 9?
>> or 10? Lots!) HDDs with a 500W (or even 550W) PSU. System wouldn't
>> reliably boot up. Replaced with a 650W PSU and it's running since
>> (which is, those 10+ years now:)  Currently I have a SSD and 7 HDDs
>> (and 2 DVD[1]);)
>
>Bear in mind I'm talking about a computer the size of a washing machines, and
>an 800MB drive the size of a tower case...
>
>Back in the old days, you could configure the system so the drive would wait
>a certain number of seconds after power-on before actually powering up.
>
>So you'd work out what power you had spare above normal operation to spin up
>your drives, and avoid overloading the system.
>
>That useful feature has probably been lost in the name of progress... :-)

Called "staggered spinup" (or something alike).

In servers, it's still there, but not in run-of-the-mill desktops like
mine... Sadly so in my case, I could and would have used that...

-dnh, the MoBo though is quite a fine piece with 8 SATA + 2 eSATA
ports onboard :) I'm gonna miss eSATA in newer HW :( Hot-plug
almost like USB but full SATA feature set and speed (e.g. SMART).

-- 
It takes a million monkeys at typewriters to write Shakespeare, but
only a dozen monkeys at computers to run Network Solutions.
   -- Patrick Delahanty



Re: [gentoo-user] Rearranging hard drives and data.

2020-12-19 Thread David Haller
Hello,

On Sat, 19 Dec 2020, Dale wrote:
>A friend donated a older PC to me the other day.  It's a fairly nice rig
>despite its age.  Some specs for those interested but may not matter in
>the end.  TL;DR, skip to next paragraph.  It's a Dell Inspiron 546.  AMD
>9750 quad core CPU running at 2.4GHz.  It currently has 4GBs but

Meh. I'm running an Athlon II X2 250, 65W TDP, i.e. same CPU family
(0x10/16), running at 3.0 GHz with 4GiB DDR3 RAM ... After (again)
over 10 years, I'd like to upgrade again a bit, Ryzen 5000 4-8core
w/32GiB RAM like ;)

[..]
>The power supply was replaced a few years ago.  I may buy a new one that
>is a little bit larger. It has a 300 watt now, a 400 watt would give
>some breathing room for start up power for the extra drives.  I haven't
>measured the wattage it pulls now.  May do that later. 

Beware: I use a lot of disks and I tried running it with then 8 (or 9? 
or 10? Lots!) HDDs with a 500W (or even 550W) PSU. System wouldn't
reliably boot up. Replaced with a 650W PSU and it's running since
(which is, those 10+ years now :) Currently I have a SSD and 7 HDDs
(and 2 DVD[1]) ;)

Typical spinning rust drives are (or at least were) specced to take up
to about 30W while spinning up, ~10-12W-ish on access, ~5-7W-ish while
idle. For me, that then was ~240-300W alone for all the drives at
power-on. Too much obviously for the 500W PSU along with all the rest
of the box also starting ;)

I've got a nice Seasonic PSU from Corsair (TX650 v2) (the v1 was some
other stuff), only drawback is that it has gotten a bit clogged up
with dust and gotten loud and there's no easy way to clean it out (at
least without taking it apart) *sigh*...

>I'm thinking of making a storage system out of it.  I think it is
>referred to as a NFS.

Nope. NFS is "Network File System". You mean "NAS" = "Network Attached
Storage" ;)

>It should be plenty fast enough to move data around.  Only downside,
>not many spaces for hard drives.

Also, that Phenom X6 w/ 125W TDP is plenty powerhungry, even at idle
(ISTR 50W-ish, while modern stuff can take only 20-10W for the system,
aside from the HDDs in both cases).

>I see only two spaces for hard drives with one already taken.  There
>is a open area that I could add a drive cage, I think.  May can fit
>two or three hard drives in that.  There's also a 5 1/4 space too. 
>Another downside tho, I'm thinking of going to SAS drives.  If I can
>afford that, it will be a more dependable setup.  Of course, that
>means I have to add card(s) for the controller(s).  It doesn't have a
>lot of expansion slots but may be enough. Mobo is only SATA.
>
>Another option, find another case.  If I recall correctly tho, some
>puter makers don't use standard layouts for the mobo screw holes. 
>Anyone know if Dell is a standard ATX or some other screw hole pattern? 

No idea, but I'd go for a different case. And probably, depending on
budget vs. power-consumption (cost) for a different CPU+MoBo+RAM,
something like a AMD Ryzen 3 3200G or maybe a x86 Celeron/Pentium/i3...

HTH,
-dnh

[1] too lazy even to unplug the older one

-- 
Actually, NT is more like LSD with all the good effects filtered out.
 -- Andrew Maddox



Re: [gentoo-user] syslog-ng: filter plugin NOT not found ????

2020-12-16 Thread David Haller
Hello,

On Wed, 16 Dec 2020, Todd Goodman wrote:
>I think you need a semi-colon inside and after the right curly brace ('}')
>
>You right braces are parentheses and not right curly braces too (maybe a cut
>and paste issue?)
>
>FWIW, the following is what I use to separate my mail logs out and it works:
>
>destination messages { file("/var/log/messages"); };
>destination maillog { file("/var/log/maillog"); };
>
>filter f_mail { facility(mail); };
>filter f_messages { not facility(mail); };
>
>log { source(src); filter(f_mail); destination(maillog); };
>log { source(src); filter(f_messages); destination(messages); };
>
>On 12/15/2020 10:44 PM, Dan Egli wrote:
>> Help me understand this, please?  I have ISC dhcpd configured to log to
>> syslog.local7 (since I don't see an option to force it into it's own log
>> file). So I went into my syslog-ng file and created two filters, just
>> like on the example page of syslog-ng.com:
>> 
>> filter dhcpmsgs { facility(23) );
>> filter non_dhcp { NOT filter(dhcpmsgs) )

Also, where's that '23' coming from? Shouldn't that be

filter dhcpmsgs { facility(local7); };

HTH,
-dnh

-- 
printk(KERN_DEBUG "%s: Flex. T...\n", DRV_NAME);
linux-2.6.6/drivers/net/wan/dscc4.c



Re: [gentoo-user] nvidia: loading out-of-tree module taints kernel

2020-12-13 Thread David Haller
Hello,

On Sun, 13 Dec 2020, the...@sys-concept.com wrote:
>dmesg |grep nvidia
> nvidia: loading out-of-tree module taints kernel.
> nvidia: module license 'NVIDIA' taints kernel.
 ^^^
[..]
>Why this error message?  

There is no error.
See 

-dnh

-- 
"The command 'man man' works fine, but 'man woman' produces:
 No manual entry for woman."-- Constantinos Maltezos



Re: [gentoo-user] cannot emerge chromium 89.0.4343.0

2020-12-09 Thread David Haller
Hello,

On Wed, 09 Dec 2020, John Covici wrote:
>On Wed, 09 Dec 2020 11:20:06 -0500, Mark Knecht wrote:
[..]
>FAILED: obj/v8/v8_base_without_compiler/intl-objects.o 
[..] -O2 -pipe -c ../../v8/src/objects/intl-objects.cc -o 
obj/v8/v8_base_without_compiler/intl-objects.o
>../../v8/src/objects/intl-objects.cc:52:28: error: static assertion failed: v8 
>is required to build with ICU 68 and up
>   52 | V8_MINIMUM_ICU_VERSION <= U_ICU_VERSION_MAJOR_NUM,

The wording though is, ahm, backwards. You need dev-libs/icu >= 68.0,
which is still unstable. Or set '-system-icu' as useflag.

HTH,
-dnh

-- 
printk(KERN_DEBUG "adintr: Why?\n");
linux-2.6.19/sound/oss/ad1848.c



Re: [gentoo-user] Anyone using extract_url with mutt?

2020-11-26 Thread David Haller
Hello,

On Thu, 26 Nov 2020, Walter Dnes wrote:
>  urlview has served me faithfully for many years in conjunction with
>mutt.  In a recent install, I find it's no longer available (python
>2.7?).

Stated reason was "upstream dead" (which seems the case since 2013,
with issues on github[1])...

>extract_url is touted as a drop-in replacement for urlview.  I
>emerged it and did some RTFM, ending up more confused than ever.  I want
>to display urls on a simple menu, just like urlview, select, and pass
>the selected url to my palemoon email profile...
>
>/home/waltdnes/pm/palemoon/palemoon -new-instance -p email

I don't know urlview, but FWIW, I use the mouse or cursor in e.g. 
emacs to select the URL (or just a part) as usual and then
Ctrl+"8th-Button" (actually lower thumb button, use xev / evtest to
find the right button number) to call the browser, done via xbindkeys:

# call browser with selected text as URL
"/home/dh/bin/browser $(xsel -o)"
Control + b:8

You can use pretty much any unused key-combination with or without the
mouse as trigger.

(that ~/bin/browser is just my little wrapper-shellscript adding e.g. 
a profile option, a '-new-tab' if the browser is already running or
calling another unliked, but needed for some specific pages, browser...)

Ah: x11-misc/xbindkeys x11-misc/xsel

HTH,
-dnh

[1] https://github.com/sigpipe/urlview/issues

-- 
Door: Something a cat wants to be on the other side of



Re: [gentoo-user] Browser have problems with illegal characters

2020-11-26 Thread David Haller
Hello,

On Wed, 25 Nov 2020, Jack wrote:
[..]
>Found it.  It is "middle dot" U+00B7 which in UTF-8 two bytes of octal 302
>267 or hex C2 8E.
>
>Also, now that I look at the page source,  I see "Introduction to
>Metaprogramming in Nim  HookRace Blog" so I do wonder if it
>is something funny with the character coding with iso88591.  In fact, it does
>look like that unicode point it NOT available in iso88591.  I wonder what the
>proper fall-back should be in such a case.

It is available, but it seems the locale is not used for encoding
filenames.

 man 7 latin1 
Oct   Dec   Hex   Char   Description
267   183   B7 · MIDDLE DOT


-dnh

-- 
>> This needs quotes:
>> use lib "/path/to/perl/modules";
> Single or double quotes?
Yes. -- Tad McClellan in comp.lang.perl.misc



Re: [gentoo-user] youtube-dl and the conf file.

2020-10-29 Thread David Haller
Hello,

On Wed, 28 Oct 2020, Dale wrote:
>David Haller wrote:
>> Please run again with -v, such as:
>>
>> $ youtube-dl -v https://www.youtube.com/watch?v=byTOZIvyXPo
>>
>> and then check at the top for the lines:
>>
>> [debug] System config: []
>> [debug] User config: [ .. THIS IS WHAT I'M INTERESTED IN .. ]
>> [debug] Custom config: []
>> [debug] Command-line args: [u'-v', 
>> u'https://www.youtube.com/watch?v=IzPxJK4drcc']
>> [..]
>> [debug] youtube-dl version 2020.09.20
[..]
>dale@fireball ~/Desktop $ youtube-dl -v
>https://www.youtube.com/watch?v=C0DPdy98e4c
>[debug] System config: []
>[debug] User config: ['ytdl-format=bestvideo[height<=?1280]+bestaudio/best']
>[debug] Custom config: []
>[debug] Command-line args: ['-i', '-v',
>'https://www.youtube.com/watch?v=C0DPdy98e4c']
>[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
>[debug] youtube-dl version 2020.06.16.1

You seem to have a stray config file ;) I checked with the exact same
version as you and your config file and it gives me:

$ youtube-dl --config-location /tmp/test-ytconf
[..]
[debug] User config: []
[debug] Custom config: ['--format', 
'bestvideo[ext=webm][width<=?1280]+bestaudio/bestvideo[ext=mp4][width<=?1280]+bestaudio/best',
 '--merge-output-format', 'mp4']
[debug] youtube-dl version 2020.06.16.1
[debug] Python version 3.8.6 (CPython) ...

(I use the seperate config to not overwrite mine, but I tested it with
my config and it also gives me:

[debug] User config: [ ...  '--format', 'best[height ...]

So, you seem to have some user config file which contains:

ytdl-format=bestvideo[height<=?1280]+bestaudio/best

instead of '--format[space]some_specs'. To find it the easiest, try:

$ strace -eopen youtube-dl SOMEURL 2>&1 | grep /home/

Here, it shows just ~/.config/youtube-dl/config to be used.

HTH,
-dnh

-- 
 A funny symbol that I can't read has just been input.
 Continue, and I'll forget that it ever happened.  -- a TeX message



Re: [gentoo-user] youtube-dl and the conf file.

2020-10-28 Thread David Haller
Hello,

On Tue, 27 Oct 2020, Dale wrote:
[..]
>ERROR: 'ytdl-format=bestvideo[height<=?1280]+bestaudio/best' is not a
>valid URL. Set --default-search "ytsearch" (or run  youtube-dl
>"ytsearch:ytdl-format=bestvideo[height<=?1280]+bestaudio/best" ) to
>search YouTube
>[youtube] byTOZIvyXPo: Downloading webpage

Please run again with -v, such as:

$ youtube-dl -v https://www.youtube.com/watch?v=byTOZIvyXPo

and then check at the top for the lines:

[debug] System config: []
[debug] User config: [ .. THIS IS WHAT I'M INTERESTED IN .. ]
[debug] Custom config: []
[debug] Command-line args: [u'-v', 
u'https://www.youtube.com/watch?v=IzPxJK4drcc']
[..]
[debug] youtube-dl version 2020.09.20

and mail them here ... One should see there how yt-dl parses your
config and hopefully what goes wrong with it.

HTH,
-dnh

-- 
Thou shalt not droppeth thy leatherman onto live motherboards.
-- Andreas "Buzh" Skau



Re: [gentoo-user] youtube-dl and the conf file.

2020-10-27 Thread David Haller
Hello,

On Tue, 27 Oct 2020, Dale wrote:
>This is what the conf file looks like now.  I took out the format
>option.  Add it back later when this current issue is settled. 
>
>--format
>'bestvideo[ext=webm][width<=?1280]+bestaudio/bestvideo[ext=mp4][width<=?1280]+bestaudio/best'

Is that one or two lines? It think it should be one! I.e.:

--format foo

Try:

--format 
'bestvideo[ext=webm][width<=?1280]+bestaudio/bestvideo[ext=mp4][width<=?1280]+bestaudio/best'

Or, I think it's equivalent:

--format 'bestvideo[ext=webm,ext=mp4][width<=?1280]+bestaudio/best'

HTH,
-dnh

-- 
Linux is not a desktop OS for people whose VCRs are still
flashing "12:00". -- Paul Tomblin



Re: [gentoo-user] No sound. Please, help!

2020-10-18 Thread David Haller
Hello,

On Sun, 18 Oct 2020, Dale wrote:
>gevisz wrote:
>> Thank you for your help. I turned on the computer, changed options snd
>> cards_limit to 2 and ran aplay /usr/share/sound/alsa/*.wav (I have a
>> different named wav files). There was a sound.
[..]
>> reboot I have a sound and on another I have no sound. Any thoughts?
>
>Try adding alsasound to the default runlevel.  And then:
>
>/etc/init.d/alsasound start
>
>and then
>
>/etc/init.d/alsasound save

One should run that '/etc/init.d/alsasound save' once when sound
works, so that later save on stop and restore on reboot work ;)

BTW: I liked the SUSE way of symlinking init-scripts to /usr/sbin/rc*,
e.g. /usr/sbin/rcalsasound -> /etc/init.d/alsasound
I now do that (to /usr/local/sbin/rc*) for stuff that I don't want in
a runlevel, but still start/stop occasionally ;)

>P. S.  I found a new sledge hammer.  Is this being sent as plain text
>only?  No HTML at all? 

Yes.

-dnh

-- 
All technology is suspect, and must be considered potentially dangerous.
  -- BUTLERIAN JIHAD, Handbook for Our Grandchildren



Re: [gentoo-user] No sound. Please, help!

2020-10-18 Thread David Haller
Hello,

On Sun, 18 Oct 2020, gevisz wrote:
>??, 18 ???. 2020 ?. ? 09:09, David Haller :
[..]
>> Try this in /etc/modprobe.d/alsa.conf (or some file there):
>>
>> 
>> alias char-major-116 snd
>> alias snd-card-0 snd-hda-intel
>> options snd-hda-intel model=auto
>> 
[..]
>So, after changes you suggested, it looks as follows:
># Alsa kernel modules' configuration file.
>
># ALSA portion
>alias char-major-116 snd
># OSS/Free portion
>alias char-major-14 soundcore
>
>##
>## IMPORTANT:
>## You need to customise this section for your specific sound card(s)
>## and then run `update-modules' command.
>## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
>##
>##  ALSA portion
>## alias snd-card-0 snd-interwave
>alias snd-card-0 snd-hda-intel
>## alias snd-card-1 snd-ens1371
>##  OSS/Free portion
>## alias sound-slot-0 snd-card-0
>## alias sound-slot-1 snd-card-1
>##
>
># OSS/Free portion - card #1
>alias sound-service-0-0 snd-mixer-oss
>alias sound-service-0-1 snd-seq-oss
>alias sound-service-0-3 snd-pcm-oss
>alias sound-service-0-8 snd-seq-oss
>alias sound-service-0-12 snd-pcm-oss
>##  OSS/Free portion - card #2
>## alias sound-service-1-0 snd-mixer-oss
>## alias sound-service-1-3 snd-pcm-oss
>## alias sound-service-1-12 snd-pcm-oss
>
>alias /dev/mixer snd-mixer-oss
>alias /dev/dsp snd-pcm-oss
>alias /dev/midi snd-seq-oss
>
># Set this to the correct number of cards.
>options snd-hda-intel model=auto
>options snd cards_limit=1

Looks good, but snd-hda-codec-hdmi might still get loaded, so try with:

options snd cards_limit=2

(or even more)...

>Tried to run 'update-modules' command but got
>bash: update-modules: command not found
>message.

Should not be necessary.

[still no sound after reboot in FF/Skype]

Try:

aplay /usr/share/sounds/alsa/test.wav

before tackling FF etc. And check alsamixer etc. for it might have
wrong options set as the device might have been moved..

HTH,
-dnh

-- 
Two atoms are walking along. Suddenly, one stops. The other says,
"What's wrong?" "I've lost an electron." "Are you sure?" "I'm positive!"



Re: [gentoo-user] No sound. Please, help!

2020-10-18 Thread David Haller
Hello,

On Sat, 17 Oct 2020, gevisz wrote:
>??, 17 ???. 2020 ?. ? 14:57, David Haller :
[..]
>Here is the comparative table for your kernel parameters vs those of
>gentoo-kernel 5.4.64 and my last tried configuration in
>gentoo-sources-4.19.86:
>CONFIG | 4.14 | 5.4.64 | 4.19.86
>SND  | y  | m| y
>SND_TIMER   | y  | m| y
>SND_PCM  | y  | m| y
>SND_HWDEP | m | m| y
>SND_DRIVERS   | y  | y | y
>SND_PCI| y  | y | y
>SND_HDA  | m | m| y
>SND_HDA_INTEL| m| m| y
>SND_HDA_HWDEP | y | y | n
>SND_HDA_RECONFIG | y| y | y
>SND_HDA_CODEC_REALTEK | m | m | y
>SND_HDA_GENERIC   | m | m | y
>SND_HDA_CORE| m | m | y
>SND_SPI | y | n | absent

Looks ok.

[..]
>So, it seems that at least the configuration for kernel 5.4.64 should
>work. However, it does not.

Try this in /etc/modprobe.d/alsa.conf (or some file there):


alias char-major-116 snd
alias snd-card-0 snd-hda-intel
options snd-hda-intel model=auto


HTH,
-dnh

-- 
"Getting a penguin to pee on demand is _messy_."  -- Linus Torvalds



Re: [gentoo-user] No sound. Please, help!

2020-10-17 Thread David Haller
Hello,

On Sat, 17 Oct 2020, gevisz wrote:
[.. reordering ..]
>And finally: installed on the same computer legacy operating system
>never had any sound problems.

Ah, oh, so the HW works and you got the speaker connector in the
hole. That's good![1] ;)

>At different times during the last one and a half years, I tried to
>make sound work on my new Gentoo install on a computer with Gigabyte
>GA-MA790FXT-UD5P motherboard and MSI ATI Radeon R4770 graphic card.

Ok, that board should be rather closeish to mine (GA-MA770TA-UD3.
Might use a different soundchip though, but those should work
automatically.

[..]
>lspci | grep "Audio"
>00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00
>Azalia (Intel HDA)
>01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] RV710/730
>HDMI Audio [Radeon HD 4000 series]

Simliar here, but it'd be interesting, what actual device is that
onboard sound, here it's:

$ /sbin/lspci -nn | grep Audio
00:14.2 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 
Azalia (Intel HDA) [1002:4383]
[plus the HDMI of the video card]

According to the MoBo manual, it's a Realtek ALC888 codec.

>My current kernel configuration is exactly the same as in the
>gentoo-kernel-5.4.64 package as I have not changed anything there.

This works here:

CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_HWDEP=m
CONFIG_SND_DRIVERS=y
CONFIG_SND_PCI=y

CONFIG_SND_HDA=m
CONFIG_SND_HDA_INTEL=m
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_CODEC_REALTEK=m
CONFIG_SND_HDA_GENERIC=m
CONFIG_SND_HDA_CORE=m
CONFIG_SND_SPI=y

Not sure if CONFIG_SND_SPI and CONFIG_SND_HDA_GENERIC are needed, but
the other ones seem crucial.

Oh, the above is for a 4.14 kernel, but has been the same for a looong
time now.

HTH,
-dnh

[1] happend to me a few days ago when I, after a long time again, un-
and then wrongly replugged the speaker on my MoBo ;)

-- 
WoKo ist so etwas, wie eine seltsame Schleife. Wenn zwei von ihnen zusammen-
kommen, erklären sie sich gegenseitig für nichtexistent und löschen sich auf
diese Weise aus. Zum Schluß wird einer übrigbleiben. Und den können wir dann
ganz leicht am nächsten Baum aufknüpfen...  [Daniel Reutter in dag°]



Re: [gentoo-user] [OT] .fetchmailrc syntax error

2020-10-15 Thread David Haller
Hello,

On Wed, 14 Oct 2020, Walter Dnes wrote:
>[i3][waltdnes][~] fetchmail 
>fetchmail:/home/waltdnes/.fetchmailrc:1: syntax error at option
>
>  Anybody have this working?  The following was pulled by getmail as
>"SimpleSSLretriever" on port 995.  Here's what I'm trying that's
>failing...
>
>poll mail.##.com protocol pop3 with option sslproto '':
 ^^ that should be
 'options'.

And you _should_ use TLS, IMHO! E.g.: sslproto 'TLS1.3+'

See 'man fetchmail', search for '\-\-sslproto'.

HTH,
-dnh

-- 
/* When we have more time, we can teach the penguin to say 
 * "By your command" or "Activating turbo boost, Michael".
 */
linux-2.2.16/arch/sparc/prom/sun4prom.c



Re: [gentoo-user] Dolphin, CPU usage and process ID to which window.

2020-09-08 Thread David Haller
Hello,

On Mon, 07 Sep 2020, Dale wrote:
>Another question.  I use top to see what is using the CPU so much.  When
>it is Dolphin, I can't tell which window it is.  I sometimes have a few
[..]
>Is there a way to figure
>out which process goes with which window or running instance of
>Dolphin?  In top, it shows a ID number like this.
>
>16577 dale  20   0  986256 160680  79288 S   2.8   0.5  25:56.63
>/usr/bin/dolphin -session
>10c8caded100015521120210315890017_1597693134_23929
>
>Is there a way to know what window that ID belongs too? 

 switch_to_pid_win.sh 
#!/bin/sh
pid="$1"
window_id=$(wmctrl -p -l -x | awk -vPID="$pid" '$3 == PID { printf("%s", $1); 
}')
wmctrl -i -a "$window_id"


$ switch_to_pid_win.sh PID_OF_OFFENDING_PROCESS

e.g.

$ switch_to_pid_win.sh 16577

HTH,
-dnh

-- 
panic("esp_handle: current_SC == penguin within interrupt!");
linux-2.2.16/drivers/scsi/esp.c



Re: [gentoo-user] Python 2.7 removal : problem with Firefox + Spidermonkey

2020-08-02 Thread David Haller
Hello,

On Sat, 01 Aug 2020, james wrote:
>On 8/1/20 7:04 PM, David Haller wrote:
>> On Sat, 01 Aug 2020, Walter Dnes wrote:
>> [..]
>> >   So a "palemoon-bin" ebuild is possible.
>> 
>> There's already one in the palemoon overlay.
>
>This is what you are referring to?
>
>www-client/palemoon-bin [2]
>Available versions:  28.11.0^ms {startup-notification}
> Homepage:https://www.palemoon.org/
>
>[2] "palemoon" /var/lib/layman/palemoon

If your palemoon is the one "in" layman and refers to

sync-uri = https://github.com/deu/palemoon-overlay.git

then yes. 

-dnh

-- 
   "Now, what was I doing before I so rudely interrupted myself?" 



Re: [gentoo-user] Python 2.7 removal : problem with Firefox + Spidermonkey

2020-08-01 Thread David Haller
Hello,

On Sat, 01 Aug 2020, Walter Dnes wrote:
[..]
>  So a "palemoon-bin" ebuild is possible.

There's already one in the palemoon overlay.

-dnh

-- 
"If Pacman had affected us as kids we'd be running around in dark rooms,
 munching pills and listening to repetitive music."  -- Marcus Brigstocke



Re: [gentoo-user] Strange output when restarting network. Long term issue.

2020-07-23 Thread David Haller
Hello,

On Thu, 23 Jul 2020, Ashley Dixon wrote:
[..]
>[super] root@ad-gentoo-main / # etc/init.d/net.eno1 restart
[..]
>forked to background, child pid 14536
 
[..]

It's just output from backgrounded processes. Just ignore it or enter
Ctrl-C to get a fresh prompt. Using enter is not recommended.

Compare running:

{ echo "start"; sleep 2; echo "done" ; } &

HTH,
-dnh

-- 
My word processor was written by Stanford Professor Donald Knuth.  Who
wrote yours?



Re: [gentoo-user] binary packages: how to ...

2020-07-15 Thread David Haller
Hello,

On Wed, 15 Jul 2020, Matt Connell (Gmail) wrote:
>It seems that in order to un-rar something in a fully free-software-
>compatible way, I believe options are limited to using a programming
>language library.  dev-python/rarfile is available under the ISC
>license, which is listed as GPL compatible.

 dev-python/rarfile/rarfile-3.1.ebuild 
RDEPEND="compressed? ( || ( app-arch/unrar app-arch/rar ) )"


-dnh

-- 
Microsoft DNS service terminates abnormally when it recieves a response
to a DNS query that was never made.  Fix Information: Run your DNS
service on a different platform.-- bugtraq



Re: [gentoo-user] Testing a used hard drive to make SURE it is good.

2020-06-22 Thread David Haller
Hello,

On Mon, 22 Jun 2020, Dale wrote:
>David Haller wrote:
>> On Thu, 18 Jun 2020, Dale wrote:
>>> David Haller wrote:
[..]
>>>> ./ones | dd of=/dev/null bs=8M count=1000 iflag=fullblock
>> [..]
>>> I got it to compile, at least it created a file named ones anyway.  What
>>> I'm unclear about, where is the if= for dd in the command?  All the
>>> commands I've seen before has a if= and a of=.  The if for input and of
>>> for output or target.
>>  man 1 dd 
>>if=FILE
>>   read from FILE instead of stdin
>> [..]
>>of=FILE
>>   write to FILE instead of stdout
>> 
>>
>> note the stuff after 'instead' ;)
>
>So it is piped in with the | thingy?  Got it. 

Exactly. Hm. Maybe 'dev_one' might be a better name for the program...
Or something ;)

[..]
>Thanks much.

You're welcome.

-dnh

-- 
/* When we have more time, we can teach the penguin to say 
 * "By your command" or "Activating turbo boost, Michael".
 */
linux-2.2.16/arch/sparc/prom/sun4prom.c



Re: [gentoo-user] Testing a used hard drive to make SURE it is good.

2020-06-22 Thread David Haller
Hello,

On Thu, 18 Jun 2020, Dale wrote:
>David Haller wrote:
[..]
>> Compile with:
>> gcc $CFLAGS -o ones ones.c
>> or
>> gcc $(portageq envvar CFLAGS) -o ones ones.c
>>
>> and use/test e.g. like
>>
>> ./ones | dd of=/dev/null bs=8M count=1000 iflag=fullblock
[..]
>I got it to compile, at least it created a file named ones anyway.  What
>I'm unclear about, where is the if= for dd in the command?  All the
>commands I've seen before has a if= and a of=.  The if for input and of
>for output or target.

 man 1 dd 
   if=FILE
  read from FILE instead of stdin
[..]
   of=FILE
  write to FILE instead of stdout


note the stuff after 'instead' ;)

>I'm assuming that if I want to target sdb, I'd
>replace null with /dev/sdb. 

Yes.

>As I've posted before, even my scripting skills are minimal.  Surprised
>I got it to compile even.

Well, you could copy & paste and on gentoo, there is bound to be a
'gcc' ;)

>something.  I placed all this in the /root directory.  I'm assuming I
>can copy paste the commands above while in /root to make it work?

Yes. Or put 'ones' in /root/bin/ or even /usr/local/bin. Depending on
if you expect to use the program later on. But if it's just for this
once it's fine in /root/ alongside the sourcecode.

HTH,
-dnh

-- 
BUGS
   It is not yet possible to change operating system by writ­
   ing to /proc/sys/kernel/ostype. -- Linux sysctl(2) manpage



Re: [gentoo-user] old kernel on Gentoo

2020-06-17 Thread David Haller
Hello,

On Wed, 17 Jun 2020, Raffaele BELARDI wrote:
>I might need to build and run an old 3.x kernel on a Desktop PC for
>some very specific tests. Would Gentoo be a good solution? I see that
>currently gentoo-sources only includes 4.x and 5.x sources.

You might try sys-kernel/vanilla-sources-3.16.85.

-dnh

-- 
  I distinctly remember forgetting that. -Clara Barton



Re: [gentoo-user] Testing a used hard drive to make SURE it is good.

2020-06-17 Thread David Haller
Hello,

On Tue, 16 Jun 2020, Dale wrote:
[..]
>For the /dev/one, I found some which seems to work.  They listed further
>down.  I think my google search terms was poor.  Google doesn't have ESP
>for sure.  O_o
[..]
>dd if=<(yes $'\xFF' | tr -d "\n") of=

This is correct but _much_ slower than my program. I get about
1.1-1.2GB/s with that and with that 'yes' I get only about 47 MB/s...

>root@fireball / # cat /root/freq-commands | grep man
>print man pages to text file
>man  | col -b > /home/dale/Desktop/smartctl.txt
>print man pages to .pdf but has small text.
>man -t  > /home/dale/Desktop/smartctl.pdf

$ man -l -Tps -P-pa4 $(man -w smartctl ) | ps2pdf - smartctl.pdf

Use e.g. '-P-pletter' for letter paper size.

>It's amazing sometimes how wanting to do one thing, leads to learning
>how to do many other things, well, trying to learn how anyway.  LOL 

*g*

-dnh

-- 
I have described my half-hearted attempts at housekeeping as "the
minimual effort required to prevent the fungus from achieving
sentience."  -- Steve VanDevender



Re: [gentoo-user] Testing a used hard drive to make SURE it is good.

2020-06-15 Thread David Haller
Hello,

On Mon, 15 Jun 2020, Dale wrote:
[..]
>While I'm at it, when running dd, I have zero and random in /dev.  Where
>does a person obtain a one?  In other words, I can write all zeros, I
>can write all random but I can't write all ones since it isn't in /dev. 
>Does that even exist?  Can I create it myself somehow?  Can I download
>it or install it somehow?  I been curious about that for a good long
>while now.  I just never remember to ask. 

I've wondered that too. So I just hacked one up just now.

 ones.c 
#include 
#include 
#include 
static unsigned int buf[BUFSIZ];
int main(void) {
unsigned int i;
for(i = 0; i < BUFSIZ; i++) { buf[i] = (unsigned int)-1; }
while( write(STDOUT_FILENO, buf, sizeof(buf)) );
exit(0);
}


Compile with:
gcc $CFLAGS -o ones ones.c
or
gcc $(portageq envvar CFLAGS) -o ones ones.c

and use/test e.g. like

./ones | dd of=/dev/null bs=8M count=1000 iflag=fullblock

Here, it's about as fast as

cat /dev/zero | dd of=/dev/null bs=8M count=1000 iflag=fullblock

(but only about ~25% as fast as 
dd if=/dev/zero of=/dev/null bs=8M count=1000 iflag=fullblock
for whatever reason ever, but the implementation of /dev/zero is
non-trivial ...)

HTH,
-dnh

-- 
Computers make very fast, very accurate mistakes.



Re: [gentoo-user] [OT] splitting audio file at points of silence ?

2020-06-14 Thread David Haller
Hello,

On Sun, 14 Jun 2020, tu...@posteo.de wrote:
>I want to split an audio file containing crow calls at points
>where no crow call is. The "silence" in between is not exactly
>"silence" but some low level noise.
>
>Searching the internet for "split audio at silence" and similiar
>gives me this link
>https://unix.stackexchange.com/questions/318164/sox-split-audio-on-silence-but-keep-silence
>
>which uses a program called "silence" to detect the silence.
>
>Unfortunately I can't figure out, what package contains that program
>or from where I can download that program.

You need 'media-sound/sox' and then use the silence effect. Note that
it is _one_ command on _one_line in that answer on stackexchange

sox -V3 audiobook.mp3 audiobook_part_.mp3 silence \
1 0.5 0.1% 1 0.5 0.1% : newfile : restart

See 'man 7 soxeffect'

HTH,
-dnh

-- 
Ich glaube aber nicht, dass der DDR Ram hat. Er hat seinen Rechner doch erst
vor einem Jahr gekauft! Die werden Ihm da doch nicht uralt-Speicherbausteine
hereingesteckt haben. Maximal kann er also "Ex-DDR"-Speicher haben (Sprich
Infineon, denn die Produzieren ja auch in Dresden ...).-- Konrad Neitzel



Re: [gentoo-user] Got a json file from YouTube...

2020-06-05 Thread David Haller
Hello,

On Fri, 05 Jun 2020, tu...@posteo.de wrote:
>Is there something in portage, which is recommended to 
>reformat/display this json-input into something more 
>readable...?

json_pp from dev-lang/perl which you should already have
installed ;) Example usage:

$ json_pp < some.json | less

HTH,
-dnh

-- 
A mouse is a device used to focus xterms.



Re: [gentoo-user] Screenrecording with audio from firefox

2020-06-03 Thread David Haller
Hello,

On Wed, 03 Jun 2020, David Haller wrote:
[..]
>1. create a file /etc/portage/env/missing-qpainterpath-flags and insert
>  this line:
>
>
>CXXFLAGS="${CXXFLAGS} -include QPainterPath"
>
>
>2. add the line
>
>
>=media-sound/cadence-0.9.0-r4   missing-qpainterpath-flags
>
>
>to /etc/portage/package.env (or /e/p/package.env/qpainterpath.env or
>some such if you've "directoryfied" your package.env (can you?) ;)
[..]

*Whoa*

I just remembered, that I tested back on 5.14.2[1], but, I just
re-emerged qtcore-5.15, qtwidgets-5.15 and qtgui-5.15 (which is all
cadence needs) and qtsvg-5.15 (for qt5ct that is called when running
stuff) and my hack still worked, i.e. it compiles fine and
cadence-xycontroller even runs (which is where that pixmapdial.cpp
ends up in) ;)

HTH,
-dnh

[1] there was some major other showstopper for me with 5.15

-- 
Well, I do {cough} have to admit to having forsaken ed(1) in favour of
a certain graphical user interface named after the Roman number after 5.
   -- Anthony de Boer



Re: [gentoo-user] cmake 3.16.5 Segmentation Violation

2020-06-03 Thread David Haller
Hello,

On Wed, 03 Jun 2020, tedheadster wrote:
>I am getting a segmentation violation when running a recompiled
>'cmake'. I rebuilt with debugging symbols; here are the results:
>
>/var/tmp/portage/dev-util/cmake-3.16.5/image/usr/bin # gdb ./cmake
[..]
>Program received signal SIGSEGV, Segmentation fault.
>0xb7de7296 in uv_loop_close (loop=0x0) at
   
>/usr/src/debug/dev-libs/libuv-1.35.0/libuv-1.35.0/src/uv-common.c:757
^^
>757   if (uv__has_active_reqs(loop))
>(gdb) up
>#1  0x0053fab4 in main (ac=, av=0xb09a60)
>at 
> /var/tmp/portage/dev-util/cmake-3.16.5/work/cmake-3.16.5/Source/cmakemain.cxx:706
>706   uv_loop_close(uv_default_loop());
>(gdb) up

Try re-emerging dev-libs/libuv?

HTH,
-dnh

-- 
Connection reset by beer



Re: [gentoo-user] Screenrecording with audio from firefox

2020-06-03 Thread David Haller
Hello,

On Wed, 03 Jun 2020, tu...@posteo.de wrote:
>In file included from /usr/include/qt5/QtCore/qhashfunctions.h:44,
> from /usr/include/qt5/QtCore/qlist.h:47,
> from /usr/include/qt5/QtCore/qstringlist.h:41,
> from /usr/include/qt5/QtGui/qcolor.h:46,
> from /usr/include/qt5/QtGui/qpixmap.h:45,
> from /usr/include/qt5/QtGui/QPixmap:1,
> from ../widgets/pixmapdial.hpp:21,
> from ../widgets/pixmapdial.cpp:18:
>/usr/include/qt5/QtCore/qstring.h:393:14: note: declared here
>  393 | QString (const char *format, ...) 
> Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
>  |  ^~~
>../widgets/pixmapdial.cpp: In member function 'virtual void 
>PixmapDial::paintEvent(QPaintEvent*)':
>../widgets/pixmapdial.cpp:231:26: error: aggregate 'QPainterPath ballPath' has 
>incomplete type and cannot be defined
>  231 | QPainterPath ballPath;
>  |  ^~~~

I think something similar was on this list a couple of days ago, it's
a missing include (that wasn't neccessary before Qt5.15), there's 21
similar bugs filed already c.f.[1].

A quick and easy fix for this problem should be this:

1. create a file /etc/portage/env/missing-qpainterpath-flags and insert
  this line:


CXXFLAGS="${CXXFLAGS} -include QPainterPath"


2. add the line


=media-sound/cadence-0.9.0-r4   missing-qpainterpath-flags


to /etc/portage/package.env (or /e/p/package.env/qpainterpath.env or
some such if you've "directoryfied" your package.env (can you?) ;)

[add more lines for specific package versions and revs for the same
problem, see [1] for candidates]

Yes, that is *quite an ugly hack*, but could be handy while stuff get's
patched to work with that specific change of Qt5.15...

FWIW: that includes that QPainterPath header in _all_ C++ sources, but
what the hey, compilers are so good today, that they throw away
anything unused, so it should not matter. It'll slow down the compile
a bit...

Once e.g. media-sound/cadence is fixed and revbumped/versionbumped,
delete that line from package.env.

It works here for a quick:


# ebuild cadence-0.9.0-r4.ebuid compile
[..]
c++ -c ../widgets/pixmapdial.cpp -O3 -ffast-math -mtune=generic -msse
-mfpmath=sse -Wall -Wextra -DNDEBUG -fPIC -std=c++0x  -pipe -O3
-march=native -mtune=native
[..]
-std=gnu++14  -include QPainterPath -DQT_NO_DEBUG -DQT_NO_DEBUG_STREAM
-DQT_NO_DEBUG_OUTPUT -I../widgets -I/usr/include/qt5/QtCore
-I/usr/include/qt5 -I/usr/include/qt5/QtGui -DQT_WIDGETS_LIB
-I/usr/include/qt5/QtWidgets -DQT_GUI_LIB -DQT_CORE_LIB  -o
../widgets/pixmapdial.o
c++ -c ../widgets/pixmapkeyboard.cpp [..]
[..]
>>> Source compiled.


HTH,
-dnh, tending to be very pragmatic in cases like this ;)

[1] 
https://bugs.gentoo.org/buglist.cgi?bug_status=UNCONFIRMED_status=CONFIRMED_status=IN_PROGRESS_status=RESOLVED_status=VERIFIED=OP=OP=alias=short_desc=CP=CP=OR=substring=substring=bug_id

-- 
"Humans need fantasy .. to *be* human" -- Death (in Hogfather)



Re: [gentoo-user] Seagate ST8000NM0065 PMR or SMR plus NAS SAS SATA question

2020-05-24 Thread David Haller
Hello,

On Sat, 23 May 2020, John Covici wrote:
>On Sat, 23 May 2020 11:39:40 -0400, David Haller wrote:
>> WD Red WD*EFRX are PMR.
>> WD Red WD*EFAX are SMR (AFAIK, could be, that some are PMR).
>> 
>> ISTR, that the "Red Pro" are all PMR (so far).
>
>How about WD4001FFSX-68JNUN0? I hope its pmr.

That's a "Red Pro" ...

-dnh

-- 
There are some people who clearly shouldn't be put in charge of
any office-equipment more technical than a blunt finger dipped
in water-soluble ink.-- Tanuki



Re: [gentoo-user] Seagate ST8000NM0065 PMR or SMR plus NAS SAS SATA question

2020-05-23 Thread David Haller
Hello,

On Sat, 23 May 2020, Michael wrote:
>On Saturday, 23 May 2020 00:31:48 BST Rich Freeman wrote:
>> On Fri, May 22, 2020 at 5:40 PM antlists  wrote:
>> > On 22/05/2020 19:23, Rich Freeman wrote:
>> > > A big problem with drive-managed SMR is that it basically has to
>> > > assume the OS is dumb, which means most writes are in-place with no
>> > > trims, assuming the drive even supports trim.
>> > 
>> > I think the problem with the current WD Reds is, in part, that the ATA-4
>> > spec is required to support trim, but the ATA-3 spec is the current
>> > version. Whoops ...
>> 
>> Probably was thought up by the same genius who added the 3.3V reset
>> pin to the SATA standard.
>
>Is there a way to determine if a drive on sale is SMR *before*
>purchase?

WD Red WD*EFRX are PMR.
WD Red WD*EFAX are SMR (AFAIK, could be, that some are PMR).

ISTR, that the "Red Pro" are all PMR (so far).

HTH,
-dnh

-- 
If I wanted to point and drool, I'd go to a Chippendales show.
  -- Leigh Metcalf



Re: [gentoo-user] Seagate ST8000NM0065 PMR or SMR plus NAS SAS SATA question

2020-05-23 Thread David Haller
Hello,

On Fri, 22 May 2020, antlists wrote:
>On 22/05/2020 19:23, Rich Freeman wrote:
>> A big problem with drive-managed SMR is that it basically has to
>> assume the OS is dumb, which means most writes are in-place with no
>> trims, assuming the drive even supports trim.
>
>I think the problem with the current WD Reds is, in part, that the ATA-4 spec
>is required to support trim, but the ATA-3 spec is the current version.
>Whoops ...

ATA-8 is the current spec. Though practically unused. The used spec is
ATA-7 in virtually all drives for IIRC the last 10ish years or so.

Did you mean SATA specs? Well, then there's only SATA-1 (1.5GBit/s),
SATA-2, (3.0GBit/s) and SATA-3 (6.0GBit/s), and of the latter SATA
revision 3.1 introduced TRIM[2]. Oh, and rev. 3.3 introduced some
extras for SMR [3].

HTH,
-dnh

[1] https://en.wikipedia.org/wiki/Parallel_ATA
[2] 
https://en.wikipedia.org/wiki/Serial_ATA#SATA_revision_3.0_(6_Gbit/s,_600_MB/s,_Serial_ATA-600)
[3] https://en.wikipedia.org/wiki/Serial_ATA#SATA_revision_3.3

-- 
The nice thing about Windows is - It does not just crash, it displays a
dialog box and lets you press 'OK' first.   (Arno Schaefer's .sig)



Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread David Haller
Hello,

On Mon, 13 Apr 2020, Rich Freeman wrote:
>So, "trimming" isn't something a drive does really.  It is a logical
>command issued to the drive.
>
>The fundamental operations the drive does at the physical layer are:
>1. Read a block
>2. Write a block that is empty
>3. Erase a large group of blocks to make them empty
[..]
>Now, in this hypothetical case here is how the drive handles a TRIM
>command.  If it gets the logical instruction "TRIM block 1" what it
>does is:
>
>1. Look at the mapping table to determine that logical block 1 is at
>physical block 123001.
>2. Mark physical block 123001 as unused-but-dirty in the mapping table.
>
>That's all it does.  There are four ways that a drive can get marked
>as unused on an SSD:
>1. Out of the box all blocks are unused-but-clean.  (costs no
>operations that you care about)
>2. The trim command marks a block as unused-but-dirty. (costs no operations)
>3. Block overwrites mark the old block as unused-but-dirty. (costs a
>write operation, but you were writing data anyway)
>4. Task 2 can mark blocks as unused-but-dirty. (costs a bunch of reads
>and writes)
>
>Basically the goal of TRIM is to do more of #2 and less of #4 above,
>which is an expensive read-write defragmentation process.  Plus #4
>also increases drive wear since it involves copying data.

Beautifully summarized Rich! But I'd like to add two little aspects:

First of all: "physical write blocks" in the physical flash are 128kB
or something in that size range, not 4kB or even 512B ... Haven't
read, but looking enticing neither

https://en.wikipedia.org/wiki/Write_amplification

nor

https://en.wikipedia.org/wiki/Trim_(computing)

I hope they cover it ;)

Anyway, a write to a single (used) logical 512B block
involves:

1. read existing data of the phy-block-group (e.g. 128KB)
2. write data of logical block to the right spot of in-mem block-group
3. write in-mem block-group to (a different, unused) phy-block-group
4. update all logical block pointers to new phy-block-group as needed
5. mark old phy-block-group as unused

And whatnot.

And second: fstrim just makes the OS (via the Filesystem driver via
the SATA/NVME/SCSI driver through some hoops), or the Filesystem when
mounted with 'discard' via the drivers, tell the SSD one simple thing
about logical blocks that a deleted file used to use (in the TRIM
ATA/SCSI/SATA/NVME command, wikipedite for where TRIM is specced ;):

"Hey, SSD, here's a list of LBAs (logical blocks) I no longer need.
You may hencewith treat them as empty/unused."

Without it, the SSD has no idea about those blocks being unneeded and
treats blocks, once written to, as used blocks, doing the _tedious_
Copy-on-Write when a write hits one of those logical blocks, even if
those were deleted on the filesystem level years ago... see above WP
articles. Without TRIM, the SSD only gets to know the fact, when the
driver (the FS) writes again to the same logical block ...

With TRIM, the SSD-Controller knows what logical blocks it can treat
as unused, and do much better wear-leveling. So, it's sort of a
"trickle down 'unlink()' to the SSD"-feature. On the logical-block
level, mind you. But for the SSD, that can be quite a "relief"
regarding space for wear-leveling.

And what takes time when doing a "large" TRIM is transmitting a
_large_ list of blocks to the SSD via the TRIM command. That's why
e.g. those ~6-7GiB trims I did just before (see my other mail) took a
couple of seconds for 13GiB ~ 25M LBAs ~ a whole effin bunch of TRIM
commands (no idea... wait, 1-4kB per TRIM and 4B/LBA is max. 1k
LBAs/TRIM and for 25M LBAs you'll need minimum 25-100k TRIM
commands... go figure ;) no wonder it takes a second or few ;)

Oh, and yes, on rotating rust, all that does not matter. You'd just
let the data rot and write at 512B (or now 4kB) granularity. Well,
those 4k-but-512Bemulated drives (which is about all new ones by now I
think) have to do something like SSDs. But only on the 4kB level. Plus
the SMR shingling stuff of course. When will those implement TRIM?

HTH,
-dnh

-- 
All Hardware Sucks and I do not consider myself to actually have any data
until there's an offsite backup of it. -- Anthony de Boer



Re: [gentoo-user] Understanding fstrim...

2020-04-13 Thread David Haller
Hello,

On Mon, 13 Apr 2020, tu...@posteo.de wrote:
>On 04/13 11:06, Michael wrote:
>> On Monday, 13 April 2020 06:32:37 BST tu...@posteo.de wrote:
[..]
>My question are more driven by curiousty than by anxiety...
[..]
>For example [the fstrim manpage] says:
>"For most desktop and server systems a sufficient trimming frequency  is
>once  a week."
>
>...but why is this ok to do so? Are all PCs made equal? Are all
>use cases are equal? It even does not distinguish between SSD/Sata 
>and SSD/NVMe(M2 in my case).

Observe your use pattern a bit and use 'fstrim -v' when you think it's
worth it, as it basically boils down to how much you delete *when*. If
you e.g.:

- constantly use the drive as a fast cache for video-editing etc.,
  writing large files to the drive and later deleting them again

-> run fstrim daily or even mount with 'discard'-option

- write/delete somewhat regularly, e.g. as a system-drive and running
  updates or emerge @world (esp. if you build on the SSD) e.g. weekly
  they effectively are a write operation and a bunch of deletions. Or
  if you do whatever other deletions somewhat regularly

-> run fstrim after each one or three such deletions, e.g. via
   a weekly cronjob

- mostly write (if anything), rarely delete anything

-> run fstrim manually a few days after $some deletions have
   accumulated or any other convenient time you can remember to
   and are sure all deleted files can be gone, be it bi-weekly,
   monthly, tri-montly, yearly, completly irregularly, whenever ;)

Choose anything in the range that fits _your_ use-pattern best,
considering capacity, free-space (no matter if on a partition or
unallocated) and what size was trimmed when running 'fstrim -v'...

Running that weekly (I'd suggest bi-weekly) 'fstrim' cronjob is not a
bad suggestion as a default I guess, but observe your use and choose
to deviate or not :)

My gut says to run fstrim if:

- it'd trim more than 5% (-ish) capacity
- it'd trim more than 20% (-ish) of the remaining "free" space
  (including unallocated)
- it'd trim more than $n GiB (where $n may be anything ;)

whichever comes first (and the two latter can only be determined by
observation). No need to run fstrim after deleting just 1kiB. Or 1MiB.

Not that me lazybag adheres to that, read on if you will... ;)

FWIW:
I run fstrim a few times a year when I think of it and guesstimate I
did delete quite a bit in the meantime (much like I run fsck ;) ...
This usually trims a few GiB on my 128G drive:

# fdisk -u -l /dev/sda
Disk /dev/sda: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Disk model: SAMSUNG SSD 830 
[..]
Device Boot Start   End   Sectors Size Id Type
/dev/sda12048 109053951 109051904  52G 83 Linux
/dev/sda2   109053952 218105855 109051904  52G 83 Linux

(I did leave ~15GiB unpartitioned, and was too lazy to rectify that
yet, at the time I partitioned in 2012, for many (cheaper?) SSDs that
overprovisioning was still a good thing and 'duh intarweb' was quite
worse than today regarding the problem)...

So while I'm about it, I guess it's time to run fstrim (for the first
time this year IIRC) ...

# fstrim -v /sda1 ; fstrim -v /sda2 ## mountpoints mangled
/sda1: 7563407360 bytes were trimmed
/sda2: 6842478592 bytes were trimmed

# calc 'x=config("display",1); 7563407360/2^30; 6842478592/2^30'
~7.0
~6.4

So, my typical few GiB or about 12.8% disk capacity (summed) were
trimmed (oddly enough, it's always been in this 4-8GiB/partition
range). I probably should run fstrim a bit more often though, but then
again I've still got those unallocated 15G, so I guess I'm fine. And
that's with quite a large Gentoo system on /dev/sda2 and all its at
times large (like libreoffice, firefox, seamonkey, icedtea, etc.)
updates:

# df -h /
Filesystem  Size  Used Avail Use% Mounted on
/dev/sda252G   45G  3.8G  93% /

PORTAGE_TMPDIR, PORTDIR, (and distfiles and packages) are on other
HDDs though, so building stuff does not affect the SSD, only the
actual install (merge) and whatever else. But I've got /var/log/ on
the SSD on both systems (sda1/sda2).

While I'm at it:

# smartctl -A /dev/sda
[..]
ID# ATTRIBUTE_NAME  FLAG VALUE WORST THRESH [..] RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   010[..] 0
  9 Power_On_Hours  0x0032   091   091   000[..] 43261
 12 Power_Cycle_Count   0x0032   097   097   000[..] 2617
177 Wear_Leveling_Count 0x0013   093   093   000[..] 247
179 Used_Rsvd_Blk_Cnt_Tot   0x0013   100   100   010[..] 0
181 Program_Fail_Cnt_Total  0x0032   100   100   010[..] 0
182 Erase_Fail_Count_Total  0x0032   100   100   010[..] 0
183 Runtime_Bad_Block   0x0013   100   100   010[..] 0
187 Uncorrectable_Error_Cnt 0x0032   100   100   000[..] 0
190 Airflow_Temperature_Cel 0x0032   067   050   000[..] 33
195 ECC_Error_Rate  0x001a   200   200   000[..] 0
199 

Re: [gentoo-user] sci-libs/spqr-1.2.3-r1 failed to emerge

2020-04-09 Thread David Haller
Hello,

On Wed, 08 Apr 2020, gevisz wrote:
>I've tried to install julia-1.4.0 but one of its dependencies, namely,
>sci-libs/spqr-1.2.3-r1 failed to emerge with the following error message:
>
>* Failed Running automake !
> *
> * Include in your bugreport the contents of:
> *
> *   /var/tmp/portage/sci-libs/spqr-1.2.3-r1/temp/automake.out

The patch spqr-1.2.3-autotools.patch is broken, it includes two
AM_INIT_AUTOMAKE lines in configure.ac:


[..]
--- configure.ac1969-12-31 19:00:00.0 -0500
+++ configure.ac2009-10-22 23:42:32.0 -0400
@@ -0,0 +1,55 @@
+AC_PREREQ(2.59)
+AC_INIT(spqr, 1.2, da...@cise.ufl.edu)
+AM_INIT_AUTOMAKE([foreign])
+AC_CONFIG_SRCDIR([Source/spqr_kernel.cpp])
+AM_INIT_AUTOMAKE([foreign])
[..]


Deleting the first (and adjusting the patchlength: '@@ -0,0 +1,54 @@')
and it works.

HTH,
-dnh

-- 
> Write the code like you are going to lose your memory in six months.
Most people would say I write code like I've already lost my mind.
Is that the same thing? -- Randal L. Schwartz



Re: [gentoo-user] NVidia-driver, RTX 2060 SUPER. Blender and NO Optix...

2020-04-04 Thread David Haller
Hello,

On Sat, 04 Apr 2020, tu...@posteo.de wrote:
>On 04/04 08:36, David Haller wrote:
[..]
>> Looking at the ebuild, it seems that it only installs libnvoptix when
>> multilib enabled is *and* if it's on amd64:
>> 
>>  x11-drivers/nvidia-drivers/nvidia-drivers-440.64.ebuild 
>> if use kernel_linux && has_multilib_profile && [[ ${ABI} == 
>> "amd64" ]];
>a
>> then
>> NV_GLX_LIBRARIES+=(
>> "libnvidia-cbl.so.${NV_SOVER}"
>> "libnvidia-rtcore.so.${NV_SOVER}"
>> "libnvoptix.so.${NV_SOVER}"
>> )
>> fi
>> 
>> 
>> And that's the only occurrence of optix in the ebuild. In driver,
>> there's only a 64-bit libnvoptix.so.440.64 included, it's missing from
>> the ./32 subfolder, so I guess that optix stuff it's 64bit only.
>> But that dep on has_multilib_profile seems buggish to me. Test /
>> workaround: Just add 'multilib' to your package.use flags of
>> x11-drivers/nvidia-drivers (and _do not set_ e.g. abi_x86_32), just
>> switch on the 'multilib'. If that works and libnvoptix.so is then
>> installed and Blender works with it, I'd say it's a bug that those
>> libs should only be installed with multilib on. My guess is, that the
>> intent and/or right way would be to just omit that multilib dep. Apart
>> from other useflags that could be used. I.e. it should be:
>> 
>> 
>> if use kernel_linux && [[ ${ABI} == "amd64" ]];
>> then
>> NV_GLX_LIBRARIES+=(
>> "libnvidia-cbl.so.${NV_SOVER}"
>> "libnvidia-rtcore.so.${NV_SOVER}"
>> "libnvoptix.so.${NV_SOVER}"
>> )
>> fi
>> 
[..]
>ooouuu...now things are becoming really weird...:

Not really ;)

>After reading your post (thanks for the indepth analysis!!!)m I set this:
>>=x11-drivers/nvidia-drivers-396.24-r2 X static-libs uvm compat driver acpi 
>>multilib
>
>and got this:
>[I] x11-drivers/nvidia-drivers
> Available versions:  (~)304.137-r1(0/304)^md[1] 
> (~)340.107-r2(0/340)^md[1] 340.108(0/340)^mtd (~)375.82-r2(0/375)^md[1] 
> (~)378.13-r5(0/378)^md[1] (~)381.22-r3(0/381)^md[1] 
> (~)384.130-r1(0/384)^md[1] (~)387.34-r1(0/387)^md[1] 
> (~)390.77-r1(0/390)^md[1] (~)390.87(0/390)^md[1] 390.132-r1(0/390)^mtd 
> (~)390.132-r2(0/390)^mtd (~)396.24-r2(0/396)^md[1] 
> (~)396.24.10-r1(0/396.24)^md[1] (~)396.45-r1(0/396)^md[1] 
> (~)396.51-r1(0/396)^md[1] (~)396.51.02(0/396.51)^md[1] (~)396.54(0/396)^md[1] 
> 430.64-r1(0/430)^mtd 435.21-r1(0/435)^mtd 440.64(0/440)^mtd {+X acpi compat 
> +driver gtk3 +kms +libglvnd multilib pax_kernel static-libs +tools uvm 
> wayland ABI_MIPS="n32 n64 o32" ABI_RISCV="lp64 lp64d" ABI_S390="32 64" 
> ABI_X86="32 64 x32" KERNEL="FreeBSD linux"}
> Installed versions:  440.64(0/440)^mtd(09:06:52 AM 04/04/2020)(X acpi 
> compat driver kms libglvnd static-libs tools uvm -gtk3 -multilib -wayland 
> ABI_MIPS="-n32 -n64 -o32" ABI_RISCV="-lp64 -lp64d" ABI_S390="-32 -64" 
> ABI_X86="64 -32 -x32" KERNEL="linux -FreeBSD")
> Homepage:https://www.nvidia.com/
> Description: NVIDIA Accelerated Graphics Driver
>
>...multilib is ignored

Did you reemerge x11-drivers/nvidia-drivers? If so your profile might
have switched if off and then read on ;)

>...because I am on a 64bit-only system???

Possibly, I'm not firm about all that profile stuff. If you've
selected a no-multilib profile (e.g. 
default/linux/amd64/17.1/no-multilib), I guess that -multilib might be
switched off by the profile, even overriding your useflag in
package.use[0].

In that case, try this (create dirs/files as neccessary):

 /etc/portage/profile/package.use.force ===
x11-drivers/nvidia-drivers  multilib


If that does not work, try:

 /etc/portage/profile/package.use.mask ===
x11-drivers/nvidia-drivers  -multilib


(it's a matter of how it's switched off via the profile, AFAIK).

BTW: you do not have to emerge the package to see the effect of those
edits, an 'emerge --pretend ...' will show you if the 'multilib' flag
will be honored or not.

>By the way: For testing purposes, I installed the nvidia-drivers as
>they are provided by nvidia and can activate Optix in blender then.
>I prefer the "G

Re: [gentoo-user] NVidia-driver, RTX 2060 SUPER. Blender and NO Optix...

2020-04-04 Thread David Haller
Hello,

On Sat, 04 Apr 2020, Andrew Udvare wrote:
>> On Apr 4, 2020, at 00:59, Dale  wrote:
>> tu...@posteo.de wrote:
>>> I have discussed this on www.blenderartists.org and they asked
>>> me to ask here to sort out, whether the problem is a Blender-thing,
>>> a Linux-thing or a GENTOO-thing.
>>> 
>>> My setup is as follows:
>>> NVidia RTX 2060 SUPER
>>> 
>>> NVidia-drivers:
>>> [I] x11-drivers/nvidia-drivers
>>> Available versions:  (~)304.137-r1(0/304)^md[1] 
>>> (~)340.107-r2(0/340)^md[1] 340.108(0/340)^mtd (~)375.82-r2(0/375)^md[1] 
>>> (~)378.13-r5(0/378)^md[1] (~)381.22-r3(0/381)^md[1] 
>>> (~)384.130-r1(0/384)^md[1] (~)387.34-r1(0/387)^md[1] 
>>> (~)390.77-r1(0/390)^md[1] (~)390.87(0/390)^md[1] 390.132-r1(0/390)^mtd 
>>> (~)390.132-r2(0/390)^mtd (~)396.24-r2(0/396)^md[1] 
>>> (~)396.24.10-r1(0/396.24)^md[1] (~)396.45-r1(0/396)^md[1] 
>>> (~)396.51-r1(0/396)^md[1] (~)396.51.02(0/396.51)^md[1] 
>>> (~)396.54(0/396)^md[1] 430.64-r1(0/430)^mtd 435.21-r1(0/435)^mtd 
>>> 440.64(0/440)^mtd {+X acpi compat +driver gtk3 +kms +libglvnd multilib 
>>> pax_kernel static-libs +tools uvm wayland ABI_MIPS="n32 n64 o32" 
>>> ABI_RISCV="lp64 lp64d" ABI_S390="32 64" ABI_X86="32 64 x32" KERNEL="FreeBSD 
>>> linux"}
>>> Installed versions:  440.64(0/440)^mtd(03:03:25 AM 04/03/2020)(X driver 
>>> kms libglvnd static-libs tools uvm -acpi -compat -gtk3 -multilib -wayland 
>>> ABI_MIPS="-n32 -n64 -o32" ABI_RISCV="-lp64 -lp64d" ABI_S390="-32 -64" 
>>> ABI_X86="64 -32 -x32" KERNEL="linux -FreeBSD")
>>> Homepage:https://www.nvidia.com/
>>> Description: NVIDIA Accelerated Graphics Driver
>>> 
>>> Blender 2.82a (stable) and
>>> Blender 2.83  (deveoper build)
>>> 
>>> The NVidia RTX-cards offer a new feature called "Optix" which blender
>>> can use to speed up rendering and denoising.
>>> 
>>> When Blender is started one choose "Optix" from the user
>>> Preferences->System tab and then the Optix-enabled devices of the
>>> system in question are shown.
>>> There is a similiar tab, if you want to use CUDA instead.
>>> 
>>> The CUDA tab shows my graphics card and everything behaves as
>>> exsoected. Choosing "Optix" instead says "No Optix enabled
>>> device".
>>> 
>>> Which is not quite right, since the RTX-cards are Optix enabled.
>
>I suggest filing a bug about this regarding the nvidia-drivers
>package. It's possible it's not installing the necessary files.

Looking at the ebuild, it seems that it only installs libnvoptix when
multilib enabled is *and* if it's on amd64:

 x11-drivers/nvidia-drivers/nvidia-drivers-440.64.ebuild 
if use kernel_linux && has_multilib_profile && [[ ${ABI} == 
"amd64" ]];
then
NV_GLX_LIBRARIES+=(
"libnvidia-cbl.so.${NV_SOVER}"
"libnvidia-rtcore.so.${NV_SOVER}"
"libnvoptix.so.${NV_SOVER}"
)
fi


And that's the only occurrence of optix in the ebuild. In driver,
there's only a 64-bit libnvoptix.so.440.64 included, it's missing from
the ./32 subfolder, so I guess that optix stuff it's 64bit only.
But that dep on has_multilib_profile seems buggish to me. Test /
workaround: Just add 'multilib' to your package.use flags of
x11-drivers/nvidia-drivers (and _do not set_ e.g. abi_x86_32), just
switch on the 'multilib'. If that works and libnvoptix.so is then
installed and Blender works with it, I'd say it's a bug that those
libs should only be installed with multilib on. My guess is, that the
intent and/or right way would be to just omit that multilib dep. Apart
from other useflags that could be used. I.e. it should be:


if use kernel_linux && [[ ${ABI} == "amd64" ]];
then
NV_GLX_LIBRARIES+=(
"libnvidia-cbl.so.${NV_SOVER}"
"libnvidia-rtcore.so.${NV_SOVER}"
"libnvoptix.so.${NV_SOVER}"
)
fi


HTH,
-dnh

-- 
printk(KERN_ERR "msp3400: chip reset failed, penguin on i2c bus?\n");
linux-2.2.16/drivers/char/msp3400.c



Re: [gentoo-user] SDD strategies...

2020-03-21 Thread David Haller
Hello,

On Sat, 21 Mar 2020, Marc Joliet wrote:
>Am Mittwoch, 18. März 2020, 16:56:52 CET schrieb antlists:
[..]
>> Can't remember where it was - some mag ran a stress-test on a bunch of
>> SSDs and they massively outlived their rated lives ... I think even the
>> first to fail survived about 18months of continuous hammering - and I
>> mean hammering!
>
>The German c't magazine did a similar test of various SSDs from
>different 

I mentioned that in the other thread ("SDD, what features..."), I plan
to sum up the articles tomorrow. I'd guess he means that test ;)

>price categories, and they all showed the same result (I think some exceeded 
>their lifetime by more than a factor of two, and the minimum was something 
>like 1.5).

If you mean TBW by "lifetime": All above factor 2, best: over 18. Ok,
those were the "brand models" (1 Crucial, 1 OCZ (Toshiba), 2 Samsung
and 2 Sandisk, and 2 drives of each model)...

Fun fact: one of the test PCs died and killed two of the 3 remaining
SSDs, the second Sandisk Extreme Pro (the first had died already) and
the first Samsung 850 Pro. The remaining second Samsung 850 Pro in the
other Test-PC was still being hammered 4.5 months later with 8 PeBi
written (all drives were 240/256 GB), but showing first "Uncorrectable
Errors" via SMART.

The test also included the failure mode as well, e.g. "dead as a
brick" in a moment, warning signs via SMART, failure to write but
still readable etc.

The mag followed that up with a test of el-cheapo SSDs ... which I'll
include in my summary.

-dnh

-- 
| Ceci n'est pas une pipe



Re: [gentoo-user] Re: SDD, what features to look for and what to avoid.

2020-03-18 Thread David Haller
Hello, an addendum without digging up the details ...

On Tue, 17 Mar 2020, David Haller wrote:
>On Tue, 17 Mar 2020, Grant Edwards wrote:
>>I've put five Samsung SATA drives into various things in the past few
>>years with flawless results.  Samsung is one of the big manufacturers
>>of flash chips, so I figure they should always end up with 1st choice
>>quality chips in their own drives...
>
>And they produce and use their own controllers, so they additionally
>know the ins and outs of those, i.e. they can easily optimize the
>whole SSD from Flash-Chip over controller up to the firmware...
[..]
>AFAIgathered, Samsung is the only one producing the whole product.

I guess Intel did (still does?) that too, but you'll have to check
that, ISTR that Intel now sells SSDs with non-Intel controllers and/or
non-Intel/"IM-Flash" flash-chips... Oh, wait, yes, Intel still does,
but those "pure Intel" SSDs come with a *very* hefty price (like 4
times as much) and all the "normal" priced ones are those with either
and/or non Intel flash-chips and/or -controllers... But please go
check that yourselves though!

The second thing I remembered: the german "c't"[2] magazine did a
torture test in late 2018 (IIRC), basically grabbing a few then
current SSDs and run their own testtool[1] on them until they died. Or
so was the plan. That was a "write till it dies" test.

First of all: all SSD exceeded their specs, some IIRC just barely. The
bulk by a factor of 2 or more. ISTR some of those "just barely", but
wont name them without digging out the actual results, which I'll do
upon requests.

The test had one problem though: a (IIRC) Samsung 850 Pro just refused
to die ;) They aborted the test after something like over 4 months
(all other drives had died inside of about a month) of _continous_
writes (or write-verify cycles) to that one remaining SSD, which was
still happily chugging along...

I do remember though, that even the Samsung EVO came out at the top of
the bunch

(Note: c't does not award a "test-winner" or anything. Just data and
an conclusion aka "Fazit", the reader has to digest the data and make
up his own mind for _her/his_ own usecase).

All IIRC, I can dig out and translate the details though! (and it's
month's later followup on what became of that Samsung ;)

HTH, and please do PM (no need to clog the ML) if you want me to go
digging for the details,
-dnh

[1] which name escapes me ATM, but tried and tested since 199[0-5] or
so ;)

[2] https://en.wikipedia.org/wiki/C%27t (that page is sadly woefully
outdated)

-- 
"If you are using an Macintosh e-mail program that is not from Microsoft,
we recommend checking with that particular company. But most likely other
e-mail programs like Eudora are not designed to enable virus replication"
 -- http://www.microsoft.com/mac/products/office/2001/virus_alert.asp



Re: [gentoo-user] Re: SDD, what features to look for and what to avoid.

2020-03-17 Thread David Haller
Hello,

On Tue, 17 Mar 2020, Grant Edwards wrote:
>I've put five Samsung SATA drives into various things in the past few
>years with flawless results.  Samsung is one of the big manufacturers
>of flash chips, so I figure they should always end up with 1st choice
>quality chips in their own drives...

And they produce and use their own controllers, so they additionally
know the ins and outs of those, i.e. they can easily optimize the
whole SSD from Flash-Chip over controller up to the firmware...

Dunno if the same is true for Micron+Intel (IM Flash) / Crucial. Seems
no, as e.g. the Crucial MX500 uses a Silicon Motion controller, even
though Micron does (or did) produce controllers. Nor does WD, it seems.

AFAIgathered, Samsung is the only one producing the whole product.
Albeit, I heard rumours, that the various divisions of Samsung could
as well be different manufacturers[1], but how far apart the
Flash/Controller/SSD parts I have not an inkling ;)

HTH,
-dnh

[1] well, considering that includes washing-machines, ships and
whatnot ... ;)

-- 
May I ask a question?



Re: [gentoo-user] SDD strategies...

2020-03-17 Thread David Haller
Hello,

On Tue, 17 Mar 2020, Neil Bothwick wrote:
>On Tue, 17 Mar 2020 10:43:58 +0100, Andrea Conti wrote:
>> >> The SSD is currently reporting 98% of its rated life left: I feel
>> >> quite confident it's going to outlast the laptop's useful life.  
>> > What are you using to get that niformation?  
>> 
>> smartctl -A /dev/sdX
>
>83% after five years of recompiling LO and Chromium, not bad :)

# smartctl -a /dev/sda
Device Model: SAMSUNG SSD 830 Series
User Capacity:128,035,676,160 bytes [128 GB]
Sector Size:  512 bytes logical/physical
[..]
  9 Power_On_Hours  0x0032   091   091   000Old_age   Always   
-   42855
177 Wear_Leveling_Count 0x0013   093   093   000Pre-fail  Always   
-   245
241 Total_LBAs_Written  0x0032   099   099   000Old_age   Always   
-   12835630376

[9 would be ~4.9 years nonstop, 241 is almost 6TiB written, or about
50ish full drive writes]

That's been running here since Jul 2012, but I tried to reduce
unnecessary writes to it. I did use it for PORTAGE_TMPDIR for a while
but that rather quickly reduces the wear leveling from 96 to the
current 93.

HTH,
-dnh

-- 
The Royal Architects were tasked with constructing an edifice known as the
Organisation's In[ft]ernal Webshite. It was grand, it was shiney, it was
complex, and its navigability would seem to indicate the chief architect was
the bastard child of Escher and Giger.-- Niklas Karlsson



Re: [gentoo-user] python 2 deprecation

2020-01-27 Thread David Haller
Hello,

On Sun, 26 Jan 2020, james wrote:
> * Package:dev-perl/Authen-SASL-2.160.0-r1
> * Repository: argent-main
[..]
> * perl Makefile.PL PREFIX=/usr INSTALLDIRS=vendor INSTALLMAN3DIR=none
>DESTDIR=/var/tmp/portage/dev-perl/Authen-SASL-2.160.0-r1/image/
>Can't locate inc/Module/Install.pm in @INC (you may need to install the
>inc::Module::Install module) (@INC contains: /etc/perl

That is not the gentoo ebuild. The gentoo one builds just fine due to
this line in src_prepare() of the ebuild:

sed -i -e 's/use inc::Module::Install;/use lib q[.]; use 
inc::Module::Install;/' Makefile.PL

So, just mask the argent-main version or remove that overlay or ...

HTH,
-dnh

-- 
SMTP is cute, fluffy and goes Woof! When well treated she wags her tail, licks
your face and delivers your mail. When badly treated by spammers or people
running exchange//etc she tends to bite
back.-- Simon Burr



Re: [gentoo-user] KDE Plasma problem

2019-12-28 Thread David Haller
Hello,

On Sat, 28 Dec 2019, Philip Webb wrote:
>I've also had another KDE desktop problem for a long time.
>The clock on the panel claims it's showing EST (N America),
>but in fact deducts another  5 hr , so 06:32 EST shows as 01:32 EST.

Check your "HW clock is on local or UTC time" settings ...

HTH,
-dnh

-- 
printk("3c505 is sulking\n");
linux-2.6.6/drivers/net/3c505.c



Re: [gentoo-user] kodi reports symbol lookup error

2019-12-11 Thread David Haller
Hello,

On Thu, 12 Dec 2019, Adam Carter wrote:
>Kodi has been dead for a while;
>/usr/lib64/kodi/kodi-x11: symbol lookup error: /usr/lib64/kodi/kodi-x11:
>undefined symbol:
>_ZN3fmt2v68internal14sprintf_formatIeEEPcT_RNS1_6bufferIcEENS1_13sprintf_specsE
>
>How do i go about troubleshooting this?

First of all, decode that C++ symbol with c++filt:

$ echo 
_ZN3fmt2v68internal14sprintf_formatIeEEPcT_RNS1_6bufferIcEENS1_13sprintf_specsE 
| c++filt 
char* fmt::v6::internal::sprintf_format(long double, 
fmt::v6::internal::buffer&, fmt::v6::internal::sprintf_specs)

Now, with a bit of guesswork and tabbing, 
$ grep -r sprintf_format /usr/include/fmt/
/usr/include/fmt/format.h:void sprintf_format(Double, internal::buffer &, 
core_format_specs);
/usr/include/fmt/format.h:internal::sprintf_format(value, buffer, 
normalized_spec);
/usr/include/fmt/format-inl.h:void sprintf_format(Double value, 
internal::buffer ,

It looks like the middle one, from /usr/include/fmt/format.h, i.e.
internal::sprintf_format is the culprit. And

$ qfile  /usr/include/fmt/format.h
dev-libs/libfmt: /usr/include/fmt/format.h

gives us the package it belongs to. Guessing from the symbol name,
kodi wants v6 of that library. I've got dev-libs/libfmt-5.3.0:0/5
installed, and on a hunch, running "symgrep"[1] (or nm | grep) on the lib
itself gives:

$ symgrep internal::sprintf_format /usr/lib64/libfmt.so
   275: 000108a0   283 FUNCWEAK   DEFAULT   11 void 
fmt::v5::internal::sprintf_format(double, 
fmt::v5::internal::basic_buffer&, fmt::v5::core_format_specs)
   305: 000109c0   291 FUNCWEAK   DEFAULT   11 void 
fmt::v5::internal::sprintf_format(long double, 
fmt::v5::internal::basic_buffer&, fmt::v5::core_format_specs)
   238: 000108a0   283 FUNCWEAK   DEFAULT   11 void 
fmt::v5::internal::sprintf_format(double, 
fmt::v5::internal::basic_buffer&, fmt::v5::core_format_specs)
   244: 000109c0   291 FUNCWEAK   DEFAULT   11 void 
fmt::v5::internal::sprintf_format(long double, 
fmt::v5::internal::basic_buffer&, fmt::v5::core_format_specs)

$ nm /usr/lib64/libfmt.so | c++filt | grep sprintf_format
000108a0 W void fmt::v5::internal::sprintf_format(double, 
fmt::v5::internal::basic_buffer&, fmt::v5::core_format_specs)
000109c0 W void fmt::v5::internal::sprintf_format(long 
double, fmt::v5::internal::basic_buffer&, fmt::v5::core_format_specs)

Ahhaa, we've got fmt::v5::* and not fmt::v6::*! And yes, on this box it's:

$ ls -l /usr/lib64/libfmt.so* 
lrwxrwxrwx 1 [..] /usr/lib64/libfmt.so -> libfmt.so.5
lrwxrwxrwx 1 [..] /usr/lib64/libfmt.so.5 -> libfmt.so.5.3.0
-rwxr-xr-x 1 [..] /usr/lib64/libfmt.so.5.3.0

So, you should rebuild kodi. So it gets linked to your installed
libfmt. And/or update your libfmt to v6.

Oh, and BTW, if you don't have the depended on package installed,
searching for the missing symbol online usually gives some hints of
where it comes from.

BTW: what do revdep-rebuild and 'emerge @preserved-rebuild' make of the
situation?

HTH,
-dnh

[1] 
 /usr/local/bin/symgrep 
#!/bin/sh
exec readelf -sW "$2" | c++filt | grep "$1"



-- 
> You know, if we're gonna make this whole Christian society thingie,
> shouldn't we at least wait until all the Christians agree?   -- cdr
I'd suggest waiting until Hell freezes over. It'll be a shorter wait.
 -- S. Lamble



Re: [gentoo-user] What ntp/sntp client do people use?

2019-12-10 Thread David Haller
Hello,

On Tue, 10 Dec 2019, Walter Dnes wrote:
>there any public RFC868 servers?  Or are there any RFC2030 client
>programs other than openrdate?  What do people here use?

I use net-misc/ntp. As a daemon and if needed ntpdate/sntp to set the time.

-dnh

-- 
Q: Why is it that New Jersey got all the toxic waste dumps and California
   got all the lawyers?
A: New Jersey had first choice.-- unknown



Re: [gentoo-user] Conflicting version...but the version scheme is confusing...

2019-11-29 Thread David Haller
Hello,

On Sat, 30 Nov 2019, tu...@posteo.de wrote:
>I got this printed onto my console after updateing:
>
>  (media-gfx/imagemagick-7.0.9.5:0/7.0.9::gentoo, ebuild scheduled for merge) 
> conflicts with
> (media-gfx/inkscape-1.0_beta1:0/0::gentoo, ebuild scheduled for merge)
>
>What does "media-gfx/imagemagick-7:=[cxx]" indicate for a version ?

With an '<' in front of it (and it has), it means that
inkscape-1.0_beta1 needs imagemagick <= 7 i.e. some 6.x version ... 

Basically it means you should mask that inkscape beta. Add e.g.

=media-gfx/inkscape-1.0_beta1

to /etc/portage/package.mask[/*].

Or (better) un-keyword ~amd64 inkscape, then you should stay at the
(now) stable 0.92.4.

HTH,
-dnh

-- 
We can use symlinks of course... syslogd would be a symlink to syslogp and 
ftpd and ircd would be linked to ftpp and ircp... and of course the 
point-to-point protocal paenguin.
-- Kevin M. Bealer, commenting on the penguin Linux logo



Re: [gentoo-user] problem changing to 17.1 profile

2019-11-02 Thread David Haller
Hello,

On Sat, 02 Nov 2019, John Covici wrote:
>On Sat, 02 Nov 2019 02:58:16 -0400,
>David Haller wrote:
>> On Sat, 02 Nov 2019, John Covici wrote:
>> >Hi.  Well, I was finally able to do the change of profile tothe 17.1
>> >profile.  I have gotten all  the way almost to the end of this process
>> >to the final step where itwantsto emerge all the 32-bit packages.  I
>> >am about two from the end of that list and trying to emerge
>> >x11-libs/gtk+-2.24.32-r1  andI have run into this problem:
>> >
>> >libtool: link: x86_64-pc-linux-gnu-gcc -O2 -mtune=core2 -pipe -ggdb
>> >-Wall -Wl,-O1 -o decompose-bits decompose-bits.o  -Wl,--as-needed
>> >/usr/lib/libatk-1.0.so -lpango-1.0 -lcairo -lgdk_pixbuf-2.0
>>  ^^^
>> >-lgobject-2.0 -lglib-2.0
>> >/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
>> >/usr/lib/libatk-1.0.so: error adding symbols: file in wrong format
>> [..]
>> >Thanks in advance for any suggestions asto howto proceed.
>> 
>> Have you moved your /usr/lib* stuff to the new layout yet? I.e.
>> is /usr/lib a symlink to /usr/lib64 or is it a directory containing
>> the 32-bit libs? If the latter, gcc is picking up the wrong lib for
>> this (64-bit) compile.
>> 
>> And anyway, are you on a multilib setup and have both atk (and deps)
>> and gtk+ the "abi_x86_32 multilib" USE-flags set?
>> 
>> I still have the old /usr/lib* layout, i.e.:
>> $ ls -ld /usr/lib* | cut -d/ -f2-
>> usr/lib -> lib64/
>> usr/lib32/
>> usr/lib64/
>> usr/libexec/
>> 
>> and this in make.conf:
>> 
>> CHOST="x86_64-pc-linux-gnu"
>> ABI_X86="64"
>> 
>> and above mentionend USE-flags for all packages and their deps I
>> want/need 32-bit libs (and/or binaries)...
>
>I have the new layout:
>drwxr-xr-x 68 root root 651 Nov  2 01:10 /usr/lib/

But you're on

CHOST="x86_64-pc-linux-gnu"
ABI_X86="64"

are you?

>and a use flag for the offending package
>
>dev-libs/atk abi_x86_32

I don't see 'multilib' there... Do you have /usr/lib64/libatk-1.0.*?

If not, add 'multilib' to all deps of gtk+ and re-emerge those.

HTH,
-dnh

-- 
Mal: "We're in deep space, corner of no and where."
--Episode #14, "Objects in Space"



Re: [gentoo-user] problem changing to 17.1 profile

2019-11-02 Thread David Haller
Hello,

On Sat, 02 Nov 2019, John Covici wrote:
>Hi.  Well, I was finally able to do the change of profile tothe 17.1
>profile.  I have gotten all  the way almost to the end of this process
>to the final step where itwantsto emerge all the 32-bit packages.  I
>am about two from the end of that list and trying to emerge
>x11-libs/gtk+-2.24.32-r1  andI have run into this problem:
>
>libtool: link: x86_64-pc-linux-gnu-gcc -O2 -mtune=core2 -pipe -ggdb
>-Wall -Wl,-O1 -o decompose-bits decompose-bits.o  -Wl,--as-needed
>/usr/lib/libatk-1.0.so -lpango-1.0 -lcairo -lgdk_pixbuf-2.0
 ^^^
>-lgobject-2.0 -lglib-2.0
>/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld:
>/usr/lib/libatk-1.0.so: error adding symbols: file in wrong format
[..]
>Thanks in advance for any suggestions asto howto proceed.

Have you moved your /usr/lib* stuff to the new layout yet? I.e.
is /usr/lib a symlink to /usr/lib64 or is it a directory containing
the 32-bit libs? If the latter, gcc is picking up the wrong lib for
this (64-bit) compile.

And anyway, are you on a multilib setup and have both atk (and deps)
and gtk+ the "abi_x86_32 multilib" USE-flags set?

I still have the old /usr/lib* layout, i.e.:
$ ls -ld /usr/lib* | cut -d/ -f2-
usr/lib -> lib64/
usr/lib32/
usr/lib64/
usr/libexec/

and this in make.conf:

CHOST="x86_64-pc-linux-gnu"
ABI_X86="64"

and above mentionend USE-flags for all packages and their deps I
want/need 32-bit libs (and/or binaries)...

HTH,
-dnh

-- 
Steige um auf Emacs als Editor.  Dann wird es nicht mehr primär LaTeX
sein, das Dir das Gefühl vermittelt, unter den Möglichkeiten Deiner
Werkzeuge zu bleiben.-- David Kastrup in dctt



Re: [gentoo-user] For all you sudo-happy users out there!

2019-10-15 Thread David Haller
Hello,

On Tue, 15 Oct 2019, Mick wrote:
>I have very limited sudo commands configured, but I better resync to see 
>what's the latest stable sudo on the tree.
>
>https://www.engadget.com/2019/10/14/linux-unix-sudo-command-security-flaw/?
>guccounter=1

Yeah right, that link leads to
https://guce.advertising.com/collectIdentifiers?...

Well not with uMatrix.

-dnh, using sudo only for a few very specific commands for specific users.

-- 
Ellie Linton: Good book?
Corrie Mackenzie: Better than the movie.
Ellie Linton: Yeah, books usually are. 
-- Tomorrow, When the War Began (the movie)



Re: [gentoo-user] Re: problem dropping Python 2.7

2019-09-13 Thread David Haller
Hello,

On Thu, 12 Sep 2019, Philip Webb wrote:
>I'm now left with  5  problem pkgs :
>
>  llvm-7.1.0 fetchmail-6.3.26-r4 qtwebkit-5.212.0_pre20180120
[..]
>Can anyone explain (1) how to get around the 1st  3  ebuilds

For fetchmail, unset the 'tk'-useflag:

+ + tk   : Enable support for Tk GUI toolkit, in
   particular it installs fetchmailconf

HTH,
-dnh

-- 
Speed doesn't kill... Impact does.   -- David Wilcox



Re: [gentoo-user] Re: problem dropping Python 2.7

2019-09-13 Thread David Haller
Hello,

On Fri, 13 Sep 2019, Philip Webb wrote:
>190913 Franz Fellner wrote:
>> 190913 schrieb Philip Webb
[..]
>>> What is telling Portage that Firefox needs Python-2.7 ?
>> python:2.7 DEP in firefox is coming from mozcoreconf-v6.eclass
>> (through mozconfig-v6.60.eclass):
>>   DEPEND="virtual/pkgconfig
>> dev-lang/python:2.7[ncurses,sqlite,ssl,threads(+)]
>> ${PYTHON_DEPS}"
>
>Thanks ! -- in  16 years  using Gentoo, I've never come across eclasses.
>I see they are listed in  /usr/portage/eclass .
>Is there a doc which describes what they are & what they do ?

$ qfile `man -w mozcoreconf-v6.eclass`
app-doc/eclass-manpages (/usr/share/man/man5/mozcoreconf-v6.eclass.5.gz)

HTH,
-dnh

-- 
Less is more or less more



Re: [gentoo-user] Re: Emerging glib-2.60.6 failed

2019-09-08 Thread David Haller
Hello,

On Sun, 08 Sep 2019, Hartmut Figge wrote:
>(Nuno Silva):
>
>>http://www.triffids.de/pub/gentoo/glib-2.60.6/build.log.txt gives me
>>HTTP 403 (Forbidden).
>
>Fixed. Have to investigate how that could have happened.

You seem to be missing the 32bit part of dev-libs/libffi. I.e.
ABI_X86="32 64".

HTH,
-dnh

-- 
Och yes. I used to have a brain once. If anyone sees it, please ask it
to come back, I miss it sometimes.   -- Frossie



Re: [gentoo-user] switch from gnome/systemd to xfce/openrc borked my system

2019-08-19 Thread David Haller
Hello,

On Mon, 19 Aug 2019, Raffaele Belardi wrote:
[..]
>During the emerge I had to hard reset the system [3] which obviously did not
>boot so I found a PCLinuxOS live cd from 2014 and managed to chroot into the
>partially updated system. I resumed the emerge successfully, unmerged gnome
>and dependencies (this almost took more than building Xfce...), rebuilt the
>kernel with the init system set to OpenRC (make && make install),

Did you also install the modules? (make modules_install)
Did you update the initrd?

Why not use 'genkernel'? The default-config should work in your case,
but you might look at the config anyway (/etc/genkernel.conf), e.g. at
the BOOTLOADER variable. Then 'cd' to your kernel-sources-dir and run
'genkernel --kerneldir=. all'.

HTH,
-dnh

-- 
You know, I found myself right where I left me...



Re: [gentoo-user] Imagemagick not being detected by emacs

2019-07-22 Thread David Haller
Hello,

On Sun, 21 Jul 2019, James Stevenson wrote:
>I'm struggling to get emacs to incorporate imagemagick to allow for
>rudimental image viewing and manipulation functionality. I have both
>media-gfx/imagemagick-7.0.8-50 and app-editors/emacs-26.2 installed.

Save the attached patch I found upstream as this commit[1] for emacs-27

/etc/portage/patches/app-editors/emacs-26.2/ImageMagick-7.patch

and change the emacs-26.2.ebuild (or better a copy in your local
overlay) so that

AT_M4DIR=m4 eautoreconf

is run at the end of src_prepare() which is already there but
commented out.

HTH,
-dnh

[1] 
https://github.com/emacs-mirror/emacs/commit/5729486951e6a60db55ea17ee3bac9baf8b54f6a


-- 
Ok, I'm just uploading the new version of the kernel, v1.3.33, also
known as "the buggiest kernel ever".  -- Linus Torvalds:100644 100644 e5d094cf9e f9bbccda0c M	configure.ac
:100644 100644 b9ff3f25c4 7e518ce34f M	src/image.c

diff --git a/configure.ac b/configure.ac
index e5d094cf9e..f9bbccda0c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2518,9 +2518,16 @@ if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}"
 
 ## 6.3.5 is the earliest version known to work; see Bug#17339.
 ## 6.8.2 makes Emacs crash; see Bug#13867.
-## 7 and later have not been ported to; See Bug#25967.
-IMAGEMAGICK_MODULE="Wand >= 6.3.5 Wand != 6.8.2 Wand < 7"
-EMACS_CHECK_MODULES([IMAGEMAGICK], [$IMAGEMAGICK_MODULE])
+IMAGEMAGICK7_MODULE="MagickWand >= 7"
+IMAGEMAGICK6_MODULE="Wand >= 6.3.5 Wand != 6.8.2"
+# As we check for ImageMagick 7 then 6 track which version we find
+EMACS_CHECK_MODULES([IMAGEMAGICK], [$IMAGEMAGICK7_MODULE])
+AS_IF([test $HAVE_IMAGEMAGICK = yes],
+  [IMAGEMAGICK_MAJOR=7],
+  [
+EMACS_CHECK_MODULES([IMAGEMAGICK], [$IMAGEMAGICK6_MODULE])
+AS_IF([test $HAVE_IMAGEMAGICK = yes], [IMAGEMAGICK_MAJOR=6])
+  ])
 
 if test $HAVE_IMAGEMAGICK = yes; then
   OLD_CFLAGS=$CFLAGS
@@ -2540,6 +2547,8 @@ if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}"
 fi
 if test $HAVE_IMAGEMAGICK = yes; then
   AC_DEFINE([HAVE_IMAGEMAGICK], 1, [Define to 1 if using ImageMagick.])
+  AC_DEFINE_UNQUOTED([IMAGEMAGICK_MAJOR], [$IMAGEMAGICK_MAJOR],
+ [ImageMagick major version number (from configure).])
 else
   IMAGEMAGICK_CFLAGS=
   IMAGEMAGICK_LIBS=
@@ -5460,7 +5469,7 @@ AS_ECHO(["  Does Emacs use -lXaw3d? ${HAVE_XAW3D
   Does Emacs use -lrsvg-2?${HAVE_RSVG}
   Does Emacs use cairo?   ${HAVE_CAIRO}
   Does Emacs use -llcms2? ${HAVE_LCMS2}
-  Does Emacs use imagemagick (version 6)? ${HAVE_IMAGEMAGICK}
+  Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}
   Does Emacs support sound?   ${HAVE_SOUND}
   Does Emacs use -lgpm?   ${HAVE_GPM}
   Does Emacs use -ldbus?  ${HAVE_DBUS}
diff --git a/src/image.c b/src/image.c
index b9ff3f25c4..7e518ce34f 100644
--- a/src/image.c
+++ b/src/image.c
@@ -8273,11 +8273,20 @@ imagemagick_image_p (Lisp_Object object)
 /* The GIF library also defines DrawRectangle, but its never used in Emacs.
Therefore rename the function so it doesn't collide with ImageMagick.  */
 #define DrawRectangle DrawRectangleGif
-#include 
+
+#if IMAGEMAGICK_MAJOR == 6
+# include 
+# include 
+#else
+# include 
+# include 
+/* ImageMagick 7 compatibility definitions */
+# define PixelSetMagickColor PixelSetPixelColor
+typedef PixelInfo MagickPixelPacket;
+#endif
 
 /* ImageMagick 6.5.3 through 6.6.5 hid PixelGetMagickColor for some reason.
Emacs seems to work fine with the hidden version, so unhide it.  */
-#include 
 #if 0x653 <= MagickLibVersion && MagickLibVersion <= 0x665
 extern WandExport void PixelGetMagickColor (const PixelWand *,
 	MagickPixelPacket *);
@@ -8815,7 +8824,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
 #endif /* HAVE_MAGICKEXPORTIMAGEPIXELS */
 {
   size_t image_height;
-  MagickRealType color_scale = 65535.0 / QuantumRange;
+  MagickRealType color_scale = 65535.0 / (MagickRealType) QuantumRange;
 #ifdef USE_CAIRO
   data = xmalloc (width * height * 4);
   color_scale /= 256;


Re: [gentoo-user] Re: escape from i3lock

2019-07-11 Thread David Haller
Hello,

On Thu, 11 Jul 2019, Laurence Perkins wrote:
>You could also leave DontVTSwitch on all the time and set a keyboard
>shortcut to run chvt (man 1 chvt) with appropriate permissions and
>parameters instead.  Keyboard shortcuts shouldn't get processed if the
>screen is locked.

The screensaver has to get _and keep_ the lock on input.

The sad thing is, people do needless rewrites and get it wrong again
and again and again, despite jwz' xscreensaver code from 1991 on,
setting an example on how to do it right... Cue gnome-screensaver, the
kde stuff, apparently also i3lock etc.pp. ad nauseam, all repeating
the very bugs jwz wrote about in 2004 (the toolkits.html)...

VT Switching is just a little subclass of the underlying problems of
those "lock screen" programs that don't lock your screen.

 https://www.jwz.org/xscreensaver/toolkits.html / Epilogue 
I wrote this document in 2004, explaining the approach to privilege
separation that xscreensaver has taken since 1991. Of course, the
people doing needless rewrites of xscreensaver have ignored it for
that whole time, and have then gone on to introduce exactly the bug
that I described in this document as a hypothetical strawman! And --
this would be hilarious if it weren't so sad -- have introduced it
multiple times. As I said in 2015:

If you are not running xscreensaver on Linux, then it is safe to
assume that your screen does not lock. Once is happenstance. Twice
is coincidence. Three times is enemy action. Four times is
Official GNOME Policy.

(read the whole thing linked document!). Also:

https://www.jwz.org/xscreensaver/man1.html#8
https://www.jwz.org/blog/2014/04/the-awful-thing-about-getting-it-right-the-first-time-is-that-nobody-realizes-how-hard-it-was/
https://www.jwz.org/blog/2015/04/i-told-you-so-again/
(also follow the "previous" links ;)

So the solution is to just use "xscreensaver" by jwz. Which can be
configured to just blank the screen etc. as wanted by the op. See also
the FAQ: https://www.jwz.org/xscreensaver/faq.html

HTH,
-dnh

-- 
"Humans need fantasy .. to *be* human" -- Death (in Hogfather)



Re: [gentoo-user] Music player being run from an emerge

2019-07-10 Thread David Haller
Hello,

On Wed, 10 Jul 2019, Andrew Lowe wrote:
>   If I log in as my usual user, alsaplayer will run the song. If I then 
> "su"
>into root, I'm in wheel, alsaplayer will play the song. The problem is that
>when the emerge runs, then fails, alsaplayer can't appear to fire up. When an
>emerge fails, I get the usual error listings then the following:
>
> * ACCESS DENIED:  open_wr:  /dev/snd/controlC0
> * ACCESS DENIED:  open_wr:  /dev/snd/controlC0
>ALSA lib 
>/var/tmp/portage/media-libs/alsa-lib-1.1.9/work/alsa-lib-1.1.9/src/confmisc.c:674:(snd_determine_driver)
>could not open control for card 0
>ALSA lib 
>/var/tmp/portage/media-libs/alsa-lib-1.1.9/work/alsa-lib-1.1.9/src/conf.c:3572:(snd_config_hooks_call)
>function snd_config_hook_load_for_all_cards returned error: Permission denied

You'd probably need to add portage to the "audio" group ...

HTH,
-dnh

-- 
Sorry, I don't know how to help in this situation.
Maybe you should try asking a human?   -- a TeX message



Re: [gentoo-user] How do I get rid of colors (console and xterm)?

2019-07-04 Thread David Haller
Hello,

On Thu, 04 Jul 2019, Christian Groessler wrote:
>On 7/4/19 9:19 PM, Ralph Seichter wrote:
>> * Christian Groessler:
>> > My question is how do I get rid of colors in "emerge", "man" and other
>> > command line programs.
>> The methods vary between command line tools.  You can for example
>> disable the 'manpager' USE flag for sys-apps/man-db. The manual page for
>> emerge mentions different methods (search for "--color"). Depending on
>> the terminal software you use, you might be able to select monochromatic
>> colour profiles (iterm2 for macOS does support this).
>
>In the meanwhile I had found out the "NOCOLORS" setting in make.conf which
>works for "emerge".

Your term looks rather low contrast with that rather bright dark
greenish background... I use 'grey5' ;)

You can also adjust the colours see 'man 5 color.map' and
/etc/portage/color.map.

And/or even patch emerge's output routines (I think there's some stuff
that has no variable in color.map, and which is hard to read on
grey5). I use this:


/etc/portage/patches/sys-apps/portage/portage_output_colors-2.3.44.patch

diff -x '*~' -purN a/lib/portage/output.py b/lib/portage/output.py
--- a/lib/portage/output.py 2017-12-16 01:48:01.0 +0100
+++ b/lib/portage/output.py 2017-12-16 05:54:28.701929379 +0100
@@ -100,8 +115,8 @@ codes["darkgreen"] = codes["0x00AA00"]
 codes["yellow"]= codes["0x55"]
 codes["brown"] = codes["0xAA5500"]

-codes["blue"]  = codes["0xFF"]
-codes["darkblue"]  = codes["0xAA"]
+codes["blue"]  = esc_seq + "36;1m" # codes["0xFF"]
+codes["darkblue"]  = esc_seq + "36m" # codes["0xAA"]

 codes["fuchsia"]   = codes["0xFF55FF"]
 codes["purple"]= codes["0xAA00AA"]


>man pages in color are the other most important problem right now. I will
>check out your suggestion.

AFAIK that mostly depends on what you use as pager for man, e.g. less.


   Controlling formatted output
   -P pager, --pager=pager
  Specify  which  output  pager to use.  By default, man uses less
  -s.  This option overrides the $MANPAGER  environment  variable,
  which  in turn overrides the $PAGER environment variable.  It is
  not used in conjunction with -f or -k.


So, have a look at the MANPAGER and PAGER variables if they're set. If
they are, have a look at the config of that pager, else at that of
'less(1)'. Oh, and have a look at your terminal options. E.g. use
'xterm -cm' instead of 'xterm'... (or set the according Xresource) and
all you get is black & white ;)

HTH,
-dnh

-- 
# Mmm, yes.  cookies my precious!  Mmm, yes downloads it
# is!  We mustn't have nasty little gmakeses deleting our
# precious cookieses now must we?-- gar.lib.mk of 'konstruct'



Re: [gentoo-user] Re: virtual eselect - how to

2019-06-26 Thread David Haller
Hello,

On Wed, 26 Jun 2019, Ian Zimmerman wrote:
>On 2019-06-26 14:51, Mick wrote:
>
>> > I have installed openblas but 'eselect blas list' doesn't know about
>> > this.
>> 
>> I assume it doesn't know about it because there is no eselect module
>> for blas.
>
>There definitely is,  I have run across this problem as well.

# eix app-eselect/ |grep blas
[I] app-eselect/eselect-blas
[I] app-eselect/eselect-cblas

HTH,
-dnh

-- 
sh -c 'set 2 1 0 / . - + ^ : , ! %;y=70;for a in $* $*;do x=54;while [ \
${#s} -lt 79 ];do r=0;i=0;for b in % $*;do [ $(((q=r*r)+(t=i*i))) -ge 9\
999 ]&i=$((y+(r*i)/32));r=$((x+(q-t)/64));done;s=$b$s;x=$((x-2))\
;done;y=$((y-6));echo $s;s=;done;'



Re: [gentoo-user] "

2019-05-13 Thread David Haller
Hello,

On Sun, 12 May 2019, Jack wrote:
>I hope there is either a bug filed, some sort of newsitem, or else someone
>finds a way for portage to just handle it by itself.

https://bugs.gentoo.org/676024

HTH,
-dnh

-- 
Organic chemistry is the chemistry of carbon compounds.  Biochemistry
is the study of carbon compounds that crawl.-- Mike Adams



Re: [gentoo-user] Re: Reduce granularity of emerge-fetch.log?

2019-03-08 Thread David Haller
Hello,

On Fri, 08 Mar 2019, Neil Bothwick wrote:
>On Thu, 7 Mar 2019 17:52:08 -0600, Dale wrote:
>> >> It seems you can change the output of wget with the --progress
>> >> option, which you would set in FETCHCOMMAND in make.conf.  
>> > Doh!  I thought that the output format looked familiar: I didn't
>> > realize it was using wget.   Thanks...
>> 
>> Would you mind posting a example of yours?  I'd like to change mine as
>> well.  Just need something to give me ideas and should be able to go
>> from there.
>
>You can see the default setting with
>
>emerge --info -v | grep FETCHCOMMAND=
>
>Paste this into make.conf and fiddle with the progress settings.

You can also use /var/tmp/portage/.wgetrc
(see: getent passwd portage | cut -d: -f6):

# grep progress /var/tmp/portage/.wgetrc 
progress=bar:force:noscroll
showprogress=on
# 

FETCHCOMMAND is not set by me.

HTH,
-dnh

-- 
If breathing required conscious thought, the world population would be
on a sharp decline.-- Greg Andrews



Re: [gentoo-user] Video database software

2019-01-30 Thread David Haller
Hello,

On Wed, 30 Jan 2019, Laurence Perkins wrote:
>for VIDEO in $(find . -xtype f -iname '*.mp4' -o -iname '*.avi'\
>-o -iname '*.mkv'); do
>  #Things in $() get run and their stdout gets stuffed into the 
>  #command line at that point. ${} is how you insert variable values.
>  echo "${VIDEO},$(exiftool -T -ImageSize '${VIDEO}')" 
>done


#!/usr/bin/perl -w
use strict;
use File::Find;
use Image::ExifTool;
use Encode;

my $exifTool = new Image::ExifTool;

sub wanted {
if( -f $_ && $_ =~ /^.*\.(?:mp4|mkv|avi)\z/si ) {
my $ii = $exifTool->ImageInfo($File::Find::name);
printf("%s,%s\n", $File::Find::name,
  Encode::decode_utf8($ii->{ImageSize}) );
}
}
scalar @ARGV || push(@ARGV, '.');
File::Find::find({wanted => \, no_chdir => 1}, @ARGV );


Usage: $script [FILES_OR_DIRS...]

HTH,
-dnh

-- 
>> This needs quotes:
>> use lib "/path/to/perl/modules";
> Single or double quotes?
Yes. -- Tad McClellan in comp.lang.perl.misc



Re: [gentoo-user] OT scripting - strip zero if between period and digit

2019-01-23 Thread David Haller
Hello,

On Wed, 23 Jan 2019, Adam Carter wrote:
>> $ printf '0.1.2.3 01.2.3.4 1.2.3.0 1.2.000.3\n' | \
>> sed 's/0*\([[:digit:]]\+\)/\1/g'
>> 0.1.2.3 1.2.3.4 1.2.3.0 1.2.0.3
>
>So [[:digit:]] is another way of writing [0-9] and the + just means another
>instance of the proceeding expression, right, so your and Francois
>solutions are functionally the same, and all the following are the same
>too, right?

Not quite.

[[:digit:]]+ == [0-9][0-9]*

Not too, that [:digit:] respects locale. Don't know where locale
applies though. Probably Devanagari or such. I just made myself to use
classes rather than char-ranges. See man 7 regex for more classes.

HTH,
-dnh

-- 
"UNIX was not designed to stop people from doing stupid things, because
 that would also stop them from doing clever things."  -- Doug Gwyn



Re: [gentoo-user] OT scripting - strip zero if between period and digit

2019-01-22 Thread David Haller
Hello,

On Mon, 21 Jan 2019, Michael Orlitzky wrote:
>On 1/21/19 6:50 PM, Adam Carter wrote:
>> I need to clean up a file which has IP addresses with leading zeros in
>> some of the octets so I need to make, say, .09 into .9
>> 
>> How do i do that in sed/awk/whatever?
>
>The first thing you should do is construct a bunch of test cases, with all of
>the possible input representations and what you think the output
>representation should be. Then, you should write a program in something other
>than bash that passes all of the test cases. It's not as easy as it sounds;
>for example:
>
>  * What happens to 0.1.2.3?
>
>  * What happens to 01.2.3.4?
>
>  * What happens to 1.2.3.0?
>
>  * What happens to 1.2.000.3?
>
>You need a parser, not a regular expression. (You can do it with a regex, but
>it's going to be one of those comical twelve-page-long things.)

$ printf '0.1.2.3 01.2.3.4 1.2.3.0 1.2.000.3\n' | \
sed 's/0*\([[:digit:]]\+\)/\1/g'
0.1.2.3 1.2.3.4 1.2.3.0 1.2.0.3

HTH,
-dnh

-- 
printk(KERN_DEBUG "adintr: Why?\n");
linux-2.6.19/sound/oss/ad1848.c



Re: [gentoo-user] Re: CPU upgrade and LVM questions.

2018-12-07 Thread David Haller
Hello,

On Sat, 08 Dec 2018, Nikos Chantziaras wrote:
>On 08/12/2018 07:33, David Haller wrote:
>> *Meh*
>> 
>> I miss my Matrox Mystique (first model w/170MHz RAMDAC!) with a
>> whopping 4 MB SGRAM, and not even a heatsink, just the plain naked
>> chip, much less a fan, and it ran in a PCI slot, at about ~4.5W (or
>> was it 5W?) theoretical max usage...
>
>As it happens, I had the exact same card! Well, almost. I had the 2MB
>version. There was a 2MB module that you could use to upgrade to a total of
>4MB, but I was never able to find it anywhere. And there was no "online
>shopping" back then. As result, I was only able to play Tomb Raider 1 at
>512x384 instead of 640x480 :-)

from a lilo.conf back when:

append="video=matrox:vesa:789 ..."

best 2D ever, eh? The con is noticeably much slower on nvidia than
with that matrox at any resolution (from "normal" to whatever)... Oh,
and I could play "Descent" just fine at 800x600 or so. Got sorta dizzy
the first hour or so, but once adjusted, wow, *that's* a 3D game! And
still is! :) I still like to play it (as d1x, patched for max
ammo[1]/energy/shield *hrhrhr* I play alone and for fun, not for
setting records ;) I also patch BfWesnoth in the same vein... *eg*

*ARGH* I should get meself a github account and polish and submit some
of my local patches / new ebuilds ... No, not those "cheating" patches :)
Just e.g. stuff that makes stuff optional for libreoffice... *gnarf*

-dnh

[1] for the gauss, signed short, IIRC.

-- 
 / "When it works, it is just biding its time waiting for  \
 \ a more inconvenient time for it to fail."  -- Joe Moore /



Re: [gentoo-user] Re: CPU upgrade and LVM questions.

2018-12-07 Thread David Haller
Hello,

On Fri, 07 Dec 2018, Dale wrote:
>David Haller wrote:
>> On Fri, 07 Dec 2018, Dale wrote:
>>> Peter Humphrey wrote:
>>>> Have you tried gkrellm? It's very neat. Sits in a vertical strip at
>>>> the side of your screen and shows a whole load of things all at
>>>> once. I've been using it for donkeys' years.
>>> That's what I generally use.  I don't see a place for it to show the CPU
>>> frequency tho.  Did I miss it? 
>> Nope. Try your local x11-plugins/gkrellm-gkfreq, see attachment ;)
>
>Oh man.  They added a lot of plugins since I last looked.  I couldn't
>find the one you mentioned but I did find gkrellm-cpupower which seems
>to be it.  Maybe they changed a name recently???

Nah, cpupower seems to be even older that gkfreq, but that is also at
least from 2010 ;) IIRC I found it linked from the gkrellm homepage.

>Thing about that, it takes up way to much room to display. I could
>check it on occasion but I wouldn't want to leave it up there all the
>time. 

You can configure it! But cpupower seems to take at least a
line/CPU-Core. BTW it seems you have to restart gkrellm to have
cpupower update it's config, unlike most other plugins (e.g. gkfreq ;)

>Thanks for the tip tho.  I'm going to check into the other plugins that
>might be nifty to have. 

gkfreq can be configured that it just shows one line (e.g. "Max",
which is how I have it), and which suits me. Oh and with that slower
update-rate in my other follow-up with the patch.

Check both out. You can use both cpupower and gkfreq for testing and
keep whichever you like better ;)

-dnh

-- 
[David hat Thomas einen Geologen genannt]
>Ich bastle auch schon an der Bombe fuer David :-)) 
*JAUL* *duck* *fluecht* *eingrab* *Ach nee, das bringt bei nem
Geo_PHYSIKER_ ja nix* *Heul* *UFO kaper*  
   [Thomas Hertweck und  Haller in suse-talk]



Re: [gentoo-user] Re: CPU upgrade and LVM questions.

2018-12-07 Thread David Haller
Hello,

On Sat, 08 Dec 2018, David Haller wrote:
>On Fri, 07 Dec 2018, Dale wrote:
>>Peter Humphrey wrote:
>>> Have you tried gkrellm? It's very neat. Sits in a vertical strip at
>>> the side of your screen and shows a whole load of things all at
>>> once. I've been using it for donkeys' years.
>>
>>That's what I generally use.  I don't see a place for it to show the CPU
>>frequency tho.  Did I miss it? 
>
>Nope. Try your local x11-plugins/gkrellm-gkfreq, see attachment ;)

Made a little patch (drawn from the gkfreq-2.0 source) to make updates
not quite that often (I barely could read them)...

Patch + updated ebuild attached. Have fun.

-dnh

-- 
And 1.1.81 is officially BugFree(tm), so if you receive any bug-reports
on it, you know they are just evil lies."
(By Linus Torvalds, linus.torva...@cs.helsinki.fi)# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit gkrellm-plugin toolchain-funcs

DESCRIPTION="CPU frequency plugin for gkrellm2"
HOMEPAGE="https://sourceforge.net/projects/gkrellm-gkfreq/;
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="app-admin/gkrellm:2[X]"
DEPEND="${RDEPEND}"

PATCHES=( "${FILESDIR}/gkrellm-gkfreq-2.4-dont_update_too_much.patch" )
diff -purN -x '*~' a/gkrellm-gkfreq.c b/gkrellm-gkfreq.c
--- a/gkrellm-gkfreq.c	2014-12-23 14:23:13.0 +0100
+++ b/gkrellm-gkfreq.c	2018-12-08 05:58:49.732739849 +0100
@@ -172,6 +172,9 @@ static gint panel_expose_event(GtkWidget
 static void update_plugin() {
   gint i;
   
+  // dont do it too much...
+  if ((GK.timer_ticks % 10) != 0) return;
+
   // Get all CPU frequencies and calculate max, avg & min
   for (i=0; i

Re: [gentoo-user] Re: CPU upgrade and LVM questions.

2018-12-07 Thread David Haller
Hello,

On Sat, 08 Dec 2018, Nikos Chantziaras wrote:
>On 08/12/2018 03:01, Dale wrote:
>> I just noticed the video card that is coming requires a power cable.  I
>> never had one that powerful before.  O_O
>
>You've been out of the loop it seems. GPUs have required power cables for
>over a decade now. The GPU I use actually needs *two* power cables and places
>a minimum wattage requirement on the power supply... :-P

*Meh*

I miss my Matrox Mystique (first model w/170MHz RAMDAC!) with a
whopping 4 MB SGRAM, and not even a heatsink, just the plain naked
chip, much less a fan, and it ran in a PCI slot, at about ~4.5W (or
was it 5W?) theoretical max usage...

https://en.wikipedia.org/wiki/Matrox_Mystique
https://en.wikipedia.org/wiki/File:MatroxMystique2MBcard.jpg

I only replaced that ~10yearish ago because my new screen had a
whopping 1280x1024 on 17", which those 4MB just won't do at decent
bit-depth... *sigh* For 1152x864 on the CRT it was still good, but
that screen just got too dark to see anything at all, so I had to
replace it. Got a nice (expensiveish) PVA-TFT. Still very nice after
~10 years, even with CCFL it has darkend only minimally[1] :) And yes,
I'm still fine with 1280x1024 on 17", TYVM :) I could even set up the
spare monitor (same size/res) alongside, but I just don't need it.

Now, I've got (again) a passive GPU for PCIe (max. 75W) w/o extra
power. Main reason: the latest had a fan, which started to scream. As
in almost not running. Cleaning did not help. So... No fan, no sound,
and cleaning a heatsink is easy, as opposed to cleaning a fan +
heatsink combo. And besides, a downward-facing heatsink does not
tend to clog up as one that has a fan blowing onto it...

-dnh, *darn* Time to clean-out the CPU-heatsink once again too :(
CPU-temp and fan-speed are still ok though.

[1] I started with IIRC ~30-40% "brightness" as preferred setting, and
am now at ~40-50%... Which is good for a 10yr+ old CCFL, eh? :)

-- 
 "Waking up this morning was a pointless act of masochism" -- Girl



Re: [gentoo-user] kstars and indilib

2018-12-07 Thread David Haller
Hello,

On Fri, 07 Dec 2018, Alexander Puchmayr wrote:
>I tried to compile kstars with useflag indi, but the provided version in 
>portage is too old:
>
>[build.log from kstars]
>1.7.1 is required
>1.7.1 is required
>
>I have no idea why it pretends to find indi-1.5.0, when 1.6 is installed :-(

Could be some cmake thingy ;)

>Version 1.6 is currently the only version in portage, which renders
>the useflag "indi" for kstars useless, as the resulting kstars binary
>does not support indi.
>
>https://indilib.org/download/gentoo.html shows a way to add an overlay, but 
>the repo proposed does not exist anymore.
>
>Where do I find a ebuild for installing at least indilib-1.7.1?

Just updated the one in the tree in my local overlay, see attached
indilib-1.7.5.ebuild.

Oh, and I updated sci-astronomy/kstars to 2.9.8 there too, see also
attached inside a tarball with patches... Oh, a note on that, I've
added the knewstuff IUSE as I like to disable that generally, but as
it's a '+'ed, you should be fine. Not sure what the qtdatavis3d
feature does that I've added, I'm new to the program. ;) Hope I didn't
bork the Manifest while editing/packing/editing/packing... ;)

Any Questions?

HTH,
-dnh

-- 
> (Diva's Law of Software: quality is inversely proportional to price.)
Stevo's Addendum to Diva's Law of Software: But try explaining that to the PHB
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

MY_PN="${PN/lib/}"
CMAKE_MAKEFILE_GENERATOR=emake

inherit cmake-utils udev

DESCRIPTION="INDI Astronomical Control Protocol library"
HOMEPAGE="http://www.indilib.org/;
SRC_URI="https://github.com/${PN}/${PN/lib/}/archive/v${PV}/${MY_PN}_${PV}.tar.gz
 -> ${P}.tar.gz"

LICENSE="BSD GPL-2+ LGPL-2+ LGPL-2.1+"
SLOT="0/1"
KEYWORDS="amd64 ~ppc ~ppc64 x86"
IUSE="ogg test"

RDEPEND="
net-misc/curl
sci-libs/cfitsio:=
sci-libs/gsl:=
sci-libs/libnova
sys-libs/zlib:=
virtual/jpeg:0
virtual/libusb:0
ogg? (
media-libs/libogg
media-libs/libtheora
)
"
DEPEND="${RDEPEND}
sys-kernel/linux-headers
test? ( >=dev-cpp/gtest-1.8.0 )
"

DOCS=( AUTHORS ChangeLog COPYRIGHT README )

S=${WORKDIR}/${MY_PN}-${PV}/libindi

src_configure() {
local mycmakeargs=(
-DINDI_BUILD_QT5_CLIENT=OFF
-DINDI_BUILD_UNITTESTS=$(usex test)
-DUDEVRULES_INSTALL_DIR="$(get_udevdir)"
$(cmake-utils_use_find_package ogg OggTheora)
)

cmake-utils_src_configure ${S}/libindi
}

src_test() {
BUILD_DIR="${BUILD_DIR}"/test cmake-utils_src_test
}


kstars.tar.gz
Description: sci-astronomy/kstars.tar.gz


Re: [gentoo-user] Re: CPU upgrade and LVM questions.

2018-12-07 Thread David Haller
Hello,

On Fri, 07 Dec 2018, Dale wrote:
>Peter Humphrey wrote:
>> Have you tried gkrellm? It's very neat. Sits in a vertical strip at
>> the side of your screen and shows a whole load of things all at
>> once. I've been using it for donkeys' years.
>
>That's what I generally use.  I don't see a place for it to show the CPU
>frequency tho.  Did I miss it? 

Nope. Try your local x11-plugins/gkrellm-gkfreq, see attachment ;)

HTH,
-dnh

-- 
Keep me informed on the behaviour of this kernel..  As the "BugFree(tm)"
series didn't turn out too well, I'm starting a new series called the
"ItWorksForMe(tm)" series, of which this new kernel is yet another
shining example.-- Linus, in the announcement for 1.3.29# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit gkrellm-plugin toolchain-funcs

DESCRIPTION="CPU frequency plugin for gkrellm2"
HOMEPAGE="https://sourceforge.net/projects/gkrellm-gkfreq/;
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""
RDEPEND="app-admin/gkrellm:2[X]"
DEPEND="${RDEPEND}"


Re: [gentoo-user] Weird compilation error (nasm)

2018-11-13 Thread David Haller
Hello,

On Tue, 13 Nov 2018, tu...@posteo.de wrote:
>I got a weird looking error while upgrading/recompiling nasm:
>cmake -C 
>/var/tmp/portage/media-libs/libjpeg-turbo-2.0.1/work/libjpeg-turbo-2.0.1-abi_x86_64.amd64/gentoo_common_config.cmake
> -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr 
>-DCMAKE_INSTALL_DEFAULT_DOCDIR=/usr/share/doc/libjpeg-turbo-2.0.1 
>-DENABLE_STATIC=no -DWITH_JAVA=no -DWITH_MEM_SRCDST=ON 
>-DCMAKE_BUILD_TYPE=Gentoo 
>-DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/media-libs/libjpeg-turbo-2.0.1/work/libjpeg-turbo-2.0.1-abi_x86_64.amd64/gentoo_toolchain.cmake
>  /var/tmp/portage/media-libs/libjpeg-turbo-2.0.1/work/libjpeg-turbo-2.0.1
>loading initial cache file 
>/var/tmp/portage/media-libs/libjpeg-turbo-2.0.1/work/libjpeg-turbo-2.0.1-abi_x86_64.amd64/gentoo_common_config.cmake
> * ACCESS DENIED:  fopen_wr: /?
>Build type  Gentoo
>Install path/usr
>Compiler flags:
>C   -march=native -O -pipe
>C++ 
>Linker flags:
>Executable  -Wl,-O1 -Wl,--as-needed
>Module  -Wl,-O1 -Wl,--as-needed
>Shared  -Wl,-O1 -Wl,--as-needed
>
 Source configured.
> * --- ACCESS VIOLATION SUMMARY 
> ---
> * LOG FILE: "/var/log/sandbox/sandbox-16492.log"
> * 
>VERSION 1.0
>FORMAT: F - Function called
>FORMAT: S - Access Status
>FORMAT: P - Path as passed to function
>FORMAT: A - Absolute Path (not canonical)
>FORMAT: R - Canonical Path
>FORMAT: C - Command Line
>
>F: fopen_wr
>S: deny
>P: /?
>A: /?
>R: /?
>C: /usr/bin/nasm /? 
> * 
> 

The problem is cmake's way to figure out what nasm it has got:

 /usr/share/cmake/Modules/CMakeDetermineASMCompiler.cmake:79 
  list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS MSVC )
  set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_MSVC "/?")
  set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_MSVC "Microsoft


Workaround1:


--- libjpeg-turbo-2.0.1.ebuild~ 2018-11-13 20:45:58.0 +0100
+++ libjpeg-turbo-2.0.1.ebuild  2018-11-13 20:44:02.0 +0100
@@ -52,6 +52,7 @@
-DENABLE_STATIC="$(usex static-libs)"
-DWITH_JAVA="$(multilib_native_usex java)"
-DWITH_MEM_SRCDST=ON
+   -DCMAKE_ASM_NASM_COMPILER_ID=GNU
)
[[ ${ABI} == "x32" ]] && mycmakeargs+=( -DREQUIRE_SIMD=OFF ) #420239
cmake-utils_src_configure


Workaround2: if you have dev-lang/yasm installed, use:

ASM_NASM=/usr/bin/yasm [ebuild|emerge] ...

Workaround3: delete those MSVC lines from
/usr/share/cmake/Modules/CMakeDetermineASMCompiler.cmake

Workaround4: patch cmake-utils.eclass to add 
-DCMAKE_ASM_NASM_COMPILER_ID=GNU to cmakeargs in
cmake-utils_src_configure.

HTH,
-dnh, I'd prefer solution 3 ;)

-- 
my other signature is more intellectual



Re: [gentoo-user] libQt5Core.so.5 => not found

2018-11-10 Thread David Haller
Hello,

On Fri, 09 Nov 2018, k...@aspodata.se wrote:
>I'm trying to build/emerge dev-qt/qtgui-5.11.1, but I get this:
>
># ldd 
>/Net/portage_tmpdir/portage/dev-qt/qtgui-5.11.1/work/qtbase-everywhere-src-5.11.1/bin/qvkgen
>linux-vdso.so.1 (0x7fff3ddff000)
>libQt5Core.so.5 => not found
>libc.so.6 => /lib64/libc.so.6 (0x7f697dbd8000)
>/lib64/ld-linux-x86-64.so.2 (0x7f697e1f5000)
># strings /etc/ld.so.cache | grep libQt5Core.so.5
>libQt5Core.so.5
>/usr/lib64/libQt5Core.so.5
># ls -l /usr/lib64/libQt5Core.so.5*
>lrwxrwxrwx 1 root root  20 Nov  5 12:49 /usr/lib64/libQt5Core.so.5 -> 
>libQt5Core.so.5.11.1
>lrwxrwxrwx 1 root root  20 Nov  5 12:49 /usr/lib64/libQt5Core.so.5.11 -> 
>libQt5Core.so.5.11.1
>-rwxr-xr-x 1 root root 5351376 Nov  5 12:49 /usr/lib64/libQt5Core.so.5.11.1
>
>So why isn't it found ?

Are you using a kernel <3.15?

Found this at :
"Qt 5.10 uses the renameat2 system call which is only available
since kernel 3.15."

The error-message of ld et.al. is rather weird and misleading though.

HTH,
-dnh

-- 
printk(KERN_CRIT "How did I get here?\n");
linux-2.6.19/arch/mips/kernel/syscall.c



Re: [gentoo-user] Inkscape failed to compile...(update from this morning)

2018-10-28 Thread David Haller
Hello,

On Sun, 28 Oct 2018, tu...@posteo.de wrote:
[..]
>reemergeing cairomm fixes the problem!

No wonder. The error was e.g.:
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../lib64/libcairomm-1.0.so:
undefined reference to `cairo_script_create'

$ qfile 
/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../lib64/libcairomm-1.0.so
dev-cpp/cairomm (/usr/lib64/libcairomm-1.0.so)

So re-emerging dev-cpp/cairomm should be obvious ;)

>Unfortunately I emerged and forget the '-1'...is there a 
>way to fix that?

# sed -i.orig '/^dev-cpp/cairomm$/d' /var/lib/portage/world

Check with

# diff -u /var/lib/portage/world.orig /var/lib/portage/world

that only that one entry is gone. Then you can remove the .orig.

Or just edit that world file with the editor of your choice.

HTH,
-dnh

-- 
I don't care about people reading in OE. It just gets bad if they
send postings, viruses, and complaints about non-existing attachements.



Re: [gentoo-user] wxPython/wxWidgets release number mismatch

2018-09-19 Thread David Haller
Hello,

On Wed, 19 Sep 2018, Andrew Udvare wrote:
>Curiosity: what is the reason for wxGTK:3.0 and wxGTK:3.0-gtk3 ?

wxGTK:3.0 uses gtk+-2 and wxGTK:3.0-gtk3 uses gtk+-3.

HTH,
-dnh

-- 
The only "intuitive" interface is the nipple.  After that, it's all learned.
-- Bruce Ediger, bedi...@teal.csn.org, on X interfaces



Re: [gentoo-user] eselect mystery - please help

2018-08-02 Thread David Haller
Hello,

On Wed, 01 Aug 2018, Helmut Jarausch wrote:
>On 08/01/2018 03:37:44 PM, Andrés Becerra Sandoval wrote:
>>Do you have:
>>https://packages.gentoo.org/packages/virtual/jdk
>
>Yes, I have re-emerged these but it didn't resolve my problem.

How about:
$ qfile /usr/share/eselect/modules/java-vm.eselect
app-eselect/eselect-java (/usr/share/eselect/modules/java-vm.eselect)

HTH,
-dnh

-- 
Well I wish you'd just tell me rather than try to engage my enthusiasm.
 -- Marvin



Re: [gentoo-user] Any utility to forcibly freeze or swap out a specific pid?

2018-07-03 Thread David Haller
Hello,

On Tue, 03 Jul 2018, Walter Dnes wrote:
>  Thanks; this could be interesting.  Run "ps x", grep for specific
>commands in the output, read the pid at the start of the line, and
>autofreeze those processes..

Use 'pgrep [-u UID/USERNAME] pattern' or adjust ps output to only
display what interests you, e.g.:

$ ps -eo pid,cmd
$ ps -eo pid,cmd | awk '$2 ~ /pattern/ { print $1; }'
$ ps -eo pid,cmd | awk '$2 == "string" { print $1; }'

etc.

Or try 'pidof' (which needs the exact command-name and might return
mismatches).

HTH,
-dnh

-- 
printk (KERN_DEBUG "Somebody wants the port\n");
linux-2.6.6/drivers/parport/parport_pc.c



Re: [gentoo-user] Binary packages for a different amd64 flavor

2018-06-12 Thread David Haller
Hello,

On Tue, 12 Jun 2018, Mick wrote:
>On Tuesday, 12 June 2018 19:31:32 BST Ian Zimmerman wrote:
>> I have had it with compiling stuff from source on my laptop.  It is just
>> too slow.  So I would like to create binary packages on my desktop and
>> then just tell the laptop to use them.
>> 
>> Simple enough, except that the desktop is AMD Phenom, and the laptop is
>> Intel 64 bit Atom.  Up to now, each system had unique CFLAGS to squeeze
>> as much performance as possible.
>> 
>> On the desktop:
>> CFLAGS="-march=barcelona --param l1-cache-size=64 --param
>>  l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe"
>> 
>> On the laptop:
>> CFLAGS="-march=ivybridge --param l1-cache-size=32 --param
>>  l1-cache-line-size=64 --param l2-cache-size=4096 -O2 -pipe"

First of all, I've seen quite a big boost just by using '-O3'!

My speeding-up-relevant flags (for a Athlon II X2 250 "Regor") are:

-O3 -march=native -mtune=native -mfpmath=sse -msse4a \
-funwind-tables -fasynchronous-unwind-tables

You'll have to adjust -march=/-mtune= for the Atom and -m* for both,
crosscheck with e.g. 

$ grep ^flags /proc/cpuinfo |tr ' ' '\n' |grep sse | sort -u
misalignsse
sse
sse2
sse4a

or app-portage/cpuid2cpuflags.

>> I don't want to give up these tunings, but from the wiki page [1] I can
>> see no straightforward way to have different CFLAGS when compiling binary
>> packages, from the normal CFLAGS when installing directly from source on
>> the host system.  Is the only way of doing this to set up a full-blown
>> cross-development environment?
>> 
>> [1]
>> https://wiki.gentoo.org/wiki/Binary_package_guide
>
>On the desktop you could just use -march=native for its own compiles, not sure 
>if there is a benefit or good reason to use '-march=barcelona', but I'm 
>digressing.
>
>If you are compiling binary packages for the laptop with a single stanza on 
>the CLI, then you can run:
>
>CFLAGS="-march=ivybridge ..." CXXFLAGS="-march=ivybridge ..." 
>FEATURES="buildpkg" PKGDIR="/tmp/binpkg_dir emerge -uaNDv --buildpkg world
>
>I understand you will need the complete CFLAGS & CXXFLAGS for the guest's 
>hardware - others should confirm if this is so.

Depends on how far you want to go on optimization ;)

>I find it neater/easier to copy the guest's fs over to the faster host, then 
>chroot into it, sync portage and emerge with --buildpkg world.  There are 
>other solutions, NFS mounts of the guest over the network, using a VM 
>mirroring the laptop build on the host, but they are more complicated for my 
>use case of a single guest.

And/or setup some wrappers/shell-functions, that setup flags like:

 emerge-atom ===
#!/bin/sh
FEATURES="buildpkg"
PKGDIR="${PORTDIR}/laptop_binpkg_dir"
export CFLAGS="..."
export CXXFLAGS="..."
...
emerge "$@"


and then use 'emerge ' for the desktop and 'emerge-atom' for the
laptop. Or something along those lines.

On the other paw, one could run some benchmarks, comparing both native
flags vs. the "common demnominator" (and -O2 vs -O3 ;)...

HTH,
-dnh

-- 
I like offending people, because I think people that get offended
should be offended. -- Linus Torvalds, June 2012 at Aalto Uni



Re: [gentoo-user] media-video/vlc-3.0.2 fails during linking

2018-05-31 Thread David Haller
Hello,

On Thu, 31 May 2018, Mick wrote:
>Any idea what might be causing this?  As it is making matroska, 'undefined 
>references to `libebml::EbmlString::operator' produce an error and the ebuild 
>fails:

PLEASE, always run your emerges with LANG=C and MAKEOPTS="-j1"!

[..]
>demux/mkv/.libs/libmkv_plugin_la-
>matroska_segment_parse.o:matroska_segment_parse.cpp:(.text+0x27da): more 
>undefined references to `libebml::EbmlString::operator 
  ^^^
>std::__cxx11::basic_string, std::allocator 
 ^^^
>> const&() const' follow
>collect2: error: ld returned 1 exit status
[.. lost more because of MAKEOPTS=-j2 or more ..]

Re-emerge dev-libs/libebml! And mind that you compile it with the same
c++-flags as libmatroska (i.e. -std=c++11 or later).

HTH,
-dnh

-- 
 "Waking up this morning was a pointless act of masochism" -- Girl



Re: [gentoo-user] Several packages failing to build

2018-05-15 Thread David Haller
Hello,

On Mon, 14 May 2018, Elijah Mark Anderson wrote:
>in the build log. I had forgotten that I was running emerge with MAKEOPTS="-
>j9", which means that errors are not always at the bottom of the log. When I 
>remembered it, I searched the log for "error[: ]", and bingo! Here's the 
>relevant entry:
>
>[39/106] /usr/bin/python3.5 /usr/lib/python-exec/python3.5/meson --internal 
>msgfmthelper ../appstream-APPSTREAM_0_11_5/data/
>org.freedesktop.appstream.cli.metainfo.xml data/
>org.freedesktop.appstream.cli.metainfo.xml xml /var/tmp/portage/dev-libs/
>appstream-0.11.5/work/appstream-APPSTREAM_0_11_5/po --datadirs=/var/tmp/
>portage/dev-libs/appstream-0.11.5/work/appstream-APPSTREAM_0_11_5/data/
>FAILED: data/org.freedesktop.appstream.cli.metainfo.xml 
>/usr/bin/python3.5 /usr/lib/python-exec/python3.5/meson --internal 
>msgfmthelper ../appstream-APPSTREAM_0_11_5/data/
>org.freedesktop.appstream.cli.metainfo.xml data/
>org.freedesktop.appstream.cli.metainfo.xml xml /var/tmp/portage/dev-libs/
>appstream-0.11.5/work/appstream-APPSTREAM_0_11_5/po --datadirs=/var/tmp/
>portage/dev-libs/appstream-0.11.5/work/appstream-APPSTREAM_0_11_5/data/
>msgfmt: error while opening "/var/tmp/portage/dev-libs/appstream-0.11.5/work/
>appstream-APPSTREAM_0_11_5/po/zh_TW.po/nja.po/npt_BR.po/n...@latin.po/ncs.po/
>ngd.po/nfi.po/nid.po/nlt.po/nen_GB.po/nzh_CN.po/nuk.po/nckb.po/nar.po/nnl.po/
>nru.po/nko.po/nda.po/nsr.po/nfr.po/nhu.po/npt.po/nit.po/nsv.po/nca.po/nes.po/
>nde.po/nsl.po/noc.po/ngl.po/npl.po/ntr.po/nsk.po/neu.po" for reading: Not a 
>directory
>
>Looks like you were right after all, as
>https://bugs.gentoo.org/640916#c7 is indeed a pretty dang close
>match. Looks like a bug in the package itself. I'll mask this
>version, as #c13 claims this is fixed in 0.11.8. Hopefully that'll be
>in the tree soon(TM).

In the meantime, put the attached patch into
/etc/portage/patches/dev-libs/appstream-0.11.5/
e.g. as appstream-0.11.5-po_meson_build.patch

We've got a rare case of "over-escaping" in the meson.build for once,
as meson seems to replace '\\' even in commands by '/', so we end up
with '/n' instead of '\n', i.e. "find -printf '%f/n'" instead of
the correct "find -printf '%f\n'". The single '\n' get replaced by
meson by an actual linebreak, so that works too.

Upstream has fixed it in .8 by putting that stuff into an extra script
see 
https://github.com/ximion/appstream/blob/master/contrib/meson/update-linguas.sh

HTH,
-dnh

-- 
> Vollmonde erscheinen Periodisch alle 28 Tage.
erst jetzt wird mir die Bedeutung des "blutroten Mondes" richtig bewußt.
 [Harald Stowasser und Cheatah in dag°]
diff -urN -x '*~' a/po/meson.build b/po/meson.build
--- a/po/meson.build	2017-09-04 18:09:52.0 +0200
+++ b/po/meson.build	2018-05-15 12:24:42.0 +0200
@@ -21,7 +21,7 @@
 'find ' + meson.current_source_dir() +
 ' -type f' +
 ' -iname "*.po"' +
-' -printf \'%f\\n\'' +
+' -printf \'%f\n\'' +
 ' | grep -oP \'.*(?=[.])\' | sort' +
 ' > ' + join_paths(meson.current_source_dir(), 'LINGUAS')
 ]


Re: [gentoo-user] which microcode gets loaded?

2018-05-14 Thread David Haller
Hello,

On Mon, 14 May 2018, tu...@posteo.de wrote:
[..]
>cat /proc/cpuinfo (from one of the six cores):
>processor  : 4
>vendor_id  : AuthenticAMD
>cpu family : 16
  ^^ decimal = 10h(ex)
>model  : 10
>model name : AMD Phenom(tm) II X6 1090T Processor
[..]
>from linux-firmware (related lines):
>/lib/firmware/amd-ucode/microcode_amd.bin
>/lib/firmware/amd-ucode/microcode_amd_fam15h.bin
>/lib/firmware/amd-ucode/microcode_amd_fam16h.bin  ***
>/lib/firmware/amd-ucode/microcode_amd_fam17h.bin
>
>(***) I think, these microcodes do I need...

Nope. You need microcode_amd.bin, if any. Go into the git-repo for
sys-kernel/linux-firmware[1] and you'll find that the non-versioned
microcode_amd.bin is for fam10h - fam14h.

HTH,
-dnh

[1] https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git

-- 
I love deadlines. I like the whooshing sound they make as they fly by.
   -- Douglas Adams



Re: [gentoo-user] vulkan development...

2018-05-10 Thread David Haller
Hello,

On Tue, 08 May 2018, Alan Grimes wrote:
>After playing Rise of The Tombraider using Vulkan on Gentoo I got
>inspired to try to poke with some source code. I downloaded vkQuake from
>github and tried to build it. It couldn't find ...
>
>Uh, where are the headers? What package are they in? =(

media-libs/vulkan-loader

HTH,
-dnh

-- 
Computers make very fast, very accurate mistakes.



  1   2   3   >