On Mon, Jun 06, 2022 at 06:53:06PM -0300, Antonio Terceiro wrote:
> On Fri, Jun 03, 2022 at 09:52:17PM +0530, Pirate Praveen wrote:
> > 
> > 
> > On വ്യാ, ജൂൺ 2 2022 at 08:58:37 വൈകു -03:00:00 -03:00:00, Antonio Terceiro
> > <terce...@debian.org> wrote:
> > > On Thu, Jun 02, 2022 at 06:03:47PM -0300, Lucas Kanashiro wrote:
> > > >  Em 01/06/2022 15:42, Pirate Praveen escreveu:
> > > >  > On Sun, 13 Feb 2022 08:59:18 +0100 Lucas Nussbaum
> > > > <lu...@debian.org>
> > > >  > wrote:
> > > >  > > During a rebuild of all packages in sid, your package failed to
> > > > build
> > > >  > > on amd64.
> > > >  > >
> > > >  > >
> > > >  > > Relevant part (hopefully):
> > > >  > > > make[1]: Entering directory '/<<PKGBUILDDIR>>'
> > > >  > > > mkdir -p vendor/assets/javascripts
> > > >  > > > ln -s /usr/share/javascript/handlebars/handlebars.js
> > > >  > vendor/assets/javascripts/handlebars.js
> > > >  > > > ln -s
> > > >  > /usr/share/javascript/handlebars.runtime/handlebars.runtime.js
> > > >  > vendor/assets/javascripts/handlebars.runtime.js
> > > >  >
> > > >  > [...]
> > > >  >
> > > >  > > > Failed to load /dev/null because it doesn't contain valid
> > > > YAML hash
> > > >  > > > ERROR:  While executing gem ... (Gem::Package::SymlinkError)
> > > >  > > >     installing symlink
> > > > 'vendor/assets/javascripts/handlebars.js'
> > > >  > pointing to parent path
> > > > /usr/share/javascript/handlebars/handlebars.js
> > > >  > of
> > > >  > 
> > > > /<<PKGBUILDDIR>>/debian/ruby-handlebars-assets/usr/share/rubygems-integration/all/gems/handlebars_assets-0.23.8
> > > >  > is not allowed
> > > >  >
> > > >  > How do we handle this issue? Should we copy instead? If that is
> > > > the
> > > >  > solution, we will have to rebuild ruby package whenever the js
> > > > package
> > > >  > changes. Can we modify rubygems to allow this link?
> > > 
> > > Can you try creating the symlink *after* rubygems has done its thing?
> > > i.e. instead of creating the link in the source tree, create it at the
> > > installation directory, after the installation has been done.
> > 
> > We won't be able to run the tests. If I comment out the ln commands, tests
> > fail with
> > 
> > Errno::ENOENT: No such file or directory @ rb_sysopen -
> > vendor/assets/javascripts/handlebars.js
> > 
> > May be we can copy during build and replace it by symlink in install?
> 
> Right, because the entire process happens at the install target. I have
> an experimental gem2deb branch that puts build, test and install in the
> expected phases of the build (dh_auto_{build,test,install}), so that you
> could put the symlinks in place in, e.g.  executed_after_dh_auto_build,
> so the symlinks could be in place during both the tests and the
> installation.
> 
> We should be able to play with this soon.

I just uploaded gem2deb 2.0 with experimental support for this. If you
use debhelper compat level 14, then the package will be built in a way
that the actual build (compilation) happens during the dh_auto_build
target, tests during dh_auto_test, and installation during
dh_auto_install.

Note however that debhelper-compat 14 is not really available from the
debhelper side (i.e. it does not yet provide debhelper-compat (= 14)).
To test this you have to build with DH_COMPAT=14 set.

Attachment: signature.asc
Description: PGP signature

Reply via email to