bwipp / postscriptbarcode

Barcode Writer in Pure PostScript
https://bwipp.terryburton.co.uk
MIT License
463 stars 65 forks source link

make_packaged_resource.ps failing with recent GS #111

Closed jdietrch closed 4 years ago

jdietrch commented 4 years ago

I am experiencing a build failure:

jdietrch@saturn:~$ git clone https://github.com/bwipp/postscriptbarcode.git
Cloning into 'postscriptbarcode'...
remote: Enumerating objects: 342, done.
remote: Counting objects: 100% (342/342), done.
remote: Compressing objects: 100% (208/208), done.
remote: Total 6753 (delta 243), reused 207 (delta 134), pack-reused 6411
Receiving objects: 100% (6753/6753), 15.49 MiB | 10.81 MiB/s, done.
Resolving deltas: 100% (4253/4253), done.
jdietrch@saturn:~$ cd postscriptbarcode/
jdietrch@saturn:~/postscriptbarcode$ make build/standalone_package/code128.ps
build/make_deps src/databarstackedomnicomposite.ps build/resource/Resource build/packaged_resource/Resource >src/databarstackedomnicomposite.d
build/make_deps src/japanpost.ps build/resource/Resource build/packaged_resource/Resource >src/japanpost.d
build/make_deps src/databarexpandedstacked.ps build/resource/Resource build/packaged_resource/Resource >src/databarexpandedstacked.d
build/make_deps src/ean13.ps build/resource/Resource build/packaged_resource/Resource >src/ean13.d
build/make_deps src/coop2of5.ps build/resource/Resource build/packaged_resource/Resource >src/coop2of5.d
build/make_deps src/codeone.ps build/resource/Resource build/packaged_resource/Resource >src/codeone.d
build/make_deps src/aztecrune.ps build/resource/Resource build/packaged_resource/Resource >src/aztecrune.d
build/make_deps src/rectangularmicroqrcode.ps build/resource/Resource build/packaged_resource/Resource >src/rectangularmicroqrcode.d
build/make_deps src/mailmark.ps build/resource/Resource build/packaged_resource/Resource >src/mailmark.d
build/make_deps src/symbol.ps build/resource/Resource build/packaged_resource/Resource >src/symbol.d
build/make_deps src/hibcdatamatrixrectangular.ps build/resource/Resource build/packaged_resource/Resource >src/hibcdatamatrixrectangular.d
build/make_deps src/ean14.ps build/resource/Resource build/packaged_resource/Resource >src/ean14.d
build/make_deps src/ean5.ps build/resource/Resource build/packaged_resource/Resource >src/ean5.d
build/make_deps src/code93.ps build/resource/Resource build/packaged_resource/Resource >src/code93.d
build/make_deps src/daft.ps build/resource/Resource build/packaged_resource/Resource >src/daft.d
build/make_deps src/pharmacode2.ps build/resource/Resource build/packaged_resource/Resource >src/pharmacode2.d
build/make_deps src/ean13composite.ps build/resource/Resource build/packaged_resource/Resource >src/ean13composite.d
build/make_deps src/hibcqrcode.ps build/resource/Resource build/packaged_resource/Resource >src/hibcqrcode.d
build/make_deps src/hibcmicropdf417.ps build/resource/Resource build/packaged_resource/Resource >src/hibcmicropdf417.d
build/make_deps src/hibccodablockf.ps build/resource/Resource build/packaged_resource/Resource >src/hibccodablockf.d
build/make_deps src/microqrcode.ps build/resource/Resource build/packaged_resource/Resource >src/microqrcode.d
build/make_deps src/postnet.ps build/resource/Resource build/packaged_resource/Resource >src/postnet.d
build/make_deps src/raiseerror.ps build/resource/Resource build/packaged_resource/Resource >src/raiseerror.d
build/make_deps src/datamatrixrectangularextension.ps build/resource/Resource build/packaged_resource/Resource >src/datamatrixrectangularextension.d
build/make_deps src/hibcazteccode.ps build/resource/Resource build/packaged_resource/Resource >src/hibcazteccode.d
build/make_deps src/ismn.ps build/resource/Resource build/packaged_resource/Resource >src/ismn.d
build/make_deps src/databaromnicomposite.ps build/resource/Resource build/packaged_resource/Resource >src/databaromnicomposite.d
build/make_deps src/hibccode128.ps build/resource/Resource build/packaged_resource/Resource >src/hibccode128.d
build/make_deps src/royalmail.ps build/resource/Resource build/packaged_resource/Resource >src/royalmail.d
build/make_deps src/databarstackedomni.ps build/resource/Resource build/packaged_resource/Resource >src/databarstackedomni.d
build/make_deps src/iata2of5.ps build/resource/Resource build/packaged_resource/Resource >src/iata2of5.d
build/make_deps src/code128.ps build/resource/Resource build/packaged_resource/Resource >src/code128.d
build/make_deps src/azteccode.ps build/resource/Resource build/packaged_resource/Resource >src/azteccode.d
build/make_deps src/gs1northamericancoupon.ps build/resource/Resource build/packaged_resource/Resource >src/gs1northamericancoupon.d
build/make_deps src/databartruncated.ps build/resource/Resource build/packaged_resource/Resource >src/databartruncated.d
build/make_deps src/onecode.ps build/resource/Resource build/packaged_resource/Resource >src/onecode.d
build/make_deps src/renmaximatrix.ps build/resource/Resource build/packaged_resource/Resource >src/renmaximatrix.d
build/make_deps src/upce.ps build/resource/Resource build/packaged_resource/Resource >src/upce.d
build/make_deps src/dotcode.ps build/resource/Resource build/packaged_resource/Resource >src/dotcode.d
build/make_deps src/preamble.ps build/resource/Resource build/packaged_resource/Resource >src/preamble.d
build/make_deps src/jabcode.ps build/resource/Resource build/packaged_resource/Resource >src/jabcode.d
build/make_deps src/databarexpandedstackedcomposite.ps build/resource/Resource build/packaged_resource/Resource >src/databarexpandedstackedcomposite.d
build/make_deps src/hibccode39.ps build/resource/Resource build/packaged_resource/Resource >src/hibccode39.d
build/make_deps src/code49.ps build/resource/Resource build/packaged_resource/Resource >src/code49.d
build/make_deps src/interleaved2of5.ps build/resource/Resource build/packaged_resource/Resource >src/interleaved2of5.d
build/make_deps src/code39ext.ps build/resource/Resource build/packaged_resource/Resource >src/code39ext.d
build/make_deps src/hibcdatamatrix.ps build/resource/Resource build/packaged_resource/Resource >src/hibcdatamatrix.d
build/make_deps src/hibcpdf417.ps build/resource/Resource build/packaged_resource/Resource >src/hibcpdf417.d
build/make_deps src/issn.ps build/resource/Resource build/packaged_resource/Resource >src/issn.d
build/make_deps src/kix.ps build/resource/Resource build/packaged_resource/Resource >src/kix.d
build/make_deps src/code2of5.ps build/resource/Resource build/packaged_resource/Resource >src/code2of5.d
build/make_deps src/auspost.ps build/resource/Resource build/packaged_resource/Resource >src/auspost.d
build/make_deps src/code32.ps build/resource/Resource build/packaged_resource/Resource >src/code32.d
build/make_deps src/ean2.ps build/resource/Resource build/packaged_resource/Resource >src/ean2.d
build/make_deps src/databartruncatedcomposite.ps build/resource/Resource build/packaged_resource/Resource >src/databartruncatedcomposite.d
build/make_deps src/planet.ps build/resource/Resource build/packaged_resource/Resource >src/planet.d
build/make_deps src/databarexpandedcomposite.ps build/resource/Resource build/packaged_resource/Resource >src/databarexpandedcomposite.d
build/make_deps src/code93ext.ps build/resource/Resource build/packaged_resource/Resource >src/code93ext.d
build/make_deps src/databarlimited.ps build/resource/Resource build/packaged_resource/Resource >src/databarlimited.d
build/make_deps src/itf14.ps build/resource/Resource build/packaged_resource/Resource >src/itf14.d
build/make_deps src/gs1datamatrixrectangular.ps build/resource/Resource build/packaged_resource/Resource >src/gs1datamatrixrectangular.d
build/make_deps src/raw.ps build/resource/Resource build/packaged_resource/Resource >src/raw.d
build/make_deps src/databarexpanded.ps build/resource/Resource build/packaged_resource/Resource >src/databarexpanded.d
build/make_deps src/pdf417.ps build/resource/Resource build/packaged_resource/Resource >src/pdf417.d
build/make_deps src/upcecomposite.ps build/resource/Resource build/packaged_resource/Resource >src/upcecomposite.d
build/make_deps src/gs1-128composite.ps build/resource/Resource build/packaged_resource/Resource >src/gs1-128composite.d
build/make_deps src/codablockf.ps build/resource/Resource build/packaged_resource/Resource >src/codablockf.d
build/make_deps src/msi.ps build/resource/Resource build/packaged_resource/Resource >src/msi.d
build/make_deps src/upcacomposite.ps build/resource/Resource build/packaged_resource/Resource >src/upcacomposite.d
build/make_deps src/identcode.ps build/resource/Resource build/packaged_resource/Resource >src/identcode.d
build/make_deps src/gs1-128.ps build/resource/Resource build/packaged_resource/Resource >src/gs1-128.d
build/make_deps src/bc412.ps build/resource/Resource build/packaged_resource/Resource >src/bc412.d
build/make_deps src/flattermarken.ps build/resource/Resource build/packaged_resource/Resource >src/flattermarken.d
build/make_deps src/telepen.ps build/resource/Resource build/packaged_resource/Resource >src/telepen.d
build/make_deps src/azteccodecompact.ps build/resource/Resource build/packaged_resource/Resource >src/azteccodecompact.d
build/make_deps src/isbn.ps build/resource/Resource build/packaged_resource/Resource >src/isbn.d
build/make_deps src/ean8composite.ps build/resource/Resource build/packaged_resource/Resource >src/ean8composite.d
build/make_deps src/pzn.ps build/resource/Resource build/packaged_resource/Resource >src/pzn.d
build/make_deps src/databarstackedcomposite.ps build/resource/Resource build/packaged_resource/Resource >src/databarstackedcomposite.d
build/make_deps src/datamatrix.ps build/resource/Resource build/packaged_resource/Resource >src/datamatrix.d
build/make_deps src/rationalizedCodabar.ps build/resource/Resource build/packaged_resource/Resource >src/rationalizedCodabar.d
build/make_deps src/pdf417compact.ps build/resource/Resource build/packaged_resource/Resource >src/pdf417compact.d
build/make_deps src/upca.ps build/resource/Resource build/packaged_resource/Resource >src/upca.d
build/make_deps src/renmatrix.ps build/resource/Resource build/packaged_resource/Resource >src/renmatrix.d
build/make_deps src/databarlimitedcomposite.ps build/resource/Resource build/packaged_resource/Resource >src/databarlimitedcomposite.d
build/make_deps src/ultracode.ps build/resource/Resource build/packaged_resource/Resource >src/ultracode.d
build/make_deps src/industrial2of5.ps build/resource/Resource build/packaged_resource/Resource >src/industrial2of5.d
build/make_deps src/micropdf417.ps build/resource/Resource build/packaged_resource/Resource >src/micropdf417.d
build/make_deps src/databaromni.ps build/resource/Resource build/packaged_resource/Resource >src/databaromni.d
build/make_deps src/sscc18.ps build/resource/Resource build/packaged_resource/Resource >src/sscc18.d
build/make_deps src/ean8.ps build/resource/Resource build/packaged_resource/Resource >src/ean8.d
build/make_deps src/code16k.ps build/resource/Resource build/packaged_resource/Resource >src/code16k.d
build/make_deps src/databarstacked.ps build/resource/Resource build/packaged_resource/Resource >src/databarstacked.d
build/make_deps src/maxicode.ps build/resource/Resource build/packaged_resource/Resource >src/maxicode.d
build/make_deps src/datalogic2of5.ps build/resource/Resource build/packaged_resource/Resource >src/datalogic2of5.d
build/make_deps src/channelcode.ps build/resource/Resource build/packaged_resource/Resource >src/channelcode.d
build/make_deps src/datamatrixrectangular.ps build/resource/Resource build/packaged_resource/Resource >src/datamatrixrectangular.d
build/make_deps src/leitcode.ps build/resource/Resource build/packaged_resource/Resource >src/leitcode.d
build/make_deps src/code39.ps build/resource/Resource build/packaged_resource/Resource >src/code39.d
build/make_deps src/code11.ps build/resource/Resource build/packaged_resource/Resource >src/code11.d
build/make_deps src/matrix2of5.ps build/resource/Resource build/packaged_resource/Resource >src/matrix2of5.d
build/make_deps src/renlinear.ps build/resource/Resource build/packaged_resource/Resource >src/renlinear.d
build/make_deps src/gs1-cc.ps build/resource/Resource build/packaged_resource/Resource >src/gs1-cc.d
build/make_deps src/hanxin.ps build/resource/Resource build/packaged_resource/Resource >src/hanxin.d
build/make_deps src/plessey.ps build/resource/Resource build/packaged_resource/Resource >src/plessey.d
build/make_deps src/telepennumeric.ps build/resource/Resource build/packaged_resource/Resource >src/telepennumeric.d
build/make_deps src/qrcode.ps build/resource/Resource build/packaged_resource/Resource >src/qrcode.d
build/make_deps src/gs1qrcode.ps build/resource/Resource build/packaged_resource/Resource >src/gs1qrcode.d
build/make_deps src/pharmacode.ps build/resource/Resource build/packaged_resource/Resource >src/pharmacode.d
build/make_deps src/posicode.ps build/resource/Resource build/packaged_resource/Resource >src/posicode.d
build/make_deps src/gs1datamatrix.ps build/resource/Resource build/packaged_resource/Resource >src/gs1datamatrix.d
mkdir -p build/packaged_resource build/packaged_resource/Resource build/packaged_resource/Resource/Category build/packaged_resource/Resource/uk.co.terryburton.bwipp build/packaged_resource/docs
touch build/packaged_resource/.dirstamp
build/make_resource src/preamble.ps build/packaged_resource/Resource/Category/uk.co.terryburton.bwipp
GPL Ghostscript 9.50: Unrecoverable error, exit code 1
Error: /undefinedfilename in (../../make_packaged_resource.ps)
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push
Dictionary stack:
   --dict:738/1123(ro)(G)--   --dict:0/20(G)--   --dict:76/200(L)--
Current allocation mode is local
Last OS error: Permission denied
GS create resource error at build/make_resource line 69.
make: *** [Makefile:174: build/packaged_resource/Resource/Category/uk.co.terryburton.bwipp] Error 1
jdietrch@saturn:~/postscriptbarcode$

This is on Debian testing (https://www.debian.org/releases/testing/) which currently has a ghostscript version of 9.50 (https://packages.debian.org/bullseye/ghostscript)

I also tested on a different machine with Debian stable (https://www.debian.org/releases/stable/), which has a ghostscript version of 9.27 (https://packages.debian.org/buster/ghostscript), and it worked just fine.

terryburton commented 4 years ago

I'm going to guess that recent changes to GS in response to security issues have restricted access to the filesystem in some way. It might be that there are arguments that can be added to GS to revert the behaviour.

It's likely to take me a while to find the time to dig into this. (I didn't write the PS packer that's choking.)

That said, the result of the build isn't platform specific so you will be a no disadvantage by downloading one of the pre-built flavours from the releases page.

I'll need to address this eventually though so that distro packages can continue to be automatically built.

Thanks for the report.

terryburton commented 4 years ago

Fixed by 851c7f38ddeeac8e4a3c2a278a234a0ccd9e2a3b