Reply
 
Thread Tools Display Modes
  #1  
Old 06-26-2005, 05:05 AM
sblevin sblevin is offline
Senior Member
 
Join Date: Jun 2005
Location: Australia
Posts: 909
Thanks: 0
Thanked 0 Times in 0 Posts
Default VLC Player PBI in the making.
Well - I've done it. The ubiquitous VLC player from FreeBSD is now a .PBI file on my computer and looking good.

But....... Here is my dilema.

VLC requres massive amounts of support packages to function. This was not practical to build using the "standard" PBI building procedure.

To give this program the highest chance of success I did the following.

I downloaded all the required support packages and tarred them all up together. The PBI installation script then untars them all into a temp directory and runs FreeBSDs' pkg_add command over them to install everything, as well as throwing up some feedback as to whats going on and to be patient, and to let you know when it's all finished. Then all the packages are deleted to free up the temp space used. The PBI builder creates icons etc.

Now comes the blockage: how to remove it!

If I run pkg_delete from the PBI uninstallation script, FreeBSD will have no idea what packages are still in use by PBI files that use the standard way to copy in support files. The pkg database was never made aware of these, so it will just deinstall anything it thinks isn't needed anymore without taking standard PBI content files into consideration.

This WILL break many existing PBI installed programs.

I could simply NOT pkg_delete the VLC player and leave all the files and support libraries on the system. The PBI uninstaller will clean up the icons and menu items and /usr/local/Myprograms/VLC(blah) folder, but essentially, VLC player will be still fully installed and can still be run from the command line.

Heeeeellllllllppppppppp!!!!

What should I do?

This is my first experiment with this topic -> http://www.pcbsd.org/forums/viewtopic.p ... highlight=

p.s. I am not going ANYWHERE NEAR the PBI makers mime type registration dialogue at this point.
Reply With Quote
  #2  
Old 06-26-2005, 06:21 AM
sblevin sblevin is offline
Senior Member
 
Join Date: Jun 2005
Location: Australia
Posts: 909
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Actually - I spoke too soon - It looks like I CAN pkg_delete the VLC player itself, but it still leaves all the support libraries behind - they would have to be independently and individually removed with pkg_delete - hmmmm - That still leaves me unable to pkg_delete the support libs ..... I suppose this happens anyway to base system changes atm.
Reply With Quote
  #3  
Old 06-26-2005, 08:52 AM
youlle youlle is offline
Senior Member
 
Join Date: May 2005
Location: UK
Posts: 261
Thanks: 0
Thanked 0 Times in 0 Posts
Default
some of my PBI's place libraries in the base system namely libc.so.6 reason for this is because it is in apps that have 100+ required libs and only libc.so.6 is not in the base system.

so the PBI is set to copy this over to /usr/lib

some apps how ever will work with the lib like this:

Code:
/usr/lib/[application-name-here]/libc.so.6
Scribus for FreeBSD 6.0 is one such app that will work like that, you say its dependancies are too large to create a standard PBI.

Audacity PBI has the following in it:

GTK+ 2.8.7
wxWIDGETS-GTK+ 2.2
Pango Libs
Some X11 Libs
Audacity

would probably be better to make PBI like RPM, DEB, etc and have the installer log into a Database what files are copied over and have libs listed in a special table and apps can check where the libs are and link to them.
Reply With Quote
  #4  
Old 06-26-2005, 08:55 AM
youlle youlle is offline
Senior Member
 
Join Date: May 2005
Location: UK
Posts: 261
Thanks: 0
Thanked 0 Times in 0 Posts
Default
oh forgot to mention base changed libs and base changes are easily removed:

Code:
cd /usr/share/lib
rm bango.so.4 #removed bango lib
cd ../man
rm -r bango-manual #removed bango manual pages
you just have the problem your libraries are logged in Port's DB so thats whats screwed you over there, as removing via "rm" will screw your Ports DB up
Reply With Quote
  #5  
Old 06-26-2005, 11:58 AM
sblevin sblevin is offline
Senior Member
 
Join Date: Jun 2005
Location: Australia
Posts: 909
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Originally Posted by youlle
oh forgot to mention base changed libs and base changes are easily removed:

Code:
cd /usr/share/lib
rm bango.so.4 #removed bango lib
cd ../man
rm -r bango-manual #removed bango manual pages
you just have the problem your libraries are logged in Port's DB so thats whats screwed you over there, as removing via "rm" will screw your Ports DB up
Excellent! A reply from a PBI builder!

Youlle, my problem is is actually around the other way. If I use the DB to register package installation, then only packages that are no longer required should be removed.

My concern is, that if I used the script to

cd /usr/share/lib
rm bango.so.4 #removed bango lib

then all other applications that require bango.lib would fail from that point on - it's a one way street with base system libs, they can go in via a blind copy command, but can't come out in case another app uses them.

Thats why I used the pkg_add technique. What I found would happen, is that after adding ALL of the packages listed below (all dependencies for VLC player), then I can use pkg_delete from the PBI.removal-script.sh to just remove the VLC specific files, and leave all the libs behind intact. The PBI Package handler would then clean up all the icons and PBI specific changes.

If ALL PBI packages used this technique, I could have added all the packages below to the pkg_delete command, and it would only have taken out the ones that are NOT also being used by other PBI installed apps.

The only other system I can think of to maintain base system stability is the CHROOT technique I was exploring in another forum. This fully isolates ALL files into the /usr/local/Myprograms/ subdirs, even very complex programs like Firefox could find the pango libs etc in this new, independent stucture. The problem I ran into was getting X apps to have permission to talk to the current X session. Thats probably not a big deal for someone with a solid grounding in X, but I can't seen to get it to go : (

The only other option might be a recompile with static links as sugested by another forum poster.

Look at the dependencies below, and you will see why I don't feel it's possible to "rm" them, even just the individual libs VLC player requires - it would murder the base system support for ANY apps left needing gtk, wxgtk and pango support.

aalib-1.4.r5_1.tbz
atk-1.9.1.tbz
faad2-2.0_5,1.tbz
ffmpeg-0.4.9.p1_2.tbz
gnomehier-2.0_6.tbz
gtk-2.6.4_1.tbz
hicolor-icon-theme-0.5.tbz
liba52-0.7.4_1.tbz
libcddb-0.9.6.tbz
libcdio-0.72_1.tbz
libdv-0.103.tbz
libdvbpsi-0.1.4.tbz
libdvdcss-1.2.8_1.tbz
libdvdnav-0.1.9_1.tbz
libdvdread-0.9.4_1.tbz
libid3tag-0.15.0b_2.tbz
libmpeg2-0.4.0b_1.tbz
mpeg4ip-libmp4v2-1.1_1.tbz
pango-1.8.1.tbz
sdl-1.2.8,2.tbz
shared-mime-info-0.15_9.tbz
svgalib-1.4.3_4.tbz
transcode-1.0.0.b2_1.tbz
vcdimager-0.7.21_1.tbz
vlc-0.8.1_9.tbz
wxgtk-common-2.4.2_1.tbz
wxgtk2-2.4.2_6.tbz
Reply With Quote
  #6  
Old 06-26-2005, 12:55 PM
youlle youlle is offline
Senior Member
 
Join Date: May 2005
Location: UK
Posts: 261
Thanks: 0
Thanked 0 Times in 0 Posts
Default
we need to come up with some sort of PBI extension similar to how RPM, Portage, etc handle copied files.

a DB needs to log and register all installed files, and Forbid the removal of any libraries / files that another application is using, or like in windows where occasionally you'll be asked:

"Do wish to remove these shared components? it appears these components are no longer used by any applications"
Reply With Quote
  #7  
Old 06-26-2005, 12:59 PM
youlle youlle is offline
Senior Member
 
Join Date: May 2005
Location: UK
Posts: 261
Thanks: 0
Thanked 0 Times in 0 Posts
Default
im going to try installing pc-bsd on my athlon64 when its finished downloading, and im going to play abit with BASH scripts and XML / MySQL to see if i can get a primitive DB system up and running.

this might take a while and likely hood of the DB being useful in its initial stages is not likely lol
Reply With Quote
  #8  
Old 06-26-2005, 01:23 PM
youlle youlle is offline
Senior Member
 
Join Date: May 2005
Location: UK
Posts: 261
Thanks: 0
Thanked 0 Times in 0 Posts
Default
right i've started a preliminary BASH Script, and something occured to me, PBI Removal scripts all ready should (if written correctly) include all data for base files that were added.

and if these PBI.RemoveScript.sh files were copied over to say... /usr/share/pbiDB/[application-name], you then have one of the ingredients for a Protected system. it will give the possiblity for PBI installer, on un-installation of a PBI to search these "Removal scripts" for files, and if more than one application uses a file, then that file is left.

problem is this system would become quite slow once you had alot of PBI's installed, but it is a start just requires modifications to PBI Installer.
Reply With Quote
  #9  
Old 06-26-2005, 02:57 PM
sblevin sblevin is offline
Senior Member
 
Join Date: Jun 2005
Location: Australia
Posts: 909
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Cool Youlle! We definately need a system to track these base system alterations if they can't be avoided, and I agree that a DB system of some sort is the way to go.

Good luck with the conceptual design and inplementation work!
Reply With Quote
  #10  
Old 06-26-2005, 03:15 PM
lazyilmaz lazyilmaz is offline
Senior Member
 
Join Date: Jun 2005
Location: Netherlands
Posts: 178
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to lazyilmaz
Default
Originally Posted by youlle
we need to come up with some sort of PBI extension similar to how RPM, Portage, etc handle copied files.

a DB needs to log and register all installed files, and Forbid the removal of any libraries / files that another application is using, or like in windows where occasionally you'll be asked:

"Do wish to remove these shared components? it appears these components are no longer used by any applications"
I was saying this al the time 8)
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Making Konsole Transparent rhyous Graphics Cards 2 05-06-2014 10:22 PM
Making PC-BSD use vesa vivin General Questions 2 07-22-2007 06:24 AM
Making KwikDisk smarter masinick General Questions 3 07-06-2007 02:44 AM
Making a Package Repository antik Tips and Tricks 0 10-16-2006 09:58 AM
making a gaim 1.4.0 pbi slavik Creating PC-BSD Packages (.pbi files) 6 08-05-2005 04:58 PM


All times are GMT. The time now is 03:09 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.