Skip to content

Disabling add parent directories option not working #387

@midmarch

Description

@midmarch

The options addParentDirs = false as provided in the example:

from('endorsed') {
            // Will tell redline-rpm not to auto create directories, which
            // is sometimes necessary to avoid rpm directory conflicts
            addParentDirs = false
            into '/usr/share/tomcat/endorsed'
        }

does not seem to work.

Trying

from('scripts/anet.service') {
ospackage {
  release = '2'
  os = LINUX
  into '/opt'
  from(jpackageImage.outputs.files)
  from('anet.yml') {
    rename('anet.yml', 'anet.yml.template')
    into 'anet/docs'
  }
  from('docs/INSTALL.md') { into 'anet/docs' }
  from('docs/TROUBLESHOOT.md') { into 'anet/docs' }
  from('anet-dictionary.yml') {
    rename('anet-dictionary.yml', 'anet-dictionary.yml.template')
    into 'anet/docs'
  }
  from('prepare-psql.sql') {
    into 'anet/docs'
  }
  from('prepare-mssql.sql') {
    into 'anet/docs'
  }
  from('scripts/anet.service') {
    addParentDirs = false // <-------------------------------------------
    into '/etc/systemd/system/'
  }
}
[root@test-ansible-redhat76-01 ~]# rpm -qlp /opt/ansible/anet/anet-2.1.33-133-g529c3de10-2.x86_64.rpm | grep systemd 

outputs:

/etc/systemd
/etc/systemd/system
/etc/systemd/system/anet.service

expected output:

/etc/systemd/system/anet.service

causing error:

Transaction check error:
  file /etc/systemd from install of anet-0:2.1.33~133~g529c3de10-2.x86_64 conflicts with file from package systemd-219-62.el7_6.16.x86_64
  file /etc/systemd/system from install of anet-0:2.1.33~133~g529c3de10-2.x86_64 conflicts with file from package systemd-219-62.el7_6.16.x86_64

Causing: NCI-Agency/anet#3303
Related: #120, #355, https://serverfault.com/questions/775647/installing-rpm-package-to-systemd/775653

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions