Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-08-17 Thread Jeff Johnson
FWIW, "data.mdb" can be renamed to "Packages.mdb" in LMDB
 by adding a flag and passing the file path, not the directory path, when 
opening.

Not worth the effort (and adds confusion: "Packages" is the name of a 
database/table within "data.mdb" not the name of the file).

Note that Berkeley DB also permits sub-databases within a file. This was never 
implemented in RPM+BDB because using "ls -l" was deemed KISSier than requiring 
the use of db-utils.

*shrug*

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#issuecomment-323132460___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-08-17 Thread Jeff Johnson
Code duplication (and refactoring) are the least of the problems with the 
current RPM backend.

There is no concept of a "transaction" or "durability" in the current RPM 
backend.

And the existing INIT_CDB Berkeley DB model implemented has been tortured 
beyond belief or reason.

Anything that LMDB implements can easily be implemented with Berkeley DB (if 
used/implemented correctly). LMDB is mostly a pleasant simplification of a 
rather complex API.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#issuecomment-323129301___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-08-17 Thread ニール・ゴンパ
@pmatilai Thank you for reviewing it!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#issuecomment-323041501___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-08-17 Thread Panu Matilainen
Merged manually as of commit ed9de1992f5e1c23e8d8dbd61325a1e0070f2c72

Again, thank you @n3npq for the backend and @Conan-Kudo for the final tweaks!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#issuecomment-323040974___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-08-17 Thread Panu Matilainen
Closed #291.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#event-1209933863___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-08-17 Thread Panu Matilainen
@n3npq : well this is a pleasant surprise. Thank you!

@Conan-Kudo : testing for Packages.mdb existence doesn't make LMDB create it. 
AFAICS the "data.mdb" name is hardwired in LMDB unless MDB_NOSUBDIR is used, 
and using that would introduce other unnecessary complications. I can fix that 
when committing.

Other than that, there seems to be some code duplication from db3.c that could 
be eliminated with a bit of refactoring and other more or less minor cleanups, 
but those can be dealt with later on as time permits.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#issuecomment-323021635___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-07-31 Thread ニール・ゴンパ
@mlschroe Fixed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#issuecomment-319041353___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-07-31 Thread Michael Schroeder
Please remove the part that patches ndb/glue.c from this commit.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#issuecomment-319020600___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-07-30 Thread Jeff Johnson
@Conan-Kudo : if using RPM_CHECK_LIB w internal, its a bit trickier than just 
adding a checkout.
So you likely want to remove "internal" as the 1st thing to try in 
"[yes,internal:external:none]"

FYI, removing "none" as in (yes,external) will fail to configure if not found 
(i.e. mandatory)

And in all cases you can add --with-lmdb=internal, or --without-lmedb, or 
--with-lmdb=no etc etc etc.

IRPM_CHECK_LIB is mostly intuitive once you get the hang of what is what


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#issuecomment-318945518___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-07-30 Thread Jeff Johnson
@ignatenkobrain : I don't send PR's because I don't have the 
time/energy/resources to wait months for review, updating the PR with zero 
feedback other than "Why don't you send PR's?". That's why.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#issuecomment-318943069___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-07-30 Thread ニール・ゴンパ
@n3npq @hyc @ignatenkobrain This should be fully rebased now.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#issuecomment-318926969___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-07-30 Thread ニール・ゴンパ
@Conan-Kudo pushed 1 commit.

c2cad9d  Remove MDB_FIXEDMAP flag to prevent portability issues


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291/files/2864bc4a3cb8905abbed1e833e50e03a6aded5d3..c2cad9da9e06997a5083fbf0eb4ace1ae3f78e1f
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-07-30 Thread Jeff Johnson
See also comments at issue #281 about removing MDB_FIXEDMAP. Just delete the 
line that looks like
`eflags |= MDB_FIXEDMAP`

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#issuecomment-318921238___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-07-30 Thread Igor Gnatenko
@n3npq why don't you send Pull Requests on your own. finding this attachments 
and converting them to real commits is painful and doesn't lead anywhere...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#issuecomment-318921157___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-07-30 Thread Jeff Johnson
BDB and LMDB have always had the ability to have mutable databases (actually 
tables) in a single file. So actually there is a "Packages" 
(sub-)database/table in data.mdb.

Since 2 of 3 backend now have sub-databases in a single file, its likely time 
to do the same with BDB. I've never bothered to do that because people are used 
to using "ls -al" to see the relative size of files: with sub-databases you 
need to run db_stat or mob_stat to see what is using space.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#issuecomment-318911138___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-07-30 Thread Robert Scheck
Is it intended, that it's called `/data.mdb` rather `/Packages.mdb`?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#issuecomment-318894429___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] Add LMDB backend for RPMDB to RPM (from @n3npq in #281) (#291)

2017-07-29 Thread Jeff Johnson
The last patch to RPM_CHECK_LIB is appropriate for "opt-out" builds (i.e. 
--without-lmdb).

Leave "no" if willing to explicitly "opt-in" by passing --with-lmdb to 
configure.

For a serious test in CI, arrange for the macro %_db_backend lmdb to be set by 
default. Almost certainly you will also find that the lock.mdb file will need 
0666 permissions when creating/using a database as non-root. The existing 
implementation will propagate that permission through --rebuilddb if set once 
when a database is created.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/291#issuecomment-318876956___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint