/usr/share/doc/HOWTO/ja-html/RedHat-CD-HOWTO-5.html is in doc-linux-ja-html 2006.05.25-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>Burning a RedHat CD mini-HOWTO: $B:G?7HG$rAH$_9~$`(B</TITLE>
<LINK HREF="RedHat-CD-HOWTO-6.html" REL=next>
<LINK HREF="RedHat-CD-HOWTO-4.html" REL=previous>
<LINK HREF="RedHat-CD-HOWTO.html#toc5" REL=contents>
</HEAD>
<BODY>
<A HREF="RedHat-CD-HOWTO-6.html">$B<!$N%Z!<%8(B</A>
<A HREF="RedHat-CD-HOWTO-4.html">$BA0$N%Z!<%8(B</A>
<A HREF="RedHat-CD-HOWTO.html#toc5">$BL\<!$X(B</A>
<HR>
<H2><A NAME="sec-updates"></A> <A NAME="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>
#!/bin/bash
RHVERSION=5.2
LIST=/tmp/er3hd3w25
CDDIR=/jaz/redhat-${RHVERSION}
# Find all directories, and make sure they have +x permission
find $CDDIR -type d -exec chmod -c 755 {} \;
# Find all files that are executables, shell or perl scripts
find $CDDIR -type f | file -f - | grep -v RPM \
| egrep -i 'executable|perl|bourne|shell' | cut -f1 -d: > $LIST
# Find shared libraries
find $CDDIR -name \*.so >> $LIST
# Make them executable
while read file
do
if [ ! -x $file ] ; then
chmod -c 755 $file
fi
done < $LIST
/bin/rm $LIST
exit 0
</PRE>
<HR>
<P>
<H2><A NAME="sec-updates"></A> <A NAME="ss5.2">5.2 $B99?7$5$l$?(BRPM $B$HCV$-49$($k(B</A>
</H2>
<P>
<P>$B<!$N(B <CODE>updateCD</CODE> $B$H$$$&%9%/%j%W%H$O(B updates $B%G%#%l%/%H%j$NA4$F$N(B
$B%U%!%$%k$r(B RPMS $B%G%#%l%/%H%j$K%3%T!<$7$^$9!#$3$N%9%/%j%W%H$O(B rpm $B$N(B
$B$$$/$D$+$N%+%i%/%j$r;H$C$F!"(Bupdates $B%G%#%l%/%H%j$NCf$N$h$j?7$7$$(B
$B%U%!%$%k$r?dDj$7$^$9!#8E$/$J$C$?%U%!%$%k$O(B <CODE>${OLD}</CODE> $B%G%#%l%/%H%j$K(B
$B0\$5$l$^$9!#(B
<P>
<HR>
<PRE>
#! /bin/bash
# This script updates rpms in a RedHat distribution found in $RPMDIR.
# The old rpms will be placed in $OLDDIR.
# The new rpms should be located in $UPDDIR.
# The architechture is $ARCH.
RHVERSION=5.2
ARCH=i386
CDDIR=/jaz/redhat-${RHVERSION}
RPMDIR=${CDDIR}/${ARCH}/RedHat/RPMS
UPDDIR=${CDDIR}/updates/${ARCH}
OLDDIR=${CDDIR}/old
if [ ! -d $OLDDIR ] ; then
echo making directory $OLDDIR
mkdir $OLDDIR
fi
allow_null_glob_expansion=1
for rpm in ${UPDDIR}/*.rpm ; do
NAME=`rpm --queryformat "%{NAME}" -qp $rpm`
unset OLDNAME
for oldrpm in ${RPMDIR}/${NAME}*.rpm ; do
if [ `rpm --queryformat "%{NAME}" -qp $oldrpm` = "$NAME" ]; then
OLDNAME=$oldrpm;
break
fi
done
if [ -z "$OLDNAME" ]; then
echo $NAME is new
cp -pv $rpm $RPMDIR
else
if [ `basename $rpm` != `basename $OLDNAME` ]; then
mv $OLDNAME $OLDDIR
cp -pv $rpm $RPMDIR
fi
fi
done
# Copy new boot image files to the right place...
for newfile in ${UPDDIR}/images/* ; do
file=${CDDIR}$/${ARCH}/images/$(basename ${newfile})
if [ $newfile -nt $file ] ; then
cp -pv $newfile $file
fi
done
exit 0
</PRE>
<HR>
<P>
<H2><A NAME="sec-new-hdlist"></A> <A NAME="ss5.3">5.3 $B?7$7$$(Bhdlist $B%U%!%$%k$N@8@.(B</A>
</H2>
<P>
<P>CD $B$+$i%$%s%9%H!<%k$9$k:]!"(BCD $B>e$N(B $B%$%s%9%H!<%k%W%m%0%i%`$O(B
CD $B>e$K$"$k(B <CODE>RedHat/base/hdlist</CODE> $B$H$$$&(B RPM
$B%Q%C%1!<%8$N>pJs$r5-=R$7$?%U%!%$%k$r;2>H$7$^$9!#$3$N(B <CODE>hdlist</CODE> $B$O(B
<CODE>misc/src/install/genhdlist</CODE> $B$H$$$&%W%m%0%i%`$K(B
$B$h$C$F(B $B?7$?$K@8@.$9$k;v$,$G$-$^$9!#<!$K$"$2$k$N$,(B genhdlist$B$r8F$S=P$9(B
<CODE>updateHdlist</CODE> $B%9%/%j%W%H$G$9!#!v$3$N%9%/%j%W%H$O!"(Broot $B$G(B
$B<B9T$7$J$1$l$P$$$1$^$;$s!#(B-
<P>
<HR>
<PRE>
#!/bin/bash
RHVERSION=5.2
ARCH=i386
echo generating hdlist...
CDDIR=/jaz/redhat-${RHVERSION}
GENHDDIR=${CDDIR}/${ARCH}/misc/src/install
chmod u+x ${GENHDDIR}/genhdlist
chmod 644 ${CDDIR}/${ARCH}/RedHat/base/hdlist
${GENHDDIR}/genhdlist ${CDDIR}/${ARCH} || echo "*** GENHDLIST FAILED ***"
exit 0
</PRE>
<HR>
<P>$BCm0U!'%a%$%s%G%#%l%/%H%j!J(B<CODE>RedHat/RPMS</CODE>$B!K$K99?7$5$l$?(B
$B%U%!%$%k$rAH$_9~$s$G$7$^$($P!"$"$J$?$N%G%#%9%H%j%S%e!<%7%g%s$O$b$O$d(B
Red Hat FTP $B%5%$%H$N%_%i!<$G$O$"$j$^$;$s!#!J$h$j?7$7$$$b$N$K$J$C$F$$$^$9!K(B
$B$7$?$,$C$F!"$3$3$G4V0c$($F!":F$S!J(Bmirror$B%3%^%s%I$G!K%G%#%9%H%j%S%e!<%7%g%s$N(B
$B%_%i!<$r(B $B<B9T$7$F$7$^$&$H!"$b$H$b$H$N8E$$%P!<%8%g%s$N(BRPM $B$,(B
$B%@%&%s%m!<%I$7D>$5$l!"$;$C$+$/CV$-49$($??7$7$$(BRPM$B$O>C$5$l$F$7$^$$$^$9!#(B
<P>
<P>
<H3>$B=EMW!'(BRedHat5.2$B$K4X$7$F(B</H3>
<P>
<P>
<P>RedHat $B%P!<%8%g%s(B 5.2 $B0JA0$N$b$N$KIUB0$9$k(B <CODE>genhdlist</CODE> $B$O!"(B
<CODE>RedHat/RPMS</CODE> $B%G%#%l%/%H%j$K(B RPM$B%U%!%$%k(B <EM>$B0J30(B</EM>
$B$N%U%!%$%k$,4^$^$l$F$$$k$H(B $B%/%i%C%7%e$7$^$9!#(B RedHat 5.2$B$N(B
<CODE>RedHat/RPMS</CODE> $B$K$O!"#2$D$N(BRPM$B$G$O$J$$%U%!%$%k(B (<CODE>ls-lR</CODE>
$B$H(B <CODE>ls-lR.gz</CODE> ) $B$,4^$^$l$F$$$k$?$a!"LdBj$,5/$3$j$^$9!#BP:v$H$7$F!"(B
$B$3$N%G%#%l%/%H%j$+$i(BRPM$B0J30$N%U%!%$%k$rA4$F:o=|$9$k$+!"(B
<CODE>misc/src/install/genhdlist.c</CODE> $B$K<!$N%Q%C%A$r(B
$BEv$F$F(B make $B$9$kI,MW$,$"$j$^$9!#(B $B$3$N%Q%C%A$rEv$F$k$3$H$G(B <CODE>genhdlist</CODE>
$B$O(B RPM $B0J30$N%U%!%$%k$rL5;k$9$k$h$&$K$J$j$^$9!#(B
<P>
<P>
<PRE>
*** genhdlist.c.orig Fri Nov 27 12:08:13 1998
--- genhdlist.c Fri Nov 27 12:08:20 1998
***************
*** 12,23 ****
--- 12,26 ----
#define FILENAME_TAG 1000000
+ /* Not used apparently...
+
int tags[] = { RPMTAG_NAME, RPMTAG_VERSION, RPMTAG_RELEASE, RPMTAG_SERIAL,
RPMTAG_FILENAMES, RPMTAG_FILESIZES, RPMTAG_GROUP,
RPMTAG_REQUIREFLAGS, RPMTAG_REQUIRENAME, RPMTAG_REQUIREVERSION,
RPMTAG_DESCRIPTION, RPMTAG_SUMMARY, RPMTAG_PROVIDES,
RPMTAG_SIZE, RPMTAG_OBSOLETES };
int numTags = sizeof(tags) / sizeof(int);
+ */
int main(int argc, char ** argv) {
char buf[300];
***************
*** 26,34 ****
--- 29,39 ----
struct dirent * ent;
int fd, rc, isSource;
Header h;
+ /* not used
int count, type;
int i;
void * ptr;
+ */
if (argc != 2) {
fprintf(stderr, "usage: genhdlist <dir>\n");
***************
*** 74,79 ****
--- 79,85 ----
rc = rpmReadPackageHeader(fd, &h, &isSource, NULL, NULL);
+ if (!rc) {
headerRemoveEntry(h, RPMTAG_POSTIN);
headerRemoveEntry(h, RPMTAG_POSTUN);
headerRemoveEntry(h, RPMTAG_PREIN);
***************
*** 110,115 ****
--- 116,122 ----
headerWrite(outfd, h, HEADER_MAGIC_YES);
headerFree(h);
close(fd);
+ }
}
errno = 0;
</PRE>
<P>
<HR>
<A HREF="RedHat-CD-HOWTO-6.html">$B<!$N%Z!<%8(B</A>
<A HREF="RedHat-CD-HOWTO-4.html">$BA0$N%Z!<%8(B</A>
<A HREF="RedHat-CD-HOWTO.html#toc5">$BL\<!$X(B</A>
</BODY>
</HTML>
|