Tiny Core Linux

Tiny Core Extensions => TCE News => Topic started by: Jason W on December 26, 2009, 08:46:33 AM

Title: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: Jason W on December 26, 2009, 08:46:33 AM
Tonight all the extensions in the 2.x repo will be renamed to a single .tcz suffix as has been planned.  All users are encouraged to use Tinycore 2.7 or above from now on as the single extension name is already supported in 2.7.

Those who wish to stick with older versions will need to run the tce-notify daemon to handle ldconfig/depmod upon extension loading during runtime.  More will be explained about tce-notify later today, but best to simply run a current version of TC.  This change will help stabilize extension names in the repo between extension updates/changes and also make extension names easier to remember.

Existing tce directories will need to either be redownloaded or converted.  I will provide the script I am using to convert the repo so redownloading will hopefully not be necessary for most folks.  For those who are going to convert their tce directory, I would advise using tce-update before the change so extensions are current and in line with the repo now.

Let me know if there are any questions, and more on tce-notify will be explained before the change.

Also, any extensions submitted need to be named *.tcz rather than the previous way.  Extensions in the gmail account will be converted to the new name format and uploaded when the repo conversion is complete.

Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: curaga on December 26, 2009, 01:29:38 PM
tce-notify.tcz has been posted.

In TC/MC older than 2.7, this extension should be loaded first, as only extensions loaded after it can benefit from its handling. The recommended way to do that is to include that extension in /opt/tce, so that it gets loaded before the usual tce directory is processed.

This is a stopgap measure; upgrading is recommended. The daemon runs both ldconfig and depmod for every extension, so using it will put additional load on the system compared to the previous behavior.
Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: Jason W on December 26, 2009, 07:00:56 PM
Conversion complete.  Before you download more extensions, please convert your existing tce repo with this little script:

Code: [Select]
#!/bin/sh


for I in `ls *.tcz*`; do
  NEWNAME=`echo "$I" | sed -e 's:\.tcz[lm]:\.tcz:g' -e 's:\.tcz[lm]:\.tcz:g'`
  if [ ! "$I" == "$NEWNAME" ]; then
mv "$I" "$NEWNAME"
  fi
done


sed -i 's:\.tczl:\.tcz:g' *.dep
sed -i 's:\.tczm:\.tcz:g' *.dep
sed -i 's:\.tczl:\.tcz:g' *.dep
sed -i 's:\.tczl:\.tcz:g' *.info
sed -i 's:\.tczm:\.tcz:g' *.info
sed -i 's:\.tczl:\.tcz:g' *.info
sed -i 's:\.tczl:\.tcz:g' *.md5.txt
sed -i 's:\.tczm:\.tcz:g' *.md5.txt
sed -i 's:\.tczl:\.tcz:g' *.md5.txt


Either be running as "base norestore" or use another tce directory than the one your are converting.  Hope all goes well and don't hesitate if there are any questions.
Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: jls on December 27, 2009, 05:07:07 AM
Code: [Select]
tc@box:~$ rename
sh: rename: not found
Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: Jason W on December 27, 2009, 05:36:44 AM
Coreutils is needed.

Also I amended the set of commands above since there is one extension that evaded the initial commands.  I spent time trying for a more elegant use of sed for replacing the 'tczl,tczlm,tczml' with tcz, but as I was short on time I just used something simple that worked.  " sed -i 's:\.tcz[lm][lm]:\.tcz:g' filename " only works with replacing tczlm or tczml and does not replace tczm or tczl.  I will find the sed solution but results were the primary goal.
Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: Arslan S. on December 27, 2009, 07:46:55 AM
i can't see rename in coreutils  ???
Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: Jason W on December 27, 2009, 07:59:30 AM
Oops, make that util-linux-ng, not coreutils.
Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: Jason W on December 27, 2009, 08:40:53 AM
I will use "mv" in the above set of commands as a "base norestore" boot to adjust the tce directory is supported that way.
Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: maro on December 27, 2009, 10:38:35 PM
Thanks Jason and the "TC team" for going through with this repository simplification. That was a nice post-Xmas surprise as I'm catching up with "events in TC".

For those connoisseurs of "elegant regular expressions", I'd like to offer a candidate:
     's/\.tcz[lm]\{1,2\}/.tcz/g'
It seem to have worked well on my private mirror repository, which is after execution of the following two command sequences again in sync with the "master" repository:
Code: [Select]
ls | grep '\.tcz[lm]' | while read old ; do
    new=` echo $old | sed 's/\.tcz[lm]\{1,2\}/.tcz/' `
    mv $old $new
done

ls | grep -E '\.tcz\.(dep|info|md5\.txt)$' | while read file ; do
    grep -q '\.tcz[lm]' ${file} || continue
    sed -i 's/\.tcz[lm]\{1,2\}/.tcz/g' ${file}
done
Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: Jason W on December 28, 2009, 09:19:52 PM
Thanks!

Time has been tight lately and I was not able to investigate a better scripting to post.  I tried yours and it works like a charm. 

Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: jpeters on December 28, 2009, 11:48:01 PM
Coreutils is needed.

Also I amended the set of commands above since there is one extension that evaded the initial commands.  I spent time trying for a more elegant use of sed for replacing the 'tczl,tczlm,tczml' with tcz, but as I was short on time I just used something simple that worked.  " sed -i 's:\.tcz[lm][lm]:\.tcz:g' filename " only works with replacing tczlm or tczml and does not replace tczm or tczl.  I will find the sed solution but results were the primary goal.

haven't tried with util-linux-ng, but maybe:

sed -i 's:\.tcz[lm]*:\.tcz:g'
Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: Jason W on December 29, 2009, 06:20:45 AM
The wildcard would work for adjusting dep and info files, but in renaming it would change gtk2.tczl.dep to gtk2.tcz.  Using maro's sed line my script turns into this:

