Bug 3770 - mercurial-server package fails install & uninstall
Summary: mercurial-server package fails install & uninstall
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 3
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA2TOO has_procedure mga2-64-ok mga3...
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2011-12-15 21:08 CET by Frank Griffin
Modified: 2014-05-08 18:05 CEST (History)
7 users (show)

See Also:
Source RPM: mercurial-server
CVE:
Status comment:


Attachments

Description Frank Griffin 2011-12-15 21:08:49 CET
[root@ftgme2 ftg]# urpmi mercurial-server


installing mercurial-server-1.2-1.mga2.noarch.rpm from /mnt/cauldron/x86_64/media/core/release
Preparing...                     ###########################################
/var/tmp/rpm-tmp.oKRX29: line 8: /sbin/su: No such file or directory
error: %pre(mercurial-server-1.2-1.mga2.noarch) scriptlet failed, exit status 127
error:   install: %pre scriptlet failed (2), skipping mercurial-server-1.2-1.mga2
[root@ftgme2 ftg]# 

It should be looking for /bin/su, not /sbin/su.
Comment 1 Manuel Hiebel 2011-12-15 23:08:57 CET
Hi, thanks for reporting this bug.
Assigned to the package maintainer.

(Please set the status to 'assigned' if you are working on it)

Keywords: (none) => Triaged
CC: (none) => philippedidier
Assignee: bugsquad => lev
Source RPM: (none) => mercurial

Comment 2 Manuel Hiebel 2011-12-15 23:09:35 CET
oups wrong mail

CC: philippedidier => makowski.mageia
Source RPM: mercurial => mercurial-server

Comment 3 Remco Rijnders 2012-03-15 13:28:19 CET
Hi Lev,

Are you working on this?

CC: (none) => remco

Comment 4 Lev Givon 2012-03-15 13:42:23 CET
I didn't receiving mail from bugzilla regarding this in December (it may have been silently eaten by a spam filter). Fix applied.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 5 Remco Rijnders 2012-04-11 20:53:19 CEST
Lev, can you please look again? I get the following now:

[root@ketelbinkie remmy]# urpmi mercurial-server


    http://mageia.webconquest.com/distrib/cauldron/x86_64/media/core/release/mercurial-server-1.2-2.mga2.noarch.rpm
installing mercurial-server-1.2-2.mga2.noarch.rpm from /var/cache/urpmi/rpms
Preparing...                     ################################################################################################################################################
install: cannot stat `/etc/mercurial-server/init/dot-mercurial-server': No such file or directory
 ...killed.
error: %pre(mercurial-server-1.2-2.mga2.noarch) scriptlet failed, exit status 1
error: mercurial-server-1.2-2.mga2.noarch: install failed

Resolution: FIXED => (none)
Status: RESOLVED => REOPENED

Comment 6 Lev Givon 2012-04-18 19:28:24 CEST
I fixed the path - try again.
Comment 7 Remco Rijnders 2012-04-20 21:11:41 CEST
Sorry to report... but still no dice:

root@ketelbinkie remmy]# urpmi mercurial-server


    http://mageia.webconquest.com/distrib/cauldron/x86_64/media/core/release/mercurial-server-1.2-3.mga2.noarch.rpm
installing mercurial-server-1.2-3.mga2.noarch.rpm from /var/cache/urpmi/rpms
Preparing...                     ################################################################################################################################################
install: cannot stat `/usr/share/mercurial-server/init/dot-mercurial-server': No such file or directory
error: %pre(mercurial-server-1.2-3.mga2.noarch) scriptlet failed, exit status 1
error: mercurial-server-1.2-3.mga2.noarch: install failed
Comment 8 Lev Givon 2012-04-20 21:43:49 CEST
Moved the installation of dot-mercurial-server from %pre to %post.
Comment 9 Remco Rijnders 2012-04-21 05:19:34 CEST
Hi Lev,

With -4 the package does install, but also results in a warning / error:

[root@ketelbinkie remmy]# urpmi mercurial-server


    http://mageia.webconquest.com/distrib/cauldron/x86_64/media/core/release/mercurial-server-1.2-4.mga2.noarch.rpm
installing mercurial-server-1.2-4.mga2.noarch.rpm from /var/cache/urpmi/rpms
Preparing...                     ################################################################################################################################################
      1/1: mercurial-server      ################################################################################################################################################
install: cannot create regular file `/var/hg/.mercurial-server': Permission denied
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.
-------------------------------------------------------------------------------

I'm not sure how big an issue this is as I don't use this package myself. Perhaps the original reporter knows?
Comment 10 Marja Van Waes 2012-05-26 13:03:31 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Frank Griffin 2012-06-12 21:41:13 CEST

Keywords: NEEDINFO => (none)
Whiteboard: (none) => MGA2TOO

Comment 11 Marja Van Waes 2012-07-06 15:04:40 CEST
Please look at the bottom of this mail to see whether you're the assignee of this  bug, if you don't already know whether you are.


If you're the assignee:

We'd like to know for sure whether this bug was assigned correctly. Please change status to ASSIGNED if it is, or put OK on the whiteboard instead.

If you don't have a clue and don't see a way to find out, then please put NEEDHELP on the whiteboard.

Please assign back to Bug Squad or to the correct person to solve this bug if we were wrong to assign it to you, and explain why.

Thanks :)

**************************** 

@ the reporter and persons in the cc of this bug:

If you have any new information that wasn't given before (like this bug being valid for another version of Mageia, too, or it being solved) please tell us.

@ the reporter of this bug

If you didn't reply yet to a request for more information, please do so within two weeks from now.

Thanks all :-D
Comment 12 Philippe Makowski 2013-05-28 21:57:52 CEST
mercurial-server-1.2-5.mga2
and
mercurial-server-1.3-2.mga3

are in updates_testing

warning / error in comment 9 are solved


Suggested advisory:
========================

Updated mercurial-server packages fix bug #3770:

mercurial-server package fails install

References:
https://bugs.mageia.org/show_bug.cgi?id=3770
========================

Updated packages in core/updates_testing:
========================
mercurial-server-1.3-2.mga3.noarch.rpm
mercurial-server-1.2-5.mga2.noarch.rpm

Source RPMs: 
mercurial-server-1.3-2.mga3.src.rpm
mercurial-server-1.2-5.mga2.src.rpm

Status: REOPENED => ASSIGNED
Assignee: lev => qa-bugs

David Walser 2013-05-29 01:17:23 CEST

Version: Cauldron => 3

Philippe Makowski 2013-05-31 21:16:15 CEST

Keywords: Triaged => (none)
Whiteboard: MGA2TOO => MGA2TOO has_procedure

Comment 13 martyn vidler 2013-06-03 20:58:58 CEST
Tested on mga3 32 ok

installed with urpmi mercurial server. No errors reported

installing mercurial-2.5.2-1.mga3.i586.rpm mercurial-server-1.3-2.mga3.noarch.rpm from /var/cache/urpmi/rpms
Preparing...                     ############################################
      1/2: mercurial             ############################################
      2/2: mercurial-server      ############################################
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run 
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.
-------------------------------------------------------------------------------

"Note can someone do MGA2 64 I can do rest"

CC: (none) => martynvidler
Whiteboard: MGA2TOO has_procedure => MGA2TOO has_procedure MGA3-32-ok

Comment 14 martyn vidler 2013-06-03 21:52:44 CEST
Tested mercurial-server mga3 64 & mga2 32

installing mercurial-2.1.1-1.mga2.i586.rpm mercurial-server-1.2-5.mga2.noarch.rpm from /var/cache/urpmi/rpms
Preparing...                     #######################################################
      1/2: mercurial             #######################################################
      2/2: mercurial-server      #######################################################
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run 
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.

64
installing mercurial-2.5.2-1.mga3.x86_64.rpm mercurial-server-1.3-2.mga3.noarch.rpm from /var/cache/urpmi/rpms
Preparing...                     #######################################################
      1/2: mercurial             #######################################################
      2/2: mercurial-server      #######################################################
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run 
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.

Whiteboard: MGA2TOO has_procedure MGA3-32-ok => MGA2TOO has_procedure MGA3-32-ok MGA2-32-ok MGA3-64-ok

Comment 15 claire robinson 2013-06-04 09:52:02 CEST
Testing complete mga2 64

Validating

Advisory & srpms for mga 2 & 3 in comment 12

Could sysadmin please push from core/updates_testing to core/updates

Thanks!

Keywords: (none) => validated_update
Whiteboard: MGA2TOO has_procedure MGA3-32-ok MGA2-32-ok MGA3-64-ok => MGA2TOO has_procedure mga2-64-ok MGA3-32-ok MGA2-32-ok MGA3-64-ok
CC: (none) => sysadmin-bugs

Comment 16 claire robinson 2013-06-04 09:54:34 CEST
Sorry, unvalidating again.

There is also an issue with uninstall

# urpme mercurial-server
removing mercurial-server-1.2-5.mga2.noarch
removing package mercurial-server-1.2-5.mga2.noarch
userdel: user 'hg' does not exist
warning: %postun(mercurial-server-1.2-5.mga2.noarch) scriptlet failed, exit status 6

Keywords: validated_update => (none)
Summary: mercurial-server package fails install => mercurial-server package fails install & uninstall
Whiteboard: MGA2TOO has_procedure mga2-64-ok MGA3-32-ok MGA2-32-ok MGA3-64-ok => MGA2TOO has_procedure MGA3-32-ok MGA2-32-ok MGA3-64-ok

Comment 17 claire robinson 2013-06-04 09:57:19 CEST
Also mga3..

# urpme mercurial-server
removing mercurial-server-1.3-2.mga3.noarch
removing package mercurial-server-1.3-2.mga3.noarch
      1/1: removing mercurial-server-1.3-2.mga3.noarch
                                 ##########################################################################################################
userdel: hg mail spool (/var/spool/mail/hg) not found


Appears it isn't creating the hg user it needs on install.
claire robinson 2013-06-04 10:01:17 CEST

Whiteboard: MGA2TOO has_procedure MGA3-32-ok MGA2-32-ok MGA3-64-ok => feedback MGA2TOO has_procedure MGA3-32-ok MGA2-32-ok MGA3-64-ok

Comment 18 Philippe Makowski 2013-06-04 13:45:00 CEST
This one is strange
I tested it multiple time before pushing
can check after install if the hg user is created ?
it should :
http://svnweb.mageia.org/packages/updates/3/mercurial-server/current/SPECS/mercurial-server.spec?view=markup
38 	%pre
39 	%_pre_useradd hg /var/hg /bin/bash

http://svnweb.mageia.org/packages/updates/2/mercurial-server/current/SPECS/mercurial-server.spec?view=markup
41 	%pre
42 	%_pre_useradd hg /var/hg /bin/bash
Comment 19 Philippe Makowski 2013-06-04 13:50:23 CEST
sorry, I know why 
I didn't add the necessary requires :(
I will rebuild them soon, thanks for the report

Assignee: qa-bugs => makowski.mageia

Comment 20 claire robinson 2013-06-04 14:42:03 CEST
yw :) I've 'reset' the bug so it's ready when you are

Whiteboard: feedback MGA2TOO has_procedure MGA3-32-ok MGA2-32-ok MGA3-64-ok => MGA2TOO has_procedure

Comment 21 Philippe Makowski 2013-06-04 19:04:14 CEST
Updated packages in core/updates_testing:
========================
mercurial-server-1.3-3.mga3.noarch.rpm
mercurial-server-1.2-6.mga2.noarch.rpm

Source RPMs: 
mercurial-server-1.3-3.mga3.src.rpm
mercurial-server-1.2-6.mga2.src.rpm

Assignee: makowski.mageia => qa-bugs

Comment 22 martyn vidler 2013-06-04 22:10:21 CEST
Tested mga3 32 & 64

installing mercurial-2.5.2-1.mga3.i586.rpm mercurial-server-1.3-3.mga3.noarch.rpm from /var/cache/urpmi/rpms
Preparing...                     ############################################
      1/2: mercurial             ############################################
      2/2: mercurial-server      ############################################
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.

output id hg
uid=485(hg) gid=477(hg) groups=477(hg)

urpme mercurial-server

removing mercurial-server-1.3-3.mga3.noarch
removing package mercurial-server-1.3-3.mga3.noarch
      1/1: removing mercurial-server-1.3-3.mga3.noarch
                                 ############################################################################
userdel: hg mail spool (/var/spool/mail/hg) not found


I get the same results on both archs
Comment 23 Philippe Makowski 2013-06-05 00:21:48 CEST
You just did urpmi and then urpme ?
you didn't logged as user hg ?
you didn't "run /usr/share/mercurial-server/refresh-auth while logged in as the user hg" ?

seems that /var/spool/mail/hg is not created by %_pre_useradd hg /var/hg /bin/bash

I have to find a solution, since %_post_userdel is not the correct one as it remove nothing

maybe create /var/spool/mail/hg in the package 
or can we live with this warning as it break nothing ?
Comment 24 Philippe Makowski 2013-06-05 20:56:57 CEST
Updated packages in core/updates_testing:
========================
mercurial-server-1.3-3.1.mga3.noarch.rpm
mercurial-server-1.2-6.1.mga2.noarch.rpm

Source RPMs: 
mercurial-server-1.3-3.1.mga3.src.rpm
mercurial-server-1.2-6.1.mga2.src.rpm
Comment 25 martyn vidler 2013-06-05 22:00:56 CEST
MGA3 64 

installed mercurial-server-1.3-3.1.mga3.noarch.rpm
su - hg then /usr/share/mercurial-server/refresh-auth

urpme showed no errors

How ever MGA3 32
Installed ok switch user hg /usr/share/mercurial-server/refresh-auth

urpme 
removing mercurial-server-1.3-3.1.mga3.noarch
removing package mercurial-server-1.3-3.1.mga3.noarch
      1/1: removing mercurial-server-1.3-3.1.mga3.noarch
                                 #############################################
userdel: /var/spool/mail/hg not owned by hg, not removing
warning: %postun(mercurial-server-1.3-3.1.mga3.noarch) scriptlet failed, exit status 12
ERROR: 'script' failed for broadcom-ssb-config-1-3.mga3.noarch:
Comment 26 martyn vidler 2013-06-05 22:20:25 CEST
MGA2 32 

switch user hg 
/usr/share/mercurial-server/refresh-auth

urpme
removing mercurial-server-1.2-6.1.mga2.noarch
removing package mercurial-server-1.2-6.1.mga2.noarch
writing /var/lib/rpm/installed-through-deps.list
Comment 27 Philippe Makowski 2013-06-05 23:31:41 CEST
I dont understand the  error ERROR: 'script' failed for broadcom-ssb-config-1-3.mga3.noarch:

it have nothing to do with mercurial-server
Comment 28 martyn vidler 2013-06-06 18:29:55 CEST
MGA3 32 was a clean install yesterday as well, ran updates
then installed mercurial-server-1.3-3.1.mga3.noarch

Ran the tests exactly the same way I ran on MGA3 64 and MGA2 32
I only reported what showed up Sorry
Comment 29 claire robinson 2013-06-10 12:23:55 CEST
Testing mga2 32

Before
------
# urpmi mercurial-server
To satisfy dependencies, the following packages are going to be installed:
  Package                        Version      Release       Arch    
(medium "Core Release")
  mercurial                      2.1.1        1.mga2        i586
  mercurial-server               1.2          4.mga2        noarch
11MB of additional disk space will be used.
1.9MB of packages will be retrieved.
Proceed with the installation of the 2 packages? (Y/n) y

installing mercurial-server-1.2-4.mga2.noarch.rpm mercurial-2.1.1-1.mga2.i586.rpm from /var/cache/urpmi/rpms
Preparing...                     ###############################################
      1/2: mercurial             ###############################################
usermod: unlocking the user's password would result in a passwordless account.
You should set a password with usermod -p to unlock this user's password.
usermod: unlocking the user's password would result in a passwordless account.
You should set a password with usermod -p to unlock this user's password.
      2/2: mercurial-server      ###############################################
install: cannot create regular file `/var/hg/.mercurial-server': Permission denied
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.
-------------------------------------------------------------------------------



After
-----

# urpmi mercurial-server

installing mercurial-server-1.2-6.1.mga2.noarch.rpm from /var/cache/urpmi/rpms
Preparing...                     ###############################################
      1/1: mercurial-server      ###############################################
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.
-------------------------------------------------------------------------------

# grep hg /etc/passwd
# grep hg /etc/group
# su - hg
su: user hg does not exist

# ll -d /var/hg
ls: cannot access /var/hg: No such file or directory

Is it mercurial rather than mercurial-server which should be creating the hg user?

Whiteboard: MGA2TOO has_procedure => MGA2TOO has_procedure feedback

Comment 30 claire robinson 2013-06-10 12:25:30 CEST
# urpme mercurial-server
removing mercurial-server-1.2-6.1.mga2.noarch
removing package mercurial-server-1.2-6.1.mga2.noarch
chown: invalid user: `hg'
userdel: user 'hg' does not exist
warning: %postun(mercurial-server-1.2-6.1.mga2.noarch) scriptlet failed, exit status 6
Comment 31 Philippe Makowski 2013-06-10 19:16:30 CEST
all that is very strange, different tests, some fail on create user, other on delete it, other all is ok but with a warning ....

why %_pre_useradd hg /var/hg /bin/bash don't work on your box Claire ?
any idea ? any log ?

do you have the same result under mga3 ?

seems that I need to review completely this package, and that under mga2, I can't rely on %_pre_useradd

I reassign the bug to me

Assignee: qa-bugs => makowski.mageia

claire robinson 2013-06-10 20:42:43 CEST

CC: (none) => qa-bugs

Comment 32 claire robinson 2013-06-11 08:42:49 CEST
Installing with urpmi --debug unfortunately doesn't show any new information. Again testing on mga2 32.

Before
------
# grep hg /etc/passwd
# urpmi --debug mercurial-server
...
Preparing...                     ####################################################
      1/2: mercurial             ####################################################
usermod: unlocking the user's password would result in a passwordless account.
You should set a password with usermod -p to unlock this user's password.
usermod: unlocking the user's password would result in a passwordless account.
You should set a password with usermod -p to unlock this user's password.
      2/2: mercurial-server      ####################################################
install: cannot create regular file `/var/hg/.mercurial-server': Permission denied
...

# grep hg /etc/passwd
hg:x:453:453:Mercurial repository server user:/var/hg:/bin/bash
# ll -d /var/hg
drwxr-xr-x 6 hg hg 4096 Jun 11 07:34 /var/hg/
# ll /var/hg/
total 8
drwxr-xr-x 3 hg hg 4096 Jun 11 07:34 repos/
drwx------ 2 hg hg 4096 Jan 11  2011 tmp/


After
-----
Preparing...                     ####################################################
      1/1: mercurial-server      ####################################################
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.
-------------------------------------------------------------------------------
removing upgraded package mercurial-server-1.2-4.mga2.noarch
userdel: /var/spool/mail/hg not owned by hg, not removing
warning: %postun(mercurial-server-1.2-4.mga2.noarch) scriptlet failed, exit status 12
removing installed rpms (mercurial-server-1.2-6.1.mga2.noarch.rpm) from /var/cache/urpmi/rpms

# grep hg /etc/passwd
# ll -d /var/hg
ls: cannot access /var/hg: No such file or directory
# ll /var/spool/mail/hg
-rw-r--r-- 1 root root 0 Jun 10 11:24 /var/spool/mail/hg


So it seems the hg user is actually being removed as the package is updated.
Comment 33 claire robinson 2013-06-11 08:45:43 CEST
Removing with --debug shows nothing new either, but as the user is deleted with the update this should be expected.

