Re: Replacing web assets with symlinks to packaged versions

2016-07-12 Thread Jakub Wilk

* Thomas Goirand , 2016-07-12, 14:54:
The usual way to do things here, is to delete the files from the tree 
before building the package, just to make sure that you're not using 
it. But my understanding is that it's otherwise fine to just leave it 
there,


ACK

even though it'd be better to repack it and remove the .min.js files if 
you have enough time to spare doing so.


I wouldn't remove .min.js stuff just because I have enough free time.
We should use pristine upstream tarballs whenever we can.

--
Jakub Wilk



Re: Replacing web assets with symlinks to packaged versions

2016-07-12 Thread Thomas Goirand
On 07/09/2016 07:21 PM, Enrico Zini wrote:
> On Sat, Jul 09, 2016 at 02:06:36PM +0100, Ian Jackson wrote:
> 
>> As I understand it, your problem is that:
>>
>>  * Upstream wants the upstream tarball to contain a copy of bootstrap
>>  * Debian wants the copy of bootstrap removed from the source package
>>  * But none of our source formats can replace files with symlinks ?
>>
>> ?
> 
> It turns out that Debian does not want the copy of bootstrap removed
> from the source package, and that it's ok to just replace them with
> symlinks using dh_link.
> 
> That lowers massively the bar, and my level of despair.

The usual way to do things here, is to delete the files from the tree
before building the package, just to make sure that you're not using it.
But my understanding is that it's otherwise fine to just leave it there,
even though it'd be better to repack it and remove the .min.js files if
you have enough time to spare doing so.

Cheers,

Thomas Goirand (zigo)



Re: Replacing web assets with symlinks to packaged versions

2016-07-09 Thread Craig Small
Hi Enrico,
  Have you looked at dh-linktree?
I use that in wordpress so if the package has the right files it makes
symlinks to the relavant spot and adds the package to the binary dependency.

 - Craig


Re: Replacing web assets with symlinks to packaged versions

2016-07-09 Thread David Prévot
Hi,

Le 09/07/2016 à 08:32, Enrico Zini a écrit :

> As Debian packager of it, I want twitter bootstrap in example/theme to
> be symlinks to what's in libjs-twitter-bootstrap.

You probably want libjs-bootstrap (version 3) instead of the orphaned
libjs-twitter-bootstrap (version 2).

Regards

David



signature.asc
Description: OpenPGP digital signature


Re: Replacing web assets with symlinks to packaged versions

2016-07-09 Thread Enrico Zini
On Sat, Jul 09, 2016 at 02:06:36PM +0100, Ian Jackson wrote:

> As I understand it, your problem is that:
> 
>  * Upstream wants the upstream tarball to contain a copy of bootstrap
>  * Debian wants the copy of bootstrap removed from the source package
>  * But none of our source formats can replace files with symlinks ?
> 
> ?

It turns out that Debian does not want the copy of bootstrap removed
from the source package, and that it's ok to just replace them with
symlinks using dh_link.

That lowers massively the bar, and my level of despair.


Enrico

-- 
GPG key: 4096R/634F4BD1E7AD5568 2009-05-08 Enrico Zini 


signature.asc
Description: PGP signature


Re: Replacing web assets with symlinks to packaged versions

2016-07-09 Thread Enrico Zini
On Sat, Jul 09, 2016 at 08:00:48AM -0700, Josh Triplett wrote:

> > On ശനി 09 ജൂലൈ 2016 07:01 വൈകു, Pirate Praveen wrote:
> > > You just add a links file in your package to replace the js to symlinks. 
> > > And add dependency on the js package.
> > > That's all you'll need.
[...]
> No, you don't have to remove bundled third-party software from the
> source package unless it doesn't have a Free Software license.
> Third-party Free Software packages can stay in the source package; you
> just want to have the binary package use the packaged versions instead.

Perfect, thank you both, that seems to solve my problem entirely, and
it's far far easier than I feared at first.


Enrico

-- 
GPG key: 4096R/634F4BD1E7AD5568 2009-05-08 Enrico Zini 


signature.asc
Description: PGP signature


Re: Replacing web assets with symlinks to packaged versions

2016-07-09 Thread Pirate Praveen


On 2016, ജൂലൈ 9 8:41:46 PM IST, Balasankar C  wrote:
>Ah. My mistake. I misunderstood the query. BTW, in this case, we can
>just use
>gbp.conf (if using gbp) to remove the redundant file while importing
>new
>version, right? We have been doing that for many of the rails-assets-*
>packages
>in Debian Ruby team.

We do that in rails-assets-* only when the embedded copy is minified js.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Re: Replacing web assets with symlinks to packaged versions

2016-07-09 Thread Balasankar C
On ശനി 09 ജൂലൈ 2016 08:30 വൈകു, Josh Triplett wrote:
> Balasankar C wrote:
>> On ശനി 09 ജൂലൈ 2016 07:01 വൈകു, Pirate Praveen wrote:
>>> On 2016, ജൂലൈ 9 6:02:12 PM IST, Enrico Zini  wrote:
 Hello,

 as upstream of https://github.com/spanezz/staticsite I want it so that
 when people git clone it or open a tarball of it, it just works,
 with no need of installing twitter bootstrap in example/theme manually.

 As Debian packager of it, I want twitter bootstrap in example/theme to
 be symlinks to what's in libjs-twitter-bootstrap.
>>>
>>> You just add a links file in your package to replace the js to symlinks. 
>>> And add dependency on the js package.
>>>
>>> That's all you'll need.
>>>
>>
>> That involves repackaging right? I think he is trying to do it without making
>> multiple tarballs.
> 

Ah. My mistake. I misunderstood the query. BTW, in this case, we can just use
gbp.conf (if using gbp) to remove the redundant file while importing new
version, right? We have been doing that for many of the rails-assets-* packages
in Debian Ruby team.


-- 
Balasankar C
http://balasankarc.in



Re: Replacing web assets with symlinks to packaged versions

2016-07-09 Thread Josh Triplett
Balasankar C wrote:
> On ശനി 09 ജൂലൈ 2016 07:01 വൈകു, Pirate Praveen wrote:
> > On 2016, ജൂലൈ 9 6:02:12 PM IST, Enrico Zini  wrote:
> >> Hello,
> >>
> >> as upstream of https://github.com/spanezz/staticsite I want it so that
> >> when people git clone it or open a tarball of it, it just works,
> >> with no need of installing twitter bootstrap in example/theme manually.
> >>
> >> As Debian packager of it, I want twitter bootstrap in example/theme to
> >> be symlinks to what's in libjs-twitter-bootstrap.
> >
> > You just add a links file in your package to replace the js to symlinks. 
> > And add dependency on the js package.
> >
> > That's all you'll need.
> >
>
> That involves repackaging right? I think he is trying to do it without making
> multiple tarballs.

No, you don't have to remove bundled third-party software from the
source package unless it doesn't have a Free Software license.
Third-party Free Software packages can stay in the source package; you
just want to have the binary package use the packaged versions instead.

- Josh Trpilett



Re: Replacing web assets with symlinks to packaged versions

2016-07-09 Thread Pirate Praveen


On 2016, ജൂലൈ 9 7:29:47 PM IST, Balasankar C  wrote:
>On ശനി 09 ജൂലൈ 2016 07:01 വൈകു, Pirate Praveen wrote:
>> 
>> 
>> On 2016, ജൂലൈ 9 6:02:12 PM IST, Enrico Zini 
>wrote:
>>> Hello,
>>>
>>> as upstream of https://github.com/spanezz/staticsite I want it so
>that
>>> when people git clone it or open a tarball of it, it just works,
>>> with no need of installing twitter bootstrap in example/theme
>manually.
>>>
>>> As Debian packager of it, I want twitter bootstrap in example/theme
>to
>>> be symlinks to what's in libjs-twitter-bootstrap.
>> 
>> You just add a links file in your package to replace the js to
>symlinks. And add dependency on the js package.
>> 
>> That's all you'll need.
>> 
>
>That involves repackaging right? I think he is trying to do it without
>making
>multiple tarballs.

No, it does need repackaging. It will just replace the js files with symlinks 
when building the package. Repackaging is required only if the js is minified.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Re: Replacing web assets with symlinks to packaged versions

2016-07-09 Thread Guus Sliepen
On Sat, Jul 09, 2016 at 07:29:47PM +0530, Balasankar C wrote:

> >> as upstream of https://github.com/spanezz/staticsite I want it so that
> >> when people git clone it or open a tarball of it, it just works,
> >> with no need of installing twitter bootstrap in example/theme manually.
> >>
> >> As Debian packager of it, I want twitter bootstrap in example/theme to
> >> be symlinks to what's in libjs-twitter-bootstrap.
> > 
> > You just add a links file in your package to replace the js to symlinks. 
> > And add dependency on the js package.
> 
> That involves repackaging right? I think he is trying to do it without making
> multiple tarballs.

If you have a watch file, you can download new upstream tarballs with
the uscan tool. You can list the files you want automatically removed
from that tarball before it's turned into a .orig.tar.gz in
debian/copyright (see the uscan manpage). So there is no need to
manually repackage it.

-- 
Met vriendelijke groet / with kind regards,
  Guus Sliepen 


signature.asc
Description: Digital signature


Re: Replacing web assets with symlinks to packaged versions

