Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
e508f1cc
Commit
e508f1cc
authored
Sep 03, 2016
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix pkgrepl for packages in {}
parent
c20a08a9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
11 deletions
+30
-11
rpmbps
bin/rpmbps
+3
-3
repl
share/eterbuild/functions/repl
+1
-1
specpkgr.spec.in
tests/specpkgr.spec.in
+6
-0
test_pkgrepl.sh
tests/test_pkgrepl.sh
+5
-2
test_repl.sh
tests/test_repl.sh
+13
-4
test_repl_find.sh
tests/test_repl_find.sh
+2
-1
No files found.
bin/rpmbps
View file @
e508f1cc
#!/bin/bash
# 2003-2010, 2012, 2015 (c) Etersoft www.etersoft.ru
# 2003-2010, 2012, 2015
, 2016
(c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
#
...
...
@@ -240,7 +240,7 @@ pkgrepl_list=$(print_pkgrepl_list)
for
i
in
$LISTDEP
;
do
tolocal_anyrepl
$i
$pkgrepl_list
||
continue
#NRL="s!\(.*Req.*\)$REPLRULE1\( |,|\$\)!\1$REPLRULE2\2!g"
NRL
=
"s!(.*Req.*)
$ALTPKGNAME
( |,|
\$
)!
\1
$TARGETPKGNAME
\2
!g"
NRL
=
"s!(.*Req.*)
$ALTPKGNAME
( |,|
}|
\$
)!
\1
$TARGETPKGNAME
\2
!g"
[
-n
"
$VERBOSE
"
]
&&
echo
"Use req rule
$NRL
"
ALLREPLRULES
=
"
$ALLREPLRULES
$NRL
;"
done
...
...
@@ -252,7 +252,7 @@ grprepl_list=$(print_grprepl_list)
for
i
in
$LISTGROUP
;
do
tolocal_anyrepl
$i
$grprepl_list
||
continue
#NRL="s!\(Group.*\)$REPLRULE1\( |,|\$\)!\1$REPLRULE2\2!g"
NRL
=
"s!(Group.*)
$ALTPKGNAME
( |,|
\$
)!
\1
$TARGETPKGNAME
\2
!g"
NRL
=
"s!(Group.*)
$ALTPKGNAME
( |,|
}|
\$
)!
\1
$TARGETPKGNAME
\2
!g"
[
-n
"
$VERBOSE
"
]
&&
echo
"Use group name rule
$NRL
"
ALLGRPREPLRULES
=
"
$ALLGRPREPLRULES
$NRL
;"
done
...
...
share/eterbuild/functions/repl
View file @
e508f1cc
...
...
@@ -150,7 +150,7 @@ clean_pkgreq()
#echo "$i" | egrep "gcc\$|cpp\$|gcc-c++\$" >/dev/null && continue
echo
"
$i
"
|
grep
"[()<=>]"
>
/dev/null
&&
continue
echo
"
$i
"
|
grep
"^ *[0-9]
\.
[0-9]"
>
/dev/null
&&
continue
echo
-n
"
$i
"
|
sed
-e
"s|
,
||g"
echo
-n
"
$i
"
|
sed
-e
"s|
[,}]
||g"
done
| filter_strip_spaces
}
...
...
tests/specpkgr.spec.in
View file @
e508f1cc
...
...
@@ -28,6 +28,12 @@ Requires: libstdc++
BuildPreReq: rpm-build-compat gcc4.1 gcc
BuildRequires: imake, xorg-cf-files gccmakedep
%def_with krb
%{?_with_krb:Requires: libkrb5-devel}
#Requires: libkrb5-devel
Source: %name.source
%description
...
...
tests/test_pkgrepl.sh
View file @
e508f1cc
...
...
@@ -11,7 +11,7 @@ export VERBOSE=1
export
IGNOREGEAR
=
1
#sh ../bin/rpmbph -n -M51 specpkgr.spec
export
ROOTDIR
=
/net/os/stable/SUSE/11.3
#export ROOTDIR=/net/os/stable/CentOS/7
#sh ../bin/rpmbph -n specpkgr.spec
check
()
...
...
@@ -21,9 +21,12 @@ check()
'
$2
'"
||
echo
"OK for '
$1
' with '
$2
'"
}
#print_pkgrepl_list
LISTBUILDDEP
=
`
print_buildreq
$SPECNAME
`
check
"BuildDep"
"imake xorg-cf-files gccmakedep rpm-build-compat gcc4.1 gcc"
"
$LISTBUILDDEP
"
echo
-
LISTREQDEP
=
`
print_pkgreq
$SPECNAME
`
check
"Reqs"
"binutils dbus-tools-gui expect foomatic-db-engine libstdc++ netcat nx openssl /usr/bin/xvt Xdialog"
"
$LISTREQDEP
"
check
"Reqs"
"binutils dbus-tools-gui expect foomatic-db-engine lib
krb5-devel lib
stdc++ netcat nx openssl /usr/bin/xvt Xdialog"
"
$LISTREQDEP
"
tests/test_repl.sh
View file @
e508f1cc
...
...
@@ -5,20 +5,21 @@
check
()
{
NRL
=
"-e s!(.*Req.*?)
$ALTPKGNAME
( |,|}|
\$
)!
\1
$TARGETPKGNAME
\2
!g;
-e s!(.*Req.*?)
$ALTPKGNAME
( |,|}|
\$
)!
\1
$TARGETPKGNAME
\2
!g;
"
local
REPL
echo
echo
"Source line: '
$TEST1
'"
#REPL=`echo $TEST1 | sed -r -e $NRL`
REPL
=
`
echo
$TEST1
| perl
-p
i
"
$NRL
"
`
REPL
=
`
echo
$TEST1
| perl
-p
"
$NRL
"
`
[
"
$REPL1
"
!=
"
$REPL
"
]
&&
echo
"FATAL with '
$NRL
' with result '
$REPL
'"
||
echo
"OK with '
$REPL
'"
}
ALTPKGNAME
=
"rpm-build"
TARGETPKGNAME
=
"rpm"
NRL
=
"-e s!(.*Req.*?)
$ALTPKGNAME
( |,|
\$
)!
\1
$TARGETPKGNAME
\2
!g;
-e s!(.*Req.*?)
$ALTPKGNAME
( |,|
\$
)!
\1
$TARGETPKGNAME
\2
!g;
"
##NRL="s!\(.*Req.*\)$REPLRULE1\( |,|\$\)!\1$REPLRULE2\2!
...
...
@@ -41,3 +42,11 @@ check
TEST1
=
"BuildPreReq: libstdc++"
REPL1
=
"BuildPreReq: libstdc++"
check
ALTPKGNAME
=
"libkrb5-devel"
TARGETPKGNAME
=
"krb5-devel"
#s!(.*Req.*)libkrb5-devel( |,|$)!\1krb5-devel\2!g
TEST1
=
"%{?_with_krb:Requires: libkrb5-devel}"
REPL1
=
"%{?_with_krb:Requires: krb5-devel}"
check
tests/test_repl_find.sh
View file @
e508f1cc
...
...
@@ -99,7 +99,7 @@ check_repl libX11-devel libX11
############################# Fedora ##########################
DISTRNAME
=
Fedora
PKGVENDOR
=
fedora
DISTRVERSION
=
2
1
DISTRVERSION
=
2
3
BUILDARCH
=
x86_64
PKGFORMAT
=
rpm
...
...
@@ -119,6 +119,7 @@ check_repl unknown-devel "unknown-devel"
check_repl rpm-build-compat rpm-build-altlinux-compat
check_repl libusb-devel libusbx-devel
check_repl libkrb5-devel
"krb5-devel"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment