Bug 250515 - [NEW PORT] databases/mdbtools-dev: cmdline tools to assist in working with access databases, including migrations (development version)
Summary: [NEW PORT] databases/mdbtools-dev: cmdline tools to assist in working with ac...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Rainer Hurling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-21 22:03 UTC by Thaddeus Covert
Modified: 2020-10-25 06:37 UTC (History)
2 users (show)

See Also:


Attachments
cmdline tools to assist in working with access databases, including migrations (4.11 KB, text/plain)
2020-10-21 22:03 UTC, Thaddeus Covert
no flags Details
Update to 0.9.0 beta3 (7.42 KB, patch)
2020-10-25 06:37 UTC, Rainer Hurling
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thaddeus Covert 2020-10-21 22:03:31 UTC
Created attachment 218959 [details]
cmdline tools to assist in working with access databases, including migrations

mdbtools has a new site, and maintainers. I needed a newer version for a project, so I formalized my build effort into a mdbtools-dev port, should others be interested.

Original port databases/mdbtools.
Maintainer: rhurlin at freebsd dot org

New port:
databases/mdbtools-dev

The guidelines in the porters handbook have been followed before submission, short of a poudriere build.
Comment 1 Rainer Hurling freebsd_committer 2020-10-22 05:55:28 UTC
Hi,

I am aware of this new site for the mdbtools sources on Github. Several of those who have contributed so far are also active here.

For the existing port, databases/mdbtools, I am in preparation for an update to version 0.9.0 already. I plan to update the port right after the release.

Please do not misunderstand me. But, do we really need a -dev port for all users in the time until the release? It would also be possible for you to work only locally with your dev-port and switch back after the release ...

OTOH, if such a dev-port is really wanted, I personally have nothing against it ;)

Greetings,
Rainer
Comment 2 Rainer Hurling freebsd_committer 2020-10-22 06:12:39 UTC
I forgot to mention that I plan to add a second port databases/gmdb2 to install the gnome gui for mdbtools. (The gui was recently moved to a separate repository.)
Comment 3 Thaddeus Covert 2020-10-22 12:58:52 UTC
(In reply to Rainer Hurling from comment #1)

Glad to hear you're on top of it; glad I included the reference to you. I don't know if others need a dev version; I'd doubt it. The version in ports didn't work for me, but the default version(dev) from github did. As I had to do a few things by hand to get things to work, I felt compelled to share with the community. Not finding the release schedule posted on the page and finding that 0.8.2 was over 2 years old, I thought to offer a more recent version.

I appreciate all the work you and the team have put into the project; you're obviously active and interested in updating the port. I leave it to you to decide what you will with my submission, close it, update it to 0.10 once 0.9 is released, incorporate any changes you may need/want with what you already have.

Glad that you're also creating a port for the gui portion; I had noticed it had moved but didn't have any personal need for it, so I didn't put any effort into attempting to get that to work.
Comment 4 Rainer Hurling freebsd_committer 2020-10-22 16:52:51 UTC
(In reply to Thaddeus Covert from comment #3)

> Glad to hear you're on top of it; glad I included the reference to you.
:)

> I don't know if others need a dev version; I'd doubt it. The version in
> ports didn't work for me, but the default version(dev) from github did.
> As I had to do a few things by hand to get things to work, I felt 
> compelled to share with the community. Not finding the release schedule
> posted on the page and finding that 0.8.2 was over 2 years old, I 
> thought to offer a more recent version.
I really do understand this. It is a very nice idea!

> I appreciate all the work you and the team have put into the project;
> you're obviously active and interested in updating the port. I leave it
> to you to decide what you will with my submission, close it, update it
> to 0.10 once 0.9 is released, incorporate any changes you may need/want
> with what you already have.
Also I can hardly estimate whether an additional development port is of use.

What is your opinion about the following proposal:
I take over this port so that it is not closed or committed until the main port is ready. Then we decide together if a dev port would be useful after all?

> Glad that you're also creating a port for the gui portion; I had
> noticed it had moved but didn't have any personal need for it, so I
> didn't put any effort into attempting to get that to work.
I myself do not need the GUI either. But several users have an interest in it.

Thanks for your understanding.
Comment 5 Thaddeus Covert 2020-10-23 00:18:11 UTC
(In reply to Rainer Hurling from comment #4)

I'm fine with this, thanks. Initially I had put your name in it as the maintainer, then I thought that was presumptuous.

I've run through the porters handbook, particularly section 10.0 up to 10.5. I have it working with no warnings or errors. However, if you could take a look at my usage of the iconv, I don't think I have it in there optimally.

Again, thank you for your contributions. Let me know if I can help.
Comment 6 Rainer Hurling freebsd_committer 2020-10-24 19:29:07 UTC
Hi Thaddeus,

I am just playing around a bit with beta3. Commands like mdb-tables or mdb-export every time print two or more warnings before the regular output:

mdb-tables testtable.mdb
warning: row_size = 0.
warning: row_size = 0.
TABLE1 TABLE2 [...]


Could you please try if you can reproduce this?
Comment 7 Thaddeus Covert 2020-10-25 02:11:49 UTC
(In reply to Rainer Hurling from comment #6)

I don't have an mdb, but I do have a client provided accdb that I've been using the toolset on.

Just realized I'm on beta2 and you've specified beta3. I'll show my beta2 results anyway.
% mdb-ver cust.accdb                    
ACE12

% mdb-tables cust.accdb
ACLbalance ACLtransaction Definitions InvoiceCRRAuction InvoiceCRRBalAccount InvoiceDAMRTM InvoiceMisc InvoiceUplift Months SettlementDAMRTM ACLupdate InvoiceLateFee

Doesn't reproduce with that version. Let me go build and try beta3.
Comment 8 Thaddeus Covert 2020-10-25 02:53:49 UTC
(In reply to Thaddeus Covert from comment #7)

Changed beta2 to beta3 in -dev port. Port builds. Install fails:

/usr/ports/databases/mdbtools-dev]# make install
===>  Installing for mdbtools-0.9.0.b3
===>  Checking if mdbtools is already installed
===>   Registering installation for mdbtools-0.9.0.b3
pkg-static: Unable to access file /usr/ports/databases/mdbtools-dev/work/stage/usr/local/include/mdbver.h:No such file or directory
*** Error code 74

Stop.
make[1]: stopped in /usr/ports/databases/mdbtools-dev
*** Error code 1

Stop.
make: stopped in /usr/ports/databases/mdbtools-dev
/usr/ports/databases/mdbtools-dev]# find . -name 'mdbver.h'
./work/mdbtools-0.9.0-beta3/include/mdbver.h

Checkout beta3 in developer branch.
git branch
* (HEAD detached at v0.9.0-beta3)
  dev
  upstream
# note: not gmake clean
% make clean

mdbtools% CC=clang CXX=clang++ LDFLAGS="-L/usr/local/lib" LIBS="-liconv" ./configure --with-libiconv-prefix=/usr/local/ --enable-gtk-doc --prefix=${HOME}

configure: 
configure: MDB Tools 0.9.0-beta3 - Configuration summary
configure: 
configure:    SQL             : enabled
configure:    ODBC            : disabled
configure:    GLib            : enabled
configure:    Gtk doc         : enabled
configure:    man             : enabled
configure:    html docbook    : disabled
configure:    bash-completion : enabled
configure: 

% gmake
% gmake install
...
gmake[4]: Nothing to be done for 'install-exec-am'.
 /usr/local/bin/gmkdir -p '/usr/local/share/bash-completion/completions'
 /usr/bin/install -c -m 644 mdb-export mdb-hexdump mdb-import mdb-parsecsv mdb-prop mdb-schema mdb-sql mdb-tables mdb-ver '/usr/local/share/bash-completion/completions'
install: /usr/local/share/bash-completion/completions/mdb-export: Permission denied
gmake[4]: *** [Makefile:347: install-dist_bashcompletionDATA] Error 71


#NOTE: It tried to install the bash-completion someplace other than after the prefix.

% ./src/util/.libs/mdb-ver -M
mdbtools v0.9.0-beta3
% ./src/util/.libs/mdb-tables ../cust.accdb
ACLbalance ACLtransaction Definitions InvoiceCRRAuction InvoiceCRRBalAccount InvoiceDAMRTM InvoiceMisc InvoiceUplift Months SettlementDAMRTM ACLupdate InvoiceLateFee

% freebsd-version -kru                                                                                                                             [22:50:40]
13.0-CURRENT
13.0-CURRENT
13.0-CURRENT

uname -a
FreeBSD example.com 13.0-CURRENT FreeBSD 13.0-CURRENT #0 5fe3a4092-c1845(master): Fri Sep 25 02:35:39 EDT 2020     root@example.com:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG  amd64
Comment 9 Rainer Hurling freebsd_committer 2020-10-25 06:37:09 UTC
Created attachment 219052 [details]
Update to 0.9.0 beta3

OK, sorry that I did not attach a diff for the latest beta3 version, I am working with.

As this version is not planned as a dev version, but as a replacement for my regular port, I am named as the maintainer here.

- This Makefile has some changes against your one: The is no need to double distfile version via GH_TAGNAME. A simple DISTVERSIONPREFIX=v is all we need here.
- I included databases/libmswstr as dependency to be able to use index fields in Microsoft Jet 4 Databases. (I am not sure, if this works as expected until now.)
- Clean up a bit the iconv parameters/arguments.
- Patching an unsigned error in src/libmdb/index.c. (Already committed upstream[1])
- Refresh pkg-plist


MORE IMPORTANT: I tested beta3 with several other mdb files and with them I do not get the warnings about row_size=0! Sorry for the noise.

(So I have to investigate, why this happens with special mdb files, I get from third party at work.)


[1] https://github.com/mdbtools/mdbtools/commit/60ee6495b71abb910e7abe9c58dae6dbf9731e40