patchGnash - The GNU Flash player - Patches: patch #7554, Autoinstalling gnash dependencies

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #7554: Autoinstalling gnash dependencies

Submitter:  Jonas 'Sortie' Termansen <sortie>
Submitted:  Tue 14 Jun 2011 09:39:15 PM UTC
   
 
Category:  build Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed

Jump to the original submission

Fri 08 Jul 2011 05:18:26 PM UTC, comment #9: 

Ok, build on a newly installed ubuntu-10.10-netbook edition works with just a couple of rounds (second round is required because somehow the gtkglext dependency shows up only on second run of ./configure, possibly due to partial install of ogl on first go, see also bug #33729)

For the rest I was suggesting in IRC to have the script tell more about the failed-to-install packages (swftools in my case) as otherwise you have to run ./configure again just to know what's the website from which you can manually download a package...

Sandro Santilli <strk>
Group Member
Fri 08 Jul 2011 11:44:38 AM UTC, comment #8: 

Sorry, my PC was off for the night. You should now be able to pull sortie-acc-pkg-line from git://sortie-pc1.maxsi.org/home/sortie/gnash/

Jonas 'Sortie' Termansen <sortie>
Group Member
Fri 08 Jul 2011 11:26:35 AM UTC, comment #7: 

Do you have your patch available in a git branch ? I get a connection timeout on sortie-pc1.maxsi.org

Sandro Santilli <strk>
Group Member
Thu 07 Jul 2011 10:29:12 PM UTC, comment #6: 

I have now attached an updated patch that addresses a few key issues:

1) All the suggestion output is now done with macros. This macro system then takes care of formatting the output, and setting up the list of package names for the local system.
2) The script now installs everything in a single iteration.

When fixing 2) I had to change a few tests in the suggestion phase. Some of them weren't coded consistently and I may have cause some regressions. It would be nice if you looked at my TODOs to make sure I have not unintentionally broken some exotic system.

I use a few shell utilities to format the output (sed, fold, cut, tr) and as far as I know they are in POSIX and part of MSYS, so their presence shouldn't break any systems. In any case, the suggestion lines are hardly useful on any non-GNU systems.

Since the macros are easy to tweak, it could be easy to disable some of the suggestions based on whether you have apt, yum, or yast. I decided on keeping them, as it shows users that we care about many platforms.

In the case of Gnash, having a static install-everything.sh script is impossible. We simply support too many configurations, backends, frontends, package management systems, for this to be possible without using configure.

Another thing that might need to be addressed, is that this script installs everything from the "error", "warning", and "recommended" categories. It may be desirable to only install from the "error" and "warning" category. But on the other hand, if the user is really picky, they will just run the apt/yum/yast lines anyways.

(file #23630)

Jonas 'Sortie' Termansen <sortie>
Group Member
Tue 28 Jun 2011 09:45:40 PM UTC, comment #5: 

Yeah, in my last comment I figured what you're describing here, that is the fact that a dynamically-generated script only installs what you asked for at configure time.

I'm not sure yet about the implications of that, as ./configure is moving in the direction of a "build-what-can-be-built" mode, so might eventually strictly_require nothing, but then also build nothing...

Anyway, production of an utility script surely doesn't do any harm, and it can always be improved later, so I'll be happy to try a cleaned up version of the patch.

Sandro Santilli <strk>
Group Member
Tue 28 Jun 2011 09:28:00 PM UTC, comment #4: 

I am quite unsure how exactly you expect from this system to work.

If I wrote a separate static script it would need to do a lot of configure-like things such as scanning the system, figuring out which backends to use, detecting package system and what not. In any case, it wouldn't be static at all, and would duplicate a lot of what configure already does. :)

It'd be simpler if we could pass --install-dependencies to configure, but that'd require running configure as root, which is simply bad manners - root would own all the generated files.

I favor the dynamic approach, where configure tailors a list of packages needed for the build. Ideally, the user would pass the arguments to configure, get a list of dependencies, call my script, and then run configure successfully.

A side note, currently it may take 1 or 2 attempts of running the script to install everything. This is caused by unrelated bugs in configure (mainly it may not suggest some dependencies, if others are missing. These bugs are trivial to fix). :)

If we decide on the dynamic approach, then my current patch would work very well -- it needs to be polished and rewritten using more M4 macros (such that it generates the install libfoo-dev suggestions too). I'd gladly rewrite the current patch to merge the systems.

If I rewrote the patch such that it generates the suggestions as well, would it be acceptable into master? I don't see any graceful way to create a static separate script that does the task, without re-inventing configure.

Jonas 'Sortie' Termansen <sortie>
Group Member
Mon 27 Jun 2011 07:18:18 AM UTC, comment #3: 

Uhm... other that: the script might prompt you for installing only the dependency for the configuration you asked for.

Gets more complex when you think of a default ./configure run, where things you want are picked based on what you have...

Sandro Santilli <strk>
Group Member
Mon 27 Jun 2011 07:15:58 AM UTC, comment #2: 

Jonas, I agree with Rob it makes more sense for the script to be static rather than generated.

Sandro Santilli <strk>
Group Member
Mon 20 Jun 2011 04:48:55 PM UTC, comment #1: 

Rather than have configure (after multiple tries) produce a shell script for what's missing, I'd rather see a simple utility script that just blindly tries to install all dependencies for a source build.

Rob Savoye <rsavoye>
Group administrator
Tue 14 Jun 2011 09:39:15 PM UTC, original submission:  

Gnash currently has a system that tells which .deb and .rpm packages to install, if some are missing. I often use this on fresh system. Unfortunately, that involves a lot of copy pasting and trial-and-error when my distro named stuff differently.

This patch introduces a system that produces a command line that would install most dependencies (if possible) on .deb and .rpm compatible platforms, and then saves it to a small script. Configure then gracefully informs the user about the script. Sample session: http://pastebin.com/QL83jk2W

I tested this patch on Mint 11 (natty) where it successfully installed everything Gnash needed, and as well on Fedora 15.

Not all package names are correct, and a few optional packages are not available for some common distros, and a few links are dead. The system handles gracefully if a given package is unavailable. It'd be nice if you guys tested this patch out to be sure it is as portable as I tried to make it.

The script might not cause all needed software to be installed in the first run, and requires configure to be run possibly one or two times more. This is unrelated to this script and is another bug in configure, where it doesn't give error messages for all software, if something basic is missing.

I attached the patch in git format-patch format.

Jonas 'Sortie' Termansen <sortie>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by sortie (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-07-09 sortie StatusNone Done
        Open/ClosedOpen Closed
    2011-07-07 sortie Attached File- Added 0001-Configure-generates-a-script-that-installs-everythin.patch, #23630
    2011-06-14 sortie Attached File- Added 0001-Configure-now-generates-a-script-that-automatically-.patch, #23525

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code