From brian at interlinx.bc.ca Wed Feb 1 00:15:53 2012 From: brian at interlinx.bc.ca (Brian J. Murrell) Date: Tue, 31 Jan 2012 19:15:53 -0500 Subject: how to effect "Conflicts: %{name}-foo != %{version}-%{release}" Message-ID: Let's say I am repackaging an RPM (called foo) supplied by my distro vendor which has the following packages: foo-ui foo-tools and my repackaging is to separate out foo-tools into foo-tools and foo-devel. First I bump the Release: ever so minor by just tacking a ".01" onto the end of it so that my package will "upgrade" the vendor package but the next vendor package should upgrade mine (by which time, with any luck, they have incorporated my -devel packing patch). In my new foo-devel subpackage I put: %package devel Summary: devel for foo Group: ... %description python provides devel bits And add a %files for foo-devel and change the %files for foo-tools to remove the files I put into foo-devel. But I want to provide a smooth downgrade path to vendor's original package, so I want to have the vendor's foo-tools remove my foo-devel. The solution that came to mind immediately was to put a: Conflicts: %{name}-tools != %{version}-%{release} into my foo-devel package's specification. That way, when any other version of foo-tools installs, it will conflict with my packages foo-devel and (I think/hope) remove it. But of course "!=" is not a legal operator. How else can I achieve my goal though? It goes without say that I cannot do anything with the vendor's release of the foo-* packages since that toothpaste is already out of the tube. Cheers, b. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 262 bytes Desc: OpenPGP digital signature URL: From red.cricket.blog at gmail.com Tue Feb 14 22:25:11 2012 From: red.cricket.blog at gmail.com (Red Cricket) Date: Tue, 14 Feb 2012 14:25:11 -0800 Subject: Use perl or csh or tcl from inside the spec file? Message-ID: I could of sworn there was a way to do something like this ... %install #!/usr/SD/perl/bin/perl my $DESTDIR=$ENV{'RPM_BUILD_ROOT'); my $VAS_STOW_TOP = "."; my $LICENSE_DIRNAME = "/etc/opt/quest/vas/.licenses"; my $LICENSE_FILENAME = "QAS-100-813-787.txt"; But obviously that is not right as rpmbuild fails with this message: /var/tmp/rpm-tmp.5HpWke: line 28: syntax error near unexpected token `)' error: Bad exit status from /var/tmp/rpm-tmp.5HpWke (%install) Isn't a way to use something besides /bin/sh inside the spec file? Thanks! From sberg at mississippi.com Tue Feb 14 23:00:08 2012 From: sberg at mississippi.com (Steve Berg) Date: Tue, 14 Feb 2012 17:00:08 -0600 Subject: Use perl or csh or tcl from inside the spec file? In-Reply-To: References: Message-ID: <4F3AE778.5020900@mississippi.com> On 02/14/2012 04:25 PM, Red Cricket wrote: > I could of sworn there was a way to do something like this ... > > %install #!/usr/SD/perl/bin/perl > my $DESTDIR=$ENV{'RPM_BUILD_ROOT'); > my $VAS_STOW_TOP = "."; > my $LICENSE_DIRNAME = "/etc/opt/quest/vas/.licenses"; > my $LICENSE_FILENAME = "QAS-100-813-787.txt"; > > But obviously that is not right as rpmbuild fails with this message: > > > /var/tmp/rpm-tmp.5HpWke: line 28: syntax error near unexpected token `)' > error: Bad exit status from /var/tmp/rpm-tmp.5HpWke (%install) > > Isn't a way to use something besides /bin/sh inside the spec file? > Not that I know the answer but you have { followed by a ). That ain't gonna get it in any language. From pmatilai at laiskiainen.org Wed Feb 15 06:53:43 2012 From: pmatilai at laiskiainen.org (Panu Matilainen) Date: Wed, 15 Feb 2012 08:53:43 +0200 Subject: Use perl or csh or tcl from inside the spec file? In-Reply-To: References: Message-ID: <4F3B5677.4070607@laiskiainen.org> On 02/15/2012 12:25 AM, Red Cricket wrote: > I could of sworn there was a way to do something like this ... > > %install #!/usr/SD/perl/bin/perl > my $DESTDIR=$ENV{'RPM_BUILD_ROOT'); > my $VAS_STOW_TOP = "."; > my $LICENSE_DIRNAME = "/etc/opt/quest/vas/.licenses"; > my $LICENSE_FILENAME = "QAS-100-813-787.txt"; > > But obviously that is not right as rpmbuild fails with this message: > > > /var/tmp/rpm-tmp.5HpWke: line 28: syntax error near unexpected token `)' > error: Bad exit status from /var/tmp/rpm-tmp.5HpWke (%install) > > Isn't a way to use something besides /bin/sh inside the spec file? Not really. For install-time scripts like %post etc you can specify an alternative interpreter with eg "%post -p /usr/bin/perl" but that doesn't work for the build-time scripts. Technically you can change the shell used for building by overriding %___build_shell but rpmbuild assumes a Bourne shell compatible shell, and if it's changed to something else, not a whole lot is going to work. What you can do is have the other-language scripts as separate sources, and then explicitly run those. Eg Source10: my-install.pl %install /usr/SD/perl/bin/perl %{SOURCE10} Creating them in-place with here-documents and running that also works. - Panu - From pmatilai at laiskiainen.org Wed Feb 15 06:57:25 2012 From: pmatilai at laiskiainen.org (Panu Matilainen) Date: Wed, 15 Feb 2012 08:57:25 +0200 Subject: how to effect "Conflicts: %{name}-foo != %{version}-%{release}" In-Reply-To: References: Message-ID: <4F3B5755.70106@laiskiainen.org> On 02/01/2012 02:15 AM, Brian J. Murrell wrote: > Let's say I am repackaging an RPM (called foo) supplied by my distro > vendor which has the following packages: > > foo-ui > foo-tools > > and my repackaging is to separate out foo-tools into foo-tools and > foo-devel. First I bump the Release: ever so minor by just tacking a > ".01" onto the end of it so that my package will "upgrade" the vendor > package but the next vendor package should upgrade mine (by which time, > with any luck, they have incorporated my -devel packing patch). > > In my new foo-devel subpackage I put: > > %package devel > Summary: devel for foo > Group: ... > > %description python > provides devel bits > > And add a %files for foo-devel and change the %files for foo-tools to > remove the files I put into foo-devel. > > But I want to provide a smooth downgrade path to vendor's original > package, so I want to have the vendor's foo-tools remove my foo-devel. > The solution that came to mind immediately was to put a: > > Conflicts: %{name}-tools != %{version}-%{release} > > into my foo-devel package's specification. That way, when any other > version of foo-tools installs, it will conflict with my packages > foo-devel and (I think/hope) remove it. Conflicts are not typically automatically removed (obsoletes are), they need manual resolution. > > But of course "!=" is not a legal operator. > > How else can I achieve my goal though? It goes without say that I > cannot do anything with the vendor's release of the foo-* packages since > that toothpaste is already out of the tube. The != can be achieved with two conflicts: Conflicts: %{name}-tools < %{version}-%{release} Conflicts: %{name}-tools > %{version}-%{release} - Panu - From ravisankar.g at gmail.com Thu Feb 16 11:12:25 2012 From: ravisankar.g at gmail.com (Ravi Sankar) Date: Thu, 16 Feb 2012 16:42:25 +0530 Subject: rpm & SMACK Message-ID: HI List, Can anyone point out to me how rpm and SMACK go together? specifically I was looking at how to setup rpm packages with proper SMACK support? I found below information for SELinux. http://fedoraproject.org/wiki/PackagingDrafts/SELinux#File_contexts -- BR, Ravi Sankar Guntur. http://www.ravisankar.org.in/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From pinto.elia at gmail.com Thu Feb 16 13:17:54 2012 From: pinto.elia at gmail.com (devzero2000) Date: Thu, 16 Feb 2012 14:17:54 +0100 Subject: rpm & SMACK In-Reply-To: References: Message-ID: On Thu, Feb 16, 2012 at 12:12 PM, Ravi Sankar wrote: > HI List, > > Can anyone point out to me how rpm and SMACK go together? > > specifically I was looking at how to setup rpm packages with proper SMACK > support? > > I found below information for SELinux. > http://fedoraproject.org/wiki/PackagingDrafts/SELinux#File_contexts > > Probably you should be give a look to the project Tizen now (was meego) and the MSSF framework. They also posted some patch on rpm. For example http://www.mail-archive.com/rpm-maint at lists.rpm.org/msg01852.html hth > -- > BR, > Ravi Sankar Guntur. > http://www.ravisankar.org.in/ > > _______________________________________________ > Rpm-list mailing list > Rpm-list at lists.rpm.org > http://lists.rpm.org/mailman/listinfo/rpm-list > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ravisankar.g at gmail.com Fri Feb 17 14:30:59 2012 From: ravisankar.g at gmail.com (Ravi Sankar) Date: Fri, 17 Feb 2012 20:00:59 +0530 Subject: Rpm-list Digest, Vol 140, Issue 3 In-Reply-To: References: Message-ID: Date: Thu, 16 Feb 2012 14:17:54 +0100 > From: devzero2000 > On Thu, Feb 16, 2012 at 12:12 PM, Ravi Sankar >wrote: > > > HI List, > > > > Can anyone point out to me how rpm and SMACK go together? > > > > specifically I was looking at how to setup rpm packages with proper SMACK > > support? > > > > I found below information for SELinux. > > http://fedoraproject.org/wiki/PackagingDrafts/SELinux#File_contexts > > > > > Probably you should be give a look to the project Tizen now (was meego) and > the MSSF framework. > > They also posted some patch on rpm. For example > > http://www.mail-archive.com/rpm-maint at lists.rpm.org/msg01852.html > > hth > > > thank you very much. thats a useful start. > > > -- > > BR, > > Ravi Sankar Guntur. > > http://www.ravisankar.org.in/ > > > > _______________________________________________ > > Rpm-list mailing list > > Rpm-list at lists.rpm.org > > http://lists.rpm.org/mailman/listinfo/rpm-list > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jls at semicomplete.com Sun Feb 19 07:23:45 2012 From: jls at semicomplete.com (Jordan Sissel) Date: Sat, 18 Feb 2012 23:23:45 -0800 Subject: RPM file format questions Message-ID: Howdy! I am implementing a library for reading and writing RPM files. I've used the rpm source and from max-rpm[1] as documentation on the file format. [1] http://www.rpm.org/max-rpm/s1-rpm-file-format-rpm-file-format.html I'm thus far able to happily read older RPMs from,CentOS5 and Fedora 10 (and earlier). I am not able to correctly read RPMs from CentOS 6 and Fedora 11 (and beyond) The problem seems to be around the length of each header section (signature and regular header). With older RPMs, my calculation correctly computes the length, but for newer rpms (Fedora 11+ and CentOS6+) I am usually short by 4 bytes. This causes me a problem because I'll read the Signature header and fail when reading the next header because I'm 4 bytes behind the actual start of the next header. I have wrangled it down to a small example script that can read older rpms but fails on newer ones as described. I have also included some data and output as well in a gist found here: https://gist.github.com/1862256 If you have any pointers on how I'm reading these newer RPM files incorrectly, I'd love to know :) -Jordan -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmatilai at laiskiainen.org Sun Feb 19 11:08:52 2012 From: pmatilai at laiskiainen.org (Panu Matilainen) Date: Sun, 19 Feb 2012 13:08:52 +0200 Subject: RPM file format questions In-Reply-To: References: Message-ID: <4F40D844.1030000@laiskiainen.org> On 02/19/2012 09:23 AM, Jordan Sissel wrote: > Howdy! > > I am implementing a library for reading and writing RPM files. I've used > the rpm source and from max-rpm[1] as documentation on the file format. > > [1] http://www.rpm.org/max-rpm/s1-rpm-file-format-rpm-file-format.html > > I'm thus far able to happily read older RPMs from,CentOS5 and Fedora 10 > (and earlier). I am not able to correctly read RPMs from CentOS 6 and > Fedora 11 (and beyond) > > The problem seems to be around the length of each header section > (signature and regular header). With older RPMs, my calculation > correctly computes the length, but for newer rpms (Fedora 11+ and > CentOS6+) I am usually short by 4 bytes. > > This causes me a problem because I'll read the Signature header and fail > when reading the next header because I'm 4 bytes behind the actual start > of the next header. > > I have wrangled it down to a small example script that can read older > rpms but fails on newer ones as described. I have also included some > data and output as well in a gist found here: > > https://gist.github.com/1862256 > > If you have any pointers on how I'm reading these newer RPM files > incorrectly, I'd love to know :) The fundamental package file format hasn't changed. There's a padding between signature and regular header which your script doesn't appear to take signature header padding into account, so you've basically just been lucky if you haven't been hit by that with older rpms. See eg http://rpm.org/gitweb?p=rpm.git;a=blob;f=lib/signature.c;h=63e59c00f255a538e48cbc8b0cf3b9bd4a4dbd56;hb=HEAD#l203 how to calculate the pad, or alternatively if you prefer reading obscure shell-script to C: http://rpm.org/gitweb?p=rpm.git;a=blob;f=scripts/rpm2cpio.sh;h=b03ee361f7f6948c979195eefc50295aa8fa0cf7;hb=HEAD - Panu - From jls at semicomplete.com Sun Feb 19 20:18:53 2012 From: jls at semicomplete.com (Jordan Sissel) Date: Sun, 19 Feb 2012 12:18:53 -0800 Subject: RPM file format questions In-Reply-To: <4F40D844.1030000@laiskiainen.org> References: <4F40D844.1030000@laiskiainen.org> Message-ID: On Sun, Feb 19, 2012 at 3:08 AM, Panu Matilainen wrote: > On 02/19/2012 09:23 AM, Jordan Sissel wrote: > >> Howdy! >> >> I am implementing a library for reading and writing RPM files. I've used >> the rpm source and from max-rpm[1] as documentation on the file format. >> >> [1] http://www.rpm.org/max-rpm/s1-**rpm-file-format-rpm-file-** >> format.html >> >> I'm thus far able to happily read older RPMs from,CentOS5 and Fedora 10 >> (and earlier). I am not able to correctly read RPMs from CentOS 6 and >> Fedora 11 (and beyond) >> >> The problem seems to be around the length of each header section >> (signature and regular header). With older RPMs, my calculation >> correctly computes the length, but for newer rpms (Fedora 11+ and >> CentOS6+) I am usually short by 4 bytes. >> >> This causes me a problem because I'll read the Signature header and fail >> when reading the next header because I'm 4 bytes behind the actual start >> of the next header. >> >> I have wrangled it down to a small example script that can read older >> rpms but fails on newer ones as described. I have also included some >> data and output as well in a gist found here: >> >> https://gist.github.com/**1862256 >> >> If you have any pointers on how I'm reading these newer RPM files >> incorrectly, I'd love to know :) >> > > The fundamental package file format hasn't changed. There's a padding > between signature and regular header which your script doesn't appear to > take signature header padding into account, so you've basically just been > lucky if you haven't been hit by that with older rpms. > > See eg http://rpm.org/gitweb?p=rpm.**git;a=blob;f=lib/signature.c;**h=** > 63e59c00f255a538e48cbc8b0cf3b9**bd4a4dbd56;hb=HEAD#l203how to calculate the pad, or alternatively if you prefer reading obscure > shell-script to C: > http://rpm.org/gitweb?p=rpm.**git;a=blob;f=scripts/rpm2cpio.**sh;h=** > b03ee361f7f6948c979195eefc5029**5aa8fa0cf7;hb=HEAD > > - Panu - Ahha, that's what I was missing. I have working sample code now with to this information. Thanks :) -Jordan -------------- next part -------------- An HTML attachment was scrubbed... URL: From drsalists at gmail.com Mon Feb 20 20:18:36 2012 From: drsalists at gmail.com (Dan Stromberg) Date: Mon, 20 Feb 2012 12:18:36 -0800 Subject: /bin/bsh auto-dependency? Message-ID: I'm putting together an rpm for RHEL, at later SLES. My .spec looks like (with some specifics genericised for sharing): Summary: Set up some stuff Name: foo Version: 0.4 Release: 1 License: Unknown Group: System Environment/Base Source: /pri URL: None Distribution: None Vendor: Us Packager: Me BuildArch: noarch Requires: bash >= 3, python >= 2.5, coreutils #%__find_requires: /bin/true %description Just do some stuff. %files /pri/sec %post /pri/sec/ter I'm quite unaware of having requested /bin/bsh as a depedency, so I suppose it's being added automatically somehow. Oddly, I don't have a /bin/bsh on my systems. I've tried this on RHEL 6.0 and Ubuntu 11.04, using the same specfile. Both do the magic /bin/bsh to me. Any suggestions? -------------- next part -------------- An HTML attachment was scrubbed... URL: From valery_reznic at yahoo.com Tue Feb 21 05:55:59 2012 From: valery_reznic at yahoo.com (Valery Reznic) Date: Mon, 20 Feb 2012 21:55:59 -0800 (PST) Subject: /bin/bsh auto-dependency? In-Reply-To: References: Message-ID: <1329803759.38627.YahooMailNeo@web110303.mail.gq1.yahoo.com> I guess oone of your script has shebang '#!/bin/bsh'. May be misspelled '#!/bin/bash' Valery. >________________________________ > From: Dan Stromberg >To: rpm-list at lists.rpm.org >Sent: Monday, February 20, 2012 10:18 PM >Subject: /bin/bsh auto-dependency? > > > >I'm putting together an rpm for RHEL, at later SLES. > >My .spec looks like (with some specifics genericised for sharing): > >Summary: Set up some stuff >Name: foo >Version: 0.4 >Release: 1 >License: Unknown >Group: System Environment/Base >Source: /pri >URL: None >Distribution: None >Vendor: Us >Packager: Me >BuildArch: noarch >Requires: bash >= 3, python >= 2.5, coreutils > >#%__find_requires: /bin/true > >%description >Just do some stuff. > >%files >/pri/sec > >%post >/pri/sec/ter > >I'm quite unaware of having requested /bin/bsh as a depedency, so I suppose it's being added automatically somehow.? Oddly, I don't have a /bin/bsh on my systems. > >I've tried this on RHEL 6.0 and Ubuntu 11.04, using the same specfile.? Both do the magic /bin/bsh to me. > >Any suggestions? > > > >_______________________________________________ >Rpm-list mailing list >Rpm-list at lists.rpm.org >http://lists.rpm.org/mailman/listinfo/rpm-list > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From drsalists at gmail.com Wed Feb 22 01:23:57 2012 From: drsalists at gmail.com (Dan Stromberg) Date: Tue, 21 Feb 2012 17:23:57 -0800 Subject: /bin/bsh auto-dependency? In-Reply-To: <1329803759.38627.YahooMailNeo@web110303.mail.gq1.yahoo.com> References: <1329803759.38627.YahooMailNeo@web110303.mail.gq1.yahoo.com> Message-ID: That was it. Thanks! On Mon, Feb 20, 2012 at 9:55 PM, Valery Reznic wrote: > I guess oone of your script has shebang '#!/bin/bsh'. May be misspelled > '#!/bin/bash' > > Valery. > > ------------------------------ > *From:* Dan Stromberg > *To:* rpm-list at lists.rpm.org > *Sent:* Monday, February 20, 2012 10:18 PM > *Subject:* /bin/bsh auto-dependency? > > > I'm putting together an rpm for RHEL, at later SLES. > > My .spec looks like (with some specifics genericised for sharing): > Summary: Set up some stuff > Name: foo > Version: 0.4 > Release: 1 > License: Unknown > Group: System Environment/Base > Source: /pri > URL: None > Distribution: None > Vendor: Us > Packager: Me > BuildArch: noarch > Requires: bash >= 3, python >= 2.5, coreutils > > #%__find_requires: /bin/true > > %description > Just do some stuff. > > %files > /pri/sec > > %post > /pri/sec/ter > > I'm quite unaware of having requested /bin/bsh as a depedency, so I > suppose it's being added automatically somehow. Oddly, I don't have a > /bin/bsh on my systems. > > I've tried this on RHEL 6.0 and Ubuntu 11.04, using the same specfile. > Both do the magic /bin/bsh to me. > > Any suggestions? > > > > _______________________________________________ > Rpm-list mailing list > Rpm-list at lists.rpm.org > http://lists.rpm.org/mailman/listinfo/rpm-list > > > > _______________________________________________ > Rpm-list mailing list > Rpm-list at lists.rpm.org > http://lists.rpm.org/mailman/listinfo/rpm-list > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz at tasz.eu Thu Feb 23 11:21:56 2012 From: lukasz at tasz.eu (=?UTF-8?B?xYF1a2FzeiBUYXN6?=) Date: Thu, 23 Feb 2012 12:21:56 +0100 Subject: upgrade from rpm 4.4 to 4.8 Message-ID: Welcome all list users! In our project we are using rpmbuild to package our software and provide it as rpm. We are planing to upgrade from rpm 4.4 to 4.8. To build our rpm, I'm creating custom rpmmacros which is sourced in custom rpmrc which is passed with --rcfile option. rpmrc is like: include: globalrcfile macrofiles: globalmacros:myCustomMacroFile I foundout this mechanism does not work for rpm 4.8, looks like macrofiles is ignored at all. I tried to use --macros but lot of the global macros, variables, was not prepared correctly. My requirement is to set, overwrite some global macros, but I require mechanism which works under 4.4 and 4.8. I tried to use --define which works fine in case of simple variables, but when I owervrite e.g %debug_package command line call is not acceptable, anyway it leads to some escaping issue. thanks a lot for suggestions best regards Lukasz -- ?ukasz Tasz -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukasz at tasz.eu Thu Feb 23 11:03:05 2012 From: lukasz at tasz.eu (=?UTF-8?B?xYF1a2FzeiBUYXN6?=) Date: Thu, 23 Feb 2012 12:03:05 +0100 Subject: upgrade from rpm 4.4 to 4.8 Message-ID: Welcome all list users! In our project we are using rpmbuild to package our software and provide it as rpm. We are planing to upgrade from rpm 4.4 to 4.8. To build our rpm, I'm creating custom rpmmacros which is sourced in custom rpmrc which is passed with --rcfile option. rpmrc is like: include: globalrcfile macrofiles: globalmacros:myCustomMacroFile I foundout this mechanism does not work for rpm 4.8, looks like macrofiles is ignored at all. I tried to use --macros but lot of the global macros, variables, was not prepared correctly. My requirement is to set, overwrite some global macros, but I require mechanism which works under 4.4 and 4.8. I tried to use --define which works fine in case of simple variables, but when I owervrite e.g %debug_package command line call is not acceptable, anyway it leads to some escaping issue. thanks a lot for suggestions best regards Lukasz -- ?ukasz Tasz -------------- next part -------------- An HTML attachment was scrubbed... URL: