Bug 32994

Summary: Remove compiled files from src (2)
Product: Koha Reporter: Mason James <mtj>
Component: PackagingAssignee: Mason James <mtj>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: blocker    
Priority: P1 - high CC: dcook, jonathan.druart, lucas, martin.renvoize, mtj, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32809
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32609
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33213
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.04
Circulation function:
Bug Depends on: 32609, 32975    
Bug Blocks:    
Attachments: Bug 32609: Remove compiled files from src
Bug 32609: Remove compiled files from src
Bug 32994: Remove compiled files from src (2)
Bug 32994: Remove compiled files from src (2)
Bug 32994 - remove breaking css/maps/*.map files from Makefile.PL
Bug 32994 - remove breaking css/maps/*.map files from Makefile.PL
Bug 32994 - remove breaking css/maps/*.map files from Makefile.PL
Bug 32994: Remove compiled files from src (2)
Bug 32994: Remove breaking css/maps/*.map files from Makefile.PL
Bug 32994: Remove compiled files from src (2)
Bug 32994: Remove breaking css/maps/*.map files from Makefile.PL

Description Mason James 2023-02-17 12:58:36 UTC
small followup patch for bug 32609
Comment 1 Mason James 2023-02-17 12:59:05 UTC
Created attachment 146840 [details] [review]
Bug 32609: Remove compiled files from src

small patch for debian packaging

no testing info provided
Comment 2 Mason James 2023-02-17 13:10:35 UTC
(In reply to Mason James from comment #0)
> small followup patch for bug 32609

this patch adds a file that stops dpkg-source from including ./node_modules dir to koha-common.deb package

to test...
 - build a package, note failure
 - apply patch
 - build a package, note success
Comment 3 Mason James 2023-02-17 13:14:04 UTC
Created attachment 146843 [details] [review]
Bug 32609: Remove compiled files from src

this patch adds a file that stops dpkg-source from including ./node_modules dir to koha-common.deb package

to test...
 - build a package, note failure
 - apply patch
 - build a package, note success
Comment 4 Mason James 2023-02-19 03:01:31 UTC
Created attachment 146932 [details] [review]
Bug 32994: Remove compiled files from src (2)

this patch adds 2 files that stops dpkg-source from including ./node_modules dir into koha-common.deb package

to test...
 - build a package, note failure
 - apply patch
 - build a package, note success
Comment 5 Mason James 2023-02-19 03:01:47 UTC
Created attachment 146933 [details] [review]
Bug 32994: Remove compiled files from src (2)

this patch adds 2 files that stops dpkg-source from including ./node_modules dir into koha-common.deb package

to test...
 - build a package, note failure
 - apply patch
 - build a package, note success
Comment 6 Mason James 2023-02-21 02:07:12 UTC
Created attachment 146994 [details] [review]
Bug 32994 - remove breaking css/maps/*.map files from Makefile.PL

to test:
 - run makefile, note failure

  $ perl Makefile.PL
  make[1]: *** No rule to make target 'koha-tmpl/opac-tmpl/bootstrap/css/maps/opac-rtl.css.map', needed by 'pm_to_blib'.  Stop.
  make[1]: Leaving directory '/build/koha-22.12.00-4~git+20230221145053.b112630a'
  dh_auto_build: make -j1 returned exit code 2
  make: *** [debian/rules:9: build] Error 2
  dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
  E: Failed autobuilding of package

 - apply patch
 - run makefile, note success
Comment 7 Mason James 2023-02-21 02:19:49 UTC
version info below...

$ apt policy yarn:
 *** 1.22.19-1 500
        500 https://dl.yarnpkg.com/debian stable/main amd64 Packages

$ apt policy nodejs:
 *** 14.21.3-deb-1nodesource1 999
        500 https://deb.nodesource.com/node_14.x buster/main amd64 Packages
        100 /var/lib/dpkg/status

$ npm -v
6.14.18

$ gulp -v
CLI version: 2.3.0
Local version: Unknown
Comment 8 Mason James 2023-02-21 02:28:30 UTC
Created attachment 146995 [details] [review]
Bug 32994 - remove breaking css/maps/*.map files from Makefile.PL

to test:
 - run makefile, note failure

  $ perl Makefile.PL
  $ make
  $ make install
  webpack 5.74.0 compiled with 3 warnings in 20831 ms
  Done in 36.01s.
  make: *** No rule to make target 'koha-tmpl/opac-tmpl/bootstrap/css/maps/opac-rtl.css.map', needed by 'pm_to_blib'.  Stop.

 - apply patch
 - run makefile, note success
Comment 9 Jonathan Druart 2023-02-21 08:23:47 UTC
With bug 32975 you shouldn't need the second patch.
Comment 10 Mason James 2023-02-21 12:45:50 UTC
(In reply to Jonathan Druart from comment #9)
> With bug 32975 you shouldn't need the second patch.

hiya, i've confirmed 2nd patch is needed on latest HEAD

9863c18cc8 Bug 32933: Use val() instead of attr("value") when getting field values with jQuery
Comment 11 Tomás Cohen Arazi (tcohen) 2023-02-21 13:06:47 UTC
Can we remove the lines instead of commenting?

Also, are you running a dev install on packaging? the map files are only supposed to be generated when not using the :prod parameters, as those map files are only relevant on dev builds (they carry information about the scss file from which the css files were generated, for easier debugging).

Can you post what you run on the build? Also, have you run git clean -f -x -d to make sure you don't have stray files?
Comment 12 Mason James 2023-02-22 02:16:21 UTC
(In reply to Tomás Cohen Arazi from comment #11)
> Can we remove the lines instead of commenting?
> 
> Also, are you running a dev install on packaging? the map files are only
> supposed to be generated when not using the :prod parameters, as those map
> files are only relevant on dev builds (they carry information about the scss
> file from which the css files were generated, for easier debugging).
> 
> Can you post what you run on the build? Also, have you run git clean -f -x
> -d to make sure you don't have stray files?


note: no DEV_INSTALL=1 is set

here is how i'm running a build... 

$ git clean -fdx

$ git log --oneline | head -1
9863c18cc8 Bug 32933: Use val() instead of attr("value") when getting field values with jQuery

$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean

$ dpkg-buildpackage -b
...
webpack 5.74.0 compiled with 3 warnings in 21555 ms
Done in 36.15s.
make[1]: *** No rule to make target 'koha-tmpl/opac-tmpl/bootstrap/css/maps/opac-rtl.css.map', needed by 'pm_to_blib'.  Stop.
make[1]: Leaving directory '/mnt/ssd4/pb-nightly/koha'
dh_auto_build: make -j1 returned exit code 2
make: *** [debian/rules:9: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
Comment 13 Mason James 2023-02-22 02:18:08 UTC
Created attachment 147106 [details] [review]
Bug 32994 - remove breaking css/maps/*.map files from Makefile.PL

to test:
 - run makefile, note failure

  $ perl Makefile.PL
  $ make
  $ make install
  webpack 5.74.0 compiled with 3 warnings in 20831 ms
  Done in 36.01s.
  make: *** No rule to make target 'koha-tmpl/opac-tmpl/bootstrap/css/maps/opac-rtl.css.map', needed by 'pm_to_blib'.  Stop.

 - apply patch
 - run makefile, note success
Comment 14 Mason James 2023-02-22 02:19:07 UTC
(In reply to Tomás Cohen Arazi from comment #11)
> Can we remove the lines instead of commenting?

new patch uploaded with lines removed
Comment 15 Mason James 2023-02-22 02:28:18 UTC
(In reply to Jonathan Druart from comment #9)
> With bug 32975 you shouldn't need the second patch.

aah, ive just clicked that 32975 isnt pushed
Comment 16 Mason James 2023-02-22 02:43:34 UTC
(In reply to Mason James from comment #15)
> (In reply to Jonathan Druart from comment #9)
> > With bug 32975 you shouldn't need the second patch.
> 
> aah, ive just clicked that 32975 isnt pushed

confirmed package build fails with 32975 applied
Comment 17 Mason James 2023-02-22 02:55:27 UTC
(In reply to Mason James from comment #15)
> (In reply to Jonathan Druart from comment #9)
> > With bug 32975 you shouldn't need the second patch.
> 
> aah, ive just clicked that 32975 isnt pushed

ignore this
Comment 18 David Cook 2023-02-22 03:54:08 UTC
(In reply to Jonathan Druart from comment #9)
> With bug 32975 you shouldn't need the second patch.

Bug 32975 is probably the reason why the second patch is needed. I haven't double-checked but that would be my guess.
Comment 19 Jonathan Druart 2023-02-22 06:17:00 UTC
(In reply to David Cook from comment #18)
> (In reply to Jonathan Druart from comment #9)
> > With bug 32975 you shouldn't need the second patch.
> 
> Bug 32975 is probably the reason why the second patch is needed. I haven't
> double-checked but that would be my guess.

Indeed, I misread the patch.
Comment 20 Jonathan Druart 2023-02-22 06:17:52 UTC
Looks like we are dealing with 2 different problems here. Would have been beteer to have 2 different bugs;
Comment 21 Jonathan Druart 2023-02-22 07:32:11 UTC
Created attachment 147109 [details] [review]
Bug 32994: Remove compiled files from src (2)

this patch adds 2 files that stops dpkg-source from including ./node_modules dir into koha-common.deb package

to test...
 - build a package, note failure
 - apply patch
 - build a package, note success

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 22 Jonathan Druart 2023-02-22 07:32:13 UTC
Created attachment 147110 [details] [review]
Bug 32994: Remove breaking css/maps/*.map files from Makefile.PL

to test:
 - run makefile, note failure

  $ perl Makefile.PL
  $ make
  $ make install
  webpack 5.74.0 compiled with 3 warnings in 20831 ms
  Done in 36.01s.
  make: *** No rule to make target 'koha-tmpl/opac-tmpl/bootstrap/css/maps/opac-rtl.css.map', needed by 'pm_to_blib'.  Stop.

 - apply patch
 - run makefile, note success

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 23 Tomás Cohen Arazi (tcohen) 2023-02-22 12:00:35 UTC
Created attachment 147129 [details] [review]
Bug 32994: Remove compiled files from src (2)

this patch adds 2 files that stops dpkg-source from including ./node_modules dir into koha-common.deb package

to test...
 - build a package, note failure
 - apply patch
 - build a package, note success

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 24 Tomás Cohen Arazi (tcohen) 2023-02-22 12:00:42 UTC
Created attachment 147130 [details] [review]
Bug 32994: Remove breaking css/maps/*.map files from Makefile.PL

to test:
 - run makefile, note failure

  $ perl Makefile.PL
  $ make
  $ make install
  webpack 5.74.0 compiled with 3 warnings in 20831 ms
  Done in 36.01s.
  make: *** No rule to make target 'koha-tmpl/opac-tmpl/bootstrap/css/maps/opac-rtl.css.map', needed by 'pm_to_blib'.  Stop.

 - apply patch
 - run makefile, note success

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 25 Tomás Cohen Arazi (tcohen) 2023-02-22 13:11:32 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 26 Jacob O'Mara 2023-02-24 11:36:37 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.
Comment 27 Mason James 2023-03-13 16:50:54 UTC
*** Bug 33213 has been marked as a duplicate of this bug. ***
Comment 28 Lucas Gass (lukeg) 2023-04-14 18:08:15 UTC
Not needed in 22.05.x, no backport.