[Dorset] Clive's Problem with /tmp/.X11-unix.

2010-09-06 Thread Ralph Corderoy

Hi,

Some of the feedback on the Ubuntu bugs I raised related to Clive's
issue with the graphical login prompt, gdm, sometimes not starting have
suggested some Ubuntu installations don't have a group called root
defined.  IOW, /etc/group doesn't contain a line similar to

root:x:0:

This causes commands like `chown root:root ...' to not go to well.

As a bit of a random sample, could folks send me the pasted output of
these three commands from their various systems, even non-Ubuntu,
non-Linux ones.

uname -a
lsb_release -a
awk -F: '$1 == root || $3 ~ /^0*$/ {print NR, $0}' /etc/group

If a command gives errors, don't worry, just paste it all back to me.
Sample output for here is

$ uname -a
Linux blake 2.6.24-28-generic #1 SMP Wed Aug 25 15:25:41 UTC 2010 i686 
GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 8.04.4 LTS
Release:8.04
Codename:   hardy
$ awk -F: '$1 == root || $3 ~ /^0*$/ {print NR, $0}' /etc/group
1 root:x:0:
$ 

Probably best to send off-list unless you've something to add to the
conversation to cut down the noise on the list.

Cheers,
Ralph.


--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa


[Dorset] It's been a year in the pipeline.

2010-09-06 Thread Simon O'Riordan
But I've finally got off my butt and written it.
Linux Security Camera is the name of the ftp directory I keep my linux
version of the Vision Master security webcam suite in.
The design is simple and it is easy to download and configure for use
with a Linux platform.
You WILL need to make sure OpenCV libraries are installed (in synaptic
typically), then put the four files into a common directory and run from
the command line using mono...
ftp.simonoriordan.com
b...@simonoriordan.com
quixote1112
You'll need something like Filezilla.
Simono


--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa


Re: [Dorset] Clive's Problem with /tmp/.X11-unix.

2010-09-06 Thread Bob Dunlop
On Mon, Sep 06 at 01:53, jr wrote:
 hi Ralph,
 
  ? ?$ ? ? awk -F: '$1 == root || $3 ~ /^0*$/ {print NR, $0}' /etc/group
  ? ?1 root:x:0:
 
 just wondering why the last field's empty (and doesn't contain user 'root')?
 
 man (5) group specifies:  group_name:passwd:GID:user_list

It's a common ommission/non-requirement.

All users (root included) get their primary group ID from /etc/passwd,
it's the numeric value 4th field.  /etc/group is really about providing
a number/name translation for group IDs and setting the user's supplementary
group IDs.

The fact that a user's primary GID may or may not be in the supplementary
group list is just one of those little pains you have to program around.


If you enjoyed man (5) group you may also like to try man (7) credentials.

-- 
Bob Dunlop

--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa


Re: [Dorset] Clive's Problem with /tmp/.X11-unix.

2010-09-06 Thread jr
Bob, Ralph,

 The fact that a user's primary GID may or may not be in the supplementary
 group list is just one of those little pains you have to program around.

 If you enjoyed man (5) group you may also like to try man (7) credentials.

interesting to see the differences between systems, man (5) group
states that the password is optional but does not say the same for the
uid (list).

slackware doesn't provide man credentials either, related (apparently)
functions are in section 3 and in 'info gnutls' -- I'll take a deep
breath and get some more 'enjoyment' :-)

I will have a look however at the newgrp thing, Ralph, sounds
intriguing; won't be using PERL though, that syntax makes my eyes
bleed!!

-- 
regards, jr.

time flies like an arrow, fruit flies like a banana.

--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa


[Dorset] Updating Software on Linux without rebooting

2010-09-06 Thread Terry Coles
Hi,

I got into a conversation today at work about the need to reboot Windows 
machines after installing, uninstalling or updating software.  My colleague 
said that he couldn't see how it could be done after I had said that the newer 
versions of Windows server do this.  (A customer complained that some software 
that we had shipped needed two reboots to get it working in Windows Server 
2008.)  To this I mentioned that Linux had been doing this for years, but 
couldn't explain how.

Can anyone point me at a 101 standard tutorial or reference page which 
explains how running code gets overwritten in memory when Linux updates 
packages?

-- 
Terry Coles
64 bit computing with Kubuntu Linux


--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa


Re: [Dorset] Updating Software on Linux without rebooting

2010-09-06 Thread Terry Coles
On Monday 06 Sep 2010, Robert Bronsdon wrote:
 On Mon, 06 Sep 2010 17:02:23 +0100, Terry Coles d-...@hadrian-way.co.uk
 
 wrote:
  Can anyone point me at a 101 standard tutorial or reference page which
  explains how running code gets overwritten in memory when Linux updates
  packages?
 
 I think you'll find (someone may correct me soon) that most of the time
 the code doesn't get update in the running software.
 
 What tends to happen is you will update (for example) Apache, the files on
 disk will be re-written but the old version of the application will
 continue to run from memory. Then you will manually reboot Apache.

I can see how that can work for a desktop, because you will eventually shut 
the machine down, but AIUI, Apache can be updated on a running server without 
rebooting or restarting it and this has been a feature for years.

-- 
Terry Coles
64 bit computing with Kubuntu Linux


--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa


Re: [Dorset] Updating Software on Linux without rebooting

2010-09-06 Thread Robert Bronsdon
On Mon, 06 Sep 2010 17:27:44 +0100, Terry Coles d-...@hadrian-way.co.uk  
wrote:


I can see how that can work for a desktop, because you will eventually  
shut the machine down, but AIUI, Apache can be updated on a running  
server without rebooting or restarting it and this has been a feature  
for years.


You don't have to restart the hardware - just the single program that has  
been updated. So on Red Hat systems you would service httpd restart (not  
sure how to do it on Debian)


On other systems you could just send SIGHUP to the parent process of the  
server.


But the running apache instance will need to be re-started. It just  
doesn't require taking the whole system down.



--
Robert Bronsdon

--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa


Re: [Dorset] Clive's Problem with /tmp/.X11-unix.

2010-09-06 Thread Dan Dart
 1 root:x:0:clive,root

I thoughth normal users weren't allowed to be in the root group?
I thought they usually go in wheel or admin (ubuntu) but only root if
they need to access root's files that are setguid or chmod g+

--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa


Re: [Dorset] Updating Software on Linux without rebooting

2010-09-06 Thread Keith Edmunds
On Mon, 6 Sep 2010 17:24:42 +0100, d-...@hadrian-way.co.uk said:

 That's as I understand it, but there is apparently a company out there 
 somewhere that can patch a running kernel for Enterprise customers.

Well, actually, anyone can do that for any customer, although I wouldn't
recommend it.

Previous posters are right: the currently-running application will run
from memory. Some upgrades (eg, Apache under Debian) will restart the
daemon as part of the upgrade.

--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa


Re: [Dorset] Updating Software on Linux without rebooting

2010-09-06 Thread Andrew R Paterson
On Monday 06 September 2010, Keith Edmunds wrote:
 On Mon, 6 Sep 2010 17:24:42 +0100, d-...@hadrian-way.co.uk said:
  That's as I understand it, but there is apparently a company out there
  somewhere that can patch a running kernel for Enterprise customers.
 
 Well, actually, anyone can do that for any customer, although I wouldn't
 recommend it.
 
 Previous posters are right: the currently-running application will run
 from memory. Some upgrades (eg, Apache under Debian) will restart the
 daemon as part of the upgrade.
 
 --
 Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
 Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
 How to Report Bugs Effectively:  http://bit.ly/4sACa
As I recall
Normal user space executable files
An running executable (ELF executable at any rate [ file /bin/cat to 
see] ) holds its executable file open and pages in from this executable file 
(when read-only or clean pages are required). The executable pages OUT (i.e. 
pages that have changed - dirty) to the swap file - from where they are paged 
back in if required.
Thus - (and I have seen this happen) if you _overwrite_ a running programs' 
executable file it will more than likely crash!
BUT The standard technique used for installing a new executable file (Used 
to be - at any rate) is to first of all delete (aka rm) the existing file 
before creating the new one.
This invokes an ancient bit of UNIX/Linux fundamentals... a file is NOT 
actually deleted until no executables have it open. - thus the running program 
still has access to the already open ORIGINAL executable file - so pages in 
happilly and keeps running. But the original file is no longer visible in the 
file-system (but it still occupies an inode).
The updating software then creates a NEW executable (the updated version) and 
any new invocations of the executable file lo  behold will now run the updated 
version.
Thus you can update a running executable file.

As for Windows - you must be joking!

-- 
Andy Paterson

--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa


Re: [Dorset] Updating Software on Linux without rebooting

2010-09-06 Thread Simon O'Riordan
On Mon, 2010-09-06 at 20:17 +0100, Andrew R Paterson wrote:

 As for Windows - you must be joking!
 
So we'll be seeing Bill Gates doing stand-up then?
Simono


--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa


Re: [Dorset] gcc cross compiling to m68k

2010-09-06 Thread Dan Dart
 initial questions, if anyone on the list has experience using gcc as a
 cross-compiler.
Yep - I use buildroot a lot.

 What's multilib and how does it fit in with newlib (which I gather I need to
 build for a different target)?
Multilib is a feature of gcc that lets you compile for multiple
architectures with one binary e.g. x86/x86_64, or even x86/ppc (I
think)
Newlib is a C library, replacing glibc or µclibc

 Do I need to do a specific gcc build for m68k (I'm assuming yes, but
 confirmation would be nice!).
Most definitely. You need gcc to compile a static gcc that compiles
code for m68k on your architecture. And maybe including a m68k version
of gcc (only runs on m68k)

 I assume I also need to build binutils for m68k too?
Most definitely again. That's the second thing you put in your
toolchain, after kernel headers. You compile gcc against that.

Hope that helps

Dan

--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa

Re: [Dorset] Updating Software on Linux without rebooting

2010-09-06 Thread Dan Dart
. running code gets overwritten
Not Firefox... yet...

--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa


Re: [Dorset] Clive's Problem with /tmp/.X11-unix.

2010-09-06 Thread jr
hi Ralph,

    ralph:x:1000:1000:Ralph Corderoy,,,:/home/ralph:/bin/bash
    ralph:x:1000:
 newgrp(1) will still let me change to group `ralph' even though
 I'm not explicitly listed in /etc/group.

so what you're saying is that newgrp allows you to change group *to*
the group that you're in already?
ie GID 1000 is your default group, and you can execute 'newgrp ralph'
straight after a login?

doesn't work for me here, I can change to other groups (which I'm a
member of) only.

-- 
regards, jr.

time flies like an arrow, fruit flies like a banana.

--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa


[Dorset] Blandford Forum Pub Meet Tonight, Tue 2010-09-07 20:00.

2010-09-06 Thread Ralph Corderoy

Hi,

T - 19-and-a-bit and counting.  We're at Blandford Forum this evening,
in the refined atmosphere of the Crown Hotel from 8pm onwards.

http://dorset.lug.org.uk/wiki/doku.php?id=meetings:pub

Cheers,
Ralph.


--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa


Re: [Dorset] gcc cross compiling to m68k

2010-09-06 Thread Ralph Corderoy

Hi Tim,

 I'm trying to get started on evaluating gcc for generating m68k code
 for embedded targets. I'm using Debian 5.0 but can pull in more recent
 gcc source if required. I've spent a few hours Googlin' around and
 have some initial questions, if anyone on the list has experience
 using gcc as a cross-compiler.

I've done `build ARM on x86' ages ago, and the `three-stage bootstrap'
before that to get a decent compiler on Ultrix, a Unix from DEC, but
nothing more recent, I install what others have built, so this could be
out of date...

 What's multilib and how does it fit in with newlib (which I gather I
 need to build for a different target)?

I don't think multilib is relevant to what you're doing.  Presumably,
this is non-Linux, and you're primarily interested in the quality of
code gcc produces.  Building newlib with your cross-compiling toolchain
gives you a C library, if you need one.

 Do I need to do a specific gcc build for m68k (I'm assuming yes, but
 confirmation would be nice!).

Yes, I think gcc only supports the one target you state when it's built,
unlike LLVM and clang, IIRC, which can have a whole load thrown in and
you choose at run-time.  (LLVM doesn't support m68k though AFAICS.
Perhaps in time.  It has some experimental PIC16 support now.)

 I assume I also need to build binutils for m68k too?

Yes.  I've always thought the `toolchain' people refer to is the group
of target-architecture-specific commands to get from textual source to
runable binary, e.g. ELF, COFF, or just hex.  as(1), cc(1), ld(1), and
so on.  binutils provides some of them.  But it seems it may be wider
than that and include make(1), etc., which don't need to know of the
cross-compilation.

You may find

http://vmlinux.org/crash/mirror/www.objsw.com/CrossGCC/FAQ.html

of use.  I can't contact the author's site, and it's probably out of
date, but chapter four gives an idea of the steps involved.

Cheers,
Ralph.


--
Next meeting:  Blandford Forum, Tuesday 2010-09-07 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://bit.ly/4sACa