[jira] [Comment Edited] (FOP-2146) Wrong FontCache-Directory used for not existing userHome in FontCache.getDefaultCacheFile() (Bug 47786 was not fixed correctly)

2020-05-05 Thread Jukka Matilainen (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-2146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099923#comment-17099923
 ] 

Jukka Matilainen edited comment on FOP-2146 at 5/5/20, 3:11 PM:


I have the same problem when running on AWS Lambda.

{{FontCache.getUserHome()}} returns {{null}} if the {{user.home}} system 
property is unset or the directory pointed to by it does not exist. The latter 
seems to be the case on the AWS Lambda Java runtime.

This leads to {{FontCache.getDefaultCacheFile(true)}} returning ".fop" as the 
font-cache location, which does not work (instead of the expected 
"/tmp/.fop/fop-fonts.cache" which would work and is what would be returned if 
the home directory existed but was read-only).

The problem is that ".fop" won't work as the writable font cache location on 
AWS Lambda, since the current working directory is read-only.  In fact /tmp  
(java.io.tmpdir) directory is the only writable location.

 


was (Author: jkmatila):
I have the same problem when running on AWS Lambda.

{{FontCache.getUserHome()}} returns {{null}} if the {{user.home}} system 
property is unset or the directory pointed to by it does not exist. The latter 
seems to be the case on the AWS Lambda Java runtime.

This leads to {{FontCache.getDefaultCacheFile(true)}} returning ".fop" as the 
font-cache location, which does not work (instead of the expeced 
"/tmp/.fop/fop-fonts.cache" which would work and is what would be returned if 
the home directory existed but was read-only).

The problem is that ".fop" won't work as the writable font cache location on 
AWS Lambda, since the current working directory is read-only.  In fact /tmp  
(java.io.tmpdir) directory is the only writable location.

 

> Wrong FontCache-Directory used for not existing userHome in 
> FontCache.getDefaultCacheFile() (Bug 47786 was not fixed correctly)
> ---
>
> Key: FOP-2146
> URL: https://issues.apache.org/jira/browse/FOP-2146
> Project: FOP
>  Issue Type: Bug
>  Components: font/unqualified
>Affects Versions: 1.1
> Environment: Operating System: All
> Platform: All
>Reporter: mg
>
> Method getDefaultCacheFile() returns an invalid file name if the user has no 
> home directory set. In that case the name of the fop user directory 
> (FOP_USER_DIR!) is returned and not the name of the cache file 
> (DEFAULT_CACHE_FILENAME).
> Wrong Code:
> public static File getDefaultCacheFile(boolean forWriting) {
> File userHome = getUserHome();
> if (userHome != null) {
> File fopUserDir = new File(userHome, FOP_USER_DIR);
> if (forWriting) {
> boolean writable = fopUserDir.canWrite();
> if (!fopUserDir.exists()) {
> writable = fopUserDir.mkdir();
> }
> if (!writable) {
> userHome = getTempDirectory();
> fopUserDir = new File(userHome, FOP_USER_DIR);
> fopUserDir.mkdir();
> }
> }
> return new File(fopUserDir, DEFAULT_CACHE_FILENAME);
> }
> return new File(FOP_USER_DIR);
> }
> If getUserHome() does not return a directory the default name must be 
> returned (and not the name of the directory):
> return new File(DEFAULT_CACHE_FILENAME);



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (FOP-2146) Wrong FontCache-Directory used for not existing userHome in FontCache.getDefaultCacheFile() (Bug 47786 was not fixed correctly)

2020-05-05 Thread Jukka Matilainen (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-2146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099923#comment-17099923
 ] 

Jukka Matilainen edited comment on FOP-2146 at 5/5/20, 3:10 PM:


I have the same problem when running on AWS Lambda.

{{FontCache.getUserHome()}} returns {{null}} if the {{user.home}} system 
property is unset or the directory pointed to by it does not exist. The latter 
seems to be the case on the AWS Lambda Java runtime.

This leads to {{FontCache.getDefaultCacheFile(true)}} returning ".fop" as the 
font-cache location, which does not work (instead of the expeced 
"/tmp/.fop/fop-fonts.cache" which would work and is what would be returned if 
the home directory existed but was read-only).

The problem is that ".fop" won't work as the writable font cache location on 
AWS Lambda, since the current working directory is read-only.  In fact /tmp  
(java.io.tmpdir) directory is the only writable location.

 


was (Author: jkmatila):
{{FontCache.getUserHome()}} returns {{null}} if the {{user.home}} system 
property is unset or the directory pointed to by it does not exist. The latter 
seems to be the case on the AWS Lambda Java runtime.

