rpm 4.16.1.2 from rpm.org has landed in Th

Tomasz Pala gotar at polanet.pl
Wed Feb 24 02:41:16 CET 2021


On Tue, Feb 23, 2021 at 16:48:52 +0100, Jan Rękorajski wrote:

>> Since --repackage is gone, some nice warning for people that might have relied
>> on this feature would be welcome. And some rpmrebuild update maybe:)
> 
> Added a big fat warning about repackage on the wiki page.

Thanks.

> What do you mean by rpmrebuild?

git.pld-linux.org/packages/rpmrebuild

- the project seems to be actively maintained, last release 2.16-1 at
  2021-01-17: http://rpmrebuild.sourceforge.net/changelog.html

and apparently this is the preferred ("official") way to replace --repackage.

There is one drawback (it's not hooked to --erase operation). And maybe
some some rpm-behaviour related: http://rpmrebuild.sourceforge.net/faq.html#use1

And a few more advantages:
- can create rpm file without actual --erase (note the rpm --repackage
  --test --erase something in rpm5 created _empty_ something.rpm),
- can keep spec file (-s),

It needs some polishing, like verifying bash requirement, moving to
/usr/libexec maybe (paths hardcoded), path sanitization:

MY_LIB_DIR=$( dirname "$0" ) || ( echo "ERROR rpmrebuild.sh dirname $0"; exit 1)
RPMREBUILD_TMPDIR=${RPMREBUILD_TMPDIR:-~/.tmp/rpmrebuild.$$}

and general review (well, never trust shell script doing rm -rf "$Dir"):

eval $change_arch $BUILDCMD --define "'buildroot $BUILDROOT'" $rpm_defines -bb $rpm_verbose $additional ${FIC_SPEC}

What worries me most is that some obvious script errors (like using not
quoted $Dir, this is more that purely bad programming practice) was
fixed recently (2021-01-03). It doesn't even seem to be locale-safe.

Basically this is a pile of workaround hacks that might crash in more
ways one can imagine, but with a bit of trust to the sanity of installed
packages (we don't expect any hacky filenames with newlines or some
special characters) it might do it's job.


-- 
Tomasz Pala <gotar at pld-linux.org>


More information about the pld-devel-en mailing list