Re: [gentoo-user] Automount under mdev; looking for testers

2012-05-28 Thread Walter Dnes
On Tue, May 29, 2012 at 09:13:24AM +0700, Pandu Poluan wrote

> A quick question : for automounting to work, do you need to do sysctl -w
> kernel.hotplug=/sbin/mdev , or is it optional?

  Thanks, I'll have to document that.  In .config, I think you need
"CONFIG_HOTPLUG=y".  I don't know if the kernel can even be built
without it.  What output do you get from the command

cat /proc/sys/kernel/hotplug

  I get...

/sbin/mdev

  That's what you need.  *IF THAT IS NOT THE CASE FOR YOU* the docs at
http://git.busybox.net/busybox/plain/docs/mdev.txt give 2 options...

1) If you have a proc file system (yes we do), the way to do it is

echo /sbin/mdev > /proc/sys/kernel/hotplug


2) For embedded systems without a proc filesystem, you can

sysctl -w kernel.hotplug=/sbin/mdev


  Option 2 would probably also work for Gentoo, but the proc filesystem
makes things a lot easier.


  In my case hotplug support was enabled and /sbin/mdev was already
listed in /proc/sys/kernel/hotplug.  Google turns up a lot of
documentation for mdev on stripped down embedded systems.  Trying to
apply it to a desktop PC is breaking new ground.

-- 
Walter Dnes 



Re: [gentoo-user] Compile program with older libraries

2012-05-28 Thread Joshua Murphy
On Mon, May 28, 2012 at 7:16 AM, Marko Košmerl  wrote:
> I was able to find suitable gentoo stage 3 tarball:
> http://88.191.254.16/gentoo/releases/x86/2007.0/stages/
>
> Chrooted, compiled the source and tried to run binary it in old system. And
> it worked!
>
>

Glad you got it working! I was worried you might have to go the long
way around...

-- 
Poison [BLX]
Joshua M. Murphy



Re: [gentoo-user] How can I control size of /run (tmpfs)?

2012-05-28 Thread Pandu Poluan
On May 29, 2012 12:53 AM, "pk"  wrote:
>
> On 2012-05-28 05:44, Pandu Poluan wrote:
>
> > But my newer servers has /run (and its children) from the get go,
because I
> > think it kind of makes sense. Even though they're udev-free.
>
> Hm... what is using /run instead of /var/run? I thought it was (newish)
> udev itself and things like systemd that uses /run instead of
> /var/run... just curious.
>
> Best regards
>
> Peter K
>

Nothing that I know of, then. But I  thought if sometime later down the
road some braindead dev assumes that everyone uses udev and hardwired
his/her package to assume /run exists, I'm covered :-)

Rgds,


Re: [gentoo-user] ~gcc-4.7.0

2012-05-28 Thread Michael Mol
On Mon, May 28, 2012 at 10:19 PM, Pandu Poluan  wrote:
>
> On May 29, 2012 4:15 AM, "Stefan G. Weichinger"  wrote:
>>
>> Am 2012-05-28 22:54, schrieb Sascha Cunz:
>> > On Monday, 28. May 2012 22:04:30 Stefan G. Weichinger wrote:
>> >> As GCC-4.7.0 appeared for ~amd64 now ...
>> >>
>> >> anyone recompiled system or world with it already?
>> >>
>> >> More advantages or disadvantages?
>> >
>> > I tried an emerge -ev world yesterday (on a box with a total about 1100
>> > emergeed packages), so far only had compiling trouble with
>> > gst-pluings-ffmpeg
>> > (gcc4.7.0 bug including patch is on b.g.o[1], so was easy to solve) and
>> > firefox 12.
>> >
>> > All of KDE 4.8.3 and libreoffice did emerge nicely. Though i did not
>> > test the
>> > results yet.
>> >
>> > SaCu
>> >
>> > [1] https://bugs.gentoo.org/show_bug.cgi?id=407741
>> >
>>
>>
>> Thanks alot, Sascha, for that helpful feedback!
>>
>> I will give it a try on one of my machines tonight.
>>
>> In gentoo-ricer-terms: did you notice any improvements?
>>
>> ;-)
>>
>
> LOL
>
> Yeah, I am also wondering how much improvement graphite sees with 4.7.0
>
> *shuffles over to gcc changelog

I'm mostly looking forward to Bulldozer support and RDRAND.

-- 
:wq



Re: [gentoo-user] ~gcc-4.7.0

2012-05-28 Thread Pandu Poluan
On May 29, 2012 4:15 AM, "Stefan G. Weichinger"  wrote:
>
> Am 2012-05-28 22:54, schrieb Sascha Cunz:
> > On Monday, 28. May 2012 22:04:30 Stefan G. Weichinger wrote:
> >> As GCC-4.7.0 appeared for ~amd64 now ...
> >>
> >> anyone recompiled system or world with it already?
> >>
> >> More advantages or disadvantages?
> >
> > I tried an emerge -ev world yesterday (on a box with a total about 1100
> > emergeed packages), so far only had compiling trouble with
gst-pluings-ffmpeg
> > (gcc4.7.0 bug including patch is on b.g.o[1], so was easy to solve) and
> > firefox 12.
> >
> > All of KDE 4.8.3 and libreoffice did emerge nicely. Though i did not
test the
> > results yet.
> >
> > SaCu
> >
> > [1] https://bugs.gentoo.org/show_bug.cgi?id=407741
> >
>
>
> Thanks alot, Sascha, for that helpful feedback!
>
> I will give it a try on one of my machines tonight.
>
> In gentoo-ricer-terms: did you notice any improvements?
>
> ;-)
>

LOL

Yeah, I am also wondering how much improvement graphite sees with 4.7.0

*shuffles over to gcc changelog

Rgds,


Re: [gentoo-user] Automount under mdev; looking for testers

2012-05-28 Thread Pandu Poluan
On May 29, 2012 5:23 AM, "Walter Dnes"  wrote:
>
>  More beta-testing, and some "shiney" for mdev users... yes, we now
> have automount.  I have no problem with manually mounting usb
> drives/keys/cameras/etc, but some people insist on automount.  I've
> worked out how to implement automounting under mdev.  I've got it
> working on a machine at home, but we should have more testing before
> posting this in the Gentoo mdev wiki.
>
>  There are a few preliminary setup steps required first.  Everything
> except part 4) b) is done as root.  4) b) is done by each regular user
> that needs to unmount USB-plugable devices.
>
> 1) If you haven't already done so, install programs "pmount" and "sudo"
> emerge pmount sudo
>
>
> 2) Create directory /media (It *MUST* be "/media").
>
>
> 3) Regular user accounts that need to access FAT-formatted USB keys need
> to be added to group "plugdev".
>
>
> 4) a) In /etc/sudoers.d create a file (if it doesn't exist).  To the file
> add a line like...
>
> USERID  HOSTNAME = (root) NOPASSWD: /bin/umount /media/*
>
> Replace "USERID" and "HOSTNAME" with the actual regular userid and the
> actual hostname.  If you have 2 or more users that need to automount USB
> devices, add a separate line for each one.
>
> 4) b) Yanking out a USB key or external drive, after writing, without
> unmounting it first, "is not a good thing".  Since the USB device is
> automounted by root, a regular user needs to use sudo to unmount it.
> That's why we installed sudo.  E.g...
> sudo /bin/umount /media/sdb1
>
> To make things easy for lazy typists, create a 2-line executable
> script "~/bin/um" in the regular user's home bin directory like so...
>
> #/bin/bash
> sudo /bin/umount /media/${1}
>
> It can be executed as "um sdb1" to unmount /media/sdb1
>
>
> 5) In case something goes drastically wrong, you should have a bootable
> CD or USB stick handy, to recover with.
>
>
>  When running with mdev instead of udev under Gentoo, device setup is
> controlled by /etc/mdev.conf.  There is a brief intro to the syntax at
> http://git.busybox.net/busybox/plain/docs/mdev.txt
>
>  We will make one change to /etc/mdev.conf and add a script to /lib/mdev/
>
> 1) Make a backup copy of /etc/mdev.conf
>
> cp /etc/mdev.conf /etc/mdev.conf.000
>
>  If stuff goes terribly wrong, you can boot from recovery media and
> revert to the previous version, i.e.
>
> cp /etc/mdev.conf.000 /etc/mdev.conf
>
>
> 2) Change a line in /etc/mdev.conf from
> sd[a-z].*   root:disk 660 */lib/mdev/usbdisk_link
>
> to
>
> sd[a-z].*   root:disk 660 */lib/mdev/usbdisk_automount
>
>
> 3) Take the file "usbdisk_automount" (listedbelow) and copy it to
> /lib/mdev/usbdisk_automount and remember to set it executable, e.g.
>
> chmod 744 /lib/mdev/usbdisk_automount
>
> Automounting should work now; rebooting is not required.  Plug in USB
> keys/hard-drives/card-readers/direct-connection-to-cameras and play
> around with them.
>
> NOTES
> =
>
> 1) Sorry, pmount is hard-coded to mount in /media, e.g. /media/sdb1, and
> similar.  If you want it mounting elsewhere, please submit patches to
> upstream.
>
> 2) If you connect a device (key or hard drive) formatted with a posix
> filesystem (ext2/3/4, reiserfs, btrfs, etc) file permissions will apply
> as usual.  I.e. a regular user won't be able to modify/delete files
> owned by other users (including root).  The various FAT variants do not
> support posix file permissions.  pmount arbitrarily assigns user:root
> and group:plugdev to all files+directories on FAT-based filesystems.  By
> using the "--umask 007" option in pmount, all files on FAT-based devices
> can be read+written by root and members of the plugdev group.
>
> 3) For the beta testing, I've enabled debug logging to a temporary log
> file /dev/shm/mdevlog.txt
>
> 4) Does anyone have a USB key or memory card that has the pathological
> setup where the entire stick is a FAT partition, without a partition
> table?  If so, can you please let me know if automounting works with it?
> If not please...
>
> * unplug the device
> * delete the file /dev/shm/mdevlog.txt
> * plug the device in
> * wait a few seconds and unplug it
> * email me the contents of /dev/shm/mdevlog.txt
>
> 5) usbdisk_automount begins below
>
> #!/bin/bash
> #
> # At bootup, "mdev -s" is called.  It does not pass any environmental
> # variables other than MDEV.  If no ACTION variable is passed, exit
> # the script.
> if [ "X${ACTION}" == "X" ] ; then exit 0 ; fi
> #
> # Execute only if the device already exists; otherwise exit
> if [ ! -b ${MDEV} ] ; then exit 0 ; fi
> #
> # Also only execute for partitions, not the underlying disks.
> if [ "X${DEVTYPE}" != "Xpartition" ] ; then exit 0 ; fi
>
> # Debug data dump.
> exec 3>> /dev/shm/mdevlog.txt
> echo "=== * ${SEQNUM}" >&3
> /usr/bin/printenv >&3
> exec 3>&-
>
> #
> # The "add" action.
> if [ "X${ACTION}" == "Xadd" ] ; then
> #
> # Create the directory in /media
>   mkdir -p /media/${MDEV}
> #
> # Mount the dire

Re: [gentoo-user] Can't emerge any gcc

2012-05-28 Thread W.Kenworthy
ram usage just before failure? - do you have enough, and enough disk
space?

BillK



-Original Message-
From: Ezequiel Garcia 
Reply-to: gentoo-user@lists.gentoo.org
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Can't emerge any gcc
Date: Sun, 27 May 2012 21:08:21 -0300

Hi,

On Sun, May 27, 2012 at 8:48 PM, William Kenworthy  wrote:
> probably not, you will need some more info as its a bit vague:
>
> What does "gcc -v" say?

Using built-in specs.
Target: i686-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.4.5
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.4.5/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.5
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.5/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.4.5/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.4.5/include/g++-v4
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--disable-fixed-point --without-ppl --without-cloog --enable-nls
--without-included-gettext --with-system-zlib --disable-werror
--enable-secureplt --disable-multilib --enable-libmudflap
--disable-libssp --enable-libgomp
--with-python-dir=/share/gcc-data/i686-pc-linux-gnu/4.4.5/python
--enable-checking=release --disable-libgcj --with-arch=i686
--enable-languages=c,c++,fortran --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.5
p1.3, pie-0.4.5'
Thread model: posix
gcc version 4.4.5 (Gentoo 4.4.5 p1.3, pie-0.4.5)

>
> and "gcc-config -l"
>

localhost v4l-dvb # gcc-config -l
 [1] i686-pc-linux-gnu-4.4.5 *

> Can you compile anything, either through emerge or manually (i.e., even
> a  small "hello world")
>

Indeed! I can emerge other stuff.
Plus right now I'm working and compiling my stuff.

Feel free to ask me anything else,
Thanks,
Ezequiel.





Re: [gentoo-user] How can I control size of /run (tmpfs)?

2012-05-28 Thread Neil Bothwick
On Mon, 28 May 2012 20:31:39 +0200, Jarry wrote:

> But I'm still missing answer for my second question:
> 
> >> Q2: Can I turn this "/run in tmpfs" feature off?  

Of course you can, you have the source. However, it appears that no one
has implemented that particular feature for you yet. Maybe it is because
they have better things to do that move 300KB of files from the kernel's
caches to a disk filesystem from where it will be loaded into the
kernel's caches. That's the key point, that you don't actually save
memory by moving the files to a disk unless you are REALLY low on memory,
and then you have bigger things to worry about.


-- 
Neil Bothwick

This tagline is baroque; please call Bach.


signature.asc
Description: PGP signature


Re: [gentoo-user] How can I control size of /run (tmpfs)?

2012-05-28 Thread Neil Bothwick
On Mon, 28 May 2012 21:24:59 +0200, Jarry wrote:

> > But why would you want to?  
> 
> I do not see any advantage in having /run on tmpfs.

Even though you have had several benefits explained to you? Files in /run
have to be available and writeable at all times from early boot onwards,
using a hard disk filesystem cannot guarantee this.

> > will be automatically moved to your swap partition if doing so
> > benefits your system.  
> 
> I'm not sure it is true. I have read somewhere that tmfps is
> never moved to swap.

You can justify anything you like with something you have read somewhere.
However, if you read the kernel docs on tmpfs you'll see

"tmpfs puts everything into the kernel internal caches and grows and
shrinks to accommodate the files it contains and is able to swap
unneeded pages out to swap space. It has maximum size limits which can
be adjusted on the fly via 'mount -o remount ...'"