> Wrong FontCache-Directory used for not existing userHome in 
> FontCache.getDefaultCacheFile() (Bug 47786 was not fixed correctly)
> ---
>
> Key: FOP-2146
> URL: https://issues.apache.org/jira/browse/FOP-2146
> Project: FOP
>  Issue Type: Bug
>  Components: font/unqualified
>Affects Versions: 1.1
> Environment: Operating System: All
> Platform: All
>Reporter: mg
>
> Method getDefaultCacheFile() returns an invalid file name if the user has no 
> home directory set. In that case the name of the fop user directory 
> (FOP_USER_DIR!) is returned and not the name of the cache file 
> (DEFAULT_CACHE_FILENAME).
> Wrong Code:
> public static File getDefaultCacheFile(boolean forWriting) {
> File userHome = getUserHome();
> if (userHome != null) {
> File fopUserDir = new File(userHome, FOP_USER_DIR);
> if (forWriting) {
> boolean writable = fopUserDir.canWrite();
> if (!fopUserDir.exists()) {
> writable = fopUserDir.mkdir();
> }
> if (!writable) {
> userHome = getTempDirectory();
> fopUserDir = new File(userHome, FOP_USER_DIR);
> fopUserDir.mkdir();
> }
> }
> return new File(fopUserDir, DEFAULT_CACHE_FILENAME);
> }
> return new File(FOP_USER_DIR);
> }
> If getUserHome() does not return a directory the default name must be 
> returned (and not the name of the directory):
> return new File(DEFAULT_CACHE_FILENAME);



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Re: [VOTE] Release XML Graphics FOP 2.5

2020-05-05 Thread Clay Leeds
+1 

Thank you for your hard work!

"My religion is simple. My religion is kindness."
- HH Dalai Lama of Tibet

> On May 5, 2020, at 7:12 AM, Simon Steiner  wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> Hi,
> 
> This is a vote to release XML Graphics FOP 2.5.
> 
> Artifacts can be found there:
> http://people.apache.org/~ssteiner/fop-2.5/
> 
> The release is signed with the key:
> https://people.apache.org/~ssteiner/KEYS
> 
> The vote will end on 12/5/2020
> 
> +1 from me.
> 
> Thanks
> -BEGIN PGP SIGNATURE-
> 
> iQIzBAEBCgAdFiEEXJow/yKywC8wJhwwW5Px33zbbeoFAl6xdBoACgkQW5Px33zb
> bepcqg/+Pe+MO2KImDxlh2BpDH08/r8uctB1oiFzZ0AWzqAO/cnbNPY9SfIVwMyU
> Dy7fMLxpONJ2GEvn2kbDvvZuRfwjIvw6U7dqv+LJWEZyk0FonfFvFBBdPlsSW66E
> Y7tNdeGd92Qji/SL1IoFN3MnFF73Y1xTsu45hJIUheFnoIf0dsFDnTac7uucFiPq
> +unVqy9u9r5ZLtdOZg6ewmcP5p529aj/cHn5Go14U43xxv9LQvKwxZhszZpVxIH5
> 22oUfjj/tBtGY0O3+yYXtWojXlp2pCgXtjXiEmYkHw7u4hovejMAEpzXC3eJz06z
> PF0RMRT342N2wuntqSvEsYI0Zi1xwEs/6PU/EMLS6f6D+bLp3O/EUrUMImEeynF6
> TB+cqCTFXlYxvmK6ct59E12SPxpcvJdtxBCqVH+jyVJ/a0EwUzZNDIAFKi2pfeft
> ZI8ZikoHfRlrDh5Loo8In2DF6j86rDH4e06k7Ny1wXAoB2odZXqypgAS0w5jkcYq
> cr8ydGsoN5nZIcJuIRyLbjZf79/Vzn/Ob00PCssUCqm0zXHNtZ7HT+D+a+BH+7j+
> cySuN7Ktg3EPfbyvWi63Pwy8iUN+MAIHRRU4fEDszIDS+aW/7P9HwlvUdcWZaRzC
> QMw+FRxPWHvVYT2ZLGZu5b4FYxlu39mtx3wE+lwmlVazorQUQX8=
> =MSk1
> -END PGP SIGNATURE-
> 
> 
> -
> To unsubscribe, e-mail: general-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: general-h...@xmlgraphics.apache.org
> 


Re: [VOTE] Release XML Graphics FOP PDF Images 2.5

2020-05-05 Thread Clay Leeds
+1 from me!

Thanks for all your hard work!

