Hello community,
here is the log from the commit of package rpmrebuild for openSUSE:Factory checked in at 2018-11-05 22:55:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rpmrebuild (Old)
and /work/SRC/openSUSE:Factory/.rpmrebuild.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rpmrebuild"
Mon Nov 5 22:55:16 2018 rev:24 rq:646085 version:2.14
Changes:
--------
--- /work/SRC/openSUSE:Factory/rpmrebuild/rpmrebuild.changes 2018-09-26 16:11:21.499492440 +0200
+++ /work/SRC/openSUSE:Factory/.rpmrebuild.new/rpmrebuild.changes 2018-11-05 22:55:23.620055554 +0100
@@ -1,0 +2,16 @@
+Fri Nov 2 13:54:14 UTC 2018 - Bruno Friedmann
+
+- Update to version 2.14
+ + add list of optional tags, to allow rpmrebuild work with old
+ rpm versions
+ + add dependency on setarch
+ + add debug code (calls on functions)
+ + use local variables to avoid conflicts
+ + rewrite html target in Makefile
+ + suppress VERSION (use Version)
+ + add comments in rpmrebuild_rpmqf.src to avoid bad syntax after
+ GenRpmQf
+ + test if awk support non-posix lshift (qf_spec_requires_raw)
+ + workaround for redhat 6.x / rpm 3.x, merci Francesco
+
+-------------------------------------------------------------------
Old:
----
rpmrebuild-2.13.tar.gz
rpmrebuild-2.13.tar.gz.sig
New:
----
rpmrebuild-2.14.tar.gz
rpmrebuild-2.14.tar.gz.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rpmrebuild.spec ++++++
--- /var/tmp/diff_new_pack.LsV4Am/_old 2018-11-05 22:55:24.224054790 +0100
+++ /var/tmp/diff_new_pack.LsV4Am/_new 2018-11-05 22:55:24.228054785 +0100
@@ -17,7 +17,7 @@
Name: rpmrebuild
-Version: 2.13
+Version: 2.14
Release: 0
Summary: A tool to build a rpm file from the rpm database
License: GPL-2.0-or-later
++++++ rpmrebuild-2.13.tar.gz -> rpmrebuild-2.14.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Changelog new/Changelog
--- old/Changelog 2018-09-12 16:07:44.000000000 +0200
+++ new/Changelog 2018-10-19 17:48:29.000000000 +0200
@@ -1,3 +1,14 @@
+* Fri Oct 19 2018 2.14-1
+- add list of optional tags, to allow rpmrebuild work with old rpm versions
+- add dependency on setarch
+- add debug code (calls on functions)
+- use local variables to avoid conflicts
+- rewrite html target in Makefile
+- suppress VERSION (use Version)
+- add comments in rpmrebuild_rpmqf.src to avoid bad syntax after GenRpmQf
+- test if awk support non-posix lshift (qf_spec_requires_raw)
+- workaround for redhat 6.x / rpm 3.x, thanks Francesco
+
* Wed Sep 12 2018 2.13-1
- can handle recommends / supplements rpm tags
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Makefile new/Makefile
--- old/Makefile 2018-06-10 17:23:54.000000000 +0200
+++ new/Makefile 2018-10-19 17:48:29.000000000 +0200
@@ -37,6 +37,7 @@
rpmrebuild_rpmqf.src \
rpmrebuild_parser.src \
spec_func.src \
+ optional_tags.cfg
MANPAGES_BASE := \
rpmrebuild.1 \
@@ -52,6 +53,9 @@
MANPAGES_SRC := $(addsuffix .in,$(MANPAGES))
+MANPAGES_DEF := $(foreach lang,$(LANG_DEF),$(addprefix man/$(lang)/,$(MANPAGES_BASE)))
+HTML_PAGES=$(MANPAGES_DEF:.1=.1.html)
+
DOC_FILES := \
AUTHORS \
Changelog \
@@ -95,7 +99,7 @@
}
endef
-all: rpmrebuild.spec VERSION $(MANPAGES)
+all: rpmrebuild.spec $(MANPAGES)
$(MAKE) -C plugins $@
rpmrebuild.spec: rpmrebuild.spc Version Release Changelog
@@ -105,17 +109,13 @@
$(MANPAGES): %: %.in $(TOP_DIR)/Version
$(MakeManPage)
-VERSION: Version
- $(RM) $@
- read VERSION < $< && echo "VERSION='$$VERSION'" > $@ || { $(RM) $@; exit 1; }
-
install:
$(MKDIR) $(TARGET_DIR)
$(INSTALL_RUN) $(SCRIPTS) $(TARGET_DIR)
$(MKDIR) $(TARGET_LIB)
$(INSTALL_RUN) $(LIB_SCRIPTS) $(TARGET_LIB)
- $(INSTALL_RO) $(INCLUDE_SCRIPTS) VERSION $(TARGET_LIB)
+ $(INSTALL_RO) $(INCLUDE_SCRIPTS) Version $(TARGET_LIB)
$(InstallManPages)
$(InstallLocales)
$(MAKE) -C plugins $@
@@ -133,14 +133,19 @@
clean: unexpand
$(RMDIR) $(ROOT) $(RPM_BUILD_DIR)
- $(RM) VERSION rpmrebuild.spec *.rpm rpmrebuild.tar.gz rpmrebuild.tar.gz.sig
+ $(RM) rpmrebuild.spec *.rpm rpmrebuild.tar.gz rpmrebuild.tar.gz.sig
$(RM) $(MANPAGES)
+ $(RM) $(HTML_PAGES)
$(MAKE) -C plugins $@
man: $(MANPAGES)
+ $(MAKE) -C plugins $@
+
+$(HTML_PAGES) : $(MANPAGES_DEF)
-html:
- ./faire_doc.sh
+html: man $(HTML_PAGES)
+ cp $(HTML_PAGES) ../web
+ $(MAKE) -C plugins $@
# build all packages
alldist: rpmbuild dist html
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Makefile.include new/Makefile.include
--- old/Makefile.include 2014-06-10 09:53:34.000000000 +0200
+++ new/Makefile.include 2018-10-19 17:48:29.000000000 +0200
@@ -13,7 +13,10 @@
TARGET_LOCALE := $(DESTDIR)/usr/lib/rpmrebuild/locale
TARGET_MAN := $(DESTDIR)/usr/share/man
+# all languages (locale, man, plugins)
LANGS := en fr_FR fr_FR.UTF-8
+# default language for html pages
+LANG_DEF := en
# add current version in man pages
define MakeManPage
@@ -44,3 +47,11 @@
done || exit;\
:
endef
+
+# rules to convert man page into html pages
+%.1.html: %.1
+ faire_doc2.sh $< $@
+
+%.1.html: %.1rrp
+ faire_doc2.sh $< $@
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/News new/News
--- old/News 2018-09-12 16:15:20.000000000 +0200
+++ new/News 2018-10-19 17:48:29.000000000 +0200
@@ -1,3 +1,4 @@
+* 2018-10-19 : release 2.14, compatibility with old rpm releases
* 2018-09-12 : release 2.13, RECOMMENDS/SUPPLEMENTS rpm tag
* 2018-07-20 : release 2.12, Handle Requires(pre,post,preun,postun)
* 2013-11-22 : release 2.11, option install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Version new/Version
--- old/Version 2018-09-12 16:07:44.000000000 +0200
+++ new/Version 2018-09-23 14:49:21.000000000 +0200
@@ -1 +1 @@
-2.13
+2.14
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/locale/en/rpmrebuild.lang new/locale/en/rpmrebuild.lang
--- old/locale/en/rpmrebuild.lang 2018-06-10 17:00:31.000000000 +0200
+++ new/locale/en/rpmrebuild.lang 2018-09-23 14:16:20.000000000 +0200
@@ -20,11 +20,15 @@
PackageMultiple='multiple package arguments is not allowed'
PackageNotInstalled='package is not installed'
PackageTooMuch='too many packages match'
+RemoveTagLine='remove tag line'
+RemoveTagWord='remove tag word'
+ReplaceTag='replace tag'
RequiredArgument='requires an argument'
#ShouldNotDirectory='should not be a directory'
SpecFailed='specfile generation failed'
TestFailed='install test failed'
UnknownOperation='unknown operation'
+UnknownType='unknown type'
UnrecognizeOption='unrecognized option'
WantChangeEmail='Do you want to change your e-mail address'
WantChangeRelease='Do you want to change release number'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/locale/fr_FR/rpmrebuild.lang new/locale/fr_FR/rpmrebuild.lang
--- old/locale/fr_FR/rpmrebuild.lang 2014-06-10 09:53:34.000000000 +0200
+++ new/locale/fr_FR/rpmrebuild.lang 2018-09-23 14:16:20.000000000 +0200
@@ -20,11 +20,15 @@
PackageMultiple="un seul package � la fois"
PackageNotInstalled="n'est pas install�"
PackageTooMuch="plusieurs packages correspondent"
+RemoveTagLine='suppression (ligne) du tag'
+RemoveTagWord='suppression (mot) du tag'
+ReplaceTag='remplacement du tag'
RequiredArgument="n�cessite un argument"
#ShouldNotDirectory="ne doit pas �tre un r�pertoire"
SpecFailed="la g�n�ration du fichier specfile a �chou�"
TestFailed="le test d'installation a �chou�"
UnknownOperation="op�ration inconnue"
+UnknownType='type inconnu'
UnrecognizeOption="option inconnue"
WantChangeEmail="Voulez-vous modifier cette adresse mail"
WantChangeRelease="Voulez-vous modifier le num�ro de release"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/locale/fr_FR.UTF-8/rpmrebuild.lang new/locale/fr_FR.UTF-8/rpmrebuild.lang
--- old/locale/fr_FR.UTF-8/rpmrebuild.lang 2014-06-10 09:53:34.000000000 +0200
+++ new/locale/fr_FR.UTF-8/rpmrebuild.lang 2018-09-23 14:16:20.000000000 +0200
@@ -20,11 +20,15 @@
PackageMultiple="un seul package à la fois"
PackageNotInstalled="n'est pas installé"
PackageTooMuch="plusieurs packages correspondent"
+RemoveTagLine='suppression (ligne) du tag'
+RemoveTagWord='suppression (mot) du tag'
+ReplaceTag='remplacement du tag'
RequiredArgument="nécessite un argument"
#ShouldNotDirectory="ne doit pas être un répertoire"
SpecFailed="la génération du fichier specfile a échoué"
TestFailed="le test d'installation a échoué"
UnknownOperation="opération inconnue"
+UnknownType='type inconnu'
UnrecognizeOption="option inconnue"
WantChangeEmail="Voulez-vous modifier cette adresse mail"
WantChangeRelease="Voulez-vous modifier le numéro de release"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/man/en/rpmrebuild.1.in new/man/en/rpmrebuild.1.in
--- old/man/en/rpmrebuild.1.in 2018-09-12 16:07:44.000000000 +0200
+++ new/man/en/rpmrebuild.1.in 2018-10-12 16:40:51.000000000 +0200
@@ -95,7 +95,8 @@
verbose output
.TP
\fB\-\-debug\fP
-for debugging purposes : do not remove temporary files at end of work
+for debugging purposes : do not remove temporary files at end of work.
+also force verbose mode
.TP
\fB\-V, \-\-version\fP
output version information and exit.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/man/fr_FR/rpmrebuild.1.in new/man/fr_FR/rpmrebuild.1.in
--- old/man/fr_FR/rpmrebuild.1.in 2018-09-12 16:07:44.000000000 +0200
+++ new/man/fr_FR/rpmrebuild.1.in 2018-10-12 16:40:51.000000000 +0200
@@ -93,7 +93,8 @@
mode verbeux
.TP
\fB\-\-debug\fP
-pour le debuggage : ne supprime pas les fichiers temporaires en fin de travail
+pour le debuggage : ne supprime pas les fichiers temporaires en fin de travail.
+force le mode "verbose"
.TP
\fB\-V, \-\-version\fP
affiche la version du programme et se termine.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/man/fr_FR.UTF-8/rpmrebuild.1.in new/man/fr_FR.UTF-8/rpmrebuild.1.in
--- old/man/fr_FR.UTF-8/rpmrebuild.1.in 2018-09-12 16:07:44.000000000 +0200
+++ new/man/fr_FR.UTF-8/rpmrebuild.1.in 2018-10-12 16:40:51.000000000 +0200
@@ -93,7 +93,8 @@
mode verbeux
.TP
\fB\-\-debug\fP
-pour le debuggage : ne supprime pas les fichiers temporaires en fin de travail
+pour le debuggage : ne supprime pas les fichiers temporaires en fin de travail.
+force le mode "verbose"
.TP
\fB\-V, \-\-version\fP
affiche la version du programme et se termine.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/optional_tags.cfg new/optional_tags.cfg
--- old/optional_tags.cfg 1970-01-01 01:00:00.000000000 +0100
+++ new/optional_tags.cfg 2018-10-19 17:51:38.000000000 +0200
@@ -0,0 +1,35 @@
+# rpm tags vary according rpm versions
+# some are added, some are removed
+# this is a list of optional tags
+# this tags will be used if available,
+# else ignored
+DISTTAG d_line
+ENHANCEFLAGS d_line
+ENHANCENAME d_line
+ENHANCESFLAGS d_line
+ENHANCESNAME d_line
+ENHANCESVERSION d_line
+ENHANCEVERSION d_line
+# not in old distribs
+FILECAPS d_word
+# only in rpm 5
+FILENAMES replacedby FILEPATH
+POSTTRANS d_line
+POSTTRANSPROG d_line
+PRETRANS d_line
+PRETRANSPROG d_line
+RECOMMENDFLAGS d_line
+RECOMMENDNAME d_line
+RECOMMENDVERSION d_line
+SUGGESTFLAGS d_line
+SUGGESTNAME d_line
+SUGGESTSFLAGS d_line
+SUGGESTSNAME d_line
+SUGGESTSVERSION d_line
+SUGGESTVERSION d_line
+SUPPLEMENTFLAGS d_line
+SUPPLEMENTNAME d_line
+SUPPLEMENTVERSION d_line
+# only in rpm 5
+TRIGGERCONDS d_word
+TRIGGERTYPE d_word
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plugins/Makefile new/plugins/Makefile
--- old/plugins/Makefile 2017-09-10 16:46:39.000000000 +0200
+++ new/plugins/Makefile 2018-10-19 17:48:29.000000000 +0200
@@ -29,6 +29,8 @@
MANPAGES_BASE := $(addsuffix .1rrp,$(PLUGINS))
MANPAGES := $(foreach lang,$(LANGS),$(addprefix man/$(lang)/,$(MANPAGES_BASE)))
+MANPAGES_DEF := $(foreach lang,$(LANG_DEF),$(addprefix man/$(lang)/,$(MANPAGES_BASE)))
+HTML_PAGES=$(MANPAGES_DEF:.1rrp=.1.html)
MANPAGES_SRC := $(addsuffix .in,$(MANPAGES))
@@ -53,6 +55,12 @@
clean:
$(RM) $(MANPAGES)
+ $(RM) $(HTML_PAGES)
tar_names:
@echo $(addprefix plugins/,$(SOURCES))
+
+$(HTML_PAGES): $(MANPAGES_DEF)
+
+html: $(HTML_PAGES)
+ cp $(HTML_PAGES) $(TOP_DIR)/../web
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/processing_func.src new/processing_func.src
--- old/processing_func.src 2018-09-12 16:28:06.000000000 +0200
+++ new/processing_func.src 2018-10-19 17:51:37.000000000 +0200
@@ -2,7 +2,7 @@
###############################################################################
# Copyright (C) 2004 by Valery Reznic
# This file is a part of the rpmrebuild project
-# $Id: rpmrebuild-2.13 | processing_func.src | Wed Sep 12 15:59:23 2018 +0200 | Eric Gerbier $
+# $Id: rpmrebuild-2.14 | processing_func.src | Wed Sep 12 15:59:23 2018 +0200 | Eric Gerbier $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmrebuild new/rpmrebuild
--- old/rpmrebuild 2018-09-12 16:28:06.000000000 +0200
+++ new/rpmrebuild 2018-10-19 17:51:37.000000000 +0200
@@ -4,7 +4,7 @@
#
# Copyright (C) 2002 by Eric Gerbier
# Bug reports to: gerbier@users.sourceforge.net
-# $Id: rpmrebuild-2.13 | rpmrebuild | Thu May 17 15:04:50 2012 +0000 | gerbier $
+# $Id: rpmrebuild-2.14 | rpmrebuild | Thu May 17 15:04:50 2012 +0000 | gerbier $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmrebuild.files new/rpmrebuild.files
--- old/rpmrebuild.files 2014-06-10 09:53:34.000000000 +0200
+++ new/rpmrebuild.files 2018-10-19 17:48:29.000000000 +0200
@@ -1,7 +1,7 @@
%defattr(-,root,root)
/usr/bin/rpmrebuild
%dir /usr/lib/rpmrebuild
- /usr/lib/rpmrebuild/VERSION
+ /usr/lib/rpmrebuild/optional_tags.cfg
/usr/lib/rpmrebuild/processing_func.src
/usr/lib/rpmrebuild/rpmrebuild.sh
/usr/lib/rpmrebuild/rpmrebuild_lib.src
@@ -12,6 +12,7 @@
/usr/lib/rpmrebuild/rpmrebuild_ghost.sh
/usr/lib/rpmrebuild/rpmrebuild_extract_tags.sh
/usr/lib/rpmrebuild/spec_func.src
+ /usr/lib/rpmrebuild/Version
%dir /usr/lib/rpmrebuild/locale
%dir /usr/lib/rpmrebuild/locale/fr_FR
/usr/lib/rpmrebuild/locale/fr_FR/rpmrebuild.lang
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmrebuild.lsm new/rpmrebuild.lsm
--- old/rpmrebuild.lsm 2018-09-12 16:11:59.000000000 +0200
+++ new/rpmrebuild.lsm 2018-10-19 17:48:29.000000000 +0200
@@ -1,7 +1,7 @@
Begin4
Title: rpmrebuild
-Version: 2.13
-Entered-date: 2018-09-12
+Version: 2.14
+Entered-date: 2018-10-19
Description: rpmrebuild creates spec files used by the Red Hat Package Manager
in building RPM packages. It uses the information it can
determine (from the rpm database) to fill in the proper spec file fields.
@@ -12,7 +12,7 @@
Author: gerbier@users.sourceforge.net (Eric Gerbier)
valery_reznic@users.sourceforge.net (Valery Reznic)
Primary-site: http://rpmrebuild.sourceforge.net
- 90 ko rpmrebuild-2.13-1.noarch.rpm
+ 90 ko rpmrebuild-2.14-1.noarch.rpm
Platforms: linux, works with bash and rpm >= 3.x
Copying-policy: GPL
End
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmrebuild.sh new/rpmrebuild.sh
--- old/rpmrebuild.sh 2018-09-12 16:28:06.000000000 +0200
+++ new/rpmrebuild.sh 2018-10-19 17:51:37.000000000 +0200
@@ -4,7 +4,7 @@
#
# Copyright (C) 2002 by Eric Gerbier
# Bug reports to: gerbier@users.sourceforge.net
-# $Id: rpmrebuild-2.13 | rpmrebuild.sh | Tue Aug 20 11:19:59 2013 +0000 | gerbier $
+# $Id: rpmrebuild-2.14 | rpmrebuild.sh | Wed Oct 17 15:21:30 2018 +0200 | Eric Gerbier $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,15 +17,25 @@
# GNU General Public License for more details.
#
###############################################################################
-VERSION="$Id: rpmrebuild-2.13 | rpmrebuild.sh | Tue Aug 20 11:19:59 2013 +0000 | gerbier $"
# debug
#set -x
###############################################################################
+function GetVersion
+{
+ if [ -f "$MY_LIB_DIR/Version" ]
+ then
+ VERSION=$( cat $MY_LIB_DIR/Version )
+ else
+ Warning "(GetVersion) $FileNotFound Version"
+ fi
+}
+###############################################################################
# edit spec file
# use environment variable to choice the editor
function SpecEdit
{
+ Debug '(SpecEdit)'
[ $# -ne 1 -o "x$1" = "x" ] && {
Echo "Usage: $0 SpecEdit <file>"
return 1
@@ -44,6 +54,7 @@
# check for package change
function VerifyPackage
{
+ Debug "(VerifyPackage) ${PAQUET}"
rpm --verify --nodeps ${PAQUET} # Don't return here, st=1 - verify fail
return 0
}
@@ -51,11 +62,12 @@
# ask question to user if necessary
function QuestionsToUser
{
+ Debug '(QuestionsToUser)'
[ "X$batch" = "Xyes" ] && return 0 ## batch mode, continue
[ "X$spec_only" = "Xyes" ] && return 0 ## spec only mode, no questions
AskYesNo "$WantContinue" || return
- RELEASE_ORIG="$(spec_query qf_spec_release )"
+ local RELEASE_ORIG="$(spec_query qf_spec_release )"
[ -z "$RELEASE_NEW" ] && \
AskYesNo "$WantChangeRelease" && {
echo -n "$EnterRelease $RELEASE_ORIG): "
@@ -67,11 +79,10 @@
# check if the given name match an installed rpm package
function IsPackageInstalled
{
+ Debug '(IsPackageInstalled)'
# test if package exists
- local output
- output="$( rpm --query ${PAQUET} 2>&1 )" # Don't return here - use output
- iret=$?
- if [ $iret -eq 1 ]
+ local output="$( rpm --query ${PAQUET} 2>&1 )" # Don't return here - use output
+ if [ "$?" -eq 1 ]
then
# no such package in rpm database
Error "${PAQUET} $PackageNotInstalled"
@@ -96,6 +107,7 @@
# for rpm file, we have to extract files to BUILDROOT directory
function RpmUnpack
{
+ Debug '(RpmUnpack)'
# do not install files on /
[ "x$BUILDROOT" = "x/" ] && {
Error "$BuildRootError"
@@ -116,6 +128,7 @@
# create buildroot if necessary
function CreateBuildRoot
{
+ Debug '(CreateBuildRoot)'
if [ "x$package_flag" = "x" ]; then
# installed package
if [ "X$need_change_files" = "Xyes" ]; then
@@ -133,6 +146,7 @@
# get architecture from package to build
function RpmArch
{
+ Debug '(RpmArch)'
pac_arch=$( spec_query qf_spec_arch )
return;
}
@@ -141,8 +155,9 @@
# and set change_arch if necessary
function CheckArch
{
- # current arcchitecture
- cur_arch=$( uname -m)
+ Debug '(CheckArch)'
+ # current architecture
+ local cur_arch=$( uname -m)
# pac_arch is got from RpmArch
RpmArch
@@ -156,6 +171,7 @@
*)
change_arch="setarch $pac_arch";;
esac
+ Debug " change_arch=$change_arch"
return
}
@@ -163,6 +179,7 @@
# build rpm package using rpmbuild command
function RpmBuild
{
+ Debug '(RpmBuild)'
# rpmrebuild package dependency
# for rpm 3.x : use rpm
# for rpm 4.x : use rpmbuild
@@ -195,18 +212,32 @@
# try to guess full package name
function RpmFileName
{
- QF_RPMFILENAME=$(eval $change_arch rpm $rpm_defines --eval %_rpmfilename) || return
+ Debug '(RpmFileName)'
+ local QF_RPMFILENAME=$(eval $change_arch rpm $rpm_defines --eval %_rpmfilename) || return
+ #Debug " QF_RPMFILENAME=$QF_RPMFILENAME"
+ # from generated specfile
RPMFILENAME=$(eval $change_arch rpm $rpm_defines --specfile --query --queryformat "${QF_RPMFILENAME}" ${FIC_SPEC}) || return
- # workarount for redhat 6.x
- arch=$(eval $change_arch rpm $rpm_defines --specfile --query --queryformat "%{ARCH}" ${FIC_SPEC})
+
+ # workaround for redhat 6.x / rpm 3.x
+ local arch=$(eval $change_arch rpm $rpm_defines --specfile --query --queryformat "%{ARCH}" ${FIC_SPEC})
if [ $arch = "(none)" ]
then
- arch=$(eval $change_arch rpm $rpm_defines --query $package_flag --queryformat "%{ARCH}" ${PAQUET})
- RPMFILENAME=$(echo $RPMFILENAME | sed "s/(none)/$arch/g")
+ Debug ' workaround for rpm 3.x'
+ # get info from original paquet
+ # will work if no changes in spec (release ....)
+ #arch=$(eval $change_arch rpm $rpm_defines --query $package_flag --queryformat "%{ARCH}" ${PAQUET})
+ #RPMFILENAME=$(echo $RPMFILENAME | sed "s/(none)/$arch/g")
+ RPMFILENAME=$(eval $change_arch rpm $rpm_defines --query --queryformat "${QF_RPMFILENAME}" ${PAQUET}) || return
fi
[ -n "$RPMFILENAME" ] || return
RPMFILENAME="${rpmdir}/${RPMFILENAME}"
+ if [ ! -f "${RPMFILENAME}" ]
+ then
+ Warning "$FileNotFound rpm $RPMFILENAME"
+ ls -ltr ${rpmdir}/${pac_arch}/${PAQUET}*
+ return 1
+ fi
return 0
}
@@ -214,21 +245,24 @@
# test if build package can be installed
function InstallationTest
{
+ Debug '(InstallationTest)'
# installation test
# force is necessary to avoid the message : already installed
rpm -U --test --force ${RPMFILENAME} || {
Error "package '${PAQUET}' $TestFailed"
return 1
}
+ Debug "(InstallationTest) test install ${PAQUET} ok"
return 0
}
###############################################################################
# install the package
function Installation
{
+ Debug '(Installation)'
# chek if root
- ID=$( id -u )
- if [ $ID -eq 0 ]
+ local ID=$( id -u )
+ if [ "$ID" -eq 0 ]
then
rpm -Uvh --force ${RPMFILENAME} || {
Error "package '${PAQUET}' $InstallFailed"
@@ -244,6 +278,7 @@
# execute all pre-computed operations on spec files
function Processing
{
+ Debug '(Processing)'
local Aborted="no"
local MsgFail
@@ -260,6 +295,7 @@
# recover system informations on rpm/rpmrebuild context
function GetInformations
{
+ Debug '(GetInformations)'
Echo "from: $1"
Echo "-----------"
lsb_release -a
@@ -276,10 +312,11 @@
# send informations to developper to allow fix problems
function SendBugReport
{
+ Debug '(SendBugReport)'
[ "X$batch" = "Xyes" ] && return 0 ## batch mode, skip report
AskYesNo "$WantSendBugReport" || return
# build default mail address
- from="${USER}@${HOSTNAME}"
+ local from="${USER}@${HOSTNAME}"
AskYesNo "$WantChangeEmail ($from)" && {
echo -n "$EnterEmail"
read from
@@ -297,7 +334,7 @@
# search if the given tag exists in current rpm release
function SearchTag
{
- tag=$1
+ local tag=$1
for rpm_tag in $RPM_TAGS
do
if [ "$tag" = "$rpm_tag" ]
@@ -313,38 +350,62 @@
# and save all intermediate by using si_rpmqf counter
function ChangeRpmQf
{
- SED_PAR=$1
- input_rpmqf=$TMPDIR_WORK/rpmrebuild_rpmqf.src.$si_rpmqf
+ Debug "(ChangeRpmQf) $1"
+ local SED_PAR=$1
+ local input_rpmqf=$TMPDIR_WORK/rpmrebuild_rpmqf.src.$si_rpmqf
si_rpmqf=$[si_rpmqf + 1]
- output_rpmqf=$TMPDIR_WORK/rpmrebuild_rpmqf.src.$si_rpmqf
+ local output_rpmqf=$TMPDIR_WORK/rpmrebuild_rpmqf.src.$si_rpmqf
sed -e "$SED_PAR" < $input_rpmqf > $output_rpmqf
+
+ return 0
}
###############################################################################
# generate rpm query file according current rpm tags
+# used to fix strange behavior
+# remove optionnals tags not available
function GenRpmQf
{
+ Debug '(GenRpmQf)'
+ #RPM_TAGS=$( cat /home/eric/projets/rpmrebuild/rpmtags/querytags.RedHat6.1_rpm3.0.3 ) || return
RPM_TAGS=$( rpm --querytags ) || return
# base code
cp $MY_LIB_DIR/rpmrebuild_rpmqf.src $TMPDIR_WORK/rpmrebuild_rpmqf.src.$si_rpmqf
- # then changes according rpm tags
- # rpm5 uses FILEPATHS instead FILENAMES
- SearchTag FILENAMES || ChangeRpmQf 's/FILENAMES/FILEPATHS/g'
-
- # no TRIGGERTYPE (mandriva 2011)
- SearchTag TRIGGERTYPE || ChangeRpmQf 's/%{TRIGGERTYPE}//g'
- SearchTag TRIGGERCONDS || ChangeRpmQf 's/%{TRIGGERCONDS}//g'
-
- # FILECAPS exists on fedora/Suse/Mageia
- # ex : iputils package (ping)
- SearchTag FILECAPS || ChangeRpmQf 's/%{FILECAPS}//g'
-
- # SUGGESTSNAME
- SearchTag SUGGESTSNAME || ChangeRpmQf '/SUGGESTSNAME/d'
-
- # ENHANCESNAME
- SearchTag ENHANCESNAME || ChangeRpmQf '/ENHANCESNAME/d'
+ local optional_file=$MY_LIB_DIR/optional_tags.cfg
+ if [ -f "$optional_file" ]
+ then
+ local tag1 type tag2
+ while read tag1 type tag2
+ do
+ local tst_comment=$( echo "$tag1" | grep '#' )
+ if [ -z "$tst_comment" ]
+ then
+ SearchTag $tag1 || {
+ case "$type" in
+ d_line)
+ ChangeRpmQf "/%{$tag1}/d"
+ Echo "(GenRpmQf) $RemoveTagLine $tag1"
+ ;;
+ d_word)
+ ChangeRpmQf "s/%{$tag1}//g"
+ Echo "(GenRpmQf) $RemoveTagWord $tag1"
+ ;;
+ replacedby)
+ #Echo "tag1=$tag1 type=$type tag2=$tag2"
+ [ -n "$tag2" ] && SearchTag $tag2 && ChangeRpmQf "s/$tag1/$tag2/g" && Echo "(GenRpmQf) $ReplaceTag $tag1 => $tag2"
+ ;;
+ *)
+ Warning "(GenRpmQf) $UnknownType $type"
+ ;;
+ esac
+
+ }
+ fi
+ done < $optional_file
+ else
+ Warning "(GenRpmQf) $FileNotFound $optional_file"
+ fi
return 0
}
@@ -354,11 +415,13 @@
# the idea is to check if the tag we use for rpmrebuild still exists
function CheckTags
{
+ Debug '(CheckTags)'
# list of used tags
- rpmrebuild_tags=$( $MY_LIB_DIR/rpmrebuild_extract_tags.sh $TMPDIR_WORK/rpmrebuild_rpmqf.src.$si_rpmqf )
+ #Echo "(CheckTags) search tags in rpmrebuild_rpmqf.src.$si_rpmqf"
+ local rpmrebuild_tags=$( $MY_LIB_DIR/rpmrebuild_extract_tags.sh $TMPDIR_WORK/rpmrebuild_rpmqf.src.$si_rpmqf )
# check for all rpmrebuild tags
- errors=0
+ local errors=0
for tag in $rpmrebuild_tags
do
SearchTag $tag || {
@@ -374,6 +437,20 @@
fi
}
##############################################################
+# test if --i18ndomains option is available
+# to be used in spec_query function
+function check_i18ndomains
+{
+ Debug '(check_i18ndomains)'
+ rpm --query --i18ndomains /dev/null rpm > /dev/null 2>&1
+ if [ "$?" -eq 0 ]
+ then
+ i18ndomains='--i18ndomains /dev/null'
+ else
+ i18ndomains=''
+ fi
+}
+##############################################################
# Main Part #
##############################################################
# shell pour refabriquer un fichier rpm a partir de la base rpm
@@ -394,6 +471,9 @@
RmDir "$RPMREBUILD_TMPDIR" || return
Mkdir_p $TMPDIR_WORK || return
+ # get VERSION
+ GetVersion
+
FIC_SPEC=$TMPDIR_WORK/spec
FILES_IN=$TMPDIR_WORK/files.in
# I need it here just in case user specify
@@ -414,7 +494,14 @@
# load translation file
source $MY_LIB_DIR/locale/$real_lang/rpmrebuild.lang
+ RPMREBUILD_PROCESSING=$TMPDIR_WORK/PROCESSING
+ CommandLineParsing "$@" || return
+ [ "x$NEED_EXIT" = "x" ] || return $NEED_EXIT
+
+ Debug "rpmrebuild version $VERSION : $@"
+
processing_init || return
+ check_i18ndomains
# generate rpm query file
GenRpmQf || return
@@ -428,11 +515,6 @@
# to solve problems of bad date
export LC_TIME=POSIX
- RPMREBUILD_PROCESSING=$TMPDIR_WORK/PROCESSING
-
- CommandLineParsing "$@" || return
- [ "x$NEED_EXIT" = "x" ] || return $NEED_EXIT
-
if [ "x$package_flag" = "x" ]; then
[ "X$need_change_files" = "Xyes" ] || BUILDROOT="/"
IsPackageInstalled || return
@@ -484,6 +566,9 @@
if [ -z "$debug" ]
then
RmDir "$RPMREBUILD_TMPDIR"
+else
+ Debug "workdir : $TMPDIR_WORK"
+ ls -altr $TMPDIR_WORK
fi
exit $st
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmrebuild.spc new/rpmrebuild.spc
--- old/rpmrebuild.spc 2018-07-07 16:31:34.000000000 +0200
+++ new/rpmrebuild.spc 2018-09-23 14:16:20.000000000 +0200
@@ -28,12 +28,14 @@
Requires: rpm < 4.0
Requires: fileutils
Requires: textutils
+Requires: /usr/bin/setarch
%define release_suffix %{release}rpm3
%else
# rpm v4 v5
Requires: rpm-build
Requires: coreutils
+Requires: util-linux
%define release_suffix %{release}
%endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmrebuild.spec new/rpmrebuild.spec
--- old/rpmrebuild.spec 2018-09-12 16:28:06.000000000 +0200
+++ new/rpmrebuild.spec 2018-10-19 17:49:44.000000000 +0200
@@ -1,4 +1,4 @@
-Version: 2.13
+Version: 2.14
%define release 1
# get rpm version
%define rpm_ver %( rpm -q --queryformat='%{VERSION}' rpm | cut -f 1 -d.)
@@ -30,12 +30,14 @@
Requires: rpm < 4.0
Requires: fileutils
Requires: textutils
+Requires: /usr/bin/setarch
%define release_suffix %{release}rpm3
%else
# rpm v4 v5
Requires: rpm-build
Requires: coreutils
+Requires: util-linux
%define release_suffix %{release}
%endif
@@ -76,6 +78,17 @@
%files -f rpmrebuild.files
%changelog
+* Fri Oct 19 2018 2.14-1
+- add list of optional tags, to allow rpmrebuild work with old rpm versions
+- add dependency on setarch
+- add debug code (calls on functions)
+- use local variables to avoid conflicts
+- rewrite html target in Makefile
+- suppress VERSION (use Version)
+- add comments in rpmrebuild_rpmqf.src to avoid bad syntax after GenRpmQf
+- test if awk support non-posix lshift (qf_spec_requires_raw)
+- workaround for redhat 6.x / rpm 3.x, thanks Francesco
+
* Wed Sep 12 2018 2.13-1
- can handle recommends / supplements rpm tags
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmrebuild_buildroot.sh new/rpmrebuild_buildroot.sh
--- old/rpmrebuild_buildroot.sh 2018-09-12 16:28:06.000000000 +0200
+++ new/rpmrebuild_buildroot.sh 2018-10-19 17:51:37.000000000 +0200
@@ -6,7 +6,7 @@
# Copyright (C) 2002, 2003, 2013 by Valery Reznic
# Bug reports to: valery_reznic@users.sourceforge.net
# or : gerbier@users.sourceforge.net
-# $Id: rpmrebuild-2.13 | rpmrebuild_buildroot.sh | Mon Jan 14 12:35:18 2013 +0000 | valery_reznic $
+# $Id: rpmrebuild-2.14 | rpmrebuild_buildroot.sh | Mon Jan 14 12:35:18 2013 +0000 | valery_reznic $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmrebuild_extract_tags.sh new/rpmrebuild_extract_tags.sh
--- old/rpmrebuild_extract_tags.sh 2018-09-12 16:28:06.000000000 +0200
+++ new/rpmrebuild_extract_tags.sh 2018-10-19 17:51:37.000000000 +0200
@@ -2,7 +2,7 @@
###############################################################################
# Copyright (C) 2002 by Eric Gerbier
# Bug reports to: gerbier@users.sourceforge.net
-# $Id: rpmrebuild-2.13 | rpmrebuild_extract_tags.sh | Tue Feb 14 09:30:42 2012 +0000 | gerbier $
+# $Id: rpmrebuild-2.14 | rpmrebuild_extract_tags.sh | Tue Feb 14 09:30:42 2012 +0000 | gerbier $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmrebuild_files.sh new/rpmrebuild_files.sh
--- old/rpmrebuild_files.sh 2018-09-12 16:28:06.000000000 +0200
+++ new/rpmrebuild_files.sh 2018-10-19 17:51:37.000000000 +0200
@@ -6,7 +6,7 @@
# Copyright (C) 2002, 2003, 2013 by Valery Reznic
# Bug reports to: valery_reznic@users.sourceforge.net
# or : gerbier@users.sourceforge.net
-# $Id: rpmrebuild-2.13 | rpmrebuild_files.sh | Mon Jan 14 12:35:18 2013 +0000 | valery_reznic $
+# $Id: rpmrebuild-2.14 | rpmrebuild_files.sh | Mon Jan 14 12:35:18 2013 +0000 | valery_reznic $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmrebuild_ghost.sh new/rpmrebuild_ghost.sh
--- old/rpmrebuild_ghost.sh 2018-09-12 16:28:06.000000000 +0200
+++ new/rpmrebuild_ghost.sh 2018-10-19 17:51:37.000000000 +0200
@@ -6,7 +6,7 @@
# Copyright (C) 2002, 2003, 2013 by Valery Reznic
# Bug reports to: valery_reznic@users.sourceforge.net
# or : gerbier@users.sourceforge.net
-# $Id: rpmrebuild-2.13 | rpmrebuild_ghost.sh | Mon Jan 14 12:35:18 2013 +0000 | valery_reznic $
+# $Id: rpmrebuild-2.14 | rpmrebuild_ghost.sh | Mon Jan 14 12:35:18 2013 +0000 | valery_reznic $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmrebuild_lib.src new/rpmrebuild_lib.src
--- old/rpmrebuild_lib.src 2018-09-12 16:28:06.000000000 +0200
+++ new/rpmrebuild_lib.src 2018-10-19 17:51:37.000000000 +0200
@@ -2,7 +2,7 @@
###############################################################################
# Copyright (C) 2011 by Eric Gerbier
# This file is a part of the rpmrebuild project
-# $Id: rpmrebuild-2.13 | rpmrebuild_lib.src | Wed Nov 27 20:21:55 2013 +0100 | Eric Gerbier $
+# $Id: rpmrebuild-2.14 | rpmrebuild_lib.src | Fri Oct 12 09:29:50 2018 +0200 | Eric Gerbier $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,6 +18,14 @@
# common functions for all scripts
###############################################################################
+function Debug
+{
+ if [ -n "$debug" ]
+ then
+ echo -e "DEBUG: $@" 1>&2
+ fi
+}
+###############################################################################
function Echo
{
echo -e "$@" 1>&2
@@ -88,6 +96,19 @@
then
return 0
else
+ return 1
+ fi
+}
+###############################################################################
+# the decode_requires function in spec_func.src uses gnu awk syntax
+# not posix
+function TestAwk
+{
+ local tst=$( echo 1 | awk '{ print lshift($1,1) }' 2> /dev/null )
+ if [ -n "$tst" ] && [ "$tst" -eq '2' ]
+ then
+ return 0
+ else
return 1
fi
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmrebuild_parser.src new/rpmrebuild_parser.src
--- old/rpmrebuild_parser.src 2018-09-12 16:28:06.000000000 +0200
+++ new/rpmrebuild_parser.src 2018-10-19 17:51:38.000000000 +0200
@@ -4,7 +4,7 @@
#
# Copyright (C) 2002 by Eric Gerbier
# Bug reports to: gerbier@users.sourceforge.net
-# $Id: rpmrebuild-2.13 | rpmrebuild_parser.src | Wed Sep 12 15:59:23 2018 +0200 | Eric Gerbier $
+# $Id: rpmrebuild-2.14 | rpmrebuild_parser.src | Fri Oct 12 09:24:27 2018 +0200 | Eric Gerbier $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
###############################################################################
function Usage
{
- name='rpmrebuild'
+ local name='rpmrebuild'
Echo "$name $UsageTitle
$UsageUsage: $name [options] package
options:
@@ -61,7 +61,7 @@
###############################################################################
function Usage_Plugins
{
- name='rpmrebuild'
+ local name='rpmrebuild'
Echo "$name $UsageTitle
$UsageUsage: $name [options] package
options:
@@ -122,15 +122,15 @@
###############################################################################
function List_Plugins
{
- plugindir=$( dirname $0)/plugins
+ local plugindir=$( dirname $0)/plugins
for f in $plugindir/*.plug
do
- plug=$(basename $f)
+ local plug=$(basename $f)
# use man to force localisation
# line number may vary
#text=$(man $plug | awk 'NR==7{print}' )
# filter by name of plugin
- text=$(man $plug | awk "/$plug +- /{print}" )
+ local text=$(man $plug | awk "/$plug +- /{print}" )
if [ -n "$text" ]
then
echo "$text"
@@ -1069,6 +1069,7 @@
debug)
debug="yes"
+ rpm_verbose="--verbose"
;;
define)
@@ -1192,7 +1193,7 @@
version)
set -e
- source $MY_LIB_DIR/VERSION
+ GetVersion
set +e
echo "$VERSION"
NEED_EXIT=0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmrebuild_rpmqf.src new/rpmrebuild_rpmqf.src
--- old/rpmrebuild_rpmqf.src 2018-09-12 16:28:06.000000000 +0200
+++ new/rpmrebuild_rpmqf.src 2018-10-19 17:51:38.000000000 +0200
@@ -2,7 +2,7 @@
###############################################################################
# Copyright (C) 2002 by Eric Gerbier
# Bug reports to: gerbier@users.sourceforge.net
-# $Id: rpmrebuild-2.13 | rpmrebuild_rpmqf.src | Wed Sep 12 15:59:23 2018 +0200 | Eric Gerbier $
+# $Id: rpmrebuild-2.14 | rpmrebuild_rpmqf.src | Wed Oct 17 15:16:18 2018 +0200 | Eric Gerbier $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -89,22 +89,32 @@
}
function qf_spec_suggest {
-echo "#suggest"
+# the tag names has been changed during the time
+# GenRpmQf function will keep only the available one's
+echo
+# new name
+echo '%|SUGGESTNAME?{[Suggests: %{SUGGESTNAME} %{SUGGESTFLAGS:depflags} %{SUGGESTVERSION}\n]}|'
+# old name
echo '%|SUGGESTSNAME?{[Suggests: %{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n]}|'
}
function qf_spec_enhance {
-echo "#enhance"
+# the tag names has been changed during the time
+# GenRpmQf function will keep only the available one's
+echo
+# new name
+echo '%|ENHANCENAME?{[Enhances: %{ENHANCENAME} %{ENHANCEFLAGS:depflags} %{ENHANCEVERSION}\n]}|'
+# old name
echo '%|ENHANCESNAME?{[Enhances: %{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n]}|'
}
function qf_spec_recommends {
-echo "#recommends"
+echo
echo '%|RECOMMENDNAME?{[Recommends: %{RECOMMENDNAME} %{RECOMMENDFLAGS:depflags} %{RECOMMENDVERSION}\n]}|'
}
function qf_spec_supplements {
-echo "#supplements"
+echo
echo '%|SUPPLEMENTNAME?{[Supplements: %{SUPPLEMENTNAME} %{SUPPLEMENTFLAGS:depflags} %{SUPPLEMENTVERSION}\n]}|'
}
@@ -130,38 +140,47 @@
}
function qf_spec_triggers {
+echo
echo '[%%trigger%{TRIGGERTYPE} -p %{TRIGGERSCRIPTPROG} -- %{TRIGGERCONDS}\n%|TRIGGERSCRIPTS?{%{TRIGGERSCRIPTS}\n}|]'
}
function qf_spec_pre {
+echo
echo '%|PREINPROG?{%%pre -p %{PREINPROG}\n%|PREIN?{[%{PREIN}\n]}|}:{%|PREIN?{\n%%pre\n[%{PREIN}\n]}|}|'
}
function qf_spec_pretrans {
+echo
echo '%|PRETRANSPROG?{%%pretrans -p %{PRETRANSPROG}\n%|PRETRANS?{[%{PRETRANS}\n]}|}:{%|PRETRANS?{\n%%pretrans\n[%{PRETRANS}\n]}|}|'
}
function qf_spec_post {
+echo
echo '%|POSTINPROG?{%%post -p %{POSTINPROG}\n%|POSTIN?{[%{POSTIN}\n]}|}:{%|POSTIN?{\n%%post\n[%{POSTIN}\n]}|}|'
}
function qf_spec_posttrans {
+echo
echo '%|POSTTRANSPROG?{%%posttrans -p %{POSTTRANSPROG}\n%|POSTTRANS?{[%{POSTTRANS}\n]}|}:{%|POSTTRANS?{\n%%posttrans\n[%{POSTTRANS}\n]}|}|'
}
function qf_spec_preun {
+echo
echo '%|PREUNPROG?{%%preun -p %{PREUNPROG}\n%|PREUN?{[%{PREUN}\n]}|}:{%|PREUN?{\n%%preun\n[%{PREUN}\n]}|}|'
}
function qf_spec_postun {
+echo
echo '%|POSTUNPROG?{%%postun -p %{POSTUNPROG}\n%|POSTUN?{[%{POSTUN}\n]}|}:{%|POSTUN?{\n%%postun\n[%{POSTUN}\n]}|}|'
}
function qf_spec_verifyscript {
+echo
echo '%|VERIFYSCRIPTPROG?{%%verifyscript -p %{VERIFYSCRIPTPROG}\n%|VERIFYSCRIPT?{[%{VERIFYSCRIPT}\n]}|}:{%|VERIFYSCRIPT?{\n%%verifyscript\n[%{VERIFYSCRIPT}\n]}|}|'
}
function qf_spec_changelog {
+echo
echo '%|CHANGELOGNAME?{[* %{CHANGELOGTIME:day} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]}|'
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec_func.src new/spec_func.src
--- old/spec_func.src 2018-09-12 16:28:06.000000000 +0200
+++ new/spec_func.src 2018-10-19 17:51:38.000000000 +0200
@@ -2,7 +2,7 @@
###############################################################################
# Copyright (C) 2004, 2009 by Valery Reznic
# This file is a part of the rpmrebuild project
-# $Id: rpmrebuild-2.13 | spec_func.src | Wed Sep 12 15:59:23 2018 +0200 | Eric Gerbier $
+# $Id: rpmrebuild-2.14 | spec_func.src | Fri Oct 12 09:29:50 2018 +0200 | Eric Gerbier $
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -48,10 +48,12 @@
}
###############################################################################
+# the i18ndomains option for rpm does not exists in old release
+# the variable is set by check_i18ndomains function
function spec_query
{
rpm_qf=$( $1 )
- local RPM_QUERY="rpm --query --i18ndomains /dev/null $package_flag --queryformat "
+ local RPM_QUERY="rpm --query $i18ndomains $package_flag --queryformat "
$RPM_QUERY "$rpm_qf" $PAQUET || return
return 0
}
@@ -99,8 +101,16 @@
# Comment out Requires with rpmlib()
local sed_requires='/Requires[[:space:]]*:[[:space:]]*rpmlib(.*)/s/^/#/'
[ "X$autorequire" = "Xyes" ] && sed_requires="$sed_requires$sed_comment"
- spec_query qf_spec_requires_raw | decode_requires \
+ TestAwk
+ if [ "$?" -eq 0 ]
+ then
+ # current code using awk to decode
+ spec_query qf_spec_requires_raw | decode_requires \
| sed -e "$sed_requires" || return
+ else
+ # old code without awk for old distributions
+ spec_query qf_spec_requires | sed -e "$sed_requires" || return
+ fi
return 0
}
@@ -142,6 +152,7 @@
function SpecGeneration
{
+ Debug '(SpecGeneration)'
# Comment Out every string
local sed_comment=';s/^/#/'
@@ -172,6 +183,7 @@
function spec_concatenate
{
+ Debug '(spec_concatenate)'
# duplicate all percent
local sed_double_percent='s/%/%%/g'
++++++ rpmrebuild.keyring ++++++
--- /var/tmp/diff_new_pack.LsV4Am/_old 2018-11-05 22:55:24.344054638 +0100
+++ /var/tmp/diff_new_pack.LsV4Am/_new 2018-11-05 22:55:24.344054638 +0100
@@ -70,3 +70,4 @@
2KnGQ9twDBXFyeAIgKW5GmlnPeCBdcO9mAn6YoYwCPHbOw==
=D16O
-----END PGP PUBLIC KEY BLOCK-----
+