From 48c787ba8d41ba7d2006ff6462749b81858964c7 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Mon, 27 Aug 2018 11:34:48 +0000
Subject: [PATCH] Debian: Prevent dup version (ticket #2300)

---
 debian-alt/bionic/rules         | 2 +-
 debian-alt/buster/rules         | 2 +-
 debian-alt/doc/debian-build.txt | 8 ++++----
 debian-alt/jessie/rules         | 2 +-
 debian-alt/precise/rules        | 2 +-
 debian-alt/trusty/rules         | 2 +-
 debian-alt/wheezy/rules         | 2 +-
 debian-alt/xenial/rules         | 2 +-
 debian/rules                    | 2 +-
 9 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/debian-alt/bionic/rules b/debian-alt/bionic/rules
index 12cbd12397..d98bd954ef 100755
--- a/debian-alt/bionic/rules
+++ b/debian-alt/bionic/rules
@@ -74,7 +74,7 @@ build-indep:
 		cp $(ROUTERVERSION) $(CURDIR)/debian/routerversion.java.bak; \
 	fi
 ifeq "$(findstring deb,$(shell grep 'deb' $(ROUTERVERSION)))" ""
-	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"\2-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
+	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
 	mv -f $(ROUTERVERSION).tmp $(ROUTERVERSION)
 else
 	@echo "Already found deb in version, not doing anything"
diff --git a/debian-alt/buster/rules b/debian-alt/buster/rules
index 56bf2f0fe0..adff48473c 100755
--- a/debian-alt/buster/rules
+++ b/debian-alt/buster/rules
@@ -72,7 +72,7 @@ build-indep:
 		cp $(ROUTERVERSION) $(CURDIR)/debian/routerversion.java.bak; \
 	fi
 ifeq "$(findstring deb,$(shell grep 'deb' $(ROUTERVERSION)))" ""
-	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"\2-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
+	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
 	mv -f $(ROUTERVERSION).tmp $(ROUTERVERSION)
 else
 	@echo "Already found deb in version, not doing anything"
diff --git a/debian-alt/doc/debian-build.txt b/debian-alt/doc/debian-build.txt
index b1370b09bd..6d1d2f971a 100644
--- a/debian-alt/doc/debian-build.txt
+++ b/debian-alt/doc/debian-build.txt
@@ -74,8 +74,8 @@ reprepro includedsc stable i2p_0.9.XX-1.dsc
 reprepro -v update precise
 reprepro -v update trusty
 reprepro -v update xenial
-reprepro -v update artful
 reprepro -v update bionic
+reprepro -v update cosmic
 # todo when set up
 # To add or remove distributions, edit /var/www/debian/conf/distributions
 # and /var/www/debian/conf/updates
@@ -92,10 +92,10 @@ reprepro -v copysrc wheezy precise i2p
 # Note that syntax is reprepro copysrc TO FROM package!
 reprepro -v copysrc jessie trusty i2p
 
-# To copy artful to stretch and sid:
+# To copy bionic to stretch and sid:
 # Note that syntax is reprepro copysrc TO FROM package!
-reprepro -v copysrc stretch artful i2p
-reprepro -v copysrc sid artful i2p
+reprepro -v copysrc stretch bionic i2p
+reprepro -v copysrc sid bionic i2p
 
 # install in the architectures not copied from ubuntu
 # 'flood' should do this but forgot how, can't make it work any more
diff --git a/debian-alt/jessie/rules b/debian-alt/jessie/rules
index 574e62fdec..d865844020 100755
--- a/debian-alt/jessie/rules
+++ b/debian-alt/jessie/rules
@@ -69,7 +69,7 @@ build-indep:
 		cp $(ROUTERVERSION) $(CURDIR)/debian/routerversion.java.bak; \
 	fi
 ifeq "$(findstring deb,$(shell grep 'deb' $(ROUTERVERSION)))" ""
-	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"\2-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
+	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
 	mv -f $(ROUTERVERSION).tmp $(ROUTERVERSION)
 else
 	@echo "Already found deb in version, not doing anything"
diff --git a/debian-alt/precise/rules b/debian-alt/precise/rules
index cf06493ce0..70628f573e 100755
--- a/debian-alt/precise/rules
+++ b/debian-alt/precise/rules
@@ -70,7 +70,7 @@ build-indep:
 		cp $(ROUTERVERSION) $(CURDIR)/debian/routerversion.java.bak; \
 	fi
 ifeq "$(findstring deb,$(shell grep 'deb' $(ROUTERVERSION)))" ""
-	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"\2-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
+	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
 	mv -f $(ROUTERVERSION).tmp $(ROUTERVERSION)
 else
 	@echo "Already found deb in version, not doing anything"
diff --git a/debian-alt/trusty/rules b/debian-alt/trusty/rules
index a09d6c5493..f00691a92f 100755
--- a/debian-alt/trusty/rules
+++ b/debian-alt/trusty/rules
@@ -69,7 +69,7 @@ build-indep:
 		cp $(ROUTERVERSION) $(CURDIR)/debian/routerversion.java.bak; \
 	fi
 ifeq "$(findstring deb,$(shell grep 'deb' $(ROUTERVERSION)))" ""
-	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"\2-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
+	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
 	mv -f $(ROUTERVERSION).tmp $(ROUTERVERSION)
 else
 	@echo "Already found deb in version, not doing anything"
diff --git a/debian-alt/wheezy/rules b/debian-alt/wheezy/rules
index a846ebc8fd..1d463b13e3 100755
--- a/debian-alt/wheezy/rules
+++ b/debian-alt/wheezy/rules
@@ -69,7 +69,7 @@ build-indep:
 		cp $(ROUTERVERSION) $(CURDIR)/debian/routerversion.java.bak; \
 	fi
 ifeq "$(findstring deb,$(shell grep 'deb' $(ROUTERVERSION)))" ""
-	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"\2-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
+	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
 	mv -f $(ROUTERVERSION).tmp $(ROUTERVERSION)
 else
 	@echo "Already found deb in version, not doing anything"
diff --git a/debian-alt/xenial/rules b/debian-alt/xenial/rules
index 29919c90d8..701918109f 100755
--- a/debian-alt/xenial/rules
+++ b/debian-alt/xenial/rules
@@ -69,7 +69,7 @@ build-indep:
 		cp $(ROUTERVERSION) $(CURDIR)/debian/routerversion.java.bak; \
 	fi
 ifeq "$(findstring deb,$(shell grep 'deb' $(ROUTERVERSION)))" ""
-	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"\2-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
+	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
 	mv -f $(ROUTERVERSION).tmp $(ROUTERVERSION)
 else
 	@echo "Already found deb in version, not doing anything"
diff --git a/debian/rules b/debian/rules
index 2b9f2410c9..e502c447e4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -72,7 +72,7 @@ build-indep:
 		cp $(ROUTERVERSION) $(CURDIR)/debian/routerversion.java.bak; \
 	fi
 ifeq "$(findstring deb,$(shell grep 'deb' $(ROUTERVERSION)))" ""
-	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"\2-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
+	sed -e "s/\(.*EXTRA\ =\ \)[^ ]*\"\(.*\)\"/\1\"-$$EXTRAPREFIX$$DEBIANVERSION\"/" < $(ROUTERVERSION) > $(ROUTERVERSION).tmp
 	mv -f $(ROUTERVERSION).tmp $(ROUTERVERSION)
 else
 	@echo "Already found deb in version, not doing anything"
-- 
GitLab