From: Petr Lautrbach <plautrba@redhat.com>
To: selinux@vger.kernel.org
Cc: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
Subject: Re: [PATCH] python/sepolicy: allow to override manpage date
Date: Fri, 13 Nov 2020 13:15:17 +0100 [thread overview]
Message-ID: <878sb5pi5m.fsf@redhat.com> (raw)
In-Reply-To: <20201030215309.23606-1-bwiedemann@suse.de>
"Bernhard M. Wiedemann" <bwiedemann@suse.de> writes:
> in order to make builds reproducible.
> See https://reproducible-builds.org/ for why this is good
> and https://reproducible-builds.org/specs/source-date-epoch/
> for the definition of this variable.
>
> This patch was done while working on reproducible builds for openSUSE.
>
> Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Acked-by: Petr Lautrbach <plautrba@redhat.com>
And merged. Thank you!
> ---
> python/sepolicy/sepolicy/manpage.py | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/python/sepolicy/sepolicy/manpage.py b/python/sepolicy/sepolicy/manpage.py
> index 3e8a3be9..2f847abb 100755
> --- a/python/sepolicy/sepolicy/manpage.py
> +++ b/python/sepolicy/sepolicy/manpage.py
> @@ -39,6 +39,8 @@ typealias_types = {
> equiv_dict = {"smbd": ["samba"], "httpd": ["apache"], "virtd": ["virt", "libvirt"], "named": ["bind"], "fsdaemon": ["smartmon"], "mdadm": ["raid"]}
>
> equiv_dirs = ["/var"]
> +man_date = time.strftime("%y-%m-%d", time.gmtime(
> + int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))))
> modules_dict = None
>
>
> @@ -569,7 +571,7 @@ class ManPage:
>
> def _typealias(self,typealias):
> self.fd.write('.TH "%(typealias)s_selinux" "8" "%(date)s" "%(typealias)s" "SELinux Policy %(typealias)s"'
> - % {'typealias':typealias, 'date': time.strftime("%y-%m-%d")})
> + % {'typealias':typealias, 'date': man_date})
> self.fd.write(r"""
> .SH "NAME"
> %(typealias)s_selinux \- Security Enhanced Linux Policy for the %(typealias)s processes
> @@ -588,7 +590,7 @@ man page for more details.
>
> def _header(self):
> self.fd.write('.TH "%(domainname)s_selinux" "8" "%(date)s" "%(domainname)s" "SELinux Policy %(domainname)s"'
> - % {'domainname': self.domainname, 'date': time.strftime("%y-%m-%d")})
> + % {'domainname': self.domainname, 'date': man_date})
> self.fd.write(r"""
> .SH "NAME"
> %(domainname)s_selinux \- Security Enhanced Linux Policy for the %(domainname)s processes
> --
> 2.26.2
prev parent reply other threads:[~2020-11-13 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 21:53 [PATCH] python/sepolicy: allow to override manpage date Bernhard M. Wiedemann
2020-11-13 12:15 ` Petr Lautrbach [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878sb5pi5m.fsf@redhat.com \
--to=plautrba@redhat.com \
--cc=bwiedemann@suse.de \
--cc=selinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox