[Openvpn-devel] Wrong FILETYPE in .rc files

Message ID aa4f4026-a684-f96d-c8cb-d4f8a3468c4c@gmail.com
State Accepted
Headers show
Series [Openvpn-devel] Wrong FILETYPE in .rc files | expand

Commit Message

Gisle Vanem July 3, 2019, 3:45 a.m. UTC
I noticed the .rc-files for programs uses
'FILETYPE 0x2L'. The 0x2L' is for a .DLL (VFT_DLL).

Ref: Win-Kit's 'um/verrsrc.h':
   #define VFT_DLL 0x00000002L

Hence these '0x2L' should be replaced with 'VFT_APP':

Comments

Lev Stipakov July 24, 2019, 9:44 p.m. UTC | #1
Hi Gisle,

1. Please fix your patch, I cannot apply it:

c:\Users\lev\Projects\openvpn>git am
Openvpn-devel-Wrong-FILETYPE-in-.rc-files.patch
error: patch failed: src/openvpn/openvpn_win32_resources.rc:19
error: src/openvpn/openvpn_win32_resources.rc: patch does not apply
error: patch failed: src/openvpnserv/openvpnserv_resources.rc:19
error: src/openvpnserv/openvpnserv_resources.rc: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: Wrong FILETYPE in .rc files
Patch failed at 0001 Wrong FILETYPE in .rc files
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Use git-send-email for sending patches.

2. Add "Signed-off-by" line to commit message (use git commit -s).

3. Since you patch .rc files, could you replace rest of numeric values with
strings, like

FILEOS VOS_NT_WINDOWS32 instead of FILEOS 0x40004L
Gert Doering July 25, 2019, 8:20 a.m. UTC | #2
Hi,

On Thu, Jul 25, 2019 at 10:44:48AM +0300, Lev Stipakov wrote:
> 1. Please fix your patch, I cannot apply it:

This might be something with your mailer at openvpn... Antonio complained
about a well-formed patch yesterday, now you complain while I can apply
the patch just fine...

$ git am /tmp/mail.eml
warning: Patch sent with format=flowed; space at the end of lines might be lost.
Applying: Wrong FILETYPE in .rc files

So - since I can apply the patch just fine, is the change itself ACKed?

> 3. Since you patch .rc files, could you replace rest of numeric values with
> strings, like
> 
> FILEOS VOS_NT_WINDOWS32 instead of FILEOS 0x40004L

This would be a separate patch, I'd say - the patch here is actually
changing numbers, while your suggestion would be more of a cleanup
thing, not actually changing the result.

gert
Lev Stipakov July 25, 2019, 11:07 p.m. UTC | #3
Hi,


> This might be something with your mailer at openvpn... Antonio complained
> about a well-formed patch yesterday, now you complain while I can apply
> the patch just fine...
>

I am sorry, I downloaded patch as mbox from patchwork (
https://patchwork.openvpn.net/patch/773/mbox/)
and tried "git am" on Windows and WSL. Other patches are applied just fine.
Looks like we might need to look into patchwork.

This would be a separate patch, I'd say - the patch here is actually
> changing numbers, while your suggestion would be more of a cleanup
> thing, not actually changing the result.
>

Well so far we were consistent by using numbers, albeit wrong ones.
After this patch we will have a mix of numbers and strings. But I agree,
that can be fixed later.

$ git am /tmp/mail.eml
> warning: Patch sent with format=flowed; space at the end of lines might be
> lost.
> Applying: Wrong FILETYPE in .rc files
>
> So - since I can apply the patch just fine, is the change itself ACKed?
>

Yep, if you can apply it I am fine with that.

Acked-By: Lev Stipakov <lstipakov@gmail.com>
Gert Doering July 28, 2019, 10:26 a.m. UTC | #4
Thanks.

Your patch has been applied to the master and release/2.4 branch.  I still
have no idea what it does, but it applies and Lev says the change is good :)

commit abf7a2f226a262860f369e0a3c5d0f6124b7f110 (master)
commit 94157cb368d850032d7c6f436499738ed8bd7834 (release/2.4)
Author: Gisle Vanem
Date:   Wed Jul 3 15:45:34 2019 +0200

     Wrong FILETYPE in .rc files

     Acked-by: Lev Stipakov <lstipakov@gmail.com>
     Message-Id: <aa4f4026-a684-f96d-c8cb-d4f8a3468c4c@gmail.com>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18644.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

--- a/src/openvpn/openvpn_win32_resources.rc 2016-11-06 10:54:00
+++ b/src/openvpn/openvpn_win32_resources.rc 2019-07-03 11:54:06
@@ -19,7 +19,7 @@ 
   FILEFLAGS 0x0L
  #endif
   FILEOS 0x40004L
- FILETYPE 0x2L
+ FILETYPE VFT_APP
   FILESUBTYPE 0x0L
  BEGIN
      BLOCK "StringFileInfo"

--- a/src/openvpnserv/openvpnserv_resources.rc 2016-11-06 10:54:01
+++ b/src/openvpnserv/openvpnserv_resources.rc 2019-07-03 11:54:25
@@ -19,7 +19,7 @@ 
   FILEFLAGS 0x0L
  #endif
   FILEOS 0x40004L
- FILETYPE 0x2L
+ FILETYPE VFT_APP
   FILESUBTYPE 0x0L
  BEGIN
      BLOCK "StringFileInfo"