List Info

Thread: Strange use of tar in jhalfs




Strange use of tar in jhalfs
user name
2007-08-03 08:17:27
Hello

I am new to jhalfs ... so sorry

I succesfully finish those steps

$ tar -xjf jhalfs-2.3.tar.bz2
$ tar -xjf LFS-BOOK-6.2-XML.tar.bz2
$ cd jhalfs-2.3
$ make menuconfig
$ make
    # this downoladed a lot of SRC files ...
$
$ cd /mnt/jhalfs-build_dir
$ cd jhalfs


When I run make

$ make

it fails with this:
------------------------------------------------------------
--------------------
 Building target 028-binutils-pass1
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Error exit delayed from previous errors
make: *** [028-binutils-pass1] Error 1
make: *** [mk_LUSER] Error 2


What is worse ALL files in /mnt/jhalfs-build_dir/sources are
GONE .

When I debug /mnt/jhalfs-build_dir/jhalfs/Makefile

That responsible are those pieces of makefiles

Makefile is calling "remove_existing_dirs"
-- Makefile --------------------
028-binutils-pass1:  022-settingenvironment
    $(call echo_message, Building)
    export BASHBIN=$(SHELL) && $(SHELL)
progress_bar.sh $ $$PPID &
    echo "$(nl_)`date`$(nl_)" >logs/$
    $(PRT_DU) >>logs/$
    $(call remove_existing_dirs,binutils-2.16.1.tar.bz2)
    $(call unpack,binutils-2.16.1.tar.bz2)
    $(call get_pkg_root_LUSER)
    start=$(TIME_MARK) && 
    source ~/.bashrc && 
    $(CMDSDIR)/chapter05/$ >> logs/$
2>&1 && 
    end=$(TIME_MARK) && $(BUILD_TIME)
>>logs/$ && 
    $(PRT_DU) >>logs/$
    $(call remove_build_dirs,binutils)
    $(call housekeeping)
--------------------------------

-- makefile-functions ----------
define remove_existing_dirs
  PKG_PATH=`ls -t $(SRCSDIR)/$(1) | head -n1`
&& 
  ROOT=`tar -tf $$PKG_PATH | head -n1 | sed -e 's^./;s/.*'`
&& 
  rm -rf $(SRCSDIR)/$$ROOT && 
  rm -rf $(SRCSDIR)/$${ROOT%-*}-build
endef
--------------------------------

As I understand the "ROOT= ...." should contain
top directory from package.

But how can "tar -tf " get it when it is
compressed by bzi2 ?

"tar -tjf" would by better (and may by an other
function for handling 
.gz files)

Did I miss an importnant point ?


-- 

   Petr Klíma

   e-mail:  qaxiseznam.cz              


-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
Re: Strange use of tar in jhalfs
user name
2007-08-03 08:55:02
Petr "Qaxi" Klíma wrote:
> Hello
> I am new to jhalfs ... so sorry
> I succesfully finish those steps
> $ tar -xjf jhalfs-2.3.tar.bz2$ tar -xjf
LFS-BOOK-6.2-XML.tar.bz2$ cd jhalfs-2.3$ make menuconfig$
make    # this downoladed a lot of SRC files ...$$ cd
/mnt/jhalfs-build_dir$ cd jhalfs
>
>   
<snip>

What version of tar is on your host?

You should be able to do "tar --version" to get
it.


-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
Re: Strange use of tar in jhalfs
country flaguser name
United States
2007-08-03 10:33:59
Petr "Qaxi" Klíma wrote:
> Hello
> 
> I am new to jhalfs ... so sorry
> 
> I succesfully finish those steps
> 
> $ tar -xjf jhalfs-2.3.tar.bz2
> $ tar -xjf LFS-BOOK-6.2-XML.tar.bz2
> $ cd jhalfs-2.3
> $ make menuconfig
> $ make
>     # this downoladed a lot of SRC files ...
> $
> $ cd /mnt/jhalfs-build_dir
> $ cd jhalfs
> 
> 
> When I run make
> 
> $ make
> 
> it fails with this:
>
------------------------------------------------------------
--------------------
>  Building target 028-binutils-pass1
> tar: This does not look like a tar archive
> tar: Skipping to next header
> tar: Archive contains obsolescent base-64 headers
> tar: Error exit delayed from previous errors
> make: *** [028-binutils-pass1] Error 1
> make: *** [mk_LUSER] Error 2
> 
> 
> What is worse ALL files in
/mnt/jhalfs-build_dir/sources are GONE .
   ah-ha.. I had that happen _once_, years ago. I put it
