aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2013-04-26 10:22:19 -0700
committerBryn M. Reeves <bmr@redhat.com>2013-04-26 10:22:19 -0700
commitf667c3d9e82f206c1efbe9c10789e9faa43d9bb9 (patch)
tree37e20df344bda31451963e82fcc9b68c5d6f6ede
parentb5a0d2b94aa3e5275e9ab5561455a91a8cc861df (diff)
parent898c484e57f5e26bb8e1a33688549c17a8f22e0e (diff)
downloadsos-f667c3d9e82f206c1efbe9c10789e9faa43d9bb9.tar.gz
Merge pull request #145 from battlemidget/patch-improve-makefile-debian
Patch improve makefile debian
-rw-r--r--.travis.yml1
-rw-r--r--Makefile33
-rw-r--r--README.md3
-rw-r--r--gpgkeys/rh.template14
-rw-r--r--gpgkeys/ubuntu.template14
5 files changed, 6 insertions, 59 deletions
diff --git a/.travis.yml b/.travis.yml
index fafcbd3d..4d1406ec 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,7 +12,6 @@ notifications:
email: false
install:
- "pip install nose nose-cov --use-mirrors"
- - "make gpgkey"
- "DESTDIR=. make install"
script:
- "make test"
diff --git a/Makefile b/Makefile
index 3a7b714a..30485c45 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ VERSION = $(shell echo `awk '/^Version:/ {print $$2}' sos.spec`)
MAJOR = $(shell echo $(VERSION) | cut -f 1 -d '.')
MINOR = $(shell echo $(VERSION) | cut -f 2 -d '.')
RELEASE = $(shell echo `awk '/^Release:/ {gsub(/\%.*/,""); print $2}' sos.spec`)
-REPO = http://github.com/sosreport
+REPO = https://github.com/sosreport/sosreport
SUBDIRS = po sos sos/plugins sos/policies
PYFILES = $(wildcard *.py)
@@ -15,9 +15,6 @@ 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
-
DIST_BUILD_DIR = dist-build
RPM_DEFINES = --define "_topdir %(pwd)/$(DIST_BUILD_DIR)" \
--define "_builddir %{_topdir}" \
@@ -29,10 +26,8 @@ RPM = rpmbuild
RPM_WITH_DIRS = $(RPM) $(RPM_DEFINES)
ARCHIVE_DIR = $(DIST_BUILD_DIR)/$(NAME)-$(VERSION)
-ARCHIVE_NAME = sosreport.zip
SRC_BUILD = $(DIST_BUILD_DIR)/sdist
PO_DIR = $(SRC_BUILD)/sos/po
-ZIP_DEST = $(SRC_BUILD)/$(ARCHIVE_NAME)
build:
for d in $(SUBDIRS); do make -C $$d; [ $$? = 0 ] || exit 1 ; done
@@ -50,18 +45,15 @@ install: updateversion
install -m644 sos.conf.5.gz $(DESTDIR)/usr/share/man/man5/.
install -m644 AUTHORS LICENSE README.md $(DESTDIR)/usr/share/$(NAME)/.
install -m644 $(NAME).conf $(DESTDIR)/etc/$(NAME).conf
- install -m644 gpgkeys/$(GPG_TPL)support.pub $(DESTDIR)/usr/share/$(NAME)/.
for d in $(SUBDIRS); do make DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done
updateversion:
sed 's/@SOSVERSION@/$(VERSION)/g' sos/__init__.py.in > sos/__init__.py
-
-$(NAME)-$(VERSION).tar.gz: clean gpgkey
+
+$(NAME)-$(VERSION).tar.gz: clean
@mkdir -p $(ARCHIVE_DIR)
@tar -cv sosreport sos doc man po sos.conf AUTHORS LICENSE README.md sos.spec Makefile | tar -x -C $(ARCHIVE_DIR)
- @mkdir -p $(ARCHIVE_DIR)/gpgkeys
- @cp gpgkeys/$(GPG_TPL)support.pub $(ARCHIVE_DIR)/gpgkeys/.
- @tar Ccvzf $(DIST_BUILD_DIR) $(DIST_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
+ @tar Ccvzf $(DIST_BUILD_DIR) $(DIST_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION) --exclude-vcs
clean:
@rm -fv *~ .*~ changenew ChangeLog.old $(NAME)-$(VERSION).tar.gz sosreport.1.gz sos.conf.5.gz
@@ -77,15 +69,10 @@ srpm: clean $(NAME)-$(VERSION).tar.gz
rpm: clean $(NAME)-$(VERSION).tar.gz
$(RPM_WITH_DIRS) -tb $(DIST_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz
-deb-unsign: clean $(NAME)-$(VERSION).tar.gz
+deb: clean $(NAME)-$(VERSION).tar.gz
@mv $(DIST_BUILD_DIR)/$(NAME)-$(VERSION).tar.gz ../$(NAME)-$(MAJOR)_$(MINOR).orig.tar.gz
@debuild -us -uc -i
-gpgkey:
- @echo "Building gpg key"
- @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)
for po in `ls po/*.po`; do \
@@ -95,15 +82,5 @@ po: clean
cp $(PO_DIR)/sos_en.properties $(PO_DIR)/sos_en_US.properties
cp $(PO_DIR)/sos_en.properties $(PO_DIR)/sos.properties
-as7: po updateversion
- cp -r sos/* $(SRC_BUILD)/sos/
- find $(SRC_BUILD)/sos/plugins/ -not -name "*as7.py" -not -name "*__init__.py" -type f -delete
-
-zip: po
- zip -r $(ZIP_DEST) sos
- zip -r $(ZIP_DEST) __run__.py
- cd $(SRC_BUILD) && zip -r $(ARCHIVE_NAME) sos
- cd $(SRC_BUILD) && rm -rf sos
-
test:
nosetests -v --with-cover --cover-package=sos --cover-html
diff --git a/README.md b/README.md
index b8182c13..e75970cd 100644
--- a/README.md
+++ b/README.md
@@ -19,8 +19,7 @@ git clone git://github.com/sosreport/sosreport.git
```
to install locally (as root) ==> make install
to build an rpm ==> make rpm
-to build a deb ==> make deb-unsign
-to build a zipfile for use with jython ==> make zip
+to build a deb ==> make deb
```
### Pre-built Packaging ###
diff --git a/gpgkeys/rh.template b/gpgkeys/rh.template
deleted file mode 100644
index 261f5b31..00000000
--- a/gpgkeys/rh.template
+++ /dev/null
@@ -1,14 +0,0 @@
-%echo Generating key...
-Key-Type: DSA
-Key-Length: 1024
-Subkey-Type: ELG-E
-Subkey-Length: 1024
-Name-Real: Red Hat Support
-Name-Comment: SoS Encryption Key
-Name-Email: support@redhat.com
-Expire-Date: 0
-Passphrase: redhat
-%pubring gpgkeys/rhsupport.pub
-%secring gpgkeys/rhsupport.key
-%commit
-%echo done
diff --git a/gpgkeys/ubuntu.template b/gpgkeys/ubuntu.template
deleted file mode 100644
index ac0e8b5e..00000000
--- a/gpgkeys/ubuntu.template
+++ /dev/null
@@ -1,14 +0,0 @@
-%echo Generating key...
-Key-Type: DSA
-Key-Length: 1024
-Subkey-Type: ELG-E
-Subkey-Length: 1024
-Name-Real: Ubuntu Support
-Name-Comment: SoS Encryption Key
-Name-Email: support@canonical.com
-Expire-Date: 0
-Passphrase: ubuntutemplateexample
-%pubring gpgkeys/ubuntusupport.pub
-%secring gpgkeys/ubuntusupport.key
-%commit
-%echo done