Changeset df42c7c for LFS/lfs.xsl
- Timestamp:
- 07/21/2016 04:43:35 PM (8 years ago)
- Branches:
- new_features
- Children:
- e234d23
- Parents:
- 33ff403
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LFS/lfs.xsl
r33ff403 rdf42c7c 15 15 y = yes, add PKG_DEST to scripts in install commands of chapter06-08 16 16 --> 17 <xsl:param name="pkgmngt" select="n"/> 17 <xsl:param name="pkgmngt" select="'n'"/> 18 19 <!-- Package management with "porg style" ? 20 n = no, same as pkgmngt description above 21 y = yes, wrap install commands of chapter06-08 into a bash function. 22 note that pkgmngt must be 'y' in this case 23 --> 24 <xsl:param name="wrap-install" select='"n"'/> 18 25 19 26 <!-- Run test suites? … … 29 36 y = yes, bomb at the first test suite failure to can review the build dir 30 37 --> 31 <xsl:param name="bomb-testsuite" select=" n"/>38 <xsl:param name="bomb-testsuite" select="'n'"/> 32 39 33 40 <!-- Install vim-lang package? OBSOLETE should always be 'n'--> 34 <xsl:param name="vim-lang" select=" n"/>41 <xsl:param name="vim-lang" select="'n'"/> 35 42 36 43 <!-- Time zone --> 37 <xsl:param name="timezone" select=" GMT"/>44 <xsl:param name="timezone" select="'GMT'"/> 38 45 39 46 <!-- Page size --> 40 <xsl:param name="page" select=" letter"/>47 <xsl:param name="page" select="'letter'"/> 41 48 42 49 <!-- Locale settings --> 43 <xsl:param name="lang" select=" C"/>50 <xsl:param name="lang" select="'C'"/> 44 51 45 52 <!-- Install the whole set of locales --> 46 <xsl:param name='full-locale' select=' n'/>53 <xsl:param name='full-locale' select='"n"'/> 47 54 48 55 <!-- Hostname --> … … 51 58 <!-- Network parameters: interface, ip, gateway, prefix, broadcast, domain 52 59 and nameservers --> 53 <xsl:param name='interface' select= 'eth0'/>60 <xsl:param name='interface' select="'eth0'"/> 54 61 <xsl:param name='ip' select='"10.0.2.9"'/> 55 62 <xsl:param name='gateway' select='"10.0.2.2"'/> … … 181 188 @role != 'nodump']/userinput[ 182 189 @remap='install']"> 183 <xsl:text>mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin} 190 <xsl:choose> 191 <xsl:when test="$wrap-install='y'"> 192 <xsl:text>wrapInstall ' 193 </xsl:text> 194 </xsl:when> 195 <xsl:otherwise> 196 <xsl:text>mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin} 184 197 mkdir -pv $PKG_DEST/usr/{lib,bin,sbin,include} 185 198 mkdir -pv $PKG_DEST/usr/share/{doc,info,man} … … 190 203 esac 191 204 </xsl:text> 205 </xsl:otherwise> 206 </xsl:choose> 192 207 </xsl:if> 193 208 <xsl:if test="../@id = 'ch-system-glibc' and 194 209 @role='installation' and 195 $pkgmngt = 'y'"> 210 $pkgmngt = 'y' and 211 $wrap-install = 'n'"> 196 212 <xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc} 197 213 </xsl:text> … … 205 221 @role != 'nodump']/userinput[ 206 222 @remap='install']"> 207 <xsl:if test="../@id = 'ch-system-man-pages'"> 223 <xsl:choose> 224 <xsl:when test="$wrap-install='y'"> 225 <xsl:if test="../@id = 'ch-system-man-pages'"> 208 226 <!-- these files are provided by the shadow package --> 209 <xsl:text>rm -fv $PKG_DEST/usr/share/man/{man3/getspnam.3,man5/passwd.5}210 </xsl:text> 211 </xsl:if>227 <xsl:text>rm -fv /usr/share/man/{man3/getspnam.3,man5/passwd.5} 228 </xsl:text> 229 </xsl:if> 212 230 <!-- Attr man/man2 pages are already installed by man-pages. As of 213 231 March 2013, they are the same pages. 214 232 November 2015: now they are more accurate 215 233 in man-pages, and the man5 section is also in man-pages... --> 216 <xsl:if test="../@id = 'ch-system-attr'"> 217 <xsl:text>rm -fv $PKG_DEST/usr/share/man/man2/* 234 <xsl:if test="../@id = 'ch-system-attr'"> 235 <xsl:text>rm -fv /usr/share/man/man2/* 236 rm -fv /usr/share/man/man5/* 237 </xsl:text> 238 </xsl:if> 239 <!-- nologin is installed by util-linux. remove it from shadow --> 240 <xsl:if test="../@id = 'ch-system-shadow'"> 241 <xsl:text>rm -fv /usr/share/man/man8/nologin.8 242 rm -fv /sbin/nologin 243 </xsl:text> 244 </xsl:if> 245 <xsl:text>' 246 packInstall 247 </xsl:text> 248 </xsl:when> 249 <xsl:otherwise> 250 <xsl:if test="../@id = 'ch-system-man-pages'"> 251 <!-- these files are provided by the shadow package --> 252 <xsl:text>rm -fv $PKG_DEST/usr/share/man/{man3/getspnam.3,man5/passwd.5} 253 </xsl:text> 254 </xsl:if> 255 <!-- Attr man/man2 pages are already installed by man-pages. As of 256 March 2013, they are the same pages. 257 November 2015: now they are more accurate 258 in man-pages, and the man5 section is also in man-pages... --> 259 <xsl:if test="../@id = 'ch-system-attr'"> 260 <xsl:text>rm -fv $PKG_DEST/usr/share/man/man2/* 218 261 rm -fv $PKG_DEST/usr/share/man/man5/* 219 262 </xsl:text> 220 </xsl:if>263 </xsl:if> 221 264 <!-- nologin is installed by util-linux. remove it from shadow --> 222 <xsl:if test="../@id = 'ch-system-shadow'">223 <xsl:text>rm -fv $PKG_DEST/usr/share/man/man8/nologin.8265 <xsl:if test="../@id = 'ch-system-shadow'"> 266 <xsl:text>rm -fv $PKG_DEST/usr/share/man/man8/nologin.8 224 267 rm -fv $PKG_DEST/sbin/nologin 225 268 </xsl:text> 226 </xsl:if>227 <xsl:text>rm -fv $PKG_DEST/{,usr/}lib64269 </xsl:if> 270 <xsl:text>rm -fv $PKG_DEST/{,usr/}lib64 228 271 rm -fv $PKG_DEST/usr/{man,doc,info} 229 272 for dir in $PKG_DEST/usr/share/man/man{1..8}; do … … 242 285 rm -rf $PKG_DEST 243 286 </xsl:text> 287 </xsl:otherwise> 288 </xsl:choose> 244 289 </xsl:if> 245 290 <xsl:if test="$testsuite='3' and … … 310 355 <xsl:if test="$dirname = 'chapter06'"> 311 356 <xsl:text>packInstall 312 rm -rf $PKG_DEST357 rm -rf "$PKG_DEST" 313 358 </xsl:text> 314 359 </xsl:if> … … 453 498 </xsl:choose> 454 499 </xsl:when> 455 <xsl:otherwise><!--pkgmngt = 'y'--> 500 <xsl:when test="$wrap-install='y'"> 501 <xsl:choose> 502 <xsl:when test="./literal"> 503 <xsl:call-template name="output-wrap"> 504 <xsl:with-param name="commands" select="text()[1]"/> 505 </xsl:call-template> 506 <xsl:apply-templates select="literal"/> 507 <xsl:call-template name="output-wrap"> 508 <xsl:with-param name="commands" select="text()[2]"/> 509 </xsl:call-template> 510 </xsl:when> 511 <xsl:otherwise> 512 <xsl:call-template name="output-wrap"> 513 <xsl:with-param name="commands" select="string()"/> 514 </xsl:call-template> 515 </xsl:otherwise> 516 </xsl:choose> 517 <xsl:text>
</xsl:text> 518 </xsl:when> 519 <xsl:otherwise><!--pkgmngt = 'y' and wrap-install='n'--> 456 520 <xsl:choose> 457 521 <xsl:when test="./literal"> … … 477 541 <xsl:when test="contains(string(),'tzdata') and $pkgmngt='y'"> 478 542 <xsl:text> 479 OLD_PKG_DEST= $PKG_DEST543 OLD_PKG_DEST="$PKG_DEST" 480 544 OLD_PKGDIR=$PKGDIR 481 545 PKG_DEST=$(dirname $OLD_PKG_DEST)/001-tzdata … … 486 550 <xsl:text> 487 551 </xsl:text> 488 <xsl:copy-of select="substring-before(string(),'ZONEINFO=')"/> 489 <xsl:text>ZONEINFO=$PKG_DEST</xsl:text> 490 <xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/> 491 <xsl:text> 552 <xsl:choose> 553 <xsl:when test="$wrap-install='n'"> 554 <xsl:copy-of select="substring-before(string(),'ZONEINFO=')"/> 555 <xsl:text>ZONEINFO=$PKG_DEST</xsl:text> 556 <xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/> 557 <xsl:text> 492 558 packInstall 493 559 rm -rf $PKG_DEST 560 </xsl:text> 561 </xsl:when> 562 <xsl:otherwise><!-- wrap-install='y' --> 563 <xsl:copy-of select="substring-before(string(),'ZONEINFO=')"/> 564 <xsl:text> 565 wrapInstall ' 566 ZONEINFO=</xsl:text> 567 <xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/> 568 <xsl:text>' 569 packInstall 570 </xsl:text> 571 </xsl:otherwise> 572 </xsl:choose> 573 <xsl:text> 494 574 PKG_DEST=$OLD_PKG_DEST 495 575 unset OLD_PKG_DEST … … 733 813 </xsl:choose> 734 814 </xsl:template> 815 816 <xsl:variable name="APOS">'</xsl:variable> 817 <xsl:template name="output-wrap"> 818 <xsl:param name="commands" select="''"/> 819 <xsl:choose> 820 <xsl:when test="contains($commands,string($APOS))"> 821 <xsl:call-template name="output-wrap"> 822 <xsl:with-param name="commands" 823 select="substring-before($commands,string($APOS))"/> 824 </xsl:call-template> 825 <xsl:text>'\''</xsl:text> 826 <xsl:call-template name="output-wrap"> 827 <xsl:with-param name="commands" 828 select="substring-after($commands,string($APOS))"/> 829 </xsl:call-template> 830 </xsl:when> 831 <xsl:otherwise> 832 <xsl:value-of select="$commands"/> 833 </xsl:otherwise> 834 </xsl:choose> 835 </xsl:template> 836 735 837 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.