FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > RPM Package Manager

 
 
LinkBack Thread Tools
 
Old 01-04-2008, 11:18 AM
"ed"
 
Default puzzled, gives file but does not make files/directories

Goodday all.

I do not get it. Here is my spec file, which does do a
proper build.
Well at least, so it seems. But why the files and
directories are
not made from this rpm is puzzling me for weeks now. The
build
on the system goes well, but the rpm install on the target
does nothing
except the requested configuration file, but there is more.

System RH EL5 and there is of course a buildroot, and the
build enviroment
seems to be proper ( rpmbuild -ba -bb etc does not complain
)

Anyone has a pointer or hint to put me in the right
direction ?

regards, and best wishes for 2008, Ed de la Rie

xxxxx.spec

Name: xxxxx
Version: 0.4
Release: 0%
Source0: xxxxx.tar
BuildRoot: /var/tmp/buildroot-%{name}-%{version}

%description
This does something usefull

%prep

%setup -q -c

%build

%install

mkdir -p $RPM_BUILD_ROOT/var/lib/xxxxx
mkdir -p $RPM_BUILD_ROOT/var/log/xxxxx
touch $RPM_BUILD_ROOT/var/log/xxxxx-configure.log
chmod 600 $RPM_BUILD_ROOT/var/log/xxxxx
chmod 640 $RPM_BUILD_ROOT/var/log/xxxxx-configure.log

mkdir -p $RPM_BUILD_ROOT/etc/xxxxx/confs
mkdir -p $RPM_BUILD_ROOT/etc/xxxxx/ca.d
mkdir -p $RPM_BUILD_ROOT/etc/xxxxx/key.d
mkdir -p $RPM_BUILD_ROOT/etc/xxxxx/cert.d

cp /etc/pki/tls/private/*.key /etc/xxxxx/key.d
cp /etc/pki/tls/certs/*.crt /etc/xxxxx/cert.d
cp /etc/pki/certs/cacert.crt /etc/xxxxx/cert.d

openssl x509 -noout -hash -in /etc/xxxxx/cert.d/cacert.crt >
/etc/xxxxx/hash.txt
echo $(cat /etc/xxxxx/hash.txt).0 > /etc/xxxxx/hash.0.txt
ln -s /etc/xxxxx/cert.d/cacert.pem $(cat
/etc/xxxxx/hash.0.txt)


cat $RPM_SOURCE_DIR/xxxxx.tar | tar xvvf -

cp -r * $RPM_BUILD_ROOT
install -m644 %{SOURCE0} -D %{buildroot}/xxxxx.conf
%files
%attr(-,root,root)
/etc/xxxxx/xxxxx.conf

%post

sh /etc/init.d/xxxxx reload || true

%check
/bin/true

%clean

cat << EOF

System installed

EOF

%changelog
* Tue Dec 04 2007 Ed
- Version 0.3 prelimenary

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 01-04-2008, 11:33 AM
Valery Reznic
 
Default puzzled, gives file but does not make files/directories

--- ed <ed@solict.com> wrote:

> Goodday all.
>
> I do not get it. Here is my spec file, which does do
> a
> proper build.
> Well at least, so it seems. But why the files and
> directories are
> not made from this rpm is puzzling me for weeks now.
> The
> build
> on the system goes well, but the rpm install on the
> target
> does nothing
> except the requested configuration file, but there
> is more.
>
> System RH EL5 and there is of course a buildroot,
> and the
> build enviroment
> seems to be proper ( rpmbuild -ba -bb etc does not
> complain
> )
>
> Anyone has a pointer or hint to put me in the right
> direction ?
>
> regards, and best wishes for 2008, Ed de la Rie
>
> xxxxx.spec
>
> Name: xxxxx
> Version: 0.4
> Release: 0%
> Source0: xxxxx.tar
> BuildRoot:
> /var/tmp/buildroot-%{name}-%{version}
>
> %description
> This does something usefull
>
> %prep
>
> %setup -q -c
>
> %build
>
> %install
>
> mkdir -p $RPM_BUILD_ROOT/var/lib/xxxxx
> mkdir -p $RPM_BUILD_ROOT/var/log/xxxxx
> touch
> $RPM_BUILD_ROOT/var/log/xxxxx-configure.log
> chmod 600 $RPM_BUILD_ROOT/var/log/xxxxx
> chmod 640
> $RPM_BUILD_ROOT/var/log/xxxxx-configure.log
>
> mkdir -p $RPM_BUILD_ROOT/etc/xxxxx/confs
> mkdir -p $RPM_BUILD_ROOT/etc/xxxxx/ca.d
> mkdir -p $RPM_BUILD_ROOT/etc/xxxxx/key.d
> mkdir -p $RPM_BUILD_ROOT/etc/xxxxx/cert.d
>
> cp /etc/pki/tls/private/*.key /etc/xxxxx/key.d
> cp /etc/pki/tls/certs/*.crt /etc/xxxxx/cert.d
> cp /etc/pki/certs/cacert.crt /etc/xxxxx/cert.d
>
> openssl x509 -noout -hash -in
> /etc/xxxxx/cert.d/cacert.crt >
> /etc/xxxxx/hash.txt
> echo $(cat /etc/xxxxx/hash.txt).0 >
> /etc/xxxxx/hash.0.txt
> ln -s /etc/xxxxx/cert.d/cacert.pem $(cat
> /etc/xxxxx/hash.0.txt)
>
>
> cat $RPM_SOURCE_DIR/xxxxx.tar | tar xvvf
> -
>
> cp -r * $RPM_BUILD_ROOT
> install -m644 %{SOURCE0} -D %{buildroot}/xxxxx.conf
> %files
> %attr(-,root,root)
> /etc/xxxxx/xxxxx.conf

Files section specified which files should be packed.
You specify only one file, so it's only file in your
rpm.

Valery

>
> %post
>
> sh /etc/init.d/xxxxx reload || true
>
> %check
> /bin/true
>
> %clean
>
> cat << EOF
>
> System installed
>
> EOF
>
> %changelog
> * Tue Dec 04 2007 Ed
> - Version 0.3 prelimenary
>
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@redhat.com
> https://www.redhat.com/mailman/listinfo/rpm-list
>



__________________________________________________ __________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 01-05-2008, 02:18 AM
"Paul Johnson"
 
Default puzzled, gives file but does not make files/directories

Shouldn't this:

cp /etc/pki/tls/private/*.key /etc/xxxxx/key.d

be

cp /etc/pki/tls/private/*.key $RPM_BUILD_ROOT/etc/xxxxx/key.d

How else do you expect your files to get into the staging area?

Actually, I don't see how your build was succeeding at all, since you
are writing into /etc. You are not building this as root, are you?

rpmbuild would fail with "installed but unpackaged files found", I
think, unless you did something that intentionally disabled that.

pj

--
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 01-07-2008, 07:03 AM
"ed"
 
Default puzzled, gives file but does not make files/directories

hmm, I did build this as root.
Guess this needs some re-work.

Thanks for the help

----- Original Message Follows -----
From: "Paul Johnson" <pauljohn32@gmail.com>
To: "RPM Package Manager" <rpm-list@redhat.com>
Subject: Re: puzzled, gives file but does not make
files/directories
Date: Fri, 4 Jan 2008 21:18:54 -0600

> Shouldn't this:
>
> cp /etc/pki/tls/private/*.key /etc/xxxxx/key.d
>
> be
>
> cp /etc/pki/tls/private/*.key
> $RPM_BUILD_ROOT/etc/xxxxx/key.d
>
> How else do you expect your files to get into the staging
> area?
>
> Actually, I don't see how your build was succeeding at
> all, since you are writing into /etc. You are not
> building this as root, are you?
>
> rpmbuild would fail with "installed but unpackaged files
> found", I think, unless you did something that
> intentionally disabled that.
>
> pj
>
> --
> Paul E. Johnson
> Professor, Political Science
> 1541 Lilac Lane, Room 504
> University of Kansas
>
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@redhat.com
> https://www.redhat.com/mailman/listinfo/rpm-list

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 

Thread Tools




All times are GMT. The time now is 08:24 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org