Ahhh... I think I see. 

In "Bug 37911 - Prototype vue islands within static pages", I make 
"compile_css_js" depend on "pm_to_blib", so that pm_to_blib runs *before* 
"compile_css_js". The reason being that we need "blib" to exist before we can 
generate and copy the Vue files into "blib".

"api/v1/swagger/swagger_bundle.json" is generated by "compile_css_js" but we 
need it for "pm_to_blib" because of the file mapping from BZ 36546.

Ok... I think that I know what I need to do.

See Bug 39849 for further updates, so I don't have to keep spamming everyone 
with emails. 

David Cook
Senior Software Engineer
Prosentient Systems
Suite 7.03
6a Glen St
Milsons Point NSW 2061
Australia

Office: 02 9212 0899

-----Original Message-----
From: David Cook <dc...@prosentient.com.au> 
Sent: Wednesday, 7 May 2025 10:37 AM
To: 'David Cook' <dc...@prosentient.com.au>; 'Philippe Blouin' 
<philippe.blo...@inlibro.com>; koha-devel@lists.koha-community.org
Subject: RE: [Koha-devel] Error on make

I did a "rm -rf koha-tmpl/intranet-tmpl/prog/js/vue/dist/*", re-ran "perl 
Makefile.PL; make; make install", and it worked without issue (when using a 
"single" or a "dev" install).

However... after doing a bit of a deep dive *I can reproduce your issue*.

--

In Makefile.PL, there is a mapping for swagger_bundle.json:
691 #API_CGI_DIR
692 $file_map->{'api/v1/swagger/swagger_bundle.json'} = 
'blib/API_CGI_DIR/v1/swagger/swagger_bundle.json';

When I look on my make log, I see the following:
cp api/v1/swagger/swagger_bundle.json 
blib/API_CGI_DIR/v1/swagger/swagger_bundle.json

However, if I look carefully, I can see that the 
"api/v1/swagger/swagger_bundle.json" is actually built *after* the "cp" 
commands are done, which means that the file that was copied... was the 
pre-existing generated file in my git working directory from my previous dev 
work.

***So if I "rm api/v1/swagger/swagger_bundle.json" before doing my "perl 
Makefile.PL; make", then I get your Make error...***

But then if I "touch api/v1/swagger/swagger_bundle.json" and run "make" again, 
the "make" will succeed and the empty file gets copied to 
blib/API_CGI_DIR/v1/swagger/swagger_bundle.json.

I then run "make install", which actually re-runs the build step from "make", 
which copies the newly generated file from api/v1/swagger/swagger_bundle.json 
to blib/API_CGI_DIR/v1/swagger/swagger_bundle.json
1511 Skip blib/API_CGI_DIR/v1/swagger/paths/record_sources.yaml (unchanged)
1512 cp api/v1/swagger/swagger_bundle.json 
blib/API_CGI_DIR/v1/swagger/swagger_bundle.json
1513 Skip blib/API_CGI_DIR/v1/swagger/paths/search_filters.yaml (unchanged)

Turns out I added that file mapping to Makefile.PL with BZ 36546 which was 
added to 24.05... 

When it comes to Debian package building... you usually use "git archive 
--format=tar", which doesn't include a swagger_bundle.json. 

Interestingly... when I do my local Debian packaging (which includes BZ 39623 
which streamlines the "make; make install" process)... it's running 
build-resources.PL *before* it does the "cp". It's in an older Debian container 
rather than a newer Ubuntu container, so that's interesting...

I've got to take a phone call, but I'm going to come back to this shortly.

David Cook
Senior Software Engineer
Prosentient Systems
Suite 7.03
6a Glen St
Milsons Point NSW 2061
Australia

Office: 02 9212 0899

-----Original Message-----
From: Koha-devel <koha-devel-boun...@lists.koha-community.org> On Behalf Of 
David Cook via Koha-devel
Sent: Wednesday, 7 May 2025 9:52 AM
To: 'Philippe Blouin' <philippe.blo...@inlibro.com>; 
koha-devel@lists.koha-community.org
Subject: Re: [Koha-devel] Error on make

I have some more testing to do, but at a glance I think the problem is that we 
have generated files in our git working directory, and Make is trying to copy 
those over when they shouldn't exist at all.

Give me a few minutes and I'll get back to you again...

David Cook
Senior Software Engineer
Prosentient Systems
Suite 7.03
6a Glen St
Milsons Point NSW 2061
Australia

Office: 02 9212 0899

-----Original Message-----
From: David Cook <dc...@prosentient.com.au>
Sent: Wednesday, 7 May 2025 9:49 AM
To: 'Philippe Blouin' <philippe.blo...@inlibro.com>; 
'koha-devel@lists.koha-community.org' <koha-devel@lists.koha-community.org>
Subject: RE: [Koha-devel] Error on make

Hi Philippe,

I'm familiar with this type of error, but it's the first time I'm seeing 
mention of it for 'api/v1/swagger/swagger_bundle.json'. 

What do you see if you do "git log ./api/v1/swagger/swagger_bundle.json"? Are 
you sure that you're on "main" and not a custom branch?

I'm on an up-to-date "main" branch, and I just did a "perl Makefile.PL; make" 
and I'm actually getting a different odd error:

bundling api/v1/swagger/swagger.yaml...
  Created a bundle for api/v1/swagger/swagger.yaml at 
api/v1/swagger/swagger_bundle.json 391ms.
Done in 23.05s.
cp -r koha-tmpl/intranet-tmpl/prog/js/vue/dist 
blib/INTRANET_TMPL_DIR/prog/js/vue/
cp: cannot create regular file 
'blib/INTRANET_TMPL_DIR/prog/js/vue/dist/admin/record_sources.js.map': 
Permission denied
cp: cannot create regular file 
'blib/INTRANET_TMPL_DIR/prog/js/vue/dist/admin/record_sources.js': Permission 
denied
cp: cannot create regular file 
'blib/INTRANET_TMPL_DIR/prog/js/vue/dist/erm.js.map': Permission denied
cp: cannot create regular file 
'blib/INTRANET_TMPL_DIR/prog/js/vue/dist/erm.js': Permission denied
cp: cannot create regular file 
'blib/INTRANET_TMPL_DIR/prog/js/vue/dist/preservation.js': Permission denied
cp: cannot create regular file 
'blib/INTRANET_TMPL_DIR/prog/js/vue/dist/preservation.js.map': Permission denied
make: *** [Makefile:9315: compile_css_js] Error 1

Extra weird since the files have actually been created...

I'm going to keep looking at this one...

David Cook
Senior Software Engineer
Prosentient Systems
Suite 7.03
6a Glen St
Milsons Point NSW 2061
Australia

Office: 02 9212 0899

-----Original Message-----
From: Koha-devel <koha-devel-boun...@lists.koha-community.org> On Behalf Of 
Philippe Blouin via Koha-devel
Sent: Wednesday, 7 May 2025 7:23 AM
To: koha-devel@lists.koha-community.org
Subject: [Koha-devel] Error on make

Hi!

Unexpected issue with our dev installs: when doing "make" (after the perl 
Makefile.PL, without errors), I now get 


make: *** No rule to make target 'api/v1/swagger/swagger_bundle.json', needed 
by 'pm_to_blib'.  Stop.

on master.  First time I try in 2025.  

I see two possibilities: I need to upgrade my koha-deps package (we're at 
24.05), or there's something wrong in the code.


Can someone in a different timezone enlighten me ?  Practically, I can't 
upgrade the packages to 24.11, our installs are all on 24.05.  Any hack is 
welcomed :-)

Cheers,





-- 

 <https://inLibro.com>  Philippe Blouin 
Directeur de la technologie 

T  833-INLIBRO (465-4276) <tel:833-465-4276> , poste 230 C  
philippe.blo...@inlibro.com <mailto:philippe.blo...@inlibro.com>  

www.inLibro.com <https://inLibro.com>   

_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/ git : https://git.koha-community.org/ 
bugs : https://bugs.koha-community.org/

_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : https://www.koha-community.org/
git : https://git.koha-community.org/
bugs : https://bugs.koha-community.org/

Reply via email to