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
9dfba4d3
Commit
9dfba4d3
authored
May 05, 2012
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmbph: add fix commands in the build section in a more universal way
parent
b49b1f46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
22 deletions
+29
-22
rpmbph
bin/rpmbph
+25
-22
check
share/eterbuild/functions/check
+4
-0
No files found.
bin/rpmbph
View file @
9dfba4d3
...
...
@@ -26,6 +26,9 @@ SPECNAME=$1
BASERELEASE
=
$(
get_numrelease
$SPECNAME
)
RELEASE
=
$(
get_release
$SPECNAME
)
ADDFIXCOMMAND
=
""
# hack against very straight patch command
FIXPATCHFUZZ
=
"%define _default_patch_fuzz 3"
echo
"Converting spec
$(
basename
$SPECNAME
)
to
$MDISTR
..."
...
...
@@ -43,7 +46,8 @@ if [ "$VENDOR" = "alt" ] ; then
CLEANTEXT
=
""
# due new libtool, affected on ALT Linux
if
echo
"
$MDISTR
"
| egrep
-q
"M24|M30|M40|M41|M50"
;
then
RECONFT
=
"%undefine __libtoolize"
ADDFIXCOMMAND
=
"
$ADDFIXCOMMAND
%undefine __libtoolize"
fi
else
# Need our compat package and disable strong patch checking
...
...
@@ -59,51 +63,57 @@ else
CLEANTEXT
=
""
fi
# FIXME 05.05.2012: it is needed now?
if
[
"
$VENDOR
"
=
"mdv"
]
||
[
"
$VENDOR
"
=
"pclinux"
]
;
then
# due new libtool, affected on Mandriva 2009.0
test
-z
"
$VERBOSE
"
||
echo
"Disable libtoolize"
# FIXME
#RECONFT="%define _disable_libtoolize 1"
RECONFT
=
"%define __libtoolize true"
ADDFIXCOMMAND
=
"
$ADDFIXCOMMAND
%define __libtoolize true"
fi
# Do not add BuildReq if already exist
cat
$SPECNAME
|
grep
rpm-build-compat &>/dev/null
&&
BUILDREQ
=
""
FIXMKTEMP
=
""
DISTRSYS
=
"
$(
$DISTRVENDOR
-d
)
"
# fix readlink -m, introduced by new libtool and missed in RHEL4 (replace with readlink -f)
if
[
"
$DISTRSYS
/
$DISTRVERSION
"
=
"ASPLinux/11.2"
]
;
then
test
-z
"
$VERBOSE
"
||
echo
"Add subst readlink -m"
FIXMKTEMP
=
"%__subst 's|readlink -m|readlink -f|g' libtool ltmain.sh"
ADDFIXCOMMAND
=
"
$ADDFIXCOMMAND
%__subst 's|readlink -m|readlink -f|g' libtool ltmain.sh"
fi
# fix readlink -mv, introduced by new libtool and missed in Generic (FreeBSD) (replace with realpath)
if
[
"
$VENDOR
"
=
"generic"
]
;
then
test
-z
"
$VERBOSE
"
||
echo
"Add subst readlink -mv"
FIXMKTEMP
=
"%__subst 's|readlink -mv|realpath|g' configure ltmain.sh"
ADDFIXCOMMAND
=
"
$ADDFIXCOMMAND
%__subst 's|readlink -mv|realpath|g' libtool configure ltmain.sh"
fi
# need only for wine on x86_64
#
FIXME HACK
need only for wine on x86_64
#if [ "$DISTRSYS" = "Ubuntu" ] || [ "$DISTRSYS" = "Debian" ]; then
if
echo
$SPECNAME
|
grep
-q
wine
;
then
test
-z
"
$VERBOSE
"
||
echo
"Add remove_optflags -m64"
FIXMKTEMP
=
"%remove_optflags -m64"
ADDFIXCOMMAND
=
"
$ADDFIXCOMMAND
%remove_optflags -m64"
fi
# fix mktemp using for MCBC
if
[
"
$VENDOR
"
=
"mcbc"
]
;
then
test
-z
"
$VERBOSE
"
||
echo
"Add subst mktemp -dt"
FIXMKTEMP
=
"%__subst 's|mktemp -dt|mktemp -d|g' configure ; %__subst 's|readlink -mv|ls -1|g' configure ltmain.sh"
ADDFIXCOMMAND
=
"
$ADDFIXCOMMAND
%__subst 's|mktemp -dt|mktemp -d|g' configure ; %__subst 's|readlink -mv|ls -1|g' configure ltmain.sh"
fi
# Too old problem
TOCHANGELOG
=
if
[
"
$MDISTR
"
=
"M23"
]
;
then
if
grep
"%configure"
$SPECNAME
>
/dev/null
&&
!
grep
"^autoreconf"
$i
>
/dev/null
&&
!
grep
"^%__autoreconf"
$i
>
/dev/null
;
then
RECONFT
=
"%__autoreconf"
ADDFIXCOMMAND
=
"
$ADDFIXCOMMAND
%__autoreconf"
TOCHANGELOG
=
"add __autoreconf macros in build section for fix so name problem (by script)"
fi
fi
...
...
@@ -146,9 +156,8 @@ for i in $LISTGROUP ; do
done
#echo GRP: $LISTGROUP, ALLGRPREPLRULES: $ALLGRPREPLRULES
#
Replace all packages names in source spec and
add %defattr to files sections
# add %defattr to files sections
# FIXME: добавляет ненужные пустые строки
function
awk_e1
()
{
[
-n
"
$ADDDEF
"
]
&&
awk
'BEGIN{desk=0}{print;if(/^%files/){printf("%s\n", text)}}'
text
=
"
$ADDDEF
"
||
cat
...
...
@@ -166,16 +175,10 @@ function awk_e3()
[
-n
"
$BUILDREQ
"
]
&&
awk
'BEGIN{desk=0}{if(/^%description/&&desk==0){printf("%s\n\n", text);desk++};print}'
text
=
"
$BUILDREQ
"
||
cat
}
# add reconf for M23 after %build
function
awk_e4
()
{
[
-n
"
$RECONFT
"
]
&&
awk
'BEGIN{desk=0}{print;if(/^%build/&&desk==0){printf("%s\n", text);desk++}}'
text
=
"
$RECONFT
"
||
cat
}
# fix mktemp param for MCBC after %build
function
awk_e5
()
# add commands in build section
function
awk_section_build
()
{
[
-n
"
$
FIXMKTEMP
"
]
&&
awk
'BEGIN{desk=0}{print;if(/^%build/&&desk==0){printf("%s\n", text);desk++}}'
text
=
"
$FIXMKTEMP
"
||
cat
[
-n
"
$
ADDFIXCOMMAND
"
]
&&
awk
'BEGIN{desk=0}{print;if(/^%build/&&desk==0){printf("%s\n", text);desk++}}'
text
=
"
$ADDFIXCOMMAND
"
||
cat
}
# apply replacement rules
...
...
@@ -203,7 +206,7 @@ fi
mv
$SPECNAME
$SPECNAME
.old
&&
cat
$SPECNAME
.old |
\
repl_reqs | repl_groups |
\
awk_e1 | awk_e2 | awk_e3 | awk_
e4 | awk_e5
|
\
awk_e1 | awk_e2 | awk_e3 | awk_
section_build
|
\
sed
-e
"s|^BuildRequires: *
\$
||g"
|
\
sed
-e
"s|^BuildPreReq: *
\$
||g"
|
\
sed
-e
"s|^Requires: *
\$
||g"
|
\
...
...
share/eterbuild/functions/check
View file @
9dfba4d3
...
...
@@ -21,13 +21,17 @@ check_log()
echog
"Error found: will always overflow destination buffer. Check the log."
return
1
fi
#grep "WARNING:" $LOGFILE
grep
'python-strict'
$LOGFILE
&&
warning
"python-strict used!!!"
NC1
=
"command not found"
NC2
=
"-march=athlon -mtune=athlon-xp"
NC3
=
"WARNING:"
#for i in ${NC1} ; do
grep
--
'$NC1'
$LOGFILE
&&
warning
"'
$NC1
' in build output (some errors in a scripts)"
grep
--
'$NC2'
$LOGFILE
&&
warning
"'
$NC2
' in build output (forbidden) "
grep
--
'$NC3'
$LOGFILE
&&
warning
"'
$NC3
' in build output (forbidden) "
#done
return
0
}
...
...
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