Bundled Flash

Adam Williamson awilliam at redhat.com
Fri Aug 23 12:40:18 UTC 2013


On Fri, 2013-08-23 at 04:43 -0700, T.C. Hollingsworth wrote:
> Thanks for tackling this!
> 
> On Fri, Aug 23, 2013 at 4:03 AM, Adam Williamson <awilliam at redhat.com> wrote:
> > So, tinymce has a 'media' plugin which lets you embed media in HTML
> > you're editing with it. If it thinks the media might need playing with
> > Flash, it'll generate HTML that tries to use a Flash player -
> > moxieplayer.swf - to play it (sometimes as a fallback from HTML5).
> >
> > Just nuking moxieplayer.swf doesn't stop tinymce generating HTML that
> > looks for it, so that's not really the way to go. But I think I found a
> > way to patch the plugin not to try and use moxieplayer.swf and just to
> > spit out nice clean HTML instead. I also bumped tinymce to the latest
> > upstream release, since it hadn't been bumped since 2011 and was
> > *ancient*. Testing of this is very welcome. I've sent the build to
> > Rawhide and F20 for now.
> >
> > roundcubemail is on this list because it bundles tinymce, basically. I
> > think it should be trivial to replace its bundled tinymce with the
> > system-wide one. I'm going to test installing the updated and de-Flashed
> > tinymce along with a roundcubemail build patched to use a system-wide
> > tinymce on my own server and check that it works okay that way. If it
> > does, I'll submit that combination to all Fedora releases.
> >
> > I suspect many other packages on the list may be there because they're
> > bundling tinymce. In most cases, unbundling it ought to be trivial; it
> > seems like the 3.x series of tinymce maintained compatibility well, so I
> > think it shouldn't be a problem to use system-wide tinymce. But I'll
> > look into it some more tomorrow.
> >
> > askbot is the only package right now using t. he systemwide tinymce. I'm
> > assuming ask.fp.o runs on EL, but I'm not sure. Any infra folks reading
> > this, would you be interested in checking ask.fp.o behaves sensibly with
> > de-Flashed tinymce 3.5.8? I don't think the Flash issue should matter at
> > all because it looks like askbot customizes the tinymce editor widget
> > somewhat and doesn't actually expose the media plugin _at all_. I don't
> > see why it wouldn't work with tinymce 3.5.8 - in fact it ought to work
> > better - but we should probably check.
> >
> > Random note: patching minifed javascript is a giant fucking PITA, and we
> > can't edit the 'source' javascript for tinymce and re-minify it because
> > Fedora doesn't have yuicompressor -
> > https://bugzilla.redhat.com/show_bug.cgi?id=745515 . Sigh.
> 
> Ideally, we would port dependent applications to TinyMCE 4.  It looks like 3.x
> is ancient; it hasn't had a commit in over a year.  Version 4 uses a nodejs-
> based build system so we can do minification properly according to the shiny
> new guidelines.  The differences don't look too crazy:
> http://www.tinymce.com/wiki.php/Tutorial:Migration_guide_from_3.x
> 
> I can package up what's needed (including a new-world compliant tinymce package)
> if someone can verify that porting is possible.  (Or I'll try and find time to
> look myself sometime soon.)

All the upstream projects I found seemed to consider jumping to tinymce
4 a rather large move. Debian packages 3 and 4 as separate packages. I
rather think we should do the same rather than just pretend they're the
same thing and we'll be easily able to migrate things from one to the
other.

Or, at least let's get a tinymce 3.5.8 built and all things that bundle
3 un-bundled before we start worrying about 4. :)

So, after some teeth gnashing, I've confirmed roundcube can indeed be
relatively easily unbundled to use a system 3.5.8 package. It needs the
spellchecker plugin which is a separate package in Fedora, which tripped
me up for a while.

However, to do this, I run into the fucking
convert-a-directory-to-a-symlink old chestnut, and RPM/yum just isn't
having it. Following the breadcrumbs all over this list and Bugzilla I
came up with this %pretrans:

%pretrans -p <lua>
-- changed dir to symlink in 0.9.3-1, workaround RPM issues
path = "%{roundcubedir}/program/js/tiny_mce"
if posix.readlink(path) then
os.remove(path)
end

But yum/rpm just won't wear it. 'yum update mynewroundcubepackage.rpm'
fails with a file conflict just like it does if there's no %pretrans at
all. I was able to test my unbundling simply by manually removing and
reinstalling the roundcube package, but I can't push it out anywhere
unless I can get a %pretrans which yum/rpm will be happy with. Anyone?
https://bugzilla.redhat.com/show_bug.cgi?id=975909 may be involved, I
guess.

roundcubemail ships tinymce
as /usr/share/roundcubemail/program/js/tiny_mce and hooks into it rather
untidily; it seems rather cleaner to just do 'ln
-s /usr/share/tinymce/jscripts/tiny_mce
%{buildroot}%{roundcubedir}/program/js/tiny_mce' in the spec rather than
write a messy patch for roundcube to change where it looks for tinymce,
which would probably need constant updating.

> BTW, this is why we want to start requiring minification in %build, so we'll be
> able to patch JS sanely once again.  ;-)

I am intrigued by your ideas and wish to subscribe to your newsletter!
-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | identi.ca: adamwfedora
http://www.happyassassin.net



More information about the devel mailing list