From e312365c9d33a0077954aa374a4f19c10448d484 Mon Sep 17 00:00:00 2001
From: Arnaud Rebillout <arnaudr@debian.org>
Date: Mon, 18 Aug 2025 10:07:21 +0700
Subject: [PATCH] Add VENDOR variable, set to Debian

We now use `#VENDOR#` in the templates, instead of hardcoding `Debian`.
It makes it easier for derivatives to adjust base-files for their need.
---
 debian/rules   | 11 ++++++-----
 etc/issue      |  2 +-
 etc/issue.net  |  2 +-
 etc/os-release |  4 ++--
 share/info.dir |  2 +-
 share/motd     |  4 ++--
 6 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/debian/rules b/debian/rules
index cd0157f..6e34f33 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,6 +2,7 @@
 
 include /usr/share/dpkg/architecture.mk
 
+VENDOR = Debian
 OSNAME = "GNU/`uname | sed -e 's/GNU\///'`"
 ifeq ($(DEB_HOST_GNU_SYSTEM),linux)
   OSNAME=GNU/Linux
@@ -49,11 +50,11 @@ override_dh_auto_install:
 ifeq ($(DEB_HOST_GNU_SYSTEM),gnu)
 	rmdir $(DESTDIR)/sys
 endif
-	sed -e "s&#OSNAME#&$(OSNAME)&g" share/motd     > $(DESTDIR)/usr/share/base-files/motd
-	sed -e "s&#OSNAME#&$(OSNAME)&g" share/info.dir > $(DESTDIR)/usr/share/base-files/info.dir
-	sed -e "s&#OSNAME#&$(OSNAME)&g" etc/issue      > $(DESTDIR)/etc/issue
-	sed -e "s&#OSNAME#&$(OSNAME)&g" etc/issue.net  > $(DESTDIR)/etc/issue.net
-	sed -e "s&#OSNAME#&$(OSNAME)&g" etc/os-release > $(DESTDIR)/etc/os-release
+	sed -e "s&#OSNAME#&$(OSNAME)&g" -e "s&#VENDOR#&$(VENDOR)&g" share/motd     > $(DESTDIR)/usr/share/base-files/motd
+	sed -e "s&#OSNAME#&$(OSNAME)&g" -e "s&#VENDOR#&$(VENDOR)&g" share/info.dir > $(DESTDIR)/usr/share/base-files/info.dir
+	sed -e "s&#OSNAME#&$(OSNAME)&g" -e "s&#VENDOR#&$(VENDOR)&g" etc/issue      > $(DESTDIR)/etc/issue
+	sed -e "s&#OSNAME#&$(OSNAME)&g" -e "s&#VENDOR#&$(VENDOR)&g" etc/issue.net  > $(DESTDIR)/etc/issue.net
+	sed -e "s&#OSNAME#&$(OSNAME)&g" -e "s&#VENDOR#&$(VENDOR)&g" etc/os-release > $(DESTDIR)/etc/os-release
 	mv $(DESTDIR)/etc/os-release $(DESTDIR)/usr/lib/os-release
 	ln -s ../usr/lib/os-release $(DESTDIR)/etc/os-release
 
diff --git a/etc/issue b/etc/issue
index 9ed4526..b138fdf 100644
--- a/etc/issue
+++ b/etc/issue
@@ -1,2 +1,2 @@
-Debian #OSNAME# forky/sid \n \l
+#VENDOR# #OSNAME# forky/sid \n \l
 
diff --git a/etc/issue.net b/etc/issue.net
index 15ce5f7..993f9d7 100644
--- a/etc/issue.net
+++ b/etc/issue.net
@@ -1 +1 @@
-Debian #OSNAME# forky/sid
+#VENDOR# #OSNAME# forky/sid
diff --git a/etc/os-release b/etc/os-release
index 3887df6..724aefc 100644
--- a/etc/os-release
+++ b/etc/os-release
@@ -1,5 +1,5 @@
-PRETTY_NAME="Debian #OSNAME# forky/sid"
-NAME="Debian #OSNAME#"
+PRETTY_NAME="#VENDOR# #OSNAME# forky/sid"
+NAME="#VENDOR# #OSNAME#"
 VERSION_CODENAME=forky
 ID=debian
 HOME_URL="https://www.debian.org/"
diff --git a/share/info.dir b/share/info.dir
index 550533d..684c024 100644
--- a/share/info.dir
+++ b/share/info.dir
@@ -11,7 +11,7 @@ File: dir	Node: Top	This is the top of the INFO tree
   it.
   --- PLEASE ADD DOCUMENTATION TO THIS TREE. (See INFO topic first.) ---
 
-In Debian #OSNAME#, Info `dir' entries are added with the command
+In #VENDOR# #OSNAME#, Info `dir' entries are added with the command
 `install-info'.  Please refer to install-info(8) for usage details.
 
 * Menu: The list of major topics begins on the next line.
diff --git a/share/motd b/share/motd
index 0120913..841d8dc 100644
--- a/share/motd
+++ b/share/motd
@@ -1,7 +1,7 @@
 
-The programs included with the Debian #OSNAME# system are free software;
+The programs included with the #VENDOR# #OSNAME# system are free software;
 the exact distribution terms for each program are described in the
 individual files in /usr/share/doc/*/copyright.
 
-Debian #OSNAME# comes with ABSOLUTELY NO WARRANTY, to the extent
+#VENDOR# #OSNAME# comes with ABSOLUTELY NO WARRANTY, to the extent
 permitted by applicable law.
-- 
2.50.1

