Bug 766932 - Review Request: icfg - utiltiy for scriptable editing of network interface files
Summary: Review Request: icfg - utiltiy for scriptable editing of network interface files
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jon Masters
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-12 19:59 UTC by Neil Horman
Modified: 2013-11-24 13:43 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-24 13:43:00 UTC
Type: ---
Embargoed:
nhorman: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Neil Horman 2011-12-12 19:59:51 UTC
Spec URL: http://people.redhat.com/nhorman/icfg.spec
SRPM URL: http://people.redhat.com/nhorman/icfg-0.9-1.fc15.src.rpm
Description: 
This is a utility for manipulating SysV network interface configuration files
(the files matching the glob /etc/sysconfig/network-scripts/icfg-*).  These are
text based files, that are normally easily edited by hand, but in many
environments hand editing is not desirable (for instance, during kickstart
installations).  Icfg creates a scriptable interface to allow an admin to
provision a systems network interfaces during install, without having to fall
back to using a series of sed and awk commands

Comment 1 Terje Røsten 2011-12-13 13:21:25 UTC
> Requires:	python 

# Might not needed, rpm find requirement of /usr/bin/python any way.

>mkdir -p $RPM_BUILD_ROOT/usr/bin
>mkdir -p $RPM_BUILD_ROOT/usr/share/man/man1

>install -m755 -p src/icfg $RPM_BUILD_ROOT/usr/bin/icfg
> install -m644 -p doc/icfg.1 $RPM_BUILD_ROOT/usr/share/man/man1/icfg.1

# Would use macros and -D option and reduce to:

install -m755 -D -p src/icfg $RPM_BUILD_ROOT%{_bindir}/icfg
install -m644 -D -p doc/icfg.1 $RPM_BUILD_ROOT%{_mandir}/man1/icfg.1

# Copyright headers missing in icfg script, add?

Comment 2 Itamar Reis Peixoto 2011-12-21 19:14:44 UTC
ok, I will take a look and I will review it if works for me.

Comment 3 Itamar Reis Peixoto 2011-12-21 19:33:35 UTC
please explain for me 

how can I add a vlan10 into interface p1p1 ?


I like the vlans interfaces called vlan10, vlan20, etc.. ( VLAN_PLUS_VID_NO_PAD )

Comment 4 Neil Horman 2011-12-22 15:24:51 UTC
Thank you for your offer, but I've already made a deal to have jcm review this, and I've started reviewing his bug, so I'd just as soon he did the official review on this.  You're of course welcome to review/comment as well.

To answer your question, the man page should have examples of this, if it doesn't I'll add it.  But the command would be something like:

icfg -c -i vlan10 -t vlan -s PHYSDEV=eth0

Replace vlan10 and eth0 of course with the appropriate corresponding vlan and physical device names that you want.

Comment 5 Neil Horman 2011-12-22 15:25:51 UTC
Terje, I'll fix those, along with whatever else jcm finds, thanks.

Comment 6 Neil Horman 2011-12-28 15:23:38 UTC
ping, jcm, thought you were going to look at this over the weekend.

Comment 7 Jon Masters 2012-01-02 22:19:43 UTC
I am presently completing the review, sorry about that. Should have some comments for you in a few.

Comment 8 Jon Masters 2012-01-02 23:26:48 UTC
Terje raised the main issues I had already. Python dep might be extraneous. Also very unlikely but I'm honestly not sure if SysV is a legacy trademark. Its use is so profuse that I don't intend to object to it, just mention it here.

Summary: I think otherwise this package is ready, so it passes review. However I am unable to set the flag (due to a quirk of BZ) so I filed a request with rel-eng just now that they do so on my behalf.

Review
------

* PASS: rpmlint must be run on the source rpm and all binary rpms the build produces

        - The output pertains to a few false-positive spelling "errors", none of
          which are actual errors. Therefore this part of the test is passed.

** The output should be posted in the review:

$ rpmlint icfg-0.9-1.fc15.src.rpm
icfg.src: W: spelling-error %description -l en_US sysconfig -> configure
icfg.src: W: spelling-error %description -l en_US kickstart -> kick start, kick-start, kicks tart
icfg.src: W: spelling-error %description -l en_US scriptable -> scrip table, scrip-table, script able
icfg.src: W: spelling-error %description -l en_US sed -> tied, ed, seed
icfg.src: W: spelling-error %description -l en_US awk -> awl, aw, wk
1 packages and 0 specfiles checked; 0 errors, 5 warnings.

$ rpmlint icfg-0.9-1.fc16.noarch.rpm
icfg.noarch: W: spelling-error %description -l en_US sysconfig -> configure
icfg.noarch: W: spelling-error %description -l en_US kickstart -> kick start, kick-start, kicks tart
icfg.noarch: W: spelling-error %description -l en_US scriptable -> scrip table, scrip-table, script able
icfg.noarch: W: spelling-error %description -l en_US sed -> tied, ed, seed
icfg.noarch: W: spelling-error %description -l en_US awk -> awl, aw, wk
1 packages and 0 specfiles checked; 0 errors, 5 warnings.

(additionally no errors detected during package build)

* The package must be named according to the Package Naming Guidelines: PASS
* The spec file name must match the base package %{name}.spec unles your package has an exemption: PASS
* The package must meet the Packaging Guidelines
        - Naming guidelines already confirmed
        - Version and Release is consistent
        - License is consistent with FPG
        - Package is useful without external bits (just scripts, NA)
        - No inclusion of pre-built binaries or libraries (noarch scripts!)
        - Obfuscated Code Contest: not entered. SPEC is clean.
        - Architecture support: noarch, and not limited
        - FHS: use seems to be consistent
        - Libexec: not applicable
        - /run: not applicable
        - Binaries not dependent upon separate libraries: correct
        - rpmlint has already been run (above)
        - Changelogs: appear to be correct
        - No use of deprecated packager tag
        - No use of deprecated vendor tag
        - No use of deprecated copyright tag
        - Summary does not end in a period
        - No use of pre-requires
        - Source URL is correct and works
        - Buildroot tag is allowed and ignored
        - Clean section is present and allowed
        - No build requires
        - No use of pre-requires
        - No use of file requires
        - Assume python binary dep not automatic??? (check)
        - No use of autogenerated provide filtering
        - Exception not applicable
        - Summary: seems concise and reasonable
        - Description: seems fine, is "SysV" a trademark?
        - Encoding: meets the requirement for ASCII
        - Documentation: is included using correct macro
        - Compiler flags: not applicable
        - PIE: not applicable
        - Debuginfo packages: not applicable
        - Devel packages: not applicable
        - Pkgconfig files: not applicable
        - Requiring base package: not applicable
        - Shared libraries: not applicable
        - Packaging static libraries: not applicable
        - Statically linking executables: not applicable
        - Duplication of system libraries: not appliable
        - Beware of Rpath: not applicable
        - Configuration files: not applicable
        - Configuration of package managers: not applicable
        - Systemd: not a startup service and not applicable
        - Initscripts: not applicable
        - Desktop files: not applicable
        - Macro use is consistent
        - Correct use of RPM_BUILD_ROOT macros
        - No use of makeinstall macro (correct)
        - No macros used in Summary and Description
        - No improper use of _sourcedir macro
        - No local or global macro defines
        - No locale translations
        - Preserve file timestamps - install command does so
        - Parallel make is not applicable
        - Scriptlets are not used
        - Transactions are not manipulated
        - Conditional build is not used
        - Not a relocatable package
        - Code Vs content appears to be fine
        - Package file ownership appears correct
        - Not a kernel module, etc.
        - No bundling is occuring
        - No patches are relevant
        - No epoch is in use
        - No symlinks are defined
        - A man page is provided
        - No test suite, but not applicable really
        - No use of temporary files
        - Not replacing a package
        - Not an add-on python module

* PASS: The package must be licensed with a Fedora approved license and meet the Licensing Guidelines
* PASS: The License field in the package spec file must match the actual license
* PASS: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package must be included in %doc
* PASS: The spec file must be written in American English
* PASS: The spec file for the package MUST be legible
* PASS: The sources used to build the package must match the upstream source, as provided in the spec URL. Reviewers should use md5sum for this task. If no upstream URL can be specified for this package, please see the Source URL Guidelines for how to deal with this
        - Both match (8cb6d47b5b9970ffb927f2fae089173d)
* PASS: The package MUST successfully compile and build into binary rpms on at least one primary architecture
* PASS: If the package does not successfully compile, build or work on an architecture, then those architectures should be listed in the spec in ExcludeArch. Each architecture listed in ExcludeArch MUST have a bug filed in bugzilla, describing the reason that the package does not compile/build/work on that architecture. The bug number MUST be placed in a comment, next to the corresponding ExcludeArch line
* PASS: All build dependencies must be listed in BuildRequires, except for any that are listed in the exceptions section of the Packaging Guidelines ; inclusion of those as BuildRequires is optional. Apply common sense
* PASS (NA): The spec file MUST handle locales properly. This is done by using the %find_lang macro. Using %{_datadir}/locale/* is strictly forbidden
* PASS (NA): Every binary RPM package (or subpackage) which stores shared library files (not just symlinks) in any of the dynamic linker's default paths, must call ldconfig in %post and %postun
* PASS (NA): Packages must NOT bundle copies of system libraries
* PASS (NA): If the package is designed to be relocatable, the packager must state this fact in the request for review, along with the rationalization for relocation of that specific package. Without this, use of Prefix: /usr is considered a blocker
* PASS: A package must own all directories that it creates. If it does not create a directory that it uses, then it should require a package which does create that directory
* PASS: A Fedora package must not list a file more than once in the spec file's %files listings. (Notable exception: license texts in specific situations)
* PASS: Permissions on files must be set properly. Executables should be set with executable permissions, for example
* PASS: Each package must consistently use macros
* PASS: The package must contain code, or permissable content
* PASS (NA): Large documentation files must go in a -doc subpackage. (The definition of large is left up to the packager's best judgement, but is not restricted to size. Large can refer to either size or quantity)
* PASS: If a package includes something as %doc, it must not affect the runtime of the application. To summarize: If it is in %doc, the program must run properly if it is not present
* PASS (NA): Header files must be in a -devel package
* PASS (NA): Static libraries must be in a -static package
* PASS (NA): If a package contains library files with a suffix (e.g. libfoo.so.1.1), then library files that end in .so (without suffix) must go in a -devel package
* PASS (NA): In the vast majority of cases, devel packages must require the base package using a fully versioned dependency: Requires: %{name}%{?_isa} = %{version}-%{release}
* PASS (NA): Packages must NOT contain any .la libtool archives, these must be removed in the spec if they are built
* PASS (NA): Packages containing GUI applications must include a %{name}.desktop file, and that file must be properly installed with desktop-file-install in the %install section. If you feel that your packaged GUI application does not need a .desktop file, you must put a comment in the spec file with your explanation
* PASS (NA): Packages must not own files or directories already owned by other packages. The rule of thumb here is that the first package to be installed should own the files or directories that other packages may rely upon. This means, for example, that no package in Fedora should ever share ownership with any of the files or directories owned by the filesystem or man package. If you feel that you have a good reason to own a file or directory that another package owns, then please present that at package review time
* PASS (ASCII subset): All filenames in rpm packages must be valid UTF-8

* PASS: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it
* PASS (NA): The description and summary sections in the package spec file should contain translations for supported Non-English languages, if available
* PASS: The reviewer should test that the package builds in mock
        - Built on x86_64 using fedora-16-x86_64 configuration
* PASS: The package should compile and build into binary rpms on all supported architectures
        - Scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=3614840
* PASS: The reviewer should test that the package functions as described. A package should not segfault instead of running, for example
* PASS (NA): If scriptlets are used, those scriptlets must be sane. This is vague, and left up to the reviewers judgement to determine sanity
* PASS (NA): Usually, subpackages other than devel should require the base package using a fully versioned dependency
* PASS (NA): The placement of pkgconfig(.pc) files depends on their usecase, and this is usually for development purposes, so should be placed in a -devel pkg. A reasonable exception is that the main pkg itself is a devel tool not installed in a user runtime, e.g. gcc or gdb
* PASS (NA): If the package has file dependencies outside of /etc, /bin, /sbin, /usr/bin, or /usr/sbin consider requiring the package which provides the file instead of the file itself
* PASS: your package should contain man pages for binaries/scripts. If it doesn't, work with upstream to add them where they make sense

Comment 9 Jon Masters 2012-01-02 23:28:30 UTC
Apologies for the delay in completing this. If you need any further assistance, I'll endeavor to turn it around swiftly.

Comment 10 Neil Horman 2012-01-03 02:12:32 UTC
Thank you, Jon, I appreciate the review.  Terje's notes have been incorporated into the package already, and it appears that you have not other objections. If you could please set the fedora review flag to + so that I can get the SCM request submitted, I'd appreciate it.

Thanks

Comment 11 Neil Horman 2012-01-03 02:13:44 UTC
nm, seems I'm able to do it.

Comment 12 Neil Horman 2012-01-03 02:16:35 UTC
New Package SCM Request
=======================
Package Name: icfg
Short Description: sysv network configuration file command line editor
Owners: nhorman, agospoda
Branches: rawhide, fc16
InitialCC: nhorman, agospoda

Comment 13 Itamar Reis Peixoto 2012-01-03 02:22:24 UTC
owners must be your fedora account username (fas)

Comment 14 Jon Masters 2012-01-03 02:28:43 UTC
Yea, per my email I was unable to set it as I have a BZ account (jcm) that differs from my personal Fedora information and the various systems really don't like that. I guess I might just set everything to jcm eventually. I filed a ticket before so I assume they'll just close that since you were able to set the flags now.

Comment 15 Neil Horman 2012-01-03 11:42:45 UTC
New Package SCM Request
=======================
Package Name: icfg
Short Description: sysv network configuration file command line editor
Owners: nhorman
Branches: rawhide, fc16
InitialCC: nhorman, agospoda

Comment 16 Gwyn Ciesla 2012-01-03 13:28:51 UTC
nhorman is not a valid FAS account.
Use f16, not fc16.
rawhide==devel, do not include, it's created by default.

Comment 17 Neil Horman 2012-01-03 13:46:10 UTC
Yes, nhorman is my fedora account username:
https://admin.fedoraproject.org/accounts/user/view/nhorman

I'm not sure what else you want, its worked perfectly well in the past:
https://bugzilla.redhat.com/show_bug.cgi?id=491240


New Package SCM Request
=======================
Package Name: icfg
Short Description: sysv network configuration file command line editor
Owners: nhorman
Branches: rawhide, f16
InitialCC: nhorman, agospoda

Comment 18 Gwyn Ciesla 2012-01-03 15:25:40 UTC
Complete.

Use FAS for initialCC, not email.  agospoda isn't a valid FAS account.  Also, don't include rawhide.

Comment 19 Andy Gospodarek 2012-01-03 16:11:29 UTC
(In reply to comment #18)
> Use FAS for initialCC, not email.  agospoda isn't a valid FAS account.

The proper FAS account for 'agospoda' is gospo.

Comment 20 Itamar Reis Peixoto 2012-01-03 16:18:45 UTC
(In reply to comment #19)
> (In reply to comment #18)
> > Use FAS for initialCC, not email.  agospoda isn't a valid FAS account.
> 
> The proper FAS account for 'agospoda' is gospo.

now is too late, request commit access here -> 

https://admin.fedoraproject.org/pkgdb/acls/name/icfg

Comment 21 Jon Masters 2012-02-12 19:15:22 UTC
Should we close this or set it to some state now?

Comment 22 Terje Røsten 2013-11-24 13:43:00 UTC
Package seems to imported and available in repos, closing ticket.


Note You need to log in before you can comment on or make changes to this bug.