Started modifying the source package as it contains problematic licenses
for the fonts contained in it. After inspecting the fonts inside the docs/mysqlx/_themes/sphinx_rtd_theme/static/css/fonts/ using the fontforge tool I have discovered that the font families are licensed like this: * fontawesome: Copyright Dave Gandy 2016. All rights reserved. * latto: Copyright (c) 2011-2015 by tyPoland Lukasz Dziedzic (http://www.typoland.com/) with Reserved Font Name "Lato". Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL) * Roboto: Font data copyright Google 2013 This means the fontawesome and Roboto font families are licensed under a strict copyright which is not supported when packaging fonts in fedora and since we don't use the fonts during the build process nor do we package them in the package I have decided to remove them from the archive and rename the archive to %{name}-%{version}-src-without-fonts.tar.gz to avoid any possible confusion when packaging this package in the future. I have also added the generate-modified-sources.sh script that downloads the original sources from the mysql upstream, unpacks them, removes the aforementioned fonts and packs the sources under a new name.
This commit is contained in:
parent
1a92b0ad2c
commit
7479318329
4 changed files with 60 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -18,3 +18,4 @@ clog
|
|||
/mysql-connector-python-8.0.20.tar.gz
|
||||
/mysql-connector-python-8.0.21.tar.gz
|
||||
/mysql-connector-python-8.0.33-src.tar.gz
|
||||
/mysql-connector-python-8.0.33-src-without-fonts.tar.gz
|
||||
|
|
|
|||
49
generate-modified-sources.sh
Executable file
49
generate-modified-sources.sh
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash
|
||||
|
||||
#################################
|
||||
# downloads the sources of
|
||||
# mysql-connector-python
|
||||
# extracts them, removes the
|
||||
# fonts since they have problematic
|
||||
# copyright and packs the result
|
||||
# under a new name
|
||||
#################################
|
||||
|
||||
set -ex
|
||||
|
||||
NAME="mysql-connector-python"
|
||||
# gets the version of the package from the spec file
|
||||
VERSION=$( rpmspec -q --srpm --qf '%{VERSION}' "${NAME}.spec" )
|
||||
|
||||
# the source url of the mysql upstream tarball of the package
|
||||
SOURCE_URL="http://dev.mysql.com/get/Downloads/Connector-python/8.0/${NAME}-${VERSION}-src.tar.gz"
|
||||
|
||||
# original archive name
|
||||
OLD_ARCHIVE_NAME="${NAME}-${VERSION}-src"
|
||||
# new tarball name, chnaged to able to differentiate between
|
||||
# the original and the changed tarball
|
||||
NEW_ARCHIVE_NAME="${OLD_ARCHIVE_NAME}-without-fonts"
|
||||
|
||||
# removes the old tarball, new tarball and the unpacked tarball
|
||||
# if they are present in the current directory
|
||||
rm -rf "./${OLD_ARCHIVE_NAME}.tar.gz" "./${OLD_ARCHIVE_NAME}/" "./${NEW_ARCHIVE_NAME}.tar.gz"
|
||||
|
||||
# downloads the source tarball from the url
|
||||
# specified above
|
||||
wget "${SOURCE_URL}"
|
||||
|
||||
#unpacks the original tarball
|
||||
tar -xzf "${OLD_ARCHIVE_NAME}.tar.gz"
|
||||
|
||||
# removes the problematic font files
|
||||
rm "./${OLD_ARCHIVE_NAME}/docs/mysqlx/_themes/sphinx_rtd_theme/static/css/fonts/"*
|
||||
|
||||
# compresses the modified sources under a new name
|
||||
tar -czf "${NEW_ARCHIVE_NAME}.tar.gz" "${OLD_ARCHIVE_NAME}"
|
||||
|
||||
# removes the unpacked sources
|
||||
rm -r "${OLD_ARCHIVE_NAME}"
|
||||
|
||||
# removes the original tarball so it isn't used
|
||||
# by mistake
|
||||
rm -f "${OLD_ARCHIVE_NAME}.tar.gz"
|
||||
|
|
@ -27,10 +27,15 @@ Summary: MySQL Connector for Python 3
|
|||
# Automatically converted from old format: GPLv2 with exceptions - review is highly recommended.
|
||||
License: (MIT OR GPL-2.0-only) AND GPL-2.0-only AND BSD-2-Clause
|
||||
URL: http://dev.mysql.com/doc/connector-python/en/index.html
|
||||
# Upstream has a mirror redirector for downloads, so the URL is hard to
|
||||
# represent statically. You can get the tarball by following a link from
|
||||
# http://dev.mysql.com/downloads/connector/python/
|
||||
Source0: %{name}-%{version}-src.tar.gz
|
||||
# You can get the original tarball from:
|
||||
# http://dev.mysql.com/get/Downloads/Connector-python/8.0/%%{name}-%%{version}-src.tar.gz"
|
||||
|
||||
# The tarball has to be modified as the fonts are licensed under a copyright
|
||||
# and therefore would clash with the allowed licenses for fonts in fedora if
|
||||
# they were shipped in the src rpm
|
||||
# to modify the tarball to the desired form use the
|
||||
# generate-modified-sources.sh script available in this repo
|
||||
Source0: %{name}-%{version}-src-without-fonts.tar.gz
|
||||
|
||||
BuildRequires: python3-devel >= 3
|
||||
BuildRequires: python3-setuptools
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (mysql-connector-python-8.0.33-src.tar.gz) = da78e23fca47e7be8a1a0355f037d5fc2a68e6414b7da9bbd0cb8c68e2027b041cd78aea65a922079666df2873adebfce56c30f5726c52e7176adf9a87b9ad1b
|
||||
SHA512 (mysql-connector-python-8.0.33-src-without-fonts.tar.gz) = 81e0d84ab71ed83e6f2f201b1d285507fb2b0d2dae57df97246ac037bc37974477139c500bfce2e348285ef6d7943fdba1bd0fe53c61b451492e9d1b43d0e65a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue