Bug#974431: [lemonldap-ng] all minified js files are empty

Olof Johansson olof at ethup.se
Wed Nov 11 16:47:37 GMT 2020


Package: src:lemonldap-ng
Version: 2.0.9+ds1
Severity: important

Hello,

As part of LLNG's debian/rules, minified js files are recreated. The
method for doing so errors out with '--comments=/Copyr/i' being
unrecognized and because of shell redirection, empty files are created
without aborting the build process:

  $ ls -l /usr/share/lemonldap-ng/manager/htdocs/static/js/manager.*js
  -rw-r--r-- 1 root root 31793 10 aug 12.25 /usr/share/lemonldap-ng/manager/htdocs/static/js/manager.js
  -rw-r--r-- 1 root root     0  7 sep 08.51 /usr/share/lemonldap-ng/manager/htdocs/static/js/manager.min.js

The build log from the reproducible-builds project are available here:

  https://tests.reproducible-builds.org/debian/rbuild/unstable/amd64/lemonldap-ng_2.0.9+ds-1.rbuild.log.gz

This makes the manager web interface fail to load at all (with angular
complaining about the non-existance of the llngManager module), and the
portal has issues (all "views"/tabs in the portal are rendered in a
single page -- but unlike the manager is still functional, at least for
logging in).

The corresponding step in upstream's Makefile has diverged slightly, and
syncing them would probably fix the errors. Currently (as of
2.0.9+ds-1), the code in debian/rules looks like this:

  # Generate minified files removed by uscan
  for i in $$(find $(TMP)/$(LMSHAREDIR) -type f -name '*.js'); do \
      echo -n "compressing $$i: "; \
      uglifyjs --comments='/Copyr/i' $$i >$${i%%.js}.min.js; \
      echo done; \
  done

The error given for each invokation is:

  ERROR: invalid option --comments=/Copyr/i

I note especially that a recent change in upstream's Makefile is
removing the '=' between the --comments flag and its argument. I would
propose syncing the uglifyjs invokations, and add an `|| exit 1` or
similar to the command, so that future errors in uglifyjs aborts the
build.


merci beaucoup pour tout votre travail,
-- 
olof



More information about the pkg-perl-maintainers mailing list