Import Upstream version 20221107

This commit is contained in:
rtlhq 2022-11-22 22:43:59 +08:00
commit 564342a1e7
14 changed files with 15329 additions and 0 deletions

12
.gitignore vendored Normal file
View File

@ -0,0 +1,12 @@
/Makefile
/Makefile.in
/aclocal.m4
/apns-conf.xml
/autom4te.cache/
/config.log
/config.status
/configure
/install-sh
/missing
/mobile-broadband-provider-info.pc
*.sw?

12
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,12 @@
test:
image: debian:buster
stage: test
before_script:
- echo "man-db man-db/auto-update boolean false" | debconf-set-selections
- export DEBIAN_FRONTEND=noninteractive
- apt-get update
- apt-get -y install libxml2-utils xsltproc automake make
script:
- ./autogen.sh
- make check

9
CONTRIBUTING Normal file
View File

@ -0,0 +1,9 @@
Edit instructions are found from:
https://wiki.gnome.org/Projects/NetworkManager/MobileBroadband/ServiceProviders
MAKE SURE YOU VALIDATE THE DATABASE AFTER CHANGES!!
If you wish to install the package execute:
$ autoreconf -i
to bootstrap the package.

27
COPYING Normal file
View File

@ -0,0 +1,27 @@
THIS WORK IS IN PUBLIC DOMAIN:
The person or persons who have associated work with this document
(the "Dedicator" or "Certifier") hereby either (a) certifies that, to the best
of his knowledge, the work of authorship identified is in the public domain of
the country from which the work is published, or (b) hereby dedicates whatever
copyright the dedicators holds in the work of authorship identified below
(the "Work") to the public domain. A certifier, moreover, dedicates any
copyright interest he may have in the associated work, and for these purposes,
is described as a "dedicator" below.
A certifier has taken reasonable steps to verify the copyright status of this
work. Certifier recognizes that his good faith efforts may not shield him from
liability if in fact the work certified is not in the public domain.
Dedicator makes this dedication for the benefit of the public at large and to
the detriment of the Dedicator's heirs and successors. Dedicator intends this
dedication to be an overt act of relinquishment in perpetuity of all present
and future rights under copyright law, whether vested or contingent, in the
Work. Dedicator understands that such relinquishment of all rights includes the
relinquishment of all rights to enforce (by lawsuit or otherwise) those
copyrights in the Work.
Dedicator recognizes that, once placed in the public domain, the Work may be
freely reproduced, distributed, transmitted, used, modified, built upon, or
otherwise exploited by anyone for any purpose, commercial or non-commercial,
and in any way, including by methods that have not yet been invented or
conceived.

11
MAINTAINERS Normal file
View File

@ -0,0 +1,11 @@
Antti Kaijanmäki
E-mail: antti kaijanmaki net
Userid: kaijanma
Dan Williams
E-mail: dcbw redhat com
Userid: dcbw
Jiří Klimeš
E-mail: jklimes redhat com
Userid: jklimes

22
Makefile.am Normal file
View File

@ -0,0 +1,22 @@
## Process this file with automake to produce Makefile.in
SP_XML_DB = serviceproviders.xml
dist_pkgdata_DATA = $(SP_XML_DB) serviceproviders.2.dtd
EXTRA_DIST = mobile-broadband-provider-info.pc.in \
apns-conf.xsl
CLEANFILES = apns-conf.xml
pkgconfigdir = $(datadir)/pkgconfig
pkgconfig_DATA = mobile-broadband-provider-info.pc
apns-conf.xml: $(top_srcdir)/apns-conf.xsl $(top_srcdir)/$(SP_XML_DB)
$(AM_V_GEN) $(XSLTPROC) --output $@ $^
pkgdata_DATA = apns-conf.xml
check-local:
grep '^[[:blank:]]* [[:blank:]]*<\|[[:blank:]]$$' $(top_srcdir)/$(SP_XML_DB) && exit 1 || :
xmllint --valid $(top_srcdir)/$(SP_XML_DB) 2>&1 >/dev/null

29
README Normal file
View File

