Discussion:
cleaning up %install section
Aaron Lippold
2007-06-25 15:08:23 UTC
Permalink
Hello,

I was hoping I could get some advise on making my %install section a
bit more efficient. I would guess there is a smarter way to handle my
file set then individually calling out each file.

I basically have to do the same operation on each one, accounting for
the slight name change. Also, I am going to be adding new 'sets' :
TypeA, TypeB, etc. Right now my rpm just does TypeA. How do I add
switches to my rpm -ihv --typea or rpm -ihv --type:A,C,E .

Suggestions? Comment?

Thanks,

Aaron
Hiren Patel
2007-06-25 15:23:52 UTC
Permalink
you could put all the files into one tarball and then manipulate them
using shell file globs.
i have no idea what you are talking about with the sets.
Post by Aaron Lippold
Hello,
I was hoping I could get some advise on making my %install section a
bit more efficient. I would guess there is a smarter way to handle my
file set then individually calling out each file.
I basically have to do the same operation on each one, accounting for
TypeA, TypeB, etc. Right now my rpm just does TypeA. How do I add
switches to my rpm -ihv --typea or rpm -ihv --type:A,C,E .
Suggestions? Comment?
Thanks,
Aaron
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
--
Hiren Patel | Ops Specialist | ISS Infrastructure | Telkom
E-Mail: ***@telkom.co.za Office: +27 12 680 3460 | Fax: +27 12 680
3299 | Cell: +27 73 456 7980

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This e-mail and its contents are subject to the Telkom SA Limited
e-mail legal notice available at
http://www.telkom.co.za/TelkomEMailLegalNotice.PDF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Aaron Lippold
2007-06-25 16:33:01 UTC
Permalink
I am registering a set of files in a db. Some users only need the
first set of files, some need all the files from each set in the db. I
want to allow the option to say, 'I need set1 and set3' etc. etc.

MyFiles/Set1/file1.1,file1.2,file1.3,...
.../Set2/file2.1,2.2,2.3,...
../Set3/file3.1,3.2,3.3,...

If they user only wants to install the files in Set1 I want to have an
option/switch they can pass to say,

rpm -ihv --install-set1 --install-set3 my.rpm

What did you mean by, 'shell file globs'? File Globals?

Aaron
Post by Hiren Patel
you could put all the files into one tarball and then manipulate them
using shell file globs.
i have no idea what you are talking about with the sets.
Post by Aaron Lippold
Hello,
I was hoping I could get some advise on making my %install section a
bit more efficient. I would guess there is a smarter way to handle my
file set then individually calling out each file.
I basically have to do the same operation on each one, accounting for
TypeA, TypeB, etc. Right now my rpm just does TypeA. How do I add
switches to my rpm -ihv --typea or rpm -ihv --type:A,C,E .
Suggestions? Comment?
Thanks,
Aaron
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
--
Hiren Patel | Ops Specialist | ISS Infrastructure | Telkom
3299 | Cell: +27 73 456 7980
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This e-mail and its contents are subject to the Telkom SA Limited
e-mail legal notice available at
http://www.telkom.co.za/TelkomEMailLegalNotice.PDF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Jos Vos
2007-06-25 16:37:45 UTC
Permalink
Post by Aaron Lippold
I am registering a set of files in a db. Some users only need the
first set of files, some need all the files from each set in the db. I
want to allow the option to say, 'I need set1 and set3' etc. etc.
MyFiles/Set1/file1.1,file1.2,file1.3,...
.../Set2/file2.1,2.2,2.3,...
../Set3/file3.1,3.2,3.3,...
If they user only wants to install the files in Set1 I want to have an
option/switch they can pass to say,
rpm -ihv --install-set1 --install-set3 my.rpm
You could split the RPM into subpackages, each containing one "set".
--
-- Jos Vos <***@xos.nl>
-- X/OS Experts in Open Systems BV | Phone: +31 20 6938364
-- Amsterdam, The Netherlands | Fax: +31 20 6948204
Aaron Lippold
2007-06-25 23:03:50 UTC
Permalink
Yes that's true but I was hoping to only have to maintain one .spec
file and such. Ah well, maybe the KISS approach is best in this case.

Also, is there a way I can define a "function" in my spec file?

