7 # 2 - no spec file name in cmdl parameters
8 # 3 - spec file not stored in repo
9 # 4 - some source, patch or icon files not stored in repo
10 # 5 - package build failed
11 # 6 - spec file with errors
12 # 7 - wrong source in /etc/poldek.conf
13 # 8 - Failed installing buildrequirements and subrequirements
14 # 9 - Requested tag already exist
15 # 10 - Refused to build fractional release
16 # 100 - Unknown error (should not happen)
19 # - builder -u fetches current version first
20 # - tries to get new version from distfiles without new md5
21 # - after fetching new version doesn't update md5
22 # - doesn't get sources for specs with %include /usr/lib/rpm/macros.python
23 # when there's no rpm-pythonprov (rpm's fault, but it's ugly anyway)
24 # - as above with %include /usr/lib/rpm/macros.perl and no rpm-perlprov
25 # - when Icon: field is present, -5 and -a5 doesn't work
28 Build package utility from PLD CVS repository
29 V 0.11 (C) 1999-2004 Free Penguins".
30 PATH="/bin:/usr/bin:/usr/sbin:/sbin:/usr/X11R6/bin"
48 ALWAYS_CVSUP=${ALWAYS_CVSUP:-"yes"}
51 # It can be used i.e. in log file naming.
52 # See LOGFILE example.
53 DATE=`date +%Y-%m-%d_%H-%M-%S`
55 # Example: LOGFILE='../log.$PACKAGE_NAME'
56 # Example: LOGFILE='../LOGS/log.$PACKAGE_NAME.$DATE'
57 # Yes, you can use variable name! Note _single_ quotes!
79 WGET_RETRIES=${MAX_WGET_RETRIES:-0}
80 CVS_RETRIES=${MAX_CVS_RETRIES:-1000}
85 CVS_SERVER="cvs.pld-linux.org"
86 DISTFILES_SERVER="://distfiles.pld-linux.org"
87 ATTICDISTFILES_SERVER="://attic-distfiles.pld-linux.org"
91 FAIL_IF_NO_SOURCES="yes"
93 # Here we load saved user environment used to
94 # predefine options set above, or passed to builder
96 # This one reads global system environment settings:
97 if [ -f ~/etc/builderrc ]; then
100 # And this one cascades settings using user personal
102 # Example of ~/.builderrc:
104 #UPDATE_POLDEK_INDEXES="yes"
105 #FETCH_BUILD_REQUIRES="yes"
106 #REMOVE_BUILD_REQUIRES="force"
108 #LOGFILE='../LOGS/log.$PACKAGE_NAME.$DATE'
110 if [ -n "$HOME_ETC" ]; then
111 USER_CFG="$HOME_ETC/.builderrc"
113 USER_CFG=~/.builderrc
116 [ -f "$USER_CFG" ] && . "$USER_CFG"
118 wget --help 2>&1 | grep -q ' \-\-inet ' && WGET_OPTS="$WGET_OPTS --inet"
119 wget --help 2>&1 | grep -q ' \-\-retry\-connrefused ' && WGET_OPTS="$WGET_OPTS --retry-connrefused"
121 GETURI="wget --passive-ftp -c -nd -t$WGET_RETRIES $WGET_OPTS"
122 GETURI2="wget -c -nd -t$WGET_RETRIES $WGET_OPTS"
125 if (rpm --version 2>&1 | grep -q '4.0.[0-2]'); then
133 POLDEK_INDEX_DIR="`$RPM --eval %_rpmdir`/"
135 POLDEK_CMD="/usr/bin/poldek --noask"
139 RES_FILE=~/tmp/poldek-exit-status.$RANDOM
140 if [ -n "$LOGFILE" ]; then
141 LOG=`eval echo $LOGFILE`
142 if [ -n "$LASTLOG_FILE" ]; then
143 echo "LASTLOG=$LOG" > $LASTLOG_FILE
145 (nice -n ${DEF_NICE_LEVEL} ${POLDEK_CMD} `while test $# -gt 0; do echo "$1 ";shift;done` ; echo $? > ${RES_FILE})|tee $LOG
148 (nice -n ${DEF_NICE_LEVEL} ${POLDEK_CMD} `while test $# -gt 0; do echo "$1 ";shift;done` ; echo $? > ${RES_FILE}) 1>&2 >/dev/null
149 return `cat ${RES_FILE}`
154 # Example grep cvs /etc/poldek.conf:
155 # source = cvs /home/users/yoshi/rpm/RPMS/
156 if [ "$UPDATE_POLDEK_INDEXES" = "yes" ]; then
157 run_poldek -l -n ${POLDEK_SOURCE} 1>&2 > /dev/null
158 if [ ! "$?" == "0" ]; then
159 echo "Using improper source '${POLDEK_SOURCE}' in /etc/poldek.conf"
160 echo "Fix it and try to continue"
165 #---------------------------------------------
170 if [ -n "$DEBUG" ]; then set -xv; fi
172 Usage: builder [-D|--debug] [-V|--version] [-a|--as_anon] [-b|-ba|--build]
174 [-bb|--build-binary] [-bs|--build-source] [-u|--try-upgrade]
175 [{-B|--branch} <branch>] [{-d|--cvsroot} <cvsroot>] [-g|--get]
176 [-h|--help] [--http] [{-l,--logtofile} <logfile>] [-m|--mr-proper]
177 [-q|--quiet] [--date <yyyy-mm-dd> [-r <cvstag>] [{-T--tag <cvstag>]
178 [-Tvs|--tag-version-stable] [-Tvn|--tag-version-nest]
179 [-Ts|--tag-stable] [-Tn|--tag-nest] [-Tv|--tag-version]
180 [{-Tp|--tag-prefix} <prefix>] [{-tt|--test-tag}]
181 [-nu|--no-urls] [-v|--verbose] [--opts <rpm opts>]
182 [--with/--without <feature>] [--define <macro> <value>] <package>[.spec]
184 -5, --update-md5 - update md5 comments in spec, implies -nd -ncs
185 -a5, --add-md5 - add md5 comments to URL sources, implies -nc -nd -ncs
186 -n5, --no-md5 - ignore md5 comments in spec
187 -D, --debug - enable script debugging mode,
188 -V, --version - output builder version
189 -a, --as_anon - get files via pserver as cvs@$CVS_SERVER,
190 -b, -ba, --build - get all files from CVS repo or HTTP/FTP and build package
192 -bb, --build-binary - get all files from CVS repo or HTTP/FTP and build binary
193 only package from <package>.spec,
194 -bs, --build-source - get all files from CVS repo or HTTP/FTP and only pack
196 -bp, --build-prep - execute the %prep phase of <package>.spec,
197 -B, --branch - add branch
198 -c, --clean - clean all temporarily created files (in BUILD, SOURCES,
199 SPECS and \$RPM_BUILD_ROOT),
200 -d <cvsroot>, --cvsroot <cvsroot>
202 --define <macro> <value>
203 - define a macro <macro> with value <value>,
204 --nodeps - rpm won't check any dependences
205 -g, --get - get <package>.spec and all related files from CVS repo
207 -h, --help - this message,
208 --http - use http instead of ftp,
209 -l <logfile>, --logtofile <logfile>
211 -m, --mr-proper - only remove all files related to spec file and all work
213 -nc, --no-cvs - don't download sources from CVS, if source URL is given,
215 - don't check specs in CVS
216 -nd, --no-distfiles - don't download from distfiles
217 -nm, --no-mirrors - don't download from mirror, if source URL is given,
218 -nu, --no-urls - don't try to download from FTP/HTTP location,
219 -ns, --no-srcs - don't download Sources
220 -ns0, --no-source0 - don't download Source0
221 -nn, --no-net - don't download anything from the net
222 --opts <rpm opts> - additional options for rpm
223 -q, --quiet - be quiet,
224 --date yyyy-mm-dd - build package using resources from specified CVS date,
225 -r <cvstag>, --cvstag <cvstag>
226 - build package using resources from specified CVS tag,
227 -R, --fetch-build-requires
228 - fetch what is BuildRequired,
229 -RB, --remove-build-requires
230 - remove all you fetched with -R or --fetch-build-requires
231 remember, this option requires confirmation,
232 -FRB, --force-remove-build-requires
233 - remove all you fetched with -R or --fetch-build-requires
234 remember, this option works without confirmation,
235 -sf, --source-files - list sources - bare filenames (intended for offline
236 operations; does not work when Icon field is present
237 but icon file is absent),
238 -sp, --source-paths - list sources - filenames with full local paths (intended for
239 offline operations; does not work when Icon field is present
240 but icon file is absent),
241 -T <cvstag> , --tag <cvstag>
242 - add cvs tag <cvstag> for files,
243 -Tvs, --tag-version-stable
244 - add cvs tags STABLE and NAME-VERSION-RELEASE for files,
245 -Tvn, --tag-version-nest
246 - add cvs tags NEST and NAME-VERSION-RELEASE for files,
248 - add cvs tag STABLE for files,
250 - add cvs tag NEST for files,
252 - add cvs tag NAME-VERSION-RELEASE for files,
253 -Tp, --tag-prefix <prefix>
254 - add <prefix> to NAME-VERSION-RELEASE tags,
255 -tt, --test-tag <prefix>
256 - fail if tag is already present,
257 -ir, --integer-release-only
258 - allow only integer and snapshot releases
259 -v, --verbose - be verbose,
260 -u, --try-upgrade - check version, and try to upgrade package
261 -un, --try-upgrade-with-float-version
262 - as above, but allow float version
263 -U, --update - refetch sources, don't use distfiles, and update md5 comments
264 -Upi, --update-poldek-indexes
265 - refresh or make poldek package index files.
266 --with/--without <feature>
267 - conditional build package depending on %_with_<feature>/
268 %_without_<feature> macro switch. You may now use
269 --with feat1 feat2 feat3 --without feat4 feat5 --with feat6
270 constructions. Set GROUP_BCONDS to yes to make use of it.
271 --target <platform>, --target=<platform>
272 - build for platform <platform>.
277 if [ -n "$DEBUG" ]; then
284 rpm -bp --nodeps --define 'prep %dump' $BCOND $TARGET_SWITCH $SPECFILE 2>&1
287 rpmbuild --nodigest --nosignature --define 'prep %dump' $BCOND $SPECFILE 2>&1
293 if [ -z "$rpm_dump_cache" ] ; then
294 echo "internal error: cache_rpm_dump not called!" 1>&2
296 echo "$rpm_dump_cache"
301 if [ -n "$DEBUG" ]; then
310 if [ "$NOSRCS" != "yes" ]; then
311 SOURCES="`rpm_dump | awk '/SOURCEURL[0-9]+/ {print $3}'`"
313 if (rpm_dump | grep -qEi ":.*nosource.*1"); then
314 FAIL_IF_NO_SOURCES="no"
317 PATCHES="`rpm_dump | awk '/PATCHURL[0-9]+/ {print $3}'`"
318 ICONS="`awk '/^Icon:/ {print $2}' ${SPECFILE}`"
319 PACKAGE_NAME="`$RPM -q --qf '%{NAME}\n' --specfile ${SPECFILE} 2> /dev/null | head -n 1`"
320 PACKAGE_VERSION="`$RPM -q --qf '%{VERSION}\n' --specfile ${SPECFILE} 2> /dev/null| head -n 1`"
321 PACKAGE_RELEASE="`$RPM -q --qf '%{RELEASE}\n' --specfile ${SPECFILE} 2> /dev/null | head -n 1`"
323 # These variables may be unset after first cache_rpm_dump call
324 # (because of not-yet-retrieved icon file)
326 # if [ -z "$PACKAGE_NAME" -o -z "$PACKAGE_VERSION" -o -z "$PACKAGE_RELEASE" ]; then
327 # Exit_error err_no_package_data;
330 if [ -n "$BE_VERBOSE" ]; then
331 echo "- Sources : `nourl $SOURCES`"
332 if [ -n "$PATCHES" ]; then
333 echo "- Patches : `nourl $PATCHES`"
335 echo "- Patches : *no patches needed*"
337 if [ -n "$ICONS" ]; then
338 echo "- Icon : `nourl $ICONS`"
340 echo "- Icon : *no package icon*"
342 echo "- Name : $PACKAGE_NAME"
343 echo "- Version : $PACKAGE_VERSION"
344 echo "- Release : $PACKAGE_RELEASE"
350 if [ -n "$DEBUG" ]; then
358 "err_no_spec_in_cmdl" )
359 remove_build_requires
360 echo "ERROR: spec file name not specified.";
362 "err_no_spec_in_repo" )
363 remove_build_requires
364 echo "Error: spec file not stored in CVS repo.";
366 "err_no_source_in_repo" )
367 remove_build_requires
368 echo "Error: some source, patch or icon files not stored in CVS repo. ($2)";
371 remove_build_requires
372 echo "Error: package build failed. (${2:-no more info})";
374 "err_no_package_data" )
375 remove_build_requires
376 echo "Error: couldn't get out package name/version/release from spec file."
379 remove_build_requires
380 echo "Tag ${2} already exists (spec release: ${3}).";
383 remove_build_requires
384 echo "Release ${2} not integer and not a snapshot.";
388 echo "Unknown error."
394 if [ -n "$DEBUG" ]; then
399 SOURCE_DIR="`$RPM --eval '%{_sourcedir}'`"
400 SPECS_DIR="`$RPM --eval '%{_specdir}'`"
407 if [ -n "$DEBUG" ]; then
413 if [ \! -f "$SPECFILE" ]; then
414 SPECFILE="`basename $SPECFILE .spec`.spec";
416 if [ "$NOCVSSPEC" != "yes" ]; then
419 if [ -n "$CVSROOT" ]; then
420 OPTIONS="-d $CVSROOT $OPTIONS"
422 if [ ! -s CVS/Root -a "$NOCVSSPEC" != "yes" ]; then
423 echo "warning: No cvs access defined - using local .spec file"
428 if [ -z "$CVSDATE" -a -z "$CVSTAG" ]; then
429 OPTIONS="$OPTIONS -A"
431 if [ -n "$CVSDATE" ]; then
432 OPTIONS="$OPTIONS -D $CVSDATE"
434 if [ -n "$CVSTAG" ]; then
435 OPTIONS="$OPTIONS -r $CVSTAG"
441 while [ "$result" != "0" -a "$retries_counter" -le "$CVS_RETRIES" ]
443 retries_counter=$(( $retries_counter + 1 ))
444 output=$(LC_ALL=C cvs $OPTIONS $SPECFILE 2>&1)
446 [ -n "$output" ] && echo "$output"
447 if [ "$result" -ne "0" ]; then
448 if (echo "$output" | grep -qE "(Cannot connect to|connect to .* failed|Connection reset by peer|Connection timed out|Unknown host)") && [ "$retries_counter" -le "$CVS_RETRIES" ]; then
449 echo "Trying again [$SPECFILE]... ($retries_counter)"
453 Exit_error err_no_spec_in_repo;
457 if [ ! -f "$SPECFILE" ]; then
458 Exit_error err_no_spec_in_repo;
461 if [ "$CHMOD" = "yes" -a -n "$SPECFILE" ]; then
462 chmod $CHMOD_MODE $SPECFILE
465 [ -n "$DONT_PRINT_REVISION" ] || grep -E -m 1 "^#.*Revision:.*Date" $SPECFILE
472 if [ ! -f "mirrors" -a "$NOCVSSPEC" != "yes" ] ; then
473 cvs update mirrors >&2
477 while read origin mirror name rest
479 ol=`echo -n "$origin"|wc -c`
480 prefix="`echo -n "$url" | head -c $ol`"
481 if [ "$prefix" = "$origin" ] ; then
482 suffix="`echo "$url"|cut -b $ol-`"
483 echo -n "$mirror$suffix"
494 grep "SOURCEURL[0-9]*[ ]*$1""[ ]*$" | \
495 sed -e 's/.*SOURCEURL\([0-9][0-9]*\).*/\1/' | \
501 [ X"$NO5" = X"yes" ] && return
503 [ -z "$no" ] && return
505 spec_rev=$(grep $SPECFILE CVS/Entries | sed -e s:/$SPECFILE/:: -e s:/.*::)
506 if [ -z "$spec_rev" ]; then
507 spec_rev="$(head -n 1 $SPECFILE | sed -e 's/.*\$Revision: \([0-9.]*\).*/\1/')"
509 spec="$SPECFILE[0-9.,]*,$(echo $spec_rev | sed 's/\./\\./g')"
510 md5=$(grep -s -v '^#' additional-md5sums | \
511 grep -E "[ ]$(basename "$1")[ ]+${spec}([ ,]|\$)" | \
512 sed -e 's/^\([0-9a-f]\{32\}\).*/\1/' | \
513 grep -E '^[0-9a-f]{32}$')
514 if [ X"$md5" = X"" ] ; then
515 grep -i "#[ ]*Source$no-md5[ ]*:" $SPECFILE | sed -e 's/.*://' | xargs
517 if [ $(echo "$md5" | wc -l) != 1 ] ; then
518 echo "$SPECFILE: more then one entry in additional-md5sums for $1" 1>&2
520 echo "$md5" | tail -n 1
526 echo "$PROTOCOL$DISTFILES_SERVER/by-md5/$(src_md5 "$1" | sed -e 's|^\(.\)\(.\)|\1/\2/&|')/$(basename "$1")"
529 distfiles_attic_url ()
531 echo "$PROTOCOL$ATTICDISTFILES_SERVER/Attic/by-md5/$(src_md5 "$1" | sed -e 's|^\(.\)\(.\)|\1/\2/&|')/$(basename "$1")"
538 [ "$md5" = "$(md5sum $(nourl "$1") 2> /dev/null | sed -e 's/ .*//')" ]
543 size="$(find $(nourl "$1") -printf "%s" 2>/dev/null)"
544 [ -n "$size" -a "$size" -gt 0 ]
549 if [ "$CVSIGNORE_DF" != "yes" ]; then
552 cvsignore=${SOURCE_DIR}/.cvsignore
553 if ! grep -q "^$1\$" $cvsignore 2> /dev/null; then
554 echo "$1" >> $cvsignore
562 if [ -n "$DEBUG" ]; then
567 if [ -n "$1$2$3$4$5$6$7$8$9${10}" ]; then
571 if [ -n "$CVSROOT" ]; then
572 OPTIONS="-d $CVSROOT $OPTIONS"
574 if [ ! -s CVS/Root -a "$NOCVS" != "yes" ]; then
575 echo "warning: No cvs access defined for SOURCES"
579 if [ -z "$CVSDATE" -a -z "$CVSTAG" ]; then
580 OPTIONS="$OPTIONS -A"
582 if [ -n "$CVSDATE" ]; then
583 OPTIONS="$OPTIONS -D $CVSDATE"
585 if [ -n "$CVSTAG" ]; then
586 OPTIONS="$OPTIONS -r $CVSTAG"
591 if [ -n "$UPDATE5" ]; then
592 if [ -n "$ADD5" ]; then
593 [ `nourl $i` = "$i" ] && continue
594 grep -qiE '^#[ ]*Source'$(src_no $i)'-md5[ ]*:' $SPECS_DIR/$SPECFILE && continue
596 grep -qiE '^#[ ]*Source'$(src_no $i)'-md5[ ]*:' $SPECS_DIR/$SPECFILE || continue
600 if [ ! -f `nourl $i` ] || [ $ALWAYS_CVSUP = "yes" ]; then
601 if echo $i | grep -vE '(http|ftp|https|cvs|svn)://' | grep -qE '\.(gz|bz2)$']; then
602 echo "Warning: no URL given for $i"
605 if [ -n "$(src_md5 "$i")" ] && [ -z "$NODIST" ]; then
606 if good_md5 "$i" && good_size "$i"; then
607 echo "$(nourl "$i") having proper md5sum already exists"
611 url=$(distfiles_url "$i")
612 url_attic=$(distfiles_attic_url "$i")
614 if [ `echo $url | grep -E '^(\.|/)'` ]; then
615 ${GETLOCAL} $url $target
617 if [ -z "$NOMIRRORS" ]; then
618 url="`find_mirror "$url"`"
620 ${GETURI} -O "$target" "$url" || \
621 if [ `echo $url | grep -E 'ftp://'` ]; then
622 ${GETURI2} -O "$target" "$url"
625 if ! test -s "$target"; then
627 if [ `echo $url_attic | grep -E '^(\.|/)'` ]; then
628 ${GETLOCAL} $url_attic $target
630 if [ -z "$NOMIRRORS" ]; then
631 url_attic="`find_mirror "$url_attic"`"
633 ${GETURI} -O "$target" "$url_attic" || \
634 if [ `echo $url_attic | grep -E 'ftp://'` ]; then
635 ${GETURI2} -O "$target" "$url_attic"
639 if test -s "$target"; then
645 elif [ -z "$(src_md5 "$i")" -a "$NOCVS" != "yes" ]; then
646 # ( echo $i | grep -qvE '(ftp|http|https)://' ); -- if CVS should be used, but URLs preferred
649 while [ "$result" != "0" -a "$retries_counter" -le "$CVS_RETRIES" ]
651 retries_counter=$(( $retries_counter + 1 ))
652 output=$(LC_ALL=C cvs $OPTIONS `nourl $i` 2>&1)
654 [ -n "$output" ] && echo "$output"
655 if (echo "$output" | grep -qE "(Cannot connect to|connect to .* failed|Connection reset by peer|Connection timed out|Unknown host)") && [ "$result" -ne "0" -a "$retries_counter" -le "$CVS_RETRIES" ]; then
656 echo "Trying again [`nourl $i`]... ($retries_counter)"
665 if [ -z "$NOURLS" ] && [ ! -f "`nourl $i`" -o -n "$UPDATE" ] && [ `echo $i | grep -E 'ftp://|http://|https://'` ]; then
666 if [ -z "$NOMIRRORS" ]; then
667 im="`find_mirror "$i"`"
672 if [ `echo $im | grep -E 'ftp://'` ]; then
679 if [ ! -f "`nourl $i`" -a "$FAIL_IF_NO_SOURCES" != "no" ]; then
680 Exit_error err_no_source_in_repo $i;
681 elif [ -n "$UPDATE5" ] && \
682 ( ( [ -n "$ADD5" ] && echo $i | grep -q -E 'ftp://|http://|https://' && \
683 [ -z "$(grep -E -i '^NoSource[ ]*:[ ]*'$i'([ ]|$)' $SPECS_DIR/$SPECFILE)" ] ) || \
684 grep -q -i -E '^#[ ]*source'$(src_no $i)'-md5[ ]*:' $SPECS_DIR/$SPECFILE )
686 echo "Updating source-$srcno md5."
687 md5=$(md5sum `nourl $i` | cut -f1 -d' ')
689 print unless /^\s*#\s*Source'$srcno'-md5\s*:/i;
690 print "# Source'$srcno'-md5:\t'$md5'\n"
691 if /^Source'$srcno'\s*:\s+/;
696 if good_md5 "$i" && good_size "$i"; then
698 elif [ "$FROM_DISTFILES" = 1 ]; then
699 # wrong md5 from distfiles: remove the file and try again
701 echo "MD5 sum mismatch. Trying full fetch."
704 ${GETURI} -O "$target" "$url" || \
705 if [ `echo $url | grep -E 'ftp://'` ]; then
706 ${GETURI2} -O "$target" "$url"
708 if ! test -s "$target"; then
710 ${GETURI} -O "$target" "$url_attic" || \
711 if [ `echo $url_attic | grep -E 'ftp://'` ]; then
712 ${GETURI2} -O "$target" "$url_attic"
715 test -s "$target" || rm -f "$target"
718 if good_md5 "$i" && good_size "$i" ; then
721 echo "MD5 sum mismatch or 0 size. Use -U to refetch sources,"
722 echo "or -5 to update md5 sums, if you're sure files are correct."
723 Exit_error err_no_source_in_repo $i
727 if [ "$CHMOD" = "yes" ]; then
728 CHMOD_FILES="`nourl $GET_FILES`"
729 if [ -n "$CHMOD_FILES" ]; then
730 chmod $CHMOD_MODE $CHMOD_FILES
739 if [ -n "$DEBUG" ]; then
744 # Check whether first character of PACKAGE_NAME is legal for tag name
745 if [ -z "${PACKAGE_NAME##[_0-9]*}" -a -z "$TAG_PREFIX" ]; then
748 TAGVER=$TAG_PREFIX$PACKAGE_NAME-`echo $PACKAGE_VERSION | sed -e "s/\./\_/g" -e "s/@/#/g"`-`echo $PACKAGE_RELEASE | sed -e "s/\./\_/g" -e "s/@/#/g"`
749 # Remove #kernel.version_release from TAGVER because tagging sources
750 # could occur with different kernel-headers than kernel-headers used at build time.
751 TAGVER=$(echo "$TAGVER" | sed -e 's/#.*//g')
759 if [ -n "$DEBUG" ]; then
764 if [ -n "$1$2$3$4$5$6$7$8$9${10}" ]; then
765 echo "Version: $PACKAGE_VERSION"
766 echo "Release: $PACKAGE_RELEASE"
770 if [ "$TAG_VERSION" = "yes" ]; then
771 echo "CVS tag: $TAGVER"
773 if [ -n "$TAG" ]; then
778 if [ -n "$CVSROOT" ]; then
779 OPTIONS="-d $CVSROOT $OPTIONS"
785 # don't tag files stored on distfiles
786 [ -n "`src_md5 $i`" ] && continue
787 if [ -f "`nourl $i`" ]; then
788 if [ "$TAG_VERSION" = "yes" ]; then
789 cvs $OPTIONS $TAGVER `nourl $i`
791 if [ -n "$TAG" ]; then
792 cvs $OPTIONS $TAG `nourl $i`
795 Exit_error err_no_source_in_repo $i
800 if [ "$TAG_VERSION" = "yes" ]; then
801 cvs $OPTIONS $TAGVER $SPECFILE
803 if [ -n "$TAG" ]; then
804 cvs $OPTIONS $TAG $SPECFILE
814 echo "CVS branch tag: $TAG"
819 if [ -n "$DEBUG" ]; then
824 if [ -n "$1$2$3$4$5$6$7$8$9${10}" ]; then
827 if [ -n "$CVSROOT" ]; then
828 OPTIONS="-d $CVSROOT $OPTIONS"
833 if [ -f `nourl $i` ]; then
834 cvs $OPTIONS $TAG `nourl $i`
836 Exit_error err_no_source_in_repo $i
840 cvs $OPTIONS $TAG $SPECFILE
850 if [ -n "$DEBUG" ]; then
857 if [ -n "$TRY_UPGRADE" ]; then
858 if [ -n "$FLOAT_VERSION" ]; then
859 TNOTIFY=`./pldnotify.awk $SPECFILE -n`
861 TNOTIFY=`./pldnotify.awk $SPECFILE`
864 TNEWVER=`echo $TNOTIFY | awk '{ match($4,/\[NEW\]/); print $5 }'`
866 if [ -n "$TNEWVER" ]; then
867 TOLDVER=`echo $TNOTIFY | awk '{ print $3; }'`
868 echo "New version found, updating spec file to version " $TNEWVER
869 cp -f $SPECFILE $SPECFILE.bak
871 eval "perl -pi -e 's/Version:\t"$TOLDVER"/Version:\t"$TNEWVER"/gs' $SPECFILE"
872 eval "perl -pi -e 's/Release:\t[1-9]{0,4}/Release:\t1/' $SPECFILE"
874 if [ -n "$ICONS" ]; then
878 get_files "$SOURCES $PATCHES";
879 unset TOLDVER TNEWVER TNOTIFY
886 BUILD_SWITCH="-ba" ;;
888 BUILD_SWITCH="-bb" ;;
890 BUILD_SWITCH="-bs --nodeps" ;;
892 BUILD_SWITCH="-bp --nodeps" ;;
894 if [ -n "$LOGFILE" ]; then
895 LOG=`eval echo $LOGFILE`
896 if [ -d "$LOG" ]; then
897 echo "Log file $LOG is a directory."
898 echo "Parse error in the spec?"
899 Exit_error err_build_fail;
901 if [ -n "$LASTLOG_FILE" ]; then
902 echo "LASTLOG=$LOG" > $LASTLOG_FILE
904 RES_FILE=~/tmp/$RPMBUILD-exit-status.$RANDOM
905 (time nice -n ${DEF_NICE_LEVEL} $RPMBUILD $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $BCOND $TARGET_SWITCH $SPECFILE; echo $? > $RES_FILE) 2>&1 |tee $LOG
906 RETVAL=`cat $RES_FILE`
908 if [ -n "$LOGDIROK" ] && [ -n "$LOGDIRFAIL" ]; then
909 if [ "$RETVAL" -eq "0" ]; then
916 eval nice -n ${DEF_NICE_LEVEL} $RPMBUILD $BUILD_SWITCH -v $QUIET $CLEAN $RPMOPTS $BCOND $TARGET_SWITCH $SPECFILE
919 if [ "$RETVAL" -ne "0" ]; then
920 if [ -n "$TRY_UPGRADE" ]; then
921 echo "\n!!! Package with new version cannot be build automagically\n"
922 mv -f $SPECFILE.bak $SPECFILE
924 Exit_error err_build_fail;
931 echo "$@" | sed 's#\<\(ftp\|http\|https\|cvs\|svn\)://[^ ]*/##g'
934 install_required_packages()
942 AVAIL_BCONDS_WITHOUT=""
944 if `grep -q ^%bcond ${SPECFILE}`; then
946 elif `egrep -q ^#\ *_with ${SPECFILE}`; then
952 # expand bconds from ~/.bcondrc
953 # The file structure is like gentoo's package.use:
956 # samba -mysql -pgsql
957 # w32codec license_agreement
960 if [ "${BCOND_VERSION}" != "NONE" ] && ( [ -f $HOME/.bcondrc ] || ( [ -n $HOME_ETC ] && [ -f $HOME_ETC/.bcondrc ] ) ) ; then
961 # This takes package name, first defined in spec.
962 # so consider that when defining flags for package.
963 PN=`$RPM -q --qf '%{NAME}\n' --specfile $SPECFILE | head -n 1`
964 AVAIL=`$RPMBUILD --bcond $SPECFILE`
966 BCONDRC=$HOME/.bcondrc
967 [ -n $HOME_ETC ] && [ -f $HOME_ETC/.bcondrc ] && BCONDRC=$HOME_ETC/.bcondrc
969 while read pkg flags; do
971 [[ "$pkg" == \#* ]] && continue
973 # any package or current package?
974 if [ "$pkg" = "*" ] || [ "$pkg" = "$PN" ]; then
975 for flag in $flags; do
978 # use only flags which are in this package.
979 if [[ $AVAIL = *${opt}* ]]; then
980 if [[ $flag = -* ]]; then
981 BCOND="$BCOND --without $opt"
983 BCOND="$BCOND --with $opt"
991 case "${BCOND_VERSION}" in
996 echo "Warning: This spec has old style bconds. Fix it || die."
997 for opt in `$RPMBUILD --bcond $SPECFILE |grep ^_without_`
999 AVAIL_BCOND_WITHOUT=`echo $opt|sed -e "s/^_without_//g"`
1000 if `echo $BCOND|grep -q -- "--without $AVAIL_BCOND_WITHOUT"`;then
1001 AVAIL_BCONDS_WITHOUT="$AVAIL_BCONDS_WITHOUT <$AVAIL_BCOND_WITHOUT>"
1003 AVAIL_BCONDS_WITHOUT="$AVAIL_BCONDS_WITHOUT $AVAIL_BCOND_WITHOUT"
1007 for opt in `$RPMBUILD --bcond $SPECFILE |grep ^_with_`
1009 AVAIL_BCOND_WITH=`echo $opt|sed -e "s/^_with_//g"`
1010 if `echo $BCOND|grep -q -- "--with $AVAIL_BCOND_WITH"`;then
1011 AVAIL_BCONDS_WITH="$AVAIL_BCONDS_WITH <$AVAIL_BCOND_WITH>"
1013 AVAIL_BCONDS_WITH="$AVAIL_BCONDS_WITH $AVAIL_BCOND_WITH"
1018 cond_type="" # with || without
1019 for opt in `$RPMBUILD --bcond $SPECFILE`
1029 case "$cond_type" in
1032 AVAIL_BCOND_WITH="$opt"
1033 if `echo $BCOND|grep -q -- "--with $AVAIL_BCOND_WITH"`;then
1034 AVAIL_BCONDS_WITH="$AVAIL_BCONDS_WITH <$AVAIL_BCOND_WITH>"
1036 AVAIL_BCONDS_WITH="$AVAIL_BCONDS_WITH $AVAIL_BCOND_WITH"
1041 AVAIL_BCOND_WITHOUT="$opt"
1042 if `echo $BCOND|grep -q -- "--without $AVAIL_BCOND_WITHOUT"`;then
1043 AVAIL_BCONDS_WITHOUT="$AVAIL_BCONDS_WITHOUT <$AVAIL_BCOND_WITHOUT>"
1045 AVAIL_BCONDS_WITHOUT="$AVAIL_BCONDS_WITHOUT $AVAIL_BCOND_WITHOUT"
1059 echo -ne "Package installation failed:\t$package_name\n"
1061 # No i tutaj bym chcia³ zrobiæ sztuczn± inteligencjê, która spróbuje tego
1062 # pakieta zbudowaæ. Aktualnie niewiele dziala, bo generalnie nie widze do
1063 # konca algorytmu... Ale damy rade. :) Na razie po prostu sie wyjebie tak samo
1064 # jakby nie bylo tego kawalka kodu.
1066 # Update: Poprawi³em parê rzeczy i zaczê³o generowaæ pakiety spoza zadanej listy.
1067 # Jednym s³owem budowanie niespoldkowanych zale¿no¶ci dzia³a w paru przypadkach.
1074 # Istnieje taki spec? ${package}.spec
1075 if [ -f "${SPECS_DIR}${package}.spec" ]; then
1076 parent_spec_name=${package}.spec
1077 elif [ -f "${SPECS_DIR}`echo ${package_name}|sed -e s,-devel.*,,g -e s,-static,,g`.spec" ]; then
1078 parent_spec_name="`echo ${package_name}|sed -e s,-devel.*,,g -e s,-static,,g`.spec"
1080 for provides_line in `grep ^Provides:.*$package ${SPECS_DIR} -R`
1086 if [ "${parent_spec_name}" != "" ]; then
1088 if [ "${FETCH_BUILD_REQUIRES}" == "yes" ]; then
1089 sub_builder_opts="${sub_builder_opts} -R"
1091 if [ "${REMOVE_BUILD_REQUIRES}" == "nice" ]; then
1092 sub_builder_opts="${sub_builder_opts} -RB"
1093 elif [ "${REMOVE_BUILD_REQUIRES}" == "force" ]; then
1094 sub_builder_opts="${sub_builder_opts} -FRB"
1096 if [ "${UPDATE_POLDEK_INDEXES}" == "yes" ]; then
1097 sub_builder_opts="${sub_builder_opts} -Upi"
1100 ./builder ${sub_builder_opts} ${parent_spec_name}
1102 NOT_INSTALLED_PACKAGES="$NOT_INSTALLED_PACKAGES $package_name"
1105 remove_build_requires()
1107 if [ "$INSTALLED_PACKAGES" != "" ]; then
1108 case "$REMOVE_BUILD_REQUIRES" in
1110 run_poldek --noask -ve $INSTALLED_PACKAGES
1113 run_poldek --ask -ve $INSTALLED_PACKAGES
1116 echo You may want to manually remove following BuildRequires fetched:
1117 echo $INSTALLED_PACKAGES
1118 echo Try poldek -e \`cat `pwd`/.${SPECFILE}_INSTALLED_PACKAGES\`
1126 if [ "$AVAIL_BCONDS_WITH" != "" ] || [ "$AVAIL_BCONDS_WITHOUT" != "" ]; then
1127 if [ "$BCOND" != "" ]; then
1128 echo -ne "\nBuilding $SPECFILE with the following conditional flags:\n"
1131 echo -ne "\nNo conditional flags passed"
1133 echo -ne "\n\nfrom available:\n"
1134 echo -ne "--with :\t$AVAIL_BCONDS_WITH\n--without:\t$AVAIL_BCONDS_WITHOUT\n\n"
1138 fetch_build_requires()
1140 if [ "${FETCH_BUILD_REQUIRES}" = "yes" ]; then
1141 if [ "$FETCH_BUILD_REQUIRES_RPMGETDEPS" = "yes" ]; then
1142 CONF=$(rpm-getdeps $BCOND $SPECFILE 2> /dev/null | awk '/^\-/ { print "@" $3 } ' | xargs)
1143 DEPS=$(rpm-getdeps $BCOND $SPECFILE 2> /dev/null | awk '/^\+/ { print "@" $3 } ' | xargs)
1144 if [ -n "$CONF" -o -n "$DEPS" ]; then
1145 /usr/bin/poldek --update; /usr/bin/poldek --upa
1147 if [ -n "$CONF" ]; then
1148 echo "Trying to uninstall conflicting packages ($CONF):"
1149 /usr/bin/poldek --noask --nofollow -ev $CONF
1151 if [ -n "$DEPS" ]; then
1152 echo "Trying to install dependencies ($DEPS):"
1153 /usr/bin/poldek --caplookup -uGv $DEPS
1158 echo -ne "\nAll packages installed by fetch_build_requires() are written to:\n"
1159 echo -ne "`pwd`/.${SPECFILE}_INSTALLED_PACKAGES\n"
1160 echo -ne "\nIf anything fails, you may get rid of them by executing:\n"
1161 echo "poldek -e \`cat `pwd`/.${SPECFILE}_INSTALLED_PACKAGES\`\n\n"
1162 echo > `pwd`/.${SPECFILE}_INSTALLED_PACKAGES
1163 for package_item in `cat $SPECFILE|grep -B100000 ^%changelog|grep -v ^#|grep BuildRequires|grep -v ^-|sed -e "s/^.*BuildRequires://g"|awk '{print $1}'|sed -e s,perl\(,perl-,g -e s,::,-,g -e s,\(.*\),,g -e s,%{,,g -e s,},,g|grep -v OpenGL-devel|sed -e s,sh-utils,coreutils,g -e s,fileutils,coreutils,g -e s,kgcc_package,gcc,g -e s,\),,g`
1165 package_item="`echo $package_item|sed -e s,rpmbuild,rpm-build,g |sed -e s,__perl,perl,g |sed -e s,gasp,binutils-gasp,g -e s,binutils-binutils,binutils,g -e s,apxs,apache,g|sed -e s,apache\(EAPI\)-devel,apache-devel,g -e s,kernel-headers\(netfilter\),kernel-headers,g -e s,awk,mawk,g -e s,mmawk,mawk,g -e s,motif,openmotif,g -e s,openopenmotif,openmotif,g`"
1167 package=`basename "$package_item"|sed -e "s/}$//g"`
1168 COND_ARCH_TST="`cat $SPECFILE|grep -B1 BuildRequires|grep -B1 $package|grep ifarch|sed -e "s/^.*ifarch//g"`"
1171 COND_TST=`cat $SPECFILE|grep BuildRequires|grep "$package"`
1172 if `echo $COND_TST|grep -q '^BuildRequires:'`; then
1173 if [ "$COND_ARCH_TST" != "" ] && [ "`echo $COND_ARCH_TST|sed -e "s/i.86/ix86/g"`" != "`echo $mach|sed -e "s/i.86/ix86/g"`" ]; then
1178 COND_NAME=`echo $COND_TST|sed -e s,:BuildRequires:.*$,,g`
1181 if `echo $COND_TST|grep -q 'without_'`; then
1182 COND_NAME=`echo $COND_NAME|sed -e s,^.*_without_,,g`
1183 if `echo $COND_TST|grep -q !`; then
1188 if `echo $AVAIL_BCONDS_WITHOUT|grep -q "<$COND_NAME>"`; then
1194 elif `echo $COND_TST|grep -q 'with_'`; then
1195 COND_NAME=`echo $COND_NAME|sed -e s,^.*_with_,,g`
1196 if `echo $COND_TST|grep -q !`; then
1201 if `echo $AVAIL_BCONDS_WITH|grep -q "<$COND_NAME>"`; then
1207 RESULT="${COND_STATE}-${COND_ARGV}"
1209 "with-wout" | "wout-with" )
1212 "wout-wout" | "with-with" )
1216 echo "Action '$RESULT' was not defined for package '$package_item'"
1222 if [ "$GO" = "yes" ]; then
1223 if [ "`rpm -q $package|sed -e "s/$package.*/$package/g"`" != "$package" ]; then
1224 echo "Testing if $package has subrequirements..."
1225 run_poldek -t -i $package --dumpn=".$package-req.txt"
1226 if [ -f ".$package-req.txt" ]; then
1227 for package_name in `cat ".$package-req.txt"|grep -v ^#`
1229 if [ "$package_name" = "$package" ]; then
1230 echo -ne "Installing BuildRequired package:\t$package_name\n"
1231 export PROMPT_COMMAND=`echo -ne "\033]0;${SPECFILE}: Installing BuildRequired package: ${package_name}\007"`
1232 install_required_packages $package;
1234 echo -ne "Installing (sub)Required package:\t$package_name\n"
1235 export PROMPT_COMMAND=`echo -ne "\033]0;${SPECFILE}: Installing (sub)Required package: ${package_name}\007"`
1236 install_required_packages $package_name;
1240 INSTALLED_PACKAGES="$package_name $INSTALLED_PACKAGES"
1241 echo $package_name >> `pwd`/.${SPECFILE}_INSTALLED_PACKAGES
1244 echo "Attempting to run spawn sub - builder..."
1245 run_sub_builder $package_name
1246 if [ $? -eq 0 ]; then
1247 install_required_packages $package_name;
1250 INSTALLED_PACKAGES="$package_name $INSTALLED_PACKAGES"
1251 echo $package_name >> `pwd`/.${SPECFILE}_INSTALLED_PACKAGES
1254 NOT_INSTALLED_PACKAGES="$package_name $NOT_INSTALLED_PACKAGES"
1261 rm -f ".$package-req.txt"
1263 echo "Attempting to run spawn sub - builder..."
1264 run_sub_builder $package
1265 if [ $? -eq 0 ]; then
1266 install_required_packages $package;
1269 INSTALLED_PACKAGES="$package_name $INSTALLED_PACKAGES"
1270 echo $package_name >> `pwd`/.${SPECFILE}_INSTALLED_PACKAGES
1273 NOT_INSTALLED_PACKAGES="$package_name $NOT_INSTALLED_PACKAGES"
1279 echo "Package $package is already installed. BuildRequirement satisfied."
1283 export PROMPT_COMMAND=`echo -ne "\033]0;${SPECFILE}\007"`
1284 if [ "$NOT_INSTALLED_PACKAGES" != "" ]; then
1285 echo "Unable to install following packages and their dependencies:"
1286 for pkg in "$NOT_INSTALLED_PACKAGES"
1290 remove_build_requires
1296 #---------------------------------------------
1299 if [ "$#" = 0 ]; then
1325 DEBUG="yes"; shift ;;
1327 COMMAND="version"; shift ;;
1329 CVSROOT=":pserver:cvs@$CVS_SERVER:/cvsroot"; shift ;;
1330 -b | -ba | --build )
1331 COMMAND="build"; shift ;;
1332 -bb | --build-binary )
1333 COMMAND="build-binary"; shift ;;
1334 -bs | --build-source )
1335 COMMAND="build-source"; shift ;;
1336 -bp | --build-prep )
1337 COMMAND="build-prep"; shift ;;
1339 COMMAND="branch"; shift; TAG="${1}"; shift;;
1341 CLEAN="--clean --rmspec --rmsource"; shift ;;
1343 shift; CVSROOT="${1}"; shift ;;
1345 COMMAND="get"; shift ;;
1347 COMMAND="usage"; shift ;;
1349 PROTOCOL="http"; shift ;;
1351 shift; LOGFILE="${1}"; shift ;;
1353 shift; DEF_NICE_LEVEL=${1}; shift ;;
1355 COMMAND="mr-proper"; shift ;;
1357 NOCVS="yes"; shift ;;
1358 -ncs | --no-cvs-specs )
1359 NOCVSSPEC="yes"; shift ;;
1360 -nd | --no-distfiles )
1361 NODIST="yes"; shift ;;
1362 -nm | --no-mirrors )
1363 NOMIRRORS="yes"; shift ;;
1365 NOURLS="yes"; shift ;;
1367 NOSRCS="yes"; shift ;;
1368 -ns0 | --no-source0 )
1369 NOSOURCE0="yes"; shift ;;
1379 shift; RPMOPTS="${1}"; shift ;;
1380 --with | --without )
1381 case $GROUP_BCONDS in
1385 while ! `echo ${1}|grep -qE '(^-|spec)'`
1387 BCOND="$BCOND $COND $1"
1391 BCOND="$BCOND $1 $2" ; shift 2 ;;
1395 shift; TARGET="${1}"; shift ;;
1397 TARGET=$(echo "${1}" | sed 's/^--target=//'); shift ;;
1399 QUIET="--quiet"; shift ;;
1401 CVSDATE="${2}"; shift 2 ;;
1403 shift; CVSTAG="${1}"; shift ;;
1404 -R | --fetch-build-requires)
1405 FETCH_BUILD_REQUIRES="yes"
1406 NOT_INSTALLED_PACKAGES=
1408 -RB | --remove-build-requires)
1409 REMOVE_BUILD_REQUIRES="nice"
1411 -FRB | --force-remove-build-requires)
1412 REMOVE_BUILD_REQUIRES="force"
1414 -sf | --sources-files)
1415 COMMAND="list-sources-files"
1417 -sp | --sources-paths)
1418 COMMAND="list-sources-local-paths"
1420 -Tvs | --tag-version-stable )
1425 -Tvn | --tag-version-nest )
1430 -Ts | --tag-stable )
1440 -Tv | --tag-version )
1445 -Tp | --tag-prefix )
1457 -ir | --integer-release-only )
1458 INTEGER_RELEASE="yes"
1467 -Upi | --update-poldek-indexes )
1468 UPDATE_POLDEK_INDEXES="yes"
1470 -u | --try-upgrade )
1471 TRY_UPGRADE="1"; shift ;;
1472 -un | --try-upgrade-with-float-version )
1473 TRY_UPGRADE="1"; FLOAT_VERSION="1"; shift ;;
1475 BE_VERBOSE="1"; shift ;;
1481 RPMOPTS="${RPMOPTS} --define \"${MACRO} ${VALUE}\""
1485 RPMOPTS="${RPMOPTS} --nodeps"
1489 export PROMPT_COMMAND=`echo -ne "\033]0;${SPECFILE}\007"`
1494 if [ -n "$DEBUG" ]; then
1499 if [ -n "$TARGET" ]; then
1502 TARGET_SWITCH="--target $TARGET" ;;
1504 TARGET_SWITCH="--target=$TARGET" ;;
1509 "build" | "build-binary" | "build-source" | "build-prep" )
1511 if [ -n "$SPECFILE" ]; then
1515 fetch_build_requires;
1517 if [ "$INTEGER_RELEASE" = "yes" ]; then
1518 echo "Checking release $PACKAGE_RELEASE..."
1519 if echo $PACKAGE_RELEASE | grep -q '^[^.]*\.[^.]*$' 2>/dev/null ; then
1520 Exit_error err_fract_rel "$PACKAGE_RELEASE"
1524 if [ -n "$TEST_TAG" ]; then
1525 TAGVER=`make_tagver`
1526 echo "Searching for tag $TAGVER..."
1527 TAGREL=$(cvs status -v $SPECFILE | grep -E "^[[:space:]]*${TAGVER}[[[:space:]]" | sed -e 's#.*(revision: ##g' -e 's#).*##g')
1528 if [ -n "$TAGREL" ]; then
1529 Exit_error err_tag_exists "$TAGVER" "$TAGREL"
1533 if [ -n "$ICONS" ]; then
1537 if [ -n "$NOSOURCE0" ] ; then
1538 SOURCES=`echo $SOURCES | xargs | sed -e 's/[^ ]*//'`
1540 get_files "$SOURCES $PATCHES";
1542 if [ "$UPDATE_POLDEK_INDEXES" = "yes" ]; then
1543 run_poldek --sn ${POLDEK_SOURCE} --mkidx="${POLDEK_INDEX_DIR}/packages.dir.gz"
1544 run_poldek --sn ${POLDEK_SOURCE} --up
1546 remove_build_requires;
1548 Exit_error err_no_spec_in_cmdl;
1553 if [ -n "$SPECFILE" ]; then
1556 if [ -n "$ICONS" ]; then
1560 get_files $SOURCES $PATCHES;
1561 branch_files $TAG "$SOURCES $PATCHES $ICONS";
1563 Exit_error err_no_spec_in_cmdl;
1568 if [ -n "$SPECFILE" ]; then
1571 if [ -n "$ICONS" ]; then
1572 OLD_UPDATE5=$UPDATE5
1573 UPDATE5= get_files $ICONS
1574 UPDATE5=$OLD_UPDATE5
1577 if [ -n "$NOSOURCE0" ] ; then
1578 SOURCES=`echo $SOURCES | xargs | sed -e 's/[^ ]*//'`
1580 get_files $SOURCES $PATCHES
1582 Exit_error err_no_spec_in_cmdl;
1589 if [ -n "$SPECFILE" ]; then
1592 if [ -n "$ICONS" ]; then
1596 # don't fetch sources from remote locations
1598 for file in $SOURCES
1600 [ -n "`src_md5 $file`" ] && continue
1601 new_SOURCES="$new_SOURCES $file"
1603 SOURCES="$new_SOURCES"
1604 get_files $SOURCES $PATCHES;
1605 tag_files "$SOURCES $PATCHES $ICONS";
1607 Exit_error err_no_spec_in_cmdl;
1611 $RPM --clean --rmsource --rmspec --force --nodeps $SPECFILE
1613 "list-sources-files" )
1616 DONT_PRINT_REVISION="yes"
1619 SAPS="$SOURCES $PATCHES"
1620 for SAP in $SAPS ; do
1621 echo $SAP | awk '{gsub(/.*\//,"") ; print}'
1624 "list-sources-local-paths" )
1627 DONT_PRINT_REVISION="yes"
1630 SAPS="$SOURCES $PATCHES"
1631 for SAP in $SAPS ; do
1632 echo $SOURCE_DIR/$(echo $SAP | awk '{gsub(/.*\//,"") ; print }')
1640 test -f `pwd`/.${SPECFILE}_INSTALLED_PACKAGES && rm `pwd`/.${SPECFILE}_INSTALLED_PACKAGES
1643 # vi:syntax=sh:ts=3:sw=4