@ -0,0 +1,29 @@
This package contains mobile broadband settings for different service providers
in different countries. The Package contains only informational files so it's
safe for distributions to grab updates even during feature freeze and
maintenance stages.
When you want to configure a mobile broadband connections there usually is some
service provider specific information you have to know before the connection
can be established. Problem with this information is that it's highly technical
for an ordinary consumer and it's available only from service providers web
page or from Microsoft Windows installation media that becomes with tie-in
subscription devices.
The interesting side of this information is that it's the same for every user
of a given service provider. This means that service provider specific
information can be stored in a database. When this database is available the
information can be fetched there and the ordinary user does not need to bother
about it.
Service provider specific information is stored in a XML file. XML is not the
most optimized format for a database, but it's easy to read, understand and
edit.
The database is released under Creative Commons Public Domain (CC-PD).
for more info, see:
https://wiki.gnome.org/Projects/NetworkManager/MobileBroadband/ServiceProviders
If you are using pkg-config, variable MOBILE_BROADBAND_PROVIDER_INFO contains
the full path to the database.

116
apns-conf.xsl Normal file
View File

@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- THIS WORK IS IN PUBLIC DOMAIN:
The person or persons who have associated work with this document
(the "Dedicator" or "Certifier") hereby either (a) certifies that, to the best
of his knowledge, the work of authorship identified is in the public domain of
the country from which the work is published, or (b) hereby dedicates whatever
copyright the dedicators holds in the work of authorship identified below
(the "Work") to the public domain. A certifier, moreover, dedicates any
copyright interest he may have in the associated work, and for these purposes,
is described as a "dedicator" below.
A certifier has taken reasonable steps to verify the copyright status of this
work. Certifier recognizes that his good faith efforts may not shield him from
liability if in fact the work certified is not in the public domain.
Dedicator makes this dedication for the benefit of the public at large and to
the detriment of the Dedicator's heirs and successors. Dedicator intends this
dedication to be an overt act of relinquishment in perpetuity of all present
and future rights under copyright law, whether vested or contingent, in the
Work. Dedicator understands that such relinquishment of all rights includes the
relinquishment of all rights to enforce (by lawsuit or otherwise) those
copyrights in the Work.
Dedicator recognizes that, once placed in the public domain, the Work may be
freely reproduced, distributed, transmitted, used, modified, built upon, or
otherwise exploited by anyone for any purpose, commercial or non-commercial,
and in any way, including by methods that have not yet been invented or
conceived.
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:comment> Automatically generated from serviceproviders.xml </xsl:comment>
<xsl:for-each select="comment()">
<xsl:copy/>
</xsl:for-each>
<apns version="8">
<xsl:text>&#xa;</xsl:text>
<xsl:for-each select="serviceproviders/country/provider/gsm/apn">
<xsl:text>&#x9;</xsl:text>
<apn>
<xsl:attribute name="carrier">
<xsl:choose>
<xsl:when test="name">
<xsl:value-of select="name" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="../../name" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="mcc">
<xsl:value-of select="../network-id/@mcc" />
</xsl:attribute>
<xsl:attribute name="mnc">
<xsl:value-of select="../network-id/@mnc" />
</xsl:attribute>
<xsl:attribute name="apn">
<xsl:value-of select="@value" />
</xsl:attribute>
<xsl:if test="username">
<xsl:attribute name="user">
<xsl:value-of select="username" />
</xsl:attribute>
</xsl:if>
<xsl:if test="password">
<xsl:attribute name="password">
<xsl:value-of select="password" />
</xsl:attribute>
</xsl:if>
<xsl:if test="contains(usage/@type,'mms')">
<xsl:attribute name="mmsc">
<xsl:value-of select="mmsc" />
</xsl:attribute>
<xsl:choose>
<xsl:when test="contains(mmsproxy,':')">
<xsl:attribute name="mmsproxy">
<xsl:value-of select="substring-before(mmsproxy,':')" />
</xsl:attribute>
<xsl:attribute name="mmsport">
<xsl:value-of select="substring-after(mmsproxy,':')" />
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="mmsproxy">
<xsl:value-of select="mmsproxy" />
</xsl:attribute>
<xsl:attribute name="mmsport">8080</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
<xsl:attribute name="type">
<xsl:value-of select="'default'" />
<xsl:if test="usage/@type = 'internet'">,supl</xsl:if>
<xsl:if test="usage/@type = 'mms'">,mms</xsl:if>
<xsl:if test="usage/@type = 'mms-internet-hipri'">,mms,supl,hipri</xsl:if>
<xsl:if test="usage/@type = 'mms-internet-hipri-fota'">,mms,supl,hipri,fota</xsl:if>
</xsl:attribute>
</apn>
<xsl:text>&#xa;</xsl:text>
</xsl:for-each>
</apns>
</xsl:template>
</xsl:stylesheet>

21
autogen.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
REQUIRED_AUTOMAKE_VERSION=1.7
PKG_NAME=mobile-broadband-provider-info
(test -f $srcdir/configure.ac \
&& test -f $srcdir/serviceproviders.xml) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}
(cd $srcdir;
autoreconf --force --install --verbose
)
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"

19
configure.ac Executable file
View File

@ -0,0 +1,19 @@
AC_PREREQ(2.52)
AC_INIT(mobile-broadband-provider-info,
20221107,
[https://gitlab.gnome.org/GNOME/mobile-broadband-provider-info/issues],
mobile-broadband-provider-info)
AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-xz])
AM_MAINTAINER_MODE([enable])
AC_PATH_PROG(XSLTPROC, xsltproc)
if test -z "$XSLTPROC"; then
AC_MSG_ERROR([xsltproc not found])
fi
AC_CONFIG_FILES([
Makefile
mobile-broadband-provider-info.pc
])
AC_OUTPUT

View File

@ -0,0 +1,37 @@
<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:gnome="http://api.gnome.org/doap-extensions#"
xmlns="http://usefulinc.com/ns/doap#">
<name xml:lang="en">mobile-broadband-provider-info</name>
<shortdesc xml:lang="en">Mobile broadband settings for various service providers</shortdesc>
<description>The mobile-broadband-provider-info package contains listings of mobile
broadband (3G) providers and associated network and plan information.</description>
<bug-database rdf:resource="https://gitlab.gnome.org/GNOME/mobile-broadband-provider-info/issues/" />
<mailing-list rdf:resource="https://mail.gnome.org/mailman/listinfo/networkmanager-list" />
<!-- Maintainers -->
<maintainer>
<foaf:Person>
<foaf:name>Antti Kaijanmäki</foaf:name>
<foaf:mbox rdf:resource="mailto:antti.kaijanmaki.net"/>
<gnome:userid>kaijanma</gnome:userid>
</foaf:Person>
</maintainer>
<maintainer>
<foaf:Person>
<foaf:name>Dan Williams</foaf:name>
<foaf:mbox rdf:resource="mailto:dcbw@redhat.com" />
<gnome:userid>dcbw</gnome:userid>
</foaf:Person>
</maintainer>
<maintainer>
<foaf:Person>
<foaf:name>Lubomir Rintel</foaf:name>
<foaf:mbox rdf:resource="mailto:lkundrak@v3.sk" />
<gnome:userid>lkundrak</gnome:userid>
</foaf:Person>
</maintainer>
</Project>

View File

@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
datarootdir = @datarootdir@
pkgdatadir=${datarootdir}/@PACKAGE@
database=${pkgdatadir}/serviceproviders.xml
Name: mobile-broadband-provider-info
Description: Mobile Broadband Service Provider Information Database
Requires:
Version: @VERSION@

143
serviceproviders.2.dtd Normal file
View File

