forked from pool/texlive
.
OBS-URL: https://build.opensuse.org/package/show/Publishing:TeXLive/texlive?expand=0&rev=59
This commit is contained in:
parent
b15b6a6259
commit
43052da9b0
8
public.c
8
public.c
@ -35,6 +35,10 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifndef TEXGRP
|
||||
# define TEXGRP "public"
|
||||
#endif
|
||||
|
||||
extern char **environ;
|
||||
|
||||
/*
|
||||
@ -111,7 +115,7 @@ int main(int argc, char *argv[])
|
||||
goto err;
|
||||
}
|
||||
|
||||
if ((grp = getgrnam("public")) == (struct group*)0)
|
||||
if ((grp = getgrnam(TEXGRP)) == (struct group*)0)
|
||||
goto err;
|
||||
|
||||
if (ruid == 0 || euid == 0) { /* If user is root switch over to nobody:public */
|
||||
@ -160,7 +164,7 @@ int main(int argc, char *argv[])
|
||||
setenv(ep->name, ep->value, 1);
|
||||
}
|
||||
|
||||
} else if (rgid != grp->gr_gid || egid != grp->gr_gid) {
|
||||
} else if (rgid != grp->gr_gid && egid == grp->gr_gid) {
|
||||
rgid = grp->gr_gid;
|
||||
|
||||
if (setregid(rgid, grp->gr_gid))
|
||||
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 14 14:14:13 UTC 2012 - werner@suse.de
|
||||
|
||||
- Cron: remove older sources as well as crap
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 14 11:59:48 UTC 2012 - werner@suse.de
|
||||
|
||||
- Avoid warning messages from mktexlsr due empty ls-R
|
||||
- Handle case where public program is not setgid public
|
||||
- Make spec file more flexible and use a rpm macro for a public
|
||||
group which can be named to e.g. public
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 14 11:34:42 UTC 2012 - werner@suse.de
|
||||
|
||||
|
25
texlive.cron
25
texlive.cron
@ -1,8 +1,9 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Remove pk files older than 20 days
|
||||
# Remove pk files older than 20 days
|
||||
# Remove tfm files older than 60 days
|
||||
# Don't remove source files
|
||||
# Remove source files older than 60 days
|
||||
# Remove crap
|
||||
# Call texhash
|
||||
#
|
||||
|
||||
@ -14,15 +15,27 @@ IFS=$OLDIFS
|
||||
|
||||
if test "$CLEAR_TEXMF_FONTS" = "yes" -a -n "$VARTEXFONTS" -a -x /usr/bin/safe-rm ; then
|
||||
for p in $VARTEXFONTS ; do
|
||||
test -d $p/pk/ && find $p/pk/ -type f -and -atime +20 -print0
|
||||
test -d $p/tfm/ && find $p/tfm/ -type f -and -atime +60 -print0
|
||||
done > >(exec -a xargs xargs -r -l100 -0 -- /usr/bin/safe-rm)
|
||||
test -d $p/pk/ && find $p/pk/ -type f -and -atime +20 -print0
|
||||
test -d $p/tfm/ && find $p/tfm/ -type f -and -atime +60 -print0
|
||||
test -d $p/source/ && find $p/source/ -type f -and -atime +60 -print0
|
||||
done > >(exec -a xargs xargs -r -L100 -0 -- /usr/bin/safe-rm)
|
||||
fi
|
||||
if test -n "$VARTEXFONTS" -a -x /usr/bin/safe-rmdir ; then
|
||||
for p in $VARTEXFONTS ; do
|
||||
test -d $p/pk/ && find $p/pk/ -type f -and -not -name '*.*pk'
|
||||
test -d $p/tfm/ && find $p/tfm/ -type f -and -not -name '*.tfm'
|
||||
test -d $p/source/ && find $p/source/ -type f -and -not -name '*.mf'
|
||||
test -d $p/ && find $p/ -type f -and -path '*/[^[:alnum:]]*'
|
||||
done > >(exec -a xargs xargs -r -L100 -0 -- /usr/bin/safe-rm)
|
||||
for p in $VARTEXFONTS ; do
|
||||
test -d $p/ && find $p/ -depth -type d -and -path '*/[^[:alnum:]]*'
|
||||
done > >(exec -a xargs xargs -r -L100 -0 -- /usr/bin/safe-rmdir)
|
||||
fi
|
||||
|
||||
#
|
||||
# Update the ls-R's
|
||||
#
|
||||
texhash > /dev/null
|
||||
mktexlsr > /dev/null
|
||||
|
||||
#
|
||||
exit 0
|
||||
|
124
texlive.spec
124
texlive.spec
@ -17,7 +17,7 @@
|
||||
|
||||
%define texlive_version 2012
|
||||
%define texlive_release 20120416
|
||||
%define texlive_noarch 10
|
||||
%define texlive_noarch 11
|
||||
%define texlive_source texlive-20120416-source
|
||||
|
||||
%define __perl_requires %{nil}
|
||||
@ -242,6 +242,9 @@ Prefix: %{_bindir}
|
||||
%define _x11inc %{_includedir}
|
||||
%define _appdefdir %{_x11data}/app-defaults
|
||||
#
|
||||
%define texgrp public
|
||||
#%define texgid 505
|
||||
#
|
||||
%description
|
||||
After installing texlive and the package texlive-latex, find a large
|
||||
selection of documentation for TeX, LaTeX, and various layout styles in
|
||||
@ -276,6 +279,8 @@ Summary: Basic system layout for TeX Live
|
||||
Group: Productivity/Publishing/TeX/Base
|
||||
Url: http://www.tug.org/texlive/
|
||||
Requires(verify): permissions
|
||||
Requires(pre): /usr/bin/getent
|
||||
Requires(pre): /usr/sbin/groupadd
|
||||
Requires(post): permissions
|
||||
BuildArch: noarch
|
||||
|
||||
@ -5788,9 +5793,9 @@ TeX by ASCII Co.) and its surrounding tools.
|
||||
# Sanity check for system icu libraries and headers
|
||||
# Remark: official libicu is _not_ compatible with libicu of XeTeX
|
||||
if test -s /usr/include/layout/GlyphPositioningTables.h -a \
|
||||
-s /usr/include/layout/Features.h -a \
|
||||
-s /usr/include/common/cmemory.h \
|
||||
&& false
|
||||
-s /usr/include/layout/Features.h -a \
|
||||
-s /usr/include/common/cmemory.h \
|
||||
&& false
|
||||
then
|
||||
icu[0]='--with-system-icu'
|
||||
icu[1]='--with-icu-include=/usr/include/unicode -I/usr/include/layout -I/usr/include/common'
|
||||
@ -5938,8 +5943,8 @@ TeX by ASCII Co.) and its surrounding tools.
|
||||
popd
|
||||
|
||||
# compile public
|
||||
mkdir -p ${prefix}/lib/public
|
||||
$CC ${RPM_OPT_FLAGS} -fPIE -pie -o ${prefix}/lib/public/public %{S:50}
|
||||
mkdir -p ${prefix}/lib/mktex
|
||||
$CC ${RPM_OPT_FLAGS} -DTEXGRP='"%{texgrp}"' -fPIE -pie -o ${prefix}/lib/mktex/public %{S:50}
|
||||
|
||||
%install
|
||||
|
||||
@ -5950,7 +5955,7 @@ TeX by ASCII Co.) and its surrounding tools.
|
||||
mkdir -p %{buildroot}%{_libdir}
|
||||
mkdir -p %{buildroot}%{_includedir}
|
||||
mkdir -p %{buildroot}%{_infodir}
|
||||
mkdir -p %{buildroot}%{_libexecdir}/public
|
||||
mkdir -p %{buildroot}%{_libexecdir}/mktex
|
||||
mkdir -p %{buildroot}%{_mandir}
|
||||
mkdir -p %{buildroot}%{_mandir}/man1
|
||||
mkdir -p %{buildroot}%{_mandir}/man5
|
||||
@ -12609,7 +12614,7 @@ TeX by ASCII Co.) and its surrounding tools.
|
||||
popd
|
||||
pushd ${prefix}/lib/
|
||||
tar -cspSf - *.so* | tar -xvspSf - -C %{buildroot}%{_libdir}/
|
||||
tar -cspSf - public | tar -xvspSf - -C %{buildroot}%{_libexecdir}/
|
||||
tar -cspSf - mktex | tar -xvspSf - -C %{buildroot}%{_libexecdir}/
|
||||
popd
|
||||
pushd ${prefix}/include/
|
||||
tar -cspSf - . | tar -xvspSf - -C %{buildroot}%{_includedir}/
|
||||
@ -12699,25 +12704,35 @@ TeX by ASCII Co.) and its surrounding tools.
|
||||
|
||||
# clear out all file below texmf tree as this will delivered by texlive tar balls
|
||||
find %{buildroot}%{_texmfdirs} -type f | xargs -r rm -vf
|
||||
|
||||
|
||||
# the ls-R file (empty at package time)
|
||||
> %{buildroot}%{_texmfconfdir}/ls-R
|
||||
> %{buildroot}%{_fontcache}/ls-R
|
||||
> %{buildroot}%{_texmfvardir}/ls-R
|
||||
> %{buildroot}%{_texmfvardir}/dist/ls-R
|
||||
> %{buildroot}%{_texmfvardir}/main/ls-R
|
||||
for dir in %{_texmfconfdir} \
|
||||
%{_fontcache} \
|
||||
%{_texmfvardir} \
|
||||
%{_texmfvardir}/dist \
|
||||
%{_texmfvardir}/main
|
||||
do
|
||||
echo '%% ls-R -- filename database for kpathsea; do not change this line.' > \
|
||||
%{buildroot}${dir}/ls-R
|
||||
done
|
||||
ln -sf %{_texmfvardir}/dist/ls-R %{buildroot}%{_texmfdistdir}/
|
||||
ln -sf %{_texmfvardir}/main/ls-R %{buildroot}%{_texmfmaindir}/
|
||||
pushd %{buildroot}%{_texmfdistdir}/
|
||||
ls -RLA ./ 2>/dev/null >> %{buildroot}%{_texmfvardir}/dist/ls-R || true
|
||||
popd
|
||||
pushd %{buildroot}%{_texmfmaindir}/
|
||||
ls -RLA ./ 2>/dev/null >> %{buildroot}%{_texmfvardir}/main/ls-R || true
|
||||
popd
|
||||
|
||||
# the permission files, any change is also required within do.mklists
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/permissions.d
|
||||
(cat > %{buildroot}%{_sysconfdir}/permissions.d/texlive) <<-EOF
|
||||
%{_libexecdir}/public/public root:public 2755
|
||||
%{_texmfconfdir}/ls-R root:public 0664
|
||||
%{_texmfvardir}/ls-R root:public 0664
|
||||
%{_texmfvardir}/dist/ls-r root:public 0664
|
||||
%{_texmfvardir}/main/ls-r root:public 0664
|
||||
%{_fontcache}/ls-r root:public 0664
|
||||
(cat > %{buildroot}%{_sysconfdir}/permissions.d/texlive.texmf) <<-EOF
|
||||
%{_libexecdir}/mktex/public root:%{texgrp} 2755
|
||||
%{_texmfconfdir}/ls-R root:%{texgrp} 0664
|
||||
%{_texmfvardir}/ls-R root:%{texgrp} 0664
|
||||
%{_texmfvardir}/dist/ls-r root:%{texgrp} 0664
|
||||
%{_texmfvardir}/main/ls-r root:%{texgrp} 0664
|
||||
%{_fontcache}/ls-r root:%{texgrp} 0664
|
||||
%{_texmfvardir}/ root:root 1755
|
||||
%{_texmfvardir}/dist/ root:root 1755
|
||||
%{_texmfvardir}/main/ root:root 1755
|
||||
@ -12726,18 +12741,18 @@ TeX by ASCII Co.) and its surrounding tools.
|
||||
%{_texmfvardir}/fonts/dvips/ root:root 1755
|
||||
%{_texmfvardir}/fonts/pdftex/ root:root 1755
|
||||
%{_texmfcache}/ root:root 1755
|
||||
%{_fontcache}/ root:public 1775
|
||||
%{_fontcache}/pk/ root:public 1775
|
||||
%{_fontcache}/source/ root:public 1775
|
||||
%{_fontcache}/tfm/ root:public 1775
|
||||
%{_fontcache}/ root:%{texgrp} 1775
|
||||
%{_fontcache}/pk/ root:%{texgrp} 1775
|
||||
%{_fontcache}/source/ root:%{texgrp} 1775
|
||||
%{_fontcache}/tfm/ root:%{texgrp} 1775
|
||||
EOF
|
||||
(cat > %{buildroot}%{_sysconfdir}/permissions.d/texlive.paranoid) <<-EOF
|
||||
%{_libexecdir}/public/public root:public 0755
|
||||
%{_texmfconfdir}/ls-R root:public 0644
|
||||
%{_texmfvardir}/ls-r root:public 0644
|
||||
%{_texmfvardir}/dist/ls-r root:public 0644
|
||||
%{_texmfvardir}/main/ls-r root:public 0644
|
||||
%{_fontcache}/ls-r root:public 0644
|
||||
(cat > %{buildroot}%{_sysconfdir}/permissions.d/texlive) <<-EOF
|
||||
%{_libexecdir}/mktex/public root:%{texgrp} 0755
|
||||
%{_texmfconfdir}/ls-R root:%{texgrp} 0644
|
||||
%{_texmfvardir}/ls-r root:%{texgrp} 0644
|
||||
%{_texmfvardir}/dist/ls-r root:%{texgrp} 0644
|
||||
%{_texmfvardir}/main/ls-r root:%{texgrp} 0644
|
||||
%{_fontcache}/ls-r root:%{texgrp} 0644
|
||||
%{_texmfvardir}/ root:root 1755
|
||||
%{_texmfvardir}/dist/ root:root 1755
|
||||
%{_texmfvardir}/main/ root:root 1755
|
||||
@ -12746,10 +12761,10 @@ TeX by ASCII Co.) and its surrounding tools.
|
||||
%{_texmfvardir}/fonts/dvips/ root:root 1755
|
||||
%{_texmfvardir}/fonts/pdftex/ root:root 1755
|
||||
%{_texmfcache}/ root:root 1755
|
||||
%{_fontcache}/ root:public 1755
|
||||
%{_fontcache}/pk/ root:public 1755
|
||||
%{_fontcache}/source/ root:public 1755
|
||||
%{_fontcache}/tfm/ root:public 1755
|
||||
%{_fontcache}/ root:%{texgrp} 1755
|
||||
%{_fontcache}/pk/ root:%{texgrp} 1755
|
||||
%{_fontcache}/source/ root:%{texgrp} 1755
|
||||
%{_fontcache}/tfm/ root:%{texgrp} 1755
|
||||
EOF
|
||||
while read path rest ; do
|
||||
echo $path
|
||||
@ -12797,13 +12812,13 @@ TeX by ASCII Co.) and its surrounding tools.
|
||||
# relink texlive helpers to public binary
|
||||
for mktex in texhash mktexlsr mktexmf mktexpk mktextfm
|
||||
do
|
||||
mv -f %{buildroot}%{_bindir}/$mktex %{buildroot}%{_libexecdir}/public/
|
||||
ln -sf %{_libexecdir}/public/public %{buildroot}%{_bindir}/$mktex
|
||||
mv -f %{buildroot}%{_bindir}/$mktex %{buildroot}%{_libexecdir}/mktex/
|
||||
ln -sf %{_libexecdir}/mktex/public %{buildroot}%{_bindir}/$mktex
|
||||
done
|
||||
|
||||
%if %{defined verify_permissions}
|
||||
%verifyscript
|
||||
%verify_permissions -e %{_libexecdir}/public/public
|
||||
%verify_permissions -e %{_libexecdir}/mktex/public
|
||||
|
||||
%verifyscript filesystem
|
||||
%verify_permissions -e %{_texmfconfdir}/ls-R
|
||||
@ -12827,7 +12842,7 @@ TeX by ASCII Co.) and its surrounding tools.
|
||||
%endif
|
||||
|
||||
%post
|
||||
%set_permissions %{_libexecdir}/public/public
|
||||
%set_permissions %{_libexecdir}/mktex/public
|
||||
%fillup_only -n texlive
|
||||
mkdir -p /var/run/texlive
|
||||
> /var/run/texlive/run-mktexlsr
|
||||
@ -12835,6 +12850,11 @@ mkdir -p /var/run/texlive
|
||||
%posttrans
|
||||
%{_texmfmaindir}/texconfig/update
|
||||
|
||||
%pre filesystem
|
||||
if test "$1" = 1 -a -z $(%{_bindir}/getent group %{texgrp} 2>/dev/null); then
|
||||
%{_sbindir}/groupadd -r %{?texgid:-g %texgid} %{texgrp}
|
||||
fi
|
||||
|
||||
%post filesystem
|
||||
%fillup_only -n texlive
|
||||
%set_permissions %{_texmfconfdir}/ls-R
|
||||
@ -12864,7 +12884,7 @@ mkdir -p /var/run/texlive
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,755)
|
||||
%attr(2755,root,public) %{_libexecdir}/public/public
|
||||
%attr(2755,root,%{texgrp}) %{_libexecdir}/mktex/public
|
||||
%config %{_sysconfdir}/cron.daily/suse-texlive
|
||||
%config %{_sysconfdir}/permissions.d/texlive*
|
||||
%config %{_sysconfdir}/profile.d/texlive*
|
||||
@ -12882,7 +12902,7 @@ mkdir -p /var/run/texlive
|
||||
|
||||
%files filesystem
|
||||
%defattr(-,root,root,755)
|
||||
%dir %{_libexecdir}/public
|
||||
%dir %{_libexecdir}/mktex
|
||||
%dir %{_texmfconfdir}
|
||||
%dir %{_texmfconfdir}/dvipdfm
|
||||
%dir %{_texmfconfdir}/dvipdfm/config
|
||||
@ -20037,19 +20057,19 @@ mkdir -p /var/run/texlive
|
||||
%dir %attr(1755,root,root) %{_texmfvardir}/fonts/dvips
|
||||
%dir %attr(1755,root,root) %{_texmfvardir}/fonts/pdftex
|
||||
%dir %attr(1755,root,root) %{_texmfcache}
|
||||
%dir %attr(1775,root,public) %{_fontcache}
|
||||
%dir %attr(1775,root,public) %{_fontcache}/pk
|
||||
%dir %attr(1775,root,public) %{_fontcache}/source
|
||||
%dir %attr(1775,root,public) %{_fontcache}/tfm
|
||||
%dir %attr(1755,root,%{texgrp}) %verify(not mode) %{_fontcache}
|
||||
%dir %attr(1755,root,%{texgrp}) %verify(not mode) %{_fontcache}/pk
|
||||
%dir %attr(1755,root,%{texgrp}) %verify(not mode) %{_fontcache}/source
|
||||
%dir %attr(1755,root,%{texgrp}) %verify(not mode) %{_fontcache}/tfm
|
||||
%dir %{_texmfvardir}/md5
|
||||
%config %{_texmfconfdir}/permlist
|
||||
%verify(link) %{_texmfmaindir}/ls-R
|
||||
%verify(link) %{_texmfdistdir}/ls-R
|
||||
%attr(0664,root,public) %verify(not md5 size mtime) %{_texmfconfdir}/ls-R
|
||||
%attr(0664,root,public) %verify(not md5 size mtime) %{_fontcache}/ls-R
|
||||
%attr(0664,root,public) %verify(not md5 size mtime) %{_texmfvardir}/ls-R
|
||||
%attr(0664,root,public) %verify(not md5 size mtime) %{_texmfvardir}/dist/ls-R
|
||||
%attr(0664,root,public) %verify(not md5 size mtime) %{_texmfvardir}/main/ls-R
|
||||
%attr(0664,root,%{texgrp}) %verify(not md5 size mtime) %{_texmfconfdir}/ls-R
|
||||
%attr(0664,root,%{texgrp}) %verify(not md5 size mtime) %{_fontcache}/ls-R
|
||||
%attr(0664,root,%{texgrp}) %verify(not md5 size mtime) %{_texmfvardir}/ls-R
|
||||
%attr(0664,root,%{texgrp}) %verify(not md5 size mtime) %{_texmfvardir}/dist/ls-R
|
||||
%attr(0664,root,%{texgrp}) %verify(not md5 size mtime) %{_texmfvardir}/main/ls-R
|
||||
|
||||
|
||||
%files scheme-basic
|
||||
@ -20626,7 +20646,7 @@ mkdir -p /var/run/texlive
|
||||
%{_bindir}/mktexpk
|
||||
%{_bindir}/mktextfm
|
||||
%{_bindir}/texhash
|
||||
%{_libexecdir}/public/*tex*
|
||||
%{_libexecdir}/mktex/*tex*
|
||||
|
||||
%files lacheck-bin
|
||||
%defattr(-,root,root,755)
|
||||
|
Loading…
Reference in New Issue
Block a user