-- 
Neil Bothwick

Barth's Distinction:
There are two types of people: those who divide people into two types, and
those who don't.


signature.asc
Description: PGP signature


[gentoo-user] Automount under mdev; looking for testers

2012-05-28 Thread Walter Dnes
  More beta-testing, and some "shiney" for mdev users... yes, we now
have automount.  I have no problem with manually mounting usb
drives/keys/cameras/etc, but some people insist on automount.  I've
worked out how to implement automounting under mdev.  I've got it
working on a machine at home, but we should have more testing before
posting this in the Gentoo mdev wiki.

  There are a few preliminary setup steps required first.  Everything
except part 4) b) is done as root.  4) b) is done by each regular user
that needs to unmount USB-plugable devices.

1) If you haven't already done so, install programs "pmount" and "sudo"
emerge pmount sudo


2) Create directory /media (It *MUST* be "/media").


3) Regular user accounts that need to access FAT-formatted USB keys need
to be added to group "plugdev".


4) a) In /etc/sudoers.d create a file (if it doesn't exist).  To the file
add a line like...

USERID  HOSTNAME = (root) NOPASSWD: /bin/umount /media/*

Replace "USERID" and "HOSTNAME" with the actual regular userid and the
actual hostname.  If you have 2 or more users that need to automount USB
devices, add a separate line for each one.

4) b) Yanking out a USB key or external drive, after writing, without
unmounting it first, "is not a good thing".  Since the USB device is
automounted by root, a regular user needs to use sudo to unmount it.
That's why we installed sudo.  E.g...
sudo /bin/umount /media/sdb1

To make things easy for lazy typists, create a 2-line executable
script "~/bin/um" in the regular user's home bin directory like so...

#/bin/bash
sudo /bin/umount /media/${1}

It can be executed as "um sdb1" to unmount /media/sdb1


5) In case something goes drastically wrong, you should have a bootable
CD or USB stick handy, to recover with.


  When running with mdev instead of udev under Gentoo, device setup is
controlled by /etc/mdev.conf.  There is a brief intro to the syntax at
http://git.busybox.net/busybox/plain/docs/mdev.txt

  We will make one change to /etc/mdev.conf and add a script to /lib/mdev/

1) Make a backup copy of /etc/mdev.conf

cp /etc/mdev.conf /etc/mdev.conf.000

  If stuff goes terribly wrong, you can boot from recovery media and
revert to the previous version, i.e.

cp /etc/mdev.conf.000 /etc/mdev.conf


2) Change a line in /etc/mdev.conf from
sd[a-z].*   root:disk 660 */lib/mdev/usbdisk_link

to

sd[a-z].*   root:disk 660 */lib/mdev/usbdisk_automount


3) Take the file "usbdisk_automount" (listedbelow) and copy it to
/lib/mdev/usbdisk_automount and remember to set it executable, e.g.

chmod 744 /lib/mdev/usbdisk_automount

Automounting should work now; rebooting is not required.  Plug in USB
keys/hard-drives/card-readers/direct-connection-to-cameras and play
around with them.

NOTES
=

1) Sorry, pmount is hard-coded to mount in /media, e.g. /media/sdb1, and
similar.  If you want it mounting elsewhere, please submit patches to
upstream.

2) If you connect a device (key or hard drive) formatted with a posix
filesystem (ext2/3/4, reiserfs, btrfs, etc) file permissions will apply
as usual.  I.e. a regular user won't be able to modify/delete files
owned by other users (including root).  The various FAT variants do not
support posix file permissions.  pmount arbitrarily assigns user:root
and group:plugdev to all files+directories on FAT-based filesystems.  By
using the "--umask 007" option in pmount, all files on FAT-based devices
can be read+written by root and members of the plugdev group.

3) For the beta testing, I've enabled debug logging to a temporary log
file /dev/shm/mdevlog.txt

4) Does anyone have a USB key or memory card that has the pathological
setup where the entire stick is a FAT partition, without a partition
table?  If so, can you please let me know if automounting works with it?
If not please...

* unplug the device
* delete the file /dev/shm/mdevlog.txt
* plug the device in
* wait a few seconds and unplug it
* email me the contents of /dev/shm/mdevlog.txt

5) usbdisk_automount begins below

#!/bin/bash
#
# At bootup, "mdev -s" is called.  It does not pass any environmental
# variables other than MDEV.  If no ACTION variable is passed, exit
# the script.
if [ "X${ACTION}" == "X" ] ; then exit 0 ; fi
#
# Execute only if the device already exists; otherwise exit
if [ ! -b ${MDEV} ] ; then exit 0 ; fi
#
# Also only execute for partitions, not the underlying disks.
if [ "X${DEVTYPE}" != "Xpartition" ] ; then exit 0 ; fi

# Debug data dump.
exec 3>> /dev/shm/mdevlog.txt
echo "=== * ${SEQNUM}" >&3
/usr/bin/printenv >&3
exec 3>&-

#
# The "add" action.
if [ "X${ACTION}" == "Xadd" ] ; then
#
# Create the directory in /media
   mkdir -p /media/${MDEV}
#
# Mount the directory in /media
   pmount --umask 007 --noatime /dev/${MDEV}
#
# The "remove" action.
elif [ "X${ACTION}" == "Xremove" ] ; then
#
# Unmount the directory in /media
   umount /media/${MDEV}
#
# Delete the directory in /media
   rm -rf /media/${MDEV}
fi


-- 
Walter Dnes 



[gentoo-user] Problem with fan control on laptop

2012-05-28 Thread Peiding CHEN
Hello,I've suffered from the problem with cpu fan control on my laptop for a long time. I hope someone could help me get rid of it.Here is the problem:My laptop is "Toshiba Portégé M901". I installed Gentoo with xfce4 as the desktop environment and compiled the kernel manually. After system booting, the fan will either doesn't spin at all or spins only at one speed level and the speed will never change. The automatic control is only activated when the cpu temperature drops and passes the trip point (doesn't start while temperature increase). But I can control the speed manually. So my temporary solution is to start the fan manually in high speed when I run some heavy applications for getting a high cpu temperature(more than 70°C). Then when the temperature drops and passes the trip point, the automatic control is activated. The fan could be modulated according to the cpu temperature as what it should be. The way to activate the fan manually grep . /sys/class/thermal/*/*echo 0 > /sys/class/thermal/cooling_device4/cur_stateecho 0 > /sys/class/thermal/cooling_device5/cur_stateI think it's weird to start the fan by "echo 0" since it commonly means stopping the fan. I should do "echo 0" first to make the fan work at certain speed(running "echo 1 > " at the first doesn't work). Then all commands seem to work correctly as "echo 0" for stopping and "echo 1" for start.PS: in my laptop:/sys/class/thermal/cooling_device0/type:LCD/sys/class/thermal/cooling_device1/type:Processor/sys/class/thermal/cooling_device2/type:Processor/sys/class/thermal/cooling_device3/type:Fan/sys/class/thermal/cooling_device4/type:Fan/sys/class/thermal/cooling_device5/type:Fan/sys/class/thermal/cooling_device6/type:Fan/sys/class/thermal/cooling_device7/type:Fan/sys/class/thermal/cooling_device8/type:FanThe output of dmesg suggest that all fans are on.[7.015190] ACPI: Fan [FAN0] (on)[7.015235] ACPI: Fan [FAN1] (on)[7.015279] ACPI: Fan [FAN2] (on)[7.015322] ACPI: Fan [FAN3] (on)[7.015366] ACPI: Fan [FAN4] (on)[7.015410] ACPI: Fan [FAN5] (on)In addition, xfce4 power-management nor lm_sensors could recognize my fan. Recompiling the kernel by genkernel as "genkernel all" didn't solved the problem.Solution expected:So my fan could work, but the fan couldn't be modulated by itself. I want the automatic control could be activated just after booting. (My temporary solution need CPU work in high temperature, so this doesn't work when I boot up my laptop from the cold).What do you think should I do to? Do you have some ideas? Thanks a lot Regards-- Peiding CHENEtudiant, Spécialité - Energétique et EnvironnementUniversité Pierre et Marie CURIEParisFrance

Re: [gentoo-user] How can I control size of /run (tmpfs)?

2012-05-28 Thread Michael Mol
On Mon, May 28, 2012 at 3:24 PM, Jarry  wrote:
> On 28-May-12 20:58, Michael Mol wrote:
>
> Q2: Can I turn this "/run in tmpfs" feature off?
>>
>>
>> Up front: I don't know. Not my area of expertise, but I also don't
>> think you've given enough information about your system to really
>> answer.
>>
>> 1) Are you using openrc or systemd? (which version?)
>
>
> openrc 0.9.8.4

I'll let someone more familiary with openrc figure out if/how you'd
reconfigure it wrt /run.

>
>
>> 2) Are you using an initramfs? (Generated by what version of what?)
>
>
> no, but I might be forced to use it later when udev >=181 becomes
> stable.

Is your /usr on a separate partition?

[snip]

>> But why would you want to?
>
>
> I do not see any advantage in having /run on tmpfs.
>
>> will be automatically moved to your swap partition if doing so
>> benefits your system.
>
>
> I'm not sure it is true. I have read somewhere that tmfps is
> never moved to swap.

Then you didn't read the link I gave above, which points directly to
the kernel documentation on tmpfs. Here's the link again:

http://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt

> Anyway, I prefer not using swap at all.

