maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   samba-common (https://talk.maemo.org/showthread.php?t=60499)

karuru 2010-08-16 21:39

samba-common
 
Code:

Nokia-N900:~# apt-get install samba-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
samba-common is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up samba-common (3.4.3-maemo2) ...
dpkg (subprocess): unable to execute post-installation script: No such file or directory
dpkg: error processing samba-common (--configure):
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 samba-common
E: Sub-process /usr/bin/dpkg returned an error code (1)



solution?

dchky 2010-08-17 03:46

Re: samba-common
 
The solution is to open up your most favorite text editor and remove the silly windows LF/CR from the end of each line. Someone borked up - People still use Microsoft? : )

In simple terms ^M is spamming the scripts.

Both of the following files have this issue:

/var/lib/dpkg/info/samba-common.postinst
/var/lib/dpkg/info/samba-common.postrm

Once you remove the ^M from the end of every line, it will both install and remove correctly. It's quite probable that the other samba-common files in this directory are also having the same problem - though I didn't check.

TiagoTiago 2010-11-13 00:32

Re: samba-common
 
would there be a program or even a command in the terminal, to automaticly fix that?

egoshin 2010-11-13 00:54

Re: samba-common
 
Quote:

Originally Posted by TiagoTiago (Post 872020)
would there be a program or even a command in the terminal, to automaticly fix that?

There is a package "tofrodos" but I don't see it in M5 repositories.

TiagoTiago 2010-11-13 00:59

Re: samba-common
 
it sounds like somthing that could be done using regex (i only understand regex enough to see the potential, but i have no idea how to actually use them)

Chaos Defines Order 2010-11-13 01:09

Re: samba-common
 
Quote:

Originally Posted by dchky (Post 788859)
The solution is to open up your most favorite text editor and remove the silly windows LF/CR from the end of each line. Someone borked up - People still use Microsoft? : )

In simple terms ^M is spamming the scripts.

Both of the following files have this issue:

/var/lib/dpkg/info/samba-common.postinst
/var/lib/dpkg/info/samba-common.postrm

Once you remove the ^M from the end of every line, it will both install and remove correctly. It's quite probable that the other samba-common files in this directory are also having the same problem - though I didn't check.

Hi there, I'm having this problem with smbfs and samba-common failing to configure, meaning they also fail when trying to remove them.

While I partly understand your instructions (have opened the two files you mentioned using a text editor) I don't know what you mean by ^M, and can't see anything of the sort anywhere in either file! Is ^M some sort of "code" or designation?

dchky 2010-11-13 01:51

Re: samba-common
 
Quote:

Originally Posted by Chaos Defines Order (Post 872050)
Hi there, I'm having this problem with smbfs and samba-common failing to configure, meaning they also fail when trying to remove them.

While I partly understand your instructions (have opened the two files you mentioned using a text editor) I don't know what you mean by ^M, and can't see anything of the sort anywhere in either file! Is ^M some sort of "code" or designation?

Now that I read my message again I wasn't very clear. : )

The configuration files have been edited at some point in a text application that leaves ^M at the end of every line. (It's an extra carriage return that you can't ordinarily see)

Probably another way to remove them is to hit "File -> Save As" and select "ASCII" or some similar raw text format.

I use vi for pretty much all my editing so I can't really offer solutions that fall outside this particular editor.

If you google "remove ^M" there are quite a few solutions.

kureyon 2010-11-13 04:59

Re: samba-common
 
Make a copy of the files first:
Quote:

cp /var/lib/dpkg/info/samba-common.postinst /var/lib/dpkg/info/samba-common.postinst.bak
cp /var/lib/dpkg/info/samba-common.postrm /var/lib/dpkg/info/samba-common.postrm.bak
Then remove the silly CRs
Quote:

tr -d '\r' < /var/lib/dpkg/info/samba-common.postinst.bak > /var/lib/dpkg/info/samba-common.postinst
tr -d '\r' < /var/lib/dpkg/info/samba-common.postrm.bak > /var/lib/dpkg/info/samba-common.postrm

TiagoTiago 2010-11-15 04:34

Re: samba-common
 
i tried doing that but nothing seems to have changed :(

TiagoTiago 2010-11-15 04:57

Re: samba-common
 
hm, actually, it seems it worked, nvm my last post

lukash 2010-11-17 13:20

Re: samba-common
 
I've notified the package maintainer (wondering if anyone has done that already, its there since february...). Hopefully he will fix it. This has caused me some headache and ruined my mood, damn windows strike from the shadows when I thought I'm done with them. Then again, what to expect in a samba package......:rolleyes:

Nathan 2010-11-17 15:16

Re: samba-common
 
Hmm, that is interesting since I don't think I edited any of those files (and any editing I did to the pkgs was on a linux box). But yeah, I'll try and fix them and re-submit a fixed packed. Thanks for letting me know.

Nathan

lukash 2010-11-18 09:16

Re: samba-common
 
Interesting.. That probably means that windows line-ends work in debian but not in maemo?

Oh, I just realized.. When trying to build the packages from source, I had a conflicting library version most probably named libreadline (not sure about the name now as I'm at work). That could be the cause. I'll post more when I get to test it at home.

Arifa 2011-01-05 11:03

Re: samba-common
 
Hi ,

I get this error when I try to connect to a device

"session setup failed: NT_STATUS_NO_LOGON_SERVERS"

can u please let me know when we get this error and how do we remove it.

XenGi 2011-01-13 18:11

Re: samba-common
 
Quote:

Originally Posted by kureyon (Post 872136)
Make a copy of the files first:
Then remove the silly CRs

This doesn't work for me.
I edited all files which corresponds to samba-common but nothing happens.

Any other suggestions?

tetris11_ 2011-12-24 19:55

Re: samba-common
 
same as above -- removing \r not working for me

Venenarius 2012-05-13 12:59

Re: samba-common
 
There is few errors in post-installation and post-removal scripts.
Post-install:
- non-unix newline format;
- despite package folder structure is optified, script optifies it once more time;
- package relies not only on ucf, but also ucfr, which is not present on maemo.
Post-removal:
- package relies not only on ucf, but also ucfr, which is not present on maemo.

StefanL 2012-05-13 13:15

Re: samba-common
 
Quote:

Originally Posted by egoshin (Post 872038)
There is a package "tofrodos" but I don't see it in M5 repositories.

Enhanced busybox comes with dos2unix ;)

dvb 2013-07-22 08:33

Re: samba-common
 
1 Attachment(s)
I understand, that it is an old thread, but maybe my research will be usefull for someone.

I installed smbfs package and got errors due to bad samba-common configuration process. Then I took /usr/bin/ucfr executable from wheezy debian package, slightly adopted it to eliminate errors under ash, changed /var/lib/dpkg/info/samba-common.postinst, /var/lib/dpkg/info/samba-common.postrm and /var/lib/dpkg/info/smbfs.postinst as it was stated before and issued dpkg --configure samba-common.

Files I changed are in the attachment. Maybe someone will fix the package?

pakke 2013-07-22 10:37

Re: samba-common
 
Hmm...mine n900 doesnt know ucfr. I copied attached ucfr to here:

Nokia-N900:~# ll /usr/bin/ucf*
-rwxr-xr-x 1 root root 30097 Jan 25 2010 /usr/bin/ucf
-rwxr-xr-x 1 root root 10747 Jul 22 10:47 /usr/bin/ucfr
Nokia-N900:~#

but dpkd samba-common still fails:

Nokia-N900:~# dpkg --configure samba-common
Setting up samba-common (3.4.3-maemo2) ...
Replacing config file /etc/samba/smb.conf with new version
/var/lib/dpkg/info/samba-common.postinst: line 123: ucfr: not found

-p

centuu 2014-05-12 13:21

Re: samba-common
 
So.. whats the solution? I cant get samba-common installed/removed! need help :C

Code:

Nokia-N900:~# apt-get install samba-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
samba-common is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up samba-common (3.4.3-maemo2) ...
dpkg (subprocess): unable to execute post-installation script: No such file or directory
dpkg: error processing samba-common (--configure):
 subprocess post-installation script returned error exit status 2
Errors were encountered while processing:
 samba-common
E: Sub-process /usr/bin/dpkg returned an error code (1)


J4ZZ 2014-05-12 14:08

Re: samba-common
 
Page 1 first post has the same error. So just read further. :)
Btw. why do you need samba-common?
All I have installed is smb (3.5.6-maemo1) and smb-tools, nothing more.

Regards,

J4ZZ


All times are GMT. The time now is 01:08.

vBulletin® Version 3.8.8