Mon, 20 Apr 2009 19:22:00 +0200
Change unfortunate but partly useful overreaching security tradeoff.
The principle of allocating each running process an individual system
user and group can have security benefits, however maintining a plethora
of users, groups, processes, file modes, file permissions, and even
nonportable file ACLs on a host serving from a hundred processes has
some security disadvantages. This tradeoff is even worse for systems
like OpenPKG which benefit from administration transparency through the
use of minimal system intrusion and only three usage privilege levels.
michael@60 | 1 | ## |
michael@60 | 2 | ## xmlbasedsrs.spec -- OpenPKG RPM Package Specification |
michael@62 | 3 | ## Copyright (c) 2009 Michael Schloh von Bennewitz <michael@schloh.com> |
michael@60 | 4 | ## |
michael@60 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@60 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@60 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@60 | 8 | ## copies. |
michael@60 | 9 | ## |
michael@60 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@60 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@60 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@60 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@60 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@60 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@60 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@60 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@60 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@60 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@60 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@60 | 21 | ## SUCH DAMAGE. |
michael@60 | 22 | ## |
michael@60 | 23 | |
michael@60 | 24 | # package information |
michael@60 | 25 | Name: xmlbasedsrs |
michael@60 | 26 | Summary: Software requirements specifications (SRS) DTD and tools |
michael@60 | 27 | URL: http://xmlbasedsrs.tigris.org/ |
michael@60 | 28 | Vendor: Tigris |
michael@62 | 29 | Packager: Michael Schloh von Bennewitz |
michael@62 | 30 | Distribution: MSvB Recherche Production |
michael@60 | 31 | Class: EVAL |
michael@60 | 32 | Group: SGML |
michael@60 | 33 | License: GPL |
michael@60 | 34 | Version: 0.1 |
michael@60 | 35 | Release: 20090106 |
michael@60 | 36 | |
michael@60 | 37 | # list of sources |
michael@60 | 38 | Source0: http://xmlbasedsrs.tigris.org/files/documents/673/3179/xmlbasedsrs-%{version}.tar.gz |
michael@60 | 39 | |
michael@60 | 40 | # build information |
michael@60 | 41 | Prefix: %{l_prefix} |
michael@60 | 42 | BuildRoot: %{l_buildroot} |
michael@60 | 43 | BuildPreReq: OpenPKG, openpkg >= 20040130, sgml, libxslt, perl |
michael@60 | 44 | PreReq: OpenPKG, openpkg >= 20040130, sgml, libxslt, perl |
michael@60 | 45 | AutoReq: no |
michael@60 | 46 | AutoReqProv: no |
michael@60 | 47 | |
michael@60 | 48 | %description |
michael@60 | 49 | The goal of xmlbasedsrc is to define the DTD used for Software |
michael@60 | 50 | Requirements Specifications (SRS) and provide useful tools to |
michael@60 | 51 | transform a XML based SRS document to useful formats. This |
michael@60 | 52 | distribution includes basic transformation XSL stylesheets to |
michael@60 | 53 | improve software development through requirements engineering. |
michael@60 | 54 | |
michael@60 | 55 | %track |
michael@60 | 56 | prog xmlbasedsrs = { |
michael@60 | 57 | version = %{version} |
michael@60 | 58 | url = http://xmlbasedsrs.tigris.org/files/documents/673/3179/ |
michael@60 | 59 | regex = xmlbasedsrs-(__VER__)\.tar\.gz |
michael@60 | 60 | } |
michael@60 | 61 | |
michael@60 | 62 | %prep |
michael@60 | 63 | # unpack sources |
michael@60 | 64 | %setup -q -n xmlbasedsrs |
michael@60 | 65 | |
michael@60 | 66 | # create a utility to generate new SRS from template |
michael@60 | 67 | ( echo "#! /bin/sh" |
michael@60 | 68 | echo "mkdir newsrs" |
michael@60 | 69 | echo "( cd newsrs || exit -1" |
michael@60 | 70 | echo " ln -s %{l_prefix}/share/sgml/xmlbasedsrs-xml/dtd/srs.dtd" |
michael@60 | 71 | echo " cp %{l_prefix}/share/sgml/xmlbasedsrs-xml/xml/filesToDiff.xml ." |
michael@60 | 72 | echo " cp %{l_prefix}/share/sgml/xmlbasedsrs-xml/xml/srs.xml ." |
michael@60 | 73 | echo ") || echo 'Failed.'" |
michael@60 | 74 | ) >newsrs_tmpl |
michael@60 | 75 | chmod +x newsrs_tmpl |
michael@60 | 76 | |
michael@60 | 77 | # correct hard coded variable text |
michael@60 | 78 | %{l_shtool} subst \ |
michael@60 | 79 | -e 's;\(xsltproc\);%{l_prefix}/bin/\1;g' \ |
michael@60 | 80 | -e 's;^#!/usr/bin/perl;#! %{l_prefix}/bin/perl;' \ |
michael@60 | 81 | -e 's;$XML_DIR\."/\(filesToDiff\.xml\)";"./\1";' \ |
michael@60 | 82 | -e 's;^\(@XSL_FILES\)\ *=\ *\((.*\)"intro",\ *\(.*\);\1 = \2\3;' \ |
michael@60 | 83 | -e 's;^\(\$SRS_ROOT\)\ *=\ *"/home/lapsystems/Projects/xmlbasedsrs";\1 = "%{l_prefix}/share/sgml/xmlbasedsrs-xml";;' \ |
michael@60 | 84 | bin/gsrs |
michael@60 | 85 | |
michael@60 | 86 | # # lump nonfunctional and functional requirements together |
michael@60 | 87 | # %{l_shtool} subst \ |
michael@60 | 88 | # -e 's;\([Nn]on\)\ \([Ff]unctional\ [Rr]equirements\);(\1)\2;' \ |
michael@60 | 89 | # dtd/srs.dtd \ |
michael@60 | 90 | # xsl/imp_standard.xsl \ |
michael@60 | 91 | # xsl/print.xsl |
michael@60 | 92 | |
michael@60 | 93 | # remove obscured attribution text until correctly implemented |
michael@60 | 94 | %{l_shtool} subst \ |
michael@60 | 95 | -e 's;\ *<a href="http://xmlbasedsrs\.tigris\.org">xmlbasedsrs\.tigris\.org</a>\ *;;' \ |
michael@60 | 96 | xsl/imp_standard.xsl |
michael@60 | 97 | |
michael@60 | 98 | %build |
michael@60 | 99 | |
michael@60 | 100 | %install |
michael@60 | 101 | rm -rf $RPM_BUILD_ROOT |
michael@60 | 102 | |
michael@60 | 103 | # create installation hierarchy |
michael@60 | 104 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@60 | 105 | $RPM_BUILD_ROOT%{l_prefix}/bin \ |
michael@60 | 106 | $RPM_BUILD_ROOT%{l_prefix}/share/sgml/xmlbasedsrs-xml |
michael@60 | 107 | |
michael@60 | 108 | # install xsltproc(1) wrapper |
michael@60 | 109 | %{l_shtool} install -m 755 \ |
michael@60 | 110 | bin/gsrs \ |
michael@60 | 111 | newsrs_tmpl \ |
michael@60 | 112 | $RPM_BUILD_ROOT%{l_prefix}/bin/ |
michael@60 | 113 | |
michael@60 | 114 | # clean sources |
michael@60 | 115 | rmdir bin |
michael@60 | 116 | rm INSTALL |
michael@60 | 117 | |
michael@60 | 118 | # install XML based SRS DTD |
michael@60 | 119 | cp -r * $RPM_BUILD_ROOT%{l_prefix}/share/sgml/xmlbasedsrs-xml/ |
michael@60 | 120 | |
michael@60 | 121 | # determine file list |
michael@60 | 122 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@60 | 123 | %{l_files_std} \ |
michael@60 | 124 | '%not %dir %{l_prefix}/share/sgml' |
michael@60 | 125 | |
michael@60 | 126 | %files -f files |
michael@60 | 127 | |
michael@60 | 128 | %clean |
michael@60 | 129 | rm -rf $RPM_BUILD_ROOT |
michael@60 | 130 | |
michael@60 | 131 | %post |
michael@60 | 132 | # if [ $1 -eq 1 ]; then |
michael@60 | 133 | # $RPM_INSTALL_PREFIX/bin/sgmlcatalog \ |
michael@60 | 134 | # -? compile similar to docbook package |
michael@60 | 135 | # fi |
michael@60 | 136 | |
michael@60 | 137 | %preun |
michael@60 | 138 | # if [ $1 -eq 0 ]; then |
michael@60 | 139 | # $RPM_INSTALL_PREFIX/bin/sgmlcatalog \ |
michael@60 | 140 | # -? compile similar to docbook package |
michael@60 | 141 | # fi |
michael@60 | 142 |