trans: scheduling removal of mercurial-server-1.2-6.1.mga2noarch
removing package mercurial-server-1.2-6.1.mga2.noarch
userdel: user 'hg' does not exist
warning: %postun(mercurial-server-1.2-6.1.mga2.noarch) scriptlet failed, exit status 6
computing unrequested orphans
Comment 34 Philippe Makowski 2013-06-11 23:13:03 CEST
Hope this time it is better :

Updated packages in core/updates_testing:
========================
mercurial-server-1.3-3.2.mga3.noarch.rpm
mercurial-server-1.2-6.2.mga2.noarch.rpm

Source RPMs: 
mercurial-server-1.3-3.2.mga3.src.rpm
mercurial-server-1.2-6.2.mga2.src.rpm

Assignee: makowski.mageia => qa-bugs

claire robinson 2013-06-12 14:25:37 CEST

Whiteboard: MGA2TOO has_procedure feedback => MGA2TOO has_procedure

Comment 35 martyn vidler 2013-06-12 21:23:11 CEST
Hi Phillippe

Sorry I get an error while installing on MGA2 32

    rsync://www.mirrorservice.org/mageia.org/pub/mageia/distrib/2/i586/media/core/updates_testing/mercurial-server-1.2-6.2.mga2.noarch.rpm
installing mercurial-server-1.2-6.2.mga2.noarch.rpm from /var/cache/urpmi/rpms
Preparing...                     #######################################################
      1/1: mercurial-server      #######################################################
/var/tmp/rpm-tmp.SGCk5Z: line 2: /usr/bin/su: No such file or directory


MGA3 32

All ok
    $MIRRORLIST: media/core/updates_testing/mercurial-server-1.3-3.2.mga3.noarch.rpm
installing mercurial-server-1.3-3.2.mga3.noarch.rpm from /var/cache/urpmi/rpms
Preparing...                     #######################################################
      1/1: mercurial-server      #######################################################
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.


ll -d /var/hg
drwxr-xr-x 4 hg hg 4096 Jun 12 17:37 /var/hg/

su - hg /usr/share/mercurial-server/refresh-auth
urpme
removing mercurial-server-1.3-3.2.mga3.noarch
removing package mercurial-server-1.3-3.2.mga3.noarch
      1/1: removing mercurial-server-1.3-3.2.mga3.noarch

Also  MGA3 64 

    $MIRRORLIST: media/core/updates_testing/mercurial-server-1.3-3.2.mga3.noarch.rpm
installing mercurial-server-1.3-3.2.mga3.noarch.rpm from /var/cache/urpmi/rpms
Preparing...                     #######################################################
      1/1: mercurial-server      #######################################################
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.


ran as "hg"
/usr/share/mercurial-server/refresh-auth

urpme
removing mercurial-server-1.3-3.2.mga3.noarch
removing package mercurial-server-1.3-3.2.mga3.noarch
      1/1: removing mercurial-server-1.3-3.2.mga3.noarch
Comment 36 martyn vidler 2013-06-12 21:25:14 CEST
Can someone test this on MGA2 64 plz
Comment 37 claire robinson 2013-06-16 12:46:17 CEST
Testing mga3 64

Sorry Philippe, there's something strange happening. It appears to actually delete the hg user which was added by the Release version. When the old package is removed after updating to the new one it shows an error that the user doesn't exist, but seems to confirm it does exist before it begins.

# dcupdt
Disabling Core Updates Testing

# urpmi mercurial-serverinstalling mercurial-2.5.2-1.mga3.x86_64.rpm mercurial-server-1.3-1.mga3.noarch.rpm from /var/cache/urpmi/rpms                              
Preparing...                     ##########################################################################################################
      1/2: mercurial             ##########################################################################################################
usermod: unlocking the user's password would result in a passwordless account.
You should set a password with usermod -p to unlock this user's password.
usermod: unlocking the user's password would result in a passwordless account.
You should set a password with usermod -p to unlock this user's password.
      2/2: mercurial-server      ##########################################################################################################
install: cannot create regular file â/var/hg/.mercurial-serverâ: Permission denied
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run 
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.
-------------------------------------------------------------------------------


# ecupdt
Enabling Core Updates Testing

# urpmi mercurial-server
installing mercurial-server-1.3-3.2.mga3.noarch.rpm from /var/cache/urpmi/rpms                                                              
Preparing...                     ##########################################################################################################
hg:x:448:
      1/1: mercurial-server      ##########################################################################################################
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run 
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.
-------------------------------------------------------------------------------
      1/1: removing mercurial-server-1.3-1.mga3.noarch
                                 ##########################################################################################################
userdel: hg mail spool (/var/spool/mail/hg) not found


# grep hg /etc/passwd | wc -l
0
# grep hg /etc/group | wc -l
0

Whiteboard: MGA2TOO has_procedure => MGA2TOO has_procedure feedback

Comment 38 claire robinson 2013-06-16 13:08:07 CEST
Confirmed the weird, seemingly unrelated, script failed message on removal too.

# urpme mercurial-server
removing mercurial-server-1.3-3.2.mga3.noarch
removing package mercurial-server-1.3-3.2.mga3.noarch
      1/1: removing mercurial-server-1.3-3.2.mga3.noarch
                                 warning: file /var/hg: remove failed: No such file or directory
##########################################################################################################
userdel: user 'hg' does not exist
warning: %postun(mercurial-server-1.3-3.2.mga3.noarch) scriptlet failed, exit status 1
ERROR: 'script' failed for aspectj-installer-1.6.12-1.mga2.noarch:



Installing fresh from updates testing, without having a previous version installed does seem to install and uninstall cleanly so the problems seem to stem from the previous package. Not sure there will be a way to fix this properly.

# urpmi mercurial-server
/mercurial-server-1.3-3.2.mga3.noarch.rpm
installing mercurial-server-1.3-3.2.mga3.noarch.rpm from /var/cache/urpmi/rpms                                                              
Preparing...                     ##########################################################################################################
      1/1: mercurial-server      ##########################################################################################################
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run 
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.
-------------------------------------------------------------------------------
# grep hg /etc/passwd | wc -l
1
# grep hg /etc/group | wc -l
1


# urpme mercurial-server
removing mercurial-server-1.3-3.2.mga3.noarch
removing package mercurial-server-1.3-3.2.mga3.noarch
      1/1: removing mercurial-server-1.3-3.2.mga3.noarch
                                 ##########################################################################################################

The following package:
  mercurial-2.5.2-1.mga3.x86_64
is now orphaned, if you wish to remove it, you can use "urpme --auto-orphans"
# grep hg /etc/passwd | wc -l
0
# grep hg /etc/group | wc -l
0
Comment 39 Philippe Makowski 2013-06-18 19:19:03 CEST
OK

I will do an update so the future updates don't create the problem
But there is nothing I can do for the release packages
So note :
When upgrading from mercurial-server-1.3-1.mga3.noarch, you have first to remove the package (urpme mercurial-server) and only after install the new version mercurial-server-1.3-3.3

After that future upgrades should run correctly
Comment 40 Philippe Makowski 2013-06-18 19:44:11 CEST
Updated packages in core/updates_testing:
========================
mercurial-server-1.3-3.3.mga3.noarch.rpm
mercurial-server-1.2-6.3.mga2.noarch.rpm

Source RPMs: 
mercurial-server-1.3-3.3.mga3.src.rpm
mercurial-server-1.2-6.3.mga2.src.rpm
Comment 41 Manuel Hiebel 2013-06-20 22:32:31 CEST
nothing more than the readme.urpmi shown, ok on mga2/64b

CC: sysadmin-bugs => (none)
Whiteboard: MGA2TOO has_procedure feedback => MGA2TOO has_procedure mga2-64-ok

Comment 42 Rémi Verschelde 2013-06-22 12:34:36 CEST
Reproduced the bug with installing and uninstalling from core/release on mga3 i586. Reinstalled mercurial-server from core/release before trying the update candidate. Then:


=== Step 1 ===

[root@remi Documents]# urpmi mercurial-server

    $MIRRORLIST: media/core/updates_testing/mercurial-server-1.3-3.3.mga3.noarch.rpm
installation de mercurial-server-1.3-3.3.mga3.noarch.rpm depuis /var/cache/urpmi/rpms                                                       
Préparation...                   ##########################################################################################################
hg:x:477:
      1/1: mercurial-server      ##########################################################################################################
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run 
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.
-------------------------------------------------------------------------------
      1/1: désinstallation de mercurial-server-1.3-1.mga3.noarch
                                 ##########################################################################################################
userdel: hg mail spool (/var/spool/mail/hg) not found


=== Step 2 ===

[root@remi Documents]# urpme mercurial-server
désinstallation de mercurial-server-1.3-3.3.mga3.noarch
désinstallation du paquetage mercurial-server-1.3-3.3.mga3.noarch
      1/1: désinstallation de mercurial-server-1.3-3.3.mga3.noarch
                                 warning: file /var/hg: remove failed: No such file or directory
##########################################################################################################
userdel: user 'hg' does not exist
warning: %postun(mercurial-server-1.3-3.3.mga3.noarch) scriptlet failed, exit status 1
ERROR: 'script' failed for aspectj-installer-1.6.12-1.mga2.noarch:


=== Step 3 ===

[root@remi Documents]# urpmi mercurial-server

    $MIRRORLIST: media/core/updates_testing/mercurial-server-1.3-3.3.mga3.noarch.rpm
installation de mercurial-server-1.3-3.3.mga3.noarch.rpm depuis /var/cache/urpmi/rpms                                                       
Préparation...                   ##########################################################################################################
      1/1: mercurial-server      ##########################################################################################################
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run 
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.
-------------------------------------------------------------------------------


So as said in comment 39, the update candidate works if the package from core/release was removed *before*. Could we have a mention about it in the readme.urpmi? Such as "Please uninstall and reinstall mercurial-server if you had the package from core/release already installed".

CC: (none) => remi

Comment 43 Lewis Smith 2013-06-24 21:02:48 CEST
MGA3-32-OK

Run on Mag3 *without* Release mercurial-server installed (nor SSH nor mercurial), heeding the caution above, it installed OK (Asked for DVD for SSH):
# urpmi mercurial-server
...
    $MIRRORLIST: media/core/release/mercurial-2.5.2-1.mga3.i586.rpm
    $MIRRORLIST: media/core/updates_testing/mercurial-server-1.3-3.3.mga3.noarch.rpm                 
gosod /var/cache/urpmi/rpms/mercurial-2.5.2-1.mga3.i586.rpm                                          
/var/cache/urpmi/rpms/mercurial-server-1.3-3.3.mga3.noarch.rpm
/media/Mageia-3-i586/i586/media/core/openssh-server-6.1p1-4.mga3.i586.rpm
Paratoi...                       ###################################################################
      1/3: openssh-server        ###################################################################
Generating SSH1 RSA host key... done
Generating SSH2 RSA host key... 
done
Generating SSH2 DSA host key... 
done
      2/3: mercurial             ###################################################################
      3/3: mercurial-server      ###################################################################
-------------------------------------------------------------------------------
Place the SSH public key(s) of the user(s) who require access to the repository
in the directory /etc/mercurial-server/keys/root and run 
/usr/share/mercurial-server/refresh-auth while logged in as the user hg.
-------------------------------------------------------------------------------
# su - hg /usr/share/mercurial-server/refresh-auth
gave a lot of errors because no SSH public keys etc; no matter?
# urpme mercurial-server
tynnu mercurial-server-1.3-3.3.mga3.noarch
tynnu pecyn mercurial-server-1.3-3.3.mga3.noarch.
      1/1: tynnu mercurial-server-1.3-3.3.mga3.noarch
###################################################################
writing /var/lib/rpm/installed-through-deps.list
Mae'r pecyn canlynol:
  libllvmradeon9.1.2-9.1.2-1.mga3.tainted.i586
  mercurial-2.5.2-1.mga3.i586
  openssh-server-6.1p1-4.mga3.i586
yn amddifad, os hoffech ei dynnu defnyddiwch "urpme --auto-orphans".

Which means it uninstalled the server without error & declared the 3 'orphan' packages.
Hope this helps.

CC: (none) => lewyssmith

Comment 44 Rémi Verschelde 2013-06-25 08:48:06 CEST
Ping Philippe on comment 42.

Do you plan to add a readme.urpmi saying that mercurial-server should not be installed when installing the update, or do we consider it good as is? (we still lack tests on mga2-32 and mga3-64 though).

Whiteboard: MGA2TOO has_procedure mga2-64-ok => MGA2TOO has_procedure mga2-64-ok feedback

Comment 45 Philippe Makowski 2013-06-25 13:50:56 CEST
Could it be only on advisory ?
the initial bug report was that mercurial-server don't install, so, not sure that someone have it on his box 

it would save me another round of update and build, and I have a lot of others packages to take care of.
Comment 46 Rémi Verschelde 2013-06-25 14:04:57 CEST
Ok :)

Whiteboard: MGA2TOO has_procedure mga2-64-ok feedback => MGA2TOO has_procedure mga2-64-ok mga3-32-ok

Comment 47 claire robinson 2013-07-02 13:32:34 CEST
Testing complete mga2 32

After uninstalling the release version and installing from testing followed the step-by-step here: http://dev.lshift.net/paul/mercurial-server/docbook.html#id1332390

Created a local mercurial repository

Edited ~/.hgrc and added some info as below

[ui]
username = Claire Robinson <eeeemail@gmail.com>
verbose = True

Then created a local repository to test the server with

$ cd test
$ ls
11_CVE-2012-5572.t  qemu-ga.log  qemu-ga.pid

$ hg add .
$ hg commit -m "First commit"

then followed the next section on creating repositories: http://dev.lshift.net/paul/mercurial-server/docbook.html#id1332626

$ hg clone . ssh://hg@mga232/claires/project
running ssh hg@mga232 'hg init claires/project'
running ssh hg@mga232 'hg -R claires/project serve --stdio'
searching for changes
1 changesets found
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 4 changes to 4 files

&

$ hg pull ssh://hg@mga232/claires/project
running ssh hg@mga232 'hg -R claires/project serve --stdio'
pulling from ssh://hg@mga232/claires/project
searching for changes
no changes found

Whiteboard: MGA2TOO has_procedure mga2-64-ok mga3-32-ok => MGA2TOO has_procedure mga2-64-ok mga3-32-ok mga2-32-ok

Comment 48 claire robinson 2013-07-02 13:58:42 CEST
Testing complete mga3 64

Forgot to mention the 'hg init' which comes before 'hg add .' otherwise it complains there is no repository there to add to.

Also if ssh-add -L doesn't work properly, it should pass the contents or your ssh public key (.ssh/id_rsa.pub or .ssh/id_dsa.pub normally) which you can just copy/paste instead.

Whiteboard: MGA2TOO has_procedure mga2-64-ok mga3-32-ok mga2-32-ok => MGA2TOO has_procedure mga2-64-ok mga3-32-ok mga2-32-ok mga3-64-ok

Comment 49 claire robinson 2013-07-02 14:24:14 CEST
Validating. Advisory uploaded.

SRPM's in comment 40

Could sysadmin please push from 2&3 core/updates_testing to core/updates

Thanks

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 50 Nicolas Vigier 2013-07-06 16:29:31 CEST
http://advisories.mageia.org/MGAA-2013-0045.html

Status: ASSIGNED => RESOLVED
CC: (none) => boklm
Resolution: (none) => FIXED

Nicolas Vigier 2014-05-08 18:05:37 CEST

CC: boklm => (none)


Note You need to log in before you can comment on or make changes to this bug.