1

I am using vcsrepo with git to maintain a bunch of software on ubuntu systems. I use this bit of puppet code in a loop to keep the files up to date

      vcsrepo { "/usr/local/tools/$repo":
        ensure   => latest,
        provider => git,
        user     => 'tools',
        source   => "https://xxxxx@bitbucket.org/uoa/$repo.git";
      }

I was using latest and switched to present with no noticeable effect

I get Error: Path /usr/local/tools/common-library exists and is not the desired repository. on all my ubuntu systems except one old one still running 16.04

Vcsrepo version is 3.0.0 and puppet is at 5. Yes, I know these are old but this is out f my control My best guess is that something has changed in git.

Russell Fulton
  • 201
  • 1
  • 3
  • 17

1 Answers1

0

Yes, a CVE patch for git broke your existing config. This was released on Debian Buster in the past few days, causing breakage there on system puppet (5.5.10-4). There doesn't seem to be a patch available for vcsrepo 3.2.1, the latest with Puppet 5 support. I'm not sure why my Bullseye machines don't seem to be affected. As a workaround, this WFM:

once:

  case $::facts['os']['distro']['codename'] {
    'buster' : {
      concat { '/etc/gitconfig' :
        owner   => 'root',
        group   => 'root',
        mode    => '0644',
      }
    }
  }

and then in my project-handling class:

  case $::facts['os']['distro']['codename'] {
    'buster' : {
      concat::fragment { "gitconfig_$project" :
        target  => '/etc/gitconfig',
        content => "[safe]\n\tdirectory = /usr/local/repos/$project\n\n",
        before  => Vcsrepo["/usr/local/repos/$project"],
      }
    }
  }

Obviously, adjusting variables for your OS/paths.

Bill McGonigle
  • 667
  • 5
  • 8