Re: Making rpm5 work with dnf

2016-12-08 Thread Alexander Kanavin

On 12/08/2016 10:54 AM, Jeff Johnson wrote:

Jeff, can you commit the changes to cvs?



I can’t check in code blindly, nor will I check in code that cannot be tested,
nor do I have the time to generate diff’s and examine your port.

There is no way to test (even de facto, by running some other application)
rpm-python3 atm.


FWIW, rpm's python support may not be needed at all to run dnf in the 
future, if they port dnf on top of libhif as promised, and stop using a 
combination of hawkey and rpm-python. I didn't study the code in detail 
to confirm this though. It's all in flux at the moment.



Alex
__
RPM Package Managerhttp://rpm5.org
Developer Communication Listrpm-devel@rpm5.org


Re: Making rpm5 work with dnf

2016-12-08 Thread Alexander Kanavin

On 12/07/2016 07:21 PM, Jeffrey Johnson wrote:

Your next stopping point is going to be Berkeley DB as a pre-requisite.


I didn't get there yet; I hit a couple different issues, and these do 
look like bugs. The relevant configure options are


   --with-libgit2 \
   --enable-build-pic \

Issue 1:

make[4]: Entering directory '/home/ak/development/rpm/rpmio'
/bin/bash ../libtool  --tag=CXX   --mode=link g++  -g -O2 -no-undefined 
-release 5.4 -Wl,--version-script,../rpmio/librpmio.vers-o 
librpmio.la -rpath /usr/lib getdate.lo blake2b.lo blake2bp.lo blake2s.lo 
blake2sp.lo blake2-rpm.lo arirang.lo blake.lo bmw.lo chi.lo cubehash.lo 
echo.lo edon-r.lo fugue.lo groestl.lo hamsi.lo jh.lo keccak.lo lane.lo 
luffa.lo md2.lo md6.lo radiogatun.lo salsa10.lo salsa20.lo shabal.lo 
shavite3.lo simd.lo skein.lo tib3.lo tiger.lo rpmgit.lo rpmio-stub.lo 
rpmjs.lo rpmjsio.lo rpmkeyring.lo rpmnix.lo rpmodbc.lo rpmsql.lo set.lo 
ar.lo argv.lo bcon.lo bson.lo bzdio.lo cipher.lo cpio.lo crc.lo 
digest.lo fts.lo gzdio.lo iosm.lo jsmn.lo lsyck.lo macro.lo mire.lo 
mongoc.lo mount.lo pcrs.lo poptIO.lo rpmacl.lo rpmasn.lo rpmaug.lo 
rpmbag.lo rpmbc.lo rpmbf.lo rpmcdsa.lo rpmct.lo rpmcudf.lo rpmcvs.lo 
rpmdate.lo rpmdav.lo rpmdir.lo rpmficl.lo rpmgc.lo rpmgfs.lo rpmhash.lo 
rpmhkp.lo rpmhook.lo rpmio.lo rpmiob.lo rpmjni.lo rpmku.lo rpmlog.lo 
rpmltc.lo rpmlua.lo rpmmalloc.lo rpmmg.lo rpmmqtt.lo rpmmrb.lo rpmnss.lo 
rpmperl.lo rpmpgp.lo rpmpython.lo rpmrpc.lo rpmruby.lo rpmsed.lo 
rpmsm.lo rpmsp.lo rpmsq.lo rpmsquirrel.lo rpmssl.lo rpmsvn.lo rpmsw.lo 
rpmsx.lo rpmsyck.lo rpmtcl.lo rpmtpm.lo rpmuuid.lo rpmxar.lo rpmzlog.lo 
rpmzq.lo strcasecmp.lo strtolocale.lo tar.lo ugid.lo url.lo xzdio.lo 
yajl.lo yarn.lo duktape.o -lm ../misc/librpmmisc.la -lpcreposix -lpcre 
-ldl -lm -ltcl8.6 -lpython2.7 -lreadline -lmagic -lexpat -lz -lpopt 
-lpthread  -lelf -lpopt -lz -lexpat -lpcre

depbase=`echo tgit.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../build -I../lib -I../lib 
-I../rpmdb -I../rpmio -I../misc -I../beecrypt/include 
-I../beecrypt/include -I../beecrypt -I../beecrypt -I../libgit2/include 
-I../libgit2/include -I../libgit2 -I../libgit2 -I../lua/local 
-I../lua/local -I../lua -I../lua -I../neon/src -I../neon/src -I../neon 
-I../neon -I../syck/lib -I../syck/lib -I../syck -I../syck 
-DRPM_OS_LINUX=040800 -I../gnulib -I../gnulib -I/usr/include/db62 
-I/usr/include/python2.7 -I/usr/include/python2.7 -fopenmp -g -O2 -g 
-D_GNU_SOURCE -D_REENTRANT -MT tgit.o -MD -MP -MF $depbase.Tpo -c -o 
tgit.o tgit.c &&\

mv -f $depbase.Tpo $depbase.Po
tgit.c: In function ‘cmd_ls_remote’:
tgit.c:3755:2: error: too few arguments to function ‘git_remote_connect’
  git_remote_connect(remote, GIT_DIRECTION_FETCH,
  ^
tgit.c:47:25: note: in definition of macro ‘chkgit’
 Xchkgit(_git, _msg, _error, _rpmgit_debug, __FUNCTION__, __FILE__, 
__LINE__)

 ^~
In file included from ../libgit2/include/git2/clone.h:14:0,
 from ../libgit2/include/git2.h:19,
 from ./rpmgit.h:32,
 from tgit.c:9:
../libgit2/include/git2/remote.h:249:17: note: declared here
 GIT_EXTERN(int) git_remote_connect(git_remote *remote, git_direction 
direction, const git_remote_callbacks *callbacks, const 
git_proxy_options *proxy_opts, const git_strarray *custom_headers);

 ^~
Makefile:3104: recipe for target 'tgit.o' failed

Issue 2:

*** Warning: Linking the shared library librpmio.la against the non-libtool
*** objects  duktape.o is not portable!
libtool: link: g++  -fPIC -DPIC -shared -nostdlib 
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/crti.o 
/usr/lib/gcc/x86_64-linux-gnu/6/crtbeginS.o  .libs/getdate.o 
.libs/blake2b.o .libs/blake2bp.o .libs/blake2s.o .libs/blake2sp.o 
.libs/blake2-rpm.o .libs/arirang.o .libs/blake.o .libs/bmw.o .libs/chi.o 
.libs/cubehash.o .libs/echo.o .libs/edon-r.o .libs/fugue.o 
.libs/groestl.o .libs/hamsi.o .libs/jh.o .libs/keccak.o .libs/lane.o 
.libs/luffa.o .libs/md2.o .libs/md6.o .libs/radiogatun.o .libs/salsa10.o 
.libs/salsa20.o .libs/shabal.o .libs/shavite3.o .libs/simd.o 
.libs/skein.o .libs/tib3.o .libs/tiger.o .libs/rpmgit.o 
.libs/rpmio-stub.o .libs/rpmjs.o .libs/rpmjsio.o .libs/rpmkeyring.o 
.libs/rpmnix.o .libs/rpmodbc.o .libs/rpmsql.o .libs/set.o .libs/ar.o 
.libs/argv.o .libs/bcon.o .libs/bson.o .libs/bzdio.o .libs/cipher.o 
.libs/cpio.o .libs/crc.o .libs/digest.o .libs/fts.o .libs/gzdio.o 
.libs/iosm.o .libs/jsmn.o .libs/lsyck.o .libs/macro.o .libs/mire.o 
.libs/mongoc.o .libs/mount.o .libs/pcrs.o .libs/poptIO.o .libs/rpmacl.o 
.libs/rpmasn.o .libs/rpmaug.o .libs/rpmbag.o .libs/rpmbc.o .libs/rpmbf.o 
.libs/rpmcdsa.o .libs/rpmct.o .libs/rpmcudf.o .libs/rpmcvs.o 
.libs/rpmdate.o .libs/rpmdav.o .libs/rpmdir.o .libs/rpmficl.o 
.libs/rpmgc.o .libs/rpmgfs.o .libs/rpmhash.o .libs/rpmhkp.o 
.libs/rpmhook.o .libs/rpmio.o .libs/rpmiob.o .libs/rpmjni.o 
.libs/rpmku.o .libs/rpmlog.o 

Re: Making rpm5 work with dnf

2016-12-08 Thread Jeffrey Johnson

> On Dec 8, 2016, at 10:16 AM, Alexander Kanavin 
>  wrote:
> 
> On 12/07/2016 07:21 PM, Jeffrey Johnson wrote:
>> Your next stopping point is going to be Berkeley DB as a pre-requisite.
> 
> I didn't get there yet; I hit a couple different issues, and these do look 
> like bugs. The relevant configure options are
> 
>   --with-libgit2 \
>   --enable-build-pic \
> 

You are doing well ;-)

> Issue 1:
> 
> make[4]: Entering directory '/home/ak/development/rpm/rpmio'
> /bin/bash ../libtool  --tag=CXX   --mode=link g++  -g -O2 -no-undefined 
> -release 5.4 -Wl,--version-script,../rpmio/librpmio.vers-o librpmio.la 
> -rpath /usr/lib getdate.lo blake2b.lo blake2bp.lo blake2s.lo blake2sp.lo 
> blake2-rpm.lo arirang.lo blake.lo bmw.lo chi.lo cubehash.lo echo.lo edon-r.lo 
> fugue.lo groestl.lo hamsi.lo jh.lo keccak.lo lane.lo luffa.lo md2.lo md6.lo 
> radiogatun.lo salsa10.lo salsa20.lo shabal.lo shavite3.lo simd.lo skein.lo 
> tib3.lo tiger.lo rpmgit.lo rpmio-stub.lo rpmjs.lo rpmjsio.lo rpmkeyring.lo 
> rpmnix.lo rpmodbc.lo rpmsql.lo set.lo ar.lo argv.lo bcon.lo bson.lo bzdio.lo 
> cipher.lo cpio.lo crc.lo digest.lo fts.lo gzdio.lo iosm.lo jsmn.lo lsyck.lo 
> macro.lo mire.lo mongoc.lo mount.lo pcrs.lo poptIO.lo rpmacl.lo rpmasn.lo 
> rpmaug.lo rpmbag.lo rpmbc.lo rpmbf.lo rpmcdsa.lo rpmct.lo rpmcudf.lo 
> rpmcvs.lo rpmdate.lo rpmdav.lo rpmdir.lo rpmficl.lo rpmgc.lo rpmgfs.lo 
> rpmhash.lo rpmhkp.lo rpmhook.lo rpmio.lo rpmiob.lo rpmjni.lo rpmku.lo 
> rpmlog.lo rpmltc.lo rpmlua.lo rpmmalloc.lo rpmmg.lo rpmmqtt.lo rpmmrb.lo 
> rpmnss.lo rpmperl.lo rpmpgp.lo rpmpython.lo rpmrpc.lo rpmruby.lo rpmsed.lo 
> rpmsm.lo rpmsp.lo rpmsq.lo rpmsquirrel.lo rpmssl.lo rpmsvn.lo rpmsw.lo 
> rpmsx.lo rpmsyck.lo rpmtcl.lo rpmtpm.lo rpmuuid.lo rpmxar.lo rpmzlog.lo 
> rpmzq.lo strcasecmp.lo strtolocale.lo tar.lo ugid.lo url.lo xzdio.lo yajl.lo 
> yarn.lo duktape.o -lm ../misc/librpmmisc.la -lpcreposix -lpcre -ldl -lm 
> -ltcl8.6 -lpython2.7 -lreadline -lmagic -lexpat -lz -lpopt -lpthread  -lelf 
> -lpopt -lz -lexpat -lpcre
> depbase=`echo tgit.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> gcc -DHAVE_CONFIG_H -I. -I..  -I. -I.. -I../build -I../lib -I../lib 
> -I../rpmdb -I../rpmio -I../misc -I../beecrypt/include -I../beecrypt/include 
> -I../beecrypt -I../beecrypt -I../libgit2/include -I../libgit2/include 
> -I../libgit2 -I../libgit2 -I../lua/local -I../lua/local -I../lua -I../lua 
> -I../neon/src -I../neon/src -I../neon -I../neon -I../syck/lib -I../syck/lib 
> -I../syck -I../syck -DRPM_OS_LINUX=040800 -I../gnulib -I../gnulib 
> -I/usr/include/db62 -I/usr/include/python2.7 -I/usr/include/python2.7 
> -fopenmp -g -O2 -g -D_GNU_SOURCE -D_REENTRANT -MT tgit.o -MD -MP -MF 
> $depbase.Tpo -c -o tgit.o tgit.c &&\
> mv -f $depbase.Tpo $depbase.Po
> tgit.c: In function ‘cmd_ls_remote’:
> tgit.c:3755:2: error: too few arguments to function ‘git_remote_connect’
>  git_remote_connect(remote, GIT_DIRECTION_FETCH,
>  ^
> tgit.c:47:25: note: in definition of macro ‘chkgit’
> Xchkgit(_git, _msg, _error, _rpmgit_debug, __FUNCTION__, __FILE__, 
> __LINE__)
> ^~
> In file included from ../libgit2/include/git2/clone.h:14:0,
> from ../libgit2/include/git2.h:19,
> from ./rpmgit.h:32,
> from tgit.c:9:
> ../libgit2/include/git2/remote.h:249:17: note: declared here
> GIT_EXTERN(int) git_remote_connect(git_remote *remote, git_direction 
> direction, const git_remote_callbacks *callbacks, const git_proxy_options 
> *proxy_opts, const git_strarray *custom_headers);
> ^~
> Makefile:3104: recipe for target ‘tgit.o’

RPM5 builds against libgit2 tip and libgit2 “breaks” every other month.

The fixes are usually rather easy, but the code is entirely proof-of-concept.

I recommend
rm -rf libgit2
(which is likely enuf to disable) and building —without-libgit2


> Issue 2:
> 
> *** Warning: Linking the shared library librpmio.la against the non-libtool
> *** objects  duktape.o is not portable!
> libtool: link: g++  -fPIC -DPIC -shared -nostdlib 
> /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/crti.o 
> /usr/lib/gcc/x86_64-linux-gnu/6/crtbeginS.o  .libs/getdate.o .libs/blake2b.o 
> .libs/blake2bp.o .libs/blake2s.o .libs/blake2sp.o .libs/blake2-rpm.o 
> .libs/arirang.o .libs/blake.o .libs/bmw.o .libs/chi.o .libs/cubehash.o 
> .libs/echo.o .libs/edon-r.o .libs/fugue.o .libs/groestl.o .libs/hamsi.o 
> .libs/jh.o .libs/keccak.o .libs/lane.o .libs/luffa.o .libs/md2.o .libs/md6.o 
> .libs/radiogatun.o .libs/salsa10.o .libs/salsa20.o .libs/shabal.o 
> .libs/shavite3.o .libs/simd.o .libs/skein.o .libs/tib3.o .libs/tiger.o 
> .libs/rpmgit.o .libs/rpmio-stub.o .libs/rpmjs.o .libs/rpmjsio.o 
> .libs/rpmkeyring.o .libs/rpmnix.o .libs/rpmodbc.o .libs/rpmsql.o .libs/set.o 
> .libs/ar.o .libs/argv.o .libs/bcon.o .libs/bson.o .libs/bzdio.o 
> .libs/cipher.o .libs/cpio.o .libs/crc.o .libs/digest.o .libs/fts.o 
> 

Re: Making rpm5 work with dnf

2016-12-08 Thread Jeffrey Johnson

> On Dec 8, 2016, at 8:49 AM, Alexander Kanavin 
>  wrote:
> 
> On 12/08/2016 10:54 AM, Jeff Johnson wrote:
>>> Jeff, can you commit the changes to cvs?
>>> 
>> 
>> I can’t check in code blindly, nor will I check in code that cannot be 
>> tested,
>> nor do I have the time to generate diff’s and examine your port.
>> 
>> There is no way to test (even de facto, by running some other application)
>> rpm-python3 atm.
> 
> FWIW, rpm's python support may not be needed at all to run dnf in the future, 
> if they port dnf on top of libhif as promised, and stop using a combination 
> of hawkey and rpm-python. I didn't study the code in detail to confirm this 
> though. It's all in flux at the moment.
> 

I hope that is true: I have essentially zero interest in rpm-python these days.

My guess is that — as long as yum is around — rpm-python will continue
a zombie existence in “open sores” software.

Meanwhile, spinning rpm-python out of RPM CVS into a separate git project
is likely the best way forward. That was rpm.org’s plan as well way back when.

73 de Jeff

__
RPM Package Managerhttp://rpm5.org
Developer Communication Listrpm-devel@rpm5.org


createrepo_c python test failures

2016-12-08 Thread Jeffrey Johnson
If you try building createrepo_c (my build is in doit.sh), you will see

…
RPM5 builds against libgit2 tip and libgit2 “breaks” every other month.

The fixes are usually rather easy, but the code is entirely proof-of-concept.

I recommend
rm -rf libgit2
(which is likely enuf to disable) and building —without-libgit2
…

Digging into the python test failures in build/Testing/Temporary/LastTest.log,
the (first) symptom is

test_contentstat (tests.test_contentstat.TestCaseContentStat) ... error: 
(null): Signature: sigh tag[2]: BAD, tag 269 type 6 offset 20 count 1

(process:128): C_CREATEREPOLIB-WARNING **: read_header: rpmReadPackageFile() 
error
ERROR

This is MANDATORY signature checking in RPM5: the test packages
tests/testdata/packages/*.rpm
are (likely, not checked) unsigned.

A similar failure is going to be seen everywhere that rpmReaqdPackageFile()
is called with unsigned packages built by rpm.org (rpm5 packages are _ALWAYS_ 
signed).

You can still disable MANDATORY signature checking by changing a #define in 
system.h

...
/**
 * Eliminate signature/digest disablers.
 */
#define SUPPORT_NOSIGNATURES1
#define SUPPORT_NODIGESTS   1


Please note that rpm-5.4.18 will be released with MANDATORY
signatures and all the code marked with those #defines removed
from the release.

==> YOU HAVE BEEN WARNED <==

(apologies for caps: I have been attempting MANDATORY signature
checking since 2004, and enduring conversations about —nosignatures
needs for almost 5 years now, its all rather frustrating).

The recommended fix (when rpm-5.4.18 is released) for reading unsigned packages
produced by rpm.org will be to sign the packages and import the pubkey. I
believe (but not yet checked) signing would fix the createrepo_c test failure
as well.

hth

73 de Jeff