@ -0,0 +1,143 @@
<!ELEMENT serviceproviders (country*)>
<!ATTLIST serviceproviders format CDATA #REQUIRED>
<!ELEMENT country (provider*)>
<!ATTLIST country code CDATA #REQUIRED>
<!ELEMENT provider (name+, gsm?, cdma?)>
<!-- Indicates this provider is the primary/wholesale network provider -->
<!-- for a given MCC/MNC; other providers with the same MCC/MNC are MVNOs -->
<!-- that piggy-back on the primary provider. -->
<!ATTLIST provider primary (true|false) #IMPLIED>
<!ELEMENT gsm (network-id*, msisdn-query*, voicemail*, visual-voicemail*, balance-check*, balance-top-up*, apn*)>
<!ELEMENT apn (plan*,
usage?,
name*,
gateway?,
username?,
password?,
authentication?,
dns*,
mmsc?,
mmsproxy?)>
<!ATTLIST apn value CDATA #REQUIRED>
<!ELEMENT msisdn-query (ussd*, sms*)>
<!-- query the network for the telephone number assigned to the SIM card -->
<!ELEMENT voicemail (#PCDATA)>
<!-- contains dial string used to access voicemail services for this provider -->
<!-- for historical/legacy reasons network providers may support various alternative -->
<!-- dial strings that can be used to access voicemail services -->
<!ELEMENT visual-voicemail (standard*,
destination-number*,
carrier-prefix?)>
<!ELEMENT standard EMPTY>
<!ATTLIST standard type (cvvm|otmp|vvm3|proprietary) #REQUIRED>
<!-- Whether the carrier supports OTMP, CVVM, or VVM3 for Visual Voicemail
Some carriers implement their own proprietary standard.
-->
<!ELEMENT destination-number (#PCDATA)>
<!-- This is the destination number to activate/deactivate Visual
voicemail over SMS.
-->
<!ELEMENT carrier-prefix (#PCDATA)>
<!-- At the beginning of an SMS "Status" or "Sync" message, this will appear.
-->
<!ELEMENT balance-check (ussd*,
dtmf*,
sms*,
ussd-response*)>
<!-- for handset branding and historical/legacy reasons, network providers often -->
<!-- support a number of alternative methods to check balance/allowance. -->
<!-- the first element will typically be the default method -->
<!ELEMENT ussd (#PCDATA)>
<!ATTLIST ussd replacement CDATA #IMPLIED>
<!-- contains * prefixed string which when sent to the network should result in
a response text string from network. The attribute "replacement" is a
string that, if found in the #PCDATA, can be replaced by user input, e.g.
to provide a pin code for balance top up.
-->
<!ELEMENT dtmf (#PCDATA)>
<!-- contains dial string used to access balance check service via voice call -->
<!ELEMENT sms (#PCDATA)>
<!ATTLIST sms text CDATA #REQUIRED>
<!-- contains dial string and text string used to access balance check service via sms -->
<!ELEMENT ussd-response (#PCDATA)>
<!-- similar to standard ussd method but requires user to select options from initial network response -->
<!-- typically, option 1 followed by option 3 will display remaining credit -->
<!-- this method does not have widespread use -->
<!ELEMENT balance-top-up (ussd*,
sms*)>
<!-- Howto top up the balance of prepaid cards -->
<!ELEMENT network-id EMPTY>
<!ATTLIST network-id mcc CDATA #REQUIRED>
<!ATTLIST network-id mnc CDATA #REQUIRED>
<!-- network-id should contain all the providers's known MCC/MNC codes.
The MCC should be a three-digit ITU E.212 Mobile Country Code (like
'310' or '409') and the MNC should be a two- or three-digit GSM
Mobile Network Code. Even if the provider is an MVNO, it's upstream
network infrastructure provider's MCC/MNC codes should be included
so that the MCC+MNC from the IMSI of the MVNO's SIM can be roughly
matched to the provider.
-->
<!ELEMENT username (#PCDATA)>
<!-- username required for authentication when starting a packet data session -->
<!ELEMENT password (#PCDATA)>
<!-- password required for authentication when starting a packet data session -->
<!ELEMENT authentication EMPTY>
<!ATTLIST authentication method (chap|pap) #REQUIRED>
<!-- method to use for authentication when starting a packet data session -->
<!ELEMENT dns (#PCDATA)>
<!-- Any static IPv4 DNS servers required for the provider; usually these are
sent to the client automatically via PPP or PDP context negotiation and
this value is not used.
-->
<!ELEMENT gateway (#PCDATA)>
<!-- Static IPv4 gateway to which IP traffic for the data session should be
directed to. Usually the gateway is provided automatically via PPP or
PDP context negotiation and this value is not used.
-->
<!ELEMENT plan EMPTY>
<!ATTLIST plan type (prepaid|postpaid) #REQUIRED>
<!ELEMENT usage EMPTY>
<!ATTLIST usage type (internet|mms|wap|ia|mms-internet-hipri|mms-internet-hipri-fota) #REQUIRED>
<!ELEMENT cdma (name*,
username?,
password?,
dns*,
sid*)>
<!ELEMENT sid EMPTY>
<!ATTLIST sid value CDATA #REQUIRED>
<!-- AMPS/CDMA System IDs known to be used by this provider -->
<!ELEMENT name (#PCDATA)>
<!ATTLIST name xml:lang CDATA #IMPLIED>
<!-- MMS proxy in HOST:PORT format -->
<!ELEMENT mmsproxy (#PCDATA)>
<!-- MMS Center URL -->
<!ELEMENT mmsc (#PCDATA)>

14860
serviceproviders.xml Normal file

File diff suppressed because it is too large Load Diff