[Qemu-devel] [PATCH 1/5] nsis: don't install files into /tmp

Daniel P. Berrangé posted 5 patches 6 years, 9 months ago
Maintainers: Stefan Weil <sw@weilnetz.de>
[Qemu-devel] [PATCH 1/5] nsis: don't install files into /tmp
Posted by Daniel P. Berrangé 6 years, 9 months ago
The nsis installer target has to run 'make install' to populate a
directory tree with content for the package. Replace the current
usage of '/tmp/qemu-nsis' with a location underneath the build
directory. This ensures that when a developer cleans their build
directory, any left over files from the installer build process
are also purged.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index de898eab62..362a98d275 100644
--- a/Makefile
+++ b/Makefile
@@ -907,7 +907,7 @@ endif
 .PHONY: installer
 installer: $(INSTALLER)
 
-INSTDIR=/tmp/qemu-nsis
+INSTDIR=$(BUILD_DIR)/qemu-nsis-vroot
 
 $(INSTALLER): $(SRC_PATH)/qemu.nsi
 	$(MAKE) install prefix=${INSTDIR}
-- 
2.20.1


Re: [Qemu-devel] [PATCH 1/5] nsis: don't install files into /tmp
Posted by Eric Blake 6 years, 9 months ago
On 1/29/19 5:39 AM, Daniel P. Berrangé wrote:
> The nsis installer target has to run 'make install' to populate a
> directory tree with content for the package. Replace the current
> usage of '/tmp/qemu-nsis' with a location underneath the build
> directory. This ensures that when a developer cleans their build
> directory, any left over files from the installer build process
> are also purged.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Should "qemu-nsis-vroot/" be added to .gitignore for the sake of in-tree
builds?

> diff --git a/Makefile b/Makefile
> index de898eab62..362a98d275 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -907,7 +907,7 @@ endif
>  .PHONY: installer
>  installer: $(INSTALLER)
>  
> -INSTDIR=/tmp/qemu-nsis
> +INSTDIR=$(BUILD_DIR)/qemu-nsis-vroot
>  
>  $(INSTALLER): $(SRC_PATH)/qemu.nsi
>  	$(MAKE) install prefix=${INSTDIR}
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH 1/5] nsis: don't install files into /tmp
Posted by Stefan Weil 6 years, 9 months ago
On 29.01.19 22:07, Eric Blake wrote:
> On 1/29/19 5:39 AM, Daniel P. Berrangé wrote:
>> The nsis installer target has to run 'make install' to populate a
>> directory tree with content for the package. Replace the current
>> usage of '/tmp/qemu-nsis' with a location underneath the build
>> directory. This ensures that when a developer cleans their build
>> directory, any left over files from the installer build process
>> are also purged.
>>
>> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>> ---
>>  Makefile | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
> 
> Should "qemu-nsis-vroot/" be added to .gitignore for the sake of in-tree
> builds?

Yes. I suggest to use INSTDIR=$(BUILD_DIR)/qemu-nsis-vroot.tmp. Then it
is already covered by the existing pattern *.tmp in .gitignore.

With that modification

Signed-off-by: Stefan Weil <sw@weilnetz.de>

> 
>> diff --git a/Makefile b/Makefile
>> index de898eab62..362a98d275 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -907,7 +907,7 @@ endif
>>  .PHONY: installer
>>  installer: $(INSTALLER)
>>  
>> -INSTDIR=/tmp/qemu-nsis
>> +INSTDIR=$(BUILD_DIR)/qemu-nsis-vroot
>>  
>>  $(INSTALLER): $(SRC_PATH)/qemu.nsi
>>  	$(MAKE) install prefix=${INSTDIR}
>>
>