public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/fedora-packager] epel10: Actually drop fedora-burn-yubikey
@ 2026-06-25 13:19 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-06-25 13:19 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/fedora-packager
            Branch : epel10
            Commit : fa47025bb11d3562b3ff22bd6f77b210664d1b69
            Author : Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
            Date   : 2024-08-09T11:27:16-04:00
            Stats  : +0/-99 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/fedora-packager/c/fa47025bb11d3562b3ff22bd6f77b210664d1b69?branch=epel10

            Log:
            Actually drop fedora-burn-yubikey

20d5b901e08a683e3a6eb4ea56b4b2bbb4a317f4 tried to drop fedora-burn-yubikey,
but because of confusion between /usr/bin and /usr/sbin, one copy
was left behind.

---
diff --git a/fedora-burn-yubikey.py b/fedora-burn-yubikey.py
deleted file mode 100644
index 5efd99e..0000000
--- a/fedora-burn-yubikey.py
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/usr/bin/python3
-
-# Copyright (C) 2010 Red Hat Inc.
-# Author: Mike McGrath <mmcgrath@redhat.com>
-# 
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
-# the full text of the license.
-
-# ykpersonalize -ofixed=ccccccccccci -afcaa0c5bf2e83ec040e4aeb7f8565293 -ouid=1e7f1da7d6d1
-from fedora.client import AccountSystem, AuthError
-from getpass import getpass
-import sys
-import gettext
-from optparse import OptionParser
-import yubico
-
-t = gettext.translation('fas', '/usr/share/locale', fallback = True)
-_ = t.gettext
-
-try:
-    ykey = yubico.find_yubikey(False)
-except yubico.yubikey.YubiKeyError as ex:
-    print('Unable to get access to a yubikey: %s' % ex)
-    sys.exit(1)
-
-parser = OptionParser(version = "0.1")
-parser.add_option('-u', '--username',
-                  dest = 'username',
-                  default = None,
-                  metavar = 'username',
-                  help = _('Fedora Account System username'))
-parser.add_option('-S', '--slot',
-                  dest = 'slot',
-                  default = '1',
-                  metavar = 'slot',
-                  help = _('The Yubikey slot to be used'))
-parser.add_option('-U', '--url',
-                  dest = 'url',
-                  default = 'https://admin.fedoraproject.org/accounts/',
-                  metavar = 'url',
-                  help = _('FAS URL (Default: https://admin.fedoraproject.org/accounts/'))
-
-(opts, args) = parser.parse_args()
-slot = opts.slot
-
-if not opts.username:
-    print(_('Please provide a username.'))
-    parser.print_help()
-    sys.exit(0)
-
-print(_(
-'''
-Attention: You are about to reprogram your yubikey!  Please ensure it is
-plugged in to your USB slot before continuing.  The secret key currently on
-your yubikey will be destroyed as part of this operation!
-
-'''))
-
-print('Contacting %s' % opts.url)
-password = getpass('Password for %s: ' % opts.username)
-
-fas = AccountSystem(username=opts.username, password=password, base_url=opts.url)
-try:
-    new_key = fas.send_request('yubikey/genkey', auth=True)
-except AuthError as e:
-    print(e)
-    sys.exit(1)
-
-print("")
-print(_('New key generated in FAS, attempting to burn to yubikey'))
-print("")
-
-opts = new_key['key'].split()
-
-try:
-    ykconfig = ykey.init_config()
-    ykconfig.mode_yubikey_otp(f'h:{opts[1]}'.encode(), f'h:{opts[2]}'.encode())
-    ykconfig.fixed_string(str(f'm:{opts[0]}'))
-    ykconfig.ticket_flag('APPEND_CR', True)
-    ykconfig.config_flag('STATIC_TICKET', False)
-    if ykey.version_num() >= (2, 1):
-        ykconfig.config_flag('STRONG_PW1', False)
-        ykconfig.config_flag('STRONG_PW2', False)
-        ykconfig.config_flag('MAN_UPDATE', False)
-    if ykey.version_num() >= (2, 2):
-        ykconfig.extended_flag('SERIAL_API_VISIBLE', True)
-    ykey.write_config(ykconfig, slot=int(slot))
-    print("Success!  Your Yubikey ID is %s" % opts[0])
-except yubico.yubikey.YubiKeyError as ex:
-    print('Yubikey error: %s' % ex)

diff --git a/fedora-packager.spec b/fedora-packager.spec
index c2b928d..7d11299 100644
--- a/fedora-packager.spec
+++ b/fedora-packager.spec
@@ -12,7 +12,6 @@ Source2:        pkgname.py
 Source3:        rpmbuild-md5
 Source4:        secondary-koji
 Source5:        fkinit
-Source6:        fedora-burn-yubikey.py
 
 Source10:       fedora.conf
 Source11:       s390.conf
@@ -71,7 +70,6 @@ install -D %{SOURCE3} %{buildroot}%{_bindir}/rpmbuild-md5
 install -D %{SOURCE4} %{buildroot}%{_bindir}/s390-koji
 install -D %{SOURCE4} %{buildroot}%{_bindir}/stg-koji
 install -D %{SOURCE5} %{buildroot}%{_bindir}/fkinit
-install -D %{SOURCE6} %{buildroot}%{_bindir}/fedora-burn-yubikey
 
 install -m0644 -Dt %{buildroot}%{_sysconfdir}/koji.conf.d/ \
   %{SOURCE10} %{SOURCE11} %{SOURCE12}
@@ -80,9 +78,6 @@ install -m0644 -Dt %{buildroot}%{_sysconfdir}/krb5.conf.d/ \
 install -m0644 -Dt %{buildroot}%{_sysconfdir}/pki/ipa/ \
   %{SOURCE15} %{SOURCE16}
 
-# The fedora-burn-yubikey utility only worked with fas2, which is now retired.
-# rm -f %{buildroot}/usr/sbin/fedora-burn-yubikey
-
 %files
 %license %{_licensedir}/%{name}/
 %{_bindir}/fedora-getsvn
@@ -90,7 +85,6 @@ install -m0644 -Dt %{buildroot}%{_sysconfdir}/pki/ipa/ \
 %{_bindir}/rpmbuild-md5
 %{_bindir}/s390-koji
 %{_bindir}/stg-koji
-%{_bindir}/fedora-burn-yubikey
 %config(noreplace) %{_sysconfdir}/koji.conf.d/*
 
 %files kerberos

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-25 13:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-25 13:19 [rpms/fedora-packager] epel10: Actually drop fedora-burn-yubikey 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox