Blob Blame History Raw
From 545c41e6750d5e28743a7da9e43175302c4fa812 Mon Sep 17 00:00:00 2001
From: David Lehman <dlehman@redhat.com>
Date: Thu, 4 Apr 2019 13:52:54 -0400
Subject: [PATCH 1/4] Remove profanity from an old comment.

---
 blivet/blivet.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blivet/blivet.py b/blivet/blivet.py
index 8128347f..ff4410ae 100644
--- a/blivet/blivet.py
+++ b/blivet/blivet.py
@@ -875,7 +875,7 @@ def safe_device_name(self, name):
 
             LVM limits lv names to 128 characters. I don't know the limits for
             the other various device types, so I'm going to pick a number so
-            that we don't have to have an entire fucking library to determine
+            that we don't have to have an entire library to determine
             device name limits.
         """
         max_len = 96    # No, you don't need longer names than this. Really.

From 7395fb481b7b7a5054a3ba12e07f40ba1c8d926a Mon Sep 17 00:00:00 2001
From: David Lehman <dlehman@redhat.com>
Date: Mon, 22 Apr 2019 17:44:42 -0400
Subject: [PATCH 2/4] Add a target to create an archive of the unit tests.

---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index 76817278..f9b2066e 100644
--- a/Makefile
+++ b/Makefile
@@ -120,6 +120,10 @@ archive: po-pull
 	git checkout -- po/$(PKGNAME).pot
 	@echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
 
+tests-archive:
+	git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(VERSION_TAG) tests/ | gzip -9 > $(PKGNAME)-$(VERSION)-tests.tar.gz
+	@echo "The test archive is in $(PKGNAME)-$(VERSION)-tests.tar.gz"
+
 local: po-pull
 	@make -B ChangeLog
 	$(PYTHON) setup.py -q sdist --dist-dir .

From 28959739b46d22698c05f34494d2d9c67f37f0c4 Mon Sep 17 00:00:00 2001
From: David Lehman <dlehman@redhat.com>
Date: Mon, 22 Apr 2019 17:45:19 -0400
Subject: [PATCH 3/4] Add spec file logic to include unit tests in SRPM.

---
 python-blivet.spec | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/python-blivet.spec b/python-blivet.spec
index 668e0913..23fa07f6 100644
--- a/python-blivet.spec
+++ b/python-blivet.spec
@@ -29,6 +29,7 @@ License: LGPLv2+
 %global realname blivet
 %global realversion %{version}%{?prerelease}
 Source0: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}.tar.gz
+Source1: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}-tests.tar.gz
 
 # Versions of required components (done so we make sure the buildrequires
 # match the requires versions of things).
@@ -165,7 +166,8 @@ configuration.
 %endif
 
 %prep
-%autosetup -n %{realname}-%{realversion} -p1
+%autosetup -n %{realname}-%{realversion} -N
+%autosetup -n %{realname}-%{realversion} -b1 -p1
 
 %build
 %{?with_python2:make PYTHON=%{__python2}}

From 305c9b52ee5682baf53be660c501b7b263029699 Mon Sep 17 00:00:00 2001
From: David Lehman <dlehman@redhat.com>
Date: Fri, 26 Apr 2019 16:39:35 -0400
Subject: [PATCH 4/4] Include tests archive where appropriate in make targets.

---
 Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Makefile b/Makefile
index f9b2066e..552550a6 100644
--- a/Makefile
+++ b/Makefile
@@ -119,6 +119,7 @@ archive: po-pull
 	rm -rf $(PKGNAME)-$(VERSION)
 	git checkout -- po/$(PKGNAME).pot
 	@echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
+	@make tests-archive
 
 tests-archive:
 	git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(VERSION_TAG) tests/ | gzip -9 > $(PKGNAME)-$(VERSION)-tests.tar.gz
@@ -128,6 +129,8 @@ local: po-pull
 	@make -B ChangeLog
 	$(PYTHON) setup.py -q sdist --dist-dir .
 	@echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
+	git ls-files tests/ | tar -T- -czf $(PKGNAME)-$(VERSION)-tests.tar.gz
+	@echo "The test archive is in $(PKGNAME)-$(VERSION)-tests.tar.gz"
 
 rpmlog:
 	@git log --pretty="format:- %s (%ae)" $(RELEASE_TAG).. |sed -e 's/@.*)/)/'