From a480dabffc4718238151e06739681ce2c39e9280 Mon Sep 17 00:00:00 2001
From: Ryan Brue <ryanbrue@gmail.com>
Date: Aug 05 2024 17:00:37 +0000
Subject: [PATCH 1/3] fix: add shortcommit


Signed-off-by: Ryan Brue <ryanbrue@gmail.com>

---

diff --git a/rpms/cosmic-app-library/cosmic-app-library.spec b/rpms/cosmic-app-library/cosmic-app-library.spec
index 100fbbf..d006902 100644
--- a/rpms/cosmic-app-library/cosmic-app-library.spec
+++ b/rpms/cosmic-app-library/cosmic-app-library.spec
@@ -4,6 +4,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-applets/cosmic-applets.spec b/rpms/cosmic-applets/cosmic-applets.spec
index 79d6f74..d00fc79 100644
--- a/rpms/cosmic-applets/cosmic-applets.spec
+++ b/rpms/cosmic-applets/cosmic-applets.spec
@@ -4,6 +4,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-bg/cosmic-bg.spec b/rpms/cosmic-bg/cosmic-bg.spec
index 2421a17..cfee6f3 100644
--- a/rpms/cosmic-bg/cosmic-bg.spec
+++ b/rpms/cosmic-bg/cosmic-bg.spec
@@ -4,6 +4,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-comp/cosmic-comp.spec b/rpms/cosmic-comp/cosmic-comp.spec
index d64b95d..34dd654 100644
--- a/rpms/cosmic-comp/cosmic-comp.spec
+++ b/rpms/cosmic-comp/cosmic-comp.spec
@@ -4,6 +4,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-desktop/cosmic-desktop.spec b/rpms/cosmic-desktop/cosmic-desktop.spec
index cc49134..1039c7f 100644
--- a/rpms/cosmic-desktop/cosmic-desktop.spec
+++ b/rpms/cosmic-desktop/cosmic-desktop.spec
@@ -1,5 +1,6 @@
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-edit/cosmic-edit.spec b/rpms/cosmic-edit/cosmic-edit.spec
index 20b88b9..5390e92 100644
--- a/rpms/cosmic-edit/cosmic-edit.spec
+++ b/rpms/cosmic-edit/cosmic-edit.spec
@@ -6,6 +6,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-epoch/cosmic-epoch.spec b/rpms/cosmic-epoch/cosmic-epoch.spec
index 4a585e6..669bd97 100644
--- a/rpms/cosmic-epoch/cosmic-epoch.spec
+++ b/rpms/cosmic-epoch/cosmic-epoch.spec
@@ -1,5 +1,6 @@
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-files/cosmic-files.spec b/rpms/cosmic-files/cosmic-files.spec
index a4d157a..ad9bb96 100644
--- a/rpms/cosmic-files/cosmic-files.spec
+++ b/rpms/cosmic-files/cosmic-files.spec
@@ -7,6 +7,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-greeter/cosmic-greeter.spec b/rpms/cosmic-greeter/cosmic-greeter.spec
index 43c386b..715004b 100644
--- a/rpms/cosmic-greeter/cosmic-greeter.spec
+++ b/rpms/cosmic-greeter/cosmic-greeter.spec
@@ -4,6 +4,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-icon-theme/cosmic-icon-theme.spec b/rpms/cosmic-icon-theme/cosmic-icon-theme.spec
index ebc2306..b275cd6 100644
--- a/rpms/cosmic-icon-theme/cosmic-icon-theme.spec
+++ b/rpms/cosmic-icon-theme/cosmic-icon-theme.spec
@@ -1,5 +1,6 @@
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-launcher/cosmic-launcher.spec b/rpms/cosmic-launcher/cosmic-launcher.spec
index ce8d750..a3f15a4 100644
--- a/rpms/cosmic-launcher/cosmic-launcher.spec
+++ b/rpms/cosmic-launcher/cosmic-launcher.spec
@@ -7,6 +7,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-notifications/cosmic-notifications.spec b/rpms/cosmic-notifications/cosmic-notifications.spec
index 722b984..d373be9 100644
--- a/rpms/cosmic-notifications/cosmic-notifications.spec
+++ b/rpms/cosmic-notifications/cosmic-notifications.spec
@@ -4,6 +4,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-osd/cosmic-osd.spec b/rpms/cosmic-osd/cosmic-osd.spec
index 082fc87..f7d3726 100644
--- a/rpms/cosmic-osd/cosmic-osd.spec
+++ b/rpms/cosmic-osd/cosmic-osd.spec
@@ -7,6 +7,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-panel/cosmic-panel.spec b/rpms/cosmic-panel/cosmic-panel.spec
index 955dc07..02e88ec 100644
--- a/rpms/cosmic-panel/cosmic-panel.spec
+++ b/rpms/cosmic-panel/cosmic-panel.spec
@@ -4,6 +4,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-randr/cosmic-randr.spec b/rpms/cosmic-randr/cosmic-randr.spec
index 3d549c3..50bdf6d 100644
--- a/rpms/cosmic-randr/cosmic-randr.spec
+++ b/rpms/cosmic-randr/cosmic-randr.spec
@@ -4,6 +4,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-screenshot/cosmic-screenshot.spec b/rpms/cosmic-screenshot/cosmic-screenshot.spec
index 0eead7b..5342c19 100644
--- a/rpms/cosmic-screenshot/cosmic-screenshot.spec
+++ b/rpms/cosmic-screenshot/cosmic-screenshot.spec
@@ -7,6 +7,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-session/cosmic-session.spec b/rpms/cosmic-session/cosmic-session.spec
index d36dca3..be8df11 100644
--- a/rpms/cosmic-session/cosmic-session.spec
+++ b/rpms/cosmic-session/cosmic-session.spec
@@ -7,6 +7,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec b/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec
index bcaec89..fb82e4a 100644
--- a/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec
+++ b/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec
@@ -7,6 +7,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-settings/cosmic-settings.spec b/rpms/cosmic-settings/cosmic-settings.spec
index fbef4fe..c4bc1fe 100644
--- a/rpms/cosmic-settings/cosmic-settings.spec
+++ b/rpms/cosmic-settings/cosmic-settings.spec
@@ -6,6 +6,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-store/cosmic-store.spec b/rpms/cosmic-store/cosmic-store.spec
index bac7da5..dca926e 100644
--- a/rpms/cosmic-store/cosmic-store.spec
+++ b/rpms/cosmic-store/cosmic-store.spec
@@ -4,6 +4,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-term/cosmic-term.spec b/rpms/cosmic-term/cosmic-term.spec
index 2cd9ec9..4df238d 100644
--- a/rpms/cosmic-term/cosmic-term.spec
+++ b/rpms/cosmic-term/cosmic-term.spec
@@ -6,6 +6,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/cosmic-workspaces/cosmic-workspaces.spec b/rpms/cosmic-workspaces/cosmic-workspaces.spec
index a0a1f0b..e41820e 100644
--- a/rpms/cosmic-workspaces/cosmic-workspaces.spec
+++ b/rpms/cosmic-workspaces/cosmic-workspaces.spec
@@ -7,6 +7,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/pop-launcher/pop-launcher.spec b/rpms/pop-launcher/pop-launcher.spec
index 03d7f2a..b3bd535 100644
--- a/rpms/pop-launcher/pop-launcher.spec
+++ b/rpms/pop-launcher/pop-launcher.spec
@@ -4,6 +4,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 
diff --git a/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec b/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec
index 1907301..241117e 100644
--- a/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec
+++ b/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec
@@ -7,6 +7,7 @@ ExcludeArch: %{ix86}
 
 
 %global commit ###
+%global shortcommit %{sub %{commit} 1 7}
 %global commitdatestring ###
 %global commitdate ###
 

From 32986e550a8e7e7c51d216a79766895697c5d23b Mon Sep 17 00:00:00 2001
From: Ryan Brue <ryanbrue@gmail.com>
Date: Aug 05 2024 17:25:24 +0000
Subject: [PATCH 2/3] more review stuff


Signed-off-by: Ryan Brue <ryanbrue@gmail.com>

---

diff --git a/rpms/cosmic-app-library/cosmic-app-library.spec b/rpms/cosmic-app-library/cosmic-app-library.spec
index d006902..278a383 100644
--- a/rpms/cosmic-app-library/cosmic-app-library.spec
+++ b/rpms/cosmic-app-library/cosmic-app-library.spec
@@ -42,10 +42,10 @@ URL:            https://github.com/pop-os/cosmic-applibrary
 Source0:        https://github.com/pop-os/cosmic-applibrary/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-applibrary at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 
diff --git a/rpms/cosmic-applets/cosmic-applets.spec b/rpms/cosmic-applets/cosmic-applets.spec
index d00fc79..2a3b8ac 100644
--- a/rpms/cosmic-applets/cosmic-applets.spec
+++ b/rpms/cosmic-applets/cosmic-applets.spec
@@ -41,10 +41,10 @@ URL:            https://github.com/pop-os/cosmic-applets
 Source0:        https://github.com/pop-os/cosmic-applets/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-applets at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 
diff --git a/rpms/cosmic-bg/cosmic-bg.spec b/rpms/cosmic-bg/cosmic-bg.spec
index cfee6f3..486133c 100644
--- a/rpms/cosmic-bg/cosmic-bg.spec
+++ b/rpms/cosmic-bg/cosmic-bg.spec
@@ -35,10 +35,10 @@ URL:            https://github.com/pop-os/cosmic-bg
 Source0:        https://github.com/pop-os/cosmic-bg/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-bg at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 BuildRequires:  cargo-rpm-macros >= 25
diff --git a/rpms/cosmic-comp/cosmic-comp.spec b/rpms/cosmic-comp/cosmic-comp.spec
index 34dd654..ce8b4c6 100644
--- a/rpms/cosmic-comp/cosmic-comp.spec
+++ b/rpms/cosmic-comp/cosmic-comp.spec
@@ -46,10 +46,10 @@ URL:            https://github.com/pop-os/cosmic-comp
 Source0:        https://github.com/pop-os/cosmic-comp/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-comp at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 BuildRequires:  cargo-rpm-macros >= 25
diff --git a/rpms/cosmic-edit/cosmic-edit.spec b/rpms/cosmic-edit/cosmic-edit.spec
index 5390e92..25a79cf 100644
--- a/rpms/cosmic-edit/cosmic-edit.spec
+++ b/rpms/cosmic-edit/cosmic-edit.spec
@@ -46,10 +46,10 @@ URL:            https://github.com/pop-os/cosmic-edit
 Source0:        https://github.com/pop-os/cosmic-edit/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-edit at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 
diff --git a/rpms/cosmic-files/cosmic-files.spec b/rpms/cosmic-files/cosmic-files.spec
index ad9bb96..43761d5 100644
--- a/rpms/cosmic-files/cosmic-files.spec
+++ b/rpms/cosmic-files/cosmic-files.spec
@@ -46,10 +46,10 @@ URL:            https://github.com/pop-os/cosmic-files
 Source0:        https://github.com/pop-os/cosmic-files/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-files at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 
diff --git a/rpms/cosmic-greeter/cosmic-greeter.spec b/rpms/cosmic-greeter/cosmic-greeter.spec
index 715004b..76e5f15 100644
--- a/rpms/cosmic-greeter/cosmic-greeter.spec
+++ b/rpms/cosmic-greeter/cosmic-greeter.spec
@@ -42,10 +42,10 @@ URL:            https://github.com/pop-os/cosmic-greeter
 Source0:        https://github.com/pop-os/cosmic-greeter/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-greeter at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 Patch:          service.patch
diff --git a/rpms/cosmic-launcher/cosmic-launcher.spec b/rpms/cosmic-launcher/cosmic-launcher.spec
index a3f15a4..e5ed643 100644
--- a/rpms/cosmic-launcher/cosmic-launcher.spec
+++ b/rpms/cosmic-launcher/cosmic-launcher.spec
@@ -46,10 +46,10 @@ URL:            https://github.com/pop-os/cosmic-launcher
 Source0:        https://github.com/pop-os/cosmic-launcher/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-launcher at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 
diff --git a/rpms/cosmic-notifications/cosmic-notifications.spec b/rpms/cosmic-notifications/cosmic-notifications.spec
index d373be9..3c2985c 100644
--- a/rpms/cosmic-notifications/cosmic-notifications.spec
+++ b/rpms/cosmic-notifications/cosmic-notifications.spec
@@ -43,10 +43,10 @@ URL:            https://github.com/pop-os/cosmic-notifications
 Source0:        https://github.com/pop-os/cosmic-notifications/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-notifications at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 BuildRequires:  cargo-rpm-macros >= 25
diff --git a/rpms/cosmic-osd/cosmic-osd.spec b/rpms/cosmic-osd/cosmic-osd.spec
index f7d3726..7ba0c9d 100644
--- a/rpms/cosmic-osd/cosmic-osd.spec
+++ b/rpms/cosmic-osd/cosmic-osd.spec
@@ -44,10 +44,10 @@ URL:            https://github.com/pop-os/cosmic-osd
 Source0:        https://github.com/pop-os/cosmic-osd/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-osd at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 BuildRequires:  cargo-rpm-macros >= 26
diff --git a/rpms/cosmic-panel/cosmic-panel.spec b/rpms/cosmic-panel/cosmic-panel.spec
index 02e88ec..ba47a0d 100644
--- a/rpms/cosmic-panel/cosmic-panel.spec
+++ b/rpms/cosmic-panel/cosmic-panel.spec
@@ -40,10 +40,10 @@ URL:            https://github.com/pop-os/cosmic-panel
 Source0:        https://github.com/pop-os/cosmic-panel/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-panel at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 BuildRequires:  cargo-rpm-macros >= 25
diff --git a/rpms/cosmic-randr/cosmic-randr.spec b/rpms/cosmic-randr/cosmic-randr.spec
index 50bdf6d..ab0627a 100644
--- a/rpms/cosmic-randr/cosmic-randr.spec
+++ b/rpms/cosmic-randr/cosmic-randr.spec
@@ -32,10 +32,10 @@ URL:            https://github.com/pop-os/cosmic-randr
 Source0:        https://github.com/pop-os/cosmic-randr/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-randr at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 BuildRequires:  cargo-rpm-macros >= 25
diff --git a/rpms/cosmic-screenshot/cosmic-screenshot.spec b/rpms/cosmic-screenshot/cosmic-screenshot.spec
index 5342c19..48abe99 100644
--- a/rpms/cosmic-screenshot/cosmic-screenshot.spec
+++ b/rpms/cosmic-screenshot/cosmic-screenshot.spec
@@ -34,10 +34,10 @@ URL:            https://github.com/pop-os/cosmic-screenshot
 Source0:        https://github.com/pop-os/cosmic-screenshot/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-screenshot at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 
diff --git a/rpms/cosmic-session/cosmic-session.spec b/rpms/cosmic-session/cosmic-session.spec
index be8df11..5980f6e 100644
--- a/rpms/cosmic-session/cosmic-session.spec
+++ b/rpms/cosmic-session/cosmic-session.spec
@@ -38,10 +38,10 @@ URL:            https://github.com/pop-os/cosmic-session
 Source0:        https://github.com/pop-os/cosmic-session/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-session at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 BuildRequires:  cargo-rpm-macros >= 26
diff --git a/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec b/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec
index fb82e4a..e302408 100644
--- a/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec
+++ b/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec
@@ -43,10 +43,10 @@ URL:            https://github.com/pop-os/cosmic-settings-daemon
 Source0:        https://github.com/pop-os/cosmic-settings-daemon/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-settings-daemon at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 BuildRequires:  cargo-rpm-macros >= 26
diff --git a/rpms/cosmic-settings/cosmic-settings.spec b/rpms/cosmic-settings/cosmic-settings.spec
index c4bc1fe..ca4f6c3 100644
--- a/rpms/cosmic-settings/cosmic-settings.spec
+++ b/rpms/cosmic-settings/cosmic-settings.spec
@@ -46,10 +46,10 @@ URL:            https://github.com/pop-os/cosmic-settings
 Source0:        https://github.com/pop-os/cosmic-settings/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-settings at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 
diff --git a/rpms/cosmic-store/cosmic-store.spec b/rpms/cosmic-store/cosmic-store.spec
index dca926e..672eae4 100644
--- a/rpms/cosmic-store/cosmic-store.spec
+++ b/rpms/cosmic-store/cosmic-store.spec
@@ -44,10 +44,10 @@ URL:            https://github.com/pop-os/cosmic-store
 Source0:        https://github.com/pop-os/cosmic-store/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-store at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 
diff --git a/rpms/cosmic-term/cosmic-term.spec b/rpms/cosmic-term/cosmic-term.spec
index 4df238d..26f0539 100644
--- a/rpms/cosmic-term/cosmic-term.spec
+++ b/rpms/cosmic-term/cosmic-term.spec
@@ -45,10 +45,10 @@ URL:            https://github.com/pop-os/cosmic-term
 Source0:        https://github.com/pop-os/cosmic-term/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-term at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 
diff --git a/rpms/cosmic-workspaces/cosmic-workspaces.spec b/rpms/cosmic-workspaces/cosmic-workspaces.spec
index e41820e..c1742f0 100644
--- a/rpms/cosmic-workspaces/cosmic-workspaces.spec
+++ b/rpms/cosmic-workspaces/cosmic-workspaces.spec
@@ -44,10 +44,10 @@ URL:            https://github.com/pop-os/cosmic-workspaces-epoch
 Source0:        https://github.com/pop-os/cosmic-workspaces-epoch/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-workspaces-epoch at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 
diff --git a/rpms/pop-launcher/pop-launcher.spec b/rpms/pop-launcher/pop-launcher.spec
index b3bd535..7aec666 100644
--- a/rpms/pop-launcher/pop-launcher.spec
+++ b/rpms/pop-launcher/pop-launcher.spec
@@ -41,10 +41,10 @@ URL:            https://github.com/pop-os/launcher
 Source0:        https://github.com/pop-os/launcher/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/launcher at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 Patch:          symlink.patch
diff --git a/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec b/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec
index 241117e..06fcbc4 100644
--- a/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec
+++ b/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec
@@ -44,10 +44,10 @@ URL:            https://github.com/pop-os/xdg-desktop-portal-cosmic
 Source0:        https://github.com/pop-os/xdg-desktop-portal-cosmic/archive/%{commit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/xdg-desktop-portal-cosmic at the specified commit
-# * cargo vendor > vendor-config-%{commit}.toml
-# * tar -pczf vendor-%{commit}.tar.gz vendor
+# * cargo vendor > vendor-config-%%{commit}.toml
+# * tar -pczf vendor-%%{commit}.tar.gz vendor
 Source1:        vendor-%{commit}.tar.gz
-# * mv vendor-config-%{commit}.toml ..
+# * mv vendor-config-%%{commit}.toml ..
 Source2:        vendor-config-%{commit}.toml
 
 BuildRequires:  cargo-rpm-macros >= 26
diff --git a/scripts/srpm.sh b/scripts/srpm.sh
index 70c5117..73dc20d 100644
--- a/scripts/srpm.sh
+++ b/scripts/srpm.sh
@@ -47,7 +47,7 @@ tar -pczf $SOURCE_NAME-$COMMIT.tar.gz $SOURCE_NAME-$COMMIT
 rm -rf $SOURCE_NAME-$COMMIT
 
 # Make replacements to specfile
-sed -i "/^Version: / s/.*/Version:           $VERSION~^%{commitdate}git%{sub %{commit} 1 7}/" $NAME.spec
+sed -i "/^Version: / s/.*/Version:           $VERSION~^%{commitdate}git%{shortcommit}/" $NAME.spec
 sed -i "/^%global commit / s/.*/%global commit $COMMIT/" $NAME.spec
 
 sed -i "/^%global commitdate / s/.*/%global commitdate $COMMITDATE/" $NAME.spec

From e58e42ff88a21eca52740381211a6f32dc8026df Mon Sep 17 00:00:00 2001
From: Ryan Brue <ryanbrue@gmail.com>
Date: Aug 05 2024 17:40:45 +0000
Subject: [PATCH 3/3] fix: use shortcommit


Signed-off-by: Ryan Brue <ryanbrue@gmail.com>

---

diff --git a/rpms/cosmic-app-library/cosmic-app-library.spec b/rpms/cosmic-app-library/cosmic-app-library.spec
index 278a383..2cfb208 100644
--- a/rpms/cosmic-app-library/cosmic-app-library.spec
+++ b/rpms/cosmic-app-library/cosmic-app-library.spec
@@ -39,7 +39,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR MIT A
 
 URL:            https://github.com/pop-os/cosmic-applibrary
 
-Source0:        https://github.com/pop-os/cosmic-applibrary/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-applibrary/archive/%{commit}/cosmic-applibrary-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-applibrary at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -66,7 +66,7 @@ Requires:       hicolor-icon-theme
 %description %{_description}
 
 %prep
-%autosetup -n cosmic-applibrary-%{commit} -p1 -a1
+%autosetup -n cosmic-applibrary-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-applets/cosmic-applets.spec b/rpms/cosmic-applets/cosmic-applets.spec
index 2a3b8ac..fab353a 100644
--- a/rpms/cosmic-applets/cosmic-applets.spec
+++ b/rpms/cosmic-applets/cosmic-applets.spec
@@ -38,7 +38,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR MIT A
 
 URL:            https://github.com/pop-os/cosmic-applets
 
-Source0:        https://github.com/pop-os/cosmic-applets/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-applets/archive/%{commit}/cosmic-applets-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-applets at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -75,7 +75,7 @@ Requires:       hicolor-icon-theme
 %description %{_description}
 
 %prep
-%autosetup -n cosmic-applets-%{commit} -p1 -a1
+%autosetup -n cosmic-applets-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-bg/cosmic-bg.spec b/rpms/cosmic-bg/cosmic-bg.spec
index 486133c..e980316 100644
--- a/rpms/cosmic-bg/cosmic-bg.spec
+++ b/rpms/cosmic-bg/cosmic-bg.spec
@@ -32,7 +32,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 OR MIT AND Apache-2.0 W
 
 URL:            https://github.com/pop-os/cosmic-bg
 
-Source0:        https://github.com/pop-os/cosmic-bg/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-bg/archive/%{commit}/cosmic-bg-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-bg at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -59,7 +59,7 @@ Requires:       hicolor-icon-theme
 %description %{_description}
 
 %prep
-%autosetup -n cosmic-bg-%{commit} -p1 -a1
+%autosetup -n cosmic-bg-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-comp/cosmic-comp.spec b/rpms/cosmic-comp/cosmic-comp.spec
index ce8b4c6..9b26d6b 100644
--- a/rpms/cosmic-comp/cosmic-comp.spec
+++ b/rpms/cosmic-comp/cosmic-comp.spec
@@ -43,7 +43,7 @@ License:        GPL-3.0 AND (Apache-2.0 OR MIT) AND BSD-3-Clause AND 0BSD OR MIT
 
 URL:            https://github.com/pop-os/cosmic-comp
 
-Source0:        https://github.com/pop-os/cosmic-comp/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-comp/archive/%{commit}/cosmic-comp-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-comp at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -75,7 +75,7 @@ Recommends:     cosmic-session
 %description %{_description}
 
 %prep
-%autosetup -n cosmic-comp-%{commit} -p1 -a1
+%autosetup -n cosmic-comp-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-edit/cosmic-edit.spec b/rpms/cosmic-edit/cosmic-edit.spec
index 25a79cf..6799e88 100644
--- a/rpms/cosmic-edit/cosmic-edit.spec
+++ b/rpms/cosmic-edit/cosmic-edit.spec
@@ -43,7 +43,7 @@ License:        (Apache-2.0 OR MIT) AND BSD-3-Clause AND 0BSD OR MIT OR Apache-2
 
 URL:            https://github.com/pop-os/cosmic-edit
 
-Source0:        https://github.com/pop-os/cosmic-edit/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-edit/archive/%{commit}/cosmic-edit-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-edit at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -69,7 +69,7 @@ Requires:       hicolor-icon-theme
 %description %{_description}
 
 %prep
-%autosetup -n %{crate}-%{commit} -p1 -a1
+%autosetup -n %{crate}-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-files/cosmic-files.spec b/rpms/cosmic-files/cosmic-files.spec
index 43761d5..1a18d5b 100644
--- a/rpms/cosmic-files/cosmic-files.spec
+++ b/rpms/cosmic-files/cosmic-files.spec
@@ -43,7 +43,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR BSL-1
 
 URL:            https://github.com/pop-os/cosmic-files
 
-Source0:        https://github.com/pop-os/cosmic-files/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-files/archive/%{commit}/cosmic-files-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-files at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -72,7 +72,7 @@ Requires:       hicolor-icon-theme
 %description %{_description}
 
 %prep
-%autosetup -n %{crate}-%{commit} -p1 -a1
+%autosetup -n %{crate}-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-greeter/cosmic-greeter.spec b/rpms/cosmic-greeter/cosmic-greeter.spec
index 76e5f15..fee014e 100644
--- a/rpms/cosmic-greeter/cosmic-greeter.spec
+++ b/rpms/cosmic-greeter/cosmic-greeter.spec
@@ -39,7 +39,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR BSL-1
 
 URL:            https://github.com/pop-os/cosmic-greeter
 
-Source0:        https://github.com/pop-os/cosmic-greeter/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-greeter/archive/%{commit}/cosmic-greeter-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-greeter at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -79,7 +79,7 @@ Requires:       cosmic-comp
 %description %{_description}
 
 %prep
-%autosetup -n cosmic-greeter-%{commit} -p1 -a1
+%autosetup -n cosmic-greeter-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-icon-theme/cosmic-icon-theme.spec b/rpms/cosmic-icon-theme/cosmic-icon-theme.spec
index b275cd6..7fc4db7 100644
--- a/rpms/cosmic-icon-theme/cosmic-icon-theme.spec
+++ b/rpms/cosmic-icon-theme/cosmic-icon-theme.spec
@@ -13,7 +13,7 @@ License:        CC-BY-SA-4.0
 
 URL:            https://github.com/pop-os/cosmic-icons
 
-Source0:        https://github.com/pop-os/cosmic-icons/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-icons/archive/%{commit}/cosmic-icons-%{shortcommit}.tar.gz
 
 BuildArch:      noarch
 
@@ -31,7 +31,7 @@ Provides:  cosmic-icons = %{version}-%{release}
 %description %{_description}
 
 %prep
-%autosetup -n cosmic-icons-%{commit}
+%autosetup -n cosmic-icons-%{shortcommit}
 
 %build
 
diff --git a/rpms/cosmic-launcher/cosmic-launcher.spec b/rpms/cosmic-launcher/cosmic-launcher.spec
index e5ed643..502cfa4 100644
--- a/rpms/cosmic-launcher/cosmic-launcher.spec
+++ b/rpms/cosmic-launcher/cosmic-launcher.spec
@@ -43,7 +43,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR BSL-1
 
 URL:            https://github.com/pop-os/cosmic-launcher
 
-Source0:        https://github.com/pop-os/cosmic-launcher/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-launcher/archive/%{commit}/cosmic-launcher-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-launcher at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -71,7 +71,7 @@ Requires:       hicolor-icon-theme
 %description %{_description}
 
 %prep
-%autosetup -n %{crate}-%{commit} -p1 -a1
+%autosetup -n %{crate}-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-notifications/cosmic-notifications.spec b/rpms/cosmic-notifications/cosmic-notifications.spec
index 3c2985c..7e4592e 100644
--- a/rpms/cosmic-notifications/cosmic-notifications.spec
+++ b/rpms/cosmic-notifications/cosmic-notifications.spec
@@ -40,7 +40,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR BSD-3
 
 URL:            https://github.com/pop-os/cosmic-notifications
 
-Source0:        https://github.com/pop-os/cosmic-notifications/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-notifications/archive/%{commit}/cosmic-notifications-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-notifications at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -66,7 +66,7 @@ Requires:       hicolor-icon-theme
 %description %{_description}
 
 %prep
-%autosetup -n cosmic-notifications-%{commit} -p1 -a1
+%autosetup -n cosmic-notifications-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-osd/cosmic-osd.spec b/rpms/cosmic-osd/cosmic-osd.spec
index 7ba0c9d..5b1bd83 100644
--- a/rpms/cosmic-osd/cosmic-osd.spec
+++ b/rpms/cosmic-osd/cosmic-osd.spec
@@ -41,7 +41,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR MIT A
 
 URL:            https://github.com/pop-os/cosmic-osd
 
-Source0:        https://github.com/pop-os/cosmic-osd/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-osd/archive/%{commit}/cosmic-osd-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-osd at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -66,7 +66,7 @@ BuildRequires:  make
 %description %{_description}
 
 %prep
-%autosetup -n %{crate}-%{commit} -p1 -a1
+%autosetup -n %{crate}-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-panel/cosmic-panel.spec b/rpms/cosmic-panel/cosmic-panel.spec
index ba47a0d..68330cd 100644
--- a/rpms/cosmic-panel/cosmic-panel.spec
+++ b/rpms/cosmic-panel/cosmic-panel.spec
@@ -37,7 +37,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR BSD-3
 
 URL:            https://github.com/pop-os/cosmic-panel
 
-Source0:        https://github.com/pop-os/cosmic-panel/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-panel/archive/%{commit}/cosmic-panel-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-panel at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -60,7 +60,7 @@ BuildRequires:  just
 %description %{_description}
 
 %prep
-%autosetup -n cosmic-panel-%{commit} -p1 -a1
+%autosetup -n cosmic-panel-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-randr/cosmic-randr.spec b/rpms/cosmic-randr/cosmic-randr.spec
index ab0627a..49dcd5e 100644
--- a/rpms/cosmic-randr/cosmic-randr.spec
+++ b/rpms/cosmic-randr/cosmic-randr.spec
@@ -29,7 +29,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR MIT A
 
 URL:            https://github.com/pop-os/cosmic-randr
 
-Source0:        https://github.com/pop-os/cosmic-randr/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-randr/archive/%{commit}/cosmic-randr-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-randr at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -51,7 +51,7 @@ Cosmic-randr command line interface.}
 %description %{_description}
 
 %prep
-%autosetup -n cosmic-randr-%{commit} -p1 -a1
+%autosetup -n cosmic-randr-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-screenshot/cosmic-screenshot.spec b/rpms/cosmic-screenshot/cosmic-screenshot.spec
index 48abe99..e5b5aef 100644
--- a/rpms/cosmic-screenshot/cosmic-screenshot.spec
+++ b/rpms/cosmic-screenshot/cosmic-screenshot.spec
@@ -31,7 +31,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 OR MIT AND Apache-2.0 W
 
 URL:            https://github.com/pop-os/cosmic-screenshot
 
-Source0:        https://github.com/pop-os/cosmic-screenshot/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-screenshot/archive/%{commit}/cosmic-screenshot-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-screenshot at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -54,7 +54,7 @@ BuildRequires:  desktop-file-utils
 %description %{_description}
 
 %prep
-%autosetup -n %{crate}-%{commit} -p1 -a1
+%autosetup -n %{crate}-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-session/cosmic-session.spec b/rpms/cosmic-session/cosmic-session.spec
index 5980f6e..1a2bd82 100644
--- a/rpms/cosmic-session/cosmic-session.spec
+++ b/rpms/cosmic-session/cosmic-session.spec
@@ -35,7 +35,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 OR BSD-3-Clause AND Apa
 
 URL:            https://github.com/pop-os/cosmic-session
 
-Source0:        https://github.com/pop-os/cosmic-session/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-session/archive/%{commit}/cosmic-session-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-session at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -79,7 +79,7 @@ The session manager for the COSMIC desktop environment.}
 %description %{_description}
 
 %prep
-%autosetup -n %{crate}-%{commit} -p1 -a1
+%autosetup -n %{crate}-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec b/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec
index e302408..86486f3 100644
--- a/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec
+++ b/rpms/cosmic-settings-daemon/cosmic-settings-daemon.spec
@@ -40,7 +40,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR MIT A
 
 URL:            https://github.com/pop-os/cosmic-settings-daemon
 
-Source0:        https://github.com/pop-os/cosmic-settings-daemon/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-settings-daemon/archive/%{commit}/cosmic-settings-daemon-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-settings-daemon at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -71,7 +71,7 @@ Requires:       adw-gtk3-theme
 %description %{_description}
 
 %prep
-%autosetup -n %{crate}-%{commit} -p1 -a1
+%autosetup -n %{crate}-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-settings/cosmic-settings.spec b/rpms/cosmic-settings/cosmic-settings.spec
index ca4f6c3..b6f0268 100644
--- a/rpms/cosmic-settings/cosmic-settings.spec
+++ b/rpms/cosmic-settings/cosmic-settings.spec
@@ -43,7 +43,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR MIT A
 
 URL:            https://github.com/pop-os/cosmic-settings
 
-Source0:        https://github.com/pop-os/cosmic-settings/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-settings/archive/%{commit}/cosmic-settings-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-settings at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -72,7 +72,7 @@ Requires:       hicolor-icon-theme
 %description %{_description}
 
 %prep
-%autosetup -n cosmic-settings-%{commit} -p1 -a1
+%autosetup -n cosmic-settings-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-store/cosmic-store.spec b/rpms/cosmic-store/cosmic-store.spec
index 672eae4..e05247b 100644
--- a/rpms/cosmic-store/cosmic-store.spec
+++ b/rpms/cosmic-store/cosmic-store.spec
@@ -41,7 +41,7 @@ License:        (Apache-2.0 OR MIT) AND BSD-3-Clause AND 0BSD OR MIT OR Apache-2
 
 URL:            https://github.com/pop-os/cosmic-store
 
-Source0:        https://github.com/pop-os/cosmic-store/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-store/archive/%{commit}/cosmic-store-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-store at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -71,7 +71,7 @@ Requires:       hicolor-icon-theme
 %description %{_description}
 
 %prep
-%autosetup -n cosmic-store-%{commit} -p1 -a1
+%autosetup -n cosmic-store-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-term/cosmic-term.spec b/rpms/cosmic-term/cosmic-term.spec
index 26f0539..328764f 100644
--- a/rpms/cosmic-term/cosmic-term.spec
+++ b/rpms/cosmic-term/cosmic-term.spec
@@ -42,7 +42,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR BSL-1
 
 URL:            https://github.com/pop-os/cosmic-term
 
-Source0:        https://github.com/pop-os/cosmic-term/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-term/archive/%{commit}/cosmic-term-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-term at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -68,7 +68,7 @@ Requires:       hicolor-icon-theme
 %description %{_description}
 
 %prep
-%autosetup -n %{crate}-%{commit} -p1 -a1
+%autosetup -n %{crate}-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/cosmic-workspaces/cosmic-workspaces.spec b/rpms/cosmic-workspaces/cosmic-workspaces.spec
index c1742f0..83d6359 100644
--- a/rpms/cosmic-workspaces/cosmic-workspaces.spec
+++ b/rpms/cosmic-workspaces/cosmic-workspaces.spec
@@ -41,7 +41,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR MIT A
 
 URL:            https://github.com/pop-os/cosmic-workspaces-epoch
 
-Source0:        https://github.com/pop-os/cosmic-workspaces-epoch/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/cosmic-workspaces-epoch/archive/%{commit}/cosmic-workspaces-epoch-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/cosmic-workspaces-epoch at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -74,7 +74,7 @@ Requires:       hicolor-icon-theme
 %description %{_description}
 
 %prep
-%autosetup -n cosmic-workspaces-epoch-%{commit} -p1 -a1
+%autosetup -n cosmic-workspaces-epoch-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/pop-launcher/pop-launcher.spec b/rpms/pop-launcher/pop-launcher.spec
index 7aec666..e164a94 100644
--- a/rpms/pop-launcher/pop-launcher.spec
+++ b/rpms/pop-launcher/pop-launcher.spec
@@ -38,7 +38,7 @@ License:        (Apache-2.0 OR MIT) AND BSD-3-Clause AND Apache-2.0 AND Apache-2
 
 URL:            https://github.com/pop-os/launcher
 
-Source0:        https://github.com/pop-os/launcher/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/launcher/archive/%{commit}/launcher-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/launcher at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -66,7 +66,7 @@ Requires:       fd-find
 %description %{_description}
 
 %prep
-%autosetup -n launcher-%{commit} -p1 -a1
+%autosetup -n launcher-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec b/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec
index 06fcbc4..1b20a65 100644
--- a/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec
+++ b/rpms/xdg-desktop-portal-cosmic/xdg-desktop-portal-cosmic.spec
@@ -41,7 +41,7 @@ License:        0BSD OR MIT OR Apache-2.0 AND Apache-2.0 AND Apache-2.0 OR MIT A
 
 URL:            https://github.com/pop-os/xdg-desktop-portal-cosmic
 
-Source0:        https://github.com/pop-os/xdg-desktop-portal-cosmic/archive/%{commit}.tar.gz
+Source0:        https://github.com/pop-os/xdg-desktop-portal-cosmic/archive/%{commit}/xdg-desktop-portal-cosmic-%{shortcommit}.tar.gz
 # To create the below sources:
 # * git clone https://github.com/pop-os/xdg-desktop-portal-cosmic at the specified commit
 # * cargo vendor > vendor-config-%%{commit}.toml
@@ -72,7 +72,7 @@ Requires:       hicolor-icon-theme
 %description %{_description}
 
 %prep
-%autosetup -n %{crate}-%{commit} -p1 -a1
+%autosetup -n %{crate}-%{shortcommit} -p1 -a1
 %cargo_prep -N
 # Check if .cargo/config.toml exists
 if [ -f .cargo/config.toml ]; then
diff --git a/scripts/srpm.sh b/scripts/srpm.sh
index 73dc20d..7339969 100644
--- a/scripts/srpm.sh
+++ b/scripts/srpm.sh
@@ -24,6 +24,9 @@ then
     cd .. && mv $SOURCE_NAME-LATEST $SOURCE_NAME-$COMMIT && cd $SOURCE_NAME-$COMMIT
 fi
 
+# Set short commit
+SHORTCOMMIT=$(echo ${COMMIT:0:7})
+
 # Reset to specified COMMIT
 git reset --hard $COMMIT
 
@@ -33,8 +36,8 @@ COMMITDATESTRING=$(git log -1 --format=%cd --date=iso)
 if [ "$VENDOR" -eq 1 ]; then
     echo "VENDOR=1"
     # Vendor dependencies and zip vendor
-    cargo vendor > ../vendor-config-$COMMIT.toml
-    tar -pczf vendor-$COMMIT.tar.gz vendor && mv vendor-$COMMIT.tar.gz ../vendor-$COMMIT.tar.gz
+    cargo vendor > ../vendor-config-$SHORTCOMMIT.toml
+    tar -pczf vendor-$SHORTCOMMIT.tar.gz vendor && mv vendor-$SHORTCOMMIT.tar.gz ../vendor-$SHORTCOMMIT.tar.gz
     # Back into parent directory
     rm -rf vendor
     cd ..
@@ -43,8 +46,9 @@ else
 fi
 
 # Zip SOURCE
-tar -pczf $SOURCE_NAME-$COMMIT.tar.gz $SOURCE_NAME-$COMMIT
-rm -rf $SOURCE_NAME-$COMMIT
+mv $SOURCE_NAME-$COMMIT $SOURCE_NAME-$SHORTCOMMIT
+tar -pczf $SOURCE_NAME-$SHORTCOMMIT.tar.gz $SOURCE_NAME-$SHORTCOMMIT
+rm -rf $SOURCE_NAME-$SHORTCOMMIT
 
 # Make replacements to specfile
 sed -i "/^Version: / s/.*/Version:           $VERSION~^%{commitdate}git%{shortcommit}/" $NAME.spec

