Bug 1277161 - Review Request: mod_mono - ASP.NET module for Apache
Summary: Review Request: mod_mono - ASP.NET module for Apache
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: James Hogarth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-02 14:23 UTC by Claudio Rodrigo Pereyra DIaz
Modified: 2016-04-25 11:01 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-04-25 11:01:35 UTC
Type: ---
Embargoed:
james.hogarth: fedora-review+


Attachments (Terms of Use)

Description Claudio Rodrigo Pereyra DIaz 2015-11-02 14:23:31 UTC
Spec URL: https://elsupergomez.fedorapeople.org/SPECS/mod_mono.spec
SRPM URL: https://elsupergomez.fedorapeople.org/SRPMS/mod_mono-3.12-1.fc21.src.rpm
Description: A module to deploy an ASP.NET application on Apache with Mono
Fedora Account System Username: elsupergomez

Comment 1 Claudio Rodrigo Pereyra DIaz 2015-11-02 17:18:22 UTC
Scratch build in koji: http://koji.fedoraproject.org/koji/taskinfo?taskID=11673757
Copr to test on rawhide: https://copr.fedoraproject.org/coprs/tpokorra/mono

Comment 2 James Hogarth 2015-12-03 18:07:57 UTC
Just a few comments as I'm on a train right now... Can do a full review in a day or so

You should be able to use %autosetup and similar make macros

Doing a -delete in the find is technically nicer than an exec of rm

The directory /var/run is on tmpfs by default so the current spec doesn't account for that, you should make use of tmpfiles.d to create/configure that

COPYING should be %license not %doc

Is the INSTALL really useful to put in %doc given the rpm does the install?

Comment 3 James Hogarth 2015-12-05 21:53:16 UTC
Oh and you missed %doc on the man page ...

Fix up those initial bits and I'll do a formal review

Comment 4 Claudio Rodrigo Pereyra DIaz 2015-12-10 13:54:31 UTC
I apply your suggestion.

Spec URL: https://elsupergomez.fedorapeople.org/SPECS/mod_mono.spec
SRPM URL: https://elsupergomez.fedorapeople.org/SRPMS/mod_mono-3.12-2.fc21.src.rpm

Comment 5 James Hogarth 2015-12-11 01:43:37 UTC
Just about there!

1) As per the tmpfiles.d guidelines you should still create and own the directory in %install and %files

https://fedoraproject.org/wiki/Packaging:Tmpfiles.d

There's a sample spec on that wiki page you can copy and adjust to your needs.

2) Think there was a copy/paste error in your tmpfiles configuration as your package is currently trying to configure /run/mysqld for use by apache ;)

3) There's no need to call ldconfig as system libraries aren't being changed - that has no impact on the *.so loaded by httpd

With that we should be pretty good for an APPROVED on a formal review.

Comment 6 Claudio Rodrigo Pereyra DIaz 2015-12-11 11:26:01 UTC
Thanks James

Spec URL: https://elsupergomez.fedorapeople.org/SPECS/mod_mono.spec
SRPM URL: https://elsupergomez.fedorapeople.org/SRPMS/mod_mono-3.12-3.fc21.src.rpm

(In reply to James Hogarth from comment #5)
> Just about there!
> 
> 1) As per the tmpfiles.d guidelines you should still create and own the
> directory in %install and %files
> 
> https://fedoraproject.org/wiki/Packaging:Tmpfiles.d
> 
> There's a sample spec on that wiki page you can copy and adjust to your
> needs.

Add creation on %install and %files

> 2) Think there was a copy/paste error in your tmpfiles configuration as your
> package is currently trying to configure /run/mysqld for use by apache ;)

My mistake. Fixed

> 
> 3) There's no need to call ldconfig as system libraries aren't being changed
> - that has no impact on the *.so loaded by httpd

Removed
 
> With that we should be pretty good for an APPROVED on a formal review.

Comment 7 Claudio Rodrigo Pereyra DIaz 2015-12-28 19:22:52 UTC
James, It is ok now?

Comment 8 James Hogarth 2015-12-30 10:02:06 UTC
Apologies - Christmas happened and I've been unable to spend time on completing the review as a result ..

Going through it now.

Comment 9 James Hogarth 2015-12-30 13:55:32 UTC
Okay so installing the build on a minimal fedora rawhide instance and a basic index.aspx I get this on trying to access it  (selinux set to permissive for initial testing):


Wed Dec 30 13:53:59.964922 2015] [core:notice] [pid 9081] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Wed Dec 30 13:53:59.967668 2015] [suexec:notice] [pid 9081] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Dec 30 13:54:00.013541 2015] [:crit] [pid 9081] (13)Permission denied: Failed to create shared memory segment for backend 'XXGLOBAL' at '/var/run/mod_mono/mod_mono_dashboard_XXGLOBAL_1'.
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
[Wed Dec 30 13:54:00.017200 2015] [auth_digest:notice] [pid 9081] AH01757: generating secret for digest authentication ...
[Wed Dec 30 13:54:00.017891 2015] [http2:warn] [pid 9081] AH02951: mod_ssl does not seem to be enabled
[Wed Dec 30 13:54:00.020233 2015] [lbmethod_heartbeat:notice] [pid 9081] AH02282: No slotmem from mod_heartmonitor
[Wed Dec 30 13:54:00.020430 2015] [:crit] [pid 9081] (13)Permission denied: Failed to create shared memory segment for backend 'XXGLOBAL' at '/var/run/mod_mono/mod_mono_dashboard_XXGLOBAL_1'.
[Wed Dec 30 13:54:00.115206 2015] [mpm_prefork:notice] [pid 9081] AH00163: Apache/2.4.18 (Fedora) mod_mono/3.12 configured -- resuming normal operations
[Wed Dec 30 13:54:00.115361 2015] [core:notice] [pid 9081] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Wed Dec 30 13:54:03.003383 2015] [:crit] [pid 9086] (13)Permission denied: Failed to create shared memory segment for backend 'XXGLOBAL' at '/var/run/mod_mono/mod_mono_dashboard_XXGLOBAL_1'.
[Wed Dec 30 13:54:03.003913 2015] [:crit] [pid 9086] (13)Permission denied: Failed to create shared memory segment for backend 'XXGLOBAL' at '/var/run/mod_mono/mod_mono_dashboard_XXGLOBAL_1'.
[Wed Dec 30 13:54:05.038859 2015] [:crit] [pid 9086] (13)Permission denied: Failed to create shared memory segment for backend 'XXGLOBAL' at '/var/run/mod_mono/mod_mono_dashboard_XXGLOBAL_1'.
[Wed Dec 30 13:54:07.072555 2015] [:crit] [pid 9086] (13)Permission denied: Failed to create shared memory segment for backend 'XXGLOBAL' at '/var/run/mod_mono/mod_mono_dashboard_XXGLOBAL_1'.
[Wed Dec 30 13:54:09.103687 2015] [:error] [pid 9086] Failed to connect to mod-mono-server after several attempts to spawn the process.
[Wed Dec 30 13:54:09.127545 2015] [core:notice] [pid 9081] AH00052: child pid 9086 exit signal Segmentation fault (11)


What am I missing from a fresh dnf install to test this properly?

Comment 10 James Hogarth 2015-12-30 14:05:45 UTC
ah so /var/run/mod_mono needs to be owned by apache to create that shared memory segment ... so tmpfiles and %files needs to be updated to account for that ... 

still getting a mess trying to do a minimal index.aspx though ...

<%
    HelloWorldLabel.Text = "Hello, world!";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Label runat="server" id="HelloWorldLabel"></asp:Label>
    </div>
    </form>
</body>
</html>


System.Web.Compilation.CompilationException
CS1576: The line number specified for #line directive is missing or invalid

Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error.
Details: CS1576: The line number specified for #line directive is missing or invalid
Error origin: Compiler
Error source file: /index.aspx
Exception stack trace:
  at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0 
  at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug) [0x00000] in <filename unknown>:0 


Some steps to test the module would be appreciated ... and don't forget to set the owner of /var/run/mod_mono correctly!

Comment 11 Claudio Rodrigo Pereyra DIaz 2015-12-30 19:02:29 UTC
temfiles was updated.

check srpm the directoy is owned by apache

A correct example file (you miss indicate the language)

index.aspx

<%@ Page Language="C#" %>
<%
    HelloWorldLabel.Text = "Hello, world!";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Label runat="server" id="HelloWorldLabel"></asp:Label>
    </div>
    </form>
</body>
</html>

Koji build.
http://koji.fedoraproject.org/koji/taskinfo?taskID=12349738

I install from this task and work out the box with this example file and selinux permissive

Comment 12 James Hogarth 2016-01-04 13:33:03 UTC
Thanks for the correct index.aspx snippet - been many, many years since I last had an IIS/asp thing to deal with ...

The tmpfiles configuration correctly has apache:apache for the /var/run/mod_mono directory but in %files you just have it listed so it initially gets installed with the default root:root and rpm -qV complains... 

You need to add an %attr(-,apache,apache) in front of the %dir /var/run/%{name}/ so that the rpmdb matches the tmpfiles.d configuration and verify is happy.

Incidentally I tested the example with selinux enforcing and all that was needed was httpd_execmem set to on.

Fix up that ownership issue in %files and I'll do the formal review.

Comment 13 Claudio Rodrigo Pereyra DIaz 2016-01-04 15:18:17 UTC
Thanks James. Now it will be ok, I hope so.

Spec URL: https://elsupergomez.fedorapeople.org/SPECS/mod_mono.spec
SRPM URL: https://elsupergomez.fedorapeople.org/SRPMS/mod_mono-3.12-4.fc21.src.rpm

Koji task: http://koji.fedoraproject.org/koji/taskinfo?taskID=12402985

Comment 14 James Hogarth 2016-01-07 12:06:00 UTC
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated


Issues:
=======
- Package installs properly.
  Note: Installation errors (see attachment)
  See: https://fedoraproject.org/wiki/Packaging:Guidelines

This is a known fedora-review bug with debug packages. Manually installing in a VM works fine.

- Package does not use a name that already exists.
  Note: A package with this name already exists. Please check
  https://admin.fedoraproject.org/pkgdb/acls/name/mod_mono
  See:
  https://fedoraproject.org/wiki/Packaging/NamingGuidelines#Conflicting_Package_Names

This is unretiring an old package so the conflict is expected and not an issue.

- dir-or-file-in-var-run /var/run/mod_mono

This is following the tmpfiles.d syntax. Not considered an issue.

- unversioned so-files

This is an httpd library and not in the ldconfig path or a development library.

===== MUST items =====

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[-]: Development (unversioned) .so files in -devel subpackage, if present.
     Note: Unversioned so-files in private %_libdir subdirectory (see
     attachment). Verify they are not in ld path.
[-]: Header files in -devel subpackage, if present.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "MIT/X11 (BSD like)", "Apache (v2.0)", "GPL (v2 or later)",
     "Unknown or generated". 30 files have unknown license. Detailed output
     of licensecheck in /home/james/workspace/fedora-
     scm/1277161-mod_mono/licensecheck.txt
[-]: License file installed when any subpackage combination is installed.
[x]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/lib/tmpfiles.d
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 61440 bytes in 4 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: 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 is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package does not own files or directories owned by other packages.
[x]: All build dependencies are listed in BuildRequires, except for any
     that are listed in the exceptions section of Packaging Guidelines.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: %config files are marked noreplace or the reason is justified.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: No %config files under /usr.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[-]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in
     mod_mono-debuginfo
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[x]: Files in /run, var/run and /var/lock uses tmpfiles.d when appropriate
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Uses parallel make %{?_smp_mflags} macro.
[x]: SourceX is a working URL.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: Mock build failed
     See: http://fedoraproject.org/wiki/Packaging/Guidelines#rpmlint
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: mod_mono-3.12-4.fc24.x86_64.rpm
          mod_mono-debuginfo-3.12-4.fc24.x86_64.rpm
          mod_mono-3.12-4.fc24.src.rpm
mod_mono.x86_64: W: spelling-error %description -l en_US proxying -> propping
mod_mono.x86_64: E: dir-or-file-in-var-run /var/run/mod_mono
mod_mono.src: W: spelling-error %description -l en_US proxying -> propping
3 packages and 0 specfiles checked; 1 errors, 2 warnings.




Requires
--------
mod_mono (rpmlib, GLIBC filtered):
    config(mod_mono)
    httpd
    libc.so.6()(64bit)
    libpthread.so.0()(64bit)
    mono-core
    rtld(GNU_HASH)
    xsp

mod_mono-debuginfo (rpmlib, GLIBC filtered):



Provides
--------
mod_mono:
    config(mod_mono)
    mod_mono
    mod_mono(x86-64)

mod_mono-debuginfo:
    mod_mono-debuginfo
    mod_mono-debuginfo(x86-64)



Unversioned so-files
--------------------
mod_mono: /usr/lib64/httpd/modules/mod_mono.so

Source checksums
----------------
http://download.mono-project.com/sources/mod_mono/mod_mono-3.12.tar.gz :
  CHECKSUM(SHA256) this package     : bb18dd59efe56c719df7c89b353327dd30dddb87f395d60b188f92b911c9f04b
  CHECKSUM(SHA256) upstream package : bb18dd59efe56c719df7c89b353327dd30dddb87f395d60b188f92b911c9f04b


Generated by fedora-review 0.6.0 (3c5c9d7) last change: 2015-05-20
Command line :/usr/bin/fedora-review -b 1277161 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api, C/C++
Disabled plugins: Java, Python, fonts, SugarActivity, Ocaml, Perl, Haskell, R, PHP, Ruby
Disabled flags: EXARCH, DISTTAG, EPEL5, BATCH, EPEL6


===== FINAL NOTES =====

You may want to point your %files at /run/mod_mono rather than /var/run/mod_mono seeing that /var/run is a symlink to /run and it's technically nicer to have it directly in place rather than bouncing through a symlink ... However I do consider this optional and doesn't appear to be against any specific guideline I can see.

Package is APPROVED

Comment 15 Claudio Rodrigo Pereyra DIaz 2016-01-07 12:48:37 UTC
Thanks James.
I will change to user /run instead /var/run

Thanks again!

Comment 16 James Hogarth 2016-04-25 06:46:12 UTC
Hi

As a reminder can you please close your review bug once your package has been built for the relevant branches.

Thanks


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