#gnu

federatica_bot@federatica.space

GNU Guix: Authenticate your Git checkouts!

You clone a Git repository, then pull from it. How can you tell its contents are “authentic”—i.e., coming from the “genuine” project you think you’re pulling from, written by the fine human beings you’ve been working with? With commit signatures and “verified” badges ✅ flourishing, you’d think this has long been solved—but nope!

Four years after Guix deployed its own tool to allow users to authenticate updates fetched with guix pull (which uses Git under the hood), the situation hasn’t changed all that much: the vast majority of developers using Git simply do not authenticate the code they pull. That’s pretty bad. It’s the modern-day equivalent of sharing unsigned tarballs and packages like we’d blissfully do in the past century.

The authentication mechanism Guix uses for channels is available to any Git user through the guix git authenticate command. This post is a guide for Git users who are not necessarily Guix users but are interested in using this command for their own repositories. Before looking into the command-line interface and how we improved it to make it more convenient, let’s dispel any misunderstandings or misconceptions.

Why you should care

When you run git pull, you’re fetching a bunch of commits from a server. If it’s over HTTPS, you’re authenticating the server itself, which is nice, but that does not tell you who the code actually comes from—the server might be compromised and an attacker pushed code to the repository. Not helpful. At all.

But hey, maybe you think you’re good because everyone on your project is signing commits and tags, and because you’re disciplined, you routinely run git log --show-signature and check those “Good signature” GPG messages. Maybe you even have those fancy “✅ verified” badges as found on GitLab and on GitHub.

Signing commits is part of the solution, but it’s not enough to authenticate a set of commits that you pull; all it shows is that, well, those commits are signed. Badges aren’t much better: the presence of a “verified” badge only shows that the commit is signed by the OpenPGP key currently registered for the corresponding GitLab/GitHub account. It’s another source of lock-in and makes the hosting platform a trusted third-party. Worse, there’s no notion of authorization (which keys are authorized), let alone tracking of the history of authorization changes (which keys were authorized at the time a given commit was made). Not helpful either.

Being able to ensure that when you run git pull, you’re getting code that genuinely comes from authorized developers of the project is basic security hygiene. Obviously it cannot protect against efforts to infiltrate a project to eventually get commit access and insert malicious code—the kind of multi-year plot that led to the xz backdoor—but if you don’t even protect against unauthorized commits, then all bets are off.

Authentication is something we naturally expect from apt update, pip, guix pull, and similar tools; why not treat git pull to the same standard?

Initial setup

The guix git authenticate command authenticates Git checkouts, unsurprisingly. It’s currently part of Guix because that’s where it was brought to life, but it can be used on any Git repository. This section focuses on how to use it; you can learn about the motivation, its design, and its implementation in the 2020 blog post, in the 2022 peer-reviewed academic paper entitled Building a Secure Software Supply Chain with GNU Guix, or in this 20mn presentation.

To support authentication of your repository with guix git authenticate, you need to follow these steps:

  1. Enable commit signing on your repo: git config commit.gpgSign true. (Git now supports other signing methods but here we need OpenPGP signatures.)

  2. Create a keyring branch containing all the OpenPGP keys of all the committers, along these lines:

    git checkout --orphan keyring
    

    git reset --hard
    gpg --export alice@example.org > alice.key
    gpg --export bob@example.org > bob.key

    git add *.key
    git commit -m "Add committer keys."

All the files must end in .key. You must never remove keys from that branch: keys of users who left the project are necessary to authenticate past commits.

  1. Back to the main branch, add a .guix-authorizations file, listing the OpenPGP keys of authorized committers—we’ll get back to its format below.

  2. Commit! This becomes the introductory commit from which authentication can proceed. The introduction of your repository is the ID of this commit and the OpenPGP fingerprint of the key used to sign it.

That’s it. From now on, anyone who clones the repository can authenticate it. The first time, run:

guix git authenticate COMMIT SIGNER

… where COMMIT is the commit ID of the introductory commit, and SIGNER is the OpenPGP fingerprint of the key used to sign that commit (make sure to enclose it in double quotes if there are spaces!). As a repo maintainer, you must advertise this introductory commit ID and fingerprint on a web page or in a README file so others know what to pass to guix git authenticate.

The commit and signer are now recorded on the first run in .git/config; next time, you can run it without any arguments:

guix git authenticate

The other new feature is that the first time you run it, the command installs pre-push and pre-merge hooks (unless preexisting hooks are found) such that your repository is automatically authenticated from there on every time you run git pull or git push.

guix git authenticate exits with a non-zero code and an error message when it stumbles upon a commit that lacks a signature, that is signed by a key not in the keyring branch, or that is signed by a key not listed in .guix-authorizations.

Maintaining the list of authorized committers

The .guix-authorizations file in the repository is central: it lists the OpenPGP fingerprints of authorized committers. Any commit that is not signed by a key listed in the .guix-authorizations file of its parent commit(s) is considered inauthentic—and an error is reported. The format of .guix-authorizations is based on S-expressions and looks like this:

;; Example ‘.guix-authorizations’ file.

(authorizations
 (version 0)               ;current file format version

 (("AD17 A21E F8AE D8F1 CC02  DBD9 F8AE D8F1 765C 61E3"
   (name "alice"))
  ("2A39 3FFF 68F4 EF7A 3D29  12AF 68F4 EF7A 22FB B2D5"
   (name "bob"))
  ("CABB A931 C0FF EEC6 900D  0CFB 090B 1199 3D9A EBB5"
   (name "charlie"))))

The name bits are hints and do not have any effect; what matters is the fingerprints that are listed. You can obtain them with GnuPG by running commands like:

gpg --fingerprint charlie@example.org

At any time you can add or remove keys from .guix-authorizations and commit the changes; those changes take effect for child commits. For example, if we add Billie’s fingerprint to the file in commit A , then Billie becomes an authorized committer in descendants of commit A (we must make sure to add Billie’s key as a file in the keyring branch, too, as we saw above); Billie is still unauthorized in branches that lack A. If we remove Charlie’s key from the file in commit B , then Charlie is no longer an authorized committer, except in branches that start before B. This should feel rather natural.

That’s pretty much all you need to know to get started! Check the manual for more info.

All the information needed to authenticate the repository is contained in the repository itself—it does not depend on a forge or key server. That’s a good property to allow anyone to authenticate it, to ensure determinism and transparency, and to avoid lock-in.

Interested? You can help!

guix git authenticate is a great tool that you can start using today so you and fellow co-workers can be sure you’re getting the right code! It solves an important problem that, to my knowledge, hasn’t really been addressed by any other tool.

Maybe you’re interested but don’t feel like installing Guix “just” for this tool. Maybe you’re not into Scheme and Lisp and would rather use a tool written in your favorite language. Or maybe you think—and rightfully so—that such a tool ought to be part of Git proper.

That’s OK, we can talk! We’re open to discussing with folks who’d like to come up with alternative implementations—check out the articles mentioned above if you’d like to take that route. And we’re open to contributing to a standardization effort. Let’s get in touch!

Acknowledgments

Thanks to Florian Pelz and Simon Tournier for their insightful comments on an earlier draft of this post.

#gnu #gnuorg #opensource

bliter@diaspora-fr.org

Nom de code - #Linux [Ultra HD 4K] 2001 [VF] - #TVArchive

top
https://www.youtube.com/watch?v=UfN_uUsFGaM

Nom de Code : Linux (anglais : The Code, titre de la version originale) est un #film #documentaire de #HannuPuttonen datant de 2002 qui retrace l' #histoire des #mouvements #GNU, #Linux, #opensource et des #logicielslibres et dans lequel plusieurs personnalités de l' #informatique sont interviewées, comme #LinusTorvalds, #AlanCox, #RichardStallman, Theodore Ts'o ou Eric S. Raymond.

