LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-22-2005, 09:32 AM   #61
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 34

Edit Fixed! Nothing wrong with the script, just I shouldn't have been running other upgrades at the same time... Tested against and works with 1.9.95 and 1.9.93

(Sorry to split posts, but this and the above exceeded the size limit together).

New options:

FOLDALL - Fold all packages into one super package (openofficeorg-$VERSION-$ARCH-1.tgz). Default = no

or

FOLDCORE - Fold the eight core packages into one core package (openofficeorg-$CORE-$VERSION-$ARCH-1.tgz. Irrelevant for FOLDALL=yes). Default = yes

FOLDSPELL - Fold spellcheck into core01/core (depending on if you set FOLDCORE. Irrelvant for FOLDALL=yes). Default = no

Edit: Read this post for the latest OOo Beta SlackBuild

N.B. When finishing this off, I was suddenly struck with the image of Steve Ballmer screaming his head off explaining the features of the 'all new Windows 3.0'...

Last edited by cathectic; 05-04-2005 at 10:49 AM.
 
Old 04-24-2005, 09:58 AM   #62
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
EDIT: Changed the code a bit... to reflect on what i'm describing

I'm noticing something here. You have alot of similarity in your code. Might it be possible to stick a few of these into functions, if/case loops, and reduce the total size of the installer?

I can see for example in the package descryption section
Code:
#SpellCheck
  if [ -e openofficeorg-spellcheck-$VERSION-$ARCH-1.tgz ]; then
    mkdir package
    cd package
    tar zxf ../openofficeorg-spellcheck-$VERSION-$ARCH-1.tgz
    rm ../openofficeorg-spellcheck-$VERSION-$ARCH-1.tgz
    mkdir install
    cat << _EOF_ > install/slack-desc
#                       |-----handy-ruler------------------------------------------------------|
openofficeorg-spellcheck: openofficeorg-spellcheck (OOo Spelling Checker)
openofficeorg-spellcheck:
openofficeorg-spellcheck: Spell Checking module for OpenOffice.org.
openofficeorg-spellcheck:
openofficeorg-spellcheck:
openofficeorg-spellcheck:
openofficeorg-spellcheck:
openofficeorg-spellcheck:
openofficeorg-spellcheck:
openofficeorg-spellcheck:
openofficeorg-spellcheck:
_EOF_
    makepkg -l n -c n ../openofficeorg-spellcheck-$VERSION-$ARCH-1.tgz
    cd ..
    rm -r package
  fi
is repeated some 12 odd times with minor differences.. If you have $VERSION, and $ARCH, why not also have $PKGNAME, $PKGINFO, and reduce them down to 1 or 2 functions, where you'll only pass the desired info to them?

I haven't looked deeply into the matter, and i'm not the best bash programmer out there.. but the result should look something similar to this. Yes, this code won't work, but its just a guide.. maby some syntax fixing here and there would do the job.

Code:
#Program Name (could be used along with pkgname elsewhere in the program later)
PROGRAM=openofficeorg
# Package Names
PKGNAME[0]=writer
PKGNAME[1]=calc
PKGNAME[2]=impress
PKGNAME[3]=base
PKGNAME[4]=draw
PKGNAME[5]=math
PKGNAME[6]=gnome-integration
PKGNAME[7]=graphicfilter
PKGNAME[8]=javafilter
PKGNAME[9]=xsltfilter
PKGNAME[10]=-pyuno
PKGNAME[11]=spellcheck
PKGNAME[12]=testtool

PKGINFO[0]=
#                   |-----handy-ruler------------------------------------------------------|
openofficeorg-writer: openofficeorg-writer (OOo Word Processor)
openofficeorg-writer:
...
...
... (and so on)

# The Code
while [ $n -lt 12]; do
  if [ -e "$PROGRAM-$PKGNAME[n]-$VERSION-$ARCH-1.tgz" ]; then
    mkdir package
    cd package
    tar zxf ../$PROGRAM-$PKGNAME[n]-$VERSION-$ARCH-1.tgz
    rm ../$PROGRAM-$PKGNAME[n]-$VERSION-$ARCH-1.tgz
    mkdir install
    cat $PKGINFO[n] > install/slack-desc
    makepkg -l n -c n ../$PROGRAM-$PKGNAME[n]-$VERSION-$ARCH-1.tgz
    cd ..
    rm -r package  
  fi

let n=n+1;
done
Or something... Just a thought
Note: I didn't touch the core part (forgot about the menus too).. otherwise i'd end up finishing my work tomorrow morning But you get the point.

Last edited by xushi; 04-24-2005 at 01:06 PM.
 
Old 04-27-2005, 04:47 AM   #63
KMcD
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slack -- current
Posts: 354

Rep: Reputation: 30
Hi, I just ran the updated script above and it totally killed my system (well the fact that I ran it as root killed my system but you get the point). A whole swathe of bash commands no longer work. I cannot startx, use slocate, swaret, emacs, etc. Is there any quick way I can recover my system?

I had already run a previous version of the script but didn't install the packages yet as they are still not working properly on another system (just with KDE is all). I saw there was a newer version so I thought I'd give that a try. I downloaded the OO-installer file and placed the script in /sbin. I placed the installer on a vfat partition and ran the script. It immediately showed problems in the output, I think it was to do with removing previous versions & files from /tmp.

Any help would be appreciated (and I know the stupidity of running the script as root). Thanks.
 
Old 04-27-2005, 09:50 AM   #64
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
I'm interested in knowing what error messages it gave you, but i think its too late. I assume its mostly
'No such file or directory" etc...

I think your problem isn't using the script in root, but sticking it in /sbin. Its supposed to be used in any random folder, like /home/user/myfiles/. where the folder will have the OO .tar.gz file next to it.

Otherwise, it won't find the OO package, and just go through the script... , and mess up everything since you're working in /sbin directory (in root)

my assumption? it went through the script until it reached the commands
Code:
  cd ../../../
  rm usr/bin/*
where, in your case, it actually went to /usr/bin, and deleted everything in there... (ouch). If it did, then good luck.

After speaking with Cathectic, sticking a check method to stop the script if it can't find OO package would be good. Also... don't stick such scripts in /bin, or /sbin

EDIT
==============

I tried the same thing you did (but not under root so it wont actually damage anything)
This is the output i got
Code:
xushi@xushitop:~$ /sbin/ooinstaller > d
tar: /home/xushi/OOo_1.9.95_LinuxIntel_install.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
/sbin/ooinstaller: line 52: cd: RPMS: No such file or directory
rm: cannot remove `openofficeorg-redhat*': No such file or directory
rm: cannot remove `openofficeorg-mandrake*': No such file or directory
rm: cannot remove `openofficeorg-freedesktop*': No such file or directory
rm: cannot remove `*.rpm': No such file or directory
mv: cannot stat `*.tgz': No such file or directory
mkdir: cannot create directory `package': File exists
cp: cannot stat `openofficeorg-suse-menus-1.9.95-noarch-1.tgz': No such file or directory
rm: cannot remove `openofficeorg-suse-menus-1.9.95-noarch-1.tgz': No such file or directory
tar: openofficeorg-suse-menus-1.9.95-noarch-1.tgz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
rm: cannot remove `openofficeorg-suse-menus-1.9.95-noarch-1.tgz': No such file or directory
mv: cannot stat `opt/gnome/share/*': No such file or directory
rm: cannot remove `opt/gnome': No such file or directory
mv: cannot stat `opt/kde3': No such file or directory
mkdir: cannot create directory `usr/share/applications': No such file or directory
/sbin/ooinstaller: line 101: cd: usr/share/applications: No such file or directory
rm: remove write-protected regular file `usr/bin/411toppm'?
I stopped there.. but had i been root, like how you were, then it wouldn't have asked me that question, and everything in /usr/bin would have been deleted as i suspected. What can you do now? i think a reinstall is your only bet... lol, good luck

Last edited by xushi; 04-27-2005 at 10:05 AM.
 
Old 04-27-2005, 10:03 AM   #65
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
Maybe with just a
Code:
if [ ! -r $INPUT ]; then
    echo "Input file doesn't exist or can't be read"
    exit
fi
After INPUT= declaration would avoid such things.
 
Old 04-27-2005, 12:01 PM   #66
KMcD
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slack -- current
Posts: 354

Rep: Reputation: 30
Quote:
Originally posted by xushi
I'm interested in knowing what error messages it gave you, but i think its too late. I assume its mostly
'No such file or directory" etc...
lots of that if I recall.

Quote:
Originally posted by xushi

I think your problem isn't using the script in root, but sticking it in /sbin. Its supposed to be used in any random folder, like /home/user/myfiles/. where the folder will have the OO .tar.gz file next to it.

Otherwise, it won't find the OO package, and just go through the script... , and mess up everything since you're working in /sbin directory (in root)

I don't understand this. I thought that executing it in the folder that contained the openoffice.org install archive (which on a different partition completely) it would only act within that folder? I only put it in /sbin so it'd be in my PATH, won't be doing that again.


Quote:
Originally posted by xushi

EDIT
==============

I tried the same thing you did (but not under root so it wont actually damage anything)
This is the output i got
Code:
xushi@xushitop:~$ /sbin/ooinstaller > d
tar: /home/xushi/OOo_1.9.95_LinuxIntel_install.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
/sbin/ooinstaller: line 52: cd: RPMS: No such file or directory
rm: cannot remove `openofficeorg-redhat*': No such file or directory
rm: cannot remove `openofficeorg-mandrake*': No such file or directory
rm: cannot remove `openofficeorg-freedesktop*': No such file or directory
rm: cannot remove `*.rpm': No such file or directory
mv: cannot stat `*.tgz': No such file or directory
mkdir: cannot create directory `package': File exists
cp: cannot stat `openofficeorg-suse-menus-1.9.95-noarch-1.tgz': No such file or directory
rm: cannot remove `openofficeorg-suse-menus-1.9.95-noarch-1.tgz': No such file or directory
tar: openofficeorg-suse-menus-1.9.95-noarch-1.tgz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
rm: cannot remove `openofficeorg-suse-menus-1.9.95-noarch-1.tgz': No such file or directory
mv: cannot stat `opt/gnome/share/*': No such file or directory
rm: cannot remove `opt/gnome': No such file or directory
mv: cannot stat `opt/kde3': No such file or directory
mkdir: cannot create directory `usr/share/applications': No such file or directory
/sbin/ooinstaller: line 101: cd: usr/share/applications: No such file or directory
rm: remove write-protected regular file `usr/bin/411toppm'?
I stopped there.. but had i been root, like how you were, then it wouldn't have asked me that question, and everything in /usr/bin would have been deleted as i suspected. What can you do now? i think a reinstall is your only bet... lol, good luck
that output does look familiar but it was a few hours ago so am not sure. I'm just glad I happened to have my laptop in college today so I could still get work done. Thanks for the reply, Friday morning I'm doing a clean Slack10.1 install.
 
Old 04-27-2005, 12:02 PM   #67
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 34
KMcD:

As Xushi said, the ../../../usr/bin was probably the killer. SlackBuild scripts are intended to be run as root, but in the same directory as the source file. Unfortunately, a reinstall of all packages that used /usr/bin is the only solution.

Xushi, gbonvehi:

Thanks for your help and suggestions.

Since LQ can't handle the current size of the script for posting, I'm temporarily putting up a copy of the latest script here:
Latest OOO 2 SlackBuild

1) An INPUT test has now been added. If it can't find the file, the script will end.
2) All relative paths have been replaced with absolute ones, should any problems occur later on.

Coming Soon:

I'm going to split the script up into 1 SlackBuild and x amount of slack-desc files (x being the number of packages with OOo2). This should allow me to cut down on repeated code and make it easier to add new packages in future (apart from being easier to maintain of course...)

Last edited by cathectic; 05-14-2005 at 07:16 PM.
 
Old 04-27-2005, 12:28 PM   #68
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
Quote:
Originally posted by KMcD
I don't understand this. I thought that executing it in the folder that contained the openoffice.org install archive (which on a different partition completely) it would only act within that folder? I only put it in /sbin so it'd be in my PATH, won't be doing that again.
Now that Cathectic is using relative paths, it should work if you stick the script in /sbin. But don't quote me on that yet as i haven't tested it. If you're not sure, what you can do is leave the script in your download folder (or the folder with OO package), and just create a simlink to /sbin/. That should do the trick

Quote:
that output does look familiar but it was a few hours ago so am not sure. I'm just glad I happened to have my laptop in college today so I could still get work done. Thanks for the reply, Friday morning I'm doing a clean Slack10.1 install.
lol, well, like they say.. live and learn Don't let this put you off scripts though.

Quote:
Originally posted by Cathectic
Since LQ can't handle the current size of the script for posting, I'm temporarily putting up a copy of the latest script here:
Keep up the good work, and give us a shout if you want any testing done . Also, if you want web space, feel free to use my server.

On a side note.. anyone know when OO2 will officially be released? And will it support MS Access' .mpp files?
 
Old 04-27-2005, 12:29 PM   #69
KMcD
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slack -- current
Posts: 354

Rep: Reputation: 30
Quote:
Originally posted by cathectic
KMcD:

As Xushi said, the ../../../usr/bin was probably the killer. SlackBuild scripts are intended to be run as root, but in the same directory as the source file. Unfortunately, a reinstall of all packages that used /usr/bin is the only solution.
thank you thank you thank you!!!

your point above made me realise I have the exact same installation on my laptop as on my pc so why not copy the /usr/bin folder from my laptop to my desktop. It worked, I've a big grin, I could kiss you.
 
Old 04-27-2005, 12:36 PM   #70
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
Quote:
Originally posted by KMcD
your point above made me realise I have the exact same installation on my laptop as on my pc
By exact, does that include the versions of the apps ?
 
Old 04-27-2005, 02:08 PM   #71
KMcD
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slack -- current
Posts: 354

Rep: Reputation: 30
Quote:
Originally posted by xushi
By exact, does that include the versions of the apps ?
yes, all applications are the very same version on both machines, I'm very careful about that.

And no I'll not be put off scripts, I'll just pay attention to what they actually do.
 
Old 05-04-2005, 10:47 AM   #72
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 34
The latest build is here:
Download the contents of this directory

Instructions:

1) Download all the files in the above directory (the ooo.SlackBuild + the text files)
2) Put OOo tar.gz in the same directory
3) Check VERSION and INPUT are correct in ooo.SlackBuild
3) Run as root - "sh ooo.SlackBuild"

Notes:

This is tested against 1.9.100 and works - not too sure yet on backwards compatibility, since they made quite a few major changes to the arrangements of the packages, but it should be ok.

Please don't set DESCRIPTIONS=yes to no - it will take longer this way, but otherwise, the symlinks aren't dealt with in the proper Slackware package manner (i.e. replaced with entries in doinst.sh).

Default behaviour is to roll all the core packages into one, but keep all the others separate. You can still roll everything into one super package though.

Last edited by cathectic; 05-14-2005 at 07:18 PM.
 
Old 05-04-2005, 01:17 PM   #73
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
I'll be happy to know how stable m100 is. m95 was very good, although it crashed on me three times this week, once where recovery was succcessful, and twice losing my data and resetting the .odt file to 0b again... Luckely i was prepared for such a situation.
 
Old 05-08-2005, 04:23 PM   #74
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
I'm getting a few errors in the script.. I doub't they're critical, but still.. its good to find and kill them

***Error
In the Creating tar file openofficeorg-menus-1.9.100-noarch-1.tar... section...
Code:
usr/share/mime-info/
usr/share/mime-info/openoffice.org-1.9.keys
usr/share/mime-info/openoffice.org-1.9.mime
tar-1.13: openofficeorg-menus-1.9.100-noarch-1.tar is the archive; not dumped

Gzipping openofficeorg-menus-1.9.100-noarch-1.tar...

Renaming openofficeorg-menus-1.9.100-noarch-1.tar.gz to openofficeorg-menus-1.9.100-noarch-1.tgz...

Moving openofficeorg-menus-1.9.100-noarch-1.tgz to /tmp/package-ooo...

Package creation complete.

Adding package descriptions (hold on a little longer...)
mkdir: cannot create directory `/tmp/package-ooo/package': File exists
Looking at the code, i assume it's this line 159
Code:
chmod 755 $PKG/package/usr/bin/*

  mkdir $PKG/package/install
  cat $CWD/menus > $PKG/package/install/slack-desc
  makepkg -l y -c n $PKG/openofficeorg-menus-$VERSION-noarch-1.tgz
  cd $PKG
  rm -rf $PKG/package

***Error
Using sh ooo.Slackbuild > result didn't also save the errors into the file.. So... Install again, and again, to see where exactly the error happens manually ..
After searching though a lot (and i do mean a lot...) of lines, i found it
Code:
Moving openofficeorg-menus-1.9.100-noarch-1.tgz to /tmp/package-ooo...

Package creation complete.

Adding package descriptions (hold on a little longer...)
mkdir: cannot create directory `/tmp/package-ooo/package': File exists
rm: cannot remove `/tmp/package-ooo/package/install/slack-desc': No such file or directory
which i believe can be traced to line 209
Code:
mkdir $PKG/package/install
    rm $PKG/package/install/slack-desc
    cat $CWD/core > $PKG/package/install/slack-desc
    makepkg -l y -c n $PKG/openofficeorg-core-$VERSION-$ARCH-1.tgz
    cd $PKG
    rm -rf $PKG/package

The other warnings can be grouped as follows,
Code:
root@xushitop:/download/oo# sh ooo.SlackBuild > result
tar-1.13: openofficeorg-menus-1.9.100-noarch-1.tar is the archive; not dumped
mkdir: cannot create directory `/tmp/package-ooo/package': File exists
rm: cannot remove `/tmp/package-ooo/package/install/slack-desc': No such file or directory
tar-1.13: openofficeorg-core-1.9.100-i586-1.tar is the archive; not dumped
tar-1.13: openofficeorg-writer-1.9.100-i586-1.tar is the archive; not dumped
tar-1.13: openofficeorg-calc-1.9.100-i586-1.tar is the archive; not dumped
tar-1.13: openofficeorg-math-1.9.100-i586-1.tar is the archive; not dumped
tar-1.13: openofficeorg-impress-1.9.100-i586-1.tar is the archive; not dumped
tar-1.13: openofficeorg-draw-1.9.100-i586-1.tar is the archive; not dumped
tar-1.13: openofficeorg-testtool-1.9.100-i586-1.tar is the archive; not dumped
tar-1.13: openofficeorg-gnome-integration-1.9.100-i586-1.tar is the archive; not dumped
tar-1.13: openofficeorg-javafilter-1.9.100-i586-1.tar is the archive; not dumped
tar-1.13: openofficeorg-pyuno-1.9.100-i586-1.tar is the archive; not dumped
tar-1.13: openofficeorg-xsltfilter-1.9.100-i586-1.tar is the archive; not dumped
root@xushitop:/download/oo#
Hope this helps.
 
Old 05-08-2005, 05:34 PM   #75
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 34
1)
Quote:
Looking at the code, i assume it's this line 159
That's not the line causing the error - the printed message "Adding package descriptions (hold on a little longer...)" means that the error is happening *after* the menus package has been created.

It's probably caused by lines 184 & 194 or 239. It's due to unpacking the Spell Check first but not deleting the /tmp/package-ooo/package directory (as the files in there are added onto a core package first), and it's not an error to worry about. I can't remove the offending lines, but I'm not certain if adding an 'if' statement there instead is overkill?

2)
Quote:
tar-1.13: openofficeorg-<somefile>-1.9.100-$ARCH-1.tar is the archive; not dumped
That's a normal message, I recieve it as well. A quick search on Google turns up an explanation. It's harmless, and nothing to worry about.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenOffice 2 beta in Slack objorkum Slackware 5 05-06-2005 06:46 AM
grub runs then: Kernel Panic: unable to mount 03:00, slack 10.0 chrisidaho Slackware 8 02-09-2005 02:47 PM
Openoffice Impress preview sidebar saravkrish Linux - Software 0 01-09-2005 01:35 PM
OpenOffice package for Slack 9.1 dazzlehank Slackware 6 01-12-2004 07:56 AM
OpenOffice and PAM in Slack 9 Cerbere Slackware 1 08-08-2003 07:22 AM


All times are GMT -5. The time now is 06:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration