List Info

Thread: Ubuntu?




Ubuntu?
user name
2007-07-31 09:22:40
Hi all,

    I've been using ALFS hosted on an Ubuntu machine and
have
run into a couple of problems.  I worked around the problems
myself
but I figured I'd post the problems and my work arounds for
anyone
else that may run into them.

    First, I'm using an older Ubuntu distro (Hoary).  There
were two
major problems I ran into.

    The first problem was with the "md5sum"
command.  For whatever
reason the md5sum command on Ubuntu Hoary won't allow use
of
stdin as the source of the "checkfile" argument. 
The "checkfile" arg
must come from a real file.  So my fix was to modify the
func_download_pkgs
file to write the MD5 variable to a temporary file and then
change the
actual check to:

    if ! md5sum -c .t >/dev/null ; then

The change was required in two places.

    The second problem was with the tar command.  For
whatever
reason the tar command on Ubuntu Hoary can not untar files
with
.bz2, .gz, etc. extensions.  The files must be uncompressed
before
being unarchived.  Solving this problem took a little more
work.  I had
to make a wrapper script (TAR) for tar that checked the
extension
and then used the correct uncompressor and piped the output
to
tar as follows:


> #/bin/sh
>
> opts=""
> while [ $# -gt 1 ]
> do
>         opts="$$ "
>         shift
> done
>
> echo $ | grep -q ".tar.gz"
> if [ $? -eq 0 ]
> then
>         gunzip -c $ | tar $- 2>/dev/null
> else
>         bunzip2 -c $ | tar $- 2>/dev/null
> fi

The second part of the change was to replace all occurrences
of "tar" in
makefile-functions with "TAR".  Finally, I had to
add:

sudo
cp -av /bin/TAR /mnt/build_dir/tools/bin

to the "mk_CHROOT:" target in LFS/master.sh, and I
had to add:

sudo
cp -av /tools/bin/TAR /mnt/build_dir/bin

to the "mk_BOOT:" targget in LFS/master.sh.


Just one last quick note.  It would be nice if advanced
features of these
commands were not used so the ALFS system would work out of
the
box with distros like Ubuntu.  Just my 2 cents.


Mike


-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

Re: Ubuntu?
country flaguser name
Canada
2007-07-31 09:47:24
On Tue, Jul 31, 2007 at 09:22:40AM -0500, Michael J. Lynch
wrote:
> Just one last quick note.  It would be nice if advanced
features of these
> commands were not used so the ALFS system would work
out of the
> box with distros like Ubuntu.  Just my 2 cents.

Did the version check at the beginning report any
incompatible versions
with your host?

--
JH
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

Re: Ubuntu?
country flaguser name
Australia
2007-07-31 19:49:55
> Just one last quick note.  It would be nice if advanced
features of these
> commands were not used so the ALFS system would work
out of the
> box with distros like Ubuntu.  Just my 2 cents.

I know I don't talk much here usually, but personally I
don't feel that ALFS 
being broken on end-user distros like Ubuntu is likely to be
due to a 
problem on ALFS' end.

Ubuntu is obscene in terms of default omissions when
compared to a base LFS, 
even after the build-essential metapackage is installed. 
Personally I avoid 
anything Debian based like the plague; technically speaking
it's horrible, 
and the people are even worse.

If you need a sane build host, I'd either manually build LFS
first, or use 
Slackware.  That's about the only premade distro that I know
of that can be 
relied upon for a genuinely sane build environment out of
the box. 

-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

Re: Ubuntu?
user name
2007-08-01 10:11:32
> Just one last quick note.  It would be nice if advanced
features of these
> commands were not used so the ALFS system would work
out of the
> box with distros like Ubuntu.  Just my 2 cents.

ALFS does not have a lot of dependencies.  The major parts
would exist
in any distro that correctly has its toolchain packages
(gcc,glibc,binutils) set up.  You can try running "sudo
apt-get
install build-essential" on your host, but if this does
not provide
the results you are looking for, there is simply a package
or two that
was hacked up a bit too much in Ubuntu to provide even a
basic build
environment.

Craig Jackson
(TheEpitome)
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

Re: Ubuntu?
country flaguser name
Spain
2007-08-01 11:56:34
El Martes, 31 de Julio de 2007 16:22, Michael J. Lynch
escribió:

>     The first problem was with the "md5sum"
command.  For whatever
> reason the md5sum command on Ubuntu Hoary won't allow
use of
> stdin as the source of the "checkfile"
argument.  The "checkfile" arg
> must come from a real file.  So my fix was to modify
the func_download_pkgs
> file to write the MD5 variable to a temporary file and
then change the
> actual check to:

>     The second problem was with the tar command.  For
whatever
> reason the tar command on Ubuntu Hoary can not untar
files with
> .bz2, .gz, etc. extensions.  The files must be
uncompressed before
> being unarchived.  Solving this problem took a little
more work.  I had
> to make a wrapper script (TAR) for tar that checked the
extension
> and then used the correct uncompressor and piped the
output to

Both, the md5sum work-around and using "-j" or
-"z" in the tar command based 
on the package extension can be found in the old jhalfs
releases.

They was removed in one of the code clean-ups to can have a
more simple, 
readable, and uniform code. Yes, that take out of the game
some older distros 
(Ubuntu 6.06.1 TLS works fine as a host for me), but we
don't have the 
manpower needed to test and support all of them.

Thanks for the reports, at least it will help other users
having the same 
issues in their host.


-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.info
TLDP-ES:                           http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

Re: Ubuntu?
user name
2007-08-01 13:54:37
On 8/1/07, M.Canales.es <macanamacana-es.com> wrote:
>
> Both, the md5sum work-around and using "-j"
or -"z" in the tar command based
> on the package extension can be found in the old jhalfs
releases.
>
> They was removed in one of the code clean-ups to can
have a more simple,
> readable, and uniform code. Yes, that take out of the
game some older distros
> (Ubuntu 6.06.1 TLS works fine as a host for me), but we
don't have the
> manpower needed to test and support all of them.

Manuel, I completely sympathize with the interest of tearing
out
compatibility code, but IMO jhalfs shouldn't exceed the LFS
Host
Requirements limits: coreutils-5.0 and tar-1.14. Or, if
that's a
problem, then jhalfs should probably ship its own version
checking
script to tell users that they'll need to update their
utilities if
necessary.

Another thing that would help in situations like this would
be to make
use of more make variables. For instance, unpack should be
calling
$(TAR) with a default of TAR = tar in the Makefile. Then if
someone
needs to override things, they can do it in a systematic
way:

make TAR=my-tar-wrapper MD5SUM=md5sum-that-handles-stdin

--
Dan
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

Re: Ubuntu?
user name
2007-08-01 13:55:57
On 7/31/07, Michael J. Lynch <mlynchgcom.com> wrote:
>
>     First, I'm using an older Ubuntu distro (Hoary). 
There were two
> major problems I ran into.
>
>     The first problem was with the "md5sum"
command.  For whatever
> reason the md5sum command on Ubuntu Hoary won't allow
use of
> stdin as the source of the "checkfile"
argument.  The "checkfile" arg
> must come from a real file.  So my fix was to modify
the func_download_pkgs
> file to write the MD5 variable to a temporary file and
then change the
> actual check to:
>
>     if ! md5sum -c .t >/dev/null ; then
>
> The change was required in two places.
>
>     The second problem was with the tar command.  For
whatever
> reason the tar command on Ubuntu Hoary can not untar
files with
> .bz2, .gz, etc. extensions.  The files must be
uncompressed before
> being unarchived.  Solving this problem took a little
more work.  I had
> to make a wrapper script (TAR) for tar that checked the
extension
> and then used the correct uncompressor and piped the
output to
> tar as follows:

Michael, what version of the tools are these? You should be
able to
get that with `md5sum --version' and `tar --version'.

--
Dan
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

Re: Ubuntu?
country flaguser name
Spain
2007-08-01 14:17:30
El Miércoles, 1 de Agosto de 2007 20:54, Dan Nicholson
escribió:

> Manuel, I completely sympathize with the interest of
tearing out
> compatibility code, but IMO jhalfs shouldn't exceed the
LFS Host
> Requirements limits: coreutils-5.0 and tar-1.14. Or, if
that's a
> problem, then jhalfs should probably ship its own
version checking
> script to tell users that they'll need to update their
utilities if
> necessary.

Current jhalfs-2.3 already checks for Tar-1.15 and
Bash-3.0.

What is the minimum Coreutils version with md5sum support
for stdin? My 
three-years-old system is using Coreutils-5.2.1 

> Another thing that would help in situations like this
would be to make
> use of more make variables. For instance, unpack should
be calling
> $(TAR) with a default of TAR = tar in the Makefile.
Then if someone
> needs to override things, they can do it in a
systematic way:
>
> make TAR=my-tar-wrapper
MD5SUM=md5sum-that-handles-stdin

Might be a compromise, but I don't have time right now to
try it.

-- 
Manuel Canales Esparcia
Usuario de LFS nº2886:       http://www.linuxfroms
cratch.org
LFS en castellano: http://www.escomp
oslinux.org/lfs-es http://www.lfs-es.info
TLDP-ES:                           http://es.tldp.org
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

RE: Ubuntu? + note to Michael...
country flaguser name
United States
2007-08-01 14:30:51

-----Original Message-----
From: alfs-discuss-bounceslinuxfromscratch.org
[mailto:alfs-discuss-bounceslinuxfromscratch.org] On
Behalf Of Dan
Nicholson
Sent: Wednesday, August 01, 2007 2:56 PM
To: ALFS Discussion and Development List
Subject: Re: Ubuntu?

On 7/31/07, Michael J. Lynch <mlynchgcom.com> wrote:
>
>     First, I'm using an older Ubuntu distro (Hoary). 
There were two
> major problems I ran into.
>
>     The first problem was with the "md5sum"
command.  For whatever
> reason the md5sum command on Ubuntu Hoary won't allow
use of
> stdin as the source of the "checkfile"
argument.  The "checkfile" arg
> must come from a real file.  So my fix was to modify
the
func_download_pkgs
> file to write the MD5 variable to a temporary file and
then change the
> actual check to:
>
>     if ! md5sum -c .t >/dev/null ; then
>
> The change was required in two places.
>
>     The second problem was with the tar command.  For
whatever
> reason the tar command on Ubuntu Hoary can not untar
files with
> .bz2, .gz, etc. extensions.  The files must be
uncompressed before
> being unarchived.  Solving this problem took a little
more work.  I
had
> to make a wrapper script (TAR) for tar that checked the
extension
> and then used the correct uncompressor and piped the
output to
> tar as follows:

> Michael, what version of the tools are these? You
should be able to
> get that with `md5sum --version' and `tar --version'.

I stand corrected on something I posted earlier... Michael
was not
bashing the developers.... I read his message a little too
hastily and
misunderstood the tone... sorry for the misunderstanding!
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

Re: Ubuntu?
country flaguser name
United States
2007-08-01 18:06:04
M.Canales.es wrote:
> Current jhalfs-2.3 already checks for Tar-1.15 and
Bash-3.0.

Yes, but the book lists *tar-1.14* as the host prerequisite
which is, I 
think, the point Dan was trying to make.

There's something odd here... I thought the ability to
determine 
compression types was added in tar-1.15? If jhalfs checks
for tar-1.15 
then Michael's host must have had it - and yet he still
couldn't unpack 
the archives? Makes me wonder what odd thing the Ubuntu devs
did when 
building tar.

I might try to find a copy of 'Hoary' just for kicks.

--
JH
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page

[1-10] [11-17]

about | contact  Other archives ( Real Estate discussion Medical topics )