[MacPorts] #38379: New port "databases/sysbench"
#38379: New port "databases/sysbench" ---------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Keywords: haspatch | Port: sysbench ---------------------------------+-------------------------------- This is a follwup submission to Ticket #26811, where a port for sysbench was requested. I wasn't quite sure if these tickets are somehow monitored and I wasn't able to change ticket type to "submission". Hope I did it right. I've created a Portfile and a patch against configure.ac and Makefile.am (solves autoconf and libtool issues). It would fit into the databases category. I currently builds only against MySQL, with mysql55 as the default and options for mysql5 and mysql4. The mysql4 variant is untested though, since the mysql4 port doesn't build on my Lion machine. This is my first submission and if I did something wonky, like not following best practise or Macports standards, tell me and I try to get it corrected. Cheers, Alex. -- Ticket URL: <https://trac.macports.org/ticket/38379> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by egall@…): Just quickly running it through `port -v lint --nitpick`, it reports the following warnings: {{{ Warning: Line 38 seems to hardcode the version number, consider using ${version} instead Warning: Dependency port:libtool specified multiple times in depends_build Warning: Dependency port:autoconf specified multiple times in depends_build Warning: Dependency port:automake specified multiple times in depends_build Warning: Patchfile sysbench-0.4.12.patch does not follow the source patch naming policy "patch-*.diff" }}} The multiple dependencies thing is because `use_autoreconf yes` automatically adds dependencies on autoconf, automake, and libtool for you. Also since this seems to be a benchmark tool I'd consider adding the `benchmarks` category. Anyway, I'm going to try building it next... -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by alexander.janssen@…): Replying to [comment:1 egall@…]:
Just quickly running it through `port -v lint --nitpick`, it reports the following warnings: {{{ Warning: Line 38 seems to hardcode the version number, consider using ${version} instead }}}
I think is related to the paths to the includes and libs of the different mysql ports in the variants sections; sysbench's configure tool insists on these and can't find them automatically. Also I wouldn't know how to tell him the correct version of the client libraries to use. Is there a way to do this better? Is there something like `${port:mysql5:libpath}`?
The multiple dependencies thing is because "`use_autoreconf yes`" automatically adds dependencies on autoconf, automake, and libtool for you. Also since this seems to be a benchmark tool I'd consider adding the "`benchmarks`" category.
I had to use `use_autoreconf`; something with the supplied `libtool` was really funky and I wanted to avoid calling `autogen.sh` manually. Allright, so these can be removed from the `depends_build` list?
Anyway, I'm going to try building it next...
Thanks! -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by larryv@…): Replying to [comment:2 alexander.janssen@…]:
Replying to [comment:1 egall@…]:
Just quickly running it through `port -v lint --nitpick`, it reports the following warnings: {{{ Warning: Line 38 seems to hardcode the version number, consider using ${version} instead }}}
I think is related to the paths to the includes and libs of the different mysql ports in the variants sections
No, it’s from the name of the patchfile. -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by larryv@…): Why are you using the patch to create files? Why aren’t they included in the distribution? -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by alexander.janssen@…): Replying to [comment:4 larryv@…]:
Why are you using the patch to create files? Why aren’t they included in the distribution?
I can't tell why they aren't there and I can't speak for the original author, Alexey Kopytov. However, `autoreconf` insists on those files so I created an almost empty NEWS-file and an AUTHORS-file naming Alexey. Using `autogen.sh` wouldn't complain about the missing files, but this is not an option since I'd have to call up `glibtoolize`, `aclocal`, `autoconf` and `automake` manually. -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:5> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by alexander.janssen@…): Replying to [comment:3 larryv@…]:
Replying to [comment:2 alexander.janssen@…]:
Replying to [comment:1 egall@…]:
Just quickly running it through `port -v lint --nitpick`, it reports the following warnings: {{{ Warning: Line 38 seems to hardcode the version number, consider using ${version} instead }}}
I think is related to the paths to the includes and libs of the different mysql ports in the variants sections
No, it’s from the name of the patchfile.
Ah, allright. Anyway, I still wonder if there's a macro or variable which I could use to derive a lib- and include-path to a certain port instead of hardcoding them. -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:6> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by egall@…): ok, after building, I have the following comments: - Since you're patching Makefile.am and configure.ac anyways, you might as well silence the glibtoolize warnings, i.e.: {{{ glibtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac }}} and {{{ glibtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. }}} - The +mysql4 and +mysql5 variants should probably conflict with one another - mysql4 is old and obsolete anyway (I couldn't get it to build on Lion), so you could also just leave out the +mysql4 variant - my [https://github.com/cooljeanius/macportsscripts/blob/v0.1.4/port- depcheck.sh port-depcheck.sh] script says that `sysbench` doesn't actually link against openssl or zlib; do those really need to be added as dependencies? Although then again I like to add lots of irrelevant dependencies when writing my own ports, so who am I to talk... Also re-looking over the portfile, all instances of the word "`sysbench`" can be replaced with the variable `${name}` -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by alexander.janssen@…): Replying to [comment:7 egall@…]:
ok, after building, I have the following comments:
Thanks for your review comments!
- Since you're patching Makefile.am and configure.ac anyways, you might as well silence the glibtoolize warnings while you're at it, i.e.: {{{ glibtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac }}} and {{{ glibtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. }}}
Actually, I tried the `AC_CONFIG_MACRO_DIR([m4])` part. It resulted in a situation that it expected a directory named "m4" - if it doesn't exists, it bails out. If I create the m4 directory, it still bails out for reasons I didn't fully understand yet. Probably because it's empty? I checked on the Internet and the general opinion was "this is autoconf-foo, just don't do it and you're fine." Adding `-I m4` to ACLOCAL_AMFLAGS in Makefile.am results in a situation that `libtool` is throwing a lot of error-messages. Log from manual configure: {{{ /bin/sh ../libtool --tag=CC --mode=link gcc -D_THREAD_SAFE -g -O2 -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/oltp/libsboltp.a tests/mutex/libsbmutex.a drivers/mysql/libsbmysql.a -L/opt/local/lib/mysql55/mysql -lmysqlclient_r -lz -lm ../libtool: line 835: X--tag=CC: command not found ../libtool: line 868: libtool: ignoring unknown tag : command not found ../libtool: line 835: X--mode=link: command not found ../libtool: line 1001: *** Warning: inferring the mode of operation is deprecated.: command not found ../libtool: line 1002: *** Future versions of Libtool will require --mode=MODE be specified.: command not found ../libtool: line 2228: X-D_THREAD_SAFE: command not found ../libtool: line 2228: X-g: command not found ../libtool: line 2228: X-O2: command not found ../libtool: line 1948: X-L/opt/local/lib/mysql55/mysql: No such file or directory ../libtool: line 2397: Xsysbench: command not found ../libtool: line 2402: X/Users/ajanssen/gnuradio/lib: No such file or directory ../libtool: line 2409: Xsysbench: command not found ../libtool: line 2417: mkdir /.libs: No such file or directory }}} I wasn't able to debug this one, but the Internet is full of people complaining about the same or similar errors - the only working solution I found is running the whole autogen.sh, aclocal, autoconf and automake yadda-yadda - something autoreconf is supposed to do (I guess). So I decided to ignore it completly because it just breaks things. I have the feeling that this is a GNU autotools compability issue. I'm not confident enough to fully debug this.
- The +mysql4 and +mysql5 variants should probably conflict with one another
People might have valid reasons to have several different versions of their client-libs installed. mysql4 and mysql5 can live happily together without getting in the way of each other. Or what do you mean? That those two variants can't be installed side-by-side...? (I assumed that)
- mysql4 is old and obsolete anyway (I couldn't get it to build on Lion), so you could also just leave out the +mysql4 variant instead
I only included it for completeness. I think it just should be fixed in the mysql4 port, but I don't see a point to fix the client libs just to make sysbench work. What do you suggest? Should I remove it and include it later when the mysql4 port builds again? (should check if there's already a ticket opened for mysql4 not building)
- my [https://github.com/cooljeanius/macportsscripts/blob/v0.1.4/port- depcheck.sh port-depcheck.sh] script says that `sysbench` doesn't actually link against openssl or zlib; do those really need to be added as dependencies? Although then again I like to add lots of irrelevant dependencies when writing my own ports, so who am I to talk...
This is actually kinda odd, I noticed it myseld. The mysql5 port links itself against openssl by default, mysql55 doesn't. Mysql55 has the `+openssl` variant. So I think I'll include the openssl dependency for mysql5 only.
Also re-looking over the portfile, all instances of the word "`sysbench`" can be replaced with the variable `${name}`
Allright. So, I'll try to fix the things I can solve right now; you want me to submit a new portfile and delete the old attachment? -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by egall@…): Replying to [comment:8 alexander.janssen@…]:
mysql4 and mysql5 can live happily together without getting in the way of each other.
No they can't; not in MacPorts at least. The MacPorts ports for mysql4 and mysql5 already conflict with one another. mysql4 has this in its portfile: {{{ conflicts mysql5 mysql5-devel }}} And mysql5 has this in its portfile: {{{ conflicts mysql5-devel mysql4 }}} So the variants here should probably follow suit with these conflicts.
So, I'll try to fix the things I can solve right now; you want me to
submit a new portfile and delete the old attachment? Yeah, submit a new portfile; it's up to you whether you want to replace the old one or not. -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:9> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by alexander.janssen@…): Replying to [comment:9 egall@…]:
Replying to [comment:8 alexander.janssen@…]:
mysql4 and mysql5 can live happily together without getting in the way of each other.
No they can't; not in MacPorts at least. The MacPorts ports for mysql4 and mysql5 already conflict with one another. mysql4 has this in its portfile: {{{ conflicts mysql5 mysql5-devel }}} And mysql5 has this in its portfile: {{{ conflicts mysql5-devel mysql4 }}} So the variants here should probably follow suit with these conflicts.
Hu, I thought these conflicts would be automatically handled. OK, I'll include those.
So, I'll try to fix the things I can solve right now; you want me to submit a new portfile and delete the old attachment?
Yeah, submit a new portfile; it's up to you whether you want to replace the old one or not.
Gimme a day, I'll correct these. Coming back to the `AC_CONFIG_MACRO_DIR([m4])` and `ACLOCAL_AMFLAGS` issues; I don't think I can resolve the issues. Do you really need these issues to be resolved? -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:10> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by larryv@…): Replying to [comment:10 alexander.janssen@…]:
Hu, I thought these conflicts would be automatically handled. OK, I'll include those.
If you don’t mark the variants as conflicting, users will be able to select them both. Of course, the installation would proceed to fail because `mysql4` and `mysql5` conflict, but you should nip the conflict in the bud.
Coming back to the `AC_CONFIG_MACRO_DIR([m4])` and `ACLOCAL_AMFLAGS` issues; I don't think I can resolve the issues. Do you really need these issues to be resolved?
If they’re just warnings, don’t bother. -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:11> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by larryv@…): Replying to [comment:8 alexander.janssen@…]:
Replying to [comment:7 egall@…]:
mysql4 is old and obsolete anyway (I couldn't get it to build on Lion), so you could also just leave out the +mysql4 variant instead
I only included it for completeness. I think it just should be fixed in the mysql4 port, but I don't see a point to fix the client libs just to make sysbench work. What do you suggest? Should I remove it and include it later when the mysql4 port builds again? (should check if there's already a ticket opened for mysql4 not building)
Despite what I said before about conflicting variants, both `mysql4` and `mysql5` are obsolete; do not create variants for either of them. If it’s plausible that users might want to build SysBench without MySQL support, add a `mysql55` variant and declare a dependency on the `mysql55` port. You can set it as a default variant if you want (`default_variants +mysql55`). If you want to support MySQL 5.1 too, add a `mysql51` variant.
The mysql5 port links itself against openssl by default, mysql55 doesn't. Mysql55 has the `+openssl` variant. So I think I'll include the openssl dependency for mysql5 only.
Do not declare dependencies on ports that are not actually used by SysBench. Dependencies of dependencies are handled automatically. -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:12> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Changes (by ryandesign@…): * cc: ryandesign@… (added) Comment: Do create a variant for mysql5 and make it the default variant; it is still the default mysql in MacPorts at this time. Do also offer variants for the newer mysql ports: mysql51, mysql55, mariadb, percona. Do not offer a variant for mysql4; it is obsolete in the extreme and we should be working on removing it from MacPorts, not integrating it further. Remove "Builds by default against MySQL 5.5." from the description. Users can determine by looking at the output of "port variants" what the default variants are. The initial revision of any given version of a port should be 0 not 1. Yes, remove the autoconf, automake and libtool dependencies from depends_build since MacPorts adds them for you automatically when you use `use_autoreconf yes`. Rather than creating AUTHORS and NEWS files with unofficial content, I'd just create empty files. The Tcl `touch` command can do that. Why is Makefile.am being patched to insert a blank line? What does that accomplish? I would remove comments like "Modified for Macports" from the patch; they add no value. If sysbench itself does not use openssl or zlib (and they're only used by the mysql libraries) then don't add these dependencies; let the mysql ports do that when needed. -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:13> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by ryandesign@…): sourceforge master_sites need to be written to avoid redirects; see wiki:howto/AvoidRedirects -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:14> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by alexander.janssen@…): OK, I cleaned up the portfile and the patch; hope I sorted out all necessary things. Changes: * Removed variant mysql4 * Added variants percona and mariadb * Decided to build sysbench without database support by default (it brings a lot of other benchmarking tools besides database benches) * Made all variants mutally exclusive * Changed `master_sites` so that redirects don't need to be followed * Creating empty m4 directory as well as empty NEWS and AUTHORS files with TCL-macros instead of patching them * Removed unnecessary dependencies on zlib and openssl * Moved sysbench to the benchmarks category Plan: * Add Postgres support later (doesn't compile for some unfortunate i386/x86_64 foobar, needs more debugging) Unfortunately I don't seem to be able to delete or overwrite the old patch; I renamed the patch to `patch-sysbench-0.4.12.diff`. However, the Portfile will be overwritten. -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:15> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by alexander.janssen@…): Do i need to change anything so that my submission will be accepted? Are there still open issues? I won't be able to make up a target for Postgres at the moment anyway, I might be doing that later. -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:16> MacPorts <http://www.macports.org/> Ports system for OS X
#38379: New port "databases/sysbench" ----------------------------------+-------------------------------- Reporter: alexander.janssen@… | Owner: macports-tickets@… Type: submission | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: haspatch Port: sysbench | ----------------------------------+-------------------------------- Comment (by pixilla@…): Replying to [comment:16 alexander.janssen@…]:
Do i need to change anything so that my submission will be accepted? Are there still open issues?
Replace percona with mariadb in the mariadb variant block of the Portfile. -- Ticket URL: <https://trac.macports.org/ticket/38379#comment:17> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts