aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorJesse Jaggars <jjaggars@redhat.com>2012-03-05 11:38:43 -0600
committerJesse Jaggars <jjaggars@redhat.com>2012-03-05 11:38:43 -0600
commitc69987bf6d2c0de8c345a8a79410212116f8098b (patch)
tree6536b9e5e52bd3dc3a61e523946796cbcc2bda78 /Makefile
parentc10115652a795d0c7971ec9b03c4c58742063ddf (diff)
downloadsos-c69987bf6d2c0de8c345a8a79410212116f8098b.tar.gz
Refactoring DebianPackageManager to use the superclass
Squashed commit of the following: commit 4973246ac9ade11bbaf113985a1410939ca3ccf5 Author: Adam Stokes <hackr@cypherbook.com> Date: Mon Mar 5 00:15:00 2012 -0500 packaging: Fix install perms within our python package directory and update packaging to use support dh_python2 helper. During installation of plugins/policies we were giving additional rwx bits to those files. This addresses some complaints from debian's rpmlint equivalent lintian. Also updated the build rules to support dh_python2 rather than deprecated dh_pysupport. Signed-off-by: Jesse Jaggars <jjaggars@redhat.com> commit 986981941e058afb593baaba676b2aef0e6e1147 Author: Adam Stokes <hackr@cypherbook.com> Date: Sun Mar 4 23:19:56 2012 -0500 ubuntu.template: set passphrase so anyone referencing will know its an example. Signed-off-by: Jesse Jaggars <jjaggars@redhat.com> commit 809bdc150a5e2456d3ee87c34c06eaa002edf43c Author: Adam Stokes <hackr@cypherbook.com> Date: Sun Mar 4 23:11:33 2012 -0500 Makefile: generic name for build dir, fix failure during make install and GPG configurable. First, changed build dir from rpm-build to dist-build to keep things more general. Second, Makefile was not updated to reflect recent housecleaning wrt removing TODO file Finaly, added ability use optional gpg templates during build phase Signed-off-by: Jesse Jaggars <jjaggars@redhat.com> commit 61d583d7eb913402f4200b5ece7ad2732cafd716 Author: Adam Stokes <hackr@cypherbook.com> Date: Sun Mar 4 23:09:11 2012 -0500 debian/rules: Do not run dh_auto_test by default For systems which do not contain previously installed sosreport the test suite will fail due to not being able to find the sos python package. Signed-off-by: Jesse Jaggars <jjaggars@redhat.com> commit a8950a892a905575da0993785623946ea8276075 Author: Adam Stokes <hackr@cypherbook.com> Date: Sun Mar 4 23:02:24 2012 -0500 sos/policies/debian: do not use a list with shell_out routine when listing packages. A recent bug was previously found wrt shell_out not accepting a list of commands/parameters. This policy is updated to run the routine appropriately. Signed-off-by: Jesse Jaggars <jjaggars@redhat.com> commit 6b2300ee8bb121042f3dac91411773a8c788f6b8 Author: Adam Stokes <hackr@cypherbook.com> Date: Sun Mar 4 22:46:33 2012 -0500 debian/control: Make package name consistent with other distros Debian/Ubuntu was set with a package name sosreport which isn't the package name during builds on RHEL/Fedora. Signed-off-by: Jesse Jaggars <jjaggars@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 14 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index ee4859ca..a15fe653 100644
--- a/Makefile
+++ b/Makefile
@@ -13,9 +13,11 @@ PYFILES = $(wildcard *.py)
# MSGCAT = /usr/local/Cellar/gettext/0.18.1.1/bin/msgcat
MSGCAT = msgcat
+# Default to Red Hat GPG template
+GPG_TPL=rh
-RPM_BUILD_DIR = rpm-build
-RPM_DEFINES = --define "_topdir %(pwd)/$(RPM_BUILD_DIR)" \
+DIST_BUILD_DIR = dist-build
+RPM_DEFINES = --define "_topdir %(pwd)/$(DIST_BUILD_DIR)" \
--define "_builddir %{_topdir}" \
--define "_rpmdir %{_topdir}" \
--define "_srcrpmdir %{_topdir}" \
@@ -23,10 +25,10 @@ RPM_DEFINES = --define "_topdir %(pwd)/$(RPM_BUILD_DIR)" \
--define "_sourcedir %{_topdir}"
RPM = rpmbuild
RPM_WITH_DIRS = $(RPM) $(RPM_DEFINES)
-ARCHIVE_DIR = $(RPM_BUILD_DIR)/$(NAME)-$(VERSION)
+ARCHIVE_DIR = $(DIST_BUILD_DIR)/$(NAME)-$(VERSION)
ARCHIVE_NAME = sosreport.zip
-SRC_BUILD = $(RPM_BUILD_DIR)/sdist
+SRC_BUILD = $(DIST_BUILD_DIR)/sdist
PO_DIR = $(SRC_BUILD)/sos/po
ZIP_DEST = $(SRC_BUILD)/$(ARCHIVE_NAME)
@@ -44,7 +46,7 @@ install: updateversion
install -m755 sosreport $(DESTDIR)/usr/sbin/sosreport
install -m644 sosreport.1.gz $(DESTDIR)/usr/share/man/man1/.
install -m644 sos.conf.5.gz $(DESTDIR)/usr/share/man/man5/.
- install -m644 LICENSE README TODO $(DESTDIR)/usr/share/$(NAME)/.
+ install -m644 LICENSE README $(DESTDIR)/usr/share/$(NAME)/.
install -m644 $(NAME).conf $(DESTDIR)/etc/$(NAME).conf
install -m644 gpgkeys/rhsupport.pub $(DESTDIR)/usr/share/$(NAME)/.
for d in $(SUBDIRS); do make DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done
@@ -54,10 +56,10 @@ updateversion:
$(NAME)-$(VERSION).tar.gz: clean gpgkey
@mkdir -p $(ARCHIVE_DIR)
- @tar -cv sosreport sos doc man po sos.conf TODO LICENSE README sos.spec Makefile | tar -x -C $(ARCHIVE_DIR)
+ @tar -cv sosreport sos doc man po sos.conf LICENSE README sos.spec Makefile | tar -x -C $(ARCHIVE_DIR)
@mkdir -p $(ARCHIVE_DIR)/gpgkeys
- @cp gpgkeys/rhsupport.pub $(ARCHIVE_DIR)/gpgkeys/.
- @tar Ccvzf $(RPM_BUILD_DIR) $(RPM_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
+ @cp gpgkeys/$(GPG_TPL)support.pub $(ARCHIVE_DIR)/gpgkeys/.
+ @tar Ccvzf $(DIST_BUILD_DIR) $(DIST_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
clean:
@rm -fv *~ .*~ changenew ChangeLog.old $(NAME)-$(VERSION).tar.gz sosreport.1.gz sos.conf.5.gz
@@ -68,15 +70,15 @@ clean:
for d in $(SUBDIRS); do make -C $$d clean ; done
srpm: clean $(NAME)-$(VERSION).tar.gz
- $(RPM_WITH_DIRS) -ts $(RPM_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz
+ $(RPM_WITH_DIRS) -ts $(DIST_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz
rpm: clean $(NAME)-$(VERSION).tar.gz
- $(RPM_WITH_DIRS) -tb $(RPM_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz
+ $(RPM_WITH_DIRS) -tb $(DIST_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz
gpgkey:
@echo "Building gpg key"
- @test -f gpgkeys/rhsupport.pub && echo "GPG key already exists." || \
- gpg --batch --gen-key gpgkeys/gpg.template
+ @test -f gpgkeys/$(GPG_TPL)support.pub && echo "GPG key already exists." || \
+ gpg --batch --gen-key gpgkeys/$(GPG_TPL).template
po: clean
mkdir -p $(PO_DIR)