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
265e8e5f
Commit
265e8e5f
authored
Jun 23, 2018
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save used repl files and do pretty output
parent
8d5a3dd3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
rpmbps
bin/rpmbps
+12
-10
repl
share/eterbuild/functions/repl
+4
-3
No files found.
bin/rpmbps
View file @
265e8e5f
...
...
@@ -101,12 +101,12 @@ if [ "$PKGVENDOR" = "alt" ] ; then
# FIXME: use separate macro list
# FIXME: check for all rpm-build-compat macro list
if
grep
-q
"
\(
_cupslibdir
\|
_sudoers
\)
"
$SPECNAME
;
then
if
grep
-q
configure32
$SPECNAME
;
then
BUILDREQ
=
"BuildRequires: rpm-build-compat >= 1.9.0"
elif
grep
-q
"
\(
_cupslibdir
\|
_sudoers
\)
"
$SPECNAME
;
then
BUILDREQ
=
"BuildRequires: rpm-build-compat >= 1.7.25"
elif
grep
-q
_sharedstatedir
$SPECNAME
;
then
BUILDREQ
=
"BuildRequires: rpm-build-compat >= 1.7.24"
elif
grep
-q
configure32
$SPECNAME
;
then
BUILDREQ
=
"BuildRequires: rpm-build-compat >= 1.9.0"
fi
# drop unsuported technologies
...
...
@@ -234,33 +234,36 @@ LISTGROUP=`eval_spec $SPECNAME | grep "^Group" | sed -e "s|^.*:||g" | xargs -n1
ALLREPLRULES
=
""
if
[
-n
"
$VERBOSE
"
]
;
then
echo
echo
"Checking req names for"
echo
"
$LISTDEP
"
echo
-n
"Use replacement file: "
print_pkgrepl_list
echo
echo
"Used replacement files: "
print_pkgrepl_list
fi
[
-n
"
$VERBOSE
"
]
&&
echo
&&
echo
"Used rules:"
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"
[
-n
"
$VERBOSE
"
]
&&
echo
"
Use req rule
$NR
L
"
[
-n
"
$VERBOSE
"
]
&&
echo
"
$NRL
from
$USEDPKGREP
L
"
ALLREPLRULES
=
"
$ALLREPLRULES
$NRL
;"
done
# Build replacement rules for spec
[
-n
"
$VERBOSE
"
]
&&
echo
"Checking group names for
$LISTGROUP
"
[
-n
"
$VERBOSE
"
]
&&
echo
&&
echo
-e
"Checking group names for
\n
$LISTGROUP
"
ALLGRPREPLRULES
=
""
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"
[
-n
"
$VERBOSE
"
]
&&
echo
"Use group name rule
$NR
L
"
[
-n
"
$VERBOSE
"
]
&&
echo
&&
echo
"Use group name rule
$NRL
from
$USEDPKGREP
L
"
ALLGRPREPLRULES
=
"
$ALLGRPREPLRULES
$NRL
;"
done
echo
#echo GRP: $LISTGROUP, ALLGRPREPLRULES: $ALLGRPREPLRULES
# add %defattr to files sections
...
...
@@ -305,8 +308,7 @@ repl_groups()
}
if
[
-n
"
$VERBOSE
"
]
;
then
echo
"Requires rules:
$ALLREPLRULES
"
echo
"Group rules:
$ALLGRPREPLRULES
"
echo
"Replacing..."
fi
# apply all rules, awk excludes, remove empty tag lines
...
...
share/eterbuild/functions/repl
View file @
265e8e5f
...
...
@@ -112,7 +112,7 @@ tolocal_anyrepl()
s/ *
\$
//g
s/ *|/|/g
s/| */|/g"
USEDPKGREPL
=
'scripted rules'
for
i
in
$@
;
do
REPLRULE
=
`
grep
-v
"^#"
"
$i
"
2>/dev/null |
grep
--
"^ *
$GREP
*|"
|
sed
-e
"
$WARULES
"
|
head
-n1
`
# For broken rule
...
...
@@ -120,7 +120,7 @@ tolocal_anyrepl()
#REPLRULE=`echo $REPLRULE | sed -r -e 's,|,!,g'`
ALTPKGNAME
=
`
echo
$REPLRULE
|
cut
-d
"|"
-f1
|
sed
-e
"s|
\+
|
\\\\\+
|g"
`
TARGETPKGNAME
=
`
echo
$REPLRULE
|
cut
-d
"|"
-f2
|
sed
-e
"s|
\+
|
\\\\\+
|g"
`
test
-n
"
$REPLRULE
"
&&
TARGETPKGNAME
=
$(
add_32bit_requires
"
$GREP
"
"
$TARGETPKGNAME
"
)
&&
return
0
test
-n
"
$REPLRULE
"
&&
TARGETPKGNAME
=
$(
add_32bit_requires
"
$GREP
"
"
$TARGETPKGNAME
"
)
&&
USEDPKGREPL
=
"
$(
basename
$i
)
"
&&
return
0
done
local
NEWRESULT
=
$(
hack_distr_requires
"
$GREP
"
)
...
...
@@ -230,10 +230,11 @@ convert_pkgreqs_to_target()
assert_var DISTRVENDOR BUILDARCH PKGFORMAT
local
repl_list
repl_list
=
$(
print_pkgrepl_list
)
LISTUSEDPKGREPL
=
''
local
j
for
j
in
"
$@
"
;
do
tolocal_anyrepl
$j
$repl_list
&&
estrlist list
"
$TARGETPKGNAME
"
||
echo
$j
tolocal_anyrepl
$j
$repl_list
&&
estrlist list
"
$TARGETPKGNAME
"
&&
LISTUSEDPKGREPL
=
"
$LISTUSEDPKGREPL
\n
USEDPKGREPL"
||
echo
$j
done
|
sort
-u
|
sed
-e
"s|
\\\\
+|
\+
|g"
}
...
...
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