From 7905c38c74a730951ec0a87ba45780e107f86cc5 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 28 Nov 2018 07:55:49 -0500 Subject: [PATCH 1/3] fedpkg: fix patch --- .../python-modules/fedpkg-buildfix.diff | 14 -------------- .../python-modules/fedpkg/default.nix | 6 ++---- .../python-modules/fedpkg/fix-paths.patch | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 pkgs/development/python-modules/fedpkg-buildfix.diff create mode 100644 pkgs/development/python-modules/fedpkg/fix-paths.patch diff --git a/pkgs/development/python-modules/fedpkg-buildfix.diff b/pkgs/development/python-modules/fedpkg-buildfix.diff deleted file mode 100644 index b9d46d7c7417..000000000000 --- a/pkgs/development/python-modules/fedpkg-buildfix.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- a/setup.py 2014-02-04 16:12:37.021993713 +0100 -+++ b/setup.py 2014-02-04 16:11:42.653995607 +0100 -@@ -13,8 +13,8 @@ - package_dir = {'': 'src'}, - packages = ['fedpkg'], - scripts = ['src/bin/fedpkg'], -- data_files = [('/etc/bash_completion.d', ['src/fedpkg.bash']), -- ('/etc/rpkg', ['src/fedpkg.conf']), -- ('/usr/libexec/', ['src/fedpkg-fixbranches.py']), -+ data_files = [('etc/bash_completion.d', ['src/fedpkg.bash']), -+ ('etc/rpkg', ['src/fedpkg.conf']), -+ ('libexec/', ['src/fedpkg-fixbranches.py']), - ] - ) diff --git a/pkgs/development/python-modules/fedpkg/default.nix b/pkgs/development/python-modules/fedpkg/default.nix index 0230466e6e36..e23a3e4a0d6f 100644 --- a/pkgs/development/python-modules/fedpkg/default.nix +++ b/pkgs/development/python-modules/fedpkg/default.nix @@ -3,16 +3,14 @@ buildPythonPackage rec { pname = "fedpkg"; version = "1.29"; - name = "${pname}-${version}"; disabled = isPy3k; src = fetchurl { - url = "https://releases.pagure.org/fedpkg/${name}.tar.bz2"; + url = "https://releases.pagure.org/fedpkg/${pname}-${version}.tar.bz2"; sha256 = "1cpy5p1rp7w52ighz3ynvhyw04z86y8phq3n8563lj6ayr8pw631"; }; - - #patches = [ ../development/python-modules/fedpkg-buildfix.diff ]; + patches = [ ./fix-paths.patch ]; propagatedBuildInputs = [ rpkg offtrac urlgrabber ]; doCheck = false; # requires fedora_cert which isn't used anymore diff --git a/pkgs/development/python-modules/fedpkg/fix-paths.patch b/pkgs/development/python-modules/fedpkg/fix-paths.patch new file mode 100644 index 000000000000..1831337a5851 --- /dev/null +++ b/pkgs/development/python-modules/fedpkg/fix-paths.patch @@ -0,0 +1,16 @@ +--- orig/setup.py ++++ new/setup.py +@@ -27,10 +27,10 @@ + 'bin/fedpkg', + 'bin/fedpkg-stage', + ], +- data_files=[(bash_completion_dir(), ['conf/bash-completion/fedpkg.bash']), +- ('/etc/rpkg', ['conf/etc/rpkg/fedpkg.conf', ++ data_files=[('share/bash-completion/completions', ['conf/bash-completion/fedpkg.bash']), ++ ('etc/rpkg', ['conf/etc/rpkg/fedpkg.conf', + 'conf/etc/rpkg/fedpkg-stage.conf']), +- ('/usr/share/zsh/site-functions', ['conf/zsh-completion/_fedpkg']), ++ ('share/zsh/site-functions', ['conf/zsh-completion/_fedpkg']), + ], + + tests_require=['nose', 'mock'], From c220fe8e88b0869e2686de035f02585238e02228 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 1 Dec 2018 10:59:34 -0500 Subject: [PATCH 2/3] fedpkg: promote to python application --- pkgs/development/{python-modules => tools}/fedpkg/default.nix | 4 ++-- .../{python-modules => tools}/fedpkg/fix-paths.patch | 0 pkgs/top-level/all-packages.nix | 2 ++ pkgs/top-level/python-packages.nix | 2 -- 4 files changed, 4 insertions(+), 4 deletions(-) rename pkgs/development/{python-modules => tools}/fedpkg/default.nix (84%) rename pkgs/development/{python-modules => tools}/fedpkg/fix-paths.patch (100%) diff --git a/pkgs/development/python-modules/fedpkg/default.nix b/pkgs/development/tools/fedpkg/default.nix similarity index 84% rename from pkgs/development/python-modules/fedpkg/default.nix rename to pkgs/development/tools/fedpkg/default.nix index e23a3e4a0d6f..7c82dc9d32aa 100644 --- a/pkgs/development/python-modules/fedpkg/default.nix +++ b/pkgs/development/tools/fedpkg/default.nix @@ -1,6 +1,6 @@ -{ stdenv, buildPythonPackage, isPy3k, fetchurl, rpkg, offtrac, urlgrabber }: +{ stdenv, buildPythonApplication, isPy3k, fetchurl, rpkg, offtrac, urlgrabber }: -buildPythonPackage rec { +buildPythonApplication rec { pname = "fedpkg"; version = "1.29"; diff --git a/pkgs/development/python-modules/fedpkg/fix-paths.patch b/pkgs/development/tools/fedpkg/fix-paths.patch similarity index 100% rename from pkgs/development/python-modules/fedpkg/fix-paths.patch rename to pkgs/development/tools/fedpkg/fix-paths.patch diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e21ab50f0ddf..7f0811fd4089 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8533,6 +8533,8 @@ with pkgs; jdepend = callPackage ../development/tools/analysis/jdepend { }; + fedpkg = pythonPackages.callPackage ../development/tools/fedpkg { }; + flex_2_5_35 = callPackage ../development/tools/parsing/flex/2.5.35.nix { }; flex = callPackage ../development/tools/parsing/flex { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index be0cfdb6ce3c..2c1c772a7a25 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1655,8 +1655,6 @@ in { then callPackage ../development/python-modules/faulthandler {} else throw "faulthandler is built into ${python.executable}"; - fedpkg = callPackage ../development/python-modules/fedpkg { }; - flit = callPackage ../development/python-modules/flit { }; flowlogs_reader = callPackage ../development/python-modules/flowlogs_reader { }; From 2256273c6b453f626e7f4fd1317b9b332b45db6a Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 1 Dec 2018 17:09:05 -0500 Subject: [PATCH 3/3] fedpkg: add fedora_cert as dependency [1: 1b9fd365819] Removed fedora_cert from nixpkgs, but fedpkg 1.29 still it required at runtime. 1: 1b9fd36581951b8a8c51e6e1cc792c1589135717 fedora_cert: remove package --- pkgs/development/tools/fedpkg/default.nix | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/pkgs/development/tools/fedpkg/default.nix b/pkgs/development/tools/fedpkg/default.nix index 7c82dc9d32aa..5548b20de83c 100644 --- a/pkgs/development/tools/fedpkg/default.nix +++ b/pkgs/development/tools/fedpkg/default.nix @@ -1,6 +1,19 @@ -{ stdenv, buildPythonApplication, isPy3k, fetchurl, rpkg, offtrac, urlgrabber }: +{ stdenv, buildPythonApplication, buildPythonPackage, isPy3k, fetchurl, rpkg, offtrac, urlgrabber, pyopenssl, python_fedora }: -buildPythonApplication rec { +let + fedora_cert = buildPythonPackage rec { + name = "fedora-cert"; + version = "0.6.0.2"; + format = "other"; + + src = fetchurl { + url = "https://releases.pagure.org/fedora-packager/fedora-packager-${version}.tar.bz2"; + sha256 = "02f22072wx1zg3rhyfw6gbxryzcbh66s92nb98mb9kdhxixv6p0z"; + }; + propagatedBuildInputs = [ python_fedora pyopenssl ]; + doCheck = false; + }; +in buildPythonApplication rec { pname = "fedpkg"; version = "1.29"; @@ -11,9 +24,7 @@ buildPythonApplication rec { sha256 = "1cpy5p1rp7w52ighz3ynvhyw04z86y8phq3n8563lj6ayr8pw631"; }; patches = [ ./fix-paths.patch ]; - propagatedBuildInputs = [ rpkg offtrac urlgrabber ]; - - doCheck = false; # requires fedora_cert which isn't used anymore + propagatedBuildInputs = [ rpkg offtrac urlgrabber fedora_cert ]; meta = with stdenv.lib; { description = "Subclass of the rpkg project for dealing with rpm packaging";