Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can this package be recompiled

Hello I asked this question to superuser but I did not get a good question there and i really need the answer. I know some of you here can answer this question.

I have installed nginx via yum. Now I want to add a module, but I have to compile the source again and include the the new module.

But i can't find the source. Does someone know what I have to do to recompile the source and get the module in.

Update

I did everything in the answer from Patrick and it worked out great. However when now when I run the yum update it wants to update the installed rpm with the same version.

Can I just let it update, or should i specify that it is already up to date.

like image 772
Saif Bechan Avatar asked Apr 02 '10 19:04

Saif Bechan


People also ask

How do I recompile a package?

To recompile the body of the emp_mgmt package in the schema hr , issue the following statement: ALTER PACKAGE hr. emp_mgmt COMPILE BODY; If Oracle Database encounters no compilation errors while recompiling the package body, then the body becomes valid.

Can you alter procedure with in package?

Because all objects in a package are stored as a unit, the ALTER PACKAGE statement recompiles all package objects. You cannot use the ALTER PROCEDURE statement or ALTER FUNCTION statement to recompile individually a procedure or function that is part of a package.

How can I tell who modified an Oracle package?

Hi, Here's one way: SELECT owner , object_name , last_ddl_time FROM all_objects -- or dba_objects, if you have privileges WHERE object_type IN ('PROCEDURE') ORDER BY last_ddl_time ; You can't modify procedures; all you can do is CREATE or REPLACE them.

How do I compile a toad package?

In case we are using toad, we can select our package spec or body and then use F9 key to compile either package spec or package body. Show activity on this post. In toad, if the package does not exist yet, you've got 2 options: F5 and F9, both from the SQL window where the package's code is.


1 Answers

Redhat and related distributions (fedora, centos) keep their source rpms in a highly regular directory tree. for RHEL5 you want: ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/ for other releases, you can browse the ftp server until you find what you want. Otherwise, google for the exact version of nginx you have (rpm -q nginx)

Assuming you can find the srpm, install it with rpm:

rpm -ivh nginx-xxxx.src.rpm

This'll put the sources and build files in /usr/src/redhat/{BUILD,SPEC,SRC,SOURCES}. You can modify the .spec file in /usr/src/redhat/SPEC to build the module you want along with the rest of nginx, or you can build nginx manually.

Which module do you want to build? In fedora's nginx.spec, several modules are specified when configure is run. This may be as simple as adding a line here:

./configure \
[snip...]
--with-http_realip_module \
--with-http_addition_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--with-http_perl_module \
[snip...]

After adding whatever changes to nginx.spec, you can build the final rpm with rpmbuild:

rpmbuild -ba nginx.spec

Assuming the package builds without error, rpmbuild will leave it in /usr/src/redhat/RPMS/

Update: yum will want to replace your nginx package as updates become available. You will probably want to rebuild each new package as it becomes available, using the same process as above. However, If security is not a concern, you can simple exclude nginx from the update list by adding the following to your yum config (probably /etc/yum.repos.d/${repo}.repo or similar. Be sure to associate it with the right repo):

exclude=nginx*

Or running yum with the --exclude option

yum --exclude=nginx*
like image 149
Patrick McMurchie Avatar answered Sep 19 '22 17:09

Patrick McMurchie