vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have some new 64bit Intel systems (running CentOS 4.x) which require optimized Mysql (in 64bit mode). The storage will be on an EMC I've done some research and it seems: - Use pgcc (not sure that applies to true 64bit platforms) - Add -fomit-frame-pointer (and possibly -ffixed-ebp) - The mysql.com 64bit RPMs are dynamically linked .... I'm a little new to RPMs - coming from a FreeBSD environment. It should be possible to unrpm (disassemble) the source RPMf, make some edits (to the *.spec file, for example) and reassemble via a compile process. I purchased the Admin Guide which has some pointers. I'd appreciate input from those who have performed this task. Thanks. |
| |||
| On 2006-07-13, forrie@gmail.com <forrie@gmail.com> wrote: > I'm a little new to RPMs - coming from a FreeBSD environment. It > should be possible to unrpm (disassemble) the source RPMf, make some > edits (to the *.spec file, for example) and reassemble via a compile > process. Well, there's no real disassembling to be done, when you install the source rpm, that's all you need (excluding dependancies, of course). Edit around what you want, make them patches with diff if you want, and then use rpmbuild to roll your own customized packages and install them. -- Riemer Palstra Amsterdam, The Netherlands riemer@palstra.com http://www.palstra.com/ |
| |||
| Riemer Palstra wrote: > On 2006-07-13, forrie@gmail.com <forrie@gmail.com> wrote: > > I'm a little new to RPMs - coming from a FreeBSD environment. It > > should be possible to unrpm (disassemble) the source RPMf, make some > > edits (to the *.spec file, for example) and reassemble via a compile > > process. > > Well, there's no real disassembling to be done, when you install the > source rpm, that's all you need (excluding dependancies, of course). > Edit around what you want, make them patches with diff if you want, and > then use rpmbuild to roll your own customized packages and install them. > > -- > Riemer Palstra Amsterdam, The Netherlands > riemer@palstra.com http://www.palstra.com/ I was able to rpm2cpio the source RPM to get the *.spec and *.gz files. Now, how to reassemble them. ;-) But it appears that I can use "rpmbuild" and pass command-line args to it (compiler flags) to take care of what I need. I cannot find rpmbuild anywhere - it's not in the distributions we have (CentOS 4). I also couldn't find any files in the *.gz archive that supplemented variables in the *.spec file. For example, the CFLAGS (and other) environment variables - they include this in the *.spec file, but it doesn't appear to be defined other than whatever the default happens to be in ./configure. Thanks! |
| |||
| On 2006-07-13, forrie@gmail.com <forrie@gmail.com> wrote: > I was able to rpm2cpio the source RPM to get the *.spec and *.gz > files. Why? Just install it, it will put the files nicely in /usr/src/redhat/ > I cannot find rpmbuild anywhere - it's not in the distributions we > have (CentOS 4). It's there. Install package rpm-build. > I also couldn't find any files in the *.gz archive that supplemented > variables in the *.spec file. For example, the CFLAGS (and other) > environment variables - they include this in the *.spec file, but it > doesn't appear to be defined other than whatever the default happens to > be in ./configure. Well, directly beneath the CFLAGS/CXXFLAGS definitions I have this in my ..spec file: %configure \ --with-readline \ --with-vio \ --with-openssl \ --without-debug \ --enable-shared \ --with-bench \ --localstatedir=/var/lib/mysql \ --with-unix-socket-path=/var/lib/mysql/mysql.sock \ --with-mysqld-user="mysql" \ --with-extra-charsets=all \ --with-innodb \ --with-isam \ --with-berkeley-db \ --enable-local-infile \ --enable-large-files=yes --enable-largefile=yes \ --enable-thread-safe-client \ --disable-dependency-tracking \ --with-named-thread-libs="-lpthread" -- Riemer Palstra Amsterdam, The Netherlands riemer@palstra.com http://www.palstra.com/ |
| |||
| Riemer Palstra wrote: > On 2006-07-13, forrie@gmail.com <forrie@gmail.com> wrote: > > I was able to rpm2cpio the source RPM to get the *.spec and *.gz > > files. > > Why? Just install it, it will put the files nicely in /usr/src/redhat/ > > > I cannot find rpmbuild anywhere - it's not in the distributions we > > have (CentOS 4). > > It's there. Install package rpm-build. > > > I also couldn't find any files in the *.gz archive that supplemented > > variables in the *.spec file. For example, the CFLAGS (and other) > > environment variables - they include this in the *.spec file, but it > > doesn't appear to be defined other than whatever the default happens to > > be in ./configure. > > Well, directly beneath the CFLAGS/CXXFLAGS definitions I have this in my > .spec file: > > %configure \ > --with-readline \ > --with-vio \ > --with-openssl \ > --without-debug \ > --enable-shared \ > --with-bench \ > --localstatedir=/var/lib/mysql \ > --with-unix-socket-path=/var/lib/mysql/mysql.sock \ > --with-mysqld-user="mysql" \ > --with-extra-charsets=all \ > --with-innodb \ > --with-isam \ > --with-berkeley-db \ > --enable-local-infile \ > --enable-large-files=yes --enable-largefile=yes \ > --enable-thread-safe-client \ > --disable-dependency-tracking \ > --with-named-thread-libs="-lpthread" This is what I have for the latest src RPM's spec file: MySQL-standard-5.0.22-0.rhel4.src.rpm BuildMySQL() { # The --enable-assembler simply does nothing on systems that does not # support assembler speedups. sh -c "CFLAGS=\"${CFLAGS:-$RPM_OPT_FLAGS}\" \ CXXFLAGS=\"${CXXFLAGS:-$RPM_OPT_FLAGS}\" \ LDFLAGS=\"$LDFLAGS\" \ ./configure \ $* \ --enable-assembler \ --enable-local-infile \ --with-mysqld-user=%{mysqld_user} \ --with-unix-socket-path=/var/lib/mysql/mysql.sock \ --with-pic \ --prefix=/ \ --with-extra-charsets=complex \ %if %{YASSL_BUILD} --with-yassl \ %endif --exec-prefix=%{_exec_prefix} \ --libexecdir=%{_sbindir} \ --libdir=%{_libdir} \ --sysconfdir=%{_sysconfdir} \ --datadir=%{_datadir} \ --localstatedir=%{mysqldatadir} \ --infodir=%{_infodir} \ --includedir=%{_includedir} \ --mandir=%{_mandir} \ --enable-thread-safe-client \ --with-comment=\"%{comment}\" \ %if %{commercial} %else --with-readline \ %endif ; make" } |
| ||||
| forrie@gmail.com wrote: > Riemer Palstra wrote: > > On 2006-07-13, forrie@gmail.com <forrie@gmail.com> wrote: > > > I was able to rpm2cpio the source RPM to get the *.spec and *.gz > > > files. > > > > Why? Just install it, it will put the files nicely in /usr/src/redhat/ > > > > > I cannot find rpmbuild anywhere - it's not in the distributions we > > > have (CentOS 4). > > > > It's there. Install package rpm-build. > > > > > I also couldn't find any files in the *.gz archive that supplemented > > > variables in the *.spec file. For example, the CFLAGS (and other) > > > environment variables - they include this in the *.spec file, but it > > > doesn't appear to be defined other than whatever the default happens to > > > be in ./configure. > > > > Well, directly beneath the CFLAGS/CXXFLAGS definitions I have this in my > > .spec file: > > > > %configure \ > > --with-readline \ > > --with-vio \ > > --with-openssl \ > > --without-debug \ > > --enable-shared \ > > --with-bench \ > > --localstatedir=/var/lib/mysql \ > > --with-unix-socket-path=/var/lib/mysql/mysql.sock \ > > --with-mysqld-user="mysql" \ > > --with-extra-charsets=all \ > > --with-innodb \ > > --with-isam \ > > --with-berkeley-db \ > > --enable-local-infile \ > > --enable-large-files=yes --enable-largefile=yes \ > > --enable-thread-safe-client \ > > --disable-dependency-tracking \ > > --with-named-thread-libs="-lpthread" > > > This is what I have for the latest src RPM's spec file: > > MySQL-standard-5.0.22-0.rhel4.src.rpm > > > BuildMySQL() { > # The --enable-assembler simply does nothing on systems that does not > # support assembler speedups. > sh -c "CFLAGS=\"${CFLAGS:-$RPM_OPT_FLAGS}\" \ > CXXFLAGS=\"${CXXFLAGS:-$RPM_OPT_FLAGS}\" \ > LDFLAGS=\"$LDFLAGS\" \ > ./configure \ > $* \ > --enable-assembler \ > --enable-local-infile \ > --with-mysqld-user=%{mysqld_user} \ > --with-unix-socket-path=/var/lib/mysql/mysql.sock \ > --with-pic \ > --prefix=/ \ > --with-extra-charsets=complex \ > %if %{YASSL_BUILD} > --with-yassl \ > %endif > --exec-prefix=%{_exec_prefix} \ > --libexecdir=%{_sbindir} \ > --libdir=%{_libdir} \ > --sysconfdir=%{_sysconfdir} \ > --datadir=%{_datadir} \ > --localstatedir=%{mysqldatadir} \ > --infodir=%{_infodir} \ > --includedir=%{_includedir} \ > --mandir=%{_mandir} \ > --enable-thread-safe-client \ > --with-comment=\"%{comment}\" \ > %if %{commercial} > %else > --with-readline \ > %endif > ; make" > } The version of RPMBUILD I have on this system is: RPM version 4.3.3 and it doesn't appear that I can override flags on the command-line, such as CFLAGS, et al. I found reference online to an document that suggests I could, using --define, but the usage is incorrect for this version. Here is the link: http://www.dev411.com/wiki/Installin...n_AMD64_x86_64 I could extract the *.spec file, but it doesn't appear I can specify an alternate spec file on the command-line, only remove. Unless I'm misunderstanding the manpage. _F |