Aaron
Post by Jos Vos
Post by Aaron Lippold
I am registering a set of files in a db. Some users only need the
first set of files, some need all the files from each set in the db. I
want to allow the option to say, 'I need set1 and set3' etc. etc.
MyFiles/Set1/file1.1,file1.2,file1.3,...
.../Set2/file2.1,2.2,2.3,...
../Set3/file3.1,3.2,3.3,...
If they user only wants to install the files in Set1 I want to have an
option/switch they can pass to say,
rpm -ihv --install-set1 --install-set3 my.rpm
You could split the RPM into subpackages, each containing one "set".
--
-- X/OS Experts in Open Systems BV | Phone: +31 20 6938364
-- Amsterdam, The Netherlands | Fax: +31 20 6948204
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
marks
2007-06-25 23:34:41 UTC
Permalink
Hi,

I believe you can define sub-packages all within one .spec file. You'd
then have only one spec file to maintain although it would be more
complex.
Date: Tue, 26 Jun 2007 01:03:50 +0200
Subject: Re: cleaning up %install section
Yes that's true but I was hoping to only have to maintain one .spec
file and such. Ah well, maybe the KISS approach is best in this case.
Also, is there a way I can define a "function" in my spec file?
Aaron
Post by Jos Vos
Post by Aaron Lippold
I am registering a set of files in a db. Some users only need the
first set of files, some need all the files from each set in the db. I
want to allow the option to say, 'I need set1 and set3' etc. etc.
MyFiles/Set1/file1.1,file1.2,file1.3,...
.../Set2/file2.1,2.2,2.3,...
../Set3/file3.1,3.2,3.3,...
If they user only wants to install the files in Set1 I want to have an
option/switch they can pass to say,
rpm -ihv --install-set1 --install-set3 my.rpm
You could split the RPM into subpackages, each containing one "set".
--
-- X/OS Experts in Open Systems BV | Phone: +31 20 6938364
-- Amsterdam, The Netherlands | Fax: +31 20 6948204
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
Thanks,

Mark Sincerbox
Adax, Inc.
1-510-548-7047 x129
Hiren Patel
2007-06-26 06:19:45 UTC
Permalink
i agree with the other folks on using multiple rpms, one source rpm can
produce multiple binary rpms, so you would only have to maintain one
spec file/source rpm.

by shell file globs i mean working with files using wildcards such as:
mv *.db /some/place
somecommand /some/place/*.db
mv *.cert /some/place

etc.
Post by Aaron Lippold
I am registering a set of files in a db. Some users only need the
first set of files, some need all the files from each set in the db. I
want to allow the option to say, 'I need set1 and set3' etc. etc.
MyFiles/Set1/file1.1,file1.2,file1.3,...
.../Set2/file2.1,2.2,2.3,...
../Set3/file3.1,3.2,3.3,...
If they user only wants to install the files in Set1 I want to have an
option/switch they can pass to say,
rpm -ihv --install-set1 --install-set3 my.rpm
What did you mean by, 'shell file globs'? File Globals?
Aaron
Post by Hiren Patel
you could put all the files into one tarball and then manipulate them
using shell file globs.
i have no idea what you are talking about with the sets.
Post by Aaron Lippold
Hello,
I was hoping I could get some advise on making my %install section a
bit more efficient. I would guess there is a smarter way to handle my
file set then individually calling out each file.
I basically have to do the same operation on each one, accounting for
TypeA, TypeB, etc. Right now my rpm just does TypeA. How do I add
switches to my rpm -ihv --typea or rpm -ihv --type:A,C,E .
Suggestions? Comment?
Thanks,
Aaron
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
--
Hiren Patel | Ops Specialist | ISS Infrastructure | Telkom
3299 | Cell: +27 73 456 7980
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This e-mail and its contents are subject to the Telkom SA Limited
e-mail legal notice available at
http://www.telkom.co.za/TelkomEMailLegalNotice.PDF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
Rpm-list mailing list
https://www.redhat.com/mailman/listinfo/rpm-list
--
Hiren Patel | Ops Specialist | ISS Infrastructure | Telkom
E-Mail: ***@telkom.co.za Office: +27 12 680 3460 | Fax: +27 12 680
3299 | Cell: +27 73 456 7980

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This e-mail and its contents are subject to the Telkom SA Limited
e-mail legal notice available at
http://www.telkom.co.za/TelkomEMailLegalNotice.PDF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Loading...