public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/postsrsd] f44: Initial import (#1471056).
@ 2026-06-04 20:45
0 siblings, 0 replies; only message in thread
From: @ 2026-06-04 20:45 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/postsrsd
Branch : f44
Commit : cbcfaca3df5f5144e95da5604408794af6df9d82
Author : Marc Dequènes (Duck) <duck@redhat.com>
Date : 2017-09-29T07:49:45+00:00
Stats : +140/-3 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/postsrsd/c/cbcfaca3df5f5144e95da5604408794af6df9d82?branch=f44
Log:
Initial import (#1471056).
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fe552d0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/postsrsd-a77bf9940c19aca602faa41bbf987e43e51a5305.tar.gz
diff --git a/README.md b/README.md
deleted file mode 100644
index 525d8f5..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# postsrsd
-
-The postsrsd package
\ No newline at end of file
diff --git a/postsrsd.spec b/postsrsd.spec
new file mode 100644
index 0000000..ca22558
--- /dev/null
+++ b/postsrsd.spec
@@ -0,0 +1,138 @@
+%global commitdate 20170118
+%global commit0 a77bf9940c19aca602faa41bbf987e43e51a5305
+%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
+
+
+Name: postsrsd
+Version: 1.4
+Release: 8.%{commitdate}git%{shortcommit0}%{?dist}
+Summary: Sender Rewriting Scheme (SRS) provider
+
+License: GPLv2+
+URL: https://github.com/roehling/postsrsd
+#Source0: https://github.com/roehling/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
+Source0: https://github.com/roehling/%{name}/archive/%{commit0}/%{name}-%{commit0}.tar.gz
+
+BuildRequires: cmake
+BuildRequires: help2man
+BuildRequires: selinux-policy-devel
+%{?systemd_requires}
+BuildRequires: systemd
+Requires(post): policycoreutils
+Requires(preun): policycoreutils
+Requires(postun): policycoreutils
+
+
+%description
+PostSRSd provides the Sender Rewriting Scheme (SRS) via TCP-based lookup tables for Postfix.
+SRS is needed if your mail server acts as forwarder.
+
+
+%prep
+%autosetup -n %{name}-%{commit0}
+mkdir build
+cd build && %cmake .. -DGENERATE_SRS_SECRET=OFF -DUSE_SELINUX=ON
+
+
+%build
+%make_build -C build
+
+
+%install
+%make_install -C build
+
+# proper location for systemd config
+mkdir -p %{buildroot}/%{_unitdir}
+mv %{buildroot}/%{_sysconfdir}/systemd/system/postsrsd.service %{buildroot}/%{_unitdir}/postsrsd.service
+rm -rf %{buildroot}/%{_sysconfdir}/systemd
+
+# chroot directory
+# (also move default config which is in the way)
+sed -i 's/^CHROOT=.*/CHROOT=\/run\/postsrsd/' %{buildroot}/%{_sysconfdir}/default/%{name}
+sed -ri -e 's/postsrsd\/default/postsrsd.default/' \
+ -e "s/(\[Install\])/RuntimeDirectory=postsrsd\nRuntimeDirectoryMode=0750\n\n\1/" %{buildroot}/%{_unitdir}/postsrsd.service
+
+
+%files
+%license LICENSE
+%{_sysconfdir}/default/%{name}
+%{_unitdir}/postsrsd.service
+%{_sbindir}/postsrsd
+%{_docdir}/%{name}
+%{_mandir}/man8/postsrsd.8.gz
+%{_datadir}/selinux/packages/%{name}/postsrsd.pp
+
+
+%post
+if [ "$1" -le "1" ] ; then # first install
+semodule -i %{_datadir}/selinux/packages/%{name}/postsrsd.pp || true
+fixfiles -R %{name} restore || true
+fi
+[ -f %{_sysconfdir}/postsrsd.secret ] || dd if=/dev/urandom bs=18 count=1 2>/dev/null | base64 >%{_sysconfdir}/postsrsd.secret
+# the admin may modify / restore from a backup, so better restore SELinux permissions unconditionally
+restorecon %{_sysconfdir}/postsrsd.secret
+%systemd_post %{name}.service
+
+
+%preun
+%systemd_preun %{name}.service
+if [ "$1" -lt "1" ] ; then # final removal
+semodule -r postsrsd 2>/dev/null || true
+fi
+
+
+%postun
+if [ "$1" -ge "1" ] ; then # upgrade
+semodule -i %{_datadir}/selinux/packages/%{name}/postsrsd.pp || true
+fixfiles -R %{name} restore || true
+fi
+%systemd_postun_with_restart %{name}.service
+if [ "$1" -eq "0" ] ; then # final removal
+rm -f %{_sysconfdir}/postsrsd.secret
+fi
+
+
+%changelog
+* Thu Sep 28 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-8.20170118gita77bf99
+- Thanks Matthias Runge Mauchin for the review
+- break description line too long
+- build dependency on gcc is not needed
+
+* Wed Sep 27 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-7.20170118gita77bf99
+- make the changelog more readable
+- stop recreating buildroot, it is made clean already
+
+* Wed Aug 23 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-6.20170118gita77bf99
+- remove unnecessary Requires on make
+- use _sysconfdir macro
+- use name macro when it makes sense
+- remove unnecessary %%doc as the buildsys already populates docdir
+
+* Tue Aug 22 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-5.20170118gita77bf99
+- remove %%clean section, not needed in Fedora
+
+* Tue Aug 22 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-4.20170118gita77bf99
+- don't remove secret file during upgrade
+- start service at the end of post scriptlet
+- improve SELinux rules handling (now requires a running SELinux)
+
+* Tue Aug 22 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-3.20170118gita77bf99
+- Thanks Robert-André Mauchin for the review
+- snapshot is packaged to get this necessary fix: https://github.com/roehling/postsrsd/pull/65
+- fixed version
+- fixed source URL
+- use macros for standard paths and build steps
+- add missing systemd scriptlets
+- specify doc and license files
+- remove unnecessary Requires on base64
+- remove Group information unsupported in Fedora
+
+* Fri Apr 14 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-2
+- create /etc/postsrsd.secret if missing
+- move systemd config into directory for packages
+- move chroot directory into /run
+- autocreate chroot directory
+
+* Thu Mar 30 2017 Marc Dequènes (Duck) <duck@redhat.com> - 1.4-1
+- initial packaging
+
diff --git a/sources b/sources
new file mode 100644
index 0000000..932acaf
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (postsrsd-a77bf9940c19aca602faa41bbf987e43e51a5305.tar.gz) = 307c80091f4ce63675e1d3efbde6c1d5b7da657df9287076775d9ea771d7e79427ca171e489f27113767ef7ebc35cdd2a22d97d3750082902332f1516101c56d
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-04 20:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-04 20:45 [rpms/postsrsd] f44: Initial import (#1471056)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox