OpenWrt Forum Archive

Topic: How do I patch configure.in?

The content of this topic has been archived on 29 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I'm trying to build samba-3.0.26b, and I've got all the bugs / features figured out.  Samba is building, except for one annyoing problem:

the configure script is buggy and configure.in needs to be patched.  I have the patch, I've put it into samba/patches, but the automagic patcher isn't picking up on itn.

How do I get configure.in patched?  Is there something I need to do like delete the source dir? 

Thanks,

--Yan

Maybe there is a conflict with the Samba 2 package in OpenWrt which is already in packages/net/samba. With 'make package/samba3-{clean,prepare} V=3' you can check if your patches gets applied.

So you may try to rename your Samba 3 package to packages/net/samba3. The patches are in the right location at packages/net/samba3/patches.

If you can send me a tarball from packages/net/samba3 I can take a look.

(Last edited by forum2006 on 10 Oct 2007, 22:51)

I've posted a tarball at: http://seiner.com/samba3.tar.bz2  It should untar into package/

BIG FAT WARNING:  It will untar into samba, NOT samba3.  So if you untar it in pacakge it will clobber your existing samba2 install.  It's also very much an unclean hack, but it seems to produce working daemons and there's a lot of cruft in the tarball that I haven't cleaned out (like all the .svn from the samba package).

Printing via CUPS is disabled, and so are kernel oplocks.  Other than that it should work.

Really big packages:

http://www.seiner.com/samba-common_3.0.26a-4_mipsel.ipk
http://www.seiner.com/samba-client_3.0.26a-4_mipsel.ipk

(Yes, it's an alpha product ATM)

--Yan

(Last edited by cptdondo on 11 Oct 2007, 00:23)

So. here is a patch which ports and packages Samba 3.0.26a for OpenWrt. Compiles fine on Kamikaze 7.09.

Download the patch here: add-samba3.diff

Please built, test and report...

ubuntu@ubuntu-laptop:~/openwrt/kamikaze_7.09_test/bin/packages$ ll -h samba3-*
-rw-r--r-- 1 ubuntu ubuntu 459K 2007-10-11 17:19 samba3-client_3.0.26a-1_mipsel.ipk
-rw-r--r-- 1 ubuntu ubuntu 1,9M 2007-10-11 17:19 samba3-common_3.0.26a-1_mipsel.ipk
-rw-r--r-- 1 ubuntu ubuntu 1,5M 2007-10-11 17:19 samba3-server_3.0.26a-1_mipsel.ipk
ubuntu@ubuntu-laptop:~/openwrt/kamikaze_7.09_test/bin/packages$

(Last edited by forum2006 on 11 Oct 2007, 16:33)

Cool!  Thanks!

I'll test as soon as I have available hardware....

--Yan

OOPS!  Looks like something isn't getting set.... 

checking for prctl... yes
configure: error: cannot run test program while cross compiling
See `config.log' for more details.
make[3]: *** [/home/yan/openwrt/OpenWrt-SDK-brcm-2.4-for-Linux-x86_64/build_mipsel/samba-3.0.26a/.built] Error 1

I'll try to debug tomorrow if you don't get to it. I thought I had that fixed in my hack, but I'll have to look at it.  (gotta run and do some family time.  It's red wine and spagetti time where I'm at. :-) )

--Yan

OK, I think it's better.

I split it up into 4 packages as neither the libs nor smbpasswd are necessary for the client, and they are huge.

So now there's samba3-common (tiny, just smb.conf), samba3-client (smbclient and nmblookup), samba3-server, and samba3-libs.

One issue remains:  the default config file seems to be hard-wired to $(BUILD_DIR)/etc/samba/smb.conf, rather than just plain /etc/samba...

Get it at

http://www.seiner.com/samba3.tar.bz2

untar in the package directory.

Thanks again for the help!

--Yan

hello. i succesfully compiled samba3 within kamikaze latest svn for x86.
i've got the ipks, they install correctly, but all the binaries seems to do is Segmentation Fault

root@OpenWrt:/mnt/lacie# nmbd
Segmentation fault

root@OpenWrt:/mnt/lacie# smbd
Segmentation fault

from dmesg:
nmbd[12290]: segfault at e96c4375 eip b7fd0f62 esp bffc02fc error 4
smbd[12291]: segfault at e96c4375 eip b7f5cf62 esp bf824b6c error 4

(Last edited by dlbogdan on 16 Apr 2008, 13:45)

The discussion might have continued from here.