Commit 0cdfa069 authored by Vitaly Lipatov's avatar Vitaly Lipatov

Merge branch 'master' of git.alt:packages/etersoft-build-utils

parents 94262aa7 06be9b92
...@@ -3,20 +3,22 @@ all: QuickHelp.txt QuickHelp.koi8-r.txt ...@@ -3,20 +3,22 @@ all: QuickHelp.txt QuickHelp.koi8-r.txt
$(MAKE) -C po $(MAKE) -C po
QuickHelp.koi8-r.txt: QuickHelp.koi8-r.txt:
for i in bin/* ; do echo -e "\n\n---------------------------"; $$i -h ; done >$@ for i in bin/* ; do echo -e "\n\n---------------------------"; $$i -h ; done | grep -v "^Note:" | grep -v "^Target" >$@
QuickHelp.txt: QuickHelp.txt:
for i in bin/* ; do echo -e "\n\n---------------------------"; LANG=C $$i -h ; done >$@ for i in bin/* ; do echo -e "\n\n---------------------------"; LANG=C $$i -h ; done | grep -v "^Note:" | grep -v "^Target" >$@
install: install:
$(MAKE) -C po install $(MAKE) -C po install
mkdir -p $(bindir) $(sysconfdir)/eterbuild/apt mkdir -p $(bindir) $(sysconfdir)/eterbuild/apt $(sysconfdir)/rpm
mkdir -p $(datadir)/eterbuild/functions/
mkdir -p $(datadir)/eterbuild/pkgrepl $(datadir)/eterbuild/grprepl/ mkdir -p $(datadir)/eterbuild/pkgrepl $(datadir)/eterbuild/grprepl/
install -m 755 bin/* $(bindir) install -m 755 bin/* $(bindir)
install -m 644 etc/apt/* $(sysconfdir)/eterbuild/apt/ install -m 644 etc/apt/* $(sysconfdir)/eterbuild/apt/
install -m 644 etc/rpm/* $(sysconfdir)/rpm/
install -m 644 etc/config $(sysconfdir)/eterbuild/ install -m 644 etc/config $(sysconfdir)/eterbuild/
install -m 644 etc/repos $(sysconfdir)/eterbuild/ install -m 644 etc/repos $(sysconfdir)/eterbuild/
#install -m 644 apt/apt.conf.* apt/sources.list.* %buildroot/%_sysconfdir/apt/ #install -m 644 apt/apt.conf.* apt/sources.list.* %buildroot/%_sysconfdir/apt/
install -m 644 share/eterbuild/pkgrepl/pkgrepl.* $(datadir)/eterbuild/pkgrepl/ install -m 644 share/eterbuild/pkgrepl/pkgrepl.* $(datadir)/eterbuild/pkgrepl/
install -m 644 share/eterbuild/grprepl/grprepl.* $(datadir)/eterbuild/grprepl/ install -m 644 share/eterbuild/grprepl/grprepl.* $(datadir)/eterbuild/grprepl/
install -m 644 share/eterbuild/functions/* $(datadir)/eterbuild/functions install -m 644 share/eterbuild/functions/* $(datadir)/eterbuild/functions/
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS ginit - initialize repo in git.alt for current project
Use: ginit without parameters
---------------------------
gpush - publish current project repo to git.alt
Use: gpush without parameters
---------------------------
loginhsh - install package in hasher / take shell loginhsh - install package in hasher / take shell
Usage: [-t -i -h -r] bin.rpm... Usage: [-t -i -h -r] bin.rpm...
: :
...@@ -16,11 +25,9 @@ Warning: Can't get topdir from Makefile.in ...@@ -16,11 +25,9 @@ Warning: Can't get topdir from Makefile.in
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
myhsh - build package via hasher myhsh - build package via hasher
Usage: [-m -s -u -i -c] spec... Usage: [-m -s -u -i -c] src.rpm...
: :
-m -
-s - () -s - ()
-u - () -u - ()
-i - install built packages in test hasher -i - install built packages in test hasher
...@@ -28,8 +35,7 @@ Usage: [-m -s -u -i -c] spec... ...@@ -28,8 +35,7 @@ Usage: [-m -s -u -i -c] spec...
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS rpmbb - build binary rpm from spec
rpmbb - build binary rpm from spec (with ccache using if found)
Usage: [-c -p -i -r] spec... Usage: [-c -p -i -r] spec...
: :
-c - start from compile stage -c - start from compile stage
...@@ -39,7 +45,6 @@ Usage: [-c -p -i -r] spec... ...@@ -39,7 +45,6 @@ Usage: [-c -p -i -r] spec...
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
rpmbph - backports spec and rebuild it rpmbph - backports spec and rebuild it
Usage: [-r -u -U -n -i -m -v] spec... Usage: [-r -u -U -n -i -m -v] spec...
: :
...@@ -51,7 +56,6 @@ Usage: [-r -u -U -n -i -m -v] spec... ...@@ -51,7 +56,6 @@ Usage: [-r -u -U -n -i -m -v] spec...
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
rpmbs - make src.rpm from spec rpmbs - make src.rpm from spec
Usage: [-s -u -c -n --nodeps] spec... Usage: [-s -u -c -n --nodeps] spec...
: :
...@@ -66,7 +70,6 @@ Usage: [-s -u -c -n --nodeps] spec... ...@@ -66,7 +70,6 @@ Usage: [-s -u -c -n --nodeps] spec...
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
rpmbsh - BSH - build source; use hasher rpmbsh - BSH - build source; use hasher
Usage: [-r -s -u -m -i -c] spec... Usage: [-r -s -u -m -i -c] spec...
: :
...@@ -83,7 +86,6 @@ rpmbugs [-t] spec | bug number | package name | -qf command | /path/to/file - op ...@@ -83,7 +86,6 @@ rpmbugs [-t] spec | bug number | package name | -qf command | /path/to/file - op
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
rpmcs spec - cleanup spec (like cleanup_spec command), adapted to ALT rpmcs spec - cleanup spec (like cleanup_spec command), adapted to ALT
...@@ -102,7 +104,6 @@ rpmgp [-a -c -n] [system] pkgname - download src.rpm from 'system' repository to ...@@ -102,7 +104,6 @@ rpmgp [-a -c -n] [system] pkgname - download src.rpm from 'system' repository to
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
rpmgs - get sources for spec rpmgs - get sources for spec
Usage: [-a -r ] spec... Usage: [-a -r ] spec...
: :
...@@ -123,7 +124,6 @@ rpmU - the same as [sudo] rpm -Uvh - update package ...@@ -123,7 +124,6 @@ rpmU - the same as [sudo] rpm -Uvh - update package
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
rpmunmets - tests unmets in build packages rpmunmets - tests unmets in build packages
Usage: [-M24 -M40] Usage: [-M24 -M40]
: :
...@@ -132,7 +132,6 @@ Usage: [-M24 -M40] ...@@ -132,7 +132,6 @@ Usage: [-M24 -M40]
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
rpmurl - open package Url in browser rpmurl - open package Url in browser
Usage: [-c -f -p -s] spec or package... Usage: [-c -f -p -s] spec or package...
: :
......
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS ginit - initialize repo in git.alt for current project
Use: ginit without parameters
---------------------------
gpush - publish current project repo to git.alt
Use: gpush without parameters
---------------------------
loginhsh - install package in hasher / take shell loginhsh - install package in hasher / take shell
Usage: [-t -i -h -r] bin.rpm... Usage: [-t -i -h -r] bin.rpm...
Options: Options:
...@@ -16,11 +25,9 @@ Warning: Can't get topdir from Makefile.in ...@@ -16,11 +25,9 @@ Warning: Can't get topdir from Makefile.in
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
myhsh - build package via hasher myhsh - build package via hasher
Usage: [-m -s -u -i -c] spec... Usage: [-m -s -u -i -c] src.rpm...
Options: Options:
-m - mail result log
-s - sign package(s) -s - sign package(s)
-u - sign and upload package(s) to Incoming -u - sign and upload package(s) to Incoming
-i - install built packages in test hasher -i - install built packages in test hasher
...@@ -28,8 +35,7 @@ Options: ...@@ -28,8 +35,7 @@ Options:
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS rpmbb - build binary rpm from spec
rpmbb - build binary rpm from spec (with ccache using if found)
Usage: [-c -p -i -r] spec... Usage: [-c -p -i -r] spec...
Options: Options:
-c - start from compile stage -c - start from compile stage
...@@ -39,7 +45,6 @@ Options: ...@@ -39,7 +45,6 @@ Options:
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
rpmbph - backports spec and rebuild it rpmbph - backports spec and rebuild it
Usage: [-r -u -U -n -i -m -v] spec... Usage: [-r -u -U -n -i -m -v] spec...
Options: Options:
...@@ -51,7 +56,6 @@ Options: ...@@ -51,7 +56,6 @@ Options:
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
rpmbs - make src.rpm from spec rpmbs - make src.rpm from spec
Usage: [-s -u -c -n --nodeps] spec... Usage: [-s -u -c -n --nodeps] spec...
Options: Options:
...@@ -66,7 +70,6 @@ Options: ...@@ -66,7 +70,6 @@ Options:
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
rpmbsh - BSH - build source; use hasher rpmbsh - BSH - build source; use hasher
Usage: [-r -s -u -m -i -c] spec... Usage: [-r -s -u -m -i -c] spec...
Options: Options:
...@@ -83,7 +86,6 @@ rpmbugs [-t] spec | bug number | package name | -qf command | /path/to/file - op ...@@ -83,7 +86,6 @@ rpmbugs [-t] spec | bug number | package name | -qf command | /path/to/file - op
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
rpmcs spec - cleanup spec (like cleanup_spec command), adapted to ALT rpmcs spec - cleanup spec (like cleanup_spec command), adapted to ALT
...@@ -102,7 +104,6 @@ rpmgp [-a -c -n] [system] pkgname - download src.rpm from 'system' repository to ...@@ -102,7 +104,6 @@ rpmgp [-a -c -n] [system] pkgname - download src.rpm from 'system' repository to
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
rpmgs - get sources for spec rpmgs - get sources for spec
Usage: [-a -r ] spec... Usage: [-a -r ] spec...
Options: Options:
...@@ -123,7 +124,6 @@ rpmU - the same as [sudo] rpm -Uvh - update package ...@@ -123,7 +124,6 @@ rpmU - the same as [sudo] rpm -Uvh - update package
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
rpmunmets - tests unmets in build packages rpmunmets - tests unmets in build packages
Usage: [-M24 -M40] Usage: [-M24 -M40]
Options: Options:
...@@ -132,7 +132,6 @@ Options: ...@@ -132,7 +132,6 @@ Options:
--------------------------- ---------------------------
Target ALT Linux system: SS, use /etc/apt/apt.conf.SS
rpmurl - open package Url in browser rpmurl - open package Url in browser
Usage: [-c -f -p -s] spec or package... Usage: [-c -f -p -s] spec or package...
Options: Options:
......
...@@ -6,16 +6,16 @@ http://www.freesource.info/wiki/AltLinux/Razrabotchiku/SborkaPaketov ...@@ -6,16 +6,16 @@ http://www.freesource.info/wiki/AltLinux/Razrabotchiku/SborkaPaketov
See QuickHelp.txt also. See QuickHelp.txt also.
This package is tested with follow Linux distributions: This package is tested with follow Linux distributions:
- ALT Linux 2.3/2.4/3.0/4.0/Sisyphus - ALT Linux 2.3/2.4/3.0/4.0/4.1/Sisyphus
- ASP Linux 10/11/12 - ASP Linux 10/11/12
- Scientific/4.1 - Scientific/4.1
- Fedora Core 5/6/7/8/9 - Fedora Core 5/6/7/8/9/10
- OpenSuSe 10/10.1/11 - OpenSuSe 10/10.1/11
- Mandriva 2005/2006/2007/2008 - Mandriva 2005/2006/2007/2008/2009
- MOPSLinux 5.0/6.0 - MOPSLinux 5.0/6.0/6.1
- Slackware 10.2/11 - Slackware 10.2/11
- Debian 3.1 (Sarge) / 4.0 - Debian 3.1 (Sarge) / 4.0 / 5.0
- Ubuntu 6.06/7.04/7.10/8.04 - Ubuntu 6.06/7.04/7.10/8.04/8.10
- RedHat 9 / MCBC 3.0 - RedHat 9 / MCBC 3.0
...@@ -77,4 +77,4 @@ hostname 'devel' in ~/.ssh/config as alias for cvs.altlinux.ru (typical for join ...@@ -77,4 +77,4 @@ hostname 'devel' in ~/.ssh/config as alias for cvs.altlinux.ru (typical for join
Please send any questions at lav@etersoft.ru Please send any questions at lav@etersoft.ru
Vitaly Lipatov, 20 Jul 2008 Vitaly Lipatov, 04 Dec 2008
, () - rpmbs -s ? git + , APTCONF ,
? + sources.list i586|x86_64, x86_64
+ , () - rpmbs -s ? git
+ : src.rpm
!!
, , , ,
( ) ( )
...@@ -9,7 +12,6 @@ ...@@ -9,7 +12,6 @@
Req ( ) Req ( )
, hasher , hasher
src.rpm SRPMS src.rpm SRPMS
etersoft-build-functions /usr/share/etersoft-build-utils/functions
: :
ALT - ALT -
...@@ -19,20 +21,10 @@ pkgrepl.pclinux.2007 - ...@@ -19,20 +21,10 @@ pkgrepl.pclinux.2007 -
, ( ALT) , ( ALT)
-x ̣ x86_64? -x ̣ x86_64?
# cvs_update (man cvs?)
%homedir tmp ? %homedir tmp ?
rpm -bE rpm --showrc ? rpm -bE rpm --showrc ?
> >>:) 3. ,
> >>
> >> ,
> >> , apt.conf
> >> .
> >
> > .
>
> rpmgs --help :)
=== === === ===
...@@ -40,6 +32,7 @@ pkgrepl.pclinux.2007 - ...@@ -40,6 +32,7 @@ pkgrepl.pclinux.2007 -
( , ( ,
). , , ݣ . ). , , ݣ .
=== 1.6 === === 1.6 ===
- %changelog rpmcs - %changelog rpmcs
...@@ -50,7 +43,6 @@ pkgrepl.pclinux.2007 - ...@@ -50,7 +43,6 @@ pkgrepl.pclinux.2007 -
--init-root, .in, rpm -i src.rpm, rpmbph ( hasher), .out { } --init-root, .in, rpm -i src.rpm, rpmbph ( hasher), .out { }
hasher ?? hasher ??
# - rpm -bE , - . # - rpm -bE , - .
- : src.rpm
- , - ,
- / ? - / ?
...@@ -67,16 +59,13 @@ pkgrepl.pclinux.2007 - ...@@ -67,16 +59,13 @@ pkgrepl.pclinux.2007 -
- pot - echog ( message) - pot - echog ( message)
=== 2.0 === === 2.0 ===
- /etc/rpm/*functions
- -v ( DEBUG ) - VERBOSE - -v ( DEBUG ) - VERBOSE
- TODO: - TODO:
( -- ) ( -- )
+ apt , + apt ,
# - -m rpmbph rpmbsh
- -i -u - -i -u
- ( )? - ( )?
# - ?
# - short-circuit -bc -bi :(
# - , -m -r ( -m )
( ) ( )
...@@ -99,3 +88,16 @@ $ a=qqq ...@@ -99,3 +88,16 @@ $ a=qqq
$ while read l; do a="$l"; done < <(echo "$list") $ while read l; do a="$l"; done < <(echo "$list")
$ echo $a $ echo $a
line3 line3
> >>:) 3. ,
> >>
> >> ,
> >> , apt.conf
> >> .
> >
> > .
>
> rpmgs --help :)
# - short-circuit -bc -bi :(
#!/bin/sh #!/bin/sh
. ./etersoft-build-functions # load common functions, compatible with local and installed script
#. `dirname $0`/../share/eterbuild/functions/common
#test -n "$SPECNAME" || SPECNAME=$(basename `pwd`).spec #test -n "$SPECNAME" || SPECNAME=$(basename `pwd`).spec
if [ "$1" = "-h" ] ; then
echo "ginit - initialize repo in git.alt for current project"
echo "Use: ginit without parameters"
exit 1
fi
PROJECTNAME=$(basename `pwd`) PROJECTNAME=$(basename `pwd`)
ssh git.alt git-init-db $PROJECTNAME.git ssh git.alt git-init-db $PROJECTNAME.git
#!/bin/sh #!/bin/sh
. /etc/rpm/etersoft-build-functions # load common functions, compatible with local and installed script
#. `dirname $0`/../share/eterbuild/functions/common
#test -n "$SPECNAME" || SPECNAME=$(basename `pwd`).spec #test -n "$SPECNAME" || SPECNAME=$(basename `pwd`).spec
if [ "$1" = "-h" ] ; then
echo "gpush - publish current project repo to git.alt"
echo "Use: gpush without parameters"
exit 1
fi
PROJECTNAME=$(basename `pwd`) PROJECTNAME=$(basename `pwd`)
git push --all git.alt:packages/$PROJECTNAME.git git push $@ git.alt:packages/$PROJECTNAME.git
git push --tags git.alt:packages/$PROJECTNAME.git git push --tags git.alt:packages/$PROJECTNAME.git
#> $ git commit -a; A='0.23-alt1'; git tag -s $A; \ #> $ git commit -a; A='0.23-alt1'; git tag -s $A; \
......
...@@ -94,9 +94,8 @@ check_locking ...@@ -94,9 +94,8 @@ check_locking
echog "Prepare hasher in $HASHERDIR ..." echog "Prepare hasher in $HASHERDIR ..."
# there is package names in LISTRPMARGS # there is package names in LISTRPMARGS
UTILPKG="mc" UTILPKG="mc"
[ "$USER" = "lav" ] && UTILPKG="mc ms-fonts-ttf"
if [ -n "$TESTMODE" ] ; then if [ -n "$TESTMODE" ] ; then
UTILPKG="$UTILPKG XFree86-xauth" UTILPKG="$UTILPKG XFree86-xauth fonts-ttf-liberation"
else else
UTILPKG="$UTILPKG etersoft-build-utils" UTILPKG="$UTILPKG etersoft-build-utils"
fi fi
......
#!/bin/sh #!/bin/sh -x
# 2003-2006, 2008 (c) Etersoft www.etersoft.ru # 2003-2006, 2008 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru> # Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain # Public domain
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
. $ETERBUILDDIR/functions/hasher . $ETERBUILDDIR/functions/hasher
############################# #############################
Usage="Usage: $name [-m -s -u -i -c] spec..." Usage="Usage: $name [-m -s -u -i -c] src.rpm..."
function mygetopts() function mygetopts()
{ {
name=${0##*/} name=${0##*/}
...@@ -83,17 +83,23 @@ fi ...@@ -83,17 +83,23 @@ fi
echog "List of packages: \$LISTNAMES" echog "List of packages: \$LISTNAMES"
if [ -z "${LISTNAMES/^.*spec/}" ] ; then if [ -z "${LISTNAMES/*spec/}" ] ; then
echo "!!!!!!!!" echo "!!!!!!!!"
fatal "Please use src.rpm as argument, not spec" fatal "Please use src.rpm as argument, not spec"
fi fi
echog -n "Checking with sisyphus_check..." # Skip checking for tar arg
sisyphus_check --no-check=$HASHER_NOCHECK --files $LISTNAMES || fatal "check for sisyphus failed" if [ -n "${LISTNAMES/*tar/}" ] ; then
echog "OK" echog -n "Checking with sisyphus_check..."
sisyphus_check --no-check=$HASHER_NOCHECK --files $LISTNAMES || fatal "check for sisyphus failed"
echog "OK"
fi
# export OURAPTCONF with temp. file contains correct path to sources.list
prepare_aptconfig
# TODO: for add $LISTRPMARGS we need skip function for delete "our" params # TODO: for add $LISTRPMARGS we need skip function for delete "our" params
HASHERARG="--no-sisyphus-check=$HASHER_NOCHECK --apt-config=$APTCONF --target $DEFAULTARCH $HASHERARG" HASHERARG="--no-sisyphus-check=$HASHER_NOCHECK --apt-config=$OURAPTCONF --target $DEFAULTARCH $HASHERARG"
if [ "$MENV" != "SS" ] && [ "$MENV" != "DD" ]; then if [ "$MENV" != "SS" ] && [ "$MENV" != "DD" ]; then
HASHERARG="--build-args \"--with=build_$MENV\" --build-args \"--with=build_backport\" $HASHERARG" HASHERARG="--build-args \"--with=build_$MENV\" --build-args \"--with=build_backport\" $HASHERARG"
fi fi
......
...@@ -28,8 +28,9 @@ BASERELEASE=$(get_release_number $SPECNAME) ...@@ -28,8 +28,9 @@ BASERELEASE=$(get_release_number $SPECNAME)
if [ "$VENDOR" = "alt" ] ; then if [ "$VENDOR" = "alt" ] ; then
BUILDREQ="BuildRequires: rpm-build-compat >= 0.95" BUILDREQ="BuildRequires: rpm-build-compat >= 0.95"
[ -z "$BUILDCOMMAND" ] && BUILDCOMMAND=rpmbsh [ -z "$BUILDCOMMAND" ] && BUILDCOMMAND=rpmbsh
# Change release according to alt policy # Change release according to alt policy with extensions
set_release $SPECNAME alt0.$MDISTR.$BASERELEASE # General rule: alwars alt(N-1).MM.(N)
set_release $SPECNAME alt$(($BASERELEASE - 1)).$MDISTR.$BASERELEASE
ADDDEF="" ADDDEF=""
CLEANTEXT="" CLEANTEXT=""
else else
......
...@@ -121,7 +121,7 @@ function release_check() ...@@ -121,7 +121,7 @@ function release_check()
{ {
if [ "$MENV" = "SS" ] || [ "$MENV" = "DD" ] ; then if [ "$MENV" = "SS" ] || [ "$MENV" = "DD" ] ; then
for i in $@ ; do for i in $@ ; do
if [ -z "${i/*alt0.M[0-9][0-9]*/}" ] ; then if [ -z "${i/*alt[0-9].M[0-9][0-9]*/}" ] ; then
# #
fatal "Incorrect release in $i package: was prepared for Sisyphus" fatal "Incorrect release in $i package: was prepared for Sisyphus"
fi fi
...@@ -129,7 +129,7 @@ function release_check() ...@@ -129,7 +129,7 @@ function release_check()
return return
fi fi
for i in $@ ; do for i in $@ ; do
if [ -n "${i/*alt0.$MENV*/}" ] ; then if [ -n "${i/*alt[0-9].$MENV*/}" ] ; then
# #
fatal "Incorrect release in $i package: was prepared for $MENV" fatal "Incorrect release in $i package: was prepared for $MENV"
fi fi
...@@ -153,6 +153,12 @@ fi ...@@ -153,6 +153,12 @@ fi
if [ -n "$SIGN" ]; then if [ -n "$SIGN" ]; then
release_check $LISTBUILT release_check $LISTBUILT
# create tag according to package release
if is_git $SPECDIR ; then
# needed corrent user.name/user.email for get GPG id
gear-create-tag --force
# git push ?
fi
echog "Will try to sign follow packages with GPG: \$LISTBUILT" echog "Will try to sign follow packages with GPG: \$LISTBUILT"
cd $RPMDIR/SRPMS cd $RPMDIR/SRPMS
# 1. only rpm command has --addsign 2. do 3 retries # 1. only rpm command has --addsign 2. do 3 retries
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
. $ETERBUILDDIR/functions/rpm
. $ETERBUILDDIR/functions/repl
dummy_spec() dummy_spec()
{ {
...@@ -202,6 +204,8 @@ do ...@@ -202,6 +204,8 @@ do
s|%_libdir/mono|%_monodir|g" $i s|%_libdir/mono|%_monodir|g" $i
subst "s|%prefix/lib|%_libdir|g subst "s|%prefix/lib|%_libdir|g
s|%prefix/%_lib|%_libdir|g
s|/usr/%_lib|%_libdir|g
s|%prefix/include|%_includedir|g s|%prefix/include|%_includedir|g
s|/usr/include|%_includedir|g s|/usr/include|%_includedir|g
s|/usr/src|%_usrsrc|g s|/usr/src|%_usrsrc|g
...@@ -276,7 +280,8 @@ do ...@@ -276,7 +280,8 @@ do
subst "s|%perl_vendorlib|%perl_vendor_privlib|g subst "s|%perl_vendorlib|%perl_vendor_privlib|g
s|%perl_vendorarch|%perl_vendor_archlib|g" $i s|%perl_vendorarch|%perl_vendor_archlib|g" $i
subst "s|%_datadir/doc|%_docdir|g" $i subst "s|%_datadir/doc$|%_docdir|g" $i
subst "s|%_datadir/doc/|%_docdir/|g" $i
subst "s|%_datadir/omf|%_omfdir|g" $i subst "s|%_datadir/omf|%_omfdir|g" $i
subst "s|%_defaultdocdir|%_docdir|g" $i subst "s|%_defaultdocdir|%_docdir|g" $i
subst "s|%__autoreconf|%autoreconf|g" $i subst "s|%__autoreconf|%autoreconf|g" $i
...@@ -284,6 +289,7 @@ do ...@@ -284,6 +289,7 @@ do
subst "s|%rpmcflags|%optflags|g" $i subst "s|%rpmcflags|%optflags|g" $i
subst "s|^%clean$||g" $i subst "s|^%clean$||g" $i
subst "s|^%debug_package$||g" $i
subst "s|^rm -rf %buildroot$||g" $i subst "s|^rm -rf %buildroot$||g" $i
subst "s|^%defattr(-,root,root)||g" $i subst "s|^%defattr(-,root,root)||g" $i
subst "s|^%defattr(644,root,root,755)||g" $i subst "s|^%defattr(644,root,root,755)||g" $i
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
. $ETERBUILDDIR/functions/rpm load_mod rpm
load_mod repl
# path to ALT Linux's repositories # path to ALT Linux's repositories
REPOSITORY="files/SRPMS obsolete orphaned" REPOSITORY="files/SRPMS obsolete orphaned"
...@@ -162,33 +163,6 @@ fi ...@@ -162,33 +163,6 @@ fi
test -z "$1" && fatal "Please run with spec/package name" test -z "$1" && fatal "Please run with spec/package name"
# Check concrete system
# two params: system, package
if [ -n "$2" ] ; then
NAME=$2
load_systems_list
IDX=`get_system_idx "$1"`
if [ -n "$IDX" ] ; then
check_system $IDX
else
fatal "Unknown system '$1', use rpmgp -s for get list"
fi
exit 0
else
NAME=$1
fi
# Check all systems
if [ -n "$ALLSYSTEM" ] ; then
load_systems_list
# search throw all systems
for ((i=0; i < ${#SYSNAME[*]}; i++)) ; do
echo
check_system $i
done
exit 0
fi
# #
# , ( ?), # , ( ?),
# - # -
...@@ -238,6 +212,35 @@ if [ "$1" = "-c" ] ; then ...@@ -238,6 +212,35 @@ if [ "$1" = "-c" ] ; then
exit 0 exit 0
fi fi
# Check concrete system
# two params: system, package
if [ -n "$2" ] ; then
NAME=$2
load_systems_list
IDX=`get_system_idx "$1"`
if [ -n "$IDX" ] ; then
check_system $IDX
else
#fatal "Unknown system '$1', use rpmgp -s for get list"
NAME=
fi
exit 0
else
NAME=$1
fi
# Check all systems
if [ -n "$ALLSYSTEM" ] ; then
load_systems_list
# search throw all systems
for ((i=0; i < ${#SYSNAME[*]}; i++)) ; do
echo
check_system $i
done
exit 0
fi
echo echo
echo "########################################" echo "########################################"
if [ -z "${1/*src.rpm/}" ] if [ -z "${1/*src.rpm/}" ]
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
# load common functions, compatible with local and installed script # load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
load_mod hasher
make_ordinalbox() make_ordinalbox()
{ {
...@@ -71,12 +72,6 @@ ORDINALWORKDIR=$OURTMPDIR/WD1 ...@@ -71,12 +72,6 @@ ORDINALWORKDIR=$OURTMPDIR/WD1
TESTINGWORKDIR=$OURTMPDIR/WD2 TESTINGWORKDIR=$OURTMPDIR/WD2
ORDINALAPTCONF=$APTCONF ORDINALAPTCONF=$APTCONF
TESTINGAPTCONF=$OURTMPDIR/apt.conf
# Hack: subst patch to sources.list
cat $ORDINALAPTCONF | \
sed -e "s|\"/etc/.*apt/sources.*\"|\"$OURTMPDIR/sources.list\"|g" >$TESTINGAPTCONF
cat $ETERBUILDETC/apt/sources.list.$MENV >$OURTMPDIR/sources.list || fatal ""
HASHERDIR=$HASHERDIR$MENVARG HASHERDIR=$HASHERDIR$MENVARG
if [ ! -d $HASHERDIR/repo ] || [ -n "$SKIPTST" ] ; then if [ ! -d $HASHERDIR/repo ] || [ -n "$SKIPTST" ] ; then
...@@ -89,7 +84,10 @@ if [ ! -d $HASHERDIR/repo ] || [ -n "$SKIPTST" ] ; then ...@@ -89,7 +84,10 @@ if [ ! -d $HASHERDIR/repo ] || [ -n "$SKIPTST" ] ; then
exit 0 exit 0
fi fi
echo "rpm file:$HASHERDIR/repo/ $DEFAULTARCH hasher" >>$OURTMPDIR/sources.list # Prepare our confdir
prepare_aptconfig
TESTINGAPTCONF=$OURAPTCONF
echo "rpm file:$HASHERDIR/repo/ $DEFAULTARCH hasher" >>$OURSOURCES
make_ordinalbox make_ordinalbox
make_testingbox make_testingbox
......
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
# You can uncomment it: # You can uncomment it:
#DEFAULTARCH=i586 #DEFAULTARCH=i586
#RPMDIR=$HOME/RPM #RPMDIR=$HOME/RPM
#APTCONF=/etc/apt/apt.conf # Use this config
#APTCONFBASE=/etc/apt/apt.conf
#REMOTERPMDIR="~/RPM" #REMOTERPMDIR="~/RPM"
# , # ,
......
# all known src.rpm repositories (for rpmgp command) # all known src.rpm repositories (for rpmgp command)
alt ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/files/SRPMS alt ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/files/SRPMS
fedora ftp://mirror.yandex.ru/fedora/linux/releases/9/Everything/source/SRPMS #fedora ftp://mirror.yandex.ru/fedora/linux/releases/9/Everything/source/SRPMS
#fedora ftp://mirror.yandex.ru/fedora/linux/releases/test/10-Beta/Fedora/source/SRPMS
fedora ftp://mirror.yandex.ru/fedora/linux/releases/10/Fedora/source/SRPMS/
fedora-ccrma http://ccrma.stanford.edu/planetccrma/mirror/fedora/linux/planetccrma/9/SRPMS fedora-ccrma http://ccrma.stanford.edu/planetccrma/mirror/fedora/linux/planetccrma/9/SRPMS
mandriva ftp://mirror.yandex.ru/mandriva/official/2008.1/SRPMS/main/release mandriva ftp://mirror.yandex.ru/mandriva/official/2009.0/SRPMS/main/release
mandriva-contrib ftp://mirror.yandex.ru/mandriva/official/2008.1/SRPMS/contrib/release mandriva-contrib ftp://mirror.yandex.ru/mandriva/official/2009.0/SRPMS/contrib/release
suse ftp://mirror.yandex.ru/opensuse/distribution/11.0/repo/src-oss/suse/src suse ftp://mirror.yandex.ru/opensuse/distribution/11.0/repo/src-oss/suse/src
suse-edu1 http://opensuse.unixheads.net/repositories/Education:/desktop/openSUSE_10.3/src suse-edu1 http://opensuse.unixheads.net/repositories/Education:/desktop/openSUSE_10.3/src
suse-edu2 http://www.opensuse-education.org/download/repos/1.0/11.0/suse/src suse-edu2 http://www.opensuse-education.org/download/repos/1.0/11.0/suse/src
alt-obsolete ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/obsolete alt-obsolete ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/obsolete
alt-orphaned ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/orphaned alt-orphaned ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/orphaned
pld ftp://ftp.pld-linux.org/branches/titanium/PLD/SRPMS/RPMS pld ftp://ftp.pld-linux.org/branches/titanium/PLD/SRPMS/RPMS
rpmfusion http://download1.rpmfusion.org/free/fedora/releases/10/Everything/source/SRPMS/
# for backward compatibility
. /usr/share/eterbuild/functions/common
load_mod rpm
load_mod publish-compat
...@@ -50,6 +50,8 @@ RECOMMENDED packages: gcc-c++ perl-libwww ccache elinks mutt hasher ...@@ -50,6 +50,8 @@ RECOMMENDED packages: gcc-c++ perl-libwww ccache elinks mutt hasher
%doc tools/upload-to-alt tools/ls-incoming tools/check_spec.sh %doc tools/upload-to-alt tools/ls-incoming tools/check_spec.sh
%_bindir/* %_bindir/*
%_datadir/eterbuild/ %_datadir/eterbuild/
# for backward compatibility (will removed in 2.0)
%dir %_sysconfdir/rpm/
%dir %_sysconfdir/eterbuild/ %dir %_sysconfdir/eterbuild/
%dir %_sysconfdir/eterbuild/apt/ %dir %_sysconfdir/eterbuild/apt/
%config(noreplace) %_sysconfdir/eterbuild/apt/apt.conf.* %config(noreplace) %_sysconfdir/eterbuild/apt/apt.conf.*
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -75,7 +75,7 @@ TARGET=`distr_vendor -p` ...@@ -75,7 +75,7 @@ TARGET=`distr_vendor -p`
VENDOR=`distr_vendor -s` VENDOR=`distr_vendor -s`
if [ "$VENDOR" = "alt" ] && [ -n "$MENV" ] ; then if [ "$VENDOR" = "alt" ] && [ -n "$MENV" ] ; then
APTCONF=${APTCONF/.SS}.$MENV [ -n "$APTCONF" ] || APTCONF=${APTCONFBASE/.SS}.$MENV
echog "Target ALT Linux system: `get_distr_version $MENV`, use \$APTCONF" echog "Target ALT Linux system: `get_distr_version $MENV`, use \$APTCONF"
MENVARG="-$MENV" MENVARG="-$MENV"
...@@ -177,3 +177,8 @@ add_changelog_helper() ...@@ -177,3 +177,8 @@ add_changelog_helper()
return $R return $R
} }
load_mod()
{
. $ETERBUILDDIR/functions/$1
}
...@@ -16,25 +16,25 @@ OURTMPDIR=$TMPDIR ...@@ -16,25 +16,25 @@ OURTMPDIR=$TMPDIR
[ -z "$OURTMPDIR" ] || [ -d "$OURTMPDIR" ] || OURTMPDIR=/tmp [ -z "$OURTMPDIR" ] || [ -d "$OURTMPDIR" ] || OURTMPDIR=/tmp
# It can be overrides in config # It can be overrides in config
DEFAULTARCH=i586 [ -n "$DEFAULTARCH" ] || DEFAULTARCH=i586
[ `uname -m` = "x86_64" ] && DEFAULTARCH=`uname -m` [ `uname -m` = "x86_64" ] && DEFAULTARCH=`uname -m`
NICE="nice" NICE="nice"
RPMBUILD=rpmbuild RPMBUILD=rpmbuild
# TODO: check for .gear, not .git?
is_git() is_git()
{ {
local DIR=$1 local DIR=$1
[ -n "$DIR" ] && [ -d "$DIR/.git" ] && return 0 [ -n "$DIR" ] && [ -d "$DIR/.git" ] && return 0
[ -d ".git" ] && return 0 [ -d ".git" ] && return 0
# hack for support spec in some subdir # hack for support spec in some subdir
[ -d "../.git" ] && return 0 [ -d "../.gear" ] && return 0
return 1 return 1
} }
RPMDIR="$HOME/RPM" RPMDIR="$HOME/RPM"
# apt.conf.SS is exists by default [ -n "$APTCONFBASE" ] || APTCONFBASE=$ETERBUILDETC/apt/apt.conf
[ -n "$APTCONF" ] || APTCONF=$ETERBUILDETC/apt/apt.conf.SS
#OWNERMAIL=`grep "^%packager" ~/.rpmmacros | head -n 1 | sed -e "s/%packager[ \t]*//g"` #OWNERMAIL=`grep "^%packager" ~/.rpmmacros | head -n 1 | sed -e "s/%packager[ \t]*//g"`
OWNERMAIL=`rpm --eval %packager` OWNERMAIL=`rpm --eval %packager`
......
...@@ -21,11 +21,34 @@ check_locking() ...@@ -21,11 +21,34 @@ check_locking()
fi fi
} }
# workaround about hard coded path to source.list in apt.conf # workaround about hard coded path to sources.list in apt.conf
print_tmp_aptconf() print_tmp_aptconf()
{ {
test -r "$1" || fatal "$1 is missed" test -r "$1" || fatal "$1 is missed"
# Note: /etc/apt and /etc/eterbuild/apt is supported # Note: /etc/apt and /etc/eterbuild/apt is supported
cat "$1" | \ cat "$1" | \
sed -e "s|\"/etc/.*apt/sources.list|\"$ETERBUILDETC/apt/sources.list|g" sed -e "s|\"/etc/.*apt/sources.list|\"$OURTMPDIR/sources.list|g"
# sed -e "s|\"/etc/.*apt/sources.list|\"$ETERBUILDETC/apt/sources.list|g"
}
# workaround about hard coded arch in sources.list
print_tmp_sourceslist()
{
local SLIST
test -r "$1" || fatal "$1 is missed"
# Note: /etc/apt and /etc/eterbuild/apt is supported
SLIST=`cat "$1" | \
sed -e "s|\"/etc/.*apt/sources.list|\"$ETERBUILDETC/apt/sources.list|g" | \
grep "apt/sources.list" "$1" | sed -e 's|.*"\(.*\)".*|\1|g'`
test -r "$SLIST" || fatal "'$SLIST' - sources.list path from $1 is missed"
cat "$SLIST" | \
sed -e "s|i586|$DEFAULTARCH|g"
}
prepare_aptconfig()
{
print_tmp_aptconf $APTCONF >$OURTMPDIR/apt.conf.$MENV || fatal "Can't create apt.conf"
print_tmp_sourceslist $APTCONF >$OURTMPDIR/sources.list.$MENV || fatal "Can't create sources.list"
export OURAPTCONF=$OURTMPDIR/apt.conf.$MENV
export OURSOURCES=$OURTMPDIR/sources.list.$MENV
} }
...@@ -20,13 +20,24 @@ uni_rpmbuild() ...@@ -20,13 +20,24 @@ uni_rpmbuild()
# FIXME: do not override -v # FIXME: do not override -v
ONEPARAM="--define=_source_payload w9.gzdio" ONEPARAM="--define=_source_payload w9.gzdio"
fi fi
# TODO: add support for git
if [ "$COMMAND" = "buildreq" ] ; then
$NICE $COMMAND $@
return
fi
if is_git $SPECDIR ; then if is_git $SPECDIR ; then
[ -f "$SPECNAME" ] || fatal "run uni_rpmbuild with spec as 2nd parameter" [ -f "$SPECNAME" ] || fatal "run uni_rpmbuild with spec as 2nd parameter"
shift # skip spec name shift # skip spec name
[ -n "$SPECDIR" ] && [ "$SPECDIR" != "." ] && warning "Spec is not in git dir" [ -n "$SPECDIR" ] && [ "$SPECDIR" != "." ] && warning "Spec is not in git dir"
$NICE gear --commit --rpmbuild -- $COMMAND "$ONEPARAM" $@ if [ "$MENV" = "SS" ] ; then
$NICE gear --commit --rpmbuild -- $COMMAND "$ONEPARAM" $@
else
# build src.rpm via hasher (on ALT)
# $NICE gear-hsh --build-args="-bs" --rpmbuild -- $COMMAND "$ONEPARAM" $@
$NICE gear --hasher -- myhsh --build-prog=$ETERBUILDDIR/functions/rebuild $@
fi
else else
$COMMAND "$ONEPARAM" $@ $NICE $COMMAND "$ONEPARAM" $@
fi fi
[ -n "$VERBOSE" ] && echo "Run $COMMAND $ONEPARAM $@" || : [ -n "$VERBOSE" ] && echo "Run $COMMAND $ONEPARAM $@" || :
} }
......
...@@ -29,7 +29,7 @@ get_release() ...@@ -29,7 +29,7 @@ get_release()
# get current release number # get current release number
get_release_number() get_release_number()
{ {
$(get_release $1 | sed -e "s/alt//" | sed -e "s/%{_vendor}//" | sed -e "s/eter//" | sed -e "s/%_vendor//") get_release $1 | sed -e "s/alt//" | sed -e "s/%{_vendor}//" | sed -e "s/eter//" | sed -e "s/%_vendor//"
} }
......
...@@ -78,3 +78,5 @@ libgtkmm2-devel|gtkmm24-devel ...@@ -78,3 +78,5 @@ libgtkmm2-devel|gtkmm24-devel
libpng12|libpng libpng12|libpng
sysvinit-utils|SysVinit sysvinit-utils|SysVinit
libltdl-devel|libtool-ltdl-devel
#!/bin/sh #!/bin/sh
. `dirname $0`/../share/eterbuild/functions/common . `dirname $0`/../share/eterbuild/functions/common
. $ETERBUILDDIR/functions/hasher load_mod hasher
parse_cmd_pre ""
print_tmp_aptconf $APTCONF print_tmp_aptconf $APTCONF
echo "-------------------------------" echo "-------------------------------"
print_tmp_aptconf /etc/apt/apt.conf.SS #print_tmp_aptconf /etc/apt/apt.conf.SS
print_tmp_sourceslist $APTCONF
prepare_aptconfig
echo
echo "apt $OURAPTCONF:"
cat $OURAPTCONF
echo
echo "sources $OURSOURCES:"
cat $OURSOURCES
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment