jdeb icon indicating copy to clipboard operation
jdeb copied to clipboard

data/type file broken

Open TuireHolappa opened this issue 4 years ago • 8 comments

Used to work on 1.5 with 1.8 only the dst directory part is created

<data>
                 <src>${project.build.directory}/${project.artifactId}.service</src>
                 <type>file</type>
                 <dst>/etc/systemd/system/${project.artifactId}.service</dst>
                 <mapper>
                   <type>perm</type>
                   <filemode>755</filemode>
                 </mapper>
               </data>

As a workaround using the type directory with includes works for the same

 <data>
                  <src>${project.build.directory}</src>
                  <includes>${project.artifactId}.service</includes>
                  <type>directory</type>
                  <mapper>
                    <prefix>/etc/systemd/system</prefix>
                    <type>perm</type>
                    
                    <filemode>755</filemode>
                  </mapper>
                </data>

TuireHolappa avatar Nov 04 '20 15:11 TuireHolappa

@TuireHolappa can please provide a few more details? IIUC only /etc/systemd/system/ gets created? instead of /etc/systemd/system/${project.artifactId}.service? Do you have the project available somewhere?

tcurdt avatar Nov 04 '20 19:11 tcurdt

Hi, this is unfortunately a company project with some parent poms involved so I cannot share this one. I'll try to find some time to compose a simple example for you next week.

TuireHolappa avatar Nov 05 '20 06:11 TuireHolappa

It was not too complexed to reproduce similar situation on .deb content. 312example.zip I hope this helps to find the cause. I do like to have your plugin for .deb creation. And the env that I used is windows but our Jenkins runs on Linux node and the outcome was the same.

TuireHolappa avatar Nov 05 '20 06:11 TuireHolappa

@TuireHolappa thanks for the test case. Looking at the deb I am not sure I see the problem yet.

This is what the deb looks for me like:

./usr
./usr/local
./usr/local/example
./usr/local/example/jdeb-file-example
./usr/local/example/jdeb-file-example/jdeb-file-example-0.0.1-SNAPSHOT.jar
./usr/share
./usr/share/doc
./usr/share/doc/jdeb-file-example
./usr/share/doc/jdeb-file-example/changelog
./usr/share/doc/jdeb-file-example/copyright
./etc
./etc/systemd
./etc/systemd/system
./etc/systemd/system/jdeb-file-example.service

If yours looks different, please attach the deb.

tcurdt avatar Nov 05 '20 14:11 tcurdt

The jdeb-file-example_0.0.1~SNAPSHOT_all.deb is inside the zip already. Please check 321example.zip/jedb-file-example/target

And note that our legacy system uses still java 8 also as build environment.

TuireHolappa avatar Nov 09 '20 10:11 TuireHolappa

@TuireHolappa Ah, sorry - I didn't realize. But then yours looks the same - and to my account OK:

% find .
.
./usr
./usr/local
./usr/local/example
./usr/local/example/jdeb-file-example
./usr/local/example/jdeb-file-example/jdeb-file-example-0.0.1-SNAPSHOT.jar
./usr/share
./usr/share/doc
./usr/share/doc/jdeb-file-example
./usr/share/doc/jdeb-file-example/changelog
./usr/share/doc/jdeb-file-example/copyright
./etc
./etc/systemd
./etc/systemd/system
./etc/systemd/system/jdeb-file-example.service

tcurdt avatar Nov 09 '20 12:11 tcurdt

Yep you are correct. It is there and visible when I extract the contents to disk. Did not try that out when checked the content. Strange is that it is invisible when browsing with 7 zip. When the file is added with the directory shows that and also if I package with the file with 1.5 it is visible. So something is different.

TuireHolappa avatar Nov 09 '20 15:11 TuireHolappa

Well, that should at least make it very easy to find the difference. Next step would be to compare the meta data details of both archives.

tcurdt avatar Nov 09 '20 15:11 tcurdt