Le film s'achève par cette assertion : "Ce serait peut-être l'une des plus grandes opportunités manquées de notre époque si le #logiciel-libre ne libérait rien d'autre que du code."

https://invidious.fdn.fr/watch?v=UfN_uUsFGaM
#gnu-linux #internet #ordinateur #politique

grey@sysad.org

Dillo release 3.1.0

Also Dillo is still alive?? Hunh?

https://dillo-browser.github.io/latest.html
https://lobste.rs/s/drhnog/dillo_release_3_1_0

  • Add support for floating HTML elements, which involved a big redesign.
  • Add support for OpenSSL, LibreSSL and mbed TLS for HTTPS, which is now enabled by default.
  • Add a CI pipeline to build Dillo on Ubuntu, MacOS, FreeBSD and Windows (via cygwin).
  • Add automatic HTML rendering tests.
  • Improve and extend the Dillo manual.

In memory of Sebastian Geerken

#linux #gnu #gnulinux #web #html #code #softtware #opensource #freesoftware

prplcdclnw@diasp.eu

Parabolic Wins Outstanding New Free Software Contributor for Nick Logozzo at LibrePlanet

Parabolic is another YouTube downloader for Linux

Unfortunately, it's only available as a Snap or Flathub.

https://nickvision.org/parabolic.html

I haven't tried this. The documentation (https://htmlpreview.github.io/?https://raw.githubusercontent.com/NickvisionApps/Parabolic/main/NickvisionTubeConverter.Shared/Docs/html/C/newDownload.html) hints that it may use yt-dlp. If so, I'd just go with MPV and/or yt-dllp instead. If you install MPV from the .deb file, you'll get yt-dlp along with it. I would advise installing yt-dlp into your ~/bin folder so you can set a crontab task to update it every day (yt-dlp -U). Distro repos don't keep stuff up to date well enough. yt.dlp needs to be up to date in order to continue working.

curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o ~/bin/yt-dlp
chmod 755 ~/bin/yt-dlp

MPV is a media player that can use yt-dlp to stream YouTube videos without using a web browser at all. mpv --volume=30 --volume-max=200 --player-operation-mode=pseudo-gui -- <YouTube URL>

MPV fails on some YouTube videos that yt-dllp, used alone, can download.

#youtube #free-software #gnu #linux #libreplanet #nick-logozzo #youtube-downloader

federatica_bot@federatica.space

gnulib @ Savannah: GNU gnulib: gnulib-tool has become much faster

If you are developer on a package that uses GNU gnulib as part of its build system:

gnulib-tool has been known for being slow for many years. We have listened to your complaints. We have rewritten gnulib-tool in another programming language (Python). It is between 8 times and 100 times faster than the previous implementation.

Both implementations behave identically, that is, produce the same generated files and the same output. Nothing changes in your way to use Gnulib; it's only faster.

In order to reap the new speed:

1. Make sure you have Python (version 3.7 or newer) installed on your machine.

2. Update your gnulib checkout. (For some packages, it comes as a git submodule named 'gnulib'.) Like this:

$ git checkout master

$ git pull

Set the environment variable GNULIB_SRCDIR, pointing to this checkout.

If the package is using a git submodule named 'gnulib', it is also advisable to do

$ git commit -m 'build: Update gnulib submodule to latest.' gnulib

(as a preparation for step 4, because the --no-git option does not work as expected in all variants of 'bootstrap').

3. Clean the built files of your package:

$ make -k distclean

4. Regenerate the fetched and generated files of your package. Depending on the package, this may be a command such as

$ ./bootstrap --no-git --gnulib-srcdir=$GNULIB_SRCDIR

or

$ export GNULIB_SRCDIR; ./autopull.sh; ./autogen.sh

or, if no such script is available:

$ $GNULIB_SRCDIR/gnulib-tool --update

5. Continue with

$ ./configure

$ make

as usual.

Enjoy! The rewritten gnulib-tool was implemented by Dmitry Selyutin, Collin Funk, and me.

#gnu #gnuorg #opensource

mkwadee@diasp.eu

I can finally say I've upgraded successfully to #Fedora40. It was not without hassle this time and it started with what seemed to be a system that did not even give me a prompt after #rebooting, although the update process had seemed to go smoothly and quickly. Luckily, the virtual screens were working and so I could #login to a #shell. Although #sddm didn't seem to be working, #kdm was and so I was able to open a desktop session, but only in #Gnome. There were still problems running #kde #programs such as #konsole and #korganizer as some #qt #libraries were missing. Installing those allowed the programs to run. Also, no #audio devices were being detected and so I couldn't play any clips, etc.

Today I found that #kwin was also lacking a library (#qtsensors) and so after that was installed and I rebooted the machine, I found that sddm was working again and so I could log in to the #kde session that I usually do. Also, the #sound issue was solved by removing the directory #wireplumber from ~/.local/state.

#GNU #Linux #Fedora #F40 #FreeSoftware

federatica_bot@federatica.space

gnulib @ Savannah: GNU gnulib: calling for beta-testers

If you are developer on a package that uses GNU gnulib as part of its build system:

gnulib-tool has been known for being slow for many years. We have listened to your complaints. A rewrite of gnulib-tool in another programming language (Python) is ready for beta-testing. It is between 8 times and 100 times faster than the original gnulib-tool.

Both implementations should behave identically, that is, produce the same generated files and the same output. You can help us ensure this, through the following steps:

1. Make sure you have Python (version 3.7 or newer) installed on your machine.

2. Update your gnulib checkout. (For some packages, it comes as a git submodule named 'gnulib'.) Like this:

$ git checkout master

$ git pull

Set the environment variable GNULIB_SRCDIR, pointing to this checkout.

If the package is using a git submodule named 'gnulib', it is also advisable to do

$ git commit -m 'build: Update gnulib submodule to latest.' gnulib

(as a preparation for step 5, because the --no-git option does not work as expected in all variants of 'bootstrap').

3. Set an environment variable that enables checking that the two implementations behave the same:

$ export GNULIB_TOOL_IMPL=sh+py

4. Clean the built files of your package:

$ make -k distclean

5. Regenerate the fetched and generated files of your package. Depending on the package, this may be a command such as

$ ./bootstrap --no-git --gnulib-srcdir=$GNULIB_SRCDIR

or

$ export GNULIB_SRCDIR; ./autopull.sh; ./autogen.sh

or, if no such script is available:

$ $GNULIB_SRCDIR/gnulib-tool --update

If there is a failure, due to differences between the 'sh' and 'py' results, please report it to bug-gnulib@gnu.org.

6. If this invocation was successful, you can trust the rewritten gnulib-tool and use it from now on, by setting the environment variable

$ export GNULIB_TOOL_IMPL=py

7. Continue with

$ ./configure

$ make

as usual.

And enjoy the speed! The rewritten gnulib-tool was implemented by Dmitry Selyutin, Collin Funk, and me.

#gnu #gnuorg #opensource

federatica_bot@federatica.space

parallel @ Savannah: GNU Parallel 20240422 ('Børsen') [stable]

GNU Parallel 20240422 ('Børsen') has been released. It is available for download at: lbry://@GnuParallel:4

Quote of the month:

I’m a big fan of GNU parallel!

-- Scott Cain @scottjcain@twitter

New in this release:

  • Bug fixes and man page updates.

GNU Parallel - For people who live life in the parallel lane.

If you like GNU Parallel record a video testimonial: Say who you are, what you use GNU Parallel for, how it helps you, and what you like most about it. Include a command that uses GNU Parallel if you feel like it.

About GNU Parallel

GNU Parallel is a shell tool for executing jobs in parallel using one or more computers. A job can be a single command or a small script that has to be run for each of the lines in the input. The typical input is a list of files, a list of hosts, a list of users, a list of URLs, or a list of tables. A job can also be a command that reads from a pipe. GNU Parallel can then split the input and pipe it into commands in parallel.

If you use xargs and tee today you will find GNU Parallel very easy to use as GNU Parallel is written to have the same options as xargs. If you write loops in shell, you will find GNU Parallel may be able to replace most of the loops and make them run faster by running several jobs in parallel. GNU Parallel can even replace nested loops.

GNU Parallel makes sure output from the commands is the same output as you would get had you run the commands sequentially. This makes it possible to use output from GNU Parallel as input for other programs.

For example you can run this to convert all jpeg files into png and gif files and have a progress bar:

parallel --bar convert {1} {1.}.{2} ::: *.jpg ::: png gif

Or you can generate big, medium, and small thumbnails of all jpeg files in sub dirs:

find . -name '*.jpg' |

parallel convert -geometry {2} {1} {1//}/thumb{2}_{1/} :::: - ::: 50 100 200

You can find more about GNU Parallel at: http://www.gnu.org/s/parallel/

You can install GNU Parallel in just 10 seconds with:

$ (wget -O - pi.dk/3 || lynx -source pi.dk/3 || curl pi.dk/3/ || \

fetch -o - http://pi.dk/3 ) > install.sh

$ sha1sum install.sh | grep 883c667e01eed62f975ad28b6d50e22a

12345678 883c667e 01eed62f 975ad28b 6d50e22a

$ md5sum install.sh | grep cc21b4c943fd03e93ae1ae49e28573c0

cc21b4c9 43fd03e9 3ae1ae49 e28573c0

$ sha512sum install.sh | grep ec113b49a54e705f86d51e784ebced224fdff3f52

79945d9d 250b42a4 2067bb00 99da012e c113b49a 54e705f8 6d51e784 ebced224

fdff3f52 ca588d64 e75f6033 61bd543f d631f592 2f87ceb2 ab034149 6df84a35

$ bash install.sh

Watch the intro video on http://www.youtube.com/playlist?list=PL284C9FF2488BC6D1

Walk through the tutorial (man parallel_tutorial). Your command line will love you for it.

When using programs that use GNU Parallel to process data for publication please cite:

O. Tange (2018): GNU Parallel 2018, March 2018, https://doi.org/10.5281/zenodo.1146014.

If you like GNU Parallel:

  • Give a demo at your local user group/team/colleagues
  • Post the intro videos on Reddit/Diaspora*/forums/blogs/ Identi.ca/Google+/Twitter/Facebook/Linkedin/mailing lists
  • Get the merchandise https://gnuparallel.threadless.com/designs/gnu-parallel
  • Request or write a review for your favourite blog or magazine
  • Request or build a package for your favourite distribution (if it is not already there)
  • Invite me for your next conference

If you use programs that use GNU Parallel for research:

  • Please cite GNU Parallel in you publications (use --citation)

If GNU Parallel saves you money:

About GNU SQL

GNU sql aims to give a simple, unified interface for accessing databases through all the different databases' command line clients. So far the focus has been on giving a common way to specify login information (protocol, username, password, hostname, and port number), size (database and table size), and running queries.

The database is addressed using a DBURL. If commands are left out you will get that database's interactive shell.

When using GNU SQL for a publication please cite:

O. Tange (2011): GNU SQL - A Command Line Tool for Accessing Different Databases Using DBURLs, ;login: The USENIX Magazine, April 2011:29-32.

About GNU Niceload

GNU niceload slows down a program when the computer load average (or other system activity) is above a certain limit. When the limit is reached the program will be suspended for some time. If the limit is a soft limit the program will be allowed to run for short amounts of time before being suspended again. If the limit is a hard limit the program will only be allowed to run when the system is below the limit.

#gnu #gnuorg #opensource