Giter Site home page Giter Site logo

rpg's People

Contributors

auchytil avatar boyks avatar fluptak avatar ignatenkobrain avatar jsilhan avatar onionka avatar pavolvican avatar regeciovad avatar vmasek avatar yousifd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rpg's Issues

implement CoprUploader methods

Now you have more research oriented task:

  • see what parameters are needed to build package in COPR (login on fedoraproject, srpm, ...)
  • implement method in CoprUploader.upload(?) that will take the needed stuff from previous step and return True if the SRPM was uploaded and builded correctly, False otherwise.
  • implement Base.upload_to_copr(token or login + pass) - it will internally get Base.srpm_path

refs:
https://fedorahosted.org/copr/wiki/UserDocs
http://miroslav.suchy.cz/blog/archives/2013/12/29/how_to_build_in_copr/
http://copr-fe-dev.cloud.fedoraproject.org/api/

refactor Base paths and plugin phases

dirs in base class:

  • extracted_dir
  • patched_dir
  • project_build_dir
  • install_dir
  • package_build_dir

plugin phases:

  • init
  • extracted
  • patched
  • compiled
  • installed
  • package_builded

reorder screens

change this order:
beginning script_page patches requires scriplets subpackages documentation build
to this (with Base method calls):
beginning <process_archive_or_dir; run_raw_sources_analysis> patches <apply_patches; run_patched_sources_analysis> script_page requires <build_project; run_compiled_analysis> <install_project; run_installed_analysis> subpackages scriplets documentation build <build_packages>

implement Command class

it will be part of Spec. Purpose of this is to represent bash commands in Spec scripts and execute them.
Plugins will append cmdlines. Base RPG class will execute command when moving to next phase.
Command could be internally represented as list of ((lists of strings) or strings)

class Command:
def __str__(self) # join command lines together. Returns one string that will be saved in spec file
def append_cmdline(self, cmdline) # adds cmdline at the end of command sequence
def execute(work_dir) # executes command in working directory

# this should be possible to do:
com = Command()
com.append_cmdline(["cd", build_dir])
com.append_cmdline("cmake ..")
com.execute(cur_dir)
str(com) # -> "cd <build_dir>\ncmake .."

Refactor ProjectBuild

Project build will only build or install files into desired directory, other stuff will do plugins.
add to plugins:

  • find_files
  • cmake <- add spec.tags["build"]
  • autotools <- add spec.tags["build"]
  • apply_patches

ProjectBuilder new API:

  • build(patched_dir, build_dir, build_commands) # throws RpgBuildError("err_str") when error occurs
  • install(build_dir, install_dir, install_commands) # throws RpgInstallError("err_str") when error occurs

Patch ordering

Patches created with git contain a header in this format:

From 0434683 Mon Sep 17 00:00:00 2001
From: Jan Silhan [email protected]
Date: Tue, 5 Aug 2014 11:25:07 +0200
Subject: [PATCH 1/2] changed doc of plugin_engine according to new plugin API

So that brings an idea of sorting by "Date" then by "Subject".

try build libsolv package with RPG

follow the process of RPG (all the phases: see /tmp/rpg-*) and watch warnings -> add issues/fix it
the testing project is libsolv project folder

Guide to plugins

I think, that a simple guide "how should the plugins look like" would be quite useful, even for the potential community.

implement python plugin

This plugin will append dependencies based on Python files analysis. It will be analogue to C plugin. You have to figure out regexp that would parse import statements or use Python builtin ATD? parser.
depends on #11

implement java plugin

look how java files are packed into rpm package and where are stored on the system. Then implement plugin. Depends on #11.
the plugin should:

  • set spec.build, spec.install
  • append spec.required_files, spec.buildrequired_files

implement find_file plugin

It will add to spec.files = all found files in current_dir. The string path should be relative to current_dir.

implement new Spec API

see: origin/erik (51ed6a4), refactor spec class to make the tests pass

git fetch origin
git reset --hard origin/erik
git rebase origin/master

Maybe the tests are wrong so consult it with me if some misunderstanding occurs.

add commandline argparse support

--plugin-dir <dir> - will load all plugins nested within dir
--disable-plugin <plugin_name> - plugin named plugin_name will not be executed during phases

Create a logo

We should create a logo, that would represent our project and appear in an all-apps menu.

Rename Command method.

I'd suggest renaming "append_cmdlines" to just "append".
In my opinion "cmd.append" looks better than "cmd.append_cmdlines".

Feel free to assign me to this issue or to close it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.