From b41cff195605b29af23d2ad62a60ddc5a2d89786 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Mon, 19 Nov 2018 11:02:06 +0100 Subject: [PATCH] use itstool instead of xml2po --- shadow-4.6-use-itstool.patch | 31 +++++++++++++++++++++++++++++++ shadow-utils.spec | 16 +++++++++++----- 2 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 shadow-4.6-use-itstool.patch diff --git a/shadow-4.6-use-itstool.patch b/shadow-4.6-use-itstool.patch new file mode 100644 index 0000000..760b5b3 --- /dev/null +++ b/shadow-4.6-use-itstool.patch @@ -0,0 +1,31 @@ +diff -up shadow-4.6/man/generate_translations.mak.use-itstool shadow-4.6/man/generate_translations.mak +--- shadow-4.6/man/generate_translations.mak.use-itstool 2018-04-29 18:42:37.000000000 +0200 ++++ shadow-4.6/man/generate_translations.mak 2018-07-31 16:42:21.623990969 +0200 +@@ -5,8 +5,19 @@ config.xml: ../config.xml.in + $(MAKE) -C .. config.xml + cp ../config.xml $@ + +-%.xml: ../%.xml ../po/$(LANG).po +- xml2po --expand-all-entities -l $(LANG) -p ../po/$(LANG).po -o $@ ../$@ ++messages.mo: ../po/$(LANG).po ++ msgfmt ../po/$(LANG).po -o messages.mo ++ ++login.defs.d: ++ ln -sf ../login.defs.d login.defs.d ++ ++%.xml: ../%.xml messages.mo login.defs.d ++ if grep -q SHADOW-CONFIG-HERE $< ; then \ ++ sed -e 's/^/%config;/' $< > $@; \ ++ else \ ++ sed -e 's/^\(/\1 [%config;]>/' $< > $@; \ ++ fi ++ itstool -d -l $(LANG) -m messages.mo -o . $@ + sed -i 's:\(^:\1 lang="$(LANG)">:' $@ + + include ../generate_mans.mak +@@ -16,4 +27,4 @@ $(man_MANS): + @echo you need to run configure with --enable-man to generate man pages + endif + +-CLEANFILES = .xml2po.mo $(EXTRA_DIST) $(addsuffix .xml,$(EXTRA_DIST)) config.xml ++CLEANFILES = messages.mo login.defs.d $(EXTRA_DIST) $(addsuffix .xml,$(EXTRA_DIST)) config.xml diff --git a/shadow-utils.spec b/shadow-utils.spec index 223aaaf..5ce8b47 100644 --- a/shadow-utils.spec +++ b/shadow-utils.spec @@ -31,8 +31,9 @@ Patch32: shadow-4.5-crypt_h.patch Patch33: shadow-4.5-long-entry.patch Patch34: shadow-4.6-usermod-crash.patch Patch35: shadow-4.6-coverity.patch -Patch36: shadow-4.6-sssd-flush.patch -Patch37: shadow-4.6-sysugid-min-limit.patch +Patch36: shadow-4.6-use-itstool.patch +Patch37: shadow-4.6-sssd-flush.patch +Patch38: shadow-4.6-sysugid-min-limit.patch License: BSD and GPLv2+ Group: System Environment/Base @@ -41,8 +42,9 @@ BuildRequires: libselinux-devel >= 1.25.2-1 BuildRequires: audit-libs-devel >= 1.6.5 BuildRequires: libsemanage-devel BuildRequires: libacl-devel, libattr-devel -BuildRequires: bison, flex, gnome-doc-utils, docbook-style-xsl, docbook-dtds +BuildRequires: bison, flex, docbook-style-xsl, docbook-dtds BuildRequires: autoconf, automake, libtool, gettext-devel +BuildRequires: /usr/bin/xsltproc, /usr/bin/itstool Requires: libselinux >= 1.25.2-1 Requires: audit-libs >= 1.6.5 Requires: setup @@ -85,8 +87,9 @@ are used for managing group accounts. %patch33 -p1 -b .long-entry %patch34 -p1 -b .usermod-crash %patch35 -p1 -b .coverity -%patch36 -p1 -b .sssd-flush -%patch37 -p1 -b .sysugid-min-limit +%patch36 -p1 -b .use-itstool +%patch37 -p1 -b .sssd-flush +%patch38 -p1 -b .sysugid-min-limit iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8 cp -f doc/HOWTO.utf8 doc/HOWTO @@ -238,6 +241,9 @@ done %{_mandir}/man8/vigr.8* %changelog +* Mon Nov 19 2018 Tomáš Mráz - 2:4.6-5 +- use itstool instead of xml2po + * Tue Nov 6 2018 Tomáš Mráz - 2:4.6-4 - use cap_setxid file capabilities for newxidmap instead of making them setuid - limit the SYS_U/GID_MIN value to 1 as the algorithm does not work with 0