pck-update: do convert the list of unpackaged files discovered by rpmbuild into a list thak make use of rpm macros
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
90f3996a3d
commit
c6d41d2d58
13
ChangeLog
13
ChangeLog
@ -14,6 +14,19 @@ Changes in version 1.9.1
|
|||||||
Fix expansion of templates containing '@configure@' or a line starting by
|
Fix expansion of templates containing '@configure@' or a line starting by
|
||||||
'@configure@'.
|
'@configure@'.
|
||||||
|
|
||||||
|
+ improvement
|
||||||
|
* pck-update - Davide Madrisan:
|
||||||
|
Convert the list of unpackaged files discovered by rpmbuild into a list
|
||||||
|
thak make use of rpm macros (that is, do a /usr/bin --> %{_bindir}, ...
|
||||||
|
conversion for all discovered files).
|
||||||
|
|
||||||
|
* autospec.conf - Davide Madrisan:
|
||||||
|
New variable `format_unpackaged_file_list'.
|
||||||
|
|
||||||
|
+ update
|
||||||
|
* po/it/pck-update - Davide Madrisan:
|
||||||
|
Updated.
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Changes in version 1.9.0 - Silvan Birthday Release
|
Changes in version 1.9.0 - Silvan Birthday Release
|
||||||
|
@ -502,6 +502,50 @@ format_buildroot_value="%{_tmppath}/%{name}-%{version}-root"
|
|||||||
# Enable autoformatting (disabled by default)
|
# Enable autoformatting (disabled by default)
|
||||||
format_autoformat=0
|
format_autoformat=0
|
||||||
|
|
||||||
|
# Set this variable to modify the rpm unpackaged file list conversion
|
||||||
|
format_unpackaged_file_list="\
|
||||||
|
s,/usr/bin,%{_bindir},
|
||||||
|
s,/usr/sbin,%{_sbindir},
|
||||||
|
s,/usr/lib,%{_libdir},
|
||||||
|
s,/usr/libexec,%{_libexecdir},
|
||||||
|
s,/usr/share/info,%{_infodir},
|
||||||
|
s,/usr/share/man,%{_mandir},
|
||||||
|
s,/usr/share,%{_datadir},
|
||||||
|
s,/usr/include,%{_includedir},
|
||||||
|
s,/etc,%{_sysconfdir},
|
||||||
|
s,/lib,%{_lib},
|
||||||
|
s,/lib64,%{_lib},
|
||||||
|
s,/var,%{_localstatedir},
|
||||||
|
# translations for kde4 packages
|
||||||
|
s,/etc/opt/kde,%{_kde4_sysconfdir},
|
||||||
|
s,/opt/kde/bin,%{_kde4_bindir},
|
||||||
|
s,/opt/kde/sbin,%{_kde4_sbindir},
|
||||||
|
s,/opt/kde/include,%{_kde4_includedir},
|
||||||
|
s,/opt/kde/lib/kde4/libexec,%{_kde4_libexecdir},
|
||||||
|
s,/opt/kde/lib/kde4/plugins,%{_kde4_pluginsdir},
|
||||||
|
s,/opt/kde/lib,%{_kde4_libdir},
|
||||||
|
s,/opt/kde/share/applications,%{_kde4_xdgappsdir},
|
||||||
|
s,/opt/kde/share/apps/kconf_update,%{_kde4_kconfupdatedir},
|
||||||
|
s,/opt/kde/share/apps,%{_kde4_datadir},
|
||||||
|
s,/opt/kde/share/autostart,%{_kde4_autostartdir},
|
||||||
|
s,/opt/kde/share/config.kcfg,%{_kde4_kcfgdir},
|
||||||
|
s,/opt/kde/share/config,%config %{_kde4_configdir},
|
||||||
|
s,/opt/kde/share/dbus-1/interfaces,%{_kde4_dbusinterfacesdir},
|
||||||
|
s,/opt/kde/share/dbus-1/services,%{_kde4_dbusservicesdir},
|
||||||
|
s,/opt/kde/share/desktop-directories,%{_kde4_xdgdirectorydir},
|
||||||
|
s,/opt/kde/share/doc/HTML/en,%doc %lang(en) %{_kde4_htmldir}/en,
|
||||||
|
s,/opt/kde/share/doc/HTML,%{_kde4_htmldir},
|
||||||
|
s,/opt/kde/share/icons,%{_kde4_icondir},
|
||||||
|
s,/opt/kde/share/kde4/services,%{_kde4_servicesdir},
|
||||||
|
s,/opt/kde/share/kde4/servicetypes,%{_kde4_servicetypesdir},
|
||||||
|
s,/opt/kde/share/locale,%{_kde4_localedir},
|
||||||
|
s,/opt/kde/share/mime/packages,%{_kde4_xdgmimedir},
|
||||||
|
s,/opt/kde/share/mimelnk,%{_kde4_mimedir},
|
||||||
|
s,/opt/kde/share/sounds,%{_kde4_soundsdir},
|
||||||
|
s,/opt/kde/share/templates,%{_kde4_templatesdir},
|
||||||
|
s,/opt/kde/share/wallpapers,%{_kde4_wallpaperdir},
|
||||||
|
s,/opt/kde/share,%{_kde4_sharedir},"
|
||||||
|
|
||||||
# set this variable to '1' if rpm ignores the BuildRoot tag of a specfile
|
# set this variable to '1' if rpm ignores the BuildRoot tag of a specfile
|
||||||
rpm_ignores_buildroot=1
|
rpm_ignores_buildroot=1
|
||||||
|
|
||||||
|
@ -2223,7 +2223,7 @@ ${proxy:+--proxy $proxy} ${proxy_user:+--proxy-user $proxy_user} \
|
|||||||
eval "rpmbuild --nobuild \
|
eval "rpmbuild --nobuild \
|
||||||
$rpmbuild_opts $rpm_root_opts $USER_RPMDEFINE_OPTS \
|
$rpmbuild_opts $rpm_root_opts $USER_RPMDEFINE_OPTS \
|
||||||
$SRPM_SPECFILE_WITH_PATH 2>&1" ||
|
$SRPM_SPECFILE_WITH_PATH 2>&1" ||
|
||||||
notify.error $"rpmbuild exited with error code \`$?'"
|
notify.error $"rpmbuild exited with error code":" \`$?'"
|
||||||
|
|
||||||
notify.debug "define_list_name = (${define_list_name[*]})"
|
notify.debug "define_list_name = (${define_list_name[*]})"
|
||||||
notify.debug "define_list_value = (${define_list_value[*]})"
|
notify.debug "define_list_value = (${define_list_value[*]})"
|
||||||
@ -2275,11 +2275,38 @@ $SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
|
|||||||
rpmbuild -ba $rpmbuild_opts --nodeps \
|
rpmbuild -ba $rpmbuild_opts --nodeps \
|
||||||
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
|
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1"
|
||||||
fi
|
fi
|
||||||
if [ $? -eq 0 ]; then
|
local rpmbuild_retcode="$?"
|
||||||
|
if [ $rpmbuild_retcode -eq 0 ]; then
|
||||||
notify.note "\n${NOTE}"$"\
|
notify.note "\n${NOTE}"$"\
|
||||||
It seems good but do not forget to run quality and security tests.""${NORM}"
|
It seems good but do not forget to run quality and security tests.""${NORM}"
|
||||||
else
|
else
|
||||||
notify.error $"rpmbuild exited with error code \`$?'"
|
local tmpunpackfiles=$(mktemp -q -t $me.XXXXXXXX)
|
||||||
|
[ $? -eq 0 ] || notify.error $"can't create temporary files"
|
||||||
|
notify.debug "tmpunpackfiles = \`${NOTE}$tmpunpackfiles${NORM}'"
|
||||||
|
|
||||||
|
LC_ALL=C \
|
||||||
|
rpmbuild -bl --nodeps --nobuild \
|
||||||
|
$SRPM_SPECFILE_WITH_PATH $USER_RPMDEFINE_OPTS 2>&1 | \
|
||||||
|
sed -e '/./{H;$!d;}' -e 'x;/RPM build errors:/!d;' | \
|
||||||
|
while read line; do
|
||||||
|
case "$line" in *\ /*|/*) echo "$line" ;; esac
|
||||||
|
done | sed -e "$format_unpackaged_file_list" \
|
||||||
|
> $tmpunpackfiles
|
||||||
|
|
||||||
|
if [ -s "$tmpunpackfiles" ]; then
|
||||||
|
notify.error $"\
|
||||||
|
rpmbuild exited with error code":" \`$rpmbuild_retcode'""
|
||||||
|
""
|
||||||
|
""${NOTE}"$"Hint"":${NORM}""
|
||||||
|
"$"Add the following files in the right %files blocks"":""
|
||||||
|
""
|
||||||
|
$(cat $tmpunpackfiles; rm -f $tmpunpackfiles)""
|
||||||
|
"
|
||||||
|
else
|
||||||
|
rm -f $tmpunpackfiles
|
||||||
|
notify.error $"\
|
||||||
|
rpmbuild exited with error code":" \`$rpmbuild_retcode'"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
6) notify.note "[${NOTE}step $step${NORM}] -- ${NOTE}"$"\
|
6) notify.note "[${NOTE}step $step${NORM}] -- ${NOTE}"$"\
|
||||||
@ -2293,7 +2320,7 @@ build the list of the build requirements""${NORM}"
|
|||||||
|
|
||||||
# rpmbuild -bs $SRPM_SPECFILE_WITH_PATH 2>&1
|
# rpmbuild -bs $SRPM_SPECFILE_WITH_PATH 2>&1
|
||||||
# [[ $? -eq 0 ]] ||
|
# [[ $? -eq 0 ]] ||
|
||||||
# notify.error $"rpmbuild exited with error code \`$?'"
|
# notify.error $"rpmbuild exited with error code":" \`$?'"
|
||||||
|
|
||||||
local frequires=$(mktemp -q -t frequires.XXXXXXXX) ||
|
local frequires=$(mktemp -q -t frequires.XXXXXXXX) ||
|
||||||
notify.error $"can't create temporary files"
|
notify.error $"can't create temporary files"
|
||||||
|
@ -435,8 +435,8 @@ msgstr "trovato ${NOTE}BuildRequirement non soddisfatto${NORM} \\`${NOTE}$f${NOR
|
|||||||
msgid "testing out specfile"
|
msgid "testing out specfile"
|
||||||
msgstr "esecuzione dei test sullo specfile"
|
msgstr "esecuzione dei test sullo specfile"
|
||||||
|
|
||||||
msgid "rpmbuild exited with error code \\`$?'"
|
msgid "rpmbuild exited with error code"
|
||||||
msgstr "rpmbuild è terminato con il codice d'errore \\`$?'"
|
msgstr "rpmbuild è terminato con il codice d'errore"
|
||||||
|
|
||||||
msgid "building rpm and srpm packages"
|
msgid "building rpm and srpm packages"
|
||||||
msgstr "creazione dei pacchetti rpm e srpm"
|
msgstr "creazione dei pacchetti rpm e srpm"
|
||||||
@ -500,3 +500,6 @@ msgstr "rimozione di"
|
|||||||
|
|
||||||
msgid "It seems good but do not forget to run quality and security tests."
|
msgid "It seems good but do not forget to run quality and security tests."
|
||||||
msgstr "Sembra ok ma non dimenticare di eseguire i test di qualità e sicurezza."
|
msgstr "Sembra ok ma non dimenticare di eseguire i test di qualità e sicurezza."
|
||||||
|
|
||||||
|
msgid "Add the following files in the right %files blocks"
|
||||||
|
msgstr "Smista i seguenti file nelle sezioni %files corrispondenti"
|
||||||
|
Loading…
Reference in New Issue
Block a user