* Fri Sep 12 2025 Brian Read <brianr@koozali.org> 11.1-9.sme

- Fix version and build date from spec file  [SME: 13121]
This commit is contained in:
2025-09-12 18:20:15 +01:00
parent a9dbafc584
commit 248bbed240
2 changed files with 12 additions and 12 deletions

View File

@@ -113,7 +113,9 @@ except ImportError:
Mailstats_version = '1.3' Mailstats_version = '1.3'
build_date_time = "2024-06-18 12:03:40OURCE" build_date_time = "2024-06-18 12:03:40OURCE"
build_date_time = build_date_time[:19] #Take out crap that sneaks in. #Take out the crap that sneaks in...
build_date_time = build_date_time[:19]
Mailstats_version = Mailstats_version[:6]
#if build_date_time == "2024-06-18 12:03:40OURCE": #if build_date_time == "2024-06-18 12:03:40OURCE":
# build_date_time = "Unknown" # build_date_time = "Unknown"

View File

@@ -6,7 +6,8 @@ Summary: Daily mail statistics for SME Server
%define name smeserver-mailstats %define name smeserver-mailstats
Name: %{name} Name: %{name}
%define version 11.1 %define version 11.1
%define release 8 %define release 9
%define full_version %{version}.%{release})
Version: %{version} Version: %{version}
Release: %{release}%{?dist} Release: %{release}%{?dist}
License: GPL License: GPL
@@ -49,21 +50,15 @@ perl createlinks
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) (cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT)
chmod +x $RPM_BUILD_ROOT/usr/bin/runmailstats.sh chmod +x $RPM_BUILD_ROOT/usr/bin/runmailstats.sh
#chmod 0640 $RPM_BUILD_ROOT/etc/mailstats/db.php
#ls -l /builddir/build/BUILDROOT/smeserver-mailstats-11.1-5.el8.sme.x86_64/etc/mailstats/
#chown root:102 $RPM_BUILD_ROOT/etc/mailstats/db.php
# Define the placeholder and generate the current date and time
now=$(date +"%Y-%m-%d %H:%M:%S") now=$(date +"%Y-%m-%d %H:%M:%S")
# Replace placeholders in the Python program using sed
# Replace the placeholder in the Python program located at %{BUILDROOT}/usr/bin perl -pi -e 'if (!$done && s/^Mailstats_version *=.*/Mailstats_version = '\''%{full_version}'\'/') { $done = 1 }' $RPM_BUILD_ROOT/usr/bin/mailstats.py
sed -i "s|__BUILD_DATE_TIME__|$now|" $RPM_BUILD_ROOT/usr/bin/mailstats.py perl -pi -e 'if (!$done && s/^build_date_time *=.*/build_date_time = "'"$now"'"/) { $done = 1 }' $RPM_BUILD_ROOT/usr/bin/mailstats.py
/bin/rm -f %{name}-%{version}-filelist /bin/rm -f %{name}-%{version}-filelist
/sbin/e-smith/genfilelist --file '/etc/mailstats/db.php' 'attr(0640, root, apache)' $RPM_BUILD_ROOT | grep -v "\.pyc" | grep -v "\.pyo" > %{name}-%{version}-filelist /sbin/e-smith/genfilelist --file '/etc/mailstats/db.php' 'attr(0640, root, apache)' $RPM_BUILD_ROOT | grep -v "\.pyc" | grep -v "\.pyo" > %{name}-%{version}-filelist
install -Dpm 0755 journalwrap %{buildroot}%{_bindir}/journalwrap install -Dpm 0755 journalwrap %{buildroot}%{_bindir}/journalwrap
#install -Dpm 0644 libjournalwrap.so %{buildroot}%{_libdir}/libjournalwrap.so
%pre %pre
@@ -93,6 +88,9 @@ chmod u+s /usr/bin/journalwrap
/sbin/ldconfig /sbin/ldconfig
%changelog %changelog
* Fri Sep 12 2025 Brian Read <brianr@koozali.org> 11.1-9.sme
- Fix version and build date from spec file [SME: 13121]
* Fri Sep 12 2025 Brian Read <brianr@koozali.org> 11.1-8.sme * Fri Sep 12 2025 Brian Read <brianr@koozali.org> 11.1-8.sme
- Remove www from systemd-journal group and setuid bit in journal wrapper [SME: 13121] - Remove www from systemd-journal group and setuid bit in journal wrapper [SME: 13121]