WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Moving repo from .tczl,.tczm,.tczlm to .tcz  (Read 41167 times)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Moving repo from .tczl,.tczm,.tczlm to .tcz
« on: December 26, 2009, 11: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.

« Last Edit: December 26, 2009, 03:44:57 PM by curaga »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
« Reply #1 on: December 26, 2009, 04: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.
The only barriers that can stop you are the ones you create yourself.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
« Reply #2 on: December 26, 2009, 10: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.
« Last Edit: December 27, 2009, 09:19:33 PM by Jason W »

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
« Reply #3 on: December 27, 2009, 08:07:07 AM »
Code: [Select]
tc@box:~$ rename
sh: rename: not found
dCore user

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
« Reply #4 on: December 27, 2009, 08: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.

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
« Reply #5 on: December 27, 2009, 10:46:55 AM »
i can't see rename in coreutils  ???

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
« Reply #6 on: December 27, 2009, 10:59:30 AM »
Oops, make that util-linux-ng, not coreutils.

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
« Reply #7 on: December 27, 2009, 11: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.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
« Reply #8 on: December 28, 2009, 01:38:35 AM »
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
« Last Edit: December 28, 2009, 01:41:45 AM by maro »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
« Reply #9 on: December 29, 2009, 12:19:52 AM »
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. 


Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
« Reply #10 on: December 29, 2009, 02:48:01 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.

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

sed -i 's:\.tcz[lm]*:\.tcz:g'

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
« Reply #11 on: December 29, 2009, 09: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



« Last Edit: December 29, 2009, 09:27:35 AM by Jason W »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
« Reply #12 on: December 29, 2009, 11: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





« Last Edit: December 29, 2009, 02:39:16 PM by jpeters »

Offline tetonca

  • Newbie
  • *
  • Posts: 11
Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
« Reply #13 on: January 12, 2010, 10: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
« Last Edit: January 12, 2010, 11:01:16 AM by tetonca »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Moving repo from .tczl,.tczm,.tczlm to .tcz
« Reply #14 on: January 13, 2010, 12:19:23 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.
The only barriers that can stop you are the ones you create yourself.