Package Details: r10k 3.6.0-1

Git Clone URL: https://aur.archlinux.org/r10k.git (read-only, click to copy)
Package Base: r10k
Description: Provides a general purpose toolset for deploying Puppet environments and modules.
Upstream URL: https://github.com/puppetlabs/r10k
Licenses: Apache
Submitter: arakmar
Maintainer: arakmar
Last Packager: arakmar
Votes: 1
Popularity: 0.80
First Submitted: 2017-03-02 08:48
Last Updated: 2020-10-18 08:28

Latest Comments

arakmar commented on 2020-10-18 08:29

Thanks a lot for your work on that Tim !

bastelfreak commented on 2020-10-17 23:36

Hi, here is the latest PKGBUILD

# Maintainer: arakmar
# Contributor: Tim Meusel <tim@bastelfreak.de>
pkgname=r10k
pkgver=3.6.0
pkgrel=1
pkgdesc='Provides a general purpose toolset for deploying Puppet environments and modules.'
arch=('any')
url='https://github.com/puppetlabs/r10k'
license=('Apache')
depends=('ruby' 'ruby-colored2' 'ruby-cri' 'ruby-gettext-setup' 'ruby-log4r' 'ruby-multi_json' 'ruby-semantic_puppet' 'ruby-puppet_forge' 'ruby-rugged')
makedepends=('ruby-minitar')
checkdepends=('ruby-rspec' 'git')
source=("${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz" 'disable-sha256-test.patch' 'disable-insync-module-test.patch')
sha512sums=('c5220881705129c6c183556936e4d7b5dd42379499e854151c60cd8122e544db8353404068105d22e173b67448baf69af4e44e5c70194bdbf70118308f754913'
            '24a8365839a7b87dc737069a06b7476ed3c7a6e1d1255e8f05d36336683a0aabcb5734c2865c85ecf56d217ac8feed71169955d5f85befc228ed114ccf08435b'
            '303e1f478ae98296410c56be98195c887beaa6116e54d8701c871339427b655b3faef57d4a90982db4404699c41a81a2c8f8cfbc5e4a38b29f218038c475fe23')
options=('!emptydirs')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  # update the gemspec to allow newer versions
  sed --in-place 's|~>|>=|g' "${pkgname}.gemspec"
  # don't use git to detect files for the package
  sed --in-place 's|git ls-files|find|g' "${pkgname}.gemspec"
  # allow newer gettext versions
  sed --in-place 's|< 3.3.0|< 4.0.0|' "${pkgname}.gemspec"

  # disable broken tests
  patch --verbose -p1 -N -i "${srcdir}/disable-sha256-test.patch"
  patch --verbose -p1 -N -i "${srcdir}/disable-insync-module-test.patch"
  echo 'applied patch'
}

build() {
  cd "${pkgname}-${pkgver}"
  gem build "${pkgname}.gemspec"
}

check() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  # two tests currently fail https://github.com/puppetlabs/r10k/issues/1095
  rspec --color --format documentation spec/unit
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  local _gemdir="$(gem env gemdir)"
  gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${pkgname}-${pkgver}.gem"

  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
  install -Dm 644 CHANGELOG.mkd README.mkd CONTRIBUTING.mkd -t "${pkgdir}/usr/share/doc/${pkgname}"
  mv doc "${pkgdir}/usr/share/doc/${pkgname}/"

  rm -rf "${pkgdir}/${_gemdir}/gems/${pkgname}-${pkgver}/ext"
  rm -rf "${pkgdir}/${_gemdir}/cache"
}

# vim: ts=2 sw=2 et:

disable-insync-module-test.patch

diff --git a/spec/unit/module/forge_spec.rb b/spec/unit/module/forge_spec.rb
index 777c028..59d707a 100644
--- a/spec/unit/module/forge_spec.rb
+++ b/spec/unit/module/forge_spec.rb
@@ -63,19 +63,6 @@ describe R10K::Module::Forge do
   context "when a module is deprecated" do
     subject { described_class.new('puppetlabs/corosync', fixture_modulepath, :latest) }

-    it "warns on sync if module is not already insync" do
-      allow(subject).to receive(:status).and_return(:absent)
-
-      allow(R10K::Forge::ModuleRelease).to receive(:new).and_return(double('mod_release', install: true))
-
-      logger_dbl = double(Log4r::Logger)
-      allow_any_instance_of(described_class).to receive(:logger).and_return(logger_dbl)
-
-      expect(logger_dbl).to receive(:warn).with(/puppet forge module.*puppetlabs-corosync.*has been deprecated/i)
-
-      subject.sync
-    end
-
     it "does not warn on sync if module is already insync" do
       allow(subject).to receive(:status).and_return(:insync)


