neil / rpms / python-blivet

Forked from rpms/python-blivet a year ago
Clone
bda387
From 545c41e6750d5e28743a7da9e43175302c4fa812 Mon Sep 17 00:00:00 2001
bda387
From: David Lehman <dlehman@redhat.com>
bda387
Date: Thu, 4 Apr 2019 13:52:54 -0400
bda387
Subject: [PATCH 1/4] Remove profanity from an old comment.
bda387
bda387
---
bda387
 blivet/blivet.py | 2 +-
bda387
 1 file changed, 1 insertion(+), 1 deletion(-)
bda387
bda387
diff --git a/blivet/blivet.py b/blivet/blivet.py
bda387
index 8128347f..ff4410ae 100644
bda387
--- a/blivet/blivet.py
bda387
+++ b/blivet/blivet.py
bda387
@@ -875,7 +875,7 @@ def safe_device_name(self, name):
bda387
 
bda387
             LVM limits lv names to 128 characters. I don't know the limits for
bda387
             the other various device types, so I'm going to pick a number so
bda387
-            that we don't have to have an entire fucking library to determine
bda387
+            that we don't have to have an entire library to determine
bda387
             device name limits.
bda387
         """
bda387
         max_len = 96    # No, you don't need longer names than this. Really.
bda387
bda387
From 7395fb481b7b7a5054a3ba12e07f40ba1c8d926a Mon Sep 17 00:00:00 2001
bda387
From: David Lehman <dlehman@redhat.com>
bda387
Date: Mon, 22 Apr 2019 17:44:42 -0400
bda387
Subject: [PATCH 2/4] Add a target to create an archive of the unit tests.
bda387
bda387
---
bda387
 Makefile | 4 ++++
bda387
 1 file changed, 4 insertions(+)
bda387
bda387
diff --git a/Makefile b/Makefile
bda387
index 76817278..f9b2066e 100644
bda387
--- a/Makefile
bda387
+++ b/Makefile
bda387
@@ -120,6 +120,10 @@ archive: po-pull
bda387
 	git checkout -- po/$(PKGNAME).pot
bda387
 	@echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
bda387
 
bda387
+tests-archive:
bda387
+	git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(VERSION_TAG) tests/ | gzip -9 > $(PKGNAME)-$(VERSION)-tests.tar.gz
bda387
+	@echo "The test archive is in $(PKGNAME)-$(VERSION)-tests.tar.gz"
bda387
+
bda387
 local: po-pull
bda387
 	@make -B ChangeLog
bda387
 	$(PYTHON) setup.py -q sdist --dist-dir .
bda387
bda387
From 28959739b46d22698c05f34494d2d9c67f37f0c4 Mon Sep 17 00:00:00 2001
bda387
From: David Lehman <dlehman@redhat.com>
bda387
Date: Mon, 22 Apr 2019 17:45:19 -0400
bda387
Subject: [PATCH 3/4] Add spec file logic to include unit tests in SRPM.
bda387
bda387
---
bda387
 python-blivet.spec | 4 +++-
bda387
 1 file changed, 3 insertions(+), 1 deletion(-)
bda387
bda387
diff --git a/python-blivet.spec b/python-blivet.spec
bda387
index 668e0913..23fa07f6 100644
bda387
--- a/python-blivet.spec
bda387
+++ b/python-blivet.spec
bda387
@@ -29,6 +29,7 @@ License: LGPLv2+
bda387
 %global realname blivet
bda387
 %global realversion %{version}%{?prerelease}
bda387
 Source0: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}.tar.gz
bda387
+Source1: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}-tests.tar.gz
bda387
 
bda387
 # Versions of required components (done so we make sure the buildrequires
bda387
 # match the requires versions of things).
bda387
@@ -165,7 +166,8 @@ configuration.
bda387
 %endif
bda387
 
bda387
 %prep
bda387
-%autosetup -n %{realname}-%{realversion} -p1
bda387
+%autosetup -n %{realname}-%{realversion} -N
bda387
+%autosetup -n %{realname}-%{realversion} -b1 -p1
bda387
 
bda387
 %build
bda387
 %{?with_python2:make PYTHON=%{__python2}}
bda387
bda387
From 305c9b52ee5682baf53be660c501b7b263029699 Mon Sep 17 00:00:00 2001
bda387
From: David Lehman <dlehman@redhat.com>
bda387
Date: Fri, 26 Apr 2019 16:39:35 -0400
bda387
Subject: [PATCH 4/4] Include tests archive where appropriate in make targets.
bda387
bda387
---
bda387
 Makefile | 3 +++
bda387
 1 file changed, 3 insertions(+)
bda387
bda387
diff --git a/Makefile b/Makefile
bda387
index f9b2066e..552550a6 100644
bda387
--- a/Makefile
bda387
+++ b/Makefile
bda387
@@ -119,6 +119,7 @@ archive: po-pull
bda387
 	rm -rf $(PKGNAME)-$(VERSION)
bda387
 	git checkout -- po/$(PKGNAME).pot
bda387
 	@echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
bda387
+	@make tests-archive
bda387
 
bda387
 tests-archive:
bda387
 	git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(VERSION_TAG) tests/ | gzip -9 > $(PKGNAME)-$(VERSION)-tests.tar.gz
bda387
@@ -128,6 +129,8 @@ local: po-pull
bda387
 	@make -B ChangeLog
bda387
 	$(PYTHON) setup.py -q sdist --dist-dir .
bda387
 	@echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
bda387
+	git ls-files tests/ | tar -T- -czf $(PKGNAME)-$(VERSION)-tests.tar.gz
bda387
+	@echo "The test archive is in $(PKGNAME)-$(VERSION)-tests.tar.gz"
bda387
 
bda387
 rpmlog:
bda387
 	@git log --pretty="format:- %s (%ae)" $(RELEASE_TAG).. |sed -e 's/@.*)/)/'