Spec URL: https://sourceforge.net/p/text2nato/code/ci/master/tree/ SRPM URL: https://sourceforge.net/projects/text2nato/files/Fedora%2018%20rpm/ Description: When you need to communicate surname/name/ complex naming or word via phone a common practice is used, to spell the word using NATO Phonetic dictionary. http://en.wikipedia.org/wiki/NATO_phonetic_alphabet This tool will take on input any text and convert it into Nato Phonetic Alphabet. [root@localhost text2nato-code]# text2nato NAME text2nato - text converter, converts text into nato phonetic alphabet SYNOPSIS text2nato text... DESCRIPTIONT This utility can be used, when you will have to spell an word/name/surname other the phone. It convert's text into nato phonetic alphabet, so you can just read it from screen without searching your memorry for each letter AUTHOR Veaceslav Mindru mindruv [root@localhost text2nato-code]# text2nato convert this text c Charlie o Oscar n November v Victor e Echo r Romeo t Tango t Tango h Hotel i India s Sierra t Tango e Echo x X-ray t Tango [root@localhost text2nato-code]# Fedora Account System Username: mindruv
Is it worth packaging?
Hello, regardless it's 10 bytes of code or 10MB. It's an usefull tool at least i find it usefull. I wrote it after i saw my collegues with Nato Phonetic printed on a paper and tracking the Alphabet with a finger each time they had to spell something. Let's make world a better place to leave
Hello Christopher, I personally see some value in case that you're talking with outsourced support center. Lubos
Found following problems on SPEC file , will updateit. [root@localhost SPECS]# rpmlint text2nato.spec text2nato.spec:13: W: hardcoded-path-in-buildroot-tag /usr/bin/ text2nato.spec:34: W: macro-in-comment %{_bindir} text2nato.spec: W: no-%prep-section text2nato.spec: W: no-%build-section text2nato.spec:4: W: mixed-use-of-spaces-and-tabs (spaces: line 4, tab: line 1) 0 packages and 1 specfiles checked; 0 errors, 5 warnings. [root@localhost SPECS]#
Hello @Chris, i updated spec file after running rpmlint on it. If you have a moment can you please recheck it. https://sourceforge.net/p/text2nato/code/ci/master/tree/text2nato.spec https://sourceforge.net/p/text2nato/code/ci/master/tree/ @Lubos added the feature requested. [root@localhost text2nato-code]# ./text2nato Convert this text C Charlie o Oscar n November v Victor e Echo r Romeo t Tango t Tango h Hotel i India s Sierra t Tango e Echo x X-ray t Tango [root@localhost text2nato-code]# VM
> Name: text2nato > Summary: text2nato is an utility to convert text into nato phonetic Package installer tools typically display the Name and the Summary, so repeating the name at the beginning of the summary is a waste of space. https://fedoraproject.org/wiki/Examples_of_good_package_summaries Summary: Convert text into nato phonetic alphabet > BuildRequires: perl Not true yet. You only install a prebuilt file. > BuildRoot: %{_tmppath}/ https://fedoraproject.org/wiki/Packaging:Guidelines#BuildRoot_tag > License: GPLv2+ https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#License_Clarification and https://fedoraproject.org/wiki/Packaging:LicensingGuidelines#License_Text > %files > /usr/bin/text2nato > mkdir -p %{buildroot}%{_bindir}/ > cp -p text2nato %{buildroot}%{_bindir}/ If you use macros, use them consistently. Choose between /usr/bin and %{_bindir} but not mix both forms. https://fedoraproject.org/wiki/Packaging:Guidelines#Macros > %install > rm -rf %{buildroot} https://fedoraproject.org/wiki/Packaging:Guidelines#BuildRoot_tag > %changelog Do practise maintaining this %changelog section. Even during Fedora Package Review, there ought to be at least a first changelog entry. https://fedoraproject.org/wiki/Packaging:Guidelines#Changelogs
Name: text2nato Version: 0.4 Release: 1%{?dist} Summary: Convert text into nato phonetic alphabet Group: Applications/Text License: GPLv2+ %description Convert text into nato phonetic alphabet %files /usr/bin/text2nato %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_bindir}/ cp -p text2nato %{buildroot}%{_bindir}/ %changelog * Fri Jul 23 2013 Veaceslav Mindru <mindruv> - 0.4 - remove -i -s switches and left only on option - reduced the code and refactored ############################################################# still to be fixed "If you use macros, use them consistently. Choose between /usr/bin and %{_bindir} but not mix both forms."
Hopefully last version. Name: text2nato Version: 0.5 Release: 1%{?dist} Summary: Convert text into nato phonetic alphabet Group: Applications/Text License: GPLv2+ %description Convert text into nato phonetic alphabet %files %{_bindir}/text2nato %install mkdir -p %{buildroot}%{_bindir} cp -p text2nato %{buildroot}%{_bindir} cp -p text2nato %{_bindir}/ %changelog * Fri Jul 23 2013 Veaceslav Mindru <mindruv> - 0.5 - remove -i -s switches and left only one option - reduced the code and refactored - added space between words
There are several issues. For example, see comment 4. I hope I've found all of them, but I could not find a working package: * It would be helpful, if with each new release of your package, you provided a tested pair of src.rpm and spec file at a direct download location, so tools like fedora-review/wget/curl could access them directly: https://fedoraproject.org/wiki/Join_the_package_collection_maintainers#Upload_Your_Package * Run rpmlint (or rpmlint -I for more helpful output) on the src.rpm and all built rpms. Feel free to ignore obvious false positives in the report, but fix anything else. Preferably add a comment here about whether/when you think what rpmlint reports is correct or incorrect. * The src.rpm package is incomplete and doesn't build at all yet. The reason is simple (but easy to miss when only skimming over the spec), it contains only the spec file, not the program script: cp: cannot stat 'text2nato': No such file or directory In the %install section, the spec file assumes that this file exists in the current directory, the "build directory", but there is nothing that copies it to that location. There is no %prep section in the spec file where you would set up the builddir and copy the file into it. Since you don't need the builddir, you don't need a %prep section. However, there is no "Source" tag in the spec file either, which would point at the download location for the text2nato script. Therefore, that file is not available and not included in your src.rpm yet. If, for example, you pointed the Source0 tag at the file's download URL (test it via "spectool -g text2nato.spec"), you could access the file via %{SOURCE0} in the %install section. https://fedoraproject.org/wiki/Packaging:SourceURL https://fedoraproject.org/wiki/Packaging:Guidelines#Tags https://fedoraproject.org/wiki/Packaging:ReviewGuidelines I can't tell how you've built the src.rpm so far, but there's a fundamental error in how you do it. * Bogus date in %changelog warning when building the rpm: "Fri Jul 23 2013" needs to be fixed to either Jul 26 or Tue. * cp -p text2nato %{_bindir}/ This is a line you've added recently. Why? The previous line that copies the file into %{buildroot}/%{_bindir} is fine. Files in %buildroot get included in the package via the %files section. This new line makes the build fail (when not building as "root"), and the package must install into the %buildroot directory, not into the system's file system. * Licensing: See comment 6. * %changelog: The RPM package changelog is for packaging related comments. Typically, you would not list all the changes in the text2nato script, but only anything relevant that has changed in the package. For a tiny package like this, that wouldn't be a lot. https://fedoraproject.org/wiki/Packaging:Guidelines#Changelogs * Just a Perl script -> package should set "BuildArch: noarch"
Hello , @ Michael Schwendt first of all thank you for your patients with me, doing it for the first time get's confusing sometimes. Spec filed uploaded also tested SRPM Spec URL: https://sourceforge.net/p/text2nato/code/ci/master/tree/ SRPM URL: https://sourceforge.net/projects/text2nato/files/Fedora%2018%20rpm/ i don't see any new errors reported on rpmlint [root@localhost text2nato-code]# rpmlint text2nato.spec 0 packages and 1 specfiles checked; 0 errors, 0 warnings. Here is the last version of text2nato.spec %build section added and empty as per rpmlint requirements [root@localhost text2nato-code]# cat text2nato.spec Name: text2nato Version: 0.5 Release: 1%{?dist} Summary: Convert text into nato phonetic alphabet Source0: https://sourceforge.net/projects/%{name}/files/%{name} BuildArch: noarch Group: Applications/Text License: GPLv2+ %description Convert text into nato phonetic alphabet %build %prep cp -p %{SOURCE0} %{_builddir} %files %{_bindir}/%{name} %install mkdir -p %{buildroot}%{_bindir} cp -p %{name} %{buildroot}%{_bindir} %changelog * Mon Jul 29 2013 Veaceslav Mindru <mindruv> - 0.5 - remove -i -s switches and left only one option - reduced the code and refactored - added space between words - updated spec file as per fedora community requirements [root@localhost text2nato-code]#
One more thing regarding the License filed , comment 6 is not quite clear for me yet, going to review it again.
Added LICENSE file with Artistic clarified license to RPM and SRPM, updated spec file. Veaceslav Mindru
OK while reviewing other packages, found one more thing to correct. Spec file modified available by link in Description https://bugzilla.redhat.com/show_bug.cgi?id=985129#c0 -Source0: http://sourceforge.net/projects/%{name}/files/%{name} -Source1: http://sourceforge.net/projects/%{name}/files/LICENSE +Source0: http://sourceforge.net/projects/%{name}/files/%{name}-%{version}.tar.gz -cp -p %{SOURCE0} %{_builddir} -cp -p %{SOURCE1} %{_builddir} +%setup -q Name: text2nato Version: 0.5 Release: 1%{?dist} Summary: Convert text into nato phonetic alphabet Source0: http://sourceforge.net/projects/%{name}/files/%{name}-%{version}.tar.gz BuildArch: noarch Group: Applications/Text License: Artistic clarified %description Convert text into nato phonetic alphabet %build %prep %setup -q %files %doc LICENSE %{_bindir}/%{name} %install mkdir -p %{buildroot}%{_bindir} chmod a+x %{name} cp -p %{name} %{buildroot}%{_bindir} %changelog * Mon Jul 29 2013 Veaceslav Mindru <mindruv> - 0.5 - remove -i -s switches and left only one option - reduced the code and refactored - added space between words - updated spec file as per fedora community requirements
It's less easy to review a spec file posted as a bugzilla comment. Where is the src.rpm? Also, if you could add a comment with valid "Spec URL:" and "SRPM URL:" lines, you could run "fedora-review -b 985129" and let that tool perform several checks. > %build > %prep Even if the %build section is empty, it should be placed after %prep. These sections are processed in the following order, and it makes sense if that's reflected within the spec file: %prep -> %build -> %install -> %check -> %files