Re: F7 mixing %post --nochroot and %post broken

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Lumens wrote:
%post --nochroot
# Set Up Applications for install
mkdir /mnt/sysimage/tmp/local
cp /tmp/isomedia/ks/jdk*.rpm /mnt/sysimage/tmp/local
cp /tmp/isomedia/ks/livna*.rpm /mnt/sysimage/tmp/local
cp /tmp/isomedia/ks/codecs.tgz /mnt/sysimage/tmp
cp /tmp/isomedia/ks/fix_host /mnt/sysimage/tmp


%post
cd /

tar xzf /tmp/codecs.tgz

...

I used the nochroot to copy stuff from my custom DVD image to the hard drive where I could later mess with it during normal post.

These now fail in F7, anaconda 11.2.0.66-1.

That's weird.  Please file a detailed bug against anaconda and I'll take
a look.

It appears that /tmp/isomedia is no longer mounted at %post --nochroot.

Correct.

Ack! OK so a clarification: The way that I used %post --nochroot is no longer valid, and does not demonstrate a failure anaconda to do both. :(

Another oddity that I have observed, is this:

During install hit <F2> and verify the presence of /mnt/sysimage/usr/sbin/adduser However, a custom package that adds a user, and is installed as part of the OS load, fails to find /usr/sbin/useradd.
This used to work.

What does the scriptlet in the package look like, and what sorts of
errors are you seeing when it is run?  /var/log/anaconda.log from the
installed system will contain that information.

The spec is not very long or complicated, so I can post the whole thing here. Slight (obvious) edits to protect the not so innocent.

The adduser in the %pre section produces:
/usr/sbin/adduser: No Such file or directory
and then each file generates a no such user or group error.

Here is the spec
---

Name:           phil
Version:        1
Release:        1%{?dist}
Summary:        Phil's profiles and ssh files
BuildArch:      noarch
Group:          System Environment/Shells
License:        GPL
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source:         %{name}-%{version}_%{release}.tgz

Requires:       tcsh

%description
Phil's profiles and ssh files

%pre
%{_sbindir}/useradd -c "Phil Meyer" -u 4330 -g 20 -s /bin/tcsh -m pmeyer
%{_sbindir}/usermod -p '$XRDSERDESERDz1yMs0mIxRTwQFBm4V99.' pmeyer
grep pmeyer /etc/sudoers >/dev/null
if [ $? != 0 ]
       then
       echo 'pmeyer    ALL=(ALL)       ALL' >> /etc/sudoers
fi
exit 0


%prep
%setup -q


%build

%install
rm -rf $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT/tmp
cp -a home $RPM_BUILD_ROOT


%clean
rm -rf $RPM_BUILD_ROOT


%postun
grep pmeyer /etc/sudoers > /dev/null
if [ $? = 0 ]
       then
       ed /etc/sudoers <<_EOF
g/pmeyer/s//#-ReMoveMe/g
w
q
_EOF
fi
%{_sbindir}/userdel -fr pmeyer
exit 0

%files
%defattr(-,pmeyer,games,-)
/home/pmeyer
%doc

%changelog
* Thu Feb 1 2006 Phil Meyer <phil.meyer@xxxxxxxx> 1.0-1
- Cleanup of spec file


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux