Bug 6652

Summary: Request a mime type for iptables files
Product: shared-mime-info Reporter: Ian Laurie <iml>
Component: freedesktop.org.xmlAssignee: Jonathan Blandford <jrb>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: high CC: bugzilla
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Possible x-iptables mime file

Description Ian Laurie 2006-04-19 20:02:20 UTC
Would it be possible to create a mime type for iptables files?

I have a syntax definition file for GEDIT but I need a mime type assigned.
Unfortunately, no glob is possible.  The syntax file works for iptables-save
format config files as well as shell scripts that build firewalls (the file
covers syntax that only would appear in a shell script, as well as the
iptables-save format).

Definition would look something like this (but need magic I think):

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <mime-type type="text/x-iptables">
    <comment xml:lang="en">iptables configuration file</comment>
  </mime-type>
</mime-info>

Any help greatly appreciated.
Comment 1 Bastien Nocera 2006-07-09 05:13:10 UTC
Do you have a couple of example files?
If there's no magic, and no glob, I'm not sure what the point of adding this
mime-type is...
Comment 2 Ian Laurie 2006-07-09 17:44:42 UTC
Created attachment 6169 [details]
Possible x-iptables mime file

I've attached x-iptables which implements some crude magic.

It tries to recognize both types of firewall definitions,
both shell script types and iptables-save format firewalls.
Comment 3 Benjamin Close 2008-01-11 02:37:00 UTC
Bugzilla Upgrade Mass Bug Change

NEEDSINFO state was removed in Bugzilla 3.x, reopening any bugs previously listed as NEEDSINFO.

  - benjsc
    fd.o Wrangler
Comment 4 Bastien Nocera 2008-04-15 02:25:33 UTC
* freedesktop.org.xml.in:
* tests/list:
* tests/test.iptables: Add text/x-iptables for iptables
scripts, for the benefit of gedit, definition from
Ian Laurie <iml@zip.com.au> (Closes: #6652)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.