I'm *generally* of the same opinion, but I budge here and there. I try
to have enough RAM in my various systems that I can build chromium and
libreoffice without things getting shoved to swap. (Heh. There's a
losing battle, especially when I parallelize stuff so much. And have
you seen the RAM consumed by ld in chromium's final link stages?)

> And I have better use for physical memory than holding some
> more-or-less statical data...

This is *exactly* what swap is for.

http://kerneltrap.org/node/3000

If you have, e.g. five terabytes of swap space and five terabytes of
RAM, and you set vm.swappiness to 0, your swap space will never get
touched. (Unless you somehow manage to consume all your RAM.)

In such a scenario, it'd be like not having any swap at all.

With that in mind, whether or not you have any swap, your only
sacrifice is how much space on a block device you sacrifice for a swap
partition. With the exception of some virtual machines, none of my
systems have drives smaller than 160GB. Discount laptops and mobile
devices, and none of my systems have drives smaller than 500GB. One
can easily throw 1GB of disk at swap (which then never gets used) and
not notice it in filesystem volume; I have running ext* filesystems
with more intrinsic overhead than that.

[snip]

-- 
:wq



Re: [gentoo-user] ~gcc-4.7.0

2012-05-28 Thread Stefan G. Weichinger
Am 2012-05-28 22:54, schrieb Sascha Cunz:
> On Monday, 28. May 2012 22:04:30 Stefan G. Weichinger wrote:
>> As GCC-4.7.0 appeared for ~amd64 now ...
>>
>> anyone recompiled system or world with it already?
>>
>> More advantages or disadvantages?
> 
> I tried an emerge -ev world yesterday (on a box with a total about 1100 
> emergeed packages), so far only had compiling trouble with gst-pluings-ffmpeg 
> (gcc4.7.0 bug including patch is on b.g.o[1], so was easy to solve) and 
> firefox 12.
> 
> All of KDE 4.8.3 and libreoffice did emerge nicely. Though i did not test the 
> results yet.
> 
> SaCu
> 
> [1] https://bugs.gentoo.org/show_bug.cgi?id=407741
> 


Thanks alot, Sascha, for that helpful feedback!

I will give it a try on one of my machines tonight.

In gentoo-ricer-terms: did you notice any improvements?

;-)

Stefan



Re: [gentoo-user] ~gcc-4.7.0

2012-05-28 Thread Sascha Cunz
On Monday, 28. May 2012 22:04:30 Stefan G. Weichinger wrote:
> As GCC-4.7.0 appeared for ~amd64 now ...
> 
> anyone recompiled system or world with it already?
> 
> More advantages or disadvantages?

I tried an emerge -ev world yesterday (on a box with a total about 1100 
emergeed packages), so far only had compiling trouble with gst-pluings-ffmpeg 
(gcc4.7.0 bug including patch is on b.g.o[1], so was easy to solve) and 
firefox 12.

All of KDE 4.8.3 and libreoffice did emerge nicely. Though i did not test the 
results yet.

SaCu

[1] https://bugs.gentoo.org/show_bug.cgi?id=407741



Re: [gentoo-user] {OT} hire a programmer or company?

2012-05-28 Thread Alan McKinnon
On Mon, 28 May 2012 09:00:55 -0700
Grant  wrote:

> >> I'll be getting my feet wet with this shortly.  Any other tips
> >> regarding the management of one or more programmers working on
> >> various small web projects?  Maybe workflow or any key procedures
> >> a newbie manager should follow?
> >
> > You can get away with almost anything except these two things:
> >
> > Do not micro-manage
> > Do not tell them how to do what they do
> 
> Could you give me an example of this last one?

- I see you are using Perl with hashrefs to do function xyz. Have you
considered (i.e. I would like you to) using $INSERT_SOMETHING_HERE?

- Fiddling with the roadmap. Somehow, this always ends up like the
homeowner overriding the architect and trying to get the roof up
before the walls.

- Giving "advice" on the process such as saying how awesome a concept
stakeholders and product owners are in Scrum. But they use
ExtremeProgramming.

- Wanting to personally review the code often. I've seen some managers
  want to do this daily.

- Get personally involved on their level.


All these things class as interference. Managers and owners who do this
have miles of justifiable reasons for doing so, but it's always hogwash
- they interfere, plain and simple.

> 
> - Grant
> 
> 
> > For everything else, good old communication (that thing you do lots
> > of in business) will see you through.
> >
> > --
> > Alan McKinnnon
> > alan.mckin...@gmail.com
> 



-- 
Alan McKinnnon
alan.mckin...@gmail.com




Re: [gentoo-user] How can I control size of /run (tmpfs)?

2012-05-28 Thread Alan McKinnon
On Mon, 28 May 2012 21:24:59 +0200
Jarry  wrote:

> I always liked Gentoo because it gives me complete freedom
> and control over my system. *I* could decide what I want to
> use or not. And I'd be very dissapointed if Gentoo one day goes
> to "YouCanNotTurnThisOffBecauseWeKnowWhatIsTheBestForYou" way...

Time to put that myth to bed.

If such a day cometh, it will not be because Gentoo decided to do so.
It will be because the current software available offers little choice;
and simply does it that way and only that way.

Gentoo devs have always stuck close to upstream as mucg as possible -
this is not RedHat with large amounts of paid dev talent to mod, tweak
and patch software to do what RH wants it to do.

So lets please stop blaming Gentoo for the route taken by udev and init
system programmers, OK?

-- 
Alan McKinnnon
alan.mckin...@gmail.com




[gentoo-user] ~gcc-4.7.0

2012-05-28 Thread Stefan G. Weichinger

As GCC-4.7.0 appeared for ~amd64 now ...

anyone recompiled system or world with it already?

More advantages or disadvantages?

Thanks, Stefan



[gentoo-user] postfix: mails stuck in queue; relay issues?

2012-05-28 Thread Andrey Moshbear
My mail.log is filling up with messages of the format:

May 28 15:35:19 localhost postfix/smtpd[32669]: <11 hexadecimal
numbers>: client=localhost[127.0.0.1]
May 28 15:35:19 localhost postfix/smtpd[32664]: connect from
localhost[127.0.0.1]
May 28 15:35:19 localhost postfix/smtpd[32669]: lost connection after
RCPT from localhost[127.0.0.1]
May 28 15:35:19 localhost postfix/smtpd[32669]: disconnect from
localhost[127.0.0.1]

Which parts of main.cf warrant closer inspection?

--
001100 m0shbear
010010
00 andrey at moshbear dot net
11 andrey dot vul at gmail
101101
110011



Re: [gentoo-user] How can I control size of /run (tmpfs)?

2012-05-28 Thread Jarry

On 28-May-12 20:58, Michael Mol wrote:


Q2: Can I turn this "/run in tmpfs" feature off?


Up front: I don't know. Not my area of expertise, but I also don't
think you've given enough information about your system to really
answer.

1) Are you using openrc or systemd? (which version?)


openrc 0.9.8.4


2) Are you using an initramfs? (Generated by what version of what?)


no, but I might be forced to use it later when udev >=181 becomes
stable.


3) Are there any circumstances where your root filesystem is read-only?


The only I know is shutdown, when / is remounted read-only.


But why would you want to?


I do not see any advantage in having /run on tmpfs.


will be automatically moved to your swap partition if doing so
benefits your system.


I'm not sure it is true. I have read somewhere that tmfps is
never moved to swap. Anyway, I prefer not using swap at all.
And I have better use for physical memory than holding some
more-or-less statical data...


I always liked Gentoo because it gives me complete freedom
and control over my system. *I* could decide what I want to
use or not. And I'd be very dissapointed if Gentoo one day goes
to "YouCanNotTurnThisOffBecauseWeKnowWhatIsTheBestForYou" way...


Jarry
--
___
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.



Re: [gentoo-user] How can I control size of /run (tmpfs)?

2012-05-28 Thread Michael Mol
On Mon, May 28, 2012 at 6:31 PM, Jarry  wrote:
> But I'm still missing answer for my second question:
>>> Q2: Can I turn this "/run in tmpfs" feature off?

Up front: I don't know. Not my area of expertise, but I also don't
think you've given enough information about your system to really
answer.

1) Are you using openrc or systemd? (which version?)
2) Are you using an initramfs? (Generated by what version of what?)
3) Are there any circumstances where your root filesystem is read-only?

But why would you want to? As has been pointed out at least a few
times, and is described in the link I gave earlier, anything in there
will be automatically moved to your swap partition if doing so
benefits your system.

The only circumstances I can think of where this wouldn't happen is if
you don't have swap (understandable in that circumstance), or if you
have swappiness set to 0.

-- 
:wq



Re: [gentoo-user] How can I control size of /run (tmpfs)?

2012-05-28 Thread Jarry

On 27-May-12 10:24, Neil Bothwick wrote:


Q1: Can I somehow reduce the size of /run?


That has been answered, either use fstab, which may or not work, or mount
-o remount, which should.


Thanks. It works after I added following line in /etc/fstab:
tmpfs   /run   tmpfs   size=128m,mode=1777   0 0

But I'm still missing answer for my second question:


Q2: Can I turn this "/run in tmpfs" feature off?


Jarry

--
___
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.



[gentoo-user] Re: How to access newsgroup?

2012-05-28 Thread walt
On 05/24/2012 08:30 PM, wenpin cui wrote:

> damn firewall

Your English is better than my Chinese :-D




Re: [gentoo-user] How can I control size of /run (tmpfs)?

2012-05-28 Thread pk
On 2012-05-28 05:44, Pandu Poluan wrote:

> But my newer servers has /run (and its children) from the get go, because I
> think it kind of makes sense. Even though they're udev-free.

Hm... what is using /run instead of /var/run? I thought it was (newish)
udev itself and things like systemd that uses /run instead of
/var/run... just curious.

Best regards

Peter K





Re: [gentoo-user] {OT} hire a programmer or company?

2012-05-28 Thread Grant
>> I'll be getting my feet wet with this shortly.  Any other tips
>> regarding the management of one or more programmers working on various
>> small web projects?  Maybe workflow or any key procedures a newbie
>> manager should follow?
>
> You can get away with almost anything except these two things:
>
> Do not micro-manage
> Do not tell them how to do what they do

Could you give me an example of this last one?

- Grant


> For everything else, good old communication (that thing you do lots of
> in business) will see you through.
>
> --
> Alan McKinnnon
> alan.mckin...@gmail.com



Re: [gentoo-user] {OT} hire a programmer or company?

2012-05-28 Thread Michael Orlitzky
On 05/27/2012 05:18 PM, Alan McKinnon wrote:
> 
> You need an existing development house with a reputation to uphold,
> located in the same city as you.

Without getting into the (book-length) details, I'll +1 this.



Re: [gentoo-user] Compile program with older libraries

2012-05-28 Thread Marko Košmerl
I was able to find suitable gentoo stage 3 tarball:
http://88.191.254.16/gentoo/releases/x86/2007.0/stages/

Chrooted, compiled the source and tried to run binary it in old system. And
it worked!

On Fri, May 25, 2012 at 12:55 PM, Joshua Murphy  wrote:

> On Thu, May 24, 2012 at 9:15 AM, Marko Košmerl  wrote:
> > Hi!
> >
> > I have some program which I am using in a thin client  which has Gentoo
> > stage 3 root fs (kernel 2.6.39.4),
> > lets call it system A.
> > I've also compiled that program chroot-ed in this stage 3 fs from my
> > personal computer.
> >
> > I have an other thin clients which have older system (B) on it which is
> > older linux kernel 2.6.16.27.
> > Library version which are needed are of course different and for that
> reason
> > my program
> > can not be run in this sistem.
> >
> > System A:
> > Linux redondo 2.6.39.4 #18 Mon Mar 19 13:14:32 CET 2012 i586 i586 i386
> > GNU/Linux
> > /lib/libc-2.12.2.so
> > gcc version 4.0.3
> >
> > System B:
> > Linux carlos  2.6.16.27 #1 Sun Mar 25 11:09:40 CEST 2007 i586 i586 i386
> > GNU/Linux
> > /lib/libc-2.3.6.so
> > gcc version 4.0.3
> >
> > Shared libraries that my binary uses are (in system A):
> > linux-gate.so.1 =>  (0xe000)
> > libpthread.so.0 => /lib/libpthread.so.0 (0xf76d6000)
> > libuuid.so.1 => /lib/libuuid.so.1 (0xf76d1000)
> > libstdc++.so.6 => /usr/lib/gcc/i486-pc-linux-gnu/4.4.5/libstdc++.so.6
> > (0xf75da000)
> > libm.so.6 => /lib/libm.so.6 (0xf75b2000)
> > libc.so.6 => /lib/libc.so.6 (0xf7468000)
> > /lib/ld-linux.so.2 (0xf76f3000)
> > libgcc_s.so.1 => /usr/lib/gcc/i486-pc-linux-gnu/4.4.5/libgcc_s.so.1
> > (0xf7449000)
> >
> > If i try to compile my program using '-static' directive, I still have a
> > problem with 4 functions:
> > -initgroups,
> > -getpwnam,
> > -getaddrinfo,
> > -gethostbyname.
> >
> > If I got that right, they use functions which are located in NSS shared
> > libraries.
> >
> > I am looking for a way of compiling my program so that I can run it in
> > system B.
> > I have libraries available from system B and that is all that I have.
> >
> > I need help on getting this done.
> > I guess gcc versions are the same and as well libgcc_s.so.1 shared
> library.
> >
> > My questions are:
> > Can I pull those libraries from system B and use it in compilatin
> process?
> > Would that work?
> > I would still need to get include source files of that version, right?
> > Is there some archive site where I can find so old version of linux
> kernel
> > source?
> > One thing that pops in to my mind is also trying to find gentoo stage 3
> > tarball of the kernel version 2.6.16.27
> > and compile the program there...I tried to search that but no luck in
> > that...
> >
> > Any help would be welcomed!
>
> Well, you could use a chroot on system A to build it against an older
> copy of the library. I can't find a stage3 with that range of glibc,
> though if you can still track down sources to piece together a
> toolchain, LFS 6.2 [1] is from right around that time frame (around
> '06-'07). If anyone has a 2007.1 range stage3 laying around, though,
> all the hard work's already done for setting up a perfect chroot as
> long as it plays well with a newer kernel (or if you can do the build
> in said chroot on system B), I've had issues with a too-new set of
> libraries on older kernels more than once, not sure I've tried the
> other direction.
>
> [1] http://www.linuxfromscratch.org/lfs/view/6.2
>
> --
> Poison [BLX]
> Joshua M. Murphy
>
>