Spec URL: http://www.the-silvas.com/rpmrebuild.spec SRPM URL: http://www.the-silvas.com/rpmrebuild-2.1.1-2.src.rpm Description: You have an installed package on a computer, want to install on other one, and do not find the rpm file anymore. Or you want to distribute your customization in an rpm format this tool is for you. A few extra notes: --- This is my first package, and I need a sponsor. --- Output from rpmlint: W: rpmrebuild hidden-file-or-dir /usr/lib/rpmrebuild/.popt E: rpmrebuild only-non-binary-in-usr-lib W: rpmrebuild dangerous-command-in-%postun rm --- The Error are related to some shell scripts that go into the rpmrebuild directory, which seems consistent with the way rpm-4.x package is distributed.
-/+ rpmlint ran. Errors found but rpm does have the 'dangerous command' note. the hidden file looks as if it is needed. The only-non-binary-in-usr-lib worries me a bit ... + package name is correct + spec name is correct + accepted license - Looks like it's actually GPLv2+ - license not in %doc (commented out) + US English spec + Readable spec + Source is same as upstream + built and installed on i386 + Deps look sane + No locale files + no .so files + not relocateable + no duplicate files + perms look sane + clean is good + macros in use + contains code and OK content -/+ %doc missing ... but doesn't look like it affects the code + doesn't own files/dirs in other packages + install cleans first - the descirption seems a bit odd. Maybe the following (from the rpmrebuild site) would suite it: rpmrebuild is a tool to build an RPM file from a package that has already been installed in a basic use, rpmrebuild use do not require any rpm building knowledge + tested locally and worked
fixed the following items: - Looks like it's actually GPLv2+ - license not in %doc (commented out) -/+ %doc missing ... but doesn't look like it affects the code
New src RPM posted: http://www.the-silvas.com/rpmrebuild-2.1.1-3.src.rpm
+ license is correct + license in %doc (COPYING) - description makes more sense but ... <snip> E: rpmrebuild description-line-too-long in a basic use, rpmrebuild use do not require any rpm building knowledgethis tool is for you. <snip> Changing the description to the following fixes this: %description A tool to build an RPM file from a package that has already been installed in a basic use, rpmrebuild use do not require any rpm building knowledge.
description fixed. http://www.the-silvas.com/rpmrebuild-2.1.1-4.src.rpm http://www.the-silvas.com/rpmrebuild.spec updated.
Description looks good! It looks good to me. Since you are a first time contributor I can not pass your review but hopefully a sponsor will pop by and run through.
Some remarks: * Your %install references /usr/lib/rpmrebuild/rpmrebuild_parser.src while your %files contains: %{_libdir}/rpmrebuild/rpmrebuild_parser.src This doesn't make a visible difference because your package is "noarch", nevertheless this is inconsistent. * The block-delete-/bin/sh magic in %postun can be replaced with a one-line sed-call: sed -e '/RPMREBUILD START/,/RPMREBUILD END/d' ...
Cool Thanks Ralf. I have fixed your recommendations. New spec at: http://www.the-silvas.com/rpmrebuild.spec New srpm at: http://www.the-silvas.com/rpmrebuild-2.1.1-5.src.rpm
You should mention in the spec that the tarball is from http://downloads.sourceforge.net/rpmrebuild/rpmrebuild-2.1.1-1rpm4.src.rpm Or maybe even using above URL as Source0: works. See: http://fedoraproject.org/wiki/Packaging/SourceURL Also maybe you should use %setup -q -n rpmrebuild instead of %setup -c rpmrebuild. Or extract the src.rpm from above URL with rpmdev-extract instead of extracting the tarball manually before you add it to the srpm. Which is imho the preferred way.
I forgot, you need to follow http://fedoraproject.org/wiki/PackageMaintainers/Join since the Fedora Account System seems not to know you. I already made this bug blocking FE-NEEDSPONSOR.
Till, I havent made the account yet because the docs says only to make an account once I have a sponsor. Thanks, AS
Packages updated: http://www.the-silvas.com/rpmrebuild.spec http://www.the-silvas.com/rpmrebuild-2.1.1-6.src.rpm My comments: - I've read http://fedoraproject.org/wiki/PackageMaintainers/Join. There it states: "Create an account in the Fedora Account System *when you have found a sponsor and got your package approved*" - My package haven't gotten a sponsor and I my package hasn't been approved, so I haven't created an account yet. - I looked around the web, and I didn't find any examples of anyone using a src.rpm as Source0: on their specs. I have added some comments to document the fact that the tar.gz upstream file is coming from a src.rpm. - I have contacted the upstream developer, and I have asked him to make the tar.gz available officially via the sf.net site. - I've read the comments on BUG 177841, and I am doing the best I can with this package with the time I have in my hands, I unfortunately will not have much time left to review other packages. I might potentially in the future be able to submit other packages, but I want to be able to get my first one 'officially' in to get used to the process.
It is not wrong that you do not have an account. It was the reason why you need to follow the page I showed you. People that have an account and are sponsored need to follow the steps on another page. One steps in PackageMaintainers/Join was to block FE-NEEDSPONSOR, what I also did for you. But I also might have been wrong, so I explained to you, why I decided to block FE-NEEDSPONSOR. However, I hope your confusion about comment:10 is now blown away. If you do not have time to review other packages, then chances to be sponsored are low, because a sponsor has nothing to decide, whether or not you know the guidelines well enough.
I believe that Anderson is following the proper steps .... from http://fedoraproject.org/wiki/PackageMaintainers/Join "Create an account in the Fedora Account System when you have found a sponsor and got your package approved" Anderson does not have a sponsor and does not have his package approved. It is true that he would be helping by looking at other packages and making notes but, as said in http://fedoraproject.org/wiki/PackageMaintainers/Join: "Read some other package submissions to learn about packaging and gain familiarity with the process and requirements." Once he gets a sponsor, packaged approved, then an account he can get in the fedorabugs group as stated: "Now, repeat the process using fedorabugs as the Groupname. This will allow you to make changes to the state of bugs in Bugzilla, which is what you'll need to do to get them checked in. It will also allow you to do complete package reviews, including approving packages yourself!"
(In reply to comment #14) > I believe that Anderson is following the proper steps .... from > http://fedoraproject.org/wiki/PackageMaintainers/Join Did this review request block FE-NEEDSPONSOR before I changed it? No, it did not. I quote from PackageMaintainers/Join: | Some potential sponsors will look at the FE-NEEDSPONSOR bug in bugzilla to find | packages to review. You can add your package to this list by editing your review | request bug and adding FE-NEEDSPONSOR in the 'Bug xyz blocks' field (where xyz | is the bug number for your review request). Sorry, I do not know how to express myself in English good enough, if it is still not clear what I wrote, then please ignore it completely.
For 2.1.1-6: * Source URL - Any reason you can't use http://downloads.sourceforge.net/rpmrebuild/rpmrebuild-2.1.1.tar.gz ? (and use %{name} for rpmrebuild, %{version} for 2.1.1) * Redundant Requires - rpm has "Requires: coreutils" and "Requires: textutils, fileutils" is not needed for this package. * %_libdir vs noarch - This package is marked as noarch, however %files list use %_libdir, which differs between on 32bit arch and on 64bit arch. i.e. While this package is marked as noarch (i.e. rebuilding your srpm should create the same bin rpm on any arch), the result of rebuilding your srpm will differ when arch changes (or maybe on 64bit arch rpmbuild fails). This is not right. * Requires - Check Requires again. For example, /usr/lib/rpmrebuild/rpmrebuild.sh contains the lines: ------------------------------------------------------- 179 function RpmBuild 180 { 181 # reconstruction fichier rpm : le src.rpm est inutile 182 # build rpm file, the src.rpm is not usefull to do 183 # for rpm 4.1 : use rpmbuild 184 local BUILDCMD=rpm 185 [ -x /usr/bin/rpmbuild ] && BUILDCMD=rpmbuild 186 eval $BUILDCMD $rpm_defines -bb $rpm_verbose $additional ${FIC_SPEC} || { 187 Error "package '${PAQUET}' build failed" 188 return 1 189 } 190 191 return 0 192 } ------------------------------------------------------- This means this package (rpmrebuild) should have "Requires: rpm-build" (%_bindir/rpmbuild is in rpm-build) ? %postun - Just a question: what package owns /etc/popt and what is the file for? Maybe /etc/popt is already obsolete? (Please consider for FC6+) - By the way, use macros. /etc must be %_sysconfdir. - While I don't know what %postun does, however the lines: -------------------------------------------------------- cp /etc/popt /etc/pot.tmp sed -e '/RPMREBUILD START/,/RPMREBUILD END/d' /etc/popt.tmp > /etc/popt -------------------------------------------------------- apparently contains a typo. * Directory ownership issue - Please make it sure that all directories created by this package are owned by this package. For example, %_libdir/rpmbuild is not owned by any package.
actually, the tar.gz was added to the list after I emailed the developer and asked him to make it available. I haven't had the chance to fix the SPEC for it. It was done late last week. about popt RPM. popt.i386 1.10.2-37.el5 Matched from: popt Popt is a C library for parsing command line parameters. Popt was heavily influenced by the getopt() and getopt_long() functions, but it improves on them by allowing more powerful argument expansion. Popt can parse arbitrary argv[] style arrays and automatically set variables based on command line arguments. Popt allows command line arguments to be aliased via configuration files and includes utility functions for parsing arbitrary strings into argv[] arrays using shell-like rules. I will take a look at the other issues.
(In reply to comment #17) > about popt RPM. I am not asking about popt, but asking about %_sysconfdir/popt. At least rawhide popt (popt-1.12-3.fc8) spec file does not mention about %_sysconfdir/popt (note: at least on F-7+, popt is split out from rpm).
/etc/popt is being used by libpopt, but is not used by default. It is supposed to take user customizations. This makes we wonder about the %postun fragment cited above. You probably should check for presence of %{_sysconfir}/popt before sed'ing, because it might not be present (user could have deleted it). Something similar to test -w %{_sysconfdir}/popt \ && sed -i -e .... %{_sysconfdir}/popt
(In reply to comment #19) > /etc/popt is being used by libpopt, but is not used by default. > It is supposed to take user customizations. Thank you, Ralf. I forgot to mention more one issue: * rpmlint rpmrebuild.src:98: W: macro-in-%changelog _libdir rpmrebuild.src:104: W: macro-in-%changelog doc - In changelog, use %% to prevent macros from being expanded, for example: ---------------------------------------------------- * Thu Sep 5 2007 Anderson Silva <ansilva> 2.1.1-5 - Optimized postun with sed - Replaced /usr/lib with %%{_libdir} <- (althogh this is not right) ----------------------------------------------------
Thanks guys, I will try to address all these issues this weekend. Work is killing me right now, but I will definitely work on this.
ping?
Alright guys... I finally got a few minutes to address some of the issues discussed above. First, let me thank everyone for helping me out with this. Here are the updated spec/src: http://www.the-silvas.com/rpmrebuild.spec http://www.the-silvas.com/rpmrebuild-2.1.1-7.src.rpm What I have fixed: * Thu Sep 27 2007 Anderson Silva <ansilva> 2.1.1-7 - Changed /etc to %%{_sysconfdir} - Fixed reference on postun section - Using tarball as Source0 - Added require rpm-build - Removed require for textutils, fileutils - Added directories to belong to package I still have 2 questions/comments: 1. About Comment #19: 'You probably should check for presence of %{_sysconfir}/popt before sed'ing, because it might not be present (user could have deleted it).' There is a if statement that checks to see if the file exists before running the sed. 2. About Comment #16: '* %_libdir vs noarch - This package is marked as noarch, however %files list use %_libdir, which differs between on 32bit arch and on 64bit arch' OK, this is one problem that I am not sure how to solve. What do you guys suggest? Should I contact upstream and ask them to change their project to lay out their shell scripts somewhere else in the system? Which location what that be outside /usr/lib? I think they put it there, because the rpm package layout their stuff there too. Should I make this rpm i386 only? even though in theory it should work on 64bit arch? I am open to suggestions.
For 2.1.1-7: * About %postun: - Still there is a typo -------------------------------------------------------- rm -f %{_sysconfdir}/pot.tmp -------------------------------------------------------- * Directory ownership issue (In reply to comment #23) > - Added directories to belong to package - Please check all. Still %_prefix/lib/rpmbuild/plugins is not owned. * For %_prefix/lib/rpmbuild: (In reply to comment #23) > OK, this is one problem that I am not sure how to solve. What do you guys > suggest? - You should use %_prefix/lib/rpmbuild, not %_libdir/rpmbuild. This is not a upstream issue, just rpm macro usage issue. * rpmlint for srpm: --------------------------------------------------------- rpmrebuild.src:112: W: macro-in-%changelog doc --------------------------------------------------------- - Please use %%doc in %changelog.
awesome thanks. I just realized that I have been using the rpmlint for rhel instead of fedora. Either later today or this weekend I will address these issues, and run the fedora rpmlint against my stuff.
Ok, I have fixed the issues described on Comment #24, but if I use use %_prefix/lib/rpmbuild instead of %_libdir/rpmbuild, rpmlints gives the following errors: rpmrebuild.spec:34: E: hardcoded-library-path in %{_prefix}/lib/rpmrebuild/VERSION rpmrebuild.spec:35: E: hardcoded-library-path in %{_prefix}/lib/rpmrebuild/rpmrebuild_parser.src rpmrebuild.spec:37: E: hardcoded-library-path in %{_prefix}/lib/rpmrebuild/rpmrebuild_parser.src rpmrebuild.spec:38: E: hardcoded-library-path in %{_prefix}/lib/rpmrebuild/rpmrebuild_parser.src rpmrebuild.spec:62: E: hardcoded-library-path in %{_prefix}/lib/rpmrebuild/
PS - I haven't posted the new spec yet due to the error above.
(In reply to comment #26) > Ok, I have fixed the issues described on Comment #24, but if I use use > %_prefix/lib/rpmbuild instead of %_libdir/rpmbuild, rpmlints gives the following > errors: > > rpmrebuild.spec:34: E: hardcoded-library-path in %{_prefix}/lib/rpmrebuild/VERSION Yes, these rpmlint errors are expected. However, as "rpm" actually uses /usr/lib, not %_libdir, this rpmlint error cannot be avoided for this package.
http://www.the-silvas.com/rpmrebuild.spec http://www.the-silvas.com/rpmrebuild-2.1.1-8.src.rpm Here we go then! Thanks again for your help.
Ah.. after I checked %postun scriptlet again, I came to think that the following is simpler: ---------------------------------------------------------- %postun # Remove all lines which contain 'RPMREBUILD START' # to 'RPMREBUILD END' in %{_sysconfdir}/popt [ $1 -eq 0 ] || exit 0 if [ -f %{_sysconfdir}/popt ]; then sed -i -e '/RPMREBUILD START/,/RPMREBUILD END/d' %{_sysconfdir}/popt fi ---------------------------------------------------------
http://www.the-silvas.com/rpmrebuild.spec http://www.the-silvas.com/rpmrebuild-2.1.1-9.src.rpm here we go. AS
Okay. ------------------------------------------------- This package (rpmrebuild) is APPROVED by me ------------------------------------------------- Please follow the procedure according to: http://fedoraproject.org/wiki/PackageMaintainers/Join from "Get a Fedora Account". At a point a mail should be sent to sponsor members which notifies that you need a sponsor (at the stage, please also write on this bug for confirmation that you requested for sponsorship) Then I will sponsor you. If you want to import this package into Fedora 7, you also have to look at http://fedoraproject.org/wiki/Infrastructure/UpdatesSystem/Bodhi-info-DRAFT (after once you rebuilt this package on Fedora rebuilding system).
I've created my account on Fedora, username: afsilva. I need a Sponsor. Thanks Mamoru, whenver you think I am ready, Iwill start working on the import for F7 (during the week). AS
It seems you have not requested for cvsextras, and even you does not seem to have signed CLA agreement. Please follow http://fedoraproject.org/wiki/PackageMaintainers/Join again. You seems to have finished "Get a Fedora Account" item 2. You have to finish item 4 of "Get a Fedora Account" before I can sponsor you.
Ok, my bad. It seems due to the fact that I am a Red Hat employee I need to do the cla_redhat. I have my request in.
Mamoru, I think I am all set now. AS
Okay, now I should be sponsoring you. Please proceed accoring to the "Join" wiki.
Got it. So, here is a dumb question... well, another dumb question, from the wiki: To build Packages for Fedora Extras 6 or EPEL, you need Plague and for Fedora 7 and later (including devel) you need Koji. At work, I am on RHEL 5, my repos don't have koji, do I need F7 installed to use koji? Should I be able to grab the RPMs from a fedora repo, and install it on RHEL5... is that even recommended? Thanks, AS
Well, that is the first case! So I have only Fedora rawhide and don't have RHEL. However EPEL 5 seems to have koji http://download.fedora.redhat.com/pub/epel/5/i386/repoview/koji.html and perhaps you can use it.
New Package CVS Request ======================= Package Name: rpmrebuild Short Description: A tool to build rpm file from rpm database Owners: afsilva Branches: F-7 EL-5 InitialCC: Cvsextras Commits: no
cvs done.
Please rebuild this on devel, F-7, EL-5, request to koji on F-7, and don't forget to close this bug when done.
np, my wife just had our third son this week, so I am out this week. But I will work on this stuff on Monday.
rpmrebuild-2.1.1-9.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.
Hi, Rpmrebuild tool changes the source rpm name in the rpm description, this should not be correct. The base information should not be changed. Also, when making modification in the rpm name through the tool, name does not change in the rpm description we get through rpm -qip command. eg. rpm -qip tcp_wrappers-libs-7.6-77.el7.centos.x86_64.rpm Name : tcp_wrappers-libs Version : 7.6 Release : 77.el7.centos Architecture: x86_64 Install Date: (not installed) Group : System Environment/Libraries Size : 134682 License : BSD Signature : (none) Source RPM : tcp_wrappers-libs-7.6-77.el7.centos.src.rpm .................................>> source rpm name is changed Build Date : Wed 13 Feb 2019 11:50:14 AM EST Build Host : cisco-buildserver2 Relocations : (not relocatable) Packager : Nupur <nupur.priya> Vendor : Harman URL : ftp://ftp.porcupine.org/pub/security/index.html Summary : Libraries for tcp_wrappers Description : tcp_wrappers-libs contains the libraries of the tcp_wrappers package. [nupur@cisco-buildserver2 14219]$ $ rpm -qip zsh-5.0.2-31.el7.centos.x86_64.rpm ................................>> package name is changed here (.centos appended) Name : zsh Version : 5.0.2 Release : 31.el7 ....................................>> But rpm -qip does not show the changes in description Architecture: x86_64 Install Date: (not installed) Group : System Environment/Shells Size : 5915806 License : MIT Signature : (none) Source RPM : zsh-5.0.2-31.el7.src.rpm Build Date : Tue 05 Feb 2019 04:06:25 PM EST Build Host : localhost Relocations : (not relocatable) Packager : Nupur <nupur.priya> Vendor : Harman URL : http://zsh.sourceforge.net/ Summary : Powerful interactive shell Description : The zsh shell is a command interpreter usable as an interactive login shell and as a shell script command processor. Zsh resembles the ksh shell (the Korn shell), but includes many enhancements. Zsh supports command line editing, built-in spelling correction, programmable command completion, shell functions (with autoloading), a history mechanism, and more. Regards, Nupur
Hi Nupur, This bug is 11 year old and concerns the review request. It will not be monitored. If you feel there is an issue with the packaging itself please open a new bug against rpmrebuild. If you think there is an issue with the software itself please open a bug upstream (e.g. against the project's). Lastly zsh-5.0.2-31.el7.centos.x86_64.rpm tells me you are using CentOS not Fedora. NVR changes are expected there and I'm not sure rpmrebuild copes with that - not even sure it's a bug. Clearing all NEEDINFO requests. Please see above. Regards, François