Browse Source

Add hooks and packaging scripts

Include missing files in package
Philip Whineray 9 years ago
parent
commit
85b6ae6329
10 changed files with 86 additions and 2 deletions
  1. 2 0
      .gitignore
  2. 3 0
      ChangeLog
  3. 4 1
      Makefile.am
  4. 1 0
      charts.d/Makefile.am
  5. 1 0
      conf.d/Makefile.am
  6. 10 1
      configure.ac
  7. 5 0
      hooks/post-commit
  8. 5 0
      hooks/pre-commit
  9. 2 0
      hooks/prepare-commit-msg
  10. 53 0
      packaging/README.md

+ 2 - 0
.gitignore

@@ -25,3 +25,5 @@ stamp-h1
 netdata
 apps.plugin
 netdata.spec
+
+*.tar.*

+ 3 - 0
ChangeLog

@@ -0,0 +1,3 @@
+netdata (1.0.0-rc.1) - 2015-11-28
+
+ - initial packaging

+ 4 - 1
Makefile.am

@@ -1,7 +1,7 @@
 #
 # Copyright (C) 2015 Alon Bar-Lev <alon.barlev@gmail.com>
 #
-AUTOMAKE_OPTIONS=foreign dist-bzip2 1.10
+AUTOMAKE_OPTIONS=foreign dist-bzip2 dist-xz 1.10
 ACLOCAL_AMFLAGS = -I m4
 
 MAINTAINERCLEANFILES= \
@@ -18,9 +18,12 @@ MAINTAINERCLEANFILES= \
 
 EXTRA_DIST = \
 	.gitignore \
+	autogen.sh \
 	README.md \
 	LICENSE.md \
+	autogen.sh \
 	netdata-9999.ebuild \
+	tests/stress.sh \
 	$(NULL)
 
 SUBDIRS = \

+ 1 - 0
charts.d/Makefile.am

@@ -15,6 +15,7 @@ dist_charts_SCRIPTS = \
 	load_average.chart.sh \
 	mem_apps.chart.sh \
 	mysql.chart.sh \
+	nginx.chart.sh \
 	nut.chart.sh \
 	opensips.chart.sh \
 	postfix.chart.sh \

+ 1 - 0
conf.d/Makefile.am

@@ -5,4 +5,5 @@ MAINTAINERCLEANFILES= $(srcdir)/Makefile.in
 
 dist_config_DATA = \
 	apps_groups.conf \
+	charts.d.conf \
 	$(NULL)

+ 10 - 1
configure.ac

@@ -9,9 +9,18 @@ define([VERSION_FIX], [0])
 define([VERSION_NUMBER], VERSION_MAJOR[.]VERSION_MINOR[.]VERSION_FIX)
 define([VERSION_SUFFIX], [_master])
 
+dnl Set to "1" for a first RPM release of a new version
+PACKAGE_RPM_RELEASE="0.0.$(echo VERSION_SUFFIX | sed 's/^_//')"
+
 AC_INIT([netdata], VERSION_NUMBER[]VERSION_SUFFIX)
+
+AM_MAINTAINER_MODE([disable])
+if test x"$USE_MAINTAINER_MODE" = xyes; then
+AC_MSG_NOTICE(***************** MAINTAINER MODE *****************)
+PACKAGE_BUILT_DATE=$(date '+%d %b %Y')
+fi
+
 PACKAGE_RPM_VERSION="VERSION_NUMBER"
-PACKAGE_RPM_RELEASE="0.0.$(echo VERSION_SUFFIX | sed 's/^_//')"
 AC_SUBST([PACKAGE_RPM_VERSION])
 AC_SUBST([PACKAGE_RPM_RELEASE])
 

+ 5 - 0
hooks/post-commit

@@ -0,0 +1,5 @@
+#!/bin/sh
+if [ -x ./packaging/update-tags ]
+then
+  exec git diff HEAD^ | ./packaging/update-tags -
+fi

+ 5 - 0
hooks/pre-commit

@@ -0,0 +1,5 @@
+#!/bin/sh
+if [ -x ./packaging/check-files ]
+then
+  exec git diff --cached | ./packaging/check-files -
+fi

+ 2 - 0
hooks/prepare-commit-msg

@@ -0,0 +1,2 @@
+#!/bin/sh
+test -x ./packaging/release-msg && exec ./packaging/release-msg "$@"

+ 53 - 0
packaging/README.md

@@ -0,0 +1,53 @@
+Packaging Tools
+===============
+
+The programs in this folder are used when packaging from within git
+and are not included in source or binary packages.
+
+For the most part they are used from the git commit hooks (copy
+`../hooks/*` to `../.git/hooks` to automate checking and the release
+process.
+
+The check-files script pulls in `*.functions` and `*/*.functions` to
+do the actual work.
+
+`packaging.functions` contains generic checks on e.g `ChangeLog`
+and `configure.ac` and automates release version, checking, tagging
+and post-release update.
+
+Programs and packages with specific needs should create extra
+`whatever.functions` and supporting scripts in a subdirectory.
+
+Making a release
+----------------
+`
+Just update ChangeLog and configure.ac to specify a suitable version
+suffix:
+
+    empty - final release
+    pre.# - pre-release candidate
+    rc.# - pre-release candidate
+
+If it is a final release and there is a package.spec.in, add a new
+entry to the top of the %changelog section and update:
+    PACKAGE_RPM_RELEASE="1"
+
+The hooks will take over and if everything is OK will tag the release
+(you will be asked to sign the tag) and then update the files ready
+for further development.
+
+The release is not pushed out automatically, so if you want to undo
+it, run:
+
+~~~~
+git reset --hard HEAD^^
+git tag -d vx.y.z
+~~~~
+
+Otherwise you can just push the results; the script outputs the required
+instructions upon success.
+
+Once pushed the infrastructure will build a set of tar-files on the server.
+For information on how to verify, sign and make these available, see:
+
+    https://github.com/firehol/infrastructure/raw/master/doc/release.txt

Some files were not shown because too many files changed in this diff