down to early 
coding.
> 
> When I debug /mnt/jhalfs-build_dir/jhalfs/Makefile
> 
> That responsible are those pieces of makefiles
> 
> Makefile is calling "remove_existing_dirs"
> -- Makefile --------------------
> 028-binutils-pass1:  022-settingenvironment
>     $(call echo_message, Building)
>     export BASHBIN=$(SHELL) && $(SHELL)
progress_bar.sh $ $$PPID &
>     echo "$(nl_)`date`$(nl_)" >logs/$
>     $(PRT_DU) >>logs/$
>     $(call remove_existing_dirs,binutils-2.16.1.tar.bz2)
>     $(call unpack,binutils-2.16.1.tar.bz2)
>     $(call get_pkg_root_LUSER)
>     start=$(TIME_MARK) && 
>     source ~/.bashrc && 
>     $(CMDSDIR)/chapter05/$ >> logs/$
2>&1 && 
>     end=$(TIME_MARK) && $(BUILD_TIME)
>>logs/$ && 
>     $(PRT_DU) >>logs/$
>     $(call remove_build_dirs,binutils)
>     $(call housekeeping)
> --------------------------------
> 
> -- makefile-functions ----------
> define remove_existing_dirs
>   PKG_PATH=`ls -t $(SRCSDIR)/$(1) | head -n1`
&& 
>   ROOT=`tar -tf $$PKG_PATH | head -n1 | sed -e 's^./;s/.*'`
&& 
>   rm -rf $(SRCSDIR)/$$ROOT && 
>   rm -rf $(SRCSDIR)/$${ROOT%-*}-build
> endef
> --------------------------------
> 
> As I understand the "ROOT= ...." should
contain top directory from package.
> 
> But how can "tar -tf " get it when it is
compressed by bzi2 ?
   tar-2.15 can detect the compression type and
automatically call the 
appropriate decompression routine.
   The real issue is the routine does not handle 'failures'
properly. I 
will check it out.
    What version of tar do you have?
> 
> "tar -tjf" would by better (and may by an
other function for handling 
> .gz files)
> 
> Did I miss an importnant point ?
> 
> 

-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
Re: Strange use of tar in jhalfs
country flaguser name
United Kingdom
2007-08-03 16:24:31
On Friday 03 August 2007 17:33, George Boudreau wrote:
> Petr "Qaxi" Klíma wrote:
...
>    tar-2.15 can detect the compression type and
automatically call the
> appropriate decompression routine.
2.15?   Shouldn't that be "1.15 and above"?

--
Moody
-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
Re: Strange use of tar in jhalfs
user name
2007-08-06 01:03:08
>> What is worse ALL files in
/mnt/jhalfs-build_dir/sources are GONE .
>>     
>    ah-ha.. I had that happen _once_, years ago. I put
it down to early 
> coding.
>   
>

Hi

this patch just check for empty $$ROOT variable

--- common/makefile-functions.orig      2007-07-02
22:59:52.000000000 +0200
+++ common/makefile-functions   2007-08-06
08:01:09.000000000 +0200
 -64,6
+64,7 
 define remove_existing_dirs
   PKG_PATH=`ls -t $(SRCSDIR)/$(1) | head -n1`
&& 
   ROOT=`tar -tf $$PKG_PATH | head -n1 | sed -e 's^./;s/.*'`
&& 
+  test -n "$$ROOT" -a -d $(SRCSDIR)/$$ROOT
&& 
   rm -rf $(SRCSDIR)/$$ROOT && 
   rm -rf $(SRCSDIR)/$${ROOT%-*}-build
 endef
 -71,6
+72,7 
 define remove_existing_dirs2
   PKG_PATH=`ls -t $(SRC)/$(1) | head -n1` && 
   ROOT=`tar -tf $$PKG_PATH | head -n1 | sed -e 's^./;s/.*'`
&& 
+  test -n "$$ROOT" -a -d $(SRCSDIR)/$$ROOT
&& 
   rm -rf $(SRC)/$$ROOT && 
   rm -rf $(SRC)/$${ROOT%-*}-build
 endef

-- 

   Petr Klíma

   e-mail:  qaxiseznam.cz              

-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discu
ss
FAQ: http://www.linux
fromscratch.org/faq/
Unsubscribe: See the above information page
Re: Strange use of tar in jhalfs
country flaguser name
Spain
2007-08-06 16:51:05
El Lunes, 6 de Agosto de 2007 08:03, "Petr
"Qaxi" Klíma" escribió:

>
> this patch just check for empty $$ROOT variable
>

That looks good. I will try to test it for jhalfs-2.3.1
release, If George 
don't blame me and fix the issue before.

-- 
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

[1-6]

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