Skip to contentSkip to conversation

Newbie Question

DISCUSSION Anne.Bourgeois 3 participants 9 messages Aug 12, 2004 Kernel automounter

lore
Share & tools
lore
#0 lore raw

I am pretty new to the list, and I have a very basic question.

How do I install the kernel patch so that I can install the autofs rpm? When I tried to just install the new autofs rpm, I got a dependency error:

       liblber-2.2.so.7 is needed by autofs-4.1.3-13
       libldap-2.2.so.7 is needed by autofs-4.1.3-13

I already have autofs-4.1.3-9 installed and didn't see any dependency errors when I installed that.

Is there information somewhere that I can go find about installing the kernel patch?

Thank you for any help.
Annie

#1 lore raw

==> Regarding [autofs] Newbie Question; "Anne.Bourgeois" <[email protected]> adds:

anne> I am pretty new to the list, and I have a very basic question. How anne> do I install the kernel patch so that I can install the autofs rpm?

What distribution are you running? Do you want to patch a kernel from that distribution (recommended), or run a vanilla kernel from kernel.org?

anne> When I tried to just install the new autofs rpm, I got a dependency anne> error:

anne> liblber-2.2.so.7 is needed by autofs-4.1.3-13
anne> libldap-2.2.so.7 is needed by autofs-4.1.3-13

If you're running Fedora, I'd suggest upgrading your current system with yum.

anne> I already have autofs-4.1.3-9 installed and didn't see any dependency anne> errors when I installed that.

Well, there should be no added dependency requirements. You _could_ try doing an rpm -i --force of the autofs package.

anne> Is there information somewhere that I can go find about installing anne> the kernel patch?

Certainly, but let's figure out which kernel you want to build, first.

-Jeff

#2 lore raw

Jeff,

My apologies. I should have included more info in my original post. Please see my answers below...

Quoted 10 lines · Jeff Moyer

==> Regarding [autofs] Newbie Question; "Anne.Bourgeois" <[email protected]> adds:

anne> I am pretty new to the list, and I have a very basic question. How anne> do I install the kernel patch so that I can install the autofs rpm?

What distribution are you running? Do you want to patch a kernel from that distribution (recommended), or run a vanilla kernel from kernel.org?

We are currently running RedHat 8.0 with the 2.4.20.20-8smp kernel. We are looking to go to Enterprise 3 in the near future, but are dependent on some software vendors, so we are holding back at the moment. We are seeing several autofs issues, which is the reason that I am trying these updates.

Quoted 11 lines

anne> When I tried to just install the new autofs rpm, I got a dependency anne> error:

anne> liblber-2.2.so.7 is needed by autofs-4.1.3-13
anne> libldap-2.2.so.7 is needed by autofs-4.1.3-13

If you're running Fedora, I'd suggest upgrading your current system with yum.

I'd prefer not to change the basic system that I'm running, as I have several users on the current system. Running on a large network, we see the automount map caching as a big problem right now. I am hoping to find a way to fix it without too much upgrading, re-kicking of machines, etc.

Quoted 7 lines

anne> I already have autofs-4.1.3-9 installed and didn't see any dependency anne> errors when I installed that.

Well, there should be no added dependency requirements. You _could_ try doing an rpm -i --force of the autofs package.

# rpm -ivh autofs-4.1.3-13.i386.rpm
error: Failed dependencies:
       liblber-2.2.so.7 is needed by autofs-4.1.3-13
       libldap-2.2.so.7 is needed by autofs-4.1.3-13
# rpm -ivh autofs-4.1.3-13.i386.rpm --force
error: Failed dependencies:
       liblber-2.2.so.7 is needed by autofs-4.1.3-13
       libldap-2.2.so.7 is needed by autofs-4.1.3-13
# rpm -ivh autofs-4.1.3-13.i386.rpm --nodeps --force
Preparing...                ########################################### [100%]
  1:autofs                 ########################################### 
[100%]

Finally worked when I used the "--nodeps" flag. Is this OK, though?

Quoted 10 lines

anne> Is there information somewhere that I can go find about installing anne> the kernel patch?

Certainly, but let's figure out which kernel you want to build, first.

-Jeff

#3 lore raw

==> Regarding Re: [autofs] Newbie Question; "Anne.Bourgeois" <[email protected]> adds:

anne.bourgeois> Jeff, My apologies. I should have included more info in my anne.bourgeois> original post. Please see my answers below...

Quoted 3 lines · anne.bourgeois> Jeff Moyer wrote:
Quoted 3 lines

==> Regarding [autofs] Newbie Question; "Anne.Bourgeois" <[email protected]> adds:

anne> I am pretty new to the list, and I have a very basic question. How anne> do I install the kernel patch so that I can install the autofs rpm?

Quoted 3 lines
Quoted 3 lines

What distribution are you running? Do you want to patch a kernel from that distribution (recommended), or run a vanilla kernel from kernel.org?

anne> We are currently running RedHat 8.0 with the 2.4.20.20-8smp anne> kernel. We are looking to go to Enterprise 3 in the near anne> future, but are dependent on some software vendors, so we anne> are holding back at the moment. We are seeing several anne> autofs issues, which is the reason that I am trying these anne> updates.

Okay, get the source rpm for your kernel and install it. Note that this is not the kernel-source-x.y.z rpm, but rather the kernel-x.y.z.src.rpm. It will install to /usr/src/redhat/ by default.

Now, here's the tricky part. I'm not sure if any of Ian's patch sets will apply cleanly to your Red Hat 8 kernel. :( You can try the patch against rh9, which can be found here:

     http://www.kernel.org/pub/linux/daemons/autofs/v4/autofs4-2.4.20-redhat9-20040508.patch

In addition to this patch, you will want to install Ian's mount expiry patch for 2.4, which I've attached to this mail.

Okay, so the way you apply these patches is to put the actual patch files into /usr/src/redhat/SOURCES. Then, you want to update the /usr/src/redhat/SPECS/kernel-2.4.spec file (I *think* that's what it's called) to actually include/apply these patches. There are two lines you need to add for each patch. They will look something like this (follow the convention in the spec file)

Patch5900: autofs4-2.4.20-redhat9-20040508.patch

and later in the spec file:

%patch5900 -p1

To be nice, you should bump the release number in the spec file (found near the top), and add a changelog entry (search for %changelog). Once you've done all of this, you are ready to build. Use the following command to build the binary rpm:

rpmbuild -bb /usr/src/redhat/SPECS/kernel-2.4.spec

If that errors, then the patches probably didn't apply cleanly. You can either take it upon yourself to fix up the broken hunks, or you can do the following, more laborious process.

You can download a vanilla kernel from kernel.org that Ian has made a patch for, and then apply the relevant patches to _that_ kernel. Once you've done that you can take the result, and generate a patch for your specific kernel.

Here are the specific steps to follow to accomplish this.

Comment out the %patch lines you added to the spec file, and then issue an 'rpmbuild -bp /usr/src/redhat/SPECS/kernel-2.4.spec'. That should execute the "prep" stage, rebuilding your tree w/o the patches.

unpack your linux sources into /usr/src/redhat/BUILD/kernel-x.y.z. You will already see a directory there named for the Red Hat kernel version. So, something like:

cd /usr/src/redhat/BUILD/kernel*
tar xjf /tmp/linux-2.4.22.tar.bz2

Apply the patches to this kernel:

cd linux-2.4.22
patch -sp1 < /tmp/autofs4-2.4.22-20040508.patch
patch -sp1 < /tmp/autofs4-lookup.patch (assuming this is what you've named
the attachment from this email)

Now, generate a diff:

cd ..
diff -urN linux-<redhatver> linux-2.4.22 > linux-autofs4.patch

Put the resulting patch into /usr/src/redhat/SOURCES, make sure you add PatchXXXX and %patchXXXX -p 1 lines to the spec file which correspond to this new patch, and go ahead and try the build again.

Phew! Hopefully I haven't confused you.

anne> When I tried to just install the new autofs rpm, I got a dependency anne> error:

Quoted 1 line
Quoted 1 line

anne> liblber-2.2.so.7 is needed by autofs-4.1.3-13 libldap-2.2.so.7 is anne> needed by autofs-4.1.3-13

Quoted 2 lines
Quoted 2 lines

If you're running Fedora, I'd suggest upgrading your current system with yum.

anne> I'd prefer not to change the basic system that I'm running, anne> as I have several users on the current system. Running on anne> a large network, we see the automount map caching as a big anne> problem right now. I am hoping to find a way to fix it anne> without too much upgrading, re-kicking of machines, etc.

Okay, that makes perfect sense.

anne> I already have autofs-4.1.3-9 installed and didn't see any dependency anne> errors when I installed that.

Quoted 2 lines
Quoted 2 lines

Well, there should be no added dependency requirements. You _could_ try doing an rpm -i --force of the autofs package.

[snip]
anne> Finally worked when I used the "--nodeps" flag. Is this anne> OK, though?

Well, it's probably okay. It's definitely okay if you're not using ldap. ;)

Hope this helps!

-Jeff

--- linux-2.4.20/fs/autofs4/root.c.dir_ops 2004-07-14 21:14:02.000000000 +0800
+++ linux-2.4.20/fs/autofs4/root.c 2004-07-14 21:15:58.000000000 +0800
@@ -33,7 +33,7 @@
static int autofs4_dir_close(struct inode *inode, struct file *file); static int autofs4_dir_readdir(struct file * filp, void * dirent, filldir_t filldir); static int autofs4_root_readdir(struct file * filp, void * dirent, filldir_t filldir);
-static struct dentry *autofs4_root_lookup(struct inode *,struct dentry *); +static struct dentry *autofs4_lookup(struct inode *,struct dentry *);
static int autofs4_dcache_readdir(struct file *, void *, filldir_t);

struct file_operations autofs4_root_operations = {
@@ -50,7 +50,7 @@
};

struct inode_operations autofs4_root_inode_operations = {
- lookup: autofs4_root_lookup,
+ lookup: autofs4_lookup,
unlink: autofs4_dir_unlink,
symlink: autofs4_dir_symlink,
mkdir: autofs4_dir_mkdir,
@@ -58,7 +58,7 @@
};

struct inode_operations autofs4_dir_inode_operations = {
- lookup: autofs4_dir_lookup,
+ lookup: autofs4_lookup,
unlink: autofs4_dir_unlink,
symlink: autofs4_dir_symlink,
mkdir: autofs4_dir_mkdir,
@@ -434,23 +434,8 @@
d_release: autofs4_dentry_release,
};

-/* Lookups in non-root dirs never find anything - if it's there, it's
- already in the dcache */
-static struct dentry *autofs4_dir_lookup(struct inode *dir, struct dentry *dentry) -{
-#if 0
- DPRINTK(("autofs4_dir_lookup: ignoring lookup of %.*s/%.*s\n",
- dentry->d_parent->d_name.len, dentry->d_parent->d_name.name,
- dentry->d_name.len, dentry->d_name.name));
-#endif
-
- dentry->d_fsdata = NULL;
- d_add(dentry, NULL);
- return NULL;
-}
-
/* Lookups in the root directory */
-static struct dentry *autofs4_root_lookup(struct inode *dir, struct dentry *dentry) +static struct dentry *autofs4_lookup(struct inode *dir, struct dentry *dentry)
{
struct autofs_sb_info *sbi;
int oz_mode;

#4 lore raw
Quoted 11 lines

[snip]

Well, it's probably okay. It's definitely okay if you're not using ldap. ;)

Hope this helps!

-Jeff

OK, I'm not using LDAP. I will just go with install with the --nodeps flag & try it that way. If I have problems, I'll try installing the kernel patches.

Thank you for your help.
Annie

#5 lore raw

==> Regarding Re: [autofs] Newbie Question; "Anne.Bourgeois" <[email protected]> adds:

Quoted 10 lines
Quoted 10 lines

[snip]

Well, it's probably okay. It's definitely okay if you're not using ldap. ;)

Hope this helps!

-Jeff

anne> OK, I'm not using LDAP. I will just go with install with the anne> --nodeps flag & try it that way. If I have problems, I'll try anne> installing the kernel patches.

I thought you needed the map expiry changes? If so, you need to install at least the patch attached to my last email. There are also known issues with the autofs4 module that ships with the RH 8 kernel that are fixed with Ian's patch sets. If you run into further problems, we will likely ask you to update your kernel before we help out.

-Jeff

maintainer
#8 lore raw
In reply to Jeff Moyer
Quoted 10 lines · Jeff Moyer

Okay, get the source rpm for your kernel and install it. Note that this is not the kernel-source-x.y.z rpm, but rather the kernel-x.y.z.src.rpm. It will install to /usr/src/redhat/ by default.

Now, here's the tricky part. I'm not sure if any of Ian's patch sets will apply cleanly to your Red Hat 8 kernel. :( You can try the patch against rh9, which can be found here:

     http://www.kernel.org/pub/linux/daemons/autofs/v4/autofs4-2.4.20-redhat9-20040508.patch

This should apply over RH kernel source.

So, no need to re-build the rpms, just install the kernel-source rpm, apply the above patch and build a custom kernel as normal.

Let me know if the patch does not apply.

Quoted 3 lines

In addition to this patch, you will want to install Ian's mount expiry patch for 2.4, which I've attached to this mail.

Will be needed if you use Jeffs testing rpms. This work is in progress so don't expect much. It should be largely finished soon.

Ian

maintainer
#7 lore raw
In reply to Anne.Bourgeois
Quoted 7 lines · Anne.Bourgeois
Quoted 7 lines

[snip]

Well, it's probably okay. It's definitely okay if you're not using ldap. ;)

Quoted 7 lines
Quoted 4 lines

Hope this helps!

-Jeff

OK, I'm not using LDAP. I will just go with install with the --nodeps flag & try it that way. If I have problems, I'll try installing the kernel patches.

This is a bit of a worry to me as this problem has been solved before.

However, if your're not using LDAP installing with the --nodeps shouldn't cause any problems.

Ian

maintainer
#6 lore raw
In reply to Jeff Moyer
Quoted 16 lines · Jeff Moyer

==> Regarding Re: [autofs] Newbie Question; "Anne.Bourgeois" <[email protected]> adds:

Quoted 10 lines
Quoted 10 lines

[snip]

Well, it's probably okay. It's definitely okay if you're not using ldap. ;)

Hope this helps!

-Jeff

anne> OK, I'm not using LDAP. I will just go with install with the anne> --nodeps flag & try it that way. If I have problems, I'll try anne> installing the kernel patches.

Quoted 5 lines

I thought you needed the map expiry changes? If so, you need to install at least the patch attached to my last email. There are also known issues with the autofs4 module that ships with the RH 8 kernel that are fixed with Ian's patch sets. If you run into further problems, we will likely ask you to update your kernel before we help out.

Yes. Some more info. on the problems you are having would be appreciated please.

Ian