[Top] [All Lists]

RE: [PATCH] xfsprogs: use uid/gid instead of actual name to fix install

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: RE: [PATCH] xfsprogs: use uid/gid instead of actual name to fix install issue
From: Luo Zhenhua-B19537 <B19537@xxxxxxxxxxxxx>
Date: Mon, 26 Dec 2011 03:39:07 +0000
Accept-language: en-US
Cc: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
In-reply-to: <20111223210826.GD12731@dastard>
References: <1324623173-32707-1-git-send-email-b19537@xxxxxxxxxxxxx> <20111223100135.GA12731@dastard> <CA452391058F6D4E9715FB2C29D9312A010BC015@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20111223210826.GD12731@dastard>
Thread-index: AQHMwT8KUDxeOb3vOUC4J6ATc3XJ4JXplcyA///iBbCAANhMAIADJ/Ug
Thread-topic: [PATCH] xfsprogs: use uid/gid instead of actual name to fix install issue
> -----Original Message-----
> From: Dave Chinner [mailto:david@xxxxxxxxxxxxx]
> Sent: Saturday, December 24, 2011 5:08 AM
> > If the specified user/group is invalid, I think this should be an
> > usage error instead of script error.
> Hold on - how are you getting an invalid uid/gid? Those values are set by the
> configure script to the uid/gid of the builder process, and so should -never- 
> be
> invalid.
[Luo Zhenhua-B19537] The username/group are set by configure script and valid 
value are used during my install process. 

> Are you building on one machine, rsyncing to another machine with different
> user/groups and then running make install?  If so, you are using make install
> incorrectly. make install is designed to install the binaries on the host that
> they were built, not some other random machine. If you are going to install
> binaries on a different machine to where they were built, you are supposed to
> build a tarball, a .deb or .rpm package and install that. Those targets are
> macine independent and won't have install problems.
[Luo Zhenhua-B19537] I built it only on a host, no other machine is involved. 
What surprised me is I can run the chmod command successfully, but the same 
command failed in the install script. After using uid/gid, it can run correctly 
both in manual way and in the script. The purpose of my patch is to resolve 
this issue. 

> > Current the problem I met is that, even if I specified a valid
> > user/group of my host, "chown user:group file" failed, after switching
> > to corresponding uid/gid, the script can be executed successfully
> > during the install process.
> I had to manually change the include/builddefs file to have an invalid
> PKG_USER/PKG_GROUP variables to get chown to fail because all my build/test
> machines have consistent uid/gid entries, so even build/rsync/install works
> without fail....
> And if you look at what your change actually does, the script still executes 
> and
> installs -some- stuff, it just doesn't run the chown because _chown() is now 
> not
> passed the correct number of parameters.
> IOWs, the script now fails with a partial install with no indication of what 
> was
> installed or not.
> If you are going to check whether uid/gid exist, you need to exit immediately 
> if
> they don't exist, not allow the script to continue.
[Luo Zhenhua-B19537] Makes sense. 

Best Regards,


<Prev in Thread] Current Thread [Next in Thread>