2016-07-09 Thread Balasankar C
On ശനി 09 ജൂലൈ 2016 07:01 വൈകു, Pirate Praveen wrote:
> 
> 
> On 2016, ജൂലൈ 9 6:02:12 PM IST, Enrico Zini  wrote:
>> Hello,
>>
>> as upstream of https://github.com/spanezz/staticsite I want it so that
>> when people git clone it or open a tarball of it, it just works,
>> with no need of installing twitter bootstrap in example/theme manually.
>>
>> As Debian packager of it, I want twitter bootstrap in example/theme to
>> be symlinks to what's in libjs-twitter-bootstrap.
> 
> You just add a links file in your package to replace the js to symlinks. And 
> add dependency on the js package.
> 
> That's all you'll need.
> 

That involves repackaging right? I think he is trying to do it without making
multiple tarballs.


-- 
Balasankar C
http://balasankarc.in



Re: Replacing web assets with symlinks to packaged versions

2016-07-09 Thread Guus Sliepen
On Sat, Jul 09, 2016 at 02:32:12PM +0200, Enrico Zini wrote:

> as upstream of https://github.com/spanezz/staticsite

Hm, it seems you didn't like ikiwiki because of the template system it
uses. But there's a huge number of plugins for ikiwiki (which may also
explain why it's slower than staticsite). Wouldn't it be an idea to add
Jinja2 support to ikiwiki?

-- 
Met vriendelijke groet / with kind regards,
  Guus Sliepen 


signature.asc
Description: Digital signature


Re: Replacing web assets with symlinks to packaged versions

2016-07-09 Thread Pirate Praveen


On 2016, ജൂലൈ 9 6:02:12 PM IST, Enrico Zini  wrote:
>Hello,
>
>as upstream of https://github.com/spanezz/staticsite I want it so that
>when people git clone it or open a tarball of it, it just works,
>with no need of installing twitter bootstrap in example/theme manually.
>
>As Debian packager of it, I want twitter bootstrap in example/theme to
>be symlinks to what's in libjs-twitter-bootstrap.

You just add a links file in your package to replace the js to symlinks. And 
add dependency on the js package.

That's all you'll need.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Re: Replacing web assets with symlinks to packaged versions

2016-07-09 Thread Ian Jackson
Enrico Zini writes ("Replacing web assets with symlinks to packaged versions"):
> as upstream of https://github.com/spanezz/staticsite I want it so that
> when people git clone it or open a tarball of it, it just works,
> with no need of installing twitter bootstrap in example/theme manually.
> 
> As Debian packager of it, I want twitter bootstrap in example/theme to
> be symlinks to what's in libjs-twitter-bootstrap.

As I understand it, your problem is that:

 * Upstream wants the upstream tarball to contain a copy of bootstrap
 * Debian wants the copy of bootstrap removed from the source package
 * But none of our source formats can replace files with symlinks ?

?

Otherwise you could just have a script or utility or something which
you would run during "import new upstream version", and which would
sort out the symlinks.

> Could someone pick this up and turn it into something that integrated
> well with our toolchain, so that I can turn my staticsite tarballs into
> Debian packages with minimal effort, and so could everyone else[1]?

If I am right, in my suppositions above, then part of your underlying
problem is the one I was talking about in my "faithful source format"
RFH...

But perhaps an easier answer would be to do the symlink replacement on
installation-to-staging-directory.

I feel I haven't really understood why you need LD_PRELOAD or FUSE.

Ian.



Re: Replacing web assets with symlinks to packaged versions

2016-07-09 Thread Marco d'Itri
On Jul 09, Enrico Zini  wrote:

> Could we have another LD_PRELOAD hack that replaced instances of
> jquery.min.js to symlinks to libjs-jquery contents?
Probably not, because some upstream maintainer will want to depend on 
a specific release of the library.

-- 
ciao,
Marco


signature.asc
Description: PGP signature


Replacing web assets with symlinks to packaged versions

2016-07-09 Thread Enrico Zini
Hello,

as upstream of https://github.com/spanezz/staticsite I want it so that
when people git clone it or open a tarball of it, it just works,
with no need of installing twitter bootstrap in example/theme manually.

As Debian packager of it, I want twitter bootstrap in example/theme to
be symlinks to what's in libjs-twitter-bootstrap.

As both, I do not want to have to build two tarballs or something weird
like that.

We already use fakeroot to tweak the view of the file system when
building packages. How about a similar trick for web assets?

Could we have another LD_PRELOAD hack that replaced instances of
jquery.min.js to symlinks to libjs-jquery contents?

I drafted a proof of concept here, as a FUSE file system, because it was
easy to do by tweaking a passthrough FUSE filesystem example:
https://github.com/spanezz/debassets

Could someone pick this up and turn it into something that integrated
well with our toolchain, so that I can turn my staticsite tarballs into
Debian packages with minimal effort, and so could everyone else[1]?


Enrico

[1] Alternatively, could someone package staticsite for me, and I can
stop worrying about this? :)
-- 
GPG key: 4096R/634F4BD1E7AD5568 2009-05-08 Enrico Zini 


signature.asc
Description: PGP signature