View Full Version : VLC Player PBI in the making.
sblevin
06-26-2005, 05:05 AM
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= (http://www.pcbsd.org/forums/viewtopic.php?t=558&highlight=)
p.s. I am not going ANYWHERE NEAR the PBI makers mime type registration dialogue at this point.
sblevin
06-26-2005, 06:21 AM
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.
youlle
06-26-2005, 08:52 AM
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:
/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.
youlle
06-26-2005, 08:55 AM
oh forgot to mention base changed libs and base changes are easily removed:
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
sblevin
06-26-2005, 11:58 AM
oh forgot to mention base changed libs and base changes are easily removed:
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
youlle
06-26-2005, 12:55 PM
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"
youlle
06-26-2005, 12:59 PM
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
youlle
06-26-2005, 01:23 PM
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.
sblevin
06-26-2005, 02:57 PM
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!
lazyilmaz
06-26-2005, 03:15 PM
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)
kmoore134
06-26-2005, 03:16 PM
I'm going to take a look into this issue as well, and see if there is an easy way to do this :)
youlle
06-26-2005, 03:17 PM
this is where me learning C would have come in useful lol, ahwell the biggest thing is getting it to work with the PBI Installer, therefore kris will have to adapt the installer to work with a DB, or someone who knows how to code in C/C++ will have to.
sblevin
06-27-2005, 02:30 AM
Whats actually WRONG with using FreeBSDs PKG facility to our ends?
Using it gives the following advantages:
1) Known massive dependency tracking capabilities
2) Complete compatability with 1000's of apps
3) Allows PBI builders to contribute BACK to FreeBSD from a compatible pakaging system (not PBI perhaps, but the PKG's that would be contained in them)
3) Scriptable
4) Saves time with not having to re-invent the wheel (Wheel? : )
5) Pre existant knowledge base and developers / widely understood
6) Capacities for remote fetching
7) Capacity for security checking (checksums)
**************************************
The setup script I used for VLC Media Player:
**************************************
# VLC Package Collection Installer
# This installer uses pkg_add
# Do NOT pkg_delete this program
mkdir /tmp/vlc-temp
cd /tmp/vlc-temp
tar -xvjpf /usr/local/MyPrograms/${1}/vlc-conglomerate.tar
rm /usr/local/MyPrograms/${1}/vlc-conglomerate.tar
konqueror /usr/local/MyPrograms/${1}/warning.html &
pkg_add /tmp/vlc-temp/vlc-0.8.1_9.tbz
rm -r /tmp/vlc-temp
**************************************
The Removal Script I used for VLC Media Player
**************************************
# VLC Package Collection Remover
# This package was installed using pkg_add
# The PBI Uninstaller will clean up icons and menu entries as
# well as the /user/local/MyPrograms/VLC structure
# All installed support libraries will remain installed
# Using pkg_delete to remove the vlc-0.8.1_9 package ONLY
pkg_delete vlc-0.8.1_9
**************************************
If all PBI's had been built this way, then I could have safely included ALL the packages in the pkg_delete script and removed only those things that were not still in use by other programs: remember that the vlc-conglomerate.tar contained:
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
I think "pkg_info" should be useful to safely remove packages dependencies.
pkg_info -R <package>: shows the packages that depends on <package>
pkg_info -r <package>: shows the apps <package> depends on to run
by default, pkg_delete doesn't deinstall a package that is required by another application:
# pkg_delete gaim-1.3.1
pkg_delete: package 'gaim-1.3.1' is required by these other packages
and may not be deinstalled:
gaim-guifications-2.10_1
I think something like this, could work:
pkg_info -r gaim-1.3.1 | grep "^Dependency" | sed -e 's/^.* /pkg_delete -n /g' | sh
That will try to remove the package dependencies, in case they were not used by another application. In that case, pkg_delete will just skip to the next dependency.
Obviously, if the package we are trying to delete is still installed, you will not be able to remove its dependencies. But, if you first remove the package, pkg_info will fail because of the missing package, so the idea is, 1) get package dependencies and store them somewhere, 2) uninstall the package, and 3) try to uninstall the dependencies.
pkg_info -r gaim-1.3.1 | grep "^Dependency:" > /tmp/gaim-1.3.1.deps
pkg_delete gaim-1.3.1
sed -e 's/^.* /pkg_delete -n /' /tmp/gaim-1.3.1.deps | sh
something like that :)
btw, pkg_delete has an "-r" option, but I don't have any "crashable" FreeBSD box right here, so it scares me to try to find out what that option really does, here, in my daily-use FreeBSD system :?
Greets
Al.
youlle
06-27-2005, 06:27 AM
Sbelvin you forgot something in your script.... to populate Ports directory, some people like my self probably havent populated the ports directory and as such this needs to be done for your script to work, i didnt populate because well i didnt see a need to.
sblevin
06-28-2005, 02:59 AM
I used the binary packages, not the port data in the VLC PBI.
I believe that the Package DB is independent of the ports/packages collection. I can install packages without populating the ports tree. If I supply all the required binary packages, I dont need any network connection to install a package either.
The package database is dynamic, and it's the packages themselves that create the dependency and uninstall information in the DB via the packages +FILES.
Check this out ->
http://www.freebsd.org/cgi/man.cgi?quer ... &sektion=1 (http://www.freebsd.org/cgi/man.cgi?query=pkg_create&sektion=1)
and then ->
http://www.freebsd.org/doc/en_US.ISO885 ... -handbook/ (http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/)
PC-BSD already does have a binary installer, and dependency tracker. Perhaps we should consider the advantages of creating REAL FreeBSD binary packages, and using the PBI Package Maker to wrap them and configure the GUI for us.
There are a lot of ports and packages that are old, unmaintained and in need of updating. This is where the PC-BSD could work WITH the FreeBSD community, not in parallel.
What if PC-BSD used a seperate DB and download site for remote fetching and uninstall/dependency information recording? At some point, PC-BSD will have to decide to fully embrace the FreeBSD Ports/Packages, or to actively make them incompatible, as two different and competing systems attemping to install and worse, remove OS components is a dream come true for anyone wanting PC-BSD to fail.
In the end, it's CHOICE that cripples the end user experience and development for *NIX desktops. A single, strong set of apps and system libs and OS API's is a framework, not a barrier.
markiv34
07-14-2005, 06:21 AM
I just made a pbi installer for vlc 0.8.1. I just tested it out and it is working. Where can I upload it so that it can be tested.
sblevin
07-14-2005, 08:18 AM
ftp://pcbsd.homeunix.org
Upload some contact detail (e-mail?) so whoever checks it can contact you if there is a problem. Looks like stuff is backing up there, but malbert may be able to get to it soon enough.
There was a pbi for VLC player there by me last I looked - But the more the merrier - let the best version wil : )
think we need a "PBI Beta Page, where each uploaded PBI gets a thread (or just a topic maybe) and the opportunity to download stuff.
markiv34
07-14-2005, 09:15 AM
ftp://pcbsd.homeunix.org
Upload some contact detail (e-mail?) so whoever checks it can contact you if there is a problem. Looks like stuff is backing up there, but malbert may be able to get to it soon enough.
There was a pbi for VLC player there by me last I looked - But the more the merrier - let the best version wil : )
think we need a "PBI Beta Page, where each uploaded PBI gets a thread (or just a topic maybe) and the opportunity to download stuff.
Nice to your pbi installer for vlc, this my first time making a pbi file, most likely I would have screwed up. I am going to try your pbi out.
I am not able to connect to the ftp server from my office, maybe they have a firewall installed. I am going to try from my home connection though it might take me some while to get back home.
markiv34
07-14-2005, 01:49 PM
I just uploaded the vlc pbi I created at the ftp address ftp://pcbsd.homeunix.org . I have also mentioned the md5 checksum value for the VLC0.8.1.pbi file and have my email in it too. Hope this works for everyone, incase my pbi is valid I would like to make more installers.
The Package File name is: VLC0.8.1.pbi.gz
The info file name is: VLC0.8.1.pbi.gz-info
I just uploaded the vlc pbi I created at the ftp address ftp://pcbsd.homeunix.org . I have also mentioned the md5 checksum value and have my email in it too. Hope this works for everyone, incase my pbi is valid I would like to make more installers.
The Package File name is: VLC0.8.1.pbi.gz
The info file name is: VLC0.8.1.pbi.gz-info
There is an other pbi VLC-0.8.1_9.pbi. Wich package-creater-version do you use. the latest version great pbi's without *.gz.
markiv34
07-14-2005, 03:24 PM
I just uploaded the vlc pbi I created at the ftp address ftp://pcbsd.homeunix.org . I have also mentioned the md5 checksum value and have my email in it too. Hope this works for everyone, incase my pbi is valid I would like to make more installers.
The Package File name is: VLC0.8.1.pbi.gz
The info file name is: VLC0.8.1.pbi.gz-info
There is an other pbi VLC-0.8.1_9.pbi. Wich package-creater-version do you use. the latest version great pbi's without *.gz.
I used the latest version that creates .pbi packages without making the created packages *.pbi.gz.
malbert_1
07-20-2005, 11:54 AM
Hi guys!
Sorry for the delay on these!~ I have been running through some tests myself that took a bit longer than expected. Great idea as well in regards to a separate forum/topic for pending *.pbi. Perhaps if we had a separate board under development labeled something like PBI development?
I hope to have these final results soon. Should you have any questions, please feel free to let me know.
Best regards always.
Amigamerlin
07-22-2005, 11:17 AM
I just uploaded the vlc pbi I created at the ftp address ftp://pcbsd.homeunix.org . I have also mentioned the md5 checksum value and have my email in it too. Hope this works for everyone, incase my pbi is valid I would like to make more installers.
The Package File name is: VLC0.8.1.pbi.gz
The info file name is: VLC0.8.1.pbi.gz-info
There is an other pbi VLC-0.8.1_9.pbi. Wich package-creater-version do you use. the latest version great pbi's without *.gz.
I used the latest version that creates .pbi packages without making the created packages *.pbi.gz.
Sorry Guys, but I'm not able to download the package.
The error : 550 CWD failed: "/VLC0.8.0.1.pbi.gz": directoy not found
I've try to donwload with Konqueror, Firefox and Kget without success.
What's wrong?
Thanks !!
Solarin
07-22-2005, 11:37 AM
Sorry Guys, but I'm not able to download the package.
The error : 550 CWD failed: "/VLC0.8.0.1.pbi.gz": directoy not found
I've try to donwload with Konqueror, Firefox and Kget without success.
What's wrong?
Thanks !!
A quote from another thread which explains:
Many ftp servers habe an incomming folder like that - you can see whats in it, and upload to it, but not download from it. That stops just anyone putting anything they like in it, and then telling everyone to download from there - like warez, pr0n, movies etc.
ie. That ftp site is upload and view only. NOT download capable.
Solarin
Amigamerlin
07-23-2005, 07:50 AM
Sorry Guys, but I'm not able to download the package.
The error : 550 CWD failed: "/VLC0.8.0.1.pbi.gz": directoy not found
I've try to donwload with Konqueror, Firefox and Kget without success.
What's wrong?
Thanks !!
A quote from another thread which explains:
Many ftp servers habe an incomming folder like that - you can see whats in it, and upload to it, but not download from it. That stops just anyone putting anything they like in it, and then telling everyone to download from there - like warez, pr0n, movies etc.
ie. That ftp site is upload and view only. NOT download capable.
Solarin
Yes, I read all the topic after my post :(. Then the link is useless !!
Sblevin, any new from VLC side? did you have had success creating this package?.
Thanks for the attention !! :D
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.