You are not logged in.

#1 2023-08-19 13:29:13

mario995
Member
Registered: 2023-08-19
Posts: 2

MS Fonts for the Web on Arch - how to make package for official repo

Hi

This is my first post on the forum, so please bear with me.

I am writing because I have an idea. Using Arch, I noticed that I needed fonts from Microsoft for my thesis, but in the main repositories (not AUR) there was no package with their installer. So I thought it would be beneficial to add a package to the repository that would run a font downloading and unpacking script after installation (as it is in Ubuntu or OpenSUSE)

Of course, it's about the classic Core fonts for the Web that MS made available years ago.
It would be nice to add a package to the official repository that would install these fonts in accordance with the MS license requirements. I did a bit of research on the subject and created a script that does the indicated job just as it is done on Ubuntu. It uses a font package located on the servers of the Free Desktop Foundation

https://www.freedesktop.org/software/fo … /webfonts/

I think it's a better source than the anonymous source from SourceForge, which is used by the ttf-ms-fonts package from the AUR

My script also contains a license agreement that the user has to accept before installing

Script needs curl and cabextract installed to work. I tested it and It's working fine. You can test it too. You need to use chmod +x if you want to run it without sudo

[spoiler]

 
 #!/bin/bash

# License Agreement in English
LICENSE_TEXT=$(cat << 'EOL'
Microsoft TrueType Fonts
END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE
---------------------------------------------------

IMPORTANT - READ CAREFULLY: This Microsoft End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and Microsoft Corporation for the Microsoft software accompanying this EULA, which includes computer software and may include associated media, printed materials, and "on-line" or electronic documentation ("SOFTWARE PRODUCT" or "SOFTWARE"). By exercising your rights to make and use copies of the SOFTWARE PRODUCT, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, you may not use the SOFTWARE PRODUCT.
SOFTWARE PRODUCT LICENSE
The SOFTWARE PRODUCT is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE PRODUCT is licensed, not sold.
1. GRANT OF LICENSE. This EULA grants you the following rights:
·	Installation and Use. You may install and use an unlimited number of copies of the SOFTWARE PRODUCT.
·	Reproduction and Distribution. You may reproduce and distribute an unlimited number of copies of the SOFTWARE PRODUCT;  provided that each copy shall be a true and complete copy, including all copyright and trademark notices, and shall be accompanied by a copy of this EULA.  Copies of the SOFTWARE PRODUCT may not be distributed for profit either on a standalone basis or included as part of your own product.
2.	DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.
·	Limitations on Reverse Engineering, Decompilation, and Disassembly. You may not reverse engineer, decompile, or disassemble the SOFTWARE PRODUCT, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
· Restrictions on Alteration.  You may not rename, edit or create any derivative works from the SOFTWARE PRODUCT, other than subsetting when embedding them in documents.
·	Software Transfer. You may permanently transfer all of your rights under this EULA, provided the recipient agrees to the terms of this EULA.
·	Termination. Without prejudice to any other rights, Microsoft may terminate this EULA if you fail to comply with the terms and conditions of this EULA. In such event, you must destroy all copies of the SOFTWARE PRODUCT and all of its component parts.
3. COPYRIGHT. All title and copyrights in and to the SOFTWARE PRODUCT (including but not limited to any images, text, and "applets" incorporated into the SOFTWARE PRODUCT), the accompanying printed materials, and any copies of the SOFTWARE PRODUCT are owned by Microsoft or its suppliers. The SOFTWARE PRODUCT is protected by copyright laws and international treaty provisions. Therefore, you must treat the SOFTWARE PRODUCT like any other copyrighted material.
4.	U.S. GOVERNMENT RESTRICTED RIGHTS. The SOFTWARE PRODUCT and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software-Restricted Rights at 48 CFR 52.227-19, as applicable. Manufacturer is Microsoft Corporation/One Microsoft Way/Redmond, WA 98052-6399.
LIMITED WARRANTY
NO WARRANTIES. Microsoft expressly disclaims any warranty for the SOFTWARE PRODUCT. The SOFTWARE PRODUCT and any related documentation is provided "as is" without warranty of any kind, either express or implied, including, without limitation, the implied warranties or merchantability, fitness for a particular purpose, or noninfringement. The entire risk arising out of use or performance of the SOFTWARE PRODUCT remains with you.
NO LIABILITY FOR CONSEQUENTIAL DAMAGES. In no event shall Microsoft or its suppliers be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use this Microsoft product, even if Microsoft has been advised of the possibility of such damages. Because some states/jurisdictions do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you.
MISCELLANEOUS
If you acquired this product in the United States, this EULA is governed by the laws of the State of Washington.
If this product was acquired outside the United States, then local laws may apply.
Should you have any questions concerning this EULA, or if you desire to contact Microsoft for any reason, please contact the Microsoft subsidiary serving your country, or write: Microsoft Sales Information Center/One Microsoft Way/Redmond, WA  98052-6399.
EOL
)

# Displaying the license agreement using less
echo "$LICENSE_TEXT" | less

# Ask user if he wants to accept the EULA
read -p "Do you agree to accept the End-User License Agreement (EULA)? (yes/no): " choice
if [[ $choice != "yes" ]]; then
  echo "The End-User License Agreement (EULA) was not accepted. The script will be terminated."
  exit 0
fi

# Positioning the cursor at the beginning of the document after less
echo -e "\033[H"

# Downloading tar.gz package
TAR_GZ_FILE="webfonts.tar.gz"
WEBFONTS_URL="https://www.freedesktop.org/software/fontconfig/webfonts/webfonts.tar.gz"
curl -o "$TAR_GZ_FILE" "$WEBFONTS_URL" || { echo "Error while downloading the package."; exit 1; }

# Unpack package to temp folder
TEMP_FOLDER=$(mktemp -d)
tar -xzf "$TAR_GZ_FILE" -C "$TEMP_FOLDER" || { echo "Error while unpacking $TAR_GZ_FILE."; exit 1; }

# Getting universal path to the font folder
FONTS_FOLDER="$HOME/.local/share/fonts"

# Create a font folder if it doesn't exist
mkdir -p "$FONTS_FOLDER"

# Move the .exe files to the fonts folder
find "$TEMP_FOLDER" -name "*.exe" -exec mv {} "$FONTS_FOLDER" \; || { echo "Error while moving .exe files to $FONTS_FOLDER."; exit 1; }

# Move the Licen.TXT file to the fonts folder
mv "$TEMP_FOLDER/msfonts/Licen.TXT" "$FONTS_FOLDER" || { echo "Error while moving Licen.TXT to $FONTS_FOLDER."; exit 1; }

# Extract .exe files with cabextract
cd "$FONTS_FOLDER"
cabextract *.exe || { echo "Error while extracting .exe files."; exit 1; }

# Remove temporary folder
rm -r "$TEMP_FOLDER"

# Show informations for the user
echo "Fonts have been successfully downloaded, extracted, and copied."
echo "Path to the fonts folder: $FONTS_FOLDER"
echo "The End-User License Agreement (EULA) is located in the same folder."

[/spoiler]

And now the problem is - how to turn it into package? And how to add it to the repo? I am novice but I think it would be great for us to have official package for legal MSFonts installer so as Ubuntu and SUSE - it will make life easier for new users. Package in official repo would be more reliable than AUR package which uses unknown source and not give you EULA to accept before installation.
I know we can use Liberation fonts and I prefer them too, but we are often forced to use font like Times New Roman becouse of University or science magazines, so it would be great to have this package in official repo

Offline

#2 2023-08-19 14:00:49

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,394

Re: MS Fonts for the Web on Arch - how to make package for official repo

My script also contains a license agreement that the user has to accept before installing

PKGBUILDs should not require any user action, so that's  a problem .

A workaround may be to tell the user to manually download the files, https://wiki.archlinux.org/title/Nonfre … sing_files has some xamples how that can be done.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building to complicated ?
Try clean chroot manager by graysky

Offline

#3 2023-08-19 14:50:47

seth
Member
Registered: 2012-09-03
Posts: 54,562

Re: MS Fonts for the Web on Arch - how to make package for official repo

https://aur.archlinux.org/packages/ttf-ms-fonts is on the AUR since 13 years and just shoves the license onto your disk (let's be real: nobody ever read any EULA any software hurls at you and it's unclear whether it has any legal relevance as it's typically presented after the contract)

One could probably package a script that does nothing but in a post-install routine makepkg a PKGBUILD that has you sign off "yeah, i totally read and understand this highly intelligble and interesting legal document. please tell me more." before it builds and locally installs a transient package actually providing the fonts.

Given that MS flat-out stole most of the fonts ("it's not theft if you use a different name and change one or two pixels") I personally could not care less.

Offline

#4 2023-08-19 15:10:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,924
Website

Re: MS Fonts for the Web on Arch - how to make package for official repo

There's also a fundamental misunderstanding here of what a license is.  A license, grants privileges that the user would not otherwise have.  That's it.  Sometimes there are parts that some might call restrictions in the license, but these are really just clarifications of what priveleges are not being granted - as by default, absolutely none are.

There is absolutely no point in requiring someone to "agree to" a license before installing software as there is nothing for the end user to agree or consent to.  If they are not familiar with the terms of the license anything they do (even just downloading the material) could be a copyright violation as far as they know.  And if they are willing to violate the copyright (by not checking whether they've been granted permission to even download it material) there's no reason to expect that they'd limit their use of the software to what is granted in the license even if they had read it.

In other words, if they don't "agree to" the terms of the license, they'd not even be able to (legally) download the content.

Last edited by Trilby (2023-08-19 15:12:10)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2023-08-19 15:42:41

seth
Member
Registered: 2012-09-03
Posts: 54,562

Re: MS Fonts for the Web on Arch - how to make package for official repo

An EULA isn't a license but seeks to enforce a license via contract - or sth. like that. Nobody ever cared. Ever.
If this shit was any relevant, proprietary software would not be a thing; because if reading 60 pages of legal mumbo-jumbo was seriously required to install a word processor, 99% of end users would give up on page 3 "I'll just carve it in stone, that's easier!"

Since the particular one isn't that bad:

The extended universally ludicrous attribution wrote:

·    Reproduction and Distribution.
You may reproduce and distribute an unlimited number of copies of the SOFTWARE PRODUCT;  provided that each copy shall be a true and complete copy, including all copyright and trademark notices, and shall be accompanied by a copy of this EULA.  Copies of the SOFTWARE PRODUCT may not be distributed for profit either on a standalone basis or included as part of your own product.

Nothing in there says that you have to make anyone read that document, just to include it.
It's technically also not a "SOFTWARE PRODUCT", though. It's some vector graphics. So who knows.
I guess MS lawyers also don't read their EULAs…

Offline

#6 2023-08-19 16:15:06

mario995
Member
Registered: 2023-08-19
Posts: 2

Re: MS Fonts for the Web on Arch - how to make package for official repo

Oh, thank you for clarification guys. I understand it now
So maybe it is good idea to move our package from AUR to one of main repos? It would be safer for future to have it in normal repo and you dont need to fight with yay to install this fonts (it would be good for beginners).
Debian, Ubuntu and SUSE have ms-fonts in official repos so we can do it too. What do you think?

Last edited by mario995 (2023-08-19 17:09:00)

Offline

#7 2023-08-19 19:42:28

seth
Member
Registered: 2012-09-03
Posts: 54,562

Re: MS Fonts for the Web on Arch - how to make package for official repo

Packages generally (only) make it into the official repos if a trusted user wants to see and maintain them there and you certainly don't need nor should use yay to install anything from the AUR, let alone some fonts. You can just download the PKGBUILD and "makepkg -i" it.

And I really don't understand how any of this relates to what exactly being safer for which future?

Offline

Board footer

Powered by FluxBB