From 3c88a98a90e5842c3f0d85c3a42ddb5215d2efc60221321c46b0b8fc1760682e Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 5 Feb 2013 10:34:25 +0000 Subject: [PATCH 1/5] . OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive-filesystem?expand=0&rev=21 --- texlive-filesystem.changes | 6 ++++++ texlive-filesystem.spec | 9 +++++++-- zypplugin.in | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 zypplugin.in diff --git a/texlive-filesystem.changes b/texlive-filesystem.changes index de83e3b..bceb996 100644 --- a/texlive-filesystem.changes +++ b/texlive-filesystem.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 5 09:08:31 UTC 2013 - werner@suse.de + +- Work around missing support of %posttrans scriptlets in libzypp + due missing rpm option for not to execute those scriptlets (bnc#773575) + ------------------------------------------------------------------- Wed Sep 19 09:51:43 UTC 2012 - werner@suse.de diff --git a/texlive-filesystem.spec b/texlive-filesystem.spec index c1eecba..0309da6 100644 --- a/texlive-filesystem.spec +++ b/texlive-filesystem.spec @@ -1,7 +1,7 @@ # # spec file for package texlive-filesystem # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define texlive_version 2012 %define texlive_release 20120611 -%define texlive_noarch 57 +%define texlive_noarch 59 %define texlive_source texlive-20120611-source %define __perl_requires %{nil} @@ -60,6 +60,7 @@ Source16: fc-t1-texlive.conf Source17: fc-truetype-texlive.conf Source30: texlive-filesystem-rpmlintrc Source31: dot.dvipsrc +Source42: zypplugin.in # Download at ftp://ftp.ctan.org/pub/tex/systems/texlive/tlnet/archive/ # from 20120611 Source1000: scheme-basic.tar.xz @@ -4075,6 +4076,7 @@ popd mkdir -p %{buildroot}%{_fontcache}/tfm mkdir -p %{buildroot}%{_appdefdir} mkdir -p %{buildroot}%{_sysconfdir}/permissions.d + mkdir -p %{buildroot}%{_libexecdir}/zypp/plugins mkdir -p %{buildroot}%{_texmfdistdir}/bibtex/bib/IEEEtran mkdir -p %{buildroot}%{_texmfdistdir}/bibtex/bib/abstyles mkdir -p %{buildroot}%{_texmfdistdir}/bibtex/bib/amsrefs @@ -10831,6 +10833,8 @@ popd %{_fontcache}/tfm/ root:%{texgrp} 1775 EOF + sed -r 's@%%{_texmfmaindir}@%{_texmfmaindir}@' < %{S:42} > %{buildroot}%{_libexecdir}/zypp/plugins/texlive.py + # enviroment mkdir -p %{buildroot}%{_sysconfdir}/profile.d install -m 0644 %{S:13} %{buildroot}%{_sysconfdir}/profile.d/ @@ -10966,6 +10970,7 @@ fi %dir %{_texmfmaindir}/xdvi/pixmap %dir %{_texmfmaindir}/texconfig %attr(0755,root,root) %{_texmfmaindir}/texconfig/update +%attr(0755,root,root) %{_libexecdir}/zypp/plugins/texlive.py %dir %{_texmfmaindir}/asymptote %dir %{_texmfmaindir}/asymptote/GUI %dir %{_texmfdistdir} diff --git a/zypplugin.in b/zypplugin.in new file mode 100644 index 0000000..3f00c8f --- /dev/null +++ b/zypplugin.in @@ -0,0 +1,36 @@ +#!/usr/bin/python +# +# /usr/lib/zypp/plugins/commit/texlive.py +# +# The substitute for the %posttrans scriptlets used by rpm. +# Make sure that the update script does its work only once after +# an installation/update transaction as zypper executes rpm for +# each single texlive package. +# +# Copyright (c) 2012 SuSE LINUX Products GmbH, Nuernberg, Germany. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# +# Author: Werner Fink, 2012 +# +from os import listdir, path, access, F_OK,R_OK,X_OK +from subprocess import call +from zypp_plugin import Plugin + +global update, tagdir +update = "%{_texmfmaindir}/texconfig/update" +tagdir = "/var/run/texlive" + +class MyPlugin(Plugin): + + def PLUGINBEGIN(self, headers, body): + self.ack() + + def PLUGINEND(self, headers, body): + if access(update, F_OK|X_OK): + if path.isdir(tagdir) and listdir(tagdir): + call("VERBOSE=false " + update + " 2>&1 || :", shell=True) + self.ack() + +plugin = MyPlugin() +plugin.main() From 41d271b5622fec5567f3b0fa180fbc930e5fea265eb5b1d96dd9e240b1c3937c Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 5 Feb 2013 10:52:11 +0000 Subject: [PATCH 2/5] . OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive-filesystem?expand=0&rev=22 --- texlive-filesystem.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/texlive-filesystem.spec b/texlive-filesystem.spec index 0309da6..d793643 100644 --- a/texlive-filesystem.spec +++ b/texlive-filesystem.spec @@ -18,7 +18,7 @@ %define texlive_version 2012 %define texlive_release 20120611 -%define texlive_noarch 59 +%define texlive_noarch 60 %define texlive_source texlive-20120611-source %define __perl_requires %{nil} @@ -10833,7 +10833,7 @@ popd %{_fontcache}/tfm/ root:%{texgrp} 1775 EOF - sed -r 's@%%{_texmfmaindir}@%{_texmfmaindir}@' < %{S:42} > %{buildroot}%{_libexecdir}/zypp/plugins/texlive.py + sed -r 's@%%\{_texmfmaindir\}@%{_texmfmaindir}@' < %{S:42} > %{buildroot}%{_libexecdir}/zypp/plugins/texlive.py # enviroment mkdir -p %{buildroot}%{_sysconfdir}/profile.d From 3c25605b14dfdbc1b4b0c75ce740d4c6e7772fa4e9c2918f78bac34e22cf988a Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 5 Feb 2013 10:59:01 +0000 Subject: [PATCH 3/5] . OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive-filesystem?expand=0&rev=23 --- texlive-filesystem.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/texlive-filesystem.spec b/texlive-filesystem.spec index d793643..1a2868a 100644 --- a/texlive-filesystem.spec +++ b/texlive-filesystem.spec @@ -49,6 +49,7 @@ Requires(verify): permissions Obsoletes: tetex BuildRequires: ed BuildRequires: fontconfig +BuildRequires: libzypp(plugin:commit) #BuildConflicts: texinfo Source10: rc.config.texlive Source11: update.texlive From ed9b2deb00d7573e6c9832a00eb9392b9110a9ae4bc61160e1170fdf0bb28e43 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 5 Feb 2013 11:02:12 +0000 Subject: [PATCH 4/5] . OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive-filesystem?expand=0&rev=24 --- texlive-filesystem.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/texlive-filesystem.spec b/texlive-filesystem.spec index 1a2868a..b32d705 100644 --- a/texlive-filesystem.spec +++ b/texlive-filesystem.spec @@ -33,6 +33,8 @@ License: GPL-2.0+ and GPL-2.0 and GPL-3.0 and LPPL-1.3c and LPPL-1.0 and Group: Productivity/Publishing/TeX/Base Url: http://www.tug.org/texlive/ Requires: cron +Requires: zypp-plugin-python +Requires: libzypp(plugin:commit) Requires(pre): /usr/bin/getent Requires(pre): /usr/sbin/groupadd Requires(post): %fillup_prereq From 610fb12842d9e84b7283b899a4e4f0392924a33daf06d70bb647dce27336fc4d Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 5 Feb 2013 14:40:33 +0000 Subject: [PATCH 5/5] . OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive-filesystem?expand=0&rev=25 --- texlive-filesystem.spec | 11 ++++------- zypplugin.in | 19 ++++--------------- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/texlive-filesystem.spec b/texlive-filesystem.spec index b32d705..2176960 100644 --- a/texlive-filesystem.spec +++ b/texlive-filesystem.spec @@ -18,7 +18,7 @@ %define texlive_version 2012 %define texlive_release 20120611 -%define texlive_noarch 60 +%define texlive_noarch 61 %define texlive_source texlive-20120611-source %define __perl_requires %{nil} @@ -33,8 +33,7 @@ License: GPL-2.0+ and GPL-2.0 and GPL-3.0 and LPPL-1.3c and LPPL-1.0 and Group: Productivity/Publishing/TeX/Base Url: http://www.tug.org/texlive/ Requires: cron -Requires: zypp-plugin-python -Requires: libzypp(plugin:commit) +Requires: python Requires(pre): /usr/bin/getent Requires(pre): /usr/sbin/groupadd Requires(post): %fillup_prereq @@ -51,7 +50,6 @@ Requires(verify): permissions Obsoletes: tetex BuildRequires: ed BuildRequires: fontconfig -BuildRequires: libzypp(plugin:commit) #BuildConflicts: texinfo Source10: rc.config.texlive Source11: update.texlive @@ -4079,7 +4077,6 @@ popd mkdir -p %{buildroot}%{_fontcache}/tfm mkdir -p %{buildroot}%{_appdefdir} mkdir -p %{buildroot}%{_sysconfdir}/permissions.d - mkdir -p %{buildroot}%{_libexecdir}/zypp/plugins mkdir -p %{buildroot}%{_texmfdistdir}/bibtex/bib/IEEEtran mkdir -p %{buildroot}%{_texmfdistdir}/bibtex/bib/abstyles mkdir -p %{buildroot}%{_texmfdistdir}/bibtex/bib/amsrefs @@ -10836,7 +10833,7 @@ popd %{_fontcache}/tfm/ root:%{texgrp} 1775 EOF - sed -r 's@%%\{_texmfmaindir\}@%{_texmfmaindir}@' < %{S:42} > %{buildroot}%{_libexecdir}/zypp/plugins/texlive.py + sed -r 's@%%\{_texmfmaindir\}@%{_texmfmaindir}@' < %{S:42} > %{buildroot}%{_texmfmaindir}/texconfig/zypper.py # enviroment mkdir -p %{buildroot}%{_sysconfdir}/profile.d @@ -10973,7 +10970,7 @@ fi %dir %{_texmfmaindir}/xdvi/pixmap %dir %{_texmfmaindir}/texconfig %attr(0755,root,root) %{_texmfmaindir}/texconfig/update -%attr(0755,root,root) %{_libexecdir}/zypp/plugins/texlive.py +%attr(0755,root,root) %{_texmfmaindir}/texconfig/zypper.py %dir %{_texmfmaindir}/asymptote %dir %{_texmfmaindir}/asymptote/GUI %dir %{_texmfdistdir} diff --git a/zypplugin.in b/zypplugin.in index 3f00c8f..a3215ea 100644 --- a/zypplugin.in +++ b/zypplugin.in @@ -1,6 +1,6 @@ #!/usr/bin/python # -# /usr/lib/zypp/plugins/commit/texlive.py +# $TEXMFMAIN/texconfig/zypper.py # # The substitute for the %posttrans scriptlets used by rpm. # Make sure that the update script does its work only once after @@ -15,22 +15,11 @@ # from os import listdir, path, access, F_OK,R_OK,X_OK from subprocess import call -from zypp_plugin import Plugin global update, tagdir update = "%{_texmfmaindir}/texconfig/update" tagdir = "/var/run/texlive" -class MyPlugin(Plugin): - - def PLUGINBEGIN(self, headers, body): - self.ack() - - def PLUGINEND(self, headers, body): - if access(update, F_OK|X_OK): - if path.isdir(tagdir) and listdir(tagdir): - call("VERBOSE=false " + update + " 2>&1 || :", shell=True) - self.ack() - -plugin = MyPlugin() -plugin.main() +if access(update, F_OK|X_OK): + if path.isdir(tagdir) and listdir(tagdir): + call("VERBOSE=false " + update + " 2>&1 || :", shell=True)