neil / rpms / python-blivet

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