Code: [Select]
#!/bin/sh  


for I in `ls *.tcz*`; do
   sed -i 's:\.tcz[lm]\{1,2\}:\.tcz:g' "$I"
  NEWNAME=`echo "$I" | sed -e 's:\.tcz[lm]\{1,2\}:\.tcz:g'`
  mv "$I" "$NEWNAME"
done



Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: jpeters on December 29, 2009, 08:29:33 AM
The wildcard would work for adjusting dep and info files, but in renaming it would change gtk2.tczl.dep to gtk2.tcz.  

Strange, because with GNU sed:  
ls | sed  -e 's/\.tcz[lm]*/\.tcz/g'

gtk2.tcz.dep

Guess rename works differently (haven't checked it out yet).

edit:  This seems to work
Code: [Select]
FILES="$(ls | grep -E '\.tcz')"

for I in  ${FILES}
 do
  echo ${I} >/tmp/old
  NEW="$(cat /tmp/old | sed 's/\.tcz[lm]*/\.tcz/g')"
  sudo mv ${I} ${NEW}
 done





Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: tetonca on January 12, 2010, 07:50:06 AM
Haven't read all the thread, nor the details of the release
notes for Tiny Core 2.7, nor the Minefield notice on the
forum -- just the .info in Appbrowser for minefield.tcz.

                           - - - - - - - - - - - -
Minefield won't start.  It was fine, prior to conversion to
all .tcz (thanks for the head's-up in IRC on this thread).
                           - - - - - - - - - - - -

I gutted tce and started  over today, with nothing but a list
of my previous tce, and with my current mydata.tgz (so
.filetool.lst  is not canonical).  Tinycore 2.7 with the multi-
user mod applied (see attached shell script).

ldd reported missing some libs.  So I installed nss-nspr.tcz.
Some of the deps were filled, that ldd complained about;
three remained unfilled, even though they are present on
the system.

Code: [Select]
# echo /usr/local/firefox/ >> /etc/ld.so.conf ; /sbin/ldconfig

Something similar to the above was tried; ldd then gave
firefox-bin a clean bill of health.

However, firefox won't start.

Tried various LD_LIBRARY_PATH voodoo and such.

No applications were installed with any tool besides the
canonical Appbrowser; kernel and start-up messages looked
good.  Am not running Xorg (yet; that will happen) and I
changed how I load the firewall in bootlocal.sh.

I'm thinking more ldd voodoo, or revert to stock .filetool.lst.

Background info follows.  TIA for any help or comment.
I'm not hot for this; I'm expecting it to magically resolve with
moar .tcz injections!

tetonca

Code: [Select]
$ cat /usr/local/tce.wbar | egrep firefox
c: exec /usr/local/firefox/firefox

$ /usr/local/firefox/firefox
Xlib:  extension "Generic Event Extension" missing on display ":0.0".
Xlib:  extension "Generic Event Extension" missing on display ":0.0".
Xlib:  extension "Generic Event Extension" missing on display ":0.0".

$ ldd /usr/local/firefox/firefox-bin  | egrep ound # as in 'not found'
[nothing reported]

$ ps auxw | egrep X
 4184 root     /usr/bin/Xvesa -dpi 75 -br -screen 1024x768x24 -shadow -mouse /dev/psaux -nolisten tcp -I

$ md5sum /usr/bin/Xvesa
96f2f397e0033babbb6a9b82d5877181  /usr/bin/Xvesa

$ cat /proc/cmdline
quiet embed ht=on hpet=disabled
    restore=sda2 tce=sda2/tce/maria nodhcp
       vga=789 pause text waitusb=5

$ md5sum /mnt/sda2/tce/maria/minefield.tcz
1504968fde676db8df4d8bf5df9846ad  /mnt/sda2/tce/maria/minefield.tcz

$ ls -1 /usr/local/tce.installed/

  915resolution   OSS   Xfbdev   Xlibs_support   atk   bash   cairo
  epdfview-0.1.6  expat2  firewall-2.6.29.1-tinycore  fluxbox  fontconfig

  glib2    graphics-libs-1    gtk2    iptables    libxml2
  minefield  nss-nspr  openssl-0.9.8h  opera10  pango  pixman  poppler

  qt-4.5-base  sqlite3  sylpheed  vim  vim_lang  wireless-2.6.29.1-tinycore
  wireless_tools   wl   wpa_supplicant   xchat-2.8.6

$ cat /usr/share/doc/tc/release.txt
tinycore_2.7
Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: curaga on January 13, 2010, 09:19:23 AM
Did you convert minefield to tcz yourself? It's one of those that requires more than just the conversion to work.

If you did, try downloading the tcz. I just tested on a plain 2.7 that it still works.
Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: tetonca on January 15, 2010, 02:08:33 PM
Did you convert minefield to tcz yourself? It's one of those that requires more than just the conversion to work.

If you did, try downloading the tcz. I just tested on a plain 2.7 that it still works.

$ md5sum /mnt/sda2/tce/maria/minefield.tcz
1504968fde676db8df4d8bf5df9846ad  /mnt/sda2/tce/maria/minefield.tcz

Same one I was using prior, from the public repository.

I was reviewing the list of extensions I posted above and
noted the graphics one with the kernel revision number
isn't among them; that hasn't been installed.  My system
has a hardware dependency on the graphics extension,
and apparently attempting to run minefield unmasks
the problem.  Or so I'm conjecturing (can't test this atm).

My whole theory discounts hardware dependencies; I
didn't think it mattered what I evolved back into the
system, in which sequence.

Oops.
Title: Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
Post by: tetonca on January 30, 2010, 02:44:08 PM
starting over without a .filetool.lst seems to have made it behave.