"My religion is simple. My religion is kindness."
- HH Dalai Lama of Tibet

> On May 5, 2020, at 7:14 AM, Simon Steiner  wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
> 
> Hi,
> 
> This is a vote to release XML Graphics FOP PDF Images 2.5.
> 
> Artifacts can be found there:
> https://people.apache.org/~ssteiner/fop-pdf-images-2.5/
> 
> The release is signed with the key:
> https://people.apache.org/~ssteiner/KEYS
> 
> The vote will end on 12/5/2020
> 
> +1 from me.
> 
> Thanks
> -BEGIN PGP SIGNATURE-
> 
> iQIzBAEBCgAdFiEEXJow/yKywC8wJhwwW5Px33zbbeoFAl6xdH8ACgkQW5Px33zb
> bep3MBAAmqTrD00KZlTtqAWZDP6s6jGinQB3xEDOTLHLpMTimRZ3ufc41GCZcYVL
> PJ+1fGGYXLQOkfPlUnaWzOzQD9s6Ls56YSixHvCctilC6J0g0XOEP9TcHemZAqfp
> OEJfw2nlTc54JV4+dWrO6uxwSSOhRV7l4E8vlXrUzKSYuM1mHagKRQTHmZo9p/cH
> a/D8GVTyQOgDjyPlEtfOVDzz2TugOSMPZparG1yuCawBwnF6JHh0fAH9dDuw9MB7
> 60ovP05rUABM6WCwgDpKZsGz9HAE//cSzB77LL0M71+8g2aiOjDoXwTGg2Ro+kUx
> 99G1iNLFqfEWiUg+qLA6CXj52QCDa+WSSVS0qNk0oiU9R6ip0I1f2ou+gWPyGz0O
> KshitdNCZjl0/q+29cdNUuP5xOPVeAN8Xl0G7RopWBsXgV0O3z53GA3+YIR46aWe
> DBP0uTPvzP5ZsosJjN584DRM6MQrC+9H7DTSK4LGKuYs3sKGyQRLNMC14XY1JfZj
> I6x+uWCmpu9g8PkbwtqZBimQY9iAV1JBaGVj9DcajgWEqdPFvSo6iYfZ53+tnnny
> u/e3eR6ey0sjYpQixnMXZaEQIuSHdYKL8zoBRg8mF8VZjmZqJCi69kNcrHMA1oBz
> J/kTe38uT31h27KUB4X0g0tCMAwdDJO0edVf01yfx7pcIkWl+Eg=
> =iB9D
> -END PGP SIGNATURE-
> 
> 
> -
> To unsubscribe, e-mail: general-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: general-h...@xmlgraphics.apache.org
> 


[jira] [Comment Edited] (FOP-2857) [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not working correctly

2020-05-05 Thread Jukka Matilainen (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099956#comment-17099956
 ] 

Jukka Matilainen edited comment on FOP-2857 at 5/5/20, 2:54 PM:


I have the same problem: {{FontCache.getDefaultCacheFile(true)}} returns an 
unexpected value if the home directory is not set or points to a non-existing 
directory.

When running FOP in the AWS Lambda Java runtime, the {{user.home}} system 
property points to a non-existent directory and {{FontCache.getUserHome()}} 
returns {{null}} due to the existence test in {{FontCache.toDirectory()}} 
failing. 

Now when {{FontCache.getDefaultCacheFile(true)}} gets called it returns {{new 
File(".fop")}} as the font cache location instead of the expected  {{new 
File("/tmp/.fop/fop-fonts.cache")}}, which would be the return value if the 
home directory existed but was read-only.

This won't work in AWS Lambda, as the current working directory is not writable 
(in fact, /tmp directory is the only writable directory).

 


was (Author: jkmatila):
I have the same problem: {{FontCache.getDefaultCacheFile(true)}} returns an 
unexpected value if the home directory is not set points to a non-existing 
directory.

When running FOP in the AWS Lambda Java runtime, the {{user.home}} system 
property points to a non-existent directory and {{FontCache.getUserHome()}} 
returns {{null}} due to the existence test in {{FontCache.toDirectory()}} 
failing. 

Now when {{FontCache.getDefaultCacheFile(true)}} gets called it returns {{new 
File(".fop")}} as the font cache location instead of the expected  {{new 
File("/tmp/.fop/fop-fonts.cache")}}, which would be the return value if the 
home directory existed but was read-only.

This won't work in AWS Lambda, as the current working directory is not writable 
(in fact, /tmp directory is the only writable directory).

 

> [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not 
> working correctly
> -
>
> Key: FOP-2857
> URL: https://issues.apache.org/jira/browse/FOP-2857
> Project: FOP
>  Issue Type: Bug
>  Components: font/unqualified
>Affects Versions: 2.3
>Reporter: Vera Straube
>Priority: Critical
> Attachments: FontCache.java.patch, FontCache.java.patch2
>
>
> The function getDefaultCacheFile() of the class FontCache should work like 
> this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\AppData\Local\Temp\.fop\fop-fonts.cache'
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  'fop-fonts.cache'
> Actually it works uncorrectly like this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  '.fop'  --> wrong behavior !!!
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  '.fop'  --> wrong behavior !!!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (FOP-2857) [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not working correctly

2020-05-05 Thread Jukka Matilainen (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099956#comment-17099956
 ] 

Jukka Matilainen edited comment on FOP-2857 at 5/5/20, 2:53 PM:


I have the same problem. {{FontCache.getDefaultCacheFile(true) }}returns an 
unexpected value if the home directory is not set points to a non-existing 
directory.

When running FOP in the AWS Lambda Java runtime, the {{user.home}} system 
property points to a non-existent directory and {{FontCache.getUserHome()}} 
returns {{null}} due to the existence test in {{FontCache.toDirectory()}} 
failing. 

Now when {{FontCache.getDefaultCacheFile(true)}} gets called it returns {{new 
File(".fop")}} as the font cache location instead of the expected  {{new 
File("/tmp/.fop/fop-fonts.cache")}}, which would be the return value if the 
home directory existed but was read-only.

This won't work in AWS Lambda, as the current working directory is not writable 
(in fact, /tmp directory is the only writable directory).

 


was (Author: jkmatila):
I have the same problem.

When running FOP in the AWS Lambda Java runtime, the {{user.home}} system 
property points to a non-existent directory and {{FontCache.getUserHome()}} 
returns {{null}} due to the existence test in {{FontCache.toDirectory()}} 
failing. 

Now when {{FontCache.getDefaultCacheFile(true)}} gets called it returns {{new 
File(".fop")}} as the font cache location instead of the expected  {{new 
File("/tmp/.fop/fop-fonts.cache").}}

This won't work in AWS Lambda, as the current working directory is not writable 
(in fact, /tmp directory is the only writable directory).

 

> [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not 
> working correctly
> -
>
> Key: FOP-2857
> URL: https://issues.apache.org/jira/browse/FOP-2857
> Project: FOP
>  Issue Type: Bug
>  Components: font/unqualified
>Affects Versions: 2.3
>Reporter: Vera Straube
>Priority: Critical
> Attachments: FontCache.java.patch, FontCache.java.patch2
>
>
> The function getDefaultCacheFile() of the class FontCache should work like 
> this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\AppData\Local\Temp\.fop\fop-fonts.cache'
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  'fop-fonts.cache'
> Actually it works uncorrectly like this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  '.fop'  --> wrong behavior !!!
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  '.fop'  --> wrong behavior !!!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (FOP-2857) [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not working correctly

2020-05-05 Thread Jukka Matilainen (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099956#comment-17099956
 ] 

Jukka Matilainen edited comment on FOP-2857 at 5/5/20, 2:53 PM:


I have the same problem: {{FontCache.getDefaultCacheFile(true)}} returns an 
unexpected value if the home directory is not set points to a non-existing 
directory.

When running FOP in the AWS Lambda Java runtime, the {{user.home}} system 
property points to a non-existent directory and {{FontCache.getUserHome()}} 
returns {{null}} due to the existence test in {{FontCache.toDirectory()}} 
failing. 

Now when {{FontCache.getDefaultCacheFile(true)}} gets called it returns {{new 
File(".fop")}} as the font cache location instead of the expected  {{new 
File("/tmp/.fop/fop-fonts.cache")}}, which would be the return value if the 
home directory existed but was read-only.

This won't work in AWS Lambda, as the current working directory is not writable 
(in fact, /tmp directory is the only writable directory).

 


was (Author: jkmatila):
I have the same problem. {{FontCache.getDefaultCacheFile(true) }}returns an 
unexpected value if the home directory is not set points to a non-existing 
directory.

When running FOP in the AWS Lambda Java runtime, the {{user.home}} system 
property points to a non-existent directory and {{FontCache.getUserHome()}} 
returns {{null}} due to the existence test in {{FontCache.toDirectory()}} 
failing. 

Now when {{FontCache.getDefaultCacheFile(true)}} gets called it returns {{new 
File(".fop")}} as the font cache location instead of the expected  {{new 
File("/tmp/.fop/fop-fonts.cache")}}, which would be the return value if the 
home directory existed but was read-only.

This won't work in AWS Lambda, as the current working directory is not writable 
(in fact, /tmp directory is the only writable directory).

 

> [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not 
> working correctly
> -
>
> Key: FOP-2857
> URL: https://issues.apache.org/jira/browse/FOP-2857
> Project: FOP
>  Issue Type: Bug
>  Components: font/unqualified
>Affects Versions: 2.3
>Reporter: Vera Straube
>Priority: Critical
> Attachments: FontCache.java.patch, FontCache.java.patch2
>
>
> The function getDefaultCacheFile() of the class FontCache should work like 
> this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\AppData\Local\Temp\.fop\fop-fonts.cache'
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  'fop-fonts.cache'
> Actually it works uncorrectly like this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  '.fop'  --> wrong behavior !!!
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  '.fop'  --> wrong behavior !!!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (FOP-2857) [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not working correctly

2020-05-05 Thread Jukka Matilainen (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099956#comment-17099956
 ] 

Jukka Matilainen edited comment on FOP-2857 at 5/5/20, 2:37 PM:


I have the same problem.

When running FOP in the AWS Lambda Java runtime, the {{user.home}} system 
property points to a non-existent directory and {{FontCache.getUserHome()}} 
returns {{null}} due to the existence test in {{FontCache.toDirectory()}} 
failing. 

Now when {{FontCache.getDefaultCacheFile(true)}} gets called it returns {{new 
File(".fop")}} as the font cache location instead of the expected  {{new 
File("/tmp/.fop/fop-fonts.cache").}}

This won't work in AWS Lambda, as the current working directory is not writable 
(in fact, /tmp directory is the only writable directory).

 


was (Author: jkmatila):
I have the same problem.

When running FOP in the AWS Lambda Java runtime, the {{user.home}} system 
property points to a non-existent directory and {{FontCache.getUserHome()}} 
returns {{null}} due to the existence test in {{FontCache.toDirectory()}} 
failing. 

Now when {{FontCache.getDefaultCacheFile(true)}} gets called it returns {{new 
File(".fop")}} as the font cache location instead the expected  {{new 
File("/tmp/.fop/fop-fonts.cache").}}

This won't work in AWS Lambda, as the current working directory is not writable 
(in fact, /tmp directory is the only writable directory..

 

> [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not 
> working correctly
> -
>
> Key: FOP-2857
> URL: https://issues.apache.org/jira/browse/FOP-2857
> Project: FOP
>  Issue Type: Bug
>  Components: font/unqualified
>Affects Versions: 2.3
>Reporter: Vera Straube
>Priority: Critical
> Attachments: FontCache.java.patch, FontCache.java.patch2
>
>
> The function getDefaultCacheFile() of the class FontCache should work like 
> this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\AppData\Local\Temp\.fop\fop-fonts.cache'
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  'fop-fonts.cache'
> Actually it works uncorrectly like this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  '.fop'  --> wrong behavior !!!
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  '.fop'  --> wrong behavior !!!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FOP-2857) [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not working correctly

2020-05-05 Thread Jukka Matilainen (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-2857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099956#comment-17099956
 ] 

Jukka Matilainen commented on FOP-2857:
---

I have the same problem.

When running FOP in the AWS Lambda Java runtime, the {{user.home}} system 
property points to a non-existent directory and {{FontCache.getUserHome()}} 
returns {{null}} due to the existence test in {{FontCache.toDirectory()}} 
failing. 

Now when {{FontCache.getDefaultCacheFile(true)}} gets called it returns {{new 
File(".fop")}} as the font cache location instead the expected  {{new 
File("/tmp/.fop/fop-fonts.cache").}}

This won't work in AWS Lambda, as the current working directory is not writable 
(in fact, /tmp directory is the only writable directory..

 

> [PATCH] FontCache.toDirectory() and FontCache.getDefaultCacheFile() not 
> working correctly
> -
>
> Key: FOP-2857
> URL: https://issues.apache.org/jira/browse/FOP-2857
> Project: FOP
>  Issue Type: Bug
>  Components: font/unqualified
>Affects Versions: 2.3
>Reporter: Vera Straube
>Priority: Critical
> Attachments: FontCache.java.patch, FontCache.java.patch2
>
>
> The function getDefaultCacheFile() of the class FontCache should work like 
> this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\AppData\Local\Temp\.fop\fop-fonts.cache'
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  'fop-fonts.cache'
> Actually it works uncorrectly like this:
> [1] case:   select user_dir
> -> user_dir:'C:\Users\strv'
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  'C:\Users\strv\.fop\fop-fonts.cache'
> [2] case:   select temp_dir
> -> user_dir:''
> -> temp_dir:'C:\Users\strv\AppData\Local\Temp\'
> -> cache_file:  '.fop'  --> wrong behavior !!!
> [3] case:   select curr_dir
> -> user_dir:''
> -> temp_dir:''
> -> cache_file:  '.fop'  --> wrong behavior !!!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[VOTE] Release XML Graphics FOP PDF Images 2.5

2020-05-05 Thread Simon Steiner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi,

This is a vote to release XML Graphics FOP PDF Images 2.5.

Artifacts can be found there:
https://people.apache.org/~ssteiner/fop-pdf-images-2.5/

The release is signed with the key:
https://people.apache.org/~ssteiner/KEYS

The vote will end on 12/5/2020

+1 from me.

Thanks
-BEGIN PGP SIGNATURE-

iQIzBAEBCgAdFiEEXJow/yKywC8wJhwwW5Px33zbbeoFAl6xdH8ACgkQW5Px33zb
bep3MBAAmqTrD00KZlTtqAWZDP6s6jGinQB3xEDOTLHLpMTimRZ3ufc41GCZcYVL
PJ+1fGGYXLQOkfPlUnaWzOzQD9s6Ls56YSixHvCctilC6J0g0XOEP9TcHemZAqfp
OEJfw2nlTc54JV4+dWrO6uxwSSOhRV7l4E8vlXrUzKSYuM1mHagKRQTHmZo9p/cH
a/D8GVTyQOgDjyPlEtfOVDzz2TugOSMPZparG1yuCawBwnF6JHh0fAH9dDuw9MB7
60ovP05rUABM6WCwgDpKZsGz9HAE//cSzB77LL0M71+8g2aiOjDoXwTGg2Ro+kUx
99G1iNLFqfEWiUg+qLA6CXj52QCDa+WSSVS0qNk0oiU9R6ip0I1f2ou+gWPyGz0O
KshitdNCZjl0/q+29cdNUuP5xOPVeAN8Xl0G7RopWBsXgV0O3z53GA3+YIR46aWe
DBP0uTPvzP5ZsosJjN584DRM6MQrC+9H7DTSK4LGKuYs3sKGyQRLNMC14XY1JfZj
I6x+uWCmpu9g8PkbwtqZBimQY9iAV1JBaGVj9DcajgWEqdPFvSo6iYfZ53+tnnny
u/e3eR6ey0sjYpQixnMXZaEQIuSHdYKL8zoBRg8mF8VZjmZqJCi69kNcrHMA1oBz
J/kTe38uT31h27KUB4X0g0tCMAwdDJO0edVf01yfx7pcIkWl+Eg=
=iB9D
-END PGP SIGNATURE-



[VOTE] Release XML Graphics FOP 2.5

2020-05-05 Thread Simon Steiner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi,

This is a vote to release XML Graphics FOP 2.5.

Artifacts can be found there:
http://people.apache.org/~ssteiner/fop-2.5/

The release is signed with the key:
https://people.apache.org/~ssteiner/KEYS

The vote will end on 12/5/2020

+1 from me.

Thanks
-BEGIN PGP SIGNATURE-

iQIzBAEBCgAdFiEEXJow/yKywC8wJhwwW5Px33zbbeoFAl6xdBoACgkQW5Px33zb
bepcqg/+Pe+MO2KImDxlh2BpDH08/r8uctB1oiFzZ0AWzqAO/cnbNPY9SfIVwMyU
Dy7fMLxpONJ2GEvn2kbDvvZuRfwjIvw6U7dqv+LJWEZyk0FonfFvFBBdPlsSW66E
Y7tNdeGd92Qji/SL1IoFN3MnFF73Y1xTsu45hJIUheFnoIf0dsFDnTac7uucFiPq
+unVqy9u9r5ZLtdOZg6ewmcP5p529aj/cHn5Go14U43xxv9LQvKwxZhszZpVxIH5
22oUfjj/tBtGY0O3+yYXtWojXlp2pCgXtjXiEmYkHw7u4hovejMAEpzXC3eJz06z
PF0RMRT342N2wuntqSvEsYI0Zi1xwEs/6PU/EMLS6f6D+bLp3O/EUrUMImEeynF6
TB+cqCTFXlYxvmK6ct59E12SPxpcvJdtxBCqVH+jyVJ/a0EwUzZNDIAFKi2pfeft
ZI8ZikoHfRlrDh5Loo8In2DF6j86rDH4e06k7Ny1wXAoB2odZXqypgAS0w5jkcYq
cr8ydGsoN5nZIcJuIRyLbjZf79/Vzn/Ob00PCssUCqm0zXHNtZ7HT+D+a+BH+7j+
cySuN7Ktg3EPfbyvWi63Pwy8iUN+MAIHRRU4fEDszIDS+aW/7P9HwlvUdcWZaRzC
QMw+FRxPWHvVYT2ZLGZu5b4FYxlu39mtx3wE+lwmlVazorQUQX8=
=MSk1
-END PGP SIGNATURE-



[jira] [Comment Edited] (FOP-2146) Wrong FontCache-Directory used for not existing userHome in FontCache.getDefaultCacheFile() (Bug 47786 was not fixed correctly)

2020-05-05 Thread Jukka Matilainen (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-2146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099923#comment-17099923
 ] 

Jukka Matilainen edited comment on FOP-2146 at 5/5/20, 2:09 PM:


{{FontCache.getUserHome()}} returns {{null}} if the {{user.home}} system 
property is unset or the directory pointed to by it does not exist. The latter 
seems to be the case on the AWS Lambda Java runtime.


was (Author: jkmatila):
FontCache.g{{etUserHome()}} method returns {{null}} if the {{user.home}} system 
property is unset or the directory pointed to by it does not exist. The latter 
seems to be the case on the AWS Lambda Java runtime.

> Wrong FontCache-Directory used for not existing userHome in 
> FontCache.getDefaultCacheFile() (Bug 47786 was not fixed correctly)
> ---
>
> Key: FOP-2146
> URL: https://issues.apache.org/jira/browse/FOP-2146
> Project: FOP
>  Issue Type: Bug
>  Components: font/unqualified
>Affects Versions: 1.1
> Environment: Operating System: All
> Platform: All
>Reporter: mg
>
> Method getDefaultCacheFile() returns an invalid file name if the user has no 
> home directory set. In that case the name of the fop user directory 
> (FOP_USER_DIR!) is returned and not the name of the cache file 
> (DEFAULT_CACHE_FILENAME).
> Wrong Code:
> public static File getDefaultCacheFile(boolean forWriting) {
> File userHome = getUserHome();
> if (userHome != null) {
> File fopUserDir = new File(userHome, FOP_USER_DIR);
> if (forWriting) {
> boolean writable = fopUserDir.canWrite();
> if (!fopUserDir.exists()) {
> writable = fopUserDir.mkdir();
> }
> if (!writable) {
> userHome = getTempDirectory();
> fopUserDir = new File(userHome, FOP_USER_DIR);
> fopUserDir.mkdir();
> }
> }
> return new File(fopUserDir, DEFAULT_CACHE_FILENAME);
> }
> return new File(FOP_USER_DIR);
> }
> If getUserHome() does not return a directory the default name must be 
> returned (and not the name of the directory):
> return new File(DEFAULT_CACHE_FILENAME);



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FOP-2146) Wrong FontCache-Directory used for not existing userHome in FontCache.getDefaultCacheFile() (Bug 47786 was not fixed correctly)

2020-05-05 Thread Jukka Matilainen (Jira)


[ 
https://issues.apache.org/jira/browse/FOP-2146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17099923#comment-17099923
 ] 

Jukka Matilainen commented on FOP-2146:
---

FontCache.g{{etUserHome()}} method returns {{null}} if the {{user.home}} system 
property is unset or the directory pointed to by it does not exist. The latter 
seems to be the case on the AWS Lambda Java runtime.

> Wrong FontCache-Directory used for not existing userHome in 
> FontCache.getDefaultCacheFile() (Bug 47786 was not fixed correctly)
> ---
>
> Key: FOP-2146
> URL: https://issues.apache.org/jira/browse/FOP-2146
> Project: FOP
>  Issue Type: Bug
>  Components: font/unqualified
>Affects Versions: 1.1
> Environment: Operating System: All
> Platform: All
>Reporter: mg
>
> Method getDefaultCacheFile() returns an invalid file name if the user has no 
> home directory set. In that case the name of the fop user directory 
> (FOP_USER_DIR!) is returned and not the name of the cache file 
> (DEFAULT_CACHE_FILENAME).
> Wrong Code:
> public static File getDefaultCacheFile(boolean forWriting) {
> File userHome = getUserHome();
> if (userHome != null) {
> File fopUserDir = new File(userHome, FOP_USER_DIR);
> if (forWriting) {
> boolean writable = fopUserDir.canWrite();
> if (!fopUserDir.exists()) {
> writable = fopUserDir.mkdir();
> }
> if (!writable) {
> userHome = getTempDirectory();
> fopUserDir = new File(userHome, FOP_USER_DIR);
> fopUserDir.mkdir();
> }
> }
> return new File(fopUserDir, DEFAULT_CACHE_FILENAME);
> }
> return new File(FOP_USER_DIR);
> }
> If getUserHome() does not return a directory the default name must be 
> returned (and not the name of the directory):
> return new File(DEFAULT_CACHE_FILENAME);



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FOP-2934) Absolute element should not be removed

2020-05-05 Thread Simon Steiner (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-2934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Steiner resolved FOP-2934.

Resolution: Fixed

http://svn.apache.org/viewvc?view=revision&revision=1877372

> Absolute element should not be removed
> --
>
> Key: FOP-2934
> URL: https://issues.apache.org/jira/browse/FOP-2934
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: test.fo
>
>
> fop test.fo out.pdf
> Should see 1 2 3 in the output



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FOP-2934) Absolute element should not be removed

2020-05-05 Thread Simon Steiner (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-2934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Steiner updated FOP-2934:
---
Description: 
fop test.fo out.pdf

Should see 1 2 3 in the output

> Absolute element should not be removed
> --
>
> Key: FOP-2934
> URL: https://issues.apache.org/jira/browse/FOP-2934
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: test.fo
>
>
> fop test.fo out.pdf
> Should see 1 2 3 in the output



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FOP-2934) Absolute element should not be removed

2020-05-05 Thread Simon Steiner (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-2934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Steiner updated FOP-2934:
---
Attachment: test.fo

> Absolute element should not be removed
> --
>
> Key: FOP-2934
> URL: https://issues.apache.org/jira/browse/FOP-2934
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: test.fo
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (FOP-2934) Absolute element should not be removed

2020-05-05 Thread Simon Steiner (Jira)
Simon Steiner created FOP-2934:
--

 Summary: Absolute element should not be removed
 Key: FOP-2934
 URL: https://issues.apache.org/jira/browse/FOP-2934
 Project: FOP
  Issue Type: Bug
Reporter: Simon Steiner
Assignee: Simon Steiner
 Attachments: test.fo





--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FOP-2933) PDF to PDF checkbox missing

2020-05-05 Thread Simon Steiner (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-2933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Steiner resolved FOP-2933.

Resolution: Fixed

http://svn.apache.org/viewvc?view=revision&revision=1877369

> PDF to PDF checkbox missing
> ---
>
> Key: FOP-2933
> URL: https://issues.apache.org/jira/browse/FOP-2933
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: accessibleradiobuttons.pdf, test.fo
>
>
> fop test.fo out.pdf
>  
> Checkboxes should be shown



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FOP-2933) PDF to PDF checkbox missing

2020-05-05 Thread Simon Steiner (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-2933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Steiner updated FOP-2933:
---
Attachment: test.fo
accessibleradiobuttons.pdf

> PDF to PDF checkbox missing
> ---
>
> Key: FOP-2933
> URL: https://issues.apache.org/jira/browse/FOP-2933
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: accessibleradiobuttons.pdf, test.fo
>
>
> fop test.fo out.pdf
>  
> Checkboxes should be shown



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (FOP-2933) PDF to PDF checkbox missing

2020-05-05 Thread Simon Steiner (Jira)
Simon Steiner created FOP-2933:
--

 Summary: PDF to PDF checkbox missing
 Key: FOP-2933
 URL: https://issues.apache.org/jira/browse/FOP-2933
 Project: FOP
  Issue Type: Bug
Reporter: Simon Steiner
Assignee: Simon Steiner
 Attachments: accessibleradiobuttons.pdf, test.fo





--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FOP-2933) PDF to PDF checkbox missing

2020-05-05 Thread Simon Steiner (Jira)


 [ 
https://issues.apache.org/jira/browse/FOP-2933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Steiner updated FOP-2933:
---
Description: 
fop test.fo out.pdf

 

Checkboxes should be shown

> PDF to PDF checkbox missing
> ---
>
> Key: FOP-2933
> URL: https://issues.apache.org/jira/browse/FOP-2933
> Project: FOP
>  Issue Type: Bug
>Reporter: Simon Steiner
>Assignee: Simon Steiner
>Priority: Major
> Attachments: accessibleradiobuttons.pdf, test.fo
>
>
> fop test.fo out.pdf
>  
> Checkboxes should be shown



--
This message was sent by Atlassian Jira
(v8.3.4#803005)