VectorLinux
October 23, 2014, 12:51:20 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: 1 ... 4 5 [6] 7 8 ... 15
  Print  
Author Topic: Package builder utility  (Read 78160 times)
blurymind
Packager
Vectorian
****
Posts: 1082



« Reply #75 on: May 31, 2007, 08:49:55 am »

This one seems to have a better error detection. Only one thing...



It doesnt show everything thats written in the console. When you manually run configure from console, when it finds error, it tells you a little bit about the problem...When vpackager finds the error,it instantly cuts off that text and prevents it to be shown:
this text
Code:
configure: error:

 txt2tags cannot be found on your system, but tovid needs it to build
 the man pages. Please install txt2tags (http://txt2tags.sf.net) and
 run ./configure again. Thanks!

     -- http://tovid.org

great work....i'll need some time to get used to the new main window layout tho...

A screenshot for everybody who wants to see how vl-pbu looks like:


there is too much unused space under the "packager id" [] clean up  line ... i think you will save much space if you move the start button next to the quit button and the package name and version namber right back up where it was.. Roll Eyes
Logged

status: playing around with new tablet and learning to 3d :p
google page :  http://blurymind.googlepages.com
DA PAGE :  http://www.blurymind.deviantart.com/
M0E-lnx
Administrator
Vectorian
*****
Posts: 3185



« Reply #76 on: May 31, 2007, 09:30:44 am »

Yeah, after messing with the layout for a bit I got a little confused myself.

But that could change even in the future.

As far as the errors go, I guess I'll need to spend some more time with it so I can get it to display the error details too.

I had it displaying all the errors, but the problem with that is that it was throwing the error message at the beginning of the std output and not at the end or wherever the error occurred. But that was in gambas2, I'll need to try that in gambas1 and see what happens

For now, the important thing is that if it fails, then you wont end up with an empty package. It'll probabbly be longer before I can start working on it again. I'm in the process of backing up my data getting ready to do a major upgrade. After that's done, I'll continue the quest
Logged

blurymind
Packager
Vectorian
****
Posts: 1082



« Reply #77 on: May 31, 2007, 11:42:02 am »

you've done a great job with this utility.  Grin
Logged

status: playing around with new tablet and learning to 3d :p
google page :  http://blurymind.googlepages.com
DA PAGE :  http://www.blurymind.deviantart.com/
M0E-lnx
Administrator
Vectorian
*****
Posts: 3185



« Reply #78 on: May 31, 2007, 12:14:58 pm »

It's really kool, and I happen to like gambas. In the future, I may switch the project to gambas2, and add even more features. In the mean time, the general idea is already working.

You point, click, select source and out comes a package. I think it's really kool, not too bad for my first serious gambas project.

Hope I can do a lot more in the future.
Logged

exeterdad
Packager
Vectorian
****
Posts: 2046



« Reply #79 on: June 03, 2007, 09:16:08 pm »

Back to the LiVES extraction.

Couldn't you generate a random number, then
Code:
mkdir /tmp/$RANDOMNUMBER
.
Code:
tar xfv LiVES-xxx /tmp/$RANDOMNUMBER

Then
Code:
FOLDERNAME=`ls /tmp/$RANDOMNUMBER`
to find out the name of the folder, then make your cut?

Extracting to a unique folder would make it possible to find the foldername of the extracted package.

Just a thought  Smiley
Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3185



« Reply #80 on: June 04, 2007, 04:58:52 am »

I guess that could work, but it would make one ugly tmp dir. I'll try something like that in the next release
Logged

exeterdad
Packager
Vectorian
****
Posts: 2046



« Reply #81 on: June 04, 2007, 07:42:52 am »

I guess that could work, but it would make one ugly tmp dir. I'll try something like that in the next release


You're right I didn't think about how messy it would look.  And not so "human readable" for the user.

This will get it done:
Code:
#!/bin/sh
FOLDERNAME=`tar -tf LiVES-0.9.8.5.tar.bz2 | head --lines=1`
echo $FOLDERNAME

lists the files in archive and pipes to head and reads first line.
This is the output of the above:
Code:
lives-0.9.8.5/

I didn't filter off the trailing slash as it may be useful in your code.
Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3185



« Reply #82 on: June 04, 2007, 08:16:17 am »

The problem with this is that the name splitting is done in gambas, while the untarring and building / packaging is done in bash. Here is the sequence of events:

User selects source
  |__ Gambas splits the name to determine app and version #
       |__ Gambas calls the bash script with specifying (with flags) the app and version (for package name)
            |__ the script tries to cd to /tmp/$APP (Gambas tells the bash script what $APP will be in each case)

I'm not sure how that would work... because if gambas says it's "LiVES" then "LiVES" it is to the bash script.
I can easily have it extracted to a dir created based on like a date/time scheme, that way dir names will be unique and no need to random anything.
But it would make one ugly /tmp dir unless I create a /tmp/vpackager-builds/<date/time-named-dir> or something like that
Logged

blurymind
Packager
Vectorian
****
Posts: 1082



« Reply #83 on: June 05, 2007, 08:13:37 am »

forget about that dir problem.The way it handles archives now is perfect.


Feature request:

*scons support
*the ability to open tlz/tgz files and edit their slack-required and slac-desc files.(this should require a sepparate window)
Logged

status: playing around with new tablet and learning to 3d :p
google page :  http://blurymind.googlepages.com
DA PAGE :  http://www.blurymind.deviantart.com/
M0E-lnx
Administrator
Vectorian
*****
Posts: 3185



« Reply #84 on: June 05, 2007, 09:57:16 am »

I'm not sure about scons.... Never built anything that needs it, so I have no idea how it works...
Unless I can get some input from prople who have used it, how it works, and maybe a (unique?) way to find out if an app needs it or not.

The ability to open tlz/tgz and edit their slack-desc and required files would be nice I guess... This could also make room for the implementation of a .desktop file writer (maybe not a generator, but a simple tool that would let you write the file, and place it in the right location)
Logged

Triarius Fidelis
Vecteloper
Vectorian
****
Posts: 2399


Domine, exaudi vocem meam


WWW
« Reply #85 on: June 06, 2007, 05:43:11 am »

I've been kind of lurking this thread and there are two things that come to mind. First of all, I'm very proud of you, M0E, for putting vpackager together. The other thing I notice is that I must be missing out on the advantages of Gambas. I could come to terms with the static binding (dealt with them in C, C++, and Java to different degrees so far), but for some reason the rest of it just doesn't 'click'. I've recently had some success with the designer Not sure what to do here...there is only so much documentation for Gambas, so I wonder how much VB documentation would carry over. Undecided
Logged

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
Triarius Fidelis
Vecteloper
Vectorian
****
Posts: 2399


Domine, exaudi vocem meam


WWW
« Reply #86 on: June 06, 2007, 06:05:19 am »

I'm not sure how that would work... because if gambas says it's "LiVES" then "LiVES" it is to the bash script.
I can easily have it extracted to a dir created based on like a date/time scheme, that way dir names will be unique and no need to random anything.
But it would make one ugly /tmp dir unless I create a /tmp/vpackager-builds/<date/time-named-dir> or something like that


The ugliness of the /tmp dir created isn't such a problem at all, because the user shouldn't see it. If you don't believe me, look at some of the names that KDE services---KDE being a very well-planned software package---leave behind. Tongue

What I'd really be worried about is the permissions for the temp dir. I searched in the Perl code for File::Temp, and when it creates a temporary directory, it sets the permission to 0700. If that's not in the utility anywhere, it'd be a good idea.
Logged

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
M0E-lnx
Administrator
Vectorian
*****
Posts: 3185



« Reply #87 on: June 06, 2007, 07:19:07 am »

I've been kind of lurking this thread and there are two things that come to mind. First of all, I'm very proud of you, M0E, for putting vpackager together. The other thing I notice is that I must be missing out on the advantages of Gambas. I could come to terms with the static binding (dealt with them in C, C++, and Java to different degrees so far), but for some reason the rest of it just doesn't 'click'. I've recently had some success with the designer Not sure what to do here...there is only so much documentation for Gambas, so I wonder how much VB documentation would carry over. Undecided

That is true... there is not a whole lot of documentation for gambas, and the user community must be small, because the forums dont have too many users either. I'm not sure you can carry much VB documentation over to gambas, however, if you know or have fiddled with VB in the past, there is a good change you'll pick it up right away.

I mean, I only fiddled with VB for a bit late last year, read a lot of it's documentation, and followed a couple of on-line sessions, then when I moved to gambas, everything made almost perfect sense. This may be because I didn't dig that deep into VB to get into all the technical stuff... but having some VB knowledge does help... Besides, I tried C++ some time ago, Gambas is so much easier.

About the tmp thing, vpackager doesn't really create the tmp dir, it just as if you did this
Code:
# cd /tmp && tar xfv $SRC
that will of course result in a new dir in /tmp.

Not sure what permissions that new dir will enherit, but I would assume something like read-only for normal users and full access for root (because root is running the app, so root is really untarring the source).
Let me know if I need to change this somehow.
« Last Edit: June 06, 2007, 07:20:52 am by M0E-lnx » Logged

Triarius Fidelis
Vecteloper
Vectorian
****
Posts: 2399


Domine, exaudi vocem meam


WWW
« Reply #88 on: June 06, 2007, 08:02:37 am »

I've been kind of lurking this thread and there are two things that come to mind. First of all, I'm very proud of you, M0E, for putting vpackager together. The other thing I notice is that I must be missing out on the advantages of Gambas. I could come to terms with the static binding (dealt with them in C, C++, and Java to different degrees so far), but for some reason the rest of it just doesn't 'click'. I've recently had some success with the designer Not sure what to do here...there is only so much documentation for Gambas, so I wonder how much VB documentation would carry over. Undecided

That is true... there is not a whole lot of documentation for gambas, and the user community must be small, because the forums dont have too many users either. I'm not sure you can carry much VB documentation over to gambas, however, if you know or have fiddled with VB in the past, there is a good change you'll pick it up right away.

I mean, I only fiddled with VB for a bit late last year, read a lot of it's documentation, and followed a couple of on-line sessions, then when I moved to gambas, everything made almost perfect sense. This may be because I didn't dig that deep into VB to get into all the technical stuff... but having some VB knowledge does help... Besides, I tried C++ some time ago, Gambas is so much easier.

It's interesting what kinds of optimizations C++ makes to run efficiently, but some of it really just sucks. Objective C is better in many respects (although it has nowhere near as many libraries), because the object model is much simpler (based largely on Smalltalk!!) and doesn't sell out completely. It does late binding by default, for instance.

About the tmp thing, vpackager doesn't really create the tmp dir, it just as if you did this
Code:
# cd /tmp && tar xfv $SRC
that will of course result in a new dir in /tmp.

Not sure what permissions that new dir will enherit, but I would assume something like read-only for normal users and full access for root (because root is running the app, so root is really untarring the source).
Let me know if I need to change this somehow.

I think it might be a good precaution to limit it to root, and set the permission to 0700. It can't be much code at any rate.
Logged

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
M0E-lnx
Administrator
Vectorian
*****
Posts: 3185



« Reply #89 on: June 06, 2007, 08:59:03 am »

It's not really.. So you're suggesting to chmod 0700 /tmp/$APP-$APP_VER ??
Logged

Pages: 1 ... 4 5 [6] 7 8 ... 15
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!