gradle-ospackage-plugin icon indicating copy to clipboard operation
gradle-ospackage-plugin copied to clipboard

Create empty directory in rpm

Open RohitGupta31 opened this issue 7 years ago • 5 comments

I would like to create an empty directory in my rpm, am using the ospackage plugin to copy few files/jar to other directories but i want to create an empty directory along side that.

I tried the following options as follows

ospackage {

from('test') {
        createDirectoryEntry = true	
        includeEmptyDirs = true
        addParentDirs false 
        fileMode = 0500
        into 'test'            
    }

but that is not creating an empty directory when installing the rpm. I tried with the directory option directory('/test', 644) as well but that does not seem to work. Could you look into this, please.

RohitGupta31 avatar Feb 09 '18 10:02 RohitGupta31

The directory entry in the RPM plugin is what you want for this, see https://github.com/nebula-plugins/gradle-ospackage-plugin/wiki/RPM-Plugin for details.

jameswtelfer avatar Feb 19 '18 12:02 jameswtelfer

Just a note from my observation - directory entry does not work in ospackage section. It needs to be in buildRpm.

malejpavouk avatar Mar 03 '18 09:03 malejpavouk

Currently it does not work at all, not even via buildRpm.

jsmucr avatar May 20 '20 06:05 jsmucr

Any updates on this, please?

patric-r avatar May 10 '21 12:05 patric-r

After doing many tests I can say that at least the following works:

    from(mytask.outputs.files) {
        into '.'
        createDirectoryEntry = true
    }

mytask.outputs consists of a directory which contains an empty sub-directory. Surprisingly,includeEmptyDirs true was not required (but did not harm either)

patric-r avatar May 10 '21 16:05 patric-r