disable-sha256-test.patch

diff --git a/spec/unit/forge/module_release_spec.rb b/spec/unit/forge/module_release_spec.rb
index ca6b722..f7f81f2 100644
--- a/spec/unit/forge/module_release_spec.rb
+++ b/spec/unit/forge/module_release_spec.rb
@@ -72,16 +72,6 @@ describe R10K::Forge::ModuleRelease do
       subject.verify
     end

-    it "verifies using the forge file_sha256, if no sha256 file exists" do
-      allow(sha256_digest_class).to receive(:file).and_return(sha256_digest)
-      allow(sha256_digest).to receive(:hexdigest).and_return(sha256_of_tarball)
-      allow(sha256_file_path).to receive(:exist?).and_return(false)
-      allow(subject.forge_release).to receive(:respond_to?).and_return(true)
-      allow(subject.forge_release).to receive(:sha256_file).and_return(sha256_of_tarball)
-      expect(subject).to receive(:verify_from_forge)
-      subject.verify
-    end
-
     it "falls back to md5 verification when not in FIPS mode and no sha256 available" do
       expect(R10K::Util::Platform).to receive(:fips?).and_return(false)
       # failed sha256 verification

bastelfreak commented on 2020-01-05 13:52

Hi, I updated the PKGBUILD to properly build from source:

# Maintainer: Tim Meusel <tim@bastelfreak.de>

pkgname='r10k'
pkgver=3.3.3
pkgrel=1
pkgdesc='Provides a general purpose toolset for deploying Puppet environments and modules. It implements the Puppetfile format and provides a native implementation of Puppet dynamic environments.'
arch=('any')
url='https://github.com/puppetlabs/r10k'
license=('Apache')
makedepends=('ruby-rdoc' 'ruby-rspec' 'ruby-minitar')
depends=('ruby' 'ruby-puppet_forge' 'ruby-gettext-setup' 'ruby-cri' 'git' 'ruby-rugged' 'ruby-multi_json' 'ruby-log4r' 'ruby-colored')
source=("https://github.com/puppetlabs/r10k/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz" 'disable-sha256-test.patch' 'disable-insync-module-test.patch')
options=("!emptydirs")
sha512sums=('b1b0b7ec8e5ae037156b81e2c36394bae0a682fe26e1078c8733694eadee03373a306a2ca73b6ecabf1d041f5a8603e27b0dbee9616dcd7b5e9add9b8f82b621'
            '85c926c844a4dac21ef2279f26062de2a531e418a4d3deb05a650e629c599f67ac113141adbc38cd9a60bf1360313b8ce57d3a67362649192b7bf3ca86f7ad43'
            '07b0b266a2a899e7b4787fa5fe8185adfa3ca6f66b7a9361feceb993713b4ea4823a8fa55af04739a62fbce4fd70951894c7443dcac4f58f3b8719719e45e6f0')

# update the gemspec to allow newer versions of rake
# remove deprecated options from the gemspec
prepare() {
  cd "${pkgname}-${pkgver}"
  sed --in-place 's|~>|>=|g' "${pkgname}.gemspec"
  sed --in-place 's|.*git ls-files.*|  s.files        = `find`.split("\\n")|' "${pkgname}.gemspec"

  # disable broken tests
  patch -p1 -N -i "${srcdir}/disable-sha256-test.patch"
  patch -p1 -N -i "${srcdir}/disable-insync-module-test.patch"

  # allow latest ruby-cri version
  sed --in-place "s/s.add_dependency 'cri',       '2.15.6'/s.add_dependency 'cri', '>= 2.15.6'/" "${pkgname}.gemspec"
}

build() {
  cd "${pkgname}-${pkgver}"
  gem build "${pkgname}.gemspec"
}

check() {
  cd "${pkgname}-${pkgver}"
  # The spec tests show a few warnings because upstream currently doesn't test on Ruby 2.6
  # First PR to fix this: https://github.com/puppetlabs/r10k/pull/1006
  rspec --color --format documentation spec/unit
}

package() {
  cd "${pkgname}-${pkgver}"
  local _gemdir="$(gem env gemdir)"
  gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${pkgname}-${pkgver}.gem"

  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"

  rm -rf "${pkgdir}/${_gemdir}/cache"
}

# vim: ts=2 sw=2 et: