How to stick the changes that I want inside the source code

Hello to everyone.

Hello.

I would like to pass the integrated gpu from the host os to the windows 10 guest os with xen. This is because xen works great for me,better than qemu-kvm for my specific needs and because I have only two graphic cards. The nvidia rtx 2080 ti that I have already passed to the guest,and the intel UHD 630,that can be duplicated from the host to the guest so that it can be used in both places without interruptions. So I’m trying to build this repository :

When i try to build the xen-igvtg package with the command : pamac build xen-igvtg

I get this error :

vmx.c: In function 'vmx_get_segment_register':
vmx.c:764:37: error: taking address of packed member of 'struct segment_register' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  764 |         __vmread(GUEST_CS_BASE,     &reg->base);
      |                                     ^~~~~~~~~~
vmx.c:770:37: error: taking address of packed member of 'struct segment_register' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  770 |         __vmread(GUEST_DS_BASE,     &reg->base);
      |                                     ^~~~~~~~~~
vmx.c:776:37: error: taking address of packed member of 'struct segment_register' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  776 |         __vmread(GUEST_ES_BASE,     &reg->base);
      |                                     ^~~~~~~~~~
vmx.c:782:37: error: taking address of packed member of 'struct segment_register' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  782 |         __vmread(GUEST_FS_BASE,     &reg->base);
      |                                     ^~~~~~~~~~
vmx.c:788:37: error: taking address of packed member of 'struct segment_register' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  788 |         __vmread(GUEST_GS_BASE,     &reg->base);
      |                                     ^~~~~~~~~~
vmx.c:794:37: error: taking address of packed member of 'struct segment_register' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  794 |         __vmread(GUEST_SS_BASE,     &reg->base);
      |                                     ^~~~~~~~~~
vmx.c:800:37: error: taking address of packed member of 'struct segment_register' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  800 |         __vmread(GUEST_TR_BASE,     &reg->base);
      |                                     ^~~~~~~~~~
vmx.c:805:36: error: taking address of packed member of 'struct segment_register' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  805 |         __vmread(GUEST_GDTR_BASE,  &reg->base);
      |                                    ^~~~~~~~~~
vmx.c:809:36: error: taking address of packed member of 'struct segment_register' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  809 |         __vmread(GUEST_IDTR_BASE,  &reg->base);
      |                                    ^~~~~~~~~~
vmx.c:814:39: error: taking address of packed member of 'struct segment_register' may result in an unaligned pointer value [-Werror=address-of-packed-member]
  814 |         __vmread(GUEST_LDTR_BASE,     &reg->base);
      |                                       ^~~~~~~~~~

Now I would like to edit this file :

/var/tmp/pamac-build-mariozio/xen-igvtg/src/xen_src/Config.mk

removing the parameter "-Werror" from this line :

HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer

the problem is that when I give again the command : pamac build xen-igvtg

it ignores the changes that I did and the error happens again. What can I do to make stick the change inside the code ? thanks.

git clone xxxx
create myfix.patch
edit PKGBUILD and add file://myfix.path
makepkg xxxx


or use makepkg --noextract after change source code

ok. so. I created the Werror.patch with the following content :

-HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
+HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer

and I have placed the patch inside the folder : /var/tmp/pamac-build-mariozio/xen-igvtg/src

and then I edited the file /var/tmp/pamac-build-mariozio/xen-igvtg/PKGBUILD adding this line :

/var/tmp/pamac-build-mariozio/xen-igvtg/src/Werror.patch

is everything correct ? no. it gives this error :

==> ERROR: The integrity checks (sha256) differ in size from the source array.

Since you’ve changed the contents of the files they no longer pass a sum check for integrity.

You can change the sum check line in the pkgbuild file to 'skip' or add the correct values for the files.

https://wiki.archlinux.org/index.php/PKGBUILD#Integrity

1 Like

Any file that is sourced by the PKGBUILD file is being checked for integrity by a checksum. If you edit any of these files you need to update the checksums in the PKGBUILD file too.

There is a tool that can do that for you: updpkgsums
Just run it in the same directory where the PKGBUILD file is located.