styles.tar.gz


Forum: myDSL Extensions (deprecated)
Topic: styles.tar.gz
started by: mpie

Posted by mpie on Aug. 07 2004,03:13
hi I have two fully functional themes almost ready to go..........
all I need to do is zip them in a tar.gz but have not managed to do so succesfully but the copies i have placed manually in .fluxbox work.......any pointers as how to zip and what  i need to zip as dont want anything not needed to be zipped......

Posted by adraker on Aug. 07 2004,08:41
mpie-
I may stand corrected on this but.....
You need a structure in some directory which goes
/home/dsl/.fluxbox/backgrounds and /home/dsl/.fluxbox/styles-
you already know that,plus you know the wallpaper goes in backgrounds
and the style text goes in styles.Your init file should be in .fluxbox.
Then cd to the directory which contains this /home/dsl/.fluxbox/etc
structure and tar it up with "tar -cvf mpietheme.tar home/"
That should produce "mpietheme.tar".Then "gzip mpietheme.tar",
which vanishes before your very eyes,to be replaced with
"mpietheme.tar.gzip".
Then like me,you could get really silly and transfer this result between
drives on your computer,and lose all your permissions along the way
and wonder why it won't work.
Don't do that.
It's probably best to do all this in a clean fresh instance of Live DSL.
As I say, I'm happy to stand corrected,my apologies if I've left
something important out.
Hope this works for you.

Posted by mpie on Aug. 07 2004,09:05
Cool didn't think it would be that straight forward......So let me confirm Cd to /name of the file tar -cvf name of theme then gzip and I,m done....Gosh THank you
Posted by adraker on Aug. 07 2004,10:09
eerrrr.....I don't think we're in phase on this one...

Make a directory called "desk".
As a subdirectory of "desk", make a directory called "home".
Under that, a directory called "dsl".
Or better yet "damnsmall".
And so on with ".fluxbox" ,"themes" and "styles".
Just LIKE in your home directory.

You have to make this whole structure under "desk".

Then put copies of your wallpaper,style,and init in the proper places.

Then you cd to "desk".      The top of the structure.
You want to make a theme called "bluecow".
Your working directory is "desk".

So you tar everything under the "home" subdirectory with
"tar -cvf bluecow.tar home/"
Note the home/ part.

Then you gzip bluecow.tar
The resultant bluecow.tar.gz should be good to go into the root directory
of your live cd where it will be automagically loaded by mydsl.
At startup. Whether you like it or not.

You can't just use your existing home structure, or you will tar up
everything in your home directory!

If there's a better way,or better explanation,let us know!

Posted by mpie on Aug. 07 2004,10:49
I was almost there I had a working Dir then .fluxbox. So I need to make /home/dsl/.fluxbox./Backgrounds Bluecow and
need to make /home/dsl/.fluxbox./Styles Bluecow
I thought (please correct me if I'm wrong) that that the init would automatically generate when run as the command bsetbg creates one? ......
anyway then cd to working dir tar -cvf Bluecow.tar  home/
then gzip Bluecow.tar ..... :D

Posted by mikshaw on Aug. 07 2004,14:50
Something here which may cause troubles is the 'So you tar everything under the "home" subdirectory' part.  This will add a /home/ directory to the archive structure, which is unnecessary and may cause problems.
Have a look at this thread:
< http://damnsmalllinux.org/cgi-bin....16;t=95 >

Ke4nt1 explains in detail how to properly construct an extension,  The same method is used with a style.tar.gz.

Posted by mpie on Aug. 07 2004,21:59
success.......to new themes available.........well just been mailed
Posted by mpie on Aug. 07 2004,23:10
WOW KE4NT1 I MUST ADMIT YOU HAD THESE UP VERY FAST..........................
Posted by ke4nt1 on Aug. 08 2004,00:34
I was at the kb when they came in..

I removed all the directories, fixed the permissions,
rebuilt the .tar.gz's, and made new md5sums.

Nice backgrounds....  

Send me your .info files when you get a minute..
The repository web pages need them in a particular format..
See other .info files in the repository for examples..

73
ke4nt

Posted by mpie on Aug. 08 2004,07:17
just one question , ke4nt1 what dirs have you remove for cross compatability, i moved my file to hda2 out of the way got the one from the repository untarred it then recovered mine from hda2 untarred it and i fail to find any differences? this is not a problem but if i know what to remove then i can do it myself next time----------------------------weeeeee
Posted by ke4nt1 on Aug. 08 2004,09:36
mpie, adraker, ...

I think mikshaw has the point down pat...

<<edit>>
mpie, please email a copy of your original Striking.tar.gz to adraker,
so he can continue to follow along in this thread with us...
<</edit>>

Copy the two .tar.gz files to a work directory...
For this example, I used /home/dsl/work...
Don't untar them yet......

Use this syntax to compare the two...

"tar -ztf striking-theme.tar.gz > new.txt"

"tar -ztf Striking.tar.gz > old.txt"

Open both of the txt files up in scite...
You'll see the difference...

Mine are just the files...
The other is full of DIRECTORIES...   bad puddy tat...
( ...screams from the movie "Psycho" in the background for effect :O ...)

Remember, we don't want to overwrite /home
Especially with a directory that is owned by dsl.staff...

Untar the Striking.tar.gz file, and look inside...
If you "ls -alR" in a shell , you will see that all of the files and dirs are owned by dsl.staff.
/home is normally owned by root, not dsl

Point is, they are already there, in the base DSL system.
Extensions should ONLY contain files, not directories,with few exceptions.

You can imagine what happens when /tmp, /usr, /usr/bin, or /usr/lib get overwritten !

Sometimes, I get contribs that have everything root.root
A surefire way to hose your box.....at least your desktop...

I also changed the perms on your style file "Striking"...
Most files under /home/dsl are -rw-r--r-- ( chmod 644 )
If you look at your lightning.jpg, it is correct. -rw-r--r--
Same goes with lnk and png/gif files as well for making desktop icons,
and menu files under ~/mydsl.menu/* get the same treatment...
Note: All of the examples in this paragraph are owned by dsl.staff

Then , I tarred it back up with the --no-recursion and --numeric-owner switches
to make it tar only the contents of my edited txt file, and work with both user damnsmall and user dsl .

All this for a "two file" theme extension.....

Is your noggin knockin by now?!
LINUX ---> f e e d   y o u r   h e a d

73
ke4nt

Posted by adraker on Aug. 08 2004,11:37
Ke4nt1-
Yup,mine is-
I'd like to see these files 'cos I don't get the process.
Some time ago,I pulled apart your copperwine theme
and I thought thats how it was done... I'll have to start over.
No more themes for me- bad Drake!
Back to the man and info pages with you.
Sorry for the bum advice mpie!


Adraker

Posted by mpie on Aug. 08 2004,11:39
Yep I see.....(said the blind man)
is there a way to compile it with tar without including the /home/dsl  what if i started from .fluxbox would that of worked or is the only way to edit by hand?

Posted by ke4nt1 on Aug. 08 2004,15:20
I always start with a list...
( course I'm rebuilding them, but making changes or additions requires the same treatment.. )
You need to start with a list...
Now, how far back you want to go, I don't know...

If you installed an app from apt-get, you can "dpkg -L packagename" to make a list,
but then you have to know the names of ALL the packages you installed, ( I write them down during the install )
and make a list for each one and combine them.  
cbagger01's script does a great job of this, combining all the packages into one .dsl , with no directories..
You could always take that .dsl file, and use these tips to remove docs and man pages, etc.., and rebuilt the .dsl cleanly...  

If you installed from a .tar.gz , you can use the previous "tar -ztf pkgname.* > *.txt"
Either way, yes, it requires some handwork to make the list clean..
There are a few tools and tricks, like using emelfm search/replace feature to remove
any leading ./'s that appear in filelists...

Read my other thread that mikshaw refers to, as it has more info about actually creating your .dsl from your list..  
I think it answers your specific question about "compiling" a tar without directories..
Building your tar without directories is what the LIST is for.
When you use "tar -T anylist.txt --no-recursion --numeric-owner -cvf- | gzip > anyfile.dsl" ,
as long a your LIST has no directories in it, your .dsl won't either...

For small files like these themes, I would simply type out a list..

But there is no reason you couldn't build them using the same method you did
when you sent them to me, and then applying this info as a "second stage"
to create your list, cleanup perms/owners, and remove unnecessary files.
Edit the pieces we don't want out of your list, and rebuild the tar...

Just like I did....   :)

Keep em' comin'

73
ke4nt

Posted by clivesay on Aug. 08 2004,16:42
If you are going to do alot of this type of work I would suggest adding some buttons to Emelfm to help with all the repetative tar commands. You could save your .emelfm directory to your filetool.list so your buttons would be included everytime you reboot the live cd and restore settings. I hate repetative typing!  :D

Chris

Posted by mikshaw on Aug. 08 2004,20:39
What I usually do to create the initial list is "find . > filelist.txt" and then go through it and delete all unnecessary lines.
Posted by mikshaw on Aug. 09 2004,02:20
Quote
I hate repetative typing! :D

I'm building a small script that will correct ownerships, tar, and md5sum.
Currently it won't remove directories from a file list (and probably will never get that far), but it should save a bit of typing.  I haven't tested it yet, but here's what it looks like so far:

<edit> after testing, I found some flaws...nothing major, but i figured I'd remove the faulty code just so no one gets pissed at me =o) </edit>

Posted by ke4nt1 on Aug. 09 2004,06:59
While some repetative tasks are best served with macros or hot buttons,
I always seem to want to something different after I go to the trouble of setting them up.

Sometimes I want verbose, other times not.
Sometimes I want a matching filename, sometimes not.
Sometimes I just want to keep both FEET on the pedals, and not "mouse" around. :D

I've got a few shortcuts, but once the gears are grinding, I let my fingers do the walking!

73 de Kent
ke4nt

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.