This repository has been archived by the owner on Mar 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#7567) Refactor dashboard packaging to allow for nightly builds
We now allow for builds out of master that utilizes git-describe for versioning. The generation of the tarball or package will create a VERSION file with the proper contents. The package/tarball will also use erb to substitute versions, dates and other metadata into the Red Hat spec or Debian changelog. The Debian package also changed to model more the builds from PE. This means a newer rules configuration and the addition of the rmshebang script to comply with Debian packaging guidelines. The package:deb, package:rpm, and package:srpm rake tasks now use the tarball generated from the package:tar task, which means that the spec, changelog, and other packaging inputs are generated from their erb templates. Signed-off-by: Michael Stahnke <[email protected]>
- Loading branch information
Showing
8 changed files
with
218 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,3 +41,5 @@ db/schema.rb | |
db/migrate/*_plugin_*.rb | ||
config/installed_plugins | ||
*.rpm | ||
pkg/* | ||
VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
puppet-dashboard (<%= version %>-1) intrepid jaunty karmic lucid meerkat narwhal natty lenny squeeze; urgency=low | ||
|
||
* build at version <%= version %> | ||
|
||
-- Michael Stahnke <stahnma@puppetlabs.com> <%= dt %> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/sh | ||
|
||
for target_dir in $@ | ||
do | ||
for f in `find "$target_dir" -type f 2>/dev/null` | ||
do | ||
sed -e '1,1{ | ||
/^#!/d | ||
}' < $f > $f.tmp | ||
if ! cmp $f $f.tmp >/dev/null | ||
then | ||
mv -f $f.tmp $f | ||
else | ||
rm -f $f.tmp | ||
fi | ||
done | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,48 @@ | ||
#!/usr/bin/make -f | ||
# -*- makefile -*- | ||
|
||
# Uncomment these fllowing lines to display lots of debugging information during the build process: | ||
export DH_VERBOSE=1 | ||
export DH_OPTIONS=-v | ||
include /usr/share/cdbs/1/rules/debhelper.mk | ||
include /usr/share/cdbs/1/rules/buildcore.mk | ||
|
||
%: | ||
dh $@ | ||
ruby_ver = 1.8 | ||
|
||
override_dh_install: | ||
install -d debian/puppet-dashboard/etc/puppet-dashboard | ||
install -d debian/puppet-dashboard/usr/share/puppet-dashboard | ||
install -d debian/puppet-dashboard/usr/share/doc/puppet-dashboard/examples | ||
cp -r app bin config db ext lib public script spec vendor VERSION CHANGELOG COPYING LICENSE README.markdown README_PACKAGES.markdown RELEASE_NOTES.md Rakefile debian/puppet-dashboard/usr/share/puppet-dashboard/ | ||
install config/database.yml.example debian/puppet-dashboard/etc/puppet-dashboard/database.yml | ||
install config/database.yml.example debian/puppet-dashboard/usr/share/doc/puppet-dashboard/examples/database.yml.example | ||
# Clean up the "extra" license files | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/config/database.yml.example | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/doc/README_FOR_APP | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/vendor/plugins/*/*LICENSE | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/vendor/plugins/*/License.txt | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/vendor/plugins/*/COPYING | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/vendor/gems/*/COPYING | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/vendor/gems/*/*LICENSE | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/vendor/gems/*/License.txt | ||
rm -f debian/puppet-dashboard/usr/share/puppet-dashboard/vendor/rails/*/*LICENSE | ||
# ...and other various files | ||
rm -f debian/puppet-dashboard/.gems | ||
rm -f debian/puppet-dashboard/.autotest | ||
find debian/puppet-dashboard -name '.gitignore' -type f | xargs rm -f | ||
find debian/puppet-dashboard -name '.git' -type d | xargs rm -rf | ||
binary-install/puppet-dashboard:: | ||
mkdir -p $(CURDIR)/debian/$(cdbs_curpkg)/etc/puppet-dashboard | ||
mkdir -p $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard | ||
mkdir -p $(CURDIR)/debian/$(cdbs_curpkg)/var/$(cdbs_curpkg)/tmp | ||
mkdir -p $(CURDIR)/debian/$(cdbs_curpkg)/var/log/puppet-dashboard | ||
cp -r app \ | ||
bin \ | ||
config \ | ||
db \ | ||
ext \ | ||
lib \ | ||
Rakefile \ | ||
script \ | ||
spec \ | ||
vendor \ | ||
RELEASE_NOTES.md \ | ||
$(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard | ||
cp $(CURDIR)/config/database.yml.example $(CURDIR)/debian/$(cdbs_curpkg)/etc/puppet-dashboard/database.yml | ||
cp -r $(CURDIR)/public $(CURDIR)/debian/$(cdbs_curpkg)/var/$(cdbs_curpkg) | ||
chmod -R a+rx $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/script | ||
rm -rf $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/ext/packaging | ||
# Clean up the "extra" files | ||
rm -f $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/config/database.yml.example | ||
rm -f $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor/plugins/*/*LICENSE | ||
rm -f $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor/plugins/*/License.txt | ||
rm -f $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor/gems/*/COPYING | ||
rm -f $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor/gems/*/*LICENSE | ||
rm -f $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor/gems/*/License.txt | ||
rm -f $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor/rails/*/*LICENSE | ||
find $(CURDIR)/debian/$(cdbs_curpkg) -name .gitignore -exec rm {} \; | ||
find $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor -name LICENSE -exec rm {} \; | ||
find $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor -name MIT-LICENSE -exec rm {} \; | ||
find $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor -type f -exec chmod a-x {} \; | ||
find $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/app -type f -exec chmod a-x {} \; | ||
find $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/spec -type f -exec chmod a-x {} \; | ||
# Fixup shebang lines | ||
bash $(CURDIR)/debian/rmshebang.sh \ | ||
$(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/lib \ | ||
$(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/app \ | ||
$(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/spec \ | ||
$(CURDIR)/debian/$(cdbs_curpkg)/usr/share